1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | "use strict";
|
15 | "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
16 | "function" ===
|
17 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
18 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
19 | var Scheduler = require("scheduler"),
|
20 | React = require("react"),
|
21 | ReactDOM = require("react-dom");
|
22 | function formatProdErrorMessage(code) {
|
23 | var url = "https://react.dev/errors/" + code;
|
24 | if (1 < arguments.length) {
|
25 | url += "?args[]=" + encodeURIComponent(arguments[1]);
|
26 | for (var i = 2; i < arguments.length; i++)
|
27 | url += "&args[]=" + encodeURIComponent(arguments[i]);
|
28 | }
|
29 | return (
|
30 | "Minified React error #" +
|
31 | code +
|
32 | "; visit " +
|
33 | url +
|
34 | " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
|
35 | );
|
36 | }
|
37 | function isValidContainer(node) {
|
38 | return !(
|
39 | !node ||
|
40 | (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
|
41 | );
|
42 | }
|
43 | var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
44 | REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
45 | REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
46 | REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
47 | REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
48 | REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
49 | REACT_PROVIDER_TYPE = Symbol.for("react.provider"),
|
50 | REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
51 | REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
52 | REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
53 | REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
54 | REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
55 | REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
56 | REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
57 | Symbol.for("react.scope");
|
58 | Symbol.for("react.debug_trace_mode");
|
59 | var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
60 | Symbol.for("react.legacy_hidden");
|
61 | Symbol.for("react.tracing_marker");
|
62 | var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
63 | function getIteratorFn(maybeIterable) {
|
64 | if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
65 | maybeIterable =
|
66 | (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
67 | maybeIterable["@@iterator"];
|
68 | return "function" === typeof maybeIterable ? maybeIterable : null;
|
69 | }
|
70 | Symbol.for("react.client.reference");
|
71 | function getNearestMountedFiber(fiber) {
|
72 | var node = fiber,
|
73 | nearestMounted = fiber;
|
74 | if (fiber.alternate) for (; node.return; ) node = node.return;
|
75 | else {
|
76 | fiber = node;
|
77 | do
|
78 | (node = fiber),
|
79 | 0 !== (node.flags & 4098) && (nearestMounted = node.return),
|
80 | (fiber = node.return);
|
81 | while (fiber);
|
82 | }
|
83 | return 3 === node.tag ? nearestMounted : null;
|
84 | }
|
85 | function getSuspenseInstanceFromFiber(fiber) {
|
86 | if (13 === fiber.tag) {
|
87 | var suspenseState = fiber.memoizedState;
|
88 | null === suspenseState &&
|
89 | ((fiber = fiber.alternate),
|
90 | null !== fiber && (suspenseState = fiber.memoizedState));
|
91 | if (null !== suspenseState) return suspenseState.dehydrated;
|
92 | }
|
93 | return null;
|
94 | }
|
95 | function assertIsMounted(fiber) {
|
96 | if (getNearestMountedFiber(fiber) !== fiber)
|
97 | throw Error(formatProdErrorMessage(188));
|
98 | }
|
99 | function findCurrentFiberUsingSlowPath(fiber) {
|
100 | var alternate = fiber.alternate;
|
101 | if (!alternate) {
|
102 | alternate = getNearestMountedFiber(fiber);
|
103 | if (null === alternate) throw Error(formatProdErrorMessage(188));
|
104 | return alternate !== fiber ? null : fiber;
|
105 | }
|
106 | for (var a = fiber, b = alternate; ; ) {
|
107 | var parentA = a.return;
|
108 | if (null === parentA) break;
|
109 | var parentB = parentA.alternate;
|
110 | if (null === parentB) {
|
111 | b = parentA.return;
|
112 | if (null !== b) {
|
113 | a = b;
|
114 | continue;
|
115 | }
|
116 | break;
|
117 | }
|
118 | if (parentA.child === parentB.child) {
|
119 | for (parentB = parentA.child; parentB; ) {
|
120 | if (parentB === a) return assertIsMounted(parentA), fiber;
|
121 | if (parentB === b) return assertIsMounted(parentA), alternate;
|
122 | parentB = parentB.sibling;
|
123 | }
|
124 | throw Error(formatProdErrorMessage(188));
|
125 | }
|
126 | if (a.return !== b.return) (a = parentA), (b = parentB);
|
127 | else {
|
128 | for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
|
129 | if (child$0 === a) {
|
130 | didFindChild = !0;
|
131 | a = parentA;
|
132 | b = parentB;
|
133 | break;
|
134 | }
|
135 | if (child$0 === b) {
|
136 | didFindChild = !0;
|
137 | b = parentA;
|
138 | a = parentB;
|
139 | break;
|
140 | }
|
141 | child$0 = child$0.sibling;
|
142 | }
|
143 | if (!didFindChild) {
|
144 | for (child$0 = parentB.child; child$0; ) {
|
145 | if (child$0 === a) {
|
146 | didFindChild = !0;
|
147 | a = parentB;
|
148 | b = parentA;
|
149 | break;
|
150 | }
|
151 | if (child$0 === b) {
|
152 | didFindChild = !0;
|
153 | b = parentB;
|
154 | a = parentA;
|
155 | break;
|
156 | }
|
157 | child$0 = child$0.sibling;
|
158 | }
|
159 | if (!didFindChild) throw Error(formatProdErrorMessage(189));
|
160 | }
|
161 | }
|
162 | if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
|
163 | }
|
164 | if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
|
165 | return a.stateNode.current === a ? fiber : alternate;
|
166 | }
|
167 | function findCurrentHostFiber(parent) {
|
168 | parent = findCurrentFiberUsingSlowPath(parent);
|
169 | return null !== parent ? findCurrentHostFiberImpl(parent) : null;
|
170 | }
|
171 | function findCurrentHostFiberImpl(node) {
|
172 | var tag = node.tag;
|
173 | if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
|
174 | for (node = node.child; null !== node; ) {
|
175 | tag = findCurrentHostFiberImpl(node);
|
176 | if (null !== tag) return tag;
|
177 | node = node.sibling;
|
178 | }
|
179 | return null;
|
180 | }
|
181 | var assign = Object.assign,
|
182 | isArrayImpl = Array.isArray,
|
183 | ReactSharedInternals =
|
184 | React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
185 | ReactDOMSharedInternals =
|
186 | ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
187 | sharedNotPendingObject = {
|
188 | pending: !1,
|
189 | data: null,
|
190 | method: null,
|
191 | action: null
|
192 | },
|
193 | valueStack = [],
|
194 | index = -1;
|
195 | function createCursor(defaultValue) {
|
196 | return { current: defaultValue };
|
197 | }
|
198 | function pop(cursor) {
|
199 | 0 > index ||
|
200 | ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
|
201 | }
|
202 | function push(cursor, value) {
|
203 | index++;
|
204 | valueStack[index] = cursor.current;
|
205 | cursor.current = value;
|
206 | }
|
207 | var contextStackCursor = createCursor(null),
|
208 | contextFiberStackCursor = createCursor(null),
|
209 | rootInstanceStackCursor = createCursor(null),
|
210 | hostTransitionProviderCursor = createCursor(null),
|
211 | HostTransitionContext = {
|
212 | $$typeof: REACT_CONTEXT_TYPE,
|
213 | Provider: null,
|
214 | Consumer: null,
|
215 | _currentValue: null,
|
216 | _currentValue2: null,
|
217 | _threadCount: 0
|
218 | };
|
219 | function pushHostContainer(fiber, nextRootInstance) {
|
220 | push(rootInstanceStackCursor, nextRootInstance);
|
221 | push(contextFiberStackCursor, fiber);
|
222 | push(contextStackCursor, null);
|
223 | fiber = nextRootInstance.nodeType;
|
224 | switch (fiber) {
|
225 | case 9:
|
226 | case 11:
|
227 | nextRootInstance = (nextRootInstance = nextRootInstance.documentElement)
|
228 | ? (nextRootInstance = nextRootInstance.namespaceURI)
|
229 | ? getOwnHostContext(nextRootInstance)
|
230 | : 0
|
231 | : 0;
|
232 | break;
|
233 | default:
|
234 | if (
|
235 | ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance),
|
236 | (nextRootInstance = fiber.tagName),
|
237 | (fiber = fiber.namespaceURI))
|
238 | )
|
239 | (fiber = getOwnHostContext(fiber)),
|
240 | (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance));
|
241 | else
|
242 | switch (nextRootInstance) {
|
243 | case "svg":
|
244 | nextRootInstance = 1;
|
245 | break;
|
246 | case "math":
|
247 | nextRootInstance = 2;
|
248 | break;
|
249 | default:
|
250 | nextRootInstance = 0;
|
251 | }
|
252 | }
|
253 | pop(contextStackCursor);
|
254 | push(contextStackCursor, nextRootInstance);
|
255 | }
|
256 | function popHostContainer() {
|
257 | pop(contextStackCursor);
|
258 | pop(contextFiberStackCursor);
|
259 | pop(rootInstanceStackCursor);
|
260 | }
|
261 | function pushHostContext(fiber) {
|
262 | null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);
|
263 | var context = contextStackCursor.current;
|
264 | var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);
|
265 | context !== JSCompiler_inline_result &&
|
266 | (push(contextFiberStackCursor, fiber),
|
267 | push(contextStackCursor, JSCompiler_inline_result));
|
268 | }
|
269 | function popHostContext(fiber) {
|
270 | contextFiberStackCursor.current === fiber &&
|
271 | (pop(contextStackCursor), pop(contextFiberStackCursor));
|
272 | hostTransitionProviderCursor.current === fiber &&
|
273 | (pop(hostTransitionProviderCursor),
|
274 | (HostTransitionContext._currentValue = null));
|
275 | }
|
276 | var hasOwnProperty = Object.prototype.hasOwnProperty,
|
277 | scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
|
278 | cancelCallback$1 = Scheduler.unstable_cancelCallback,
|
279 | shouldYield = Scheduler.unstable_shouldYield,
|
280 | requestPaint = Scheduler.unstable_requestPaint,
|
281 | now$1 = Scheduler.unstable_now,
|
282 | getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
|
283 | ImmediatePriority = Scheduler.unstable_ImmediatePriority,
|
284 | UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
|
285 | NormalPriority$1 = Scheduler.unstable_NormalPriority,
|
286 | LowPriority = Scheduler.unstable_LowPriority,
|
287 | IdlePriority = Scheduler.unstable_IdlePriority,
|
288 | log$1 = Scheduler.log,
|
289 | unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
|
290 | rendererID = null,
|
291 | injectedHook = null,
|
292 | injectedProfilingHooks = null,
|
293 | isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
294 | function onCommitRoot(root, eventPriority) {
|
295 | if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
|
296 | try {
|
297 | var didError = 128 === (root.current.flags & 128);
|
298 | switch (eventPriority) {
|
299 | case 2:
|
300 | var schedulerPriority = ImmediatePriority;
|
301 | break;
|
302 | case 8:
|
303 | schedulerPriority = UserBlockingPriority;
|
304 | break;
|
305 | case 32:
|
306 | schedulerPriority = NormalPriority$1;
|
307 | break;
|
308 | case 268435456:
|
309 | schedulerPriority = IdlePriority;
|
310 | break;
|
311 | default:
|
312 | schedulerPriority = NormalPriority$1;
|
313 | }
|
314 | injectedHook.onCommitFiberRoot(
|
315 | rendererID,
|
316 | root,
|
317 | schedulerPriority,
|
318 | didError
|
319 | );
|
320 | } catch (err) {}
|
321 | }
|
322 | function setIsStrictModeForDevtools(newIsStrictMode) {
|
323 | "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
|
324 | if (injectedHook && "function" === typeof injectedHook.setStrictMode)
|
325 | try {
|
326 | injectedHook.setStrictMode(rendererID, newIsStrictMode);
|
327 | } catch (err) {}
|
328 | }
|
329 | function injectProfilingHooks(profilingHooks) {
|
330 | injectedProfilingHooks = profilingHooks;
|
331 | }
|
332 | function getLaneLabelMap() {
|
333 | for (var map = new Map(), lane = 1, index$1 = 0; 31 > index$1; index$1++) {
|
334 | var label = getLabelForLane(lane);
|
335 | map.set(lane, label);
|
336 | lane *= 2;
|
337 | }
|
338 | return map;
|
339 | }
|
340 | function markCommitStopped() {
|
341 | null !== injectedProfilingHooks &&
|
342 | "function" === typeof injectedProfilingHooks.markCommitStopped &&
|
343 | injectedProfilingHooks.markCommitStopped();
|
344 | }
|
345 | function markComponentRenderStarted(fiber) {
|
346 | null !== injectedProfilingHooks &&
|
347 | "function" === typeof injectedProfilingHooks.markComponentRenderStarted &&
|
348 | injectedProfilingHooks.markComponentRenderStarted(fiber);
|
349 | }
|
350 | function markComponentRenderStopped() {
|
351 | null !== injectedProfilingHooks &&
|
352 | "function" === typeof injectedProfilingHooks.markComponentRenderStopped &&
|
353 | injectedProfilingHooks.markComponentRenderStopped();
|
354 | }
|
355 | function markComponentLayoutEffectUnmountStarted(fiber) {
|
356 | null !== injectedProfilingHooks &&
|
357 | "function" ===
|
358 | typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted &&
|
359 | injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);
|
360 | }
|
361 | function markComponentLayoutEffectUnmountStopped() {
|
362 | null !== injectedProfilingHooks &&
|
363 | "function" ===
|
364 | typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped &&
|
365 | injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();
|
366 | }
|
367 | function markRenderStarted(lanes) {
|
368 | null !== injectedProfilingHooks &&
|
369 | "function" === typeof injectedProfilingHooks.markRenderStarted &&
|
370 | injectedProfilingHooks.markRenderStarted(lanes);
|
371 | }
|
372 | function markRenderStopped() {
|
373 | null !== injectedProfilingHooks &&
|
374 | "function" === typeof injectedProfilingHooks.markRenderStopped &&
|
375 | injectedProfilingHooks.markRenderStopped();
|
376 | }
|
377 | function markStateUpdateScheduled(fiber, lane) {
|
378 | null !== injectedProfilingHooks &&
|
379 | "function" === typeof injectedProfilingHooks.markStateUpdateScheduled &&
|
380 | injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
|
381 | }
|
382 | var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
|
383 | log = Math.log,
|
384 | LN2 = Math.LN2;
|
385 | function clz32Fallback(x) {
|
386 | x >>>= 0;
|
387 | return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
|
388 | }
|
389 | function getLabelForLane(lane) {
|
390 | if (lane & 1) return "SyncHydrationLane";
|
391 | if (lane & 2) return "Sync";
|
392 | if (lane & 4) return "InputContinuousHydration";
|
393 | if (lane & 8) return "InputContinuous";
|
394 | if (lane & 16) return "DefaultHydration";
|
395 | if (lane & 32) return "Default";
|
396 | if (lane & 64) return "TransitionHydration";
|
397 | if (lane & 4194176) return "Transition";
|
398 | if (lane & 62914560) return "Retry";
|
399 | if (lane & 67108864) return "SelectiveHydration";
|
400 | if (lane & 134217728) return "IdleHydration";
|
401 | if (lane & 268435456) return "Idle";
|
402 | if (lane & 536870912) return "Offscreen";
|
403 | if (lane & 1073741824) return "Deferred";
|
404 | }
|
405 | var nextTransitionLane = 128,
|
406 | nextRetryLane = 4194304;
|
407 | function getHighestPriorityLanes(lanes) {
|
408 | var pendingSyncLanes = lanes & 42;
|
409 | if (0 !== pendingSyncLanes) return pendingSyncLanes;
|
410 | switch (lanes & -lanes) {
|
411 | case 1:
|
412 | return 1;
|
413 | case 2:
|
414 | return 2;
|
415 | case 4:
|
416 | return 4;
|
417 | case 8:
|
418 | return 8;
|
419 | case 16:
|
420 | return 16;
|
421 | case 32:
|
422 | return 32;
|
423 | case 64:
|
424 | return 64;
|
425 | case 128:
|
426 | case 256:
|
427 | case 512:
|
428 | case 1024:
|
429 | case 2048:
|
430 | case 4096:
|
431 | case 8192:
|
432 | case 16384:
|
433 | case 32768:
|
434 | case 65536:
|
435 | case 131072:
|
436 | case 262144:
|
437 | case 524288:
|
438 | case 1048576:
|
439 | case 2097152:
|
440 | return lanes & 4194176;
|
441 | case 4194304:
|
442 | case 8388608:
|
443 | case 16777216:
|
444 | case 33554432:
|
445 | return lanes & 62914560;
|
446 | case 67108864:
|
447 | return 67108864;
|
448 | case 134217728:
|
449 | return 134217728;
|
450 | case 268435456:
|
451 | return 268435456;
|
452 | case 536870912:
|
453 | return 536870912;
|
454 | case 1073741824:
|
455 | return 0;
|
456 | default:
|
457 | return lanes;
|
458 | }
|
459 | }
|
460 | function getNextLanes(root, wipLanes) {
|
461 | var pendingLanes = root.pendingLanes;
|
462 | if (0 === pendingLanes) return 0;
|
463 | var nextLanes = 0,
|
464 | suspendedLanes = root.suspendedLanes;
|
465 | root = root.pingedLanes;
|
466 | var nonIdlePendingLanes = pendingLanes & 134217727;
|
467 | 0 !== nonIdlePendingLanes
|
468 | ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
|
469 | 0 !== pendingLanes
|
470 | ? (nextLanes = getHighestPriorityLanes(pendingLanes))
|
471 | : ((root &= nonIdlePendingLanes),
|
472 | 0 !== root && (nextLanes = getHighestPriorityLanes(root))))
|
473 | : ((pendingLanes &= ~suspendedLanes),
|
474 | 0 !== pendingLanes
|
475 | ? (nextLanes = getHighestPriorityLanes(pendingLanes))
|
476 | : 0 !== root && (nextLanes = getHighestPriorityLanes(root)));
|
477 | return 0 === nextLanes
|
478 | ? 0
|
479 | : 0 !== wipLanes &&
|
480 | wipLanes !== nextLanes &&
|
481 | 0 === (wipLanes & suspendedLanes) &&
|
482 | ((suspendedLanes = nextLanes & -nextLanes),
|
483 | (root = wipLanes & -wipLanes),
|
484 | suspendedLanes >= root ||
|
485 | (32 === suspendedLanes && 0 !== (root & 4194176)))
|
486 | ? wipLanes
|
487 | : nextLanes;
|
488 | }
|
489 | function computeExpirationTime(lane, currentTime) {
|
490 | switch (lane) {
|
491 | case 1:
|
492 | case 2:
|
493 | case 4:
|
494 | case 8:
|
495 | return currentTime + 250;
|
496 | case 16:
|
497 | case 32:
|
498 | case 64:
|
499 | case 128:
|
500 | case 256:
|
501 | case 512:
|
502 | case 1024:
|
503 | case 2048:
|
504 | case 4096:
|
505 | case 8192:
|
506 | case 16384:
|
507 | case 32768:
|
508 | case 65536:
|
509 | case 131072:
|
510 | case 262144:
|
511 | case 524288:
|
512 | case 1048576:
|
513 | case 2097152:
|
514 | return currentTime + 5e3;
|
515 | case 4194304:
|
516 | case 8388608:
|
517 | case 16777216:
|
518 | case 33554432:
|
519 | return -1;
|
520 | case 67108864:
|
521 | case 134217728:
|
522 | case 268435456:
|
523 | case 536870912:
|
524 | case 1073741824:
|
525 | return -1;
|
526 | default:
|
527 | return -1;
|
528 | }
|
529 | }
|
530 | function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {
|
531 | if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0;
|
532 | root = root.pendingLanes & -536870913;
|
533 | return 0 !== root ? root : root & 536870912 ? 536870912 : 0;
|
534 | }
|
535 | function claimNextTransitionLane() {
|
536 | var lane = nextTransitionLane;
|
537 | nextTransitionLane <<= 1;
|
538 | 0 === (nextTransitionLane & 4194176) && (nextTransitionLane = 128);
|
539 | return lane;
|
540 | }
|
541 | function claimNextRetryLane() {
|
542 | var lane = nextRetryLane;
|
543 | nextRetryLane <<= 1;
|
544 | 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
|
545 | return lane;
|
546 | }
|
547 | function createLaneMap(initial) {
|
548 | for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
|
549 | return laneMap;
|
550 | }
|
551 | function markRootFinished(root, remainingLanes, spawnedLane) {
|
552 | var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
|
553 | root.pendingLanes = remainingLanes;
|
554 | root.suspendedLanes = 0;
|
555 | root.pingedLanes = 0;
|
556 | root.expiredLanes &= remainingLanes;
|
557 | root.entangledLanes &= remainingLanes;
|
558 | root.errorRecoveryDisabledLanes &= remainingLanes;
|
559 | root.shellSuspendCounter = 0;
|
560 | remainingLanes = root.entanglements;
|
561 | for (
|
562 | var expirationTimes = root.expirationTimes,
|
563 | hiddenUpdates = root.hiddenUpdates;
|
564 | 0 < noLongerPendingLanes;
|
565 |
|
566 | ) {
|
567 | var index$5 = 31 - clz32(noLongerPendingLanes),
|
568 | lane = 1 << index$5;
|
569 | remainingLanes[index$5] = 0;
|
570 | expirationTimes[index$5] = -1;
|
571 | var hiddenUpdatesForLane = hiddenUpdates[index$5];
|
572 | if (null !== hiddenUpdatesForLane)
|
573 | for (
|
574 | hiddenUpdates[index$5] = null, index$5 = 0;
|
575 | index$5 < hiddenUpdatesForLane.length;
|
576 | index$5++
|
577 | ) {
|
578 | var update = hiddenUpdatesForLane[index$5];
|
579 | null !== update && (update.lane &= -536870913);
|
580 | }
|
581 | noLongerPendingLanes &= ~lane;
|
582 | }
|
583 | 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
|
584 | }
|
585 | function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
586 | root.pendingLanes |= spawnedLane;
|
587 | root.suspendedLanes &= ~spawnedLane;
|
588 | var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
589 | root.entangledLanes |= spawnedLane;
|
590 | root.entanglements[spawnedLaneIndex] =
|
591 | root.entanglements[spawnedLaneIndex] |
|
592 | 1073741824 |
|
593 | (entangledLanes & 4194218);
|
594 | }
|
595 | function markRootEntangled(root, entangledLanes) {
|
596 | var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
597 | for (root = root.entanglements; rootEntangledLanes; ) {
|
598 | var index$6 = 31 - clz32(rootEntangledLanes),
|
599 | lane = 1 << index$6;
|
600 | (lane & entangledLanes) | (root[index$6] & entangledLanes) &&
|
601 | (root[index$6] |= entangledLanes);
|
602 | rootEntangledLanes &= ~lane;
|
603 | }
|
604 | }
|
605 | function addFiberToLanesMap(root, fiber, lanes) {
|
606 | if (isDevToolsPresent)
|
607 | for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
|
608 | var index$8 = 31 - clz32(lanes),
|
609 | lane = 1 << index$8;
|
610 | root[index$8].add(fiber);
|
611 | lanes &= ~lane;
|
612 | }
|
613 | }
|
614 | function movePendingFibersToMemoized(root, lanes) {
|
615 | if (isDevToolsPresent)
|
616 | for (
|
617 | var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
|
618 | memoizedUpdaters = root.memoizedUpdaters;
|
619 | 0 < lanes;
|
620 |
|
621 | ) {
|
622 | var index$9 = 31 - clz32(lanes);
|
623 | root = 1 << index$9;
|
624 | index$9 = pendingUpdatersLaneMap[index$9];
|
625 | 0 < index$9.size &&
|
626 | (index$9.forEach(function (fiber) {
|
627 | var alternate = fiber.alternate;
|
628 | (null !== alternate && memoizedUpdaters.has(alternate)) ||
|
629 | memoizedUpdaters.add(fiber);
|
630 | }),
|
631 | index$9.clear());
|
632 | lanes &= ~root;
|
633 | }
|
634 | }
|
635 | function lanesToEventPriority(lanes) {
|
636 | lanes &= -lanes;
|
637 | return 2 < lanes
|
638 | ? 8 < lanes
|
639 | ? 0 !== (lanes & 134217727)
|
640 | ? 32
|
641 | : 268435456
|
642 | : 8
|
643 | : 2;
|
644 | }
|
645 | function resolveUpdatePriority() {
|
646 | var updatePriority = ReactDOMSharedInternals.p;
|
647 | if (0 !== updatePriority) return updatePriority;
|
648 | updatePriority = window.event;
|
649 | return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);
|
650 | }
|
651 | function runWithPriority(priority, fn) {
|
652 | var previousPriority = ReactDOMSharedInternals.p;
|
653 | try {
|
654 | return (ReactDOMSharedInternals.p = priority), fn();
|
655 | } finally {
|
656 | ReactDOMSharedInternals.p = previousPriority;
|
657 | }
|
658 | }
|
659 | var randomKey = Math.random().toString(36).slice(2),
|
660 | internalInstanceKey = "__reactFiber$" + randomKey,
|
661 | internalPropsKey = "__reactProps$" + randomKey,
|
662 | internalContainerInstanceKey = "__reactContainer$" + randomKey,
|
663 | internalEventHandlersKey = "__reactEvents$" + randomKey,
|
664 | internalEventHandlerListenersKey = "__reactListeners$" + randomKey,
|
665 | internalEventHandlesSetKey = "__reactHandles$" + randomKey,
|
666 | internalRootNodeResourcesKey = "__reactResources$" + randomKey,
|
667 | internalHoistableMarker = "__reactMarker$" + randomKey;
|
668 | function detachDeletedInstance(node) {
|
669 | delete node[internalInstanceKey];
|
670 | delete node[internalPropsKey];
|
671 | delete node[internalEventHandlersKey];
|
672 | delete node[internalEventHandlerListenersKey];
|
673 | delete node[internalEventHandlesSetKey];
|
674 | }
|
675 | function getClosestInstanceFromNode(targetNode) {
|
676 | var targetInst = targetNode[internalInstanceKey];
|
677 | if (targetInst) return targetInst;
|
678 | for (var parentNode = targetNode.parentNode; parentNode; ) {
|
679 | if (
|
680 | (targetInst =
|
681 | parentNode[internalContainerInstanceKey] ||
|
682 | parentNode[internalInstanceKey])
|
683 | ) {
|
684 | parentNode = targetInst.alternate;
|
685 | if (
|
686 | null !== targetInst.child ||
|
687 | (null !== parentNode && null !== parentNode.child)
|
688 | )
|
689 | for (
|
690 | targetNode = getParentSuspenseInstance(targetNode);
|
691 | null !== targetNode;
|
692 |
|
693 | ) {
|
694 | if ((parentNode = targetNode[internalInstanceKey])) return parentNode;
|
695 | targetNode = getParentSuspenseInstance(targetNode);
|
696 | }
|
697 | return targetInst;
|
698 | }
|
699 | targetNode = parentNode;
|
700 | parentNode = targetNode.parentNode;
|
701 | }
|
702 | return null;
|
703 | }
|
704 | function getInstanceFromNode(node) {
|
705 | if (
|
706 | (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
|
707 | ) {
|
708 | var tag = node.tag;
|
709 | if (
|
710 | 5 === tag ||
|
711 | 6 === tag ||
|
712 | 13 === tag ||
|
713 | 26 === tag ||
|
714 | 27 === tag ||
|
715 | 3 === tag
|
716 | )
|
717 | return node;
|
718 | }
|
719 | return null;
|
720 | }
|
721 | function getNodeFromInstance(inst) {
|
722 | var tag = inst.tag;
|
723 | if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;
|
724 | throw Error(formatProdErrorMessage(33));
|
725 | }
|
726 | function getResourcesFromRoot(root) {
|
727 | var resources = root[internalRootNodeResourcesKey];
|
728 | resources ||
|
729 | (resources = root[internalRootNodeResourcesKey] =
|
730 | { hoistableStyles: new Map(), hoistableScripts: new Map() });
|
731 | return resources;
|
732 | }
|
733 | function markNodeAsHoistable(node) {
|
734 | node[internalHoistableMarker] = !0;
|
735 | }
|
736 | var allNativeEvents = new Set(),
|
737 | registrationNameDependencies = {};
|
738 | function registerTwoPhaseEvent(registrationName, dependencies) {
|
739 | registerDirectEvent(registrationName, dependencies);
|
740 | registerDirectEvent(registrationName + "Capture", dependencies);
|
741 | }
|
742 | function registerDirectEvent(registrationName, dependencies) {
|
743 | registrationNameDependencies[registrationName] = dependencies;
|
744 | for (
|
745 | registrationName = 0;
|
746 | registrationName < dependencies.length;
|
747 | registrationName++
|
748 | )
|
749 | allNativeEvents.add(dependencies[registrationName]);
|
750 | }
|
751 | var canUseDOM = !(
|
752 | "undefined" === typeof window ||
|
753 | "undefined" === typeof window.document ||
|
754 | "undefined" === typeof window.document.createElement
|
755 | ),
|
756 | VALID_ATTRIBUTE_NAME_REGEX = RegExp(
|
757 | "^[: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]*$"
|
758 | ),
|
759 | illegalAttributeNameCache = {},
|
760 | validatedAttributeNameCache = {};
|
761 | function isAttributeNameSafe(attributeName) {
|
762 | if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
|
763 | return !0;
|
764 | if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
|
765 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
|
766 | return (validatedAttributeNameCache[attributeName] = !0);
|
767 | illegalAttributeNameCache[attributeName] = !0;
|
768 | return !1;
|
769 | }
|
770 | function setValueForAttribute(node, name, value) {
|
771 | if (isAttributeNameSafe(name))
|
772 | if (null === value) node.removeAttribute(name);
|
773 | else {
|
774 | switch (typeof value) {
|
775 | case "undefined":
|
776 | case "function":
|
777 | case "symbol":
|
778 | node.removeAttribute(name);
|
779 | return;
|
780 | case "boolean":
|
781 | var prefix$10 = name.toLowerCase().slice(0, 5);
|
782 | if ("data-" !== prefix$10 && "aria-" !== prefix$10) {
|
783 | node.removeAttribute(name);
|
784 | return;
|
785 | }
|
786 | }
|
787 | node.setAttribute(name, "" + value);
|
788 | }
|
789 | }
|
790 | function setValueForKnownAttribute(node, name, value) {
|
791 | if (null === value) node.removeAttribute(name);
|
792 | else {
|
793 | switch (typeof value) {
|
794 | case "undefined":
|
795 | case "function":
|
796 | case "symbol":
|
797 | case "boolean":
|
798 | node.removeAttribute(name);
|
799 | return;
|
800 | }
|
801 | node.setAttribute(name, "" + value);
|
802 | }
|
803 | }
|
804 | function setValueForNamespacedAttribute(node, namespace, name, value) {
|
805 | if (null === value) node.removeAttribute(name);
|
806 | else {
|
807 | switch (typeof value) {
|
808 | case "undefined":
|
809 | case "function":
|
810 | case "symbol":
|
811 | case "boolean":
|
812 | node.removeAttribute(name);
|
813 | return;
|
814 | }
|
815 | node.setAttributeNS(namespace, name, "" + value);
|
816 | }
|
817 | }
|
818 | var prefix;
|
819 | function describeBuiltInComponentFrame(name) {
|
820 | if (void 0 === prefix)
|
821 | try {
|
822 | throw Error();
|
823 | } catch (x) {
|
824 | var match = x.stack.trim().match(/\n( *(at )?)/);
|
825 | prefix = (match && match[1]) || "";
|
826 | }
|
827 | return "\n" + prefix + name;
|
828 | }
|
829 | var reentry = !1;
|
830 | function describeNativeComponentFrame(fn, construct) {
|
831 | if (!fn || reentry) return "";
|
832 | reentry = !0;
|
833 | var previousPrepareStackTrace = Error.prepareStackTrace;
|
834 | Error.prepareStackTrace = void 0;
|
835 | var RunInRootFrame = {
|
836 | DetermineComponentFrameRoot: function () {
|
837 | try {
|
838 | if (construct) {
|
839 | var Fake = function () {
|
840 | throw Error();
|
841 | };
|
842 | Object.defineProperty(Fake.prototype, "props", {
|
843 | set: function () {
|
844 | throw Error();
|
845 | }
|
846 | });
|
847 | if ("object" === typeof Reflect && Reflect.construct) {
|
848 | try {
|
849 | Reflect.construct(Fake, []);
|
850 | } catch (x) {
|
851 | var control = x;
|
852 | }
|
853 | Reflect.construct(fn, [], Fake);
|
854 | } else {
|
855 | try {
|
856 | Fake.call();
|
857 | } catch (x$11) {
|
858 | control = x$11;
|
859 | }
|
860 | fn.call(Fake.prototype);
|
861 | }
|
862 | } else {
|
863 | try {
|
864 | throw Error();
|
865 | } catch (x$12) {
|
866 | control = x$12;
|
867 | }
|
868 | (Fake = fn()) &&
|
869 | "function" === typeof Fake.catch &&
|
870 | Fake.catch(function () {});
|
871 | }
|
872 | } catch (sample) {
|
873 | if (sample && control && "string" === typeof sample.stack)
|
874 | return [sample.stack, control.stack];
|
875 | }
|
876 | return [null, null];
|
877 | }
|
878 | };
|
879 | RunInRootFrame.DetermineComponentFrameRoot.displayName =
|
880 | "DetermineComponentFrameRoot";
|
881 | var namePropDescriptor = Object.getOwnPropertyDescriptor(
|
882 | RunInRootFrame.DetermineComponentFrameRoot,
|
883 | "name"
|
884 | );
|
885 | namePropDescriptor &&
|
886 | namePropDescriptor.configurable &&
|
887 | Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
|
888 | value: "DetermineComponentFrameRoot"
|
889 | });
|
890 | try {
|
891 | var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
|
892 | sampleStack = _RunInRootFrame$Deter[0],
|
893 | controlStack = _RunInRootFrame$Deter[1];
|
894 | if (sampleStack && controlStack) {
|
895 | var sampleLines = sampleStack.split("\n"),
|
896 | controlLines = controlStack.split("\n");
|
897 | for (
|
898 | namePropDescriptor = RunInRootFrame = 0;
|
899 | RunInRootFrame < sampleLines.length &&
|
900 | !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
|
901 |
|
902 | )
|
903 | RunInRootFrame++;
|
904 | for (
|
905 | ;
|
906 | namePropDescriptor < controlLines.length &&
|
907 | !controlLines[namePropDescriptor].includes(
|
908 | "DetermineComponentFrameRoot"
|
909 | );
|
910 |
|
911 | )
|
912 | namePropDescriptor++;
|
913 | if (
|
914 | RunInRootFrame === sampleLines.length ||
|
915 | namePropDescriptor === controlLines.length
|
916 | )
|
917 | for (
|
918 | RunInRootFrame = sampleLines.length - 1,
|
919 | namePropDescriptor = controlLines.length - 1;
|
920 | 1 <= RunInRootFrame &&
|
921 | 0 <= namePropDescriptor &&
|
922 | sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
|
923 |
|
924 | )
|
925 | namePropDescriptor--;
|
926 | for (
|
927 | ;
|
928 | 1 <= RunInRootFrame && 0 <= namePropDescriptor;
|
929 | RunInRootFrame--, namePropDescriptor--
|
930 | )
|
931 | if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
|
932 | if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
|
933 | do
|
934 | if (
|
935 | (RunInRootFrame--,
|
936 | namePropDescriptor--,
|
937 | 0 > namePropDescriptor ||
|
938 | sampleLines[RunInRootFrame] !==
|
939 | controlLines[namePropDescriptor])
|
940 | ) {
|
941 | var frame =
|
942 | "\n" +
|
943 | sampleLines[RunInRootFrame].replace(" at new ", " at ");
|
944 | fn.displayName &&
|
945 | frame.includes("<anonymous>") &&
|
946 | (frame = frame.replace("<anonymous>", fn.displayName));
|
947 | return frame;
|
948 | }
|
949 | while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
|
950 | }
|
951 | break;
|
952 | }
|
953 | }
|
954 | } finally {
|
955 | (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
|
956 | }
|
957 | return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
|
958 | ? describeBuiltInComponentFrame(previousPrepareStackTrace)
|
959 | : "";
|
960 | }
|
961 | function describeFiber(fiber) {
|
962 | switch (fiber.tag) {
|
963 | case 26:
|
964 | case 27:
|
965 | case 5:
|
966 | return describeBuiltInComponentFrame(fiber.type);
|
967 | case 16:
|
968 | return describeBuiltInComponentFrame("Lazy");
|
969 | case 13:
|
970 | return describeBuiltInComponentFrame("Suspense");
|
971 | case 19:
|
972 | return describeBuiltInComponentFrame("SuspenseList");
|
973 | case 0:
|
974 | case 15:
|
975 | return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber;
|
976 | case 11:
|
977 | return (
|
978 | (fiber = describeNativeComponentFrame(fiber.type.render, !1)), fiber
|
979 | );
|
980 | case 1:
|
981 | return (fiber = describeNativeComponentFrame(fiber.type, !0)), fiber;
|
982 | default:
|
983 | return "";
|
984 | }
|
985 | }
|
986 | function getStackByFiberInDevAndProd(workInProgress) {
|
987 | try {
|
988 | var info = "";
|
989 | do
|
990 | (info += describeFiber(workInProgress)),
|
991 | (workInProgress = workInProgress.return);
|
992 | while (workInProgress);
|
993 | return info;
|
994 | } catch (x) {
|
995 | return "\nError generating stack: " + x.message + "\n" + x.stack;
|
996 | }
|
997 | }
|
998 | function getToStringValue(value) {
|
999 | switch (typeof value) {
|
1000 | case "bigint":
|
1001 | case "boolean":
|
1002 | case "number":
|
1003 | case "string":
|
1004 | case "undefined":
|
1005 | return value;
|
1006 | case "object":
|
1007 | return value;
|
1008 | default:
|
1009 | return "";
|
1010 | }
|
1011 | }
|
1012 | function isCheckable(elem) {
|
1013 | var type = elem.type;
|
1014 | return (
|
1015 | (elem = elem.nodeName) &&
|
1016 | "input" === elem.toLowerCase() &&
|
1017 | ("checkbox" === type || "radio" === type)
|
1018 | );
|
1019 | }
|
1020 | function trackValueOnNode(node) {
|
1021 | var valueField = isCheckable(node) ? "checked" : "value",
|
1022 | descriptor = Object.getOwnPropertyDescriptor(
|
1023 | node.constructor.prototype,
|
1024 | valueField
|
1025 | ),
|
1026 | currentValue = "" + node[valueField];
|
1027 | if (
|
1028 | !node.hasOwnProperty(valueField) &&
|
1029 | "undefined" !== typeof descriptor &&
|
1030 | "function" === typeof descriptor.get &&
|
1031 | "function" === typeof descriptor.set
|
1032 | ) {
|
1033 | var get = descriptor.get,
|
1034 | set = descriptor.set;
|
1035 | Object.defineProperty(node, valueField, {
|
1036 | configurable: !0,
|
1037 | get: function () {
|
1038 | return get.call(this);
|
1039 | },
|
1040 | set: function (value) {
|
1041 | currentValue = "" + value;
|
1042 | set.call(this, value);
|
1043 | }
|
1044 | });
|
1045 | Object.defineProperty(node, valueField, {
|
1046 | enumerable: descriptor.enumerable
|
1047 | });
|
1048 | return {
|
1049 | getValue: function () {
|
1050 | return currentValue;
|
1051 | },
|
1052 | setValue: function (value) {
|
1053 | currentValue = "" + value;
|
1054 | },
|
1055 | stopTracking: function () {
|
1056 | node._valueTracker = null;
|
1057 | delete node[valueField];
|
1058 | }
|
1059 | };
|
1060 | }
|
1061 | }
|
1062 | function track(node) {
|
1063 | node._valueTracker || (node._valueTracker = trackValueOnNode(node));
|
1064 | }
|
1065 | function updateValueIfChanged(node) {
|
1066 | if (!node) return !1;
|
1067 | var tracker = node._valueTracker;
|
1068 | if (!tracker) return !0;
|
1069 | var lastValue = tracker.getValue();
|
1070 | var value = "";
|
1071 | node &&
|
1072 | (value = isCheckable(node)
|
1073 | ? node.checked
|
1074 | ? "true"
|
1075 | : "false"
|
1076 | : node.value);
|
1077 | node = value;
|
1078 | return node !== lastValue ? (tracker.setValue(node), !0) : !1;
|
1079 | }
|
1080 | function getActiveElement(doc) {
|
1081 | doc = doc || ("undefined" !== typeof document ? document : void 0);
|
1082 | if ("undefined" === typeof doc) return null;
|
1083 | try {
|
1084 | return doc.activeElement || doc.body;
|
1085 | } catch (e) {
|
1086 | return doc.body;
|
1087 | }
|
1088 | }
|
1089 | var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g;
|
1090 | function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
|
1091 | return value.replace(
|
1092 | escapeSelectorAttributeValueInsideDoubleQuotesRegex,
|
1093 | function (ch) {
|
1094 | return "\\" + ch.charCodeAt(0).toString(16) + " ";
|
1095 | }
|
1096 | );
|
1097 | }
|
1098 | function updateInput(
|
1099 | element,
|
1100 | value,
|
1101 | defaultValue,
|
1102 | lastDefaultValue,
|
1103 | checked,
|
1104 | defaultChecked,
|
1105 | type,
|
1106 | name
|
1107 | ) {
|
1108 | element.name = "";
|
1109 | null != type &&
|
1110 | "function" !== typeof type &&
|
1111 | "symbol" !== typeof type &&
|
1112 | "boolean" !== typeof type
|
1113 | ? (element.type = type)
|
1114 | : element.removeAttribute("type");
|
1115 | if (null != value)
|
1116 | if ("number" === type) {
|
1117 | if ((0 === value && "" === element.value) || element.value != value)
|
1118 | element.value = "" + getToStringValue(value);
|
1119 | } else
|
1120 | element.value !== "" + getToStringValue(value) &&
|
1121 | (element.value = "" + getToStringValue(value));
|
1122 | else
|
1123 | ("submit" !== type && "reset" !== type) || element.removeAttribute("value");
|
1124 | null != value
|
1125 | ? setDefaultValue(element, type, getToStringValue(value))
|
1126 | : null != defaultValue
|
1127 | ? setDefaultValue(element, type, getToStringValue(defaultValue))
|
1128 | : null != lastDefaultValue && element.removeAttribute("value");
|
1129 | null == checked &&
|
1130 | null != defaultChecked &&
|
1131 | (element.defaultChecked = !!defaultChecked);
|
1132 | null != checked &&
|
1133 | (element.checked =
|
1134 | checked && "function" !== typeof checked && "symbol" !== typeof checked);
|
1135 | null != name &&
|
1136 | "function" !== typeof name &&
|
1137 | "symbol" !== typeof name &&
|
1138 | "boolean" !== typeof name
|
1139 | ? (element.name = "" + getToStringValue(name))
|
1140 | : element.removeAttribute("name");
|
1141 | }
|
1142 | function initInput(
|
1143 | element,
|
1144 | value,
|
1145 | defaultValue,
|
1146 | checked,
|
1147 | defaultChecked,
|
1148 | type,
|
1149 | name,
|
1150 | isHydrating
|
1151 | ) {
|
1152 | null != type &&
|
1153 | "function" !== typeof type &&
|
1154 | "symbol" !== typeof type &&
|
1155 | "boolean" !== typeof type &&
|
1156 | (element.type = type);
|
1157 | if (null != value || null != defaultValue) {
|
1158 | if (
|
1159 | !(
|
1160 | ("submit" !== type && "reset" !== type) ||
|
1161 | (void 0 !== value && null !== value)
|
1162 | )
|
1163 | )
|
1164 | return;
|
1165 | defaultValue =
|
1166 | null != defaultValue ? "" + getToStringValue(defaultValue) : "";
|
1167 | value = null != value ? "" + getToStringValue(value) : defaultValue;
|
1168 | isHydrating || value === element.value || (element.value = value);
|
1169 | element.defaultValue = value;
|
1170 | }
|
1171 | checked = null != checked ? checked : defaultChecked;
|
1172 | checked =
|
1173 | "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
|
1174 | element.checked = isHydrating ? element.checked : !!checked;
|
1175 | element.defaultChecked = !!checked;
|
1176 | null != name &&
|
1177 | "function" !== typeof name &&
|
1178 | "symbol" !== typeof name &&
|
1179 | "boolean" !== typeof name &&
|
1180 | (element.name = name);
|
1181 | }
|
1182 | function setDefaultValue(node, type, value) {
|
1183 | ("number" === type && getActiveElement(node.ownerDocument) === node) ||
|
1184 | node.defaultValue === "" + value ||
|
1185 | (node.defaultValue = "" + value);
|
1186 | }
|
1187 | function updateOptions(node, multiple, propValue, setDefaultSelected) {
|
1188 | node = node.options;
|
1189 | if (multiple) {
|
1190 | multiple = {};
|
1191 | for (var i = 0; i < propValue.length; i++)
|
1192 | multiple["$" + propValue[i]] = !0;
|
1193 | for (propValue = 0; propValue < node.length; propValue++)
|
1194 | (i = multiple.hasOwnProperty("$" + node[propValue].value)),
|
1195 | node[propValue].selected !== i && (node[propValue].selected = i),
|
1196 | i && setDefaultSelected && (node[propValue].defaultSelected = !0);
|
1197 | } else {
|
1198 | propValue = "" + getToStringValue(propValue);
|
1199 | multiple = null;
|
1200 | for (i = 0; i < node.length; i++) {
|
1201 | if (node[i].value === propValue) {
|
1202 | node[i].selected = !0;
|
1203 | setDefaultSelected && (node[i].defaultSelected = !0);
|
1204 | return;
|
1205 | }
|
1206 | null !== multiple || node[i].disabled || (multiple = node[i]);
|
1207 | }
|
1208 | null !== multiple && (multiple.selected = !0);
|
1209 | }
|
1210 | }
|
1211 | function updateTextarea(element, value, defaultValue) {
|
1212 | if (
|
1213 | null != value &&
|
1214 | ((value = "" + getToStringValue(value)),
|
1215 | value !== element.value && (element.value = value),
|
1216 | null == defaultValue)
|
1217 | ) {
|
1218 | element.defaultValue !== value && (element.defaultValue = value);
|
1219 | return;
|
1220 | }
|
1221 | element.defaultValue =
|
1222 | null != defaultValue ? "" + getToStringValue(defaultValue) : "";
|
1223 | }
|
1224 | function initTextarea(element, value, defaultValue, children) {
|
1225 | if (null == value) {
|
1226 | if (null != children) {
|
1227 | if (null != defaultValue) throw Error(formatProdErrorMessage(92));
|
1228 | if (isArrayImpl(children)) {
|
1229 | if (1 < children.length) throw Error(formatProdErrorMessage(93));
|
1230 | children = children[0];
|
1231 | }
|
1232 | defaultValue = children;
|
1233 | }
|
1234 | null == defaultValue && (defaultValue = "");
|
1235 | value = defaultValue;
|
1236 | }
|
1237 | defaultValue = getToStringValue(value);
|
1238 | element.defaultValue = defaultValue;
|
1239 | children = element.textContent;
|
1240 | children === defaultValue &&
|
1241 | "" !== children &&
|
1242 | null !== children &&
|
1243 | (element.value = children);
|
1244 | }
|
1245 | function setTextContent(node, text) {
|
1246 | if (text) {
|
1247 | var firstChild = node.firstChild;
|
1248 | if (
|
1249 | firstChild &&
|
1250 | firstChild === node.lastChild &&
|
1251 | 3 === firstChild.nodeType
|
1252 | ) {
|
1253 | firstChild.nodeValue = text;
|
1254 | return;
|
1255 | }
|
1256 | }
|
1257 | node.textContent = text;
|
1258 | }
|
1259 | var unitlessNumbers = new Set(
|
1260 | "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(
|
1261 | " "
|
1262 | )
|
1263 | );
|
1264 | function setValueForStyle(style, styleName, value) {
|
1265 | var isCustomProperty = 0 === styleName.indexOf("--");
|
1266 | null == value || "boolean" === typeof value || "" === value
|
1267 | ? isCustomProperty
|
1268 | ? style.setProperty(styleName, "")
|
1269 | : "float" === styleName
|
1270 | ? (style.cssFloat = "")
|
1271 | : (style[styleName] = "")
|
1272 | : isCustomProperty
|
1273 | ? style.setProperty(styleName, value)
|
1274 | : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName)
|
1275 | ? "float" === styleName
|
1276 | ? (style.cssFloat = value)
|
1277 | : (style[styleName] = ("" + value).trim())
|
1278 | : (style[styleName] = value + "px");
|
1279 | }
|
1280 | function setValueForStyles(node, styles, prevStyles) {
|
1281 | if (null != styles && "object" !== typeof styles)
|
1282 | throw Error(formatProdErrorMessage(62));
|
1283 | node = node.style;
|
1284 | if (null != prevStyles) {
|
1285 | for (var styleName in prevStyles)
|
1286 | !prevStyles.hasOwnProperty(styleName) ||
|
1287 | (null != styles && styles.hasOwnProperty(styleName)) ||
|
1288 | (0 === styleName.indexOf("--")
|
1289 | ? node.setProperty(styleName, "")
|
1290 | : "float" === styleName
|
1291 | ? (node.cssFloat = "")
|
1292 | : (node[styleName] = ""));
|
1293 | for (var styleName$18 in styles)
|
1294 | (styleName = styles[styleName$18]),
|
1295 | styles.hasOwnProperty(styleName$18) &&
|
1296 | prevStyles[styleName$18] !== styleName &&
|
1297 | setValueForStyle(node, styleName$18, styleName);
|
1298 | } else
|
1299 | for (var styleName$19 in styles)
|
1300 | styles.hasOwnProperty(styleName$19) &&
|
1301 | setValueForStyle(node, styleName$19, styles[styleName$19]);
|
1302 | }
|
1303 | function isCustomElement(tagName) {
|
1304 | if (-1 === tagName.indexOf("-")) return !1;
|
1305 | switch (tagName) {
|
1306 | case "annotation-xml":
|
1307 | case "color-profile":
|
1308 | case "font-face":
|
1309 | case "font-face-src":
|
1310 | case "font-face-uri":
|
1311 | case "font-face-format":
|
1312 | case "font-face-name":
|
1313 | case "missing-glyph":
|
1314 | return !1;
|
1315 | default:
|
1316 | return !0;
|
1317 | }
|
1318 | }
|
1319 | var aliases = new Map([
|
1320 | ["acceptCharset", "accept-charset"],
|
1321 | ["htmlFor", "for"],
|
1322 | ["httpEquiv", "http-equiv"],
|
1323 | ["crossOrigin", "crossorigin"],
|
1324 | ["accentHeight", "accent-height"],
|
1325 | ["alignmentBaseline", "alignment-baseline"],
|
1326 | ["arabicForm", "arabic-form"],
|
1327 | ["baselineShift", "baseline-shift"],
|
1328 | ["capHeight", "cap-height"],
|
1329 | ["clipPath", "clip-path"],
|
1330 | ["clipRule", "clip-rule"],
|
1331 | ["colorInterpolation", "color-interpolation"],
|
1332 | ["colorInterpolationFilters", "color-interpolation-filters"],
|
1333 | ["colorProfile", "color-profile"],
|
1334 | ["colorRendering", "color-rendering"],
|
1335 | ["dominantBaseline", "dominant-baseline"],
|
1336 | ["enableBackground", "enable-background"],
|
1337 | ["fillOpacity", "fill-opacity"],
|
1338 | ["fillRule", "fill-rule"],
|
1339 | ["floodColor", "flood-color"],
|
1340 | ["floodOpacity", "flood-opacity"],
|
1341 | ["fontFamily", "font-family"],
|
1342 | ["fontSize", "font-size"],
|
1343 | ["fontSizeAdjust", "font-size-adjust"],
|
1344 | ["fontStretch", "font-stretch"],
|
1345 | ["fontStyle", "font-style"],
|
1346 | ["fontVariant", "font-variant"],
|
1347 | ["fontWeight", "font-weight"],
|
1348 | ["glyphName", "glyph-name"],
|
1349 | ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
|
1350 | ["glyphOrientationVertical", "glyph-orientation-vertical"],
|
1351 | ["horizAdvX", "horiz-adv-x"],
|
1352 | ["horizOriginX", "horiz-origin-x"],
|
1353 | ["imageRendering", "image-rendering"],
|
1354 | ["letterSpacing", "letter-spacing"],
|
1355 | ["lightingColor", "lighting-color"],
|
1356 | ["markerEnd", "marker-end"],
|
1357 | ["markerMid", "marker-mid"],
|
1358 | ["markerStart", "marker-start"],
|
1359 | ["overlinePosition", "overline-position"],
|
1360 | ["overlineThickness", "overline-thickness"],
|
1361 | ["paintOrder", "paint-order"],
|
1362 | ["panose-1", "panose-1"],
|
1363 | ["pointerEvents", "pointer-events"],
|
1364 | ["renderingIntent", "rendering-intent"],
|
1365 | ["shapeRendering", "shape-rendering"],
|
1366 | ["stopColor", "stop-color"],
|
1367 | ["stopOpacity", "stop-opacity"],
|
1368 | ["strikethroughPosition", "strikethrough-position"],
|
1369 | ["strikethroughThickness", "strikethrough-thickness"],
|
1370 | ["strokeDasharray", "stroke-dasharray"],
|
1371 | ["strokeDashoffset", "stroke-dashoffset"],
|
1372 | ["strokeLinecap", "stroke-linecap"],
|
1373 | ["strokeLinejoin", "stroke-linejoin"],
|
1374 | ["strokeMiterlimit", "stroke-miterlimit"],
|
1375 | ["strokeOpacity", "stroke-opacity"],
|
1376 | ["strokeWidth", "stroke-width"],
|
1377 | ["textAnchor", "text-anchor"],
|
1378 | ["textDecoration", "text-decoration"],
|
1379 | ["textRendering", "text-rendering"],
|
1380 | ["transformOrigin", "transform-origin"],
|
1381 | ["underlinePosition", "underline-position"],
|
1382 | ["underlineThickness", "underline-thickness"],
|
1383 | ["unicodeBidi", "unicode-bidi"],
|
1384 | ["unicodeRange", "unicode-range"],
|
1385 | ["unitsPerEm", "units-per-em"],
|
1386 | ["vAlphabetic", "v-alphabetic"],
|
1387 | ["vHanging", "v-hanging"],
|
1388 | ["vIdeographic", "v-ideographic"],
|
1389 | ["vMathematical", "v-mathematical"],
|
1390 | ["vectorEffect", "vector-effect"],
|
1391 | ["vertAdvY", "vert-adv-y"],
|
1392 | ["vertOriginX", "vert-origin-x"],
|
1393 | ["vertOriginY", "vert-origin-y"],
|
1394 | ["wordSpacing", "word-spacing"],
|
1395 | ["writingMode", "writing-mode"],
|
1396 | ["xmlnsXlink", "xmlns:xlink"],
|
1397 | ["xHeight", "x-height"]
|
1398 | ]),
|
1399 | isJavaScriptProtocol =
|
1400 | /^[\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;
|
1401 | function sanitizeURL(url) {
|
1402 | return isJavaScriptProtocol.test("" + url)
|
1403 | ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
|
1404 | : url;
|
1405 | }
|
1406 | var currentReplayingEvent = null;
|
1407 | function getEventTarget(nativeEvent) {
|
1408 | nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
|
1409 | nativeEvent.correspondingUseElement &&
|
1410 | (nativeEvent = nativeEvent.correspondingUseElement);
|
1411 | return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
|
1412 | }
|
1413 | var restoreTarget = null,
|
1414 | restoreQueue = null;
|
1415 | function restoreStateOfTarget(target) {
|
1416 | var internalInstance = getInstanceFromNode(target);
|
1417 | if (internalInstance && (target = internalInstance.stateNode)) {
|
1418 | var props = target[internalPropsKey] || null;
|
1419 | a: switch (((target = internalInstance.stateNode), internalInstance.type)) {
|
1420 | case "input":
|
1421 | updateInput(
|
1422 | target,
|
1423 | props.value,
|
1424 | props.defaultValue,
|
1425 | props.defaultValue,
|
1426 | props.checked,
|
1427 | props.defaultChecked,
|
1428 | props.type,
|
1429 | props.name
|
1430 | );
|
1431 | internalInstance = props.name;
|
1432 | if ("radio" === props.type && null != internalInstance) {
|
1433 | for (props = target; props.parentNode; ) props = props.parentNode;
|
1434 | props = props.querySelectorAll(
|
1435 | 'input[name="' +
|
1436 | escapeSelectorAttributeValueInsideDoubleQuotes(
|
1437 | "" + internalInstance
|
1438 | ) +
|
1439 | '"][type="radio"]'
|
1440 | );
|
1441 | for (
|
1442 | internalInstance = 0;
|
1443 | internalInstance < props.length;
|
1444 | internalInstance++
|
1445 | ) {
|
1446 | var otherNode = props[internalInstance];
|
1447 | if (otherNode !== target && otherNode.form === target.form) {
|
1448 | var otherProps = otherNode[internalPropsKey] || null;
|
1449 | if (!otherProps) throw Error(formatProdErrorMessage(90));
|
1450 | updateInput(
|
1451 | otherNode,
|
1452 | otherProps.value,
|
1453 | otherProps.defaultValue,
|
1454 | otherProps.defaultValue,
|
1455 | otherProps.checked,
|
1456 | otherProps.defaultChecked,
|
1457 | otherProps.type,
|
1458 | otherProps.name
|
1459 | );
|
1460 | }
|
1461 | }
|
1462 | for (
|
1463 | internalInstance = 0;
|
1464 | internalInstance < props.length;
|
1465 | internalInstance++
|
1466 | )
|
1467 | (otherNode = props[internalInstance]),
|
1468 | otherNode.form === target.form && updateValueIfChanged(otherNode);
|
1469 | }
|
1470 | break a;
|
1471 | case "textarea":
|
1472 | updateTextarea(target, props.value, props.defaultValue);
|
1473 | break a;
|
1474 | case "select":
|
1475 | (internalInstance = props.value),
|
1476 | null != internalInstance &&
|
1477 | updateOptions(target, !!props.multiple, internalInstance, !1);
|
1478 | }
|
1479 | }
|
1480 | }
|
1481 | var isInsideEventHandler = !1;
|
1482 | function batchedUpdates$2(fn, a, b) {
|
1483 | if (isInsideEventHandler) return fn(a, b);
|
1484 | isInsideEventHandler = !0;
|
1485 | try {
|
1486 | var JSCompiler_inline_result = fn(a);
|
1487 | return JSCompiler_inline_result;
|
1488 | } finally {
|
1489 | if (
|
1490 | ((isInsideEventHandler = !1),
|
1491 | null !== restoreTarget || null !== restoreQueue)
|
1492 | )
|
1493 | if (
|
1494 | (flushSyncWork$1(),
|
1495 | restoreTarget &&
|
1496 | ((a = restoreTarget),
|
1497 | (fn = restoreQueue),
|
1498 | (restoreQueue = restoreTarget = null),
|
1499 | restoreStateOfTarget(a),
|
1500 | fn))
|
1501 | )
|
1502 | for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
|
1503 | }
|
1504 | }
|
1505 | function getListener(inst, registrationName) {
|
1506 | var stateNode = inst.stateNode;
|
1507 | if (null === stateNode) return null;
|
1508 | var props = stateNode[internalPropsKey] || null;
|
1509 | if (null === props) return null;
|
1510 | stateNode = props[registrationName];
|
1511 | a: switch (registrationName) {
|
1512 | case "onClick":
|
1513 | case "onClickCapture":
|
1514 | case "onDoubleClick":
|
1515 | case "onDoubleClickCapture":
|
1516 | case "onMouseDown":
|
1517 | case "onMouseDownCapture":
|
1518 | case "onMouseMove":
|
1519 | case "onMouseMoveCapture":
|
1520 | case "onMouseUp":
|
1521 | case "onMouseUpCapture":
|
1522 | case "onMouseEnter":
|
1523 | (props = !props.disabled) ||
|
1524 | ((inst = inst.type),
|
1525 | (props = !(
|
1526 | "button" === inst ||
|
1527 | "input" === inst ||
|
1528 | "select" === inst ||
|
1529 | "textarea" === inst
|
1530 | )));
|
1531 | inst = !props;
|
1532 | break a;
|
1533 | default:
|
1534 | inst = !1;
|
1535 | }
|
1536 | if (inst) return null;
|
1537 | if (stateNode && "function" !== typeof stateNode)
|
1538 | throw Error(
|
1539 | formatProdErrorMessage(231, registrationName, typeof stateNode)
|
1540 | );
|
1541 | return stateNode;
|
1542 | }
|
1543 | var passiveBrowserEventsSupported = !1;
|
1544 | if (canUseDOM)
|
1545 | try {
|
1546 | var options = {};
|
1547 | Object.defineProperty(options, "passive", {
|
1548 | get: function () {
|
1549 | passiveBrowserEventsSupported = !0;
|
1550 | }
|
1551 | });
|
1552 | window.addEventListener("test", options, options);
|
1553 | window.removeEventListener("test", options, options);
|
1554 | } catch (e) {
|
1555 | passiveBrowserEventsSupported = !1;
|
1556 | }
|
1557 | var root = null,
|
1558 | startText = null,
|
1559 | fallbackText = null;
|
1560 | function getData() {
|
1561 | if (fallbackText) return fallbackText;
|
1562 | var start,
|
1563 | startValue = startText,
|
1564 | startLength = startValue.length,
|
1565 | end,
|
1566 | endValue = "value" in root ? root.value : root.textContent,
|
1567 | endLength = endValue.length;
|
1568 | for (
|
1569 | start = 0;
|
1570 | start < startLength && startValue[start] === endValue[start];
|
1571 | start++
|
1572 | );
|
1573 | var minEnd = startLength - start;
|
1574 | for (
|
1575 | end = 1;
|
1576 | end <= minEnd &&
|
1577 | startValue[startLength - end] === endValue[endLength - end];
|
1578 | end++
|
1579 | );
|
1580 | return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));
|
1581 | }
|
1582 | function getEventCharCode(nativeEvent) {
|
1583 | var keyCode = nativeEvent.keyCode;
|
1584 | "charCode" in nativeEvent
|
1585 | ? ((nativeEvent = nativeEvent.charCode),
|
1586 | 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))
|
1587 | : (nativeEvent = keyCode);
|
1588 | 10 === nativeEvent && (nativeEvent = 13);
|
1589 | return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
|
1590 | }
|
1591 | function functionThatReturnsTrue() {
|
1592 | return !0;
|
1593 | }
|
1594 | function functionThatReturnsFalse() {
|
1595 | return !1;
|
1596 | }
|
1597 | function createSyntheticEvent(Interface) {
|
1598 | function SyntheticBaseEvent(
|
1599 | reactName,
|
1600 | reactEventType,
|
1601 | targetInst,
|
1602 | nativeEvent,
|
1603 | nativeEventTarget
|
1604 | ) {
|
1605 | this._reactName = reactName;
|
1606 | this._targetInst = targetInst;
|
1607 | this.type = reactEventType;
|
1608 | this.nativeEvent = nativeEvent;
|
1609 | this.target = nativeEventTarget;
|
1610 | this.currentTarget = null;
|
1611 | for (var propName in Interface)
|
1612 | Interface.hasOwnProperty(propName) &&
|
1613 | ((reactName = Interface[propName]),
|
1614 | (this[propName] = reactName
|
1615 | ? reactName(nativeEvent)
|
1616 | : nativeEvent[propName]));
|
1617 | this.isDefaultPrevented = (
|
1618 | null != nativeEvent.defaultPrevented
|
1619 | ? nativeEvent.defaultPrevented
|
1620 | : !1 === nativeEvent.returnValue
|
1621 | )
|
1622 | ? functionThatReturnsTrue
|
1623 | : functionThatReturnsFalse;
|
1624 | this.isPropagationStopped = functionThatReturnsFalse;
|
1625 | return this;
|
1626 | }
|
1627 | assign(SyntheticBaseEvent.prototype, {
|
1628 | preventDefault: function () {
|
1629 | this.defaultPrevented = !0;
|
1630 | var event = this.nativeEvent;
|
1631 | event &&
|
1632 | (event.preventDefault
|
1633 | ? event.preventDefault()
|
1634 | : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
|
1635 | (this.isDefaultPrevented = functionThatReturnsTrue));
|
1636 | },
|
1637 | stopPropagation: function () {
|
1638 | var event = this.nativeEvent;
|
1639 | event &&
|
1640 | (event.stopPropagation
|
1641 | ? event.stopPropagation()
|
1642 | : "unknown" !== typeof event.cancelBubble &&
|
1643 | (event.cancelBubble = !0),
|
1644 | (this.isPropagationStopped = functionThatReturnsTrue));
|
1645 | },
|
1646 | persist: function () {},
|
1647 | isPersistent: functionThatReturnsTrue
|
1648 | });
|
1649 | return SyntheticBaseEvent;
|
1650 | }
|
1651 | var EventInterface = {
|
1652 | eventPhase: 0,
|
1653 | bubbles: 0,
|
1654 | cancelable: 0,
|
1655 | timeStamp: function (event) {
|
1656 | return event.timeStamp || Date.now();
|
1657 | },
|
1658 | defaultPrevented: 0,
|
1659 | isTrusted: 0
|
1660 | },
|
1661 | SyntheticEvent = createSyntheticEvent(EventInterface),
|
1662 | UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),
|
1663 | SyntheticUIEvent = createSyntheticEvent(UIEventInterface),
|
1664 | lastMovementX,
|
1665 | lastMovementY,
|
1666 | lastMouseEvent,
|
1667 | MouseEventInterface = assign({}, UIEventInterface, {
|
1668 | screenX: 0,
|
1669 | screenY: 0,
|
1670 | clientX: 0,
|
1671 | clientY: 0,
|
1672 | pageX: 0,
|
1673 | pageY: 0,
|
1674 | ctrlKey: 0,
|
1675 | shiftKey: 0,
|
1676 | altKey: 0,
|
1677 | metaKey: 0,
|
1678 | getModifierState: getEventModifierState,
|
1679 | button: 0,
|
1680 | buttons: 0,
|
1681 | relatedTarget: function (event) {
|
1682 | return void 0 === event.relatedTarget
|
1683 | ? event.fromElement === event.srcElement
|
1684 | ? event.toElement
|
1685 | : event.fromElement
|
1686 | : event.relatedTarget;
|
1687 | },
|
1688 | movementX: function (event) {
|
1689 | if ("movementX" in event) return event.movementX;
|
1690 | event !== lastMouseEvent &&
|
1691 | (lastMouseEvent && "mousemove" === event.type
|
1692 | ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),
|
1693 | (lastMovementY = event.screenY - lastMouseEvent.screenY))
|
1694 | : (lastMovementY = lastMovementX = 0),
|
1695 | (lastMouseEvent = event));
|
1696 | return lastMovementX;
|
1697 | },
|
1698 | movementY: function (event) {
|
1699 | return "movementY" in event ? event.movementY : lastMovementY;
|
1700 | }
|
1701 | }),
|
1702 | SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),
|
1703 | DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),
|
1704 | SyntheticDragEvent = createSyntheticEvent(DragEventInterface),
|
1705 | FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),
|
1706 | SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),
|
1707 | AnimationEventInterface = assign({}, EventInterface, {
|
1708 | animationName: 0,
|
1709 | elapsedTime: 0,
|
1710 | pseudoElement: 0
|
1711 | }),
|
1712 | SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),
|
1713 | ClipboardEventInterface = assign({}, EventInterface, {
|
1714 | clipboardData: function (event) {
|
1715 | return "clipboardData" in event
|
1716 | ? event.clipboardData
|
1717 | : window.clipboardData;
|
1718 | }
|
1719 | }),
|
1720 | SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),
|
1721 | CompositionEventInterface = assign({}, EventInterface, { data: 0 }),
|
1722 | SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),
|
1723 | normalizeKey = {
|
1724 | Esc: "Escape",
|
1725 | Spacebar: " ",
|
1726 | Left: "ArrowLeft",
|
1727 | Up: "ArrowUp",
|
1728 | Right: "ArrowRight",
|
1729 | Down: "ArrowDown",
|
1730 | Del: "Delete",
|
1731 | Win: "OS",
|
1732 | Menu: "ContextMenu",
|
1733 | Apps: "ContextMenu",
|
1734 | Scroll: "ScrollLock",
|
1735 | MozPrintableKey: "Unidentified"
|
1736 | },
|
1737 | translateToKey = {
|
1738 | 8: "Backspace",
|
1739 | 9: "Tab",
|
1740 | 12: "Clear",
|
1741 | 13: "Enter",
|
1742 | 16: "Shift",
|
1743 | 17: "Control",
|
1744 | 18: "Alt",
|
1745 | 19: "Pause",
|
1746 | 20: "CapsLock",
|
1747 | 27: "Escape",
|
1748 | 32: " ",
|
1749 | 33: "PageUp",
|
1750 | 34: "PageDown",
|
1751 | 35: "End",
|
1752 | 36: "Home",
|
1753 | 37: "ArrowLeft",
|
1754 | 38: "ArrowUp",
|
1755 | 39: "ArrowRight",
|
1756 | 40: "ArrowDown",
|
1757 | 45: "Insert",
|
1758 | 46: "Delete",
|
1759 | 112: "F1",
|
1760 | 113: "F2",
|
1761 | 114: "F3",
|
1762 | 115: "F4",
|
1763 | 116: "F5",
|
1764 | 117: "F6",
|
1765 | 118: "F7",
|
1766 | 119: "F8",
|
1767 | 120: "F9",
|
1768 | 121: "F10",
|
1769 | 122: "F11",
|
1770 | 123: "F12",
|
1771 | 144: "NumLock",
|
1772 | 145: "ScrollLock",
|
1773 | 224: "Meta"
|
1774 | },
|
1775 | modifierKeyToProp = {
|
1776 | Alt: "altKey",
|
1777 | Control: "ctrlKey",
|
1778 | Meta: "metaKey",
|
1779 | Shift: "shiftKey"
|
1780 | };
|
1781 | function modifierStateGetter(keyArg) {
|
1782 | var nativeEvent = this.nativeEvent;
|
1783 | return nativeEvent.getModifierState
|
1784 | ? nativeEvent.getModifierState(keyArg)
|
1785 | : (keyArg = modifierKeyToProp[keyArg])
|
1786 | ? !!nativeEvent[keyArg]
|
1787 | : !1;
|
1788 | }
|
1789 | function getEventModifierState() {
|
1790 | return modifierStateGetter;
|
1791 | }
|
1792 | var KeyboardEventInterface = assign({}, UIEventInterface, {
|
1793 | key: function (nativeEvent) {
|
1794 | if (nativeEvent.key) {
|
1795 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
1796 | if ("Unidentified" !== key) return key;
|
1797 | }
|
1798 | return "keypress" === nativeEvent.type
|
1799 | ? ((nativeEvent = getEventCharCode(nativeEvent)),
|
1800 | 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent))
|
1801 | : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type
|
1802 | ? translateToKey[nativeEvent.keyCode] || "Unidentified"
|
1803 | : "";
|
1804 | },
|
1805 | code: 0,
|
1806 | location: 0,
|
1807 | ctrlKey: 0,
|
1808 | shiftKey: 0,
|
1809 | altKey: 0,
|
1810 | metaKey: 0,
|
1811 | repeat: 0,
|
1812 | locale: 0,
|
1813 | getModifierState: getEventModifierState,
|
1814 | charCode: function (event) {
|
1815 | return "keypress" === event.type ? getEventCharCode(event) : 0;
|
1816 | },
|
1817 | keyCode: function (event) {
|
1818 | return "keydown" === event.type || "keyup" === event.type
|
1819 | ? event.keyCode
|
1820 | : 0;
|
1821 | },
|
1822 | which: function (event) {
|
1823 | return "keypress" === event.type
|
1824 | ? getEventCharCode(event)
|
1825 | : "keydown" === event.type || "keyup" === event.type
|
1826 | ? event.keyCode
|
1827 | : 0;
|
1828 | }
|
1829 | }),
|
1830 | SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),
|
1831 | PointerEventInterface = assign({}, MouseEventInterface, {
|
1832 | pointerId: 0,
|
1833 | width: 0,
|
1834 | height: 0,
|
1835 | pressure: 0,
|
1836 | tangentialPressure: 0,
|
1837 | tiltX: 0,
|
1838 | tiltY: 0,
|
1839 | twist: 0,
|
1840 | pointerType: 0,
|
1841 | isPrimary: 0
|
1842 | }),
|
1843 | SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),
|
1844 | TouchEventInterface = assign({}, UIEventInterface, {
|
1845 | touches: 0,
|
1846 | targetTouches: 0,
|
1847 | changedTouches: 0,
|
1848 | altKey: 0,
|
1849 | metaKey: 0,
|
1850 | ctrlKey: 0,
|
1851 | shiftKey: 0,
|
1852 | getModifierState: getEventModifierState
|
1853 | }),
|
1854 | SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),
|
1855 | TransitionEventInterface = assign({}, EventInterface, {
|
1856 | propertyName: 0,
|
1857 | elapsedTime: 0,
|
1858 | pseudoElement: 0
|
1859 | }),
|
1860 | SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),
|
1861 | WheelEventInterface = assign({}, MouseEventInterface, {
|
1862 | deltaX: function (event) {
|
1863 | return "deltaX" in event
|
1864 | ? event.deltaX
|
1865 | : "wheelDeltaX" in event
|
1866 | ? -event.wheelDeltaX
|
1867 | : 0;
|
1868 | },
|
1869 | deltaY: function (event) {
|
1870 | return "deltaY" in event
|
1871 | ? event.deltaY
|
1872 | : "wheelDeltaY" in event
|
1873 | ? -event.wheelDeltaY
|
1874 | : "wheelDelta" in event
|
1875 | ? -event.wheelDelta
|
1876 | : 0;
|
1877 | },
|
1878 | deltaZ: 0,
|
1879 | deltaMode: 0
|
1880 | }),
|
1881 | SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),
|
1882 | END_KEYCODES = [9, 13, 27, 32],
|
1883 | canUseCompositionEvent = canUseDOM && "CompositionEvent" in window,
|
1884 | documentMode = null;
|
1885 | canUseDOM &&
|
1886 | "documentMode" in document &&
|
1887 | (documentMode = document.documentMode);
|
1888 | var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode,
|
1889 | useFallbackCompositionData =
|
1890 | canUseDOM &&
|
1891 | (!canUseCompositionEvent ||
|
1892 | (documentMode && 8 < documentMode && 11 >= documentMode)),
|
1893 | SPACEBAR_CHAR = String.fromCharCode(32),
|
1894 | hasSpaceKeypress = !1;
|
1895 | function isFallbackCompositionEnd(domEventName, nativeEvent) {
|
1896 | switch (domEventName) {
|
1897 | case "keyup":
|
1898 | return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
|
1899 | case "keydown":
|
1900 | return 229 !== nativeEvent.keyCode;
|
1901 | case "keypress":
|
1902 | case "mousedown":
|
1903 | case "focusout":
|
1904 | return !0;
|
1905 | default:
|
1906 | return !1;
|
1907 | }
|
1908 | }
|
1909 | function getDataFromCustomEvent(nativeEvent) {
|
1910 | nativeEvent = nativeEvent.detail;
|
1911 | return "object" === typeof nativeEvent && "data" in nativeEvent
|
1912 | ? nativeEvent.data
|
1913 | : null;
|
1914 | }
|
1915 | var isComposing = !1;
|
1916 | function getNativeBeforeInputChars(domEventName, nativeEvent) {
|
1917 | switch (domEventName) {
|
1918 | case "compositionend":
|
1919 | return getDataFromCustomEvent(nativeEvent);
|
1920 | case "keypress":
|
1921 | if (32 !== nativeEvent.which) return null;
|
1922 | hasSpaceKeypress = !0;
|
1923 | return SPACEBAR_CHAR;
|
1924 | case "textInput":
|
1925 | return (
|
1926 | (domEventName = nativeEvent.data),
|
1927 | domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName
|
1928 | );
|
1929 | default:
|
1930 | return null;
|
1931 | }
|
1932 | }
|
1933 | function getFallbackBeforeInputChars(domEventName, nativeEvent) {
|
1934 | if (isComposing)
|
1935 | return "compositionend" === domEventName ||
|
1936 | (!canUseCompositionEvent &&
|
1937 | isFallbackCompositionEnd(domEventName, nativeEvent))
|
1938 | ? ((domEventName = getData()),
|
1939 | (fallbackText = startText = root = null),
|
1940 | (isComposing = !1),
|
1941 | domEventName)
|
1942 | : null;
|
1943 | switch (domEventName) {
|
1944 | case "paste":
|
1945 | return null;
|
1946 | case "keypress":
|
1947 | if (
|
1948 | !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||
|
1949 | (nativeEvent.ctrlKey && nativeEvent.altKey)
|
1950 | ) {
|
1951 | if (nativeEvent.char && 1 < nativeEvent.char.length)
|
1952 | return nativeEvent.char;
|
1953 | if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);
|
1954 | }
|
1955 | return null;
|
1956 | case "compositionend":
|
1957 | return useFallbackCompositionData && "ko" !== nativeEvent.locale
|
1958 | ? null
|
1959 | : nativeEvent.data;
|
1960 | default:
|
1961 | return null;
|
1962 | }
|
1963 | }
|
1964 | var supportedInputTypes = {
|
1965 | color: !0,
|
1966 | date: !0,
|
1967 | datetime: !0,
|
1968 | "datetime-local": !0,
|
1969 | email: !0,
|
1970 | month: !0,
|
1971 | number: !0,
|
1972 | password: !0,
|
1973 | range: !0,
|
1974 | search: !0,
|
1975 | tel: !0,
|
1976 | text: !0,
|
1977 | time: !0,
|
1978 | url: !0,
|
1979 | week: !0
|
1980 | };
|
1981 | function isTextInputElement(elem) {
|
1982 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
1983 | return "input" === nodeName
|
1984 | ? !!supportedInputTypes[elem.type]
|
1985 | : "textarea" === nodeName
|
1986 | ? !0
|
1987 | : !1;
|
1988 | }
|
1989 | function createAndAccumulateChangeEvent(
|
1990 | dispatchQueue,
|
1991 | inst,
|
1992 | nativeEvent,
|
1993 | target
|
1994 | ) {
|
1995 | restoreTarget
|
1996 | ? restoreQueue
|
1997 | ? restoreQueue.push(target)
|
1998 | : (restoreQueue = [target])
|
1999 | : (restoreTarget = target);
|
2000 | inst = accumulateTwoPhaseListeners(inst, "onChange");
|
2001 | 0 < inst.length &&
|
2002 | ((nativeEvent = new SyntheticEvent(
|
2003 | "onChange",
|
2004 | "change",
|
2005 | null,
|
2006 | nativeEvent,
|
2007 | target
|
2008 | )),
|
2009 | dispatchQueue.push({ event: nativeEvent, listeners: inst }));
|
2010 | }
|
2011 | var activeElement$1 = null,
|
2012 | activeElementInst$1 = null;
|
2013 | function runEventInBatch(dispatchQueue) {
|
2014 | processDispatchQueue(dispatchQueue, 0);
|
2015 | }
|
2016 | function getInstIfValueChanged(targetInst) {
|
2017 | var targetNode = getNodeFromInstance(targetInst);
|
2018 | if (updateValueIfChanged(targetNode)) return targetInst;
|
2019 | }
|
2020 | function getTargetInstForChangeEvent(domEventName, targetInst) {
|
2021 | if ("change" === domEventName) return targetInst;
|
2022 | }
|
2023 | var isInputEventSupported = !1;
|
2024 | if (canUseDOM) {
|
2025 | var JSCompiler_inline_result$jscomp$284;
|
2026 | if (canUseDOM) {
|
2027 | var isSupported$jscomp$inline_418 = "oninput" in document;
|
2028 | if (!isSupported$jscomp$inline_418) {
|
2029 | var element$jscomp$inline_419 = document.createElement("div");
|
2030 | element$jscomp$inline_419.setAttribute("oninput", "return;");
|
2031 | isSupported$jscomp$inline_418 =
|
2032 | "function" === typeof element$jscomp$inline_419.oninput;
|
2033 | }
|
2034 | JSCompiler_inline_result$jscomp$284 = isSupported$jscomp$inline_418;
|
2035 | } else JSCompiler_inline_result$jscomp$284 = !1;
|
2036 | isInputEventSupported =
|
2037 | JSCompiler_inline_result$jscomp$284 &&
|
2038 | (!document.documentMode || 9 < document.documentMode);
|
2039 | }
|
2040 | function stopWatchingForValueChange() {
|
2041 | activeElement$1 &&
|
2042 | (activeElement$1.detachEvent("onpropertychange", handlePropertyChange),
|
2043 | (activeElementInst$1 = activeElement$1 = null));
|
2044 | }
|
2045 | function handlePropertyChange(nativeEvent) {
|
2046 | if (
|
2047 | "value" === nativeEvent.propertyName &&
|
2048 | getInstIfValueChanged(activeElementInst$1)
|
2049 | ) {
|
2050 | var dispatchQueue = [];
|
2051 | createAndAccumulateChangeEvent(
|
2052 | dispatchQueue,
|
2053 | activeElementInst$1,
|
2054 | nativeEvent,
|
2055 | getEventTarget(nativeEvent)
|
2056 | );
|
2057 | batchedUpdates$2(runEventInBatch, dispatchQueue);
|
2058 | }
|
2059 | }
|
2060 | function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
|
2061 | "focusin" === domEventName
|
2062 | ? (stopWatchingForValueChange(),
|
2063 | (activeElement$1 = target),
|
2064 | (activeElementInst$1 = targetInst),
|
2065 | activeElement$1.attachEvent("onpropertychange", handlePropertyChange))
|
2066 | : "focusout" === domEventName && stopWatchingForValueChange();
|
2067 | }
|
2068 | function getTargetInstForInputEventPolyfill(domEventName) {
|
2069 | if (
|
2070 | "selectionchange" === domEventName ||
|
2071 | "keyup" === domEventName ||
|
2072 | "keydown" === domEventName
|
2073 | )
|
2074 | return getInstIfValueChanged(activeElementInst$1);
|
2075 | }
|
2076 | function getTargetInstForClickEvent(domEventName, targetInst) {
|
2077 | if ("click" === domEventName) return getInstIfValueChanged(targetInst);
|
2078 | }
|
2079 | function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
|
2080 | if ("input" === domEventName || "change" === domEventName)
|
2081 | return getInstIfValueChanged(targetInst);
|
2082 | }
|
2083 | function is(x, y) {
|
2084 | return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
2085 | }
|
2086 | var objectIs = "function" === typeof Object.is ? Object.is : is;
|
2087 | function shallowEqual(objA, objB) {
|
2088 | if (objectIs(objA, objB)) return !0;
|
2089 | if (
|
2090 | "object" !== typeof objA ||
|
2091 | null === objA ||
|
2092 | "object" !== typeof objB ||
|
2093 | null === objB
|
2094 | )
|
2095 | return !1;
|
2096 | var keysA = Object.keys(objA),
|
2097 | keysB = Object.keys(objB);
|
2098 | if (keysA.length !== keysB.length) return !1;
|
2099 | for (keysB = 0; keysB < keysA.length; keysB++) {
|
2100 | var currentKey = keysA[keysB];
|
2101 | if (
|
2102 | !hasOwnProperty.call(objB, currentKey) ||
|
2103 | !objectIs(objA[currentKey], objB[currentKey])
|
2104 | )
|
2105 | return !1;
|
2106 | }
|
2107 | return !0;
|
2108 | }
|
2109 | function getLeafNode(node) {
|
2110 | for (; node && node.firstChild; ) node = node.firstChild;
|
2111 | return node;
|
2112 | }
|
2113 | function getNodeForCharacterOffset(root, offset) {
|
2114 | var node = getLeafNode(root);
|
2115 | root = 0;
|
2116 | for (var nodeEnd; node; ) {
|
2117 | if (3 === node.nodeType) {
|
2118 | nodeEnd = root + node.textContent.length;
|
2119 | if (root <= offset && nodeEnd >= offset)
|
2120 | return { node: node, offset: offset - root };
|
2121 | root = nodeEnd;
|
2122 | }
|
2123 | a: {
|
2124 | for (; node; ) {
|
2125 | if (node.nextSibling) {
|
2126 | node = node.nextSibling;
|
2127 | break a;
|
2128 | }
|
2129 | node = node.parentNode;
|
2130 | }
|
2131 | node = void 0;
|
2132 | }
|
2133 | node = getLeafNode(node);
|
2134 | }
|
2135 | }
|
2136 | function containsNode(outerNode, innerNode) {
|
2137 | return outerNode && innerNode
|
2138 | ? outerNode === innerNode
|
2139 | ? !0
|
2140 | : outerNode && 3 === outerNode.nodeType
|
2141 | ? !1
|
2142 | : innerNode && 3 === innerNode.nodeType
|
2143 | ? containsNode(outerNode, innerNode.parentNode)
|
2144 | : "contains" in outerNode
|
2145 | ? outerNode.contains(innerNode)
|
2146 | : outerNode.compareDocumentPosition
|
2147 | ? !!(outerNode.compareDocumentPosition(innerNode) & 16)
|
2148 | : !1
|
2149 | : !1;
|
2150 | }
|
2151 | function getActiveElementDeep() {
|
2152 | for (
|
2153 | var win = window, element = getActiveElement();
|
2154 | element instanceof win.HTMLIFrameElement;
|
2155 |
|
2156 | ) {
|
2157 | try {
|
2158 | var JSCompiler_inline_result =
|
2159 | "string" === typeof element.contentWindow.location.href;
|
2160 | } catch (err) {
|
2161 | JSCompiler_inline_result = !1;
|
2162 | }
|
2163 | if (JSCompiler_inline_result) win = element.contentWindow;
|
2164 | else break;
|
2165 | element = getActiveElement(win.document);
|
2166 | }
|
2167 | return element;
|
2168 | }
|
2169 | function hasSelectionCapabilities(elem) {
|
2170 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
2171 | return (
|
2172 | nodeName &&
|
2173 | (("input" === nodeName &&
|
2174 | ("text" === elem.type ||
|
2175 | "search" === elem.type ||
|
2176 | "tel" === elem.type ||
|
2177 | "url" === elem.type ||
|
2178 | "password" === elem.type)) ||
|
2179 | "textarea" === nodeName ||
|
2180 | "true" === elem.contentEditable)
|
2181 | );
|
2182 | }
|
2183 | function restoreSelection(priorSelectionInformation) {
|
2184 | var curFocusedElem = getActiveElementDeep(),
|
2185 | priorFocusedElem = priorSelectionInformation.focusedElem,
|
2186 | priorSelectionRange = priorSelectionInformation.selectionRange;
|
2187 | if (
|
2188 | curFocusedElem !== priorFocusedElem &&
|
2189 | priorFocusedElem &&
|
2190 | priorFocusedElem.ownerDocument &&
|
2191 | containsNode(
|
2192 | priorFocusedElem.ownerDocument.documentElement,
|
2193 | priorFocusedElem
|
2194 | )
|
2195 | ) {
|
2196 | if (
|
2197 | null !== priorSelectionRange &&
|
2198 | hasSelectionCapabilities(priorFocusedElem)
|
2199 | )
|
2200 | if (
|
2201 | ((curFocusedElem = priorSelectionRange.start),
|
2202 | (priorSelectionInformation = priorSelectionRange.end),
|
2203 | void 0 === priorSelectionInformation &&
|
2204 | (priorSelectionInformation = curFocusedElem),
|
2205 | "selectionStart" in priorFocusedElem)
|
2206 | )
|
2207 | (priorFocusedElem.selectionStart = curFocusedElem),
|
2208 | (priorFocusedElem.selectionEnd = Math.min(
|
2209 | priorSelectionInformation,
|
2210 | priorFocusedElem.value.length
|
2211 | ));
|
2212 | else if (
|
2213 | ((priorSelectionInformation =
|
2214 | ((curFocusedElem = priorFocusedElem.ownerDocument || document) &&
|
2215 | curFocusedElem.defaultView) ||
|
2216 | window),
|
2217 | priorSelectionInformation.getSelection)
|
2218 | ) {
|
2219 | priorSelectionInformation = priorSelectionInformation.getSelection();
|
2220 | var length = priorFocusedElem.textContent.length,
|
2221 | start = Math.min(priorSelectionRange.start, length);
|
2222 | priorSelectionRange =
|
2223 | void 0 === priorSelectionRange.end
|
2224 | ? start
|
2225 | : Math.min(priorSelectionRange.end, length);
|
2226 | !priorSelectionInformation.extend &&
|
2227 | start > priorSelectionRange &&
|
2228 | ((length = priorSelectionRange),
|
2229 | (priorSelectionRange = start),
|
2230 | (start = length));
|
2231 | length = getNodeForCharacterOffset(priorFocusedElem, start);
|
2232 | var endMarker = getNodeForCharacterOffset(
|
2233 | priorFocusedElem,
|
2234 | priorSelectionRange
|
2235 | );
|
2236 | length &&
|
2237 | endMarker &&
|
2238 | (1 !== priorSelectionInformation.rangeCount ||
|
2239 | priorSelectionInformation.anchorNode !== length.node ||
|
2240 | priorSelectionInformation.anchorOffset !== length.offset ||
|
2241 | priorSelectionInformation.focusNode !== endMarker.node ||
|
2242 | priorSelectionInformation.focusOffset !== endMarker.offset) &&
|
2243 | ((curFocusedElem = curFocusedElem.createRange()),
|
2244 | curFocusedElem.setStart(length.node, length.offset),
|
2245 | priorSelectionInformation.removeAllRanges(),
|
2246 | start > priorSelectionRange
|
2247 | ? (priorSelectionInformation.addRange(curFocusedElem),
|
2248 | priorSelectionInformation.extend(
|
2249 | endMarker.node,
|
2250 | endMarker.offset
|
2251 | ))
|
2252 | : (curFocusedElem.setEnd(endMarker.node, endMarker.offset),
|
2253 | priorSelectionInformation.addRange(curFocusedElem)));
|
2254 | }
|
2255 | curFocusedElem = [];
|
2256 | for (
|
2257 | priorSelectionInformation = priorFocusedElem;
|
2258 | (priorSelectionInformation = priorSelectionInformation.parentNode);
|
2259 |
|
2260 | )
|
2261 | 1 === priorSelectionInformation.nodeType &&
|
2262 | curFocusedElem.push({
|
2263 | element: priorSelectionInformation,
|
2264 | left: priorSelectionInformation.scrollLeft,
|
2265 | top: priorSelectionInformation.scrollTop
|
2266 | });
|
2267 | "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
|
2268 | for (
|
2269 | priorFocusedElem = 0;
|
2270 | priorFocusedElem < curFocusedElem.length;
|
2271 | priorFocusedElem++
|
2272 | )
|
2273 | (priorSelectionInformation = curFocusedElem[priorFocusedElem]),
|
2274 | (priorSelectionInformation.element.scrollLeft =
|
2275 | priorSelectionInformation.left),
|
2276 | (priorSelectionInformation.element.scrollTop =
|
2277 | priorSelectionInformation.top);
|
2278 | }
|
2279 | }
|
2280 | var skipSelectionChangeEvent =
|
2281 | canUseDOM && "documentMode" in document && 11 >= document.documentMode,
|
2282 | activeElement = null,
|
2283 | activeElementInst = null,
|
2284 | lastSelection = null,
|
2285 | mouseDown = !1;
|
2286 | function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
|
2287 | var doc =
|
2288 | nativeEventTarget.window === nativeEventTarget
|
2289 | ? nativeEventTarget.document
|
2290 | : 9 === nativeEventTarget.nodeType
|
2291 | ? nativeEventTarget
|
2292 | : nativeEventTarget.ownerDocument;
|
2293 | mouseDown ||
|
2294 | null == activeElement ||
|
2295 | activeElement !== getActiveElement(doc) ||
|
2296 | ((doc = activeElement),
|
2297 | "selectionStart" in doc && hasSelectionCapabilities(doc)
|
2298 | ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })
|
2299 | : ((doc = (
|
2300 | (doc.ownerDocument && doc.ownerDocument.defaultView) ||
|
2301 | window
|
2302 | ).getSelection()),
|
2303 | (doc = {
|
2304 | anchorNode: doc.anchorNode,
|
2305 | anchorOffset: doc.anchorOffset,
|
2306 | focusNode: doc.focusNode,
|
2307 | focusOffset: doc.focusOffset
|
2308 | })),
|
2309 | (lastSelection && shallowEqual(lastSelection, doc)) ||
|
2310 | ((lastSelection = doc),
|
2311 | (doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect")),
|
2312 | 0 < doc.length &&
|
2313 | ((nativeEvent = new SyntheticEvent(
|
2314 | "onSelect",
|
2315 | "select",
|
2316 | null,
|
2317 | nativeEvent,
|
2318 | nativeEventTarget
|
2319 | )),
|
2320 | dispatchQueue.push({ event: nativeEvent, listeners: doc }),
|
2321 | (nativeEvent.target = activeElement))));
|
2322 | }
|
2323 | function makePrefixMap(styleProp, eventName) {
|
2324 | var prefixes = {};
|
2325 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
2326 | prefixes["Webkit" + styleProp] = "webkit" + eventName;
|
2327 | prefixes["Moz" + styleProp] = "moz" + eventName;
|
2328 | return prefixes;
|
2329 | }
|
2330 | var vendorPrefixes = {
|
2331 | animationend: makePrefixMap("Animation", "AnimationEnd"),
|
2332 | animationiteration: makePrefixMap("Animation", "AnimationIteration"),
|
2333 | animationstart: makePrefixMap("Animation", "AnimationStart"),
|
2334 | transitionrun: makePrefixMap("Transition", "TransitionRun"),
|
2335 | transitionstart: makePrefixMap("Transition", "TransitionStart"),
|
2336 | transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
|
2337 | transitionend: makePrefixMap("Transition", "TransitionEnd")
|
2338 | },
|
2339 | prefixedEventNames = {},
|
2340 | style = {};
|
2341 | canUseDOM &&
|
2342 | ((style = document.createElement("div").style),
|
2343 | "AnimationEvent" in window ||
|
2344 | (delete vendorPrefixes.animationend.animation,
|
2345 | delete vendorPrefixes.animationiteration.animation,
|
2346 | delete vendorPrefixes.animationstart.animation),
|
2347 | "TransitionEvent" in window ||
|
2348 | delete vendorPrefixes.transitionend.transition);
|
2349 | function getVendorPrefixedEventName(eventName) {
|
2350 | if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
|
2351 | if (!vendorPrefixes[eventName]) return eventName;
|
2352 | var prefixMap = vendorPrefixes[eventName],
|
2353 | styleProp;
|
2354 | for (styleProp in prefixMap)
|
2355 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
|
2356 | return (prefixedEventNames[eventName] = prefixMap[styleProp]);
|
2357 | return eventName;
|
2358 | }
|
2359 | var ANIMATION_END = getVendorPrefixedEventName("animationend"),
|
2360 | ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"),
|
2361 | ANIMATION_START = getVendorPrefixedEventName("animationstart"),
|
2362 | TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"),
|
2363 | TRANSITION_START = getVendorPrefixedEventName("transitionstart"),
|
2364 | TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"),
|
2365 | TRANSITION_END = getVendorPrefixedEventName("transitionend"),
|
2366 | topLevelEventsToReactNames = new Map(),
|
2367 | simpleEventPluginEvents =
|
2368 | "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(
|
2369 | " "
|
2370 | );
|
2371 | function registerSimpleEvent(domEventName, reactName) {
|
2372 | topLevelEventsToReactNames.set(domEventName, reactName);
|
2373 | registerTwoPhaseEvent(reactName, [domEventName]);
|
2374 | }
|
2375 | function extractEvents$1(
|
2376 | dispatchQueue,
|
2377 | domEventName,
|
2378 | maybeTargetInst,
|
2379 | nativeEvent,
|
2380 | nativeEventTarget
|
2381 | ) {
|
2382 | if (
|
2383 | "submit" === domEventName &&
|
2384 | maybeTargetInst &&
|
2385 | maybeTargetInst.stateNode === nativeEventTarget
|
2386 | ) {
|
2387 | var action = (nativeEventTarget[internalPropsKey] || null).action,
|
2388 | submitter = nativeEvent.submitter;
|
2389 | submitter &&
|
2390 | ((domEventName = (domEventName = submitter[internalPropsKey] || null)
|
2391 | ? domEventName.formAction
|
2392 | : submitter.getAttribute("formAction")),
|
2393 | null != domEventName && ((action = domEventName), (submitter = null)));
|
2394 | if ("function" === typeof action) {
|
2395 | var event = new SyntheticEvent(
|
2396 | "action",
|
2397 | "action",
|
2398 | null,
|
2399 | nativeEvent,
|
2400 | nativeEventTarget
|
2401 | );
|
2402 | dispatchQueue.push({
|
2403 | event: event,
|
2404 | listeners: [
|
2405 | {
|
2406 | instance: null,
|
2407 | listener: function () {
|
2408 | if (!nativeEvent.defaultPrevented) {
|
2409 | event.preventDefault();
|
2410 | if (submitter) {
|
2411 | var temp = submitter.ownerDocument.createElement("input");
|
2412 | temp.name = submitter.name;
|
2413 | temp.value = submitter.value;
|
2414 | submitter.parentNode.insertBefore(temp, submitter);
|
2415 | var formData = new FormData(nativeEventTarget);
|
2416 | temp.parentNode.removeChild(temp);
|
2417 | } else formData = new FormData(nativeEventTarget);
|
2418 | startHostTransition(
|
2419 | maybeTargetInst,
|
2420 | {
|
2421 | pending: !0,
|
2422 | data: formData,
|
2423 | method: nativeEventTarget.method,
|
2424 | action: action
|
2425 | },
|
2426 | action,
|
2427 | formData
|
2428 | );
|
2429 | }
|
2430 | },
|
2431 | currentTarget: nativeEventTarget
|
2432 | }
|
2433 | ]
|
2434 | });
|
2435 | }
|
2436 | }
|
2437 | }
|
2438 | for (
|
2439 | var reportGlobalError =
|
2440 | "function" === typeof reportError
|
2441 | ? reportError
|
2442 | : function (error) {
|
2443 | if (
|
2444 | "object" === typeof window &&
|
2445 | "function" === typeof window.ErrorEvent
|
2446 | ) {
|
2447 | var event = new window.ErrorEvent("error", {
|
2448 | bubbles: !0,
|
2449 | cancelable: !0,
|
2450 | message:
|
2451 | "object" === typeof error &&
|
2452 | null !== error &&
|
2453 | "string" === typeof error.message
|
2454 | ? String(error.message)
|
2455 | : String(error),
|
2456 | error: error
|
2457 | });
|
2458 | if (!window.dispatchEvent(event)) return;
|
2459 | } else if (
|
2460 | "object" === typeof process &&
|
2461 | "function" === typeof process.emit
|
2462 | ) {
|
2463 | process.emit("uncaughtException", error);
|
2464 | return;
|
2465 | }
|
2466 | console.error(error);
|
2467 | },
|
2468 | i$jscomp$inline_459 = 0;
|
2469 | i$jscomp$inline_459 < simpleEventPluginEvents.length;
|
2470 | i$jscomp$inline_459++
|
2471 | ) {
|
2472 | var eventName$jscomp$inline_460 =
|
2473 | simpleEventPluginEvents[i$jscomp$inline_459],
|
2474 | domEventName$jscomp$inline_461 = eventName$jscomp$inline_460.toLowerCase(),
|
2475 | capitalizedEvent$jscomp$inline_462 =
|
2476 | eventName$jscomp$inline_460[0].toUpperCase() +
|
2477 | eventName$jscomp$inline_460.slice(1);
|
2478 | registerSimpleEvent(
|
2479 | domEventName$jscomp$inline_461,
|
2480 | "on" + capitalizedEvent$jscomp$inline_462
|
2481 | );
|
2482 | }
|
2483 | registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
|
2484 | registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
|
2485 | registerSimpleEvent(ANIMATION_START, "onAnimationStart");
|
2486 | registerSimpleEvent("dblclick", "onDoubleClick");
|
2487 | registerSimpleEvent("focusin", "onFocus");
|
2488 | registerSimpleEvent("focusout", "onBlur");
|
2489 | registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
|
2490 | registerSimpleEvent(TRANSITION_START, "onTransitionStart");
|
2491 | registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
|
2492 | registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
|
2493 | registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
|
2494 | registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
|
2495 | registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
|
2496 | registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
|
2497 | registerTwoPhaseEvent(
|
2498 | "onChange",
|
2499 | "change click focusin focusout input keydown keyup selectionchange".split(" ")
|
2500 | );
|
2501 | registerTwoPhaseEvent(
|
2502 | "onSelect",
|
2503 | "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
|
2504 | " "
|
2505 | )
|
2506 | );
|
2507 | registerTwoPhaseEvent("onBeforeInput", [
|
2508 | "compositionend",
|
2509 | "keypress",
|
2510 | "textInput",
|
2511 | "paste"
|
2512 | ]);
|
2513 | registerTwoPhaseEvent(
|
2514 | "onCompositionEnd",
|
2515 | "compositionend focusout keydown keypress keyup mousedown".split(" ")
|
2516 | );
|
2517 | registerTwoPhaseEvent(
|
2518 | "onCompositionStart",
|
2519 | "compositionstart focusout keydown keypress keyup mousedown".split(" ")
|
2520 | );
|
2521 | registerTwoPhaseEvent(
|
2522 | "onCompositionUpdate",
|
2523 | "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
|
2524 | );
|
2525 | var mediaEventTypes =
|
2526 | "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(
|
2527 | " "
|
2528 | ),
|
2529 | nonDelegatedEvents = new Set(
|
2530 | "cancel close invalid load scroll scrollend toggle"
|
2531 | .split(" ")
|
2532 | .concat(mediaEventTypes)
|
2533 | );
|
2534 | function processDispatchQueue(dispatchQueue, eventSystemFlags) {
|
2535 | eventSystemFlags = 0 !== (eventSystemFlags & 4);
|
2536 | for (var i = 0; i < dispatchQueue.length; i++) {
|
2537 | var _dispatchQueue$i = dispatchQueue[i],
|
2538 | event = _dispatchQueue$i.event;
|
2539 | _dispatchQueue$i = _dispatchQueue$i.listeners;
|
2540 | a: {
|
2541 | var previousInstance = void 0;
|
2542 | if (eventSystemFlags)
|
2543 | for (
|
2544 | var i$jscomp$0 = _dispatchQueue$i.length - 1;
|
2545 | 0 <= i$jscomp$0;
|
2546 | i$jscomp$0--
|
2547 | ) {
|
2548 | var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],
|
2549 | instance = _dispatchListeners$i.instance,
|
2550 | currentTarget = _dispatchListeners$i.currentTarget;
|
2551 | _dispatchListeners$i = _dispatchListeners$i.listener;
|
2552 | if (instance !== previousInstance && event.isPropagationStopped())
|
2553 | break a;
|
2554 | previousInstance = _dispatchListeners$i;
|
2555 | event.currentTarget = currentTarget;
|
2556 | try {
|
2557 | previousInstance(event);
|
2558 | } catch (error) {
|
2559 | reportGlobalError(error);
|
2560 | }
|
2561 | event.currentTarget = null;
|
2562 | previousInstance = instance;
|
2563 | }
|
2564 | else
|
2565 | for (
|
2566 | i$jscomp$0 = 0;
|
2567 | i$jscomp$0 < _dispatchQueue$i.length;
|
2568 | i$jscomp$0++
|
2569 | ) {
|
2570 | _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
|
2571 | instance = _dispatchListeners$i.instance;
|
2572 | currentTarget = _dispatchListeners$i.currentTarget;
|
2573 | _dispatchListeners$i = _dispatchListeners$i.listener;
|
2574 | if (instance !== previousInstance && event.isPropagationStopped())
|
2575 | break a;
|
2576 | previousInstance = _dispatchListeners$i;
|
2577 | event.currentTarget = currentTarget;
|
2578 | try {
|
2579 | previousInstance(event);
|
2580 | } catch (error) {
|
2581 | reportGlobalError(error);
|
2582 | }
|
2583 | event.currentTarget = null;
|
2584 | previousInstance = instance;
|
2585 | }
|
2586 | }
|
2587 | }
|
2588 | }
|
2589 | function listenToNonDelegatedEvent(domEventName, targetElement) {
|
2590 | var JSCompiler_inline_result = targetElement[internalEventHandlersKey];
|
2591 | void 0 === JSCompiler_inline_result &&
|
2592 | (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =
|
2593 | new Set());
|
2594 | var listenerSetKey = domEventName + "__bubble";
|
2595 | JSCompiler_inline_result.has(listenerSetKey) ||
|
2596 | (addTrappedEventListener(targetElement, domEventName, 2, !1),
|
2597 | JSCompiler_inline_result.add(listenerSetKey));
|
2598 | }
|
2599 | function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
|
2600 | var eventSystemFlags = 0;
|
2601 | isCapturePhaseListener && (eventSystemFlags |= 4);
|
2602 | addTrappedEventListener(
|
2603 | target,
|
2604 | domEventName,
|
2605 | eventSystemFlags,
|
2606 | isCapturePhaseListener
|
2607 | );
|
2608 | }
|
2609 | var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
|
2610 | function listenToAllSupportedEvents(rootContainerElement) {
|
2611 | if (!rootContainerElement[listeningMarker]) {
|
2612 | rootContainerElement[listeningMarker] = !0;
|
2613 | allNativeEvents.forEach(function (domEventName) {
|
2614 | "selectionchange" !== domEventName &&
|
2615 | (nonDelegatedEvents.has(domEventName) ||
|
2616 | listenToNativeEvent(domEventName, !1, rootContainerElement),
|
2617 | listenToNativeEvent(domEventName, !0, rootContainerElement));
|
2618 | });
|
2619 | var ownerDocument =
|
2620 | 9 === rootContainerElement.nodeType
|
2621 | ? rootContainerElement
|
2622 | : rootContainerElement.ownerDocument;
|
2623 | null === ownerDocument ||
|
2624 | ownerDocument[listeningMarker] ||
|
2625 | ((ownerDocument[listeningMarker] = !0),
|
2626 | listenToNativeEvent("selectionchange", !1, ownerDocument));
|
2627 | }
|
2628 | }
|
2629 | function addTrappedEventListener(
|
2630 | targetContainer,
|
2631 | domEventName,
|
2632 | eventSystemFlags,
|
2633 | isCapturePhaseListener
|
2634 | ) {
|
2635 | switch (getEventPriority(domEventName)) {
|
2636 | case 2:
|
2637 | var listenerWrapper = dispatchDiscreteEvent;
|
2638 | break;
|
2639 | case 8:
|
2640 | listenerWrapper = dispatchContinuousEvent;
|
2641 | break;
|
2642 | default:
|
2643 | listenerWrapper = dispatchEvent;
|
2644 | }
|
2645 | eventSystemFlags = listenerWrapper.bind(
|
2646 | null,
|
2647 | domEventName,
|
2648 | eventSystemFlags,
|
2649 | targetContainer
|
2650 | );
|
2651 | listenerWrapper = void 0;
|
2652 | !passiveBrowserEventsSupported ||
|
2653 | ("touchstart" !== domEventName &&
|
2654 | "touchmove" !== domEventName &&
|
2655 | "wheel" !== domEventName) ||
|
2656 | (listenerWrapper = !0);
|
2657 | isCapturePhaseListener
|
2658 | ? void 0 !== listenerWrapper
|
2659 | ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
|
2660 | capture: !0,
|
2661 | passive: listenerWrapper
|
2662 | })
|
2663 | : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)
|
2664 | : void 0 !== listenerWrapper
|
2665 | ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
|
2666 | passive: listenerWrapper
|
2667 | })
|
2668 | : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
|
2669 | }
|
2670 | function dispatchEventForPluginEventSystem(
|
2671 | domEventName,
|
2672 | eventSystemFlags,
|
2673 | nativeEvent,
|
2674 | targetInst$jscomp$0,
|
2675 | targetContainer
|
2676 | ) {
|
2677 | var ancestorInst = targetInst$jscomp$0;
|
2678 | if (
|
2679 | 0 === (eventSystemFlags & 1) &&
|
2680 | 0 === (eventSystemFlags & 2) &&
|
2681 | null !== targetInst$jscomp$0
|
2682 | )
|
2683 | a: for (;;) {
|
2684 | if (null === targetInst$jscomp$0) return;
|
2685 | var nodeTag = targetInst$jscomp$0.tag;
|
2686 | if (3 === nodeTag || 4 === nodeTag) {
|
2687 | var container = targetInst$jscomp$0.stateNode.containerInfo;
|
2688 | if (
|
2689 | container === targetContainer ||
|
2690 | (8 === container.nodeType && container.parentNode === targetContainer)
|
2691 | )
|
2692 | break;
|
2693 | if (4 === nodeTag)
|
2694 | for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
|
2695 | var grandTag = nodeTag.tag;
|
2696 | if (3 === grandTag || 4 === grandTag)
|
2697 | if (
|
2698 | ((grandTag = nodeTag.stateNode.containerInfo),
|
2699 | grandTag === targetContainer ||
|
2700 | (8 === grandTag.nodeType &&
|
2701 | grandTag.parentNode === targetContainer))
|
2702 | )
|
2703 | return;
|
2704 | nodeTag = nodeTag.return;
|
2705 | }
|
2706 | for (; null !== container; ) {
|
2707 | nodeTag = getClosestInstanceFromNode(container);
|
2708 | if (null === nodeTag) return;
|
2709 | grandTag = nodeTag.tag;
|
2710 | if (
|
2711 | 5 === grandTag ||
|
2712 | 6 === grandTag ||
|
2713 | 26 === grandTag ||
|
2714 | 27 === grandTag
|
2715 | ) {
|
2716 | targetInst$jscomp$0 = ancestorInst = nodeTag;
|
2717 | continue a;
|
2718 | }
|
2719 | container = container.parentNode;
|
2720 | }
|
2721 | }
|
2722 | targetInst$jscomp$0 = targetInst$jscomp$0.return;
|
2723 | }
|
2724 | batchedUpdates$2(function () {
|
2725 | var targetInst = ancestorInst,
|
2726 | nativeEventTarget = getEventTarget(nativeEvent),
|
2727 | dispatchQueue = [];
|
2728 | a: {
|
2729 | var reactName = topLevelEventsToReactNames.get(domEventName);
|
2730 | if (void 0 !== reactName) {
|
2731 | var SyntheticEventCtor = SyntheticEvent,
|
2732 | reactEventType = domEventName;
|
2733 | switch (domEventName) {
|
2734 | case "keypress":
|
2735 | if (0 === getEventCharCode(nativeEvent)) break a;
|
2736 | case "keydown":
|
2737 | case "keyup":
|
2738 | SyntheticEventCtor = SyntheticKeyboardEvent;
|
2739 | break;
|
2740 | case "focusin":
|
2741 | reactEventType = "focus";
|
2742 | SyntheticEventCtor = SyntheticFocusEvent;
|
2743 | break;
|
2744 | case "focusout":
|
2745 | reactEventType = "blur";
|
2746 | SyntheticEventCtor = SyntheticFocusEvent;
|
2747 | break;
|
2748 | case "beforeblur":
|
2749 | case "afterblur":
|
2750 | SyntheticEventCtor = SyntheticFocusEvent;
|
2751 | break;
|
2752 | case "click":
|
2753 | if (2 === nativeEvent.button) break a;
|
2754 | case "auxclick":
|
2755 | case "dblclick":
|
2756 | case "mousedown":
|
2757 | case "mousemove":
|
2758 | case "mouseup":
|
2759 | case "mouseout":
|
2760 | case "mouseover":
|
2761 | case "contextmenu":
|
2762 | SyntheticEventCtor = SyntheticMouseEvent;
|
2763 | break;
|
2764 | case "drag":
|
2765 | case "dragend":
|
2766 | case "dragenter":
|
2767 | case "dragexit":
|
2768 | case "dragleave":
|
2769 | case "dragover":
|
2770 | case "dragstart":
|
2771 | case "drop":
|
2772 | SyntheticEventCtor = SyntheticDragEvent;
|
2773 | break;
|
2774 | case "touchcancel":
|
2775 | case "touchend":
|
2776 | case "touchmove":
|
2777 | case "touchstart":
|
2778 | SyntheticEventCtor = SyntheticTouchEvent;
|
2779 | break;
|
2780 | case ANIMATION_END:
|
2781 | case ANIMATION_ITERATION:
|
2782 | case ANIMATION_START:
|
2783 | SyntheticEventCtor = SyntheticAnimationEvent;
|
2784 | break;
|
2785 | case TRANSITION_END:
|
2786 | SyntheticEventCtor = SyntheticTransitionEvent;
|
2787 | break;
|
2788 | case "scroll":
|
2789 | case "scrollend":
|
2790 | SyntheticEventCtor = SyntheticUIEvent;
|
2791 | break;
|
2792 | case "wheel":
|
2793 | SyntheticEventCtor = SyntheticWheelEvent;
|
2794 | break;
|
2795 | case "copy":
|
2796 | case "cut":
|
2797 | case "paste":
|
2798 | SyntheticEventCtor = SyntheticClipboardEvent;
|
2799 | break;
|
2800 | case "gotpointercapture":
|
2801 | case "lostpointercapture":
|
2802 | case "pointercancel":
|
2803 | case "pointerdown":
|
2804 | case "pointermove":
|
2805 | case "pointerout":
|
2806 | case "pointerover":
|
2807 | case "pointerup":
|
2808 | SyntheticEventCtor = SyntheticPointerEvent;
|
2809 | }
|
2810 | var inCapturePhase = 0 !== (eventSystemFlags & 4),
|
2811 | accumulateTargetOnly =
|
2812 | !inCapturePhase &&
|
2813 | ("scroll" === domEventName || "scrollend" === domEventName),
|
2814 | reactEventName = inCapturePhase
|
2815 | ? null !== reactName
|
2816 | ? reactName + "Capture"
|
2817 | : null
|
2818 | : reactName;
|
2819 | inCapturePhase = [];
|
2820 | for (
|
2821 | var instance = targetInst, lastHostComponent;
|
2822 | null !== instance;
|
2823 |
|
2824 | ) {
|
2825 | var _instance = instance;
|
2826 | lastHostComponent = _instance.stateNode;
|
2827 | _instance = _instance.tag;
|
2828 | (5 !== _instance && 26 !== _instance && 27 !== _instance) ||
|
2829 | null === lastHostComponent ||
|
2830 | null === reactEventName ||
|
2831 | ((_instance = getListener(instance, reactEventName)),
|
2832 | null != _instance &&
|
2833 | inCapturePhase.push(
|
2834 | createDispatchListener(instance, _instance, lastHostComponent)
|
2835 | ));
|
2836 | if (accumulateTargetOnly) break;
|
2837 | instance = instance.return;
|
2838 | }
|
2839 | 0 < inCapturePhase.length &&
|
2840 | ((reactName = new SyntheticEventCtor(
|
2841 | reactName,
|
2842 | reactEventType,
|
2843 | null,
|
2844 | nativeEvent,
|
2845 | nativeEventTarget
|
2846 | )),
|
2847 | dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));
|
2848 | }
|
2849 | }
|
2850 | if (0 === (eventSystemFlags & 7)) {
|
2851 | a: {
|
2852 | reactName =
|
2853 | "mouseover" === domEventName || "pointerover" === domEventName;
|
2854 | SyntheticEventCtor =
|
2855 | "mouseout" === domEventName || "pointerout" === domEventName;
|
2856 | if (
|
2857 | reactName &&
|
2858 | nativeEvent !== currentReplayingEvent &&
|
2859 | (reactEventType =
|
2860 | nativeEvent.relatedTarget || nativeEvent.fromElement) &&
|
2861 | (getClosestInstanceFromNode(reactEventType) ||
|
2862 | reactEventType[internalContainerInstanceKey])
|
2863 | )
|
2864 | break a;
|
2865 | if (SyntheticEventCtor || reactName) {
|
2866 | reactName =
|
2867 | nativeEventTarget.window === nativeEventTarget
|
2868 | ? nativeEventTarget
|
2869 | : (reactName = nativeEventTarget.ownerDocument)
|
2870 | ? reactName.defaultView || reactName.parentWindow
|
2871 | : window;
|
2872 | if (SyntheticEventCtor) {
|
2873 | if (
|
2874 | ((reactEventType =
|
2875 | nativeEvent.relatedTarget || nativeEvent.toElement),
|
2876 | (SyntheticEventCtor = targetInst),
|
2877 | (reactEventType = reactEventType
|
2878 | ? getClosestInstanceFromNode(reactEventType)
|
2879 | : null),
|
2880 | null !== reactEventType &&
|
2881 | ((accumulateTargetOnly =
|
2882 | getNearestMountedFiber(reactEventType)),
|
2883 | (inCapturePhase = reactEventType.tag),
|
2884 | reactEventType !== accumulateTargetOnly ||
|
2885 | (5 !== inCapturePhase &&
|
2886 | 27 !== inCapturePhase &&
|
2887 | 6 !== inCapturePhase)))
|
2888 | )
|
2889 | reactEventType = null;
|
2890 | } else (SyntheticEventCtor = null), (reactEventType = targetInst);
|
2891 | if (SyntheticEventCtor !== reactEventType) {
|
2892 | inCapturePhase = SyntheticMouseEvent;
|
2893 | _instance = "onMouseLeave";
|
2894 | reactEventName = "onMouseEnter";
|
2895 | instance = "mouse";
|
2896 | if ("pointerout" === domEventName || "pointerover" === domEventName)
|
2897 | (inCapturePhase = SyntheticPointerEvent),
|
2898 | (_instance = "onPointerLeave"),
|
2899 | (reactEventName = "onPointerEnter"),
|
2900 | (instance = "pointer");
|
2901 | accumulateTargetOnly =
|
2902 | null == SyntheticEventCtor
|
2903 | ? reactName
|
2904 | : getNodeFromInstance(SyntheticEventCtor);
|
2905 | lastHostComponent =
|
2906 | null == reactEventType
|
2907 | ? reactName
|
2908 | : getNodeFromInstance(reactEventType);
|
2909 | reactName = new inCapturePhase(
|
2910 | _instance,
|
2911 | instance + "leave",
|
2912 | SyntheticEventCtor,
|
2913 | nativeEvent,
|
2914 | nativeEventTarget
|
2915 | );
|
2916 | reactName.target = accumulateTargetOnly;
|
2917 | reactName.relatedTarget = lastHostComponent;
|
2918 | _instance = null;
|
2919 | getClosestInstanceFromNode(nativeEventTarget) === targetInst &&
|
2920 | ((inCapturePhase = new inCapturePhase(
|
2921 | reactEventName,
|
2922 | instance + "enter",
|
2923 | reactEventType,
|
2924 | nativeEvent,
|
2925 | nativeEventTarget
|
2926 | )),
|
2927 | (inCapturePhase.target = lastHostComponent),
|
2928 | (inCapturePhase.relatedTarget = accumulateTargetOnly),
|
2929 | (_instance = inCapturePhase));
|
2930 | accumulateTargetOnly = _instance;
|
2931 | if (SyntheticEventCtor && reactEventType)
|
2932 | b: {
|
2933 | inCapturePhase = SyntheticEventCtor;
|
2934 | reactEventName = reactEventType;
|
2935 | instance = 0;
|
2936 | for (
|
2937 | lastHostComponent = inCapturePhase;
|
2938 | lastHostComponent;
|
2939 | lastHostComponent = getParent(lastHostComponent)
|
2940 | )
|
2941 | instance++;
|
2942 | lastHostComponent = 0;
|
2943 | for (
|
2944 | _instance = reactEventName;
|
2945 | _instance;
|
2946 | _instance = getParent(_instance)
|
2947 | )
|
2948 | lastHostComponent++;
|
2949 | for (; 0 < instance - lastHostComponent; )
|
2950 | (inCapturePhase = getParent(inCapturePhase)), instance--;
|
2951 | for (; 0 < lastHostComponent - instance; )
|
2952 | (reactEventName = getParent(reactEventName)),
|
2953 | lastHostComponent--;
|
2954 | for (; instance--; ) {
|
2955 | if (
|
2956 | inCapturePhase === reactEventName ||
|
2957 | (null !== reactEventName &&
|
2958 | inCapturePhase === reactEventName.alternate)
|
2959 | )
|
2960 | break b;
|
2961 | inCapturePhase = getParent(inCapturePhase);
|
2962 | reactEventName = getParent(reactEventName);
|
2963 | }
|
2964 | inCapturePhase = null;
|
2965 | }
|
2966 | else inCapturePhase = null;
|
2967 | null !== SyntheticEventCtor &&
|
2968 | accumulateEnterLeaveListenersForEvent(
|
2969 | dispatchQueue,
|
2970 | reactName,
|
2971 | SyntheticEventCtor,
|
2972 | inCapturePhase,
|
2973 | !1
|
2974 | );
|
2975 | null !== reactEventType &&
|
2976 | null !== accumulateTargetOnly &&
|
2977 | accumulateEnterLeaveListenersForEvent(
|
2978 | dispatchQueue,
|
2979 | accumulateTargetOnly,
|
2980 | reactEventType,
|
2981 | inCapturePhase,
|
2982 | !0
|
2983 | );
|
2984 | }
|
2985 | }
|
2986 | }
|
2987 | a: {
|
2988 | reactName = targetInst ? getNodeFromInstance(targetInst) : window;
|
2989 | SyntheticEventCtor =
|
2990 | reactName.nodeName && reactName.nodeName.toLowerCase();
|
2991 | if (
|
2992 | "select" === SyntheticEventCtor ||
|
2993 | ("input" === SyntheticEventCtor && "file" === reactName.type)
|
2994 | )
|
2995 | var getTargetInstFunc = getTargetInstForChangeEvent;
|
2996 | else if (isTextInputElement(reactName))
|
2997 | if (isInputEventSupported)
|
2998 | getTargetInstFunc = getTargetInstForInputOrChangeEvent;
|
2999 | else {
|
3000 | getTargetInstFunc = getTargetInstForInputEventPolyfill;
|
3001 | var handleEventFunc = handleEventsForInputEventPolyfill;
|
3002 | }
|
3003 | else
|
3004 | (SyntheticEventCtor = reactName.nodeName),
|
3005 | !SyntheticEventCtor ||
|
3006 | "input" !== SyntheticEventCtor.toLowerCase() ||
|
3007 | ("checkbox" !== reactName.type && "radio" !== reactName.type)
|
3008 | ? targetInst &&
|
3009 | isCustomElement(targetInst.elementType) &&
|
3010 | (getTargetInstFunc = getTargetInstForChangeEvent)
|
3011 | : (getTargetInstFunc = getTargetInstForClickEvent);
|
3012 | if (
|
3013 | getTargetInstFunc &&
|
3014 | (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))
|
3015 | ) {
|
3016 | createAndAccumulateChangeEvent(
|
3017 | dispatchQueue,
|
3018 | getTargetInstFunc,
|
3019 | nativeEvent,
|
3020 | nativeEventTarget
|
3021 | );
|
3022 | break a;
|
3023 | }
|
3024 | handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
|
3025 | "focusout" === domEventName &&
|
3026 | targetInst &&
|
3027 | "number" === reactName.type &&
|
3028 | null != targetInst.memoizedProps.value &&
|
3029 | setDefaultValue(reactName, "number", reactName.value);
|
3030 | }
|
3031 | handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
|
3032 | switch (domEventName) {
|
3033 | case "focusin":
|
3034 | if (
|
3035 | isTextInputElement(handleEventFunc) ||
|
3036 | "true" === handleEventFunc.contentEditable
|
3037 | )
|
3038 | (activeElement = handleEventFunc),
|
3039 | (activeElementInst = targetInst),
|
3040 | (lastSelection = null);
|
3041 | break;
|
3042 | case "focusout":
|
3043 | lastSelection = activeElementInst = activeElement = null;
|
3044 | break;
|
3045 | case "mousedown":
|
3046 | mouseDown = !0;
|
3047 | break;
|
3048 | case "contextmenu":
|
3049 | case "mouseup":
|
3050 | case "dragend":
|
3051 | mouseDown = !1;
|
3052 | constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
|
3053 | break;
|
3054 | case "selectionchange":
|
3055 | if (skipSelectionChangeEvent) break;
|
3056 | case "keydown":
|
3057 | case "keyup":
|
3058 | constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
|
3059 | }
|
3060 | var fallbackData;
|
3061 | if (canUseCompositionEvent)
|
3062 | b: {
|
3063 | switch (domEventName) {
|
3064 | case "compositionstart":
|
3065 | var eventType = "onCompositionStart";
|
3066 | break b;
|
3067 | case "compositionend":
|
3068 | eventType = "onCompositionEnd";
|
3069 | break b;
|
3070 | case "compositionupdate":
|
3071 | eventType = "onCompositionUpdate";
|
3072 | break b;
|
3073 | }
|
3074 | eventType = void 0;
|
3075 | }
|
3076 | else
|
3077 | isComposing
|
3078 | ? isFallbackCompositionEnd(domEventName, nativeEvent) &&
|
3079 | (eventType = "onCompositionEnd")
|
3080 | : "keydown" === domEventName &&
|
3081 | 229 === nativeEvent.keyCode &&
|
3082 | (eventType = "onCompositionStart");
|
3083 | eventType &&
|
3084 | (useFallbackCompositionData &&
|
3085 | "ko" !== nativeEvent.locale &&
|
3086 | (isComposing || "onCompositionStart" !== eventType
|
3087 | ? "onCompositionEnd" === eventType &&
|
3088 | isComposing &&
|
3089 | (fallbackData = getData())
|
3090 | : ((root = nativeEventTarget),
|
3091 | (startText = "value" in root ? root.value : root.textContent),
|
3092 | (isComposing = !0))),
|
3093 | (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),
|
3094 | 0 < handleEventFunc.length &&
|
3095 | ((eventType = new SyntheticCompositionEvent(
|
3096 | eventType,
|
3097 | domEventName,
|
3098 | null,
|
3099 | nativeEvent,
|
3100 | nativeEventTarget
|
3101 | )),
|
3102 | dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),
|
3103 | fallbackData
|
3104 | ? (eventType.data = fallbackData)
|
3105 | : ((fallbackData = getDataFromCustomEvent(nativeEvent)),
|
3106 | null !== fallbackData && (eventType.data = fallbackData))));
|
3107 | if (
|
3108 | (fallbackData = canUseTextInputEvent
|
3109 | ? getNativeBeforeInputChars(domEventName, nativeEvent)
|
3110 | : getFallbackBeforeInputChars(domEventName, nativeEvent))
|
3111 | )
|
3112 | (eventType = accumulateTwoPhaseListeners(targetInst, "onBeforeInput")),
|
3113 | 0 < eventType.length &&
|
3114 | ((handleEventFunc = new SyntheticCompositionEvent(
|
3115 | "onBeforeInput",
|
3116 | "beforeinput",
|
3117 | null,
|
3118 | nativeEvent,
|
3119 | nativeEventTarget
|
3120 | )),
|
3121 | dispatchQueue.push({
|
3122 | event: handleEventFunc,
|
3123 | listeners: eventType
|
3124 | }),
|
3125 | (handleEventFunc.data = fallbackData));
|
3126 | extractEvents$1(
|
3127 | dispatchQueue,
|
3128 | domEventName,
|
3129 | targetInst,
|
3130 | nativeEvent,
|
3131 | nativeEventTarget
|
3132 | );
|
3133 | }
|
3134 | processDispatchQueue(dispatchQueue, eventSystemFlags);
|
3135 | });
|
3136 | }
|
3137 | function createDispatchListener(instance, listener, currentTarget) {
|
3138 | return {
|
3139 | instance: instance,
|
3140 | listener: listener,
|
3141 | currentTarget: currentTarget
|
3142 | };
|
3143 | }
|
3144 | function accumulateTwoPhaseListeners(targetFiber, reactName) {
|
3145 | for (
|
3146 | var captureName = reactName + "Capture", listeners = [];
|
3147 | null !== targetFiber;
|
3148 |
|
3149 | ) {
|
3150 | var _instance2 = targetFiber,
|
3151 | stateNode = _instance2.stateNode;
|
3152 | _instance2 = _instance2.tag;
|
3153 | (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||
|
3154 | null === stateNode ||
|
3155 | ((_instance2 = getListener(targetFiber, captureName)),
|
3156 | null != _instance2 &&
|
3157 | listeners.unshift(
|
3158 | createDispatchListener(targetFiber, _instance2, stateNode)
|
3159 | ),
|
3160 | (_instance2 = getListener(targetFiber, reactName)),
|
3161 | null != _instance2 &&
|
3162 | listeners.push(
|
3163 | createDispatchListener(targetFiber, _instance2, stateNode)
|
3164 | ));
|
3165 | targetFiber = targetFiber.return;
|
3166 | }
|
3167 | return listeners;
|
3168 | }
|
3169 | function getParent(inst) {
|
3170 | if (null === inst) return null;
|
3171 | do inst = inst.return;
|
3172 | while (inst && 5 !== inst.tag && 27 !== inst.tag);
|
3173 | return inst ? inst : null;
|
3174 | }
|
3175 | function accumulateEnterLeaveListenersForEvent(
|
3176 | dispatchQueue,
|
3177 | event,
|
3178 | target,
|
3179 | common,
|
3180 | inCapturePhase
|
3181 | ) {
|
3182 | for (
|
3183 | var registrationName = event._reactName, listeners = [];
|
3184 | null !== target && target !== common;
|
3185 |
|
3186 | ) {
|
3187 | var _instance3 = target,
|
3188 | alternate = _instance3.alternate,
|
3189 | stateNode = _instance3.stateNode;
|
3190 | _instance3 = _instance3.tag;
|
3191 | if (null !== alternate && alternate === common) break;
|
3192 | (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||
|
3193 | null === stateNode ||
|
3194 | ((alternate = stateNode),
|
3195 | inCapturePhase
|
3196 | ? ((stateNode = getListener(target, registrationName)),
|
3197 | null != stateNode &&
|
3198 | listeners.unshift(
|
3199 | createDispatchListener(target, stateNode, alternate)
|
3200 | ))
|
3201 | : inCapturePhase ||
|
3202 | ((stateNode = getListener(target, registrationName)),
|
3203 | null != stateNode &&
|
3204 | listeners.push(
|
3205 | createDispatchListener(target, stateNode, alternate)
|
3206 | )));
|
3207 | target = target.return;
|
3208 | }
|
3209 | 0 !== listeners.length &&
|
3210 | dispatchQueue.push({ event: event, listeners: listeners });
|
3211 | }
|
3212 | var NORMALIZE_NEWLINES_REGEX = /\r\n?/g,
|
3213 | NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
|
3214 | function normalizeMarkupForTextOrAttribute(markup) {
|
3215 | return ("string" === typeof markup ? markup : "" + markup)
|
3216 | .replace(NORMALIZE_NEWLINES_REGEX, "\n")
|
3217 | .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
|
3218 | }
|
3219 | function checkForUnmatchedText(serverText, clientText) {
|
3220 | clientText = normalizeMarkupForTextOrAttribute(clientText);
|
3221 | return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;
|
3222 | }
|
3223 | function noop$3() {}
|
3224 | function setProp(domElement, tag, key, value, props, prevValue) {
|
3225 | switch (key) {
|
3226 | case "children":
|
3227 | "string" === typeof value
|
3228 | ? "body" === tag ||
|
3229 | ("textarea" === tag && "" === value) ||
|
3230 | setTextContent(domElement, value)
|
3231 | : ("number" === typeof value || "bigint" === typeof value) &&
|
3232 | "body" !== tag &&
|
3233 | setTextContent(domElement, "" + value);
|
3234 | break;
|
3235 | case "className":
|
3236 | setValueForKnownAttribute(domElement, "class", value);
|
3237 | break;
|
3238 | case "tabIndex":
|
3239 | setValueForKnownAttribute(domElement, "tabindex", value);
|
3240 | break;
|
3241 | case "dir":
|
3242 | case "role":
|
3243 | case "viewBox":
|
3244 | case "width":
|
3245 | case "height":
|
3246 | setValueForKnownAttribute(domElement, key, value);
|
3247 | break;
|
3248 | case "style":
|
3249 | setValueForStyles(domElement, value, prevValue);
|
3250 | break;
|
3251 | case "src":
|
3252 | case "href":
|
3253 | if ("" === value && ("a" !== tag || "href" !== key)) {
|
3254 | domElement.removeAttribute(key);
|
3255 | break;
|
3256 | }
|
3257 | if (
|
3258 | null == value ||
|
3259 | "function" === typeof value ||
|
3260 | "symbol" === typeof value ||
|
3261 | "boolean" === typeof value
|
3262 | ) {
|
3263 | domElement.removeAttribute(key);
|
3264 | break;
|
3265 | }
|
3266 | value = sanitizeURL("" + value);
|
3267 | domElement.setAttribute(key, value);
|
3268 | break;
|
3269 | case "action":
|
3270 | case "formAction":
|
3271 | if ("function" === typeof value) {
|
3272 | domElement.setAttribute(
|
3273 | key,
|
3274 | "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().')"
|
3275 | );
|
3276 | break;
|
3277 | } else
|
3278 | "function" === typeof prevValue &&
|
3279 | ("formAction" === key
|
3280 | ? ("input" !== tag &&
|
3281 | setProp(domElement, tag, "name", props.name, props, null),
|
3282 | setProp(
|
3283 | domElement,
|
3284 | tag,
|
3285 | "formEncType",
|
3286 | props.formEncType,
|
3287 | props,
|
3288 | null
|
3289 | ),
|
3290 | setProp(
|
3291 | domElement,
|
3292 | tag,
|
3293 | "formMethod",
|
3294 | props.formMethod,
|
3295 | props,
|
3296 | null
|
3297 | ),
|
3298 | setProp(
|
3299 | domElement,
|
3300 | tag,
|
3301 | "formTarget",
|
3302 | props.formTarget,
|
3303 | props,
|
3304 | null
|
3305 | ))
|
3306 | : (setProp(domElement, tag, "encType", props.encType, props, null),
|
3307 | setProp(domElement, tag, "method", props.method, props, null),
|
3308 | setProp(domElement, tag, "target", props.target, props, null)));
|
3309 | if (
|
3310 | null == value ||
|
3311 | "symbol" === typeof value ||
|
3312 | "boolean" === typeof value
|
3313 | ) {
|
3314 | domElement.removeAttribute(key);
|
3315 | break;
|
3316 | }
|
3317 | value = sanitizeURL("" + value);
|
3318 | domElement.setAttribute(key, value);
|
3319 | break;
|
3320 | case "onClick":
|
3321 | null != value && (domElement.onclick = noop$3);
|
3322 | break;
|
3323 | case "onScroll":
|
3324 | null != value && listenToNonDelegatedEvent("scroll", domElement);
|
3325 | break;
|
3326 | case "onScrollEnd":
|
3327 | null != value && listenToNonDelegatedEvent("scrollend", domElement);
|
3328 | break;
|
3329 | case "dangerouslySetInnerHTML":
|
3330 | if (null != value) {
|
3331 | if ("object" !== typeof value || !("__html" in value))
|
3332 | throw Error(formatProdErrorMessage(61));
|
3333 | key = value.__html;
|
3334 | if (null != key) {
|
3335 | if (null != props.children) throw Error(formatProdErrorMessage(60));
|
3336 | domElement.innerHTML = key;
|
3337 | }
|
3338 | }
|
3339 | break;
|
3340 | case "multiple":
|
3341 | domElement.multiple =
|
3342 | value && "function" !== typeof value && "symbol" !== typeof value;
|
3343 | break;
|
3344 | case "muted":
|
3345 | domElement.muted =
|
3346 | value && "function" !== typeof value && "symbol" !== typeof value;
|
3347 | break;
|
3348 | case "suppressContentEditableWarning":
|
3349 | case "suppressHydrationWarning":
|
3350 | case "defaultValue":
|
3351 | case "defaultChecked":
|
3352 | case "innerHTML":
|
3353 | case "ref":
|
3354 | break;
|
3355 | case "autoFocus":
|
3356 | break;
|
3357 | case "xlinkHref":
|
3358 | if (
|
3359 | null == value ||
|
3360 | "function" === typeof value ||
|
3361 | "boolean" === typeof value ||
|
3362 | "symbol" === typeof value
|
3363 | ) {
|
3364 | domElement.removeAttribute("xlink:href");
|
3365 | break;
|
3366 | }
|
3367 | key = sanitizeURL("" + value);
|
3368 | domElement.setAttributeNS(
|
3369 | "http://www.w3.org/1999/xlink",
|
3370 | "xlink:href",
|
3371 | key
|
3372 | );
|
3373 | break;
|
3374 | case "contentEditable":
|
3375 | case "spellCheck":
|
3376 | case "draggable":
|
3377 | case "value":
|
3378 | case "autoReverse":
|
3379 | case "externalResourcesRequired":
|
3380 | case "focusable":
|
3381 | case "preserveAlpha":
|
3382 | null != value && "function" !== typeof value && "symbol" !== typeof value
|
3383 | ? domElement.setAttribute(key, "" + value)
|
3384 | : domElement.removeAttribute(key);
|
3385 | break;
|
3386 | case "inert":
|
3387 | case "allowFullScreen":
|
3388 | case "async":
|
3389 | case "autoPlay":
|
3390 | case "controls":
|
3391 | case "default":
|
3392 | case "defer":
|
3393 | case "disabled":
|
3394 | case "disablePictureInPicture":
|
3395 | case "disableRemotePlayback":
|
3396 | case "formNoValidate":
|
3397 | case "hidden":
|
3398 | case "loop":
|
3399 | case "noModule":
|
3400 | case "noValidate":
|
3401 | case "open":
|
3402 | case "playsInline":
|
3403 | case "readOnly":
|
3404 | case "required":
|
3405 | case "reversed":
|
3406 | case "scoped":
|
3407 | case "seamless":
|
3408 | case "itemScope":
|
3409 | value && "function" !== typeof value && "symbol" !== typeof value
|
3410 | ? domElement.setAttribute(key, "")
|
3411 | : domElement.removeAttribute(key);
|
3412 | break;
|
3413 | case "capture":
|
3414 | case "download":
|
3415 | !0 === value
|
3416 | ? domElement.setAttribute(key, "")
|
3417 | : !1 !== value &&
|
3418 | null != value &&
|
3419 | "function" !== typeof value &&
|
3420 | "symbol" !== typeof value
|
3421 | ? domElement.setAttribute(key, value)
|
3422 | : domElement.removeAttribute(key);
|
3423 | break;
|
3424 | case "cols":
|
3425 | case "rows":
|
3426 | case "size":
|
3427 | case "span":
|
3428 | null != value &&
|
3429 | "function" !== typeof value &&
|
3430 | "symbol" !== typeof value &&
|
3431 | !isNaN(value) &&
|
3432 | 1 <= value
|
3433 | ? domElement.setAttribute(key, value)
|
3434 | : domElement.removeAttribute(key);
|
3435 | break;
|
3436 | case "rowSpan":
|
3437 | case "start":
|
3438 | null == value ||
|
3439 | "function" === typeof value ||
|
3440 | "symbol" === typeof value ||
|
3441 | isNaN(value)
|
3442 | ? domElement.removeAttribute(key)
|
3443 | : domElement.setAttribute(key, value);
|
3444 | break;
|
3445 | case "xlinkActuate":
|
3446 | setValueForNamespacedAttribute(
|
3447 | domElement,
|
3448 | "http://www.w3.org/1999/xlink",
|
3449 | "xlink:actuate",
|
3450 | value
|
3451 | );
|
3452 | break;
|
3453 | case "xlinkArcrole":
|
3454 | setValueForNamespacedAttribute(
|
3455 | domElement,
|
3456 | "http://www.w3.org/1999/xlink",
|
3457 | "xlink:arcrole",
|
3458 | value
|
3459 | );
|
3460 | break;
|
3461 | case "xlinkRole":
|
3462 | setValueForNamespacedAttribute(
|
3463 | domElement,
|
3464 | "http://www.w3.org/1999/xlink",
|
3465 | "xlink:role",
|
3466 | value
|
3467 | );
|
3468 | break;
|
3469 | case "xlinkShow":
|
3470 | setValueForNamespacedAttribute(
|
3471 | domElement,
|
3472 | "http://www.w3.org/1999/xlink",
|
3473 | "xlink:show",
|
3474 | value
|
3475 | );
|
3476 | break;
|
3477 | case "xlinkTitle":
|
3478 | setValueForNamespacedAttribute(
|
3479 | domElement,
|
3480 | "http://www.w3.org/1999/xlink",
|
3481 | "xlink:title",
|
3482 | value
|
3483 | );
|
3484 | break;
|
3485 | case "xlinkType":
|
3486 | setValueForNamespacedAttribute(
|
3487 | domElement,
|
3488 | "http://www.w3.org/1999/xlink",
|
3489 | "xlink:type",
|
3490 | value
|
3491 | );
|
3492 | break;
|
3493 | case "xmlBase":
|
3494 | setValueForNamespacedAttribute(
|
3495 | domElement,
|
3496 | "http://www.w3.org/XML/1998/namespace",
|
3497 | "xml:base",
|
3498 | value
|
3499 | );
|
3500 | break;
|
3501 | case "xmlLang":
|
3502 | setValueForNamespacedAttribute(
|
3503 | domElement,
|
3504 | "http://www.w3.org/XML/1998/namespace",
|
3505 | "xml:lang",
|
3506 | value
|
3507 | );
|
3508 | break;
|
3509 | case "xmlSpace":
|
3510 | setValueForNamespacedAttribute(
|
3511 | domElement,
|
3512 | "http://www.w3.org/XML/1998/namespace",
|
3513 | "xml:space",
|
3514 | value
|
3515 | );
|
3516 | break;
|
3517 | case "is":
|
3518 | setValueForAttribute(domElement, "is", value);
|
3519 | break;
|
3520 | case "innerText":
|
3521 | case "textContent":
|
3522 | break;
|
3523 | default:
|
3524 | if (
|
3525 | !(2 < key.length) ||
|
3526 | ("o" !== key[0] && "O" !== key[0]) ||
|
3527 | ("n" !== key[1] && "N" !== key[1])
|
3528 | )
|
3529 | (key = aliases.get(key) || key),
|
3530 | setValueForAttribute(domElement, key, value);
|
3531 | }
|
3532 | }
|
3533 | function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
|
3534 | switch (key) {
|
3535 | case "style":
|
3536 | setValueForStyles(domElement, value, prevValue);
|
3537 | break;
|
3538 | case "dangerouslySetInnerHTML":
|
3539 | if (null != value) {
|
3540 | if ("object" !== typeof value || !("__html" in value))
|
3541 | throw Error(formatProdErrorMessage(61));
|
3542 | key = value.__html;
|
3543 | if (null != key) {
|
3544 | if (null != props.children) throw Error(formatProdErrorMessage(60));
|
3545 | domElement.innerHTML = key;
|
3546 | }
|
3547 | }
|
3548 | break;
|
3549 | case "children":
|
3550 | "string" === typeof value
|
3551 | ? setTextContent(domElement, value)
|
3552 | : ("number" === typeof value || "bigint" === typeof value) &&
|
3553 | setTextContent(domElement, "" + value);
|
3554 | break;
|
3555 | case "onScroll":
|
3556 | null != value && listenToNonDelegatedEvent("scroll", domElement);
|
3557 | break;
|
3558 | case "onScrollEnd":
|
3559 | null != value && listenToNonDelegatedEvent("scrollend", domElement);
|
3560 | break;
|
3561 | case "onClick":
|
3562 | null != value && (domElement.onclick = noop$3);
|
3563 | break;
|
3564 | case "suppressContentEditableWarning":
|
3565 | case "suppressHydrationWarning":
|
3566 | case "innerHTML":
|
3567 | case "ref":
|
3568 | break;
|
3569 | case "innerText":
|
3570 | case "textContent":
|
3571 | break;
|
3572 | default:
|
3573 | if (!registrationNameDependencies.hasOwnProperty(key))
|
3574 | a: {
|
3575 | if (
|
3576 | "o" === key[0] &&
|
3577 | "n" === key[1] &&
|
3578 | ((props = key.endsWith("Capture")),
|
3579 | (tag = key.slice(2, props ? key.length - 7 : void 0)),
|
3580 | (prevValue = domElement[internalPropsKey] || null),
|
3581 | (prevValue = null != prevValue ? prevValue[key] : null),
|
3582 | "function" === typeof prevValue &&
|
3583 | domElement.removeEventListener(tag, prevValue, props),
|
3584 | "function" === typeof value)
|
3585 | ) {
|
3586 | "function" !== typeof prevValue &&
|
3587 | null !== prevValue &&
|
3588 | (key in domElement
|
3589 | ? (domElement[key] = null)
|
3590 | : domElement.hasAttribute(key) &&
|
3591 | domElement.removeAttribute(key));
|
3592 | domElement.addEventListener(tag, value, props);
|
3593 | break a;
|
3594 | }
|
3595 | key in domElement
|
3596 | ? (domElement[key] = value)
|
3597 | : !0 === value
|
3598 | ? domElement.setAttribute(key, "")
|
3599 | : setValueForAttribute(domElement, key, value);
|
3600 | }
|
3601 | }
|
3602 | }
|
3603 | function setInitialProperties(domElement, tag, props) {
|
3604 | switch (tag) {
|
3605 | case "div":
|
3606 | case "span":
|
3607 | case "svg":
|
3608 | case "path":
|
3609 | case "a":
|
3610 | case "g":
|
3611 | case "p":
|
3612 | case "li":
|
3613 | break;
|
3614 | case "input":
|
3615 | listenToNonDelegatedEvent("invalid", domElement);
|
3616 | var name = null,
|
3617 | type = null,
|
3618 | value = null,
|
3619 | defaultValue = null,
|
3620 | checked = null,
|
3621 | defaultChecked = null;
|
3622 | for (propKey in props)
|
3623 | if (props.hasOwnProperty(propKey)) {
|
3624 | var propValue = props[propKey];
|
3625 | if (null != propValue)
|
3626 | switch (propKey) {
|
3627 | case "name":
|
3628 | name = propValue;
|
3629 | break;
|
3630 | case "type":
|
3631 | type = propValue;
|
3632 | break;
|
3633 | case "checked":
|
3634 | checked = propValue;
|
3635 | break;
|
3636 | case "defaultChecked":
|
3637 | defaultChecked = propValue;
|
3638 | break;
|
3639 | case "value":
|
3640 | value = propValue;
|
3641 | break;
|
3642 | case "defaultValue":
|
3643 | defaultValue = propValue;
|
3644 | break;
|
3645 | case "children":
|
3646 | case "dangerouslySetInnerHTML":
|
3647 | if (null != propValue)
|
3648 | throw Error(formatProdErrorMessage(137, tag));
|
3649 | break;
|
3650 | default:
|
3651 | setProp(domElement, tag, propKey, propValue, props, null);
|
3652 | }
|
3653 | }
|
3654 | initInput(
|
3655 | domElement,
|
3656 | value,
|
3657 | defaultValue,
|
3658 | checked,
|
3659 | defaultChecked,
|
3660 | type,
|
3661 | name,
|
3662 | !1
|
3663 | );
|
3664 | track(domElement);
|
3665 | return;
|
3666 | case "select":
|
3667 | listenToNonDelegatedEvent("invalid", domElement);
|
3668 | var propKey = (type = value = null);
|
3669 | for (name in props)
|
3670 | if (
|
3671 | props.hasOwnProperty(name) &&
|
3672 | ((defaultValue = props[name]), null != defaultValue)
|
3673 | )
|
3674 | switch (name) {
|
3675 | case "value":
|
3676 | value = defaultValue;
|
3677 | break;
|
3678 | case "defaultValue":
|
3679 | type = defaultValue;
|
3680 | break;
|
3681 | case "multiple":
|
3682 | propKey = defaultValue;
|
3683 | default:
|
3684 | setProp(domElement, tag, name, defaultValue, props, null);
|
3685 | }
|
3686 | tag = value;
|
3687 | props = type;
|
3688 | domElement.multiple = !!propKey;
|
3689 | null != tag
|
3690 | ? updateOptions(domElement, !!propKey, tag, !1)
|
3691 | : null != props && updateOptions(domElement, !!propKey, props, !0);
|
3692 | return;
|
3693 | case "textarea":
|
3694 | listenToNonDelegatedEvent("invalid", domElement);
|
3695 | value = name = propKey = null;
|
3696 | for (type in props)
|
3697 | if (
|
3698 | props.hasOwnProperty(type) &&
|
3699 | ((defaultValue = props[type]), null != defaultValue)
|
3700 | )
|
3701 | switch (type) {
|
3702 | case "value":
|
3703 | propKey = defaultValue;
|
3704 | break;
|
3705 | case "defaultValue":
|
3706 | name = defaultValue;
|
3707 | break;
|
3708 | case "children":
|
3709 | value = defaultValue;
|
3710 | break;
|
3711 | case "dangerouslySetInnerHTML":
|
3712 | if (null != defaultValue) throw Error(formatProdErrorMessage(91));
|
3713 | break;
|
3714 | default:
|
3715 | setProp(domElement, tag, type, defaultValue, props, null);
|
3716 | }
|
3717 | initTextarea(domElement, propKey, name, value);
|
3718 | track(domElement);
|
3719 | return;
|
3720 | case "option":
|
3721 | for (defaultValue in props)
|
3722 | if (
|
3723 | props.hasOwnProperty(defaultValue) &&
|
3724 | ((propKey = props[defaultValue]), null != propKey)
|
3725 | )
|
3726 | switch (defaultValue) {
|
3727 | case "selected":
|
3728 | domElement.selected =
|
3729 | propKey &&
|
3730 | "function" !== typeof propKey &&
|
3731 | "symbol" !== typeof propKey;
|
3732 | break;
|
3733 | default:
|
3734 | setProp(domElement, tag, defaultValue, propKey, props, null);
|
3735 | }
|
3736 | return;
|
3737 | case "dialog":
|
3738 | listenToNonDelegatedEvent("cancel", domElement);
|
3739 | listenToNonDelegatedEvent("close", domElement);
|
3740 | break;
|
3741 | case "iframe":
|
3742 | case "object":
|
3743 | listenToNonDelegatedEvent("load", domElement);
|
3744 | break;
|
3745 | case "video":
|
3746 | case "audio":
|
3747 | for (propKey = 0; propKey < mediaEventTypes.length; propKey++)
|
3748 | listenToNonDelegatedEvent(mediaEventTypes[propKey], domElement);
|
3749 | break;
|
3750 | case "image":
|
3751 | listenToNonDelegatedEvent("error", domElement);
|
3752 | listenToNonDelegatedEvent("load", domElement);
|
3753 | break;
|
3754 | case "details":
|
3755 | listenToNonDelegatedEvent("toggle", domElement);
|
3756 | break;
|
3757 | case "embed":
|
3758 | case "source":
|
3759 | case "img":
|
3760 | case "link":
|
3761 | listenToNonDelegatedEvent("error", domElement),
|
3762 | listenToNonDelegatedEvent("load", domElement);
|
3763 | case "area":
|
3764 | case "base":
|
3765 | case "br":
|
3766 | case "col":
|
3767 | case "hr":
|
3768 | case "keygen":
|
3769 | case "meta":
|
3770 | case "param":
|
3771 | case "track":
|
3772 | case "wbr":
|
3773 | case "menuitem":
|
3774 | for (checked in props)
|
3775 | if (
|
3776 | props.hasOwnProperty(checked) &&
|
3777 | ((propKey = props[checked]), null != propKey)
|
3778 | )
|
3779 | switch (checked) {
|
3780 | case "children":
|
3781 | case "dangerouslySetInnerHTML":
|
3782 | throw Error(formatProdErrorMessage(137, tag));
|
3783 | default:
|
3784 | setProp(domElement, tag, checked, propKey, props, null);
|
3785 | }
|
3786 | return;
|
3787 | default:
|
3788 | if (isCustomElement(tag)) {
|
3789 | for (defaultChecked in props)
|
3790 | props.hasOwnProperty(defaultChecked) &&
|
3791 | ((propKey = props[defaultChecked]),
|
3792 | void 0 !== propKey &&
|
3793 | setPropOnCustomElement(
|
3794 | domElement,
|
3795 | tag,
|
3796 | defaultChecked,
|
3797 | propKey,
|
3798 | props,
|
3799 | void 0
|
3800 | ));
|
3801 | return;
|
3802 | }
|
3803 | }
|
3804 | for (value in props)
|
3805 | props.hasOwnProperty(value) &&
|
3806 | ((propKey = props[value]),
|
3807 | null != propKey && setProp(domElement, tag, value, propKey, props, null));
|
3808 | }
|
3809 | function updateProperties(domElement, tag, lastProps, nextProps) {
|
3810 | switch (tag) {
|
3811 | case "div":
|
3812 | case "span":
|
3813 | case "svg":
|
3814 | case "path":
|
3815 | case "a":
|
3816 | case "g":
|
3817 | case "p":
|
3818 | case "li":
|
3819 | break;
|
3820 | case "input":
|
3821 | var name = null,
|
3822 | type = null,
|
3823 | value = null,
|
3824 | defaultValue = null,
|
3825 | lastDefaultValue = null,
|
3826 | checked = null,
|
3827 | defaultChecked = null;
|
3828 | for (propKey in lastProps) {
|
3829 | var lastProp = lastProps[propKey];
|
3830 | if (lastProps.hasOwnProperty(propKey) && null != lastProp)
|
3831 | switch (propKey) {
|
3832 | case "checked":
|
3833 | break;
|
3834 | case "value":
|
3835 | break;
|
3836 | case "defaultValue":
|
3837 | lastDefaultValue = lastProp;
|
3838 | default:
|
3839 | nextProps.hasOwnProperty(propKey) ||
|
3840 | setProp(domElement, tag, propKey, null, nextProps, lastProp);
|
3841 | }
|
3842 | }
|
3843 | for (var propKey$46 in nextProps) {
|
3844 | var propKey = nextProps[propKey$46];
|
3845 | lastProp = lastProps[propKey$46];
|
3846 | if (
|
3847 | nextProps.hasOwnProperty(propKey$46) &&
|
3848 | (null != propKey || null != lastProp)
|
3849 | )
|
3850 | switch (propKey$46) {
|
3851 | case "type":
|
3852 | type = propKey;
|
3853 | break;
|
3854 | case "name":
|
3855 | name = propKey;
|
3856 | break;
|
3857 | case "checked":
|
3858 | checked = propKey;
|
3859 | break;
|
3860 | case "defaultChecked":
|
3861 | defaultChecked = propKey;
|
3862 | break;
|
3863 | case "value":
|
3864 | value = propKey;
|
3865 | break;
|
3866 | case "defaultValue":
|
3867 | defaultValue = propKey;
|
3868 | break;
|
3869 | case "children":
|
3870 | case "dangerouslySetInnerHTML":
|
3871 | if (null != propKey)
|
3872 | throw Error(formatProdErrorMessage(137, tag));
|
3873 | break;
|
3874 | default:
|
3875 | propKey !== lastProp &&
|
3876 | setProp(
|
3877 | domElement,
|
3878 | tag,
|
3879 | propKey$46,
|
3880 | propKey,
|
3881 | nextProps,
|
3882 | lastProp
|
3883 | );
|
3884 | }
|
3885 | }
|
3886 | updateInput(
|
3887 | domElement,
|
3888 | value,
|
3889 | defaultValue,
|
3890 | lastDefaultValue,
|
3891 | checked,
|
3892 | defaultChecked,
|
3893 | type,
|
3894 | name
|
3895 | );
|
3896 | return;
|
3897 | case "select":
|
3898 | propKey = value = defaultValue = propKey$46 = null;
|
3899 | for (type in lastProps)
|
3900 | if (
|
3901 | ((lastDefaultValue = lastProps[type]),
|
3902 | lastProps.hasOwnProperty(type) && null != lastDefaultValue)
|
3903 | )
|
3904 | switch (type) {
|
3905 | case "value":
|
3906 | break;
|
3907 | case "multiple":
|
3908 | propKey = lastDefaultValue;
|
3909 | default:
|
3910 | nextProps.hasOwnProperty(type) ||
|
3911 | setProp(
|
3912 | domElement,
|
3913 | tag,
|
3914 | type,
|
3915 | null,
|
3916 | nextProps,
|
3917 | lastDefaultValue
|
3918 | );
|
3919 | }
|
3920 | for (name in nextProps)
|
3921 | if (
|
3922 | ((type = nextProps[name]),
|
3923 | (lastDefaultValue = lastProps[name]),
|
3924 | nextProps.hasOwnProperty(name) &&
|
3925 | (null != type || null != lastDefaultValue))
|
3926 | )
|
3927 | switch (name) {
|
3928 | case "value":
|
3929 | propKey$46 = type;
|
3930 | break;
|
3931 | case "defaultValue":
|
3932 | defaultValue = type;
|
3933 | break;
|
3934 | case "multiple":
|
3935 | value = type;
|
3936 | default:
|
3937 | type !== lastDefaultValue &&
|
3938 | setProp(
|
3939 | domElement,
|
3940 | tag,
|
3941 | name,
|
3942 | type,
|
3943 | nextProps,
|
3944 | lastDefaultValue
|
3945 | );
|
3946 | }
|
3947 | tag = defaultValue;
|
3948 | lastProps = value;
|
3949 | nextProps = propKey;
|
3950 | null != propKey$46
|
3951 | ? updateOptions(domElement, !!lastProps, propKey$46, !1)
|
3952 | : !!nextProps !== !!lastProps &&
|
3953 | (null != tag
|
3954 | ? updateOptions(domElement, !!lastProps, tag, !0)
|
3955 | : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1));
|
3956 | return;
|
3957 | case "textarea":
|
3958 | propKey = propKey$46 = null;
|
3959 | for (defaultValue in lastProps)
|
3960 | if (
|
3961 | ((name = lastProps[defaultValue]),
|
3962 | lastProps.hasOwnProperty(defaultValue) &&
|
3963 | null != name &&
|
3964 | !nextProps.hasOwnProperty(defaultValue))
|
3965 | )
|
3966 | switch (defaultValue) {
|
3967 | case "value":
|
3968 | break;
|
3969 | case "children":
|
3970 | break;
|
3971 | default:
|
3972 | setProp(domElement, tag, defaultValue, null, nextProps, name);
|
3973 | }
|
3974 | for (value in nextProps)
|
3975 | if (
|
3976 | ((name = nextProps[value]),
|
3977 | (type = lastProps[value]),
|
3978 | nextProps.hasOwnProperty(value) && (null != name || null != type))
|
3979 | )
|
3980 | switch (value) {
|
3981 | case "value":
|
3982 | propKey$46 = name;
|
3983 | break;
|
3984 | case "defaultValue":
|
3985 | propKey = name;
|
3986 | break;
|
3987 | case "children":
|
3988 | break;
|
3989 | case "dangerouslySetInnerHTML":
|
3990 | if (null != name) throw Error(formatProdErrorMessage(91));
|
3991 | break;
|
3992 | default:
|
3993 | name !== type &&
|
3994 | setProp(domElement, tag, value, name, nextProps, type);
|
3995 | }
|
3996 | updateTextarea(domElement, propKey$46, propKey);
|
3997 | return;
|
3998 | case "option":
|
3999 | for (var propKey$62 in lastProps)
|
4000 | if (
|
4001 | ((propKey$46 = lastProps[propKey$62]),
|
4002 | lastProps.hasOwnProperty(propKey$62) &&
|
4003 | null != propKey$46 &&
|
4004 | !nextProps.hasOwnProperty(propKey$62))
|
4005 | )
|
4006 | switch (propKey$62) {
|
4007 | case "selected":
|
4008 | domElement.selected = !1;
|
4009 | break;
|
4010 | default:
|
4011 | setProp(domElement, tag, propKey$62, null, nextProps, propKey$46);
|
4012 | }
|
4013 | for (lastDefaultValue in nextProps)
|
4014 | if (
|
4015 | ((propKey$46 = nextProps[lastDefaultValue]),
|
4016 | (propKey = lastProps[lastDefaultValue]),
|
4017 | nextProps.hasOwnProperty(lastDefaultValue) &&
|
4018 | propKey$46 !== propKey &&
|
4019 | (null != propKey$46 || null != propKey))
|
4020 | )
|
4021 | switch (lastDefaultValue) {
|
4022 | case "selected":
|
4023 | domElement.selected =
|
4024 | propKey$46 &&
|
4025 | "function" !== typeof propKey$46 &&
|
4026 | "symbol" !== typeof propKey$46;
|
4027 | break;
|
4028 | default:
|
4029 | setProp(
|
4030 | domElement,
|
4031 | tag,
|
4032 | lastDefaultValue,
|
4033 | propKey$46,
|
4034 | nextProps,
|
4035 | propKey
|
4036 | );
|
4037 | }
|
4038 | return;
|
4039 | case "img":
|
4040 | case "link":
|
4041 | case "area":
|
4042 | case "base":
|
4043 | case "br":
|
4044 | case "col":
|
4045 | case "embed":
|
4046 | case "hr":
|
4047 | case "keygen":
|
4048 | case "meta":
|
4049 | case "param":
|
4050 | case "source":
|
4051 | case "track":
|
4052 | case "wbr":
|
4053 | case "menuitem":
|
4054 | for (var propKey$67 in lastProps)
|
4055 | (propKey$46 = lastProps[propKey$67]),
|
4056 | lastProps.hasOwnProperty(propKey$67) &&
|
4057 | null != propKey$46 &&
|
4058 | !nextProps.hasOwnProperty(propKey$67) &&
|
4059 | setProp(domElement, tag, propKey$67, null, nextProps, propKey$46);
|
4060 | for (checked in nextProps)
|
4061 | if (
|
4062 | ((propKey$46 = nextProps[checked]),
|
4063 | (propKey = lastProps[checked]),
|
4064 | nextProps.hasOwnProperty(checked) &&
|
4065 | propKey$46 !== propKey &&
|
4066 | (null != propKey$46 || null != propKey))
|
4067 | )
|
4068 | switch (checked) {
|
4069 | case "children":
|
4070 | case "dangerouslySetInnerHTML":
|
4071 | if (null != propKey$46)
|
4072 | throw Error(formatProdErrorMessage(137, tag));
|
4073 | break;
|
4074 | default:
|
4075 | setProp(domElement, tag, checked, propKey$46, nextProps, propKey);
|
4076 | }
|
4077 | return;
|
4078 | default:
|
4079 | if (isCustomElement(tag)) {
|
4080 | for (var propKey$72 in lastProps)
|
4081 | (propKey$46 = lastProps[propKey$72]),
|
4082 | lastProps.hasOwnProperty(propKey$72) &&
|
4083 | void 0 !== propKey$46 &&
|
4084 | !nextProps.hasOwnProperty(propKey$72) &&
|
4085 | setPropOnCustomElement(
|
4086 | domElement,
|
4087 | tag,
|
4088 | propKey$72,
|
4089 | void 0,
|
4090 | nextProps,
|
4091 | propKey$46
|
4092 | );
|
4093 | for (defaultChecked in nextProps)
|
4094 | (propKey$46 = nextProps[defaultChecked]),
|
4095 | (propKey = lastProps[defaultChecked]),
|
4096 | !nextProps.hasOwnProperty(defaultChecked) ||
|
4097 | propKey$46 === propKey ||
|
4098 | (void 0 === propKey$46 && void 0 === propKey) ||
|
4099 | setPropOnCustomElement(
|
4100 | domElement,
|
4101 | tag,
|
4102 | defaultChecked,
|
4103 | propKey$46,
|
4104 | nextProps,
|
4105 | propKey
|
4106 | );
|
4107 | return;
|
4108 | }
|
4109 | }
|
4110 | for (var propKey$77 in lastProps)
|
4111 | (propKey$46 = lastProps[propKey$77]),
|
4112 | lastProps.hasOwnProperty(propKey$77) &&
|
4113 | null != propKey$46 &&
|
4114 | !nextProps.hasOwnProperty(propKey$77) &&
|
4115 | setProp(domElement, tag, propKey$77, null, nextProps, propKey$46);
|
4116 | for (lastProp in nextProps)
|
4117 | (propKey$46 = nextProps[lastProp]),
|
4118 | (propKey = lastProps[lastProp]),
|
4119 | !nextProps.hasOwnProperty(lastProp) ||
|
4120 | propKey$46 === propKey ||
|
4121 | (null == propKey$46 && null == propKey) ||
|
4122 | setProp(domElement, tag, lastProp, propKey$46, nextProps, propKey);
|
4123 | }
|
4124 | var concurrentQueues = [],
|
4125 | concurrentQueuesIndex = 0,
|
4126 | concurrentlyUpdatedLanes = 0;
|
4127 | function finishQueueingConcurrentUpdates() {
|
4128 | for (
|
4129 | var endIndex = concurrentQueuesIndex,
|
4130 | i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);
|
4131 | i < endIndex;
|
4132 |
|
4133 | ) {
|
4134 | var fiber = concurrentQueues[i];
|
4135 | concurrentQueues[i++] = null;
|
4136 | var queue = concurrentQueues[i];
|
4137 | concurrentQueues[i++] = null;
|
4138 | var update = concurrentQueues[i];
|
4139 | concurrentQueues[i++] = null;
|
4140 | var lane = concurrentQueues[i];
|
4141 | concurrentQueues[i++] = null;
|
4142 | if (null !== queue && null !== update) {
|
4143 | var pending = queue.pending;
|
4144 | null === pending
|
4145 | ? (update.next = update)
|
4146 | : ((update.next = pending.next), (pending.next = update));
|
4147 | queue.pending = update;
|
4148 | }
|
4149 | 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
|
4150 | }
|
4151 | }
|
4152 | function enqueueUpdate$1(fiber, queue, update, lane) {
|
4153 | concurrentQueues[concurrentQueuesIndex++] = fiber;
|
4154 | concurrentQueues[concurrentQueuesIndex++] = queue;
|
4155 | concurrentQueues[concurrentQueuesIndex++] = update;
|
4156 | concurrentQueues[concurrentQueuesIndex++] = lane;
|
4157 | concurrentlyUpdatedLanes |= lane;
|
4158 | fiber.lanes |= lane;
|
4159 | fiber = fiber.alternate;
|
4160 | null !== fiber && (fiber.lanes |= lane);
|
4161 | }
|
4162 | function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
|
4163 | enqueueUpdate$1(fiber, queue, update, lane);
|
4164 | return getRootForUpdatedFiber(fiber);
|
4165 | }
|
4166 | function enqueueConcurrentRenderForLane(fiber, lane) {
|
4167 | enqueueUpdate$1(fiber, null, null, lane);
|
4168 | return getRootForUpdatedFiber(fiber);
|
4169 | }
|
4170 | function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
|
4171 | sourceFiber.lanes |= lane;
|
4172 | var alternate = sourceFiber.alternate;
|
4173 | null !== alternate && (alternate.lanes |= lane);
|
4174 | for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )
|
4175 | (parent.childLanes |= lane),
|
4176 | (alternate = parent.alternate),
|
4177 | null !== alternate && (alternate.childLanes |= lane),
|
4178 | 22 === parent.tag &&
|
4179 | ((sourceFiber = parent.stateNode),
|
4180 | null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),
|
4181 | (sourceFiber = parent),
|
4182 | (parent = parent.return);
|
4183 | isHidden &&
|
4184 | null !== update &&
|
4185 | 3 === sourceFiber.tag &&
|
4186 | ((parent = sourceFiber.stateNode),
|
4187 | (isHidden = 31 - clz32(lane)),
|
4188 | (parent = parent.hiddenUpdates),
|
4189 | (sourceFiber = parent[isHidden]),
|
4190 | null === sourceFiber
|
4191 | ? (parent[isHidden] = [update])
|
4192 | : sourceFiber.push(update),
|
4193 | (update.lane = lane | 536870912));
|
4194 | }
|
4195 | function getRootForUpdatedFiber(sourceFiber) {
|
4196 | throwIfInfiniteUpdateLoopDetected();
|
4197 | for (var parent = sourceFiber.return; null !== parent; )
|
4198 | (sourceFiber = parent), (parent = sourceFiber.return);
|
4199 | return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;
|
4200 | }
|
4201 | var emptyContextObject = {},
|
4202 | CapturedStacks = new WeakMap();
|
4203 | function createCapturedValueAtFiber(value, source) {
|
4204 | if ("object" === typeof value && null !== value) {
|
4205 | var stack = CapturedStacks.get(value);
|
4206 | "string" !== typeof stack &&
|
4207 | ((stack = getStackByFiberInDevAndProd(source)),
|
4208 | CapturedStacks.set(value, stack));
|
4209 | } else stack = getStackByFiberInDevAndProd(source);
|
4210 | return { value: value, source: source, stack: stack };
|
4211 | }
|
4212 | var forkStack = [],
|
4213 | forkStackIndex = 0,
|
4214 | treeForkProvider = null,
|
4215 | treeForkCount = 0,
|
4216 | idStack = [],
|
4217 | idStackIndex = 0,
|
4218 | treeContextProvider = null,
|
4219 | treeContextId = 1,
|
4220 | treeContextOverflow = "";
|
4221 | function pushTreeFork(workInProgress, totalChildren) {
|
4222 | forkStack[forkStackIndex++] = treeForkCount;
|
4223 | forkStack[forkStackIndex++] = treeForkProvider;
|
4224 | treeForkProvider = workInProgress;
|
4225 | treeForkCount = totalChildren;
|
4226 | }
|
4227 | function pushTreeId(workInProgress, totalChildren, index) {
|
4228 | idStack[idStackIndex++] = treeContextId;
|
4229 | idStack[idStackIndex++] = treeContextOverflow;
|
4230 | idStack[idStackIndex++] = treeContextProvider;
|
4231 | treeContextProvider = workInProgress;
|
4232 | var baseIdWithLeadingBit = treeContextId;
|
4233 | workInProgress = treeContextOverflow;
|
4234 | var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
|
4235 | baseIdWithLeadingBit &= ~(1 << baseLength);
|
4236 | index += 1;
|
4237 | var length = 32 - clz32(totalChildren) + baseLength;
|
4238 | if (30 < length) {
|
4239 | var numberOfOverflowBits = baseLength - (baseLength % 5);
|
4240 | length = (
|
4241 | baseIdWithLeadingBit &
|
4242 | ((1 << numberOfOverflowBits) - 1)
|
4243 | ).toString(32);
|
4244 | baseIdWithLeadingBit >>= numberOfOverflowBits;
|
4245 | baseLength -= numberOfOverflowBits;
|
4246 | treeContextId =
|
4247 | (1 << (32 - clz32(totalChildren) + baseLength)) |
|
4248 | (index << baseLength) |
|
4249 | baseIdWithLeadingBit;
|
4250 | treeContextOverflow = length + workInProgress;
|
4251 | } else
|
4252 | (treeContextId =
|
4253 | (1 << length) | (index << baseLength) | baseIdWithLeadingBit),
|
4254 | (treeContextOverflow = workInProgress);
|
4255 | }
|
4256 | function pushMaterializedTreeId(workInProgress) {
|
4257 | null !== workInProgress.return &&
|
4258 | (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
|
4259 | }
|
4260 | function popTreeContext(workInProgress) {
|
4261 | for (; workInProgress === treeForkProvider; )
|
4262 | (treeForkProvider = forkStack[--forkStackIndex]),
|
4263 | (forkStack[forkStackIndex] = null),
|
4264 | (treeForkCount = forkStack[--forkStackIndex]),
|
4265 | (forkStack[forkStackIndex] = null);
|
4266 | for (; workInProgress === treeContextProvider; )
|
4267 | (treeContextProvider = idStack[--idStackIndex]),
|
4268 | (idStack[idStackIndex] = null),
|
4269 | (treeContextOverflow = idStack[--idStackIndex]),
|
4270 | (idStack[idStackIndex] = null),
|
4271 | (treeContextId = idStack[--idStackIndex]),
|
4272 | (idStack[idStackIndex] = null);
|
4273 | }
|
4274 | var hydrationParentFiber = null,
|
4275 | nextHydratableInstance = null,
|
4276 | isHydrating = !1,
|
4277 | hydrationErrors = null,
|
4278 | rootOrSingletonContext = !1,
|
4279 | HydrationMismatchException = Error(formatProdErrorMessage(519));
|
4280 | function throwOnHydrationMismatch(fiber) {
|
4281 | var error = Error(formatProdErrorMessage(418, ""));
|
4282 | queueHydrationError(createCapturedValueAtFiber(error, fiber));
|
4283 | throw HydrationMismatchException;
|
4284 | }
|
4285 | function prepareToHydrateHostInstance(fiber) {
|
4286 | var instance = fiber.stateNode,
|
4287 | type = fiber.type,
|
4288 | props = fiber.memoizedProps;
|
4289 | instance[internalInstanceKey] = fiber;
|
4290 | instance[internalPropsKey] = props;
|
4291 | switch (type) {
|
4292 | case "dialog":
|
4293 | listenToNonDelegatedEvent("cancel", instance);
|
4294 | listenToNonDelegatedEvent("close", instance);
|
4295 | break;
|
4296 | case "iframe":
|
4297 | case "object":
|
4298 | case "embed":
|
4299 | listenToNonDelegatedEvent("load", instance);
|
4300 | break;
|
4301 | case "video":
|
4302 | case "audio":
|
4303 | for (type = 0; type < mediaEventTypes.length; type++)
|
4304 | listenToNonDelegatedEvent(mediaEventTypes[type], instance);
|
4305 | break;
|
4306 | case "source":
|
4307 | listenToNonDelegatedEvent("error", instance);
|
4308 | break;
|
4309 | case "img":
|
4310 | case "image":
|
4311 | case "link":
|
4312 | listenToNonDelegatedEvent("error", instance);
|
4313 | listenToNonDelegatedEvent("load", instance);
|
4314 | break;
|
4315 | case "details":
|
4316 | listenToNonDelegatedEvent("toggle", instance);
|
4317 | break;
|
4318 | case "input":
|
4319 | listenToNonDelegatedEvent("invalid", instance);
|
4320 | initInput(
|
4321 | instance,
|
4322 | props.value,
|
4323 | props.defaultValue,
|
4324 | props.checked,
|
4325 | props.defaultChecked,
|
4326 | props.type,
|
4327 | props.name,
|
4328 | !0
|
4329 | );
|
4330 | track(instance);
|
4331 | break;
|
4332 | case "select":
|
4333 | listenToNonDelegatedEvent("invalid", instance);
|
4334 | break;
|
4335 | case "textarea":
|
4336 | listenToNonDelegatedEvent("invalid", instance),
|
4337 | initTextarea(instance, props.value, props.defaultValue, props.children),
|
4338 | track(instance);
|
4339 | }
|
4340 | type = props.children;
|
4341 | ("string" !== typeof type &&
|
4342 | "number" !== typeof type &&
|
4343 | "bigint" !== typeof type) ||
|
4344 | instance.textContent === "" + type ||
|
4345 | !0 === props.suppressHydrationWarning ||
|
4346 | checkForUnmatchedText(instance.textContent, type)
|
4347 | ? (null != props.onScroll && listenToNonDelegatedEvent("scroll", instance),
|
4348 | null != props.onScrollEnd &&
|
4349 | listenToNonDelegatedEvent("scrollend", instance),
|
4350 | null != props.onClick && (instance.onclick = noop$3),
|
4351 | (instance = !0))
|
4352 | : (instance = !1);
|
4353 | instance || throwOnHydrationMismatch(fiber);
|
4354 | }
|
4355 | function popToNextHostParent(fiber) {
|
4356 | for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
|
4357 | switch (hydrationParentFiber.tag) {
|
4358 | case 3:
|
4359 | case 27:
|
4360 | rootOrSingletonContext = !0;
|
4361 | return;
|
4362 | case 5:
|
4363 | case 13:
|
4364 | rootOrSingletonContext = !1;
|
4365 | return;
|
4366 | default:
|
4367 | hydrationParentFiber = hydrationParentFiber.return;
|
4368 | }
|
4369 | }
|
4370 | function popHydrationState(fiber) {
|
4371 | if (fiber !== hydrationParentFiber) return !1;
|
4372 | if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;
|
4373 | var shouldClear = !1,
|
4374 | JSCompiler_temp;
|
4375 | if ((JSCompiler_temp = 3 !== fiber.tag && 27 !== fiber.tag)) {
|
4376 | if ((JSCompiler_temp = 5 === fiber.tag))
|
4377 | (JSCompiler_temp = fiber.type),
|
4378 | (JSCompiler_temp =
|
4379 | !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) ||
|
4380 | shouldSetTextContent(fiber.type, fiber.memoizedProps));
|
4381 | JSCompiler_temp = !JSCompiler_temp;
|
4382 | }
|
4383 | JSCompiler_temp && (shouldClear = !0);
|
4384 | shouldClear && nextHydratableInstance && throwOnHydrationMismatch(fiber);
|
4385 | popToNextHostParent(fiber);
|
4386 | if (13 === fiber.tag) {
|
4387 | fiber = fiber.memoizedState;
|
4388 | fiber = null !== fiber ? fiber.dehydrated : null;
|
4389 | if (!fiber) throw Error(formatProdErrorMessage(317));
|
4390 | a: {
|
4391 | fiber = fiber.nextSibling;
|
4392 | for (shouldClear = 0; fiber; ) {
|
4393 | if (8 === fiber.nodeType)
|
4394 | if (((JSCompiler_temp = fiber.data), "/$" === JSCompiler_temp)) {
|
4395 | if (0 === shouldClear) {
|
4396 | nextHydratableInstance = getNextHydratable(fiber.nextSibling);
|
4397 | break a;
|
4398 | }
|
4399 | shouldClear--;
|
4400 | } else
|
4401 | ("$" !== JSCompiler_temp &&
|
4402 | "$!" !== JSCompiler_temp &&
|
4403 | "$?" !== JSCompiler_temp) ||
|
4404 | shouldClear++;
|
4405 | fiber = fiber.nextSibling;
|
4406 | }
|
4407 | nextHydratableInstance = null;
|
4408 | }
|
4409 | } else
|
4410 | nextHydratableInstance = hydrationParentFiber
|
4411 | ? getNextHydratable(fiber.stateNode.nextSibling)
|
4412 | : null;
|
4413 | return !0;
|
4414 | }
|
4415 | function resetHydrationState() {
|
4416 | nextHydratableInstance = hydrationParentFiber = null;
|
4417 | isHydrating = !1;
|
4418 | }
|
4419 | function queueHydrationError(error) {
|
4420 | null === hydrationErrors
|
4421 | ? (hydrationErrors = [error])
|
4422 | : hydrationErrors.push(error);
|
4423 | }
|
4424 | var SuspenseException = Error(formatProdErrorMessage(460)),
|
4425 | SuspenseyCommitException = Error(formatProdErrorMessage(474)),
|
4426 | noopSuspenseyCommitThenable = { then: function () {} };
|
4427 | function isThenableResolved(thenable) {
|
4428 | thenable = thenable.status;
|
4429 | return "fulfilled" === thenable || "rejected" === thenable;
|
4430 | }
|
4431 | function noop$2() {}
|
4432 | function trackUsedThenable(thenableState, thenable, index) {
|
4433 | index = thenableState[index];
|
4434 | void 0 === index
|
4435 | ? thenableState.push(thenable)
|
4436 | : index !== thenable && (thenable.then(noop$2, noop$2), (thenable = index));
|
4437 | switch (thenable.status) {
|
4438 | case "fulfilled":
|
4439 | return thenable.value;
|
4440 | case "rejected":
|
4441 | thenableState = thenable.reason;
|
4442 | if (thenableState === SuspenseException)
|
4443 | throw Error(formatProdErrorMessage(483));
|
4444 | throw thenableState;
|
4445 | default:
|
4446 | if ("string" === typeof thenable.status) thenable.then(noop$2, noop$2);
|
4447 | else {
|
4448 | thenableState = workInProgressRoot;
|
4449 | if (null !== thenableState && 100 < thenableState.shellSuspendCounter)
|
4450 | throw Error(formatProdErrorMessage(482));
|
4451 | thenableState = thenable;
|
4452 | thenableState.status = "pending";
|
4453 | thenableState.then(
|
4454 | function (fulfilledValue) {
|
4455 | if ("pending" === thenable.status) {
|
4456 | var fulfilledThenable = thenable;
|
4457 | fulfilledThenable.status = "fulfilled";
|
4458 | fulfilledThenable.value = fulfilledValue;
|
4459 | }
|
4460 | },
|
4461 | function (error) {
|
4462 | if ("pending" === thenable.status) {
|
4463 | var rejectedThenable = thenable;
|
4464 | rejectedThenable.status = "rejected";
|
4465 | rejectedThenable.reason = error;
|
4466 | }
|
4467 | }
|
4468 | );
|
4469 | }
|
4470 | switch (thenable.status) {
|
4471 | case "fulfilled":
|
4472 | return thenable.value;
|
4473 | case "rejected":
|
4474 | thenableState = thenable.reason;
|
4475 | if (thenableState === SuspenseException)
|
4476 | throw Error(formatProdErrorMessage(483));
|
4477 | throw thenableState;
|
4478 | }
|
4479 | suspendedThenable = thenable;
|
4480 | throw SuspenseException;
|
4481 | }
|
4482 | }
|
4483 | var suspendedThenable = null;
|
4484 | function getSuspendedThenable() {
|
4485 | if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
|
4486 | var thenable = suspendedThenable;
|
4487 | suspendedThenable = null;
|
4488 | return thenable;
|
4489 | }
|
4490 | var thenableState$1 = null,
|
4491 | thenableIndexCounter$1 = 0;
|
4492 | function unwrapThenable(thenable) {
|
4493 | var index = thenableIndexCounter$1;
|
4494 | thenableIndexCounter$1 += 1;
|
4495 | null === thenableState$1 && (thenableState$1 = []);
|
4496 | return trackUsedThenable(thenableState$1, thenable, index);
|
4497 | }
|
4498 | function coerceRef(returnFiber, current, workInProgress, element) {
|
4499 | returnFiber = element.props.ref;
|
4500 | workInProgress.ref = void 0 !== returnFiber ? returnFiber : null;
|
4501 | }
|
4502 | function throwOnInvalidObjectType(returnFiber, newChild) {
|
4503 | if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
|
4504 | throw Error(formatProdErrorMessage(525));
|
4505 | returnFiber = Object.prototype.toString.call(newChild);
|
4506 | throw Error(
|
4507 | formatProdErrorMessage(
|
4508 | 31,
|
4509 | "[object Object]" === returnFiber
|
4510 | ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
|
4511 | : returnFiber
|
4512 | )
|
4513 | );
|
4514 | }
|
4515 | function resolveLazy(lazyType) {
|
4516 | var init = lazyType._init;
|
4517 | return init(lazyType._payload);
|
4518 | }
|
4519 | function createChildReconciler(shouldTrackSideEffects) {
|
4520 | function deleteChild(returnFiber, childToDelete) {
|
4521 | if (shouldTrackSideEffects) {
|
4522 | var deletions = returnFiber.deletions;
|
4523 | null === deletions
|
4524 | ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))
|
4525 | : deletions.push(childToDelete);
|
4526 | }
|
4527 | }
|
4528 | function deleteRemainingChildren(returnFiber, currentFirstChild) {
|
4529 | if (!shouldTrackSideEffects) return null;
|
4530 | for (; null !== currentFirstChild; )
|
4531 | deleteChild(returnFiber, currentFirstChild),
|
4532 | (currentFirstChild = currentFirstChild.sibling);
|
4533 | return null;
|
4534 | }
|
4535 | function mapRemainingChildren(currentFirstChild) {
|
4536 | for (var existingChildren = new Map(); null !== currentFirstChild; )
|
4537 | null !== currentFirstChild.key
|
4538 | ? existingChildren.set(currentFirstChild.key, currentFirstChild)
|
4539 | : existingChildren.set(currentFirstChild.index, currentFirstChild),
|
4540 | (currentFirstChild = currentFirstChild.sibling);
|
4541 | return existingChildren;
|
4542 | }
|
4543 | function useFiber(fiber, pendingProps) {
|
4544 | fiber = createWorkInProgress(fiber, pendingProps);
|
4545 | fiber.index = 0;
|
4546 | fiber.sibling = null;
|
4547 | return fiber;
|
4548 | }
|
4549 | function placeChild(newFiber, lastPlacedIndex, newIndex) {
|
4550 | newFiber.index = newIndex;
|
4551 | if (!shouldTrackSideEffects)
|
4552 | return (newFiber.flags |= 1048576), lastPlacedIndex;
|
4553 | newIndex = newFiber.alternate;
|
4554 | if (null !== newIndex)
|
4555 | return (
|
4556 | (newIndex = newIndex.index),
|
4557 | newIndex < lastPlacedIndex
|
4558 | ? ((newFiber.flags |= 33554434), lastPlacedIndex)
|
4559 | : newIndex
|
4560 | );
|
4561 | newFiber.flags |= 33554434;
|
4562 | return lastPlacedIndex;
|
4563 | }
|
4564 | function placeSingleChild(newFiber) {
|
4565 | shouldTrackSideEffects &&
|
4566 | null === newFiber.alternate &&
|
4567 | (newFiber.flags |= 33554434);
|
4568 | return newFiber;
|
4569 | }
|
4570 | function updateTextNode(returnFiber, current, textContent, lanes) {
|
4571 | if (null === current || 6 !== current.tag)
|
4572 | return (
|
4573 | (current = createFiberFromText(textContent, returnFiber.mode, lanes)),
|
4574 | (current.return = returnFiber),
|
4575 | current
|
4576 | );
|
4577 | current = useFiber(current, textContent);
|
4578 | current.return = returnFiber;
|
4579 | return current;
|
4580 | }
|
4581 | function updateElement(returnFiber, current, element, lanes) {
|
4582 | var elementType = element.type;
|
4583 | if (elementType === REACT_FRAGMENT_TYPE)
|
4584 | return updateFragment(
|
4585 | returnFiber,
|
4586 | current,
|
4587 | element.props.children,
|
4588 | lanes,
|
4589 | element.key
|
4590 | );
|
4591 | if (
|
4592 | null !== current &&
|
4593 | (current.elementType === elementType ||
|
4594 | ("object" === typeof elementType &&
|
4595 | null !== elementType &&
|
4596 | elementType.$$typeof === REACT_LAZY_TYPE &&
|
4597 | resolveLazy(elementType) === current.type))
|
4598 | )
|
4599 | return (
|
4600 | (lanes = useFiber(current, element.props)),
|
4601 | coerceRef(returnFiber, current, lanes, element),
|
4602 | (lanes.return = returnFiber),
|
4603 | lanes
|
4604 | );
|
4605 | lanes = createFiberFromTypeAndProps(
|
4606 | element.type,
|
4607 | element.key,
|
4608 | element.props,
|
4609 | null,
|
4610 | returnFiber.mode,
|
4611 | lanes
|
4612 | );
|
4613 | coerceRef(returnFiber, current, lanes, element);
|
4614 | lanes.return = returnFiber;
|
4615 | return lanes;
|
4616 | }
|
4617 | function updatePortal(returnFiber, current, portal, lanes) {
|
4618 | if (
|
4619 | null === current ||
|
4620 | 4 !== current.tag ||
|
4621 | current.stateNode.containerInfo !== portal.containerInfo ||
|
4622 | current.stateNode.implementation !== portal.implementation
|
4623 | )
|
4624 | return (
|
4625 | (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),
|
4626 | (current.return = returnFiber),
|
4627 | current
|
4628 | );
|
4629 | current = useFiber(current, portal.children || []);
|
4630 | current.return = returnFiber;
|
4631 | return current;
|
4632 | }
|
4633 | function updateFragment(returnFiber, current, fragment, lanes, key) {
|
4634 | if (null === current || 7 !== current.tag)
|
4635 | return (
|
4636 | (current = createFiberFromFragment(
|
4637 | fragment,
|
4638 | returnFiber.mode,
|
4639 | lanes,
|
4640 | key
|
4641 | )),
|
4642 | (current.return = returnFiber),
|
4643 | current
|
4644 | );
|
4645 | current = useFiber(current, fragment);
|
4646 | current.return = returnFiber;
|
4647 | return current;
|
4648 | }
|
4649 | function createChild(returnFiber, newChild, lanes) {
|
4650 | if (
|
4651 | ("string" === typeof newChild && "" !== newChild) ||
|
4652 | "number" === typeof newChild ||
|
4653 | "bigint" === typeof newChild
|
4654 | )
|
4655 | return (
|
4656 | (newChild = createFiberFromText(
|
4657 | "" + newChild,
|
4658 | returnFiber.mode,
|
4659 | lanes
|
4660 | )),
|
4661 | (newChild.return = returnFiber),
|
4662 | newChild
|
4663 | );
|
4664 | if ("object" === typeof newChild && null !== newChild) {
|
4665 | switch (newChild.$$typeof) {
|
4666 | case REACT_ELEMENT_TYPE:
|
4667 | return (
|
4668 | (lanes = createFiberFromTypeAndProps(
|
4669 | newChild.type,
|
4670 | newChild.key,
|
4671 | newChild.props,
|
4672 | null,
|
4673 | returnFiber.mode,
|
4674 | lanes
|
4675 | )),
|
4676 | coerceRef(returnFiber, null, lanes, newChild),
|
4677 | (lanes.return = returnFiber),
|
4678 | lanes
|
4679 | );
|
4680 | case REACT_PORTAL_TYPE:
|
4681 | return (
|
4682 | (newChild = createFiberFromPortal(
|
4683 | newChild,
|
4684 | returnFiber.mode,
|
4685 | lanes
|
4686 | )),
|
4687 | (newChild.return = returnFiber),
|
4688 | newChild
|
4689 | );
|
4690 | case REACT_LAZY_TYPE:
|
4691 | var init = newChild._init;
|
4692 | return createChild(returnFiber, init(newChild._payload), lanes);
|
4693 | }
|
4694 | if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
4695 | return (
|
4696 | (newChild = createFiberFromFragment(
|
4697 | newChild,
|
4698 | returnFiber.mode,
|
4699 | lanes,
|
4700 | null
|
4701 | )),
|
4702 | (newChild.return = returnFiber),
|
4703 | newChild
|
4704 | );
|
4705 | if ("function" === typeof newChild.then)
|
4706 | return createChild(returnFiber, unwrapThenable(newChild), lanes);
|
4707 | if (newChild.$$typeof === REACT_CONTEXT_TYPE)
|
4708 | return createChild(
|
4709 | returnFiber,
|
4710 | readContextDuringReconciliation(returnFiber, newChild, lanes),
|
4711 | lanes
|
4712 | );
|
4713 | throwOnInvalidObjectType(returnFiber, newChild);
|
4714 | }
|
4715 | return null;
|
4716 | }
|
4717 | function updateSlot(returnFiber, oldFiber, newChild, lanes) {
|
4718 | var key = null !== oldFiber ? oldFiber.key : null;
|
4719 | if (
|
4720 | ("string" === typeof newChild && "" !== newChild) ||
|
4721 | "number" === typeof newChild ||
|
4722 | "bigint" === typeof newChild
|
4723 | )
|
4724 | return null !== key
|
4725 | ? null
|
4726 | : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
|
4727 | if ("object" === typeof newChild && null !== newChild) {
|
4728 | switch (newChild.$$typeof) {
|
4729 | case REACT_ELEMENT_TYPE:
|
4730 | return newChild.key === key
|
4731 | ? updateElement(returnFiber, oldFiber, newChild, lanes)
|
4732 | : null;
|
4733 | case REACT_PORTAL_TYPE:
|
4734 | return newChild.key === key
|
4735 | ? updatePortal(returnFiber, oldFiber, newChild, lanes)
|
4736 | : null;
|
4737 | case REACT_LAZY_TYPE:
|
4738 | return (
|
4739 | (key = newChild._init),
|
4740 | updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)
|
4741 | );
|
4742 | }
|
4743 | if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
4744 | return null !== key
|
4745 | ? null
|
4746 | : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
|
4747 | if ("function" === typeof newChild.then)
|
4748 | return updateSlot(
|
4749 | returnFiber,
|
4750 | oldFiber,
|
4751 | unwrapThenable(newChild),
|
4752 | lanes
|
4753 | );
|
4754 | if (newChild.$$typeof === REACT_CONTEXT_TYPE)
|
4755 | return updateSlot(
|
4756 | returnFiber,
|
4757 | oldFiber,
|
4758 | readContextDuringReconciliation(returnFiber, newChild, lanes),
|
4759 | lanes
|
4760 | );
|
4761 | throwOnInvalidObjectType(returnFiber, newChild);
|
4762 | }
|
4763 | return null;
|
4764 | }
|
4765 | function updateFromMap(
|
4766 | existingChildren,
|
4767 | returnFiber,
|
4768 | newIdx,
|
4769 | newChild,
|
4770 | lanes
|
4771 | ) {
|
4772 | if (
|
4773 | ("string" === typeof newChild && "" !== newChild) ||
|
4774 | "number" === typeof newChild ||
|
4775 | "bigint" === typeof newChild
|
4776 | )
|
4777 | return (
|
4778 | (existingChildren = existingChildren.get(newIdx) || null),
|
4779 | updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
|
4780 | );
|
4781 | if ("object" === typeof newChild && null !== newChild) {
|
4782 | switch (newChild.$$typeof) {
|
4783 | case REACT_ELEMENT_TYPE:
|
4784 | return (
|
4785 | (existingChildren =
|
4786 | existingChildren.get(
|
4787 | null === newChild.key ? newIdx : newChild.key
|
4788 | ) || null),
|
4789 | updateElement(returnFiber, existingChildren, newChild, lanes)
|
4790 | );
|
4791 | case REACT_PORTAL_TYPE:
|
4792 | return (
|
4793 | (existingChildren =
|
4794 | existingChildren.get(
|
4795 | null === newChild.key ? newIdx : newChild.key
|
4796 | ) || null),
|
4797 | updatePortal(returnFiber, existingChildren, newChild, lanes)
|
4798 | );
|
4799 | case REACT_LAZY_TYPE:
|
4800 | var init = newChild._init;
|
4801 | return updateFromMap(
|
4802 | existingChildren,
|
4803 | returnFiber,
|
4804 | newIdx,
|
4805 | init(newChild._payload),
|
4806 | lanes
|
4807 | );
|
4808 | }
|
4809 | if (isArrayImpl(newChild) || getIteratorFn(newChild))
|
4810 | return (
|
4811 | (existingChildren = existingChildren.get(newIdx) || null),
|
4812 | updateFragment(returnFiber, existingChildren, newChild, lanes, null)
|
4813 | );
|
4814 | if ("function" === typeof newChild.then)
|
4815 | return updateFromMap(
|
4816 | existingChildren,
|
4817 | returnFiber,
|
4818 | newIdx,
|
4819 | unwrapThenable(newChild),
|
4820 | lanes
|
4821 | );
|
4822 | if (newChild.$$typeof === REACT_CONTEXT_TYPE)
|
4823 | return updateFromMap(
|
4824 | existingChildren,
|
4825 | returnFiber,
|
4826 | newIdx,
|
4827 | readContextDuringReconciliation(returnFiber, newChild, lanes),
|
4828 | lanes
|
4829 | );
|
4830 | throwOnInvalidObjectType(returnFiber, newChild);
|
4831 | }
|
4832 | return null;
|
4833 | }
|
4834 | function reconcileChildrenArray(
|
4835 | returnFiber,
|
4836 | currentFirstChild,
|
4837 | newChildren,
|
4838 | lanes
|
4839 | ) {
|
4840 | for (
|
4841 | var resultingFirstChild = null,
|
4842 | previousNewFiber = null,
|
4843 | oldFiber = currentFirstChild,
|
4844 | newIdx = (currentFirstChild = 0),
|
4845 | nextOldFiber = null;
|
4846 | null !== oldFiber && newIdx < newChildren.length;
|
4847 | newIdx++
|
4848 | ) {
|
4849 | oldFiber.index > newIdx
|
4850 | ? ((nextOldFiber = oldFiber), (oldFiber = null))
|
4851 | : (nextOldFiber = oldFiber.sibling);
|
4852 | var newFiber = updateSlot(
|
4853 | returnFiber,
|
4854 | oldFiber,
|
4855 | newChildren[newIdx],
|
4856 | lanes
|
4857 | );
|
4858 | if (null === newFiber) {
|
4859 | null === oldFiber && (oldFiber = nextOldFiber);
|
4860 | break;
|
4861 | }
|
4862 | shouldTrackSideEffects &&
|
4863 | oldFiber &&
|
4864 | null === newFiber.alternate &&
|
4865 | deleteChild(returnFiber, oldFiber);
|
4866 | currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
|
4867 | null === previousNewFiber
|
4868 | ? (resultingFirstChild = newFiber)
|
4869 | : (previousNewFiber.sibling = newFiber);
|
4870 | previousNewFiber = newFiber;
|
4871 | oldFiber = nextOldFiber;
|
4872 | }
|
4873 | if (newIdx === newChildren.length)
|
4874 | return (
|
4875 | deleteRemainingChildren(returnFiber, oldFiber),
|
4876 | isHydrating && pushTreeFork(returnFiber, newIdx),
|
4877 | resultingFirstChild
|
4878 | );
|
4879 | if (null === oldFiber) {
|
4880 | for (; newIdx < newChildren.length; newIdx++)
|
4881 | (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),
|
4882 | null !== oldFiber &&
|
4883 | ((currentFirstChild = placeChild(
|
4884 | oldFiber,
|
4885 | currentFirstChild,
|
4886 | newIdx
|
4887 | )),
|
4888 | null === previousNewFiber
|
4889 | ? (resultingFirstChild = oldFiber)
|
4890 | : (previousNewFiber.sibling = oldFiber),
|
4891 | (previousNewFiber = oldFiber));
|
4892 | isHydrating && pushTreeFork(returnFiber, newIdx);
|
4893 | return resultingFirstChild;
|
4894 | }
|
4895 | for (
|
4896 | oldFiber = mapRemainingChildren(oldFiber);
|
4897 | newIdx < newChildren.length;
|
4898 | newIdx++
|
4899 | )
|
4900 | (nextOldFiber = updateFromMap(
|
4901 | oldFiber,
|
4902 | returnFiber,
|
4903 | newIdx,
|
4904 | newChildren[newIdx],
|
4905 | lanes
|
4906 | )),
|
4907 | null !== nextOldFiber &&
|
4908 | (shouldTrackSideEffects &&
|
4909 | null !== nextOldFiber.alternate &&
|
4910 | oldFiber.delete(
|
4911 | null === nextOldFiber.key ? newIdx : nextOldFiber.key
|
4912 | ),
|
4913 | (currentFirstChild = placeChild(
|
4914 | nextOldFiber,
|
4915 | currentFirstChild,
|
4916 | newIdx
|
4917 | )),
|
4918 | null === previousNewFiber
|
4919 | ? (resultingFirstChild = nextOldFiber)
|
4920 | : (previousNewFiber.sibling = nextOldFiber),
|
4921 | (previousNewFiber = nextOldFiber));
|
4922 | shouldTrackSideEffects &&
|
4923 | oldFiber.forEach(function (child) {
|
4924 | return deleteChild(returnFiber, child);
|
4925 | });
|
4926 | isHydrating && pushTreeFork(returnFiber, newIdx);
|
4927 | return resultingFirstChild;
|
4928 | }
|
4929 | function reconcileChildrenIterator(
|
4930 | returnFiber,
|
4931 | currentFirstChild,
|
4932 | newChildren,
|
4933 | lanes
|
4934 | ) {
|
4935 | if (null == newChildren) throw Error(formatProdErrorMessage(151));
|
4936 | for (
|
4937 | var resultingFirstChild = null,
|
4938 | previousNewFiber = null,
|
4939 | oldFiber = currentFirstChild,
|
4940 | newIdx = (currentFirstChild = 0),
|
4941 | nextOldFiber = null,
|
4942 | step = newChildren.next();
|
4943 | null !== oldFiber && !step.done;
|
4944 | newIdx++, step = newChildren.next(), null
|
4945 | ) {
|
4946 | oldFiber.index > newIdx
|
4947 | ? ((nextOldFiber = oldFiber), (oldFiber = null))
|
4948 | : (nextOldFiber = oldFiber.sibling);
|
4949 | var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
|
4950 | if (null === newFiber) {
|
4951 | null === oldFiber && (oldFiber = nextOldFiber);
|
4952 | break;
|
4953 | }
|
4954 | shouldTrackSideEffects &&
|
4955 | oldFiber &&
|
4956 | null === newFiber.alternate &&
|
4957 | deleteChild(returnFiber, oldFiber);
|
4958 | currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
|
4959 | null === previousNewFiber
|
4960 | ? (resultingFirstChild = newFiber)
|
4961 | : (previousNewFiber.sibling = newFiber);
|
4962 | previousNewFiber = newFiber;
|
4963 | oldFiber = nextOldFiber;
|
4964 | }
|
4965 | if (step.done)
|
4966 | return (
|
4967 | deleteRemainingChildren(returnFiber, oldFiber),
|
4968 | isHydrating && pushTreeFork(returnFiber, newIdx),
|
4969 | resultingFirstChild
|
4970 | );
|
4971 | if (null === oldFiber) {
|
4972 | for (; !step.done; newIdx++, step = newChildren.next(), null)
|
4973 | (step = createChild(returnFiber, step.value, lanes)),
|
4974 | null !== step &&
|
4975 | ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
|
4976 | null === previousNewFiber
|
4977 | ? (resultingFirstChild = step)
|
4978 | : (previousNewFiber.sibling = step),
|
4979 | (previousNewFiber = step));
|
4980 | isHydrating && pushTreeFork(returnFiber, newIdx);
|
4981 | return resultingFirstChild;
|
4982 | }
|
4983 | for (
|
4984 | oldFiber = mapRemainingChildren(oldFiber);
|
4985 | !step.done;
|
4986 | newIdx++, step = newChildren.next(), null
|
4987 | )
|
4988 | (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),
|
4989 | null !== step &&
|
4990 | (shouldTrackSideEffects &&
|
4991 | null !== step.alternate &&
|
4992 | oldFiber.delete(null === step.key ? newIdx : step.key),
|
4993 | (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
|
4994 | null === previousNewFiber
|
4995 | ? (resultingFirstChild = step)
|
4996 | : (previousNewFiber.sibling = step),
|
4997 | (previousNewFiber = step));
|
4998 | shouldTrackSideEffects &&
|
4999 | oldFiber.forEach(function (child) {
|
5000 | return deleteChild(returnFiber, child);
|
5001 | });
|
5002 | isHydrating && pushTreeFork(returnFiber, newIdx);
|
5003 | return resultingFirstChild;
|
5004 | }
|
5005 | function reconcileChildFibersImpl(
|
5006 | returnFiber,
|
5007 | currentFirstChild,
|
5008 | newChild,
|
5009 | lanes
|
5010 | ) {
|
5011 | "object" === typeof newChild &&
|
5012 | null !== newChild &&
|
5013 | newChild.type === REACT_FRAGMENT_TYPE &&
|
5014 | null === newChild.key &&
|
5015 | (newChild = newChild.props.children);
|
5016 | if ("object" === typeof newChild && null !== newChild) {
|
5017 | switch (newChild.$$typeof) {
|
5018 | case REACT_ELEMENT_TYPE:
|
5019 | a: {
|
5020 | for (
|
5021 | var key = newChild.key, child = currentFirstChild;
|
5022 | null !== child;
|
5023 |
|
5024 | ) {
|
5025 | if (child.key === key) {
|
5026 | key = newChild.type;
|
5027 | if (key === REACT_FRAGMENT_TYPE) {
|
5028 | if (7 === child.tag) {
|
5029 | deleteRemainingChildren(returnFiber, child.sibling);
|
5030 | currentFirstChild = useFiber(
|
5031 | child,
|
5032 | newChild.props.children
|
5033 | );
|
5034 | currentFirstChild.return = returnFiber;
|
5035 | returnFiber = currentFirstChild;
|
5036 | break a;
|
5037 | }
|
5038 | } else if (
|
5039 | child.elementType === key ||
|
5040 | ("object" === typeof key &&
|
5041 | null !== key &&
|
5042 | key.$$typeof === REACT_LAZY_TYPE &&
|
5043 | resolveLazy(key) === child.type)
|
5044 | ) {
|
5045 | deleteRemainingChildren(returnFiber, child.sibling);
|
5046 | currentFirstChild = useFiber(child, newChild.props);
|
5047 | coerceRef(returnFiber, child, currentFirstChild, newChild);
|
5048 | currentFirstChild.return = returnFiber;
|
5049 | returnFiber = currentFirstChild;
|
5050 | break a;
|
5051 | }
|
5052 | deleteRemainingChildren(returnFiber, child);
|
5053 | break;
|
5054 | } else deleteChild(returnFiber, child);
|
5055 | child = child.sibling;
|
5056 | }
|
5057 | newChild.type === REACT_FRAGMENT_TYPE
|
5058 | ? ((currentFirstChild = createFiberFromFragment(
|
5059 | newChild.props.children,
|
5060 | returnFiber.mode,
|
5061 | lanes,
|
5062 | newChild.key
|
5063 | )),
|
5064 | (currentFirstChild.return = returnFiber),
|
5065 | (returnFiber = currentFirstChild))
|
5066 | : ((lanes = createFiberFromTypeAndProps(
|
5067 | newChild.type,
|
5068 | newChild.key,
|
5069 | newChild.props,
|
5070 | null,
|
5071 | returnFiber.mode,
|
5072 | lanes
|
5073 | )),
|
5074 | coerceRef(returnFiber, currentFirstChild, lanes, newChild),
|
5075 | (lanes.return = returnFiber),
|
5076 | (returnFiber = lanes));
|
5077 | }
|
5078 | return placeSingleChild(returnFiber);
|
5079 | case REACT_PORTAL_TYPE:
|
5080 | a: {
|
5081 | for (child = newChild.key; null !== currentFirstChild; ) {
|
5082 | if (currentFirstChild.key === child)
|
5083 | if (
|
5084 | 4 === currentFirstChild.tag &&
|
5085 | currentFirstChild.stateNode.containerInfo ===
|
5086 | newChild.containerInfo &&
|
5087 | currentFirstChild.stateNode.implementation ===
|
5088 | newChild.implementation
|
5089 | ) {
|
5090 | deleteRemainingChildren(
|
5091 | returnFiber,
|
5092 | currentFirstChild.sibling
|
5093 | );
|
5094 | currentFirstChild = useFiber(
|
5095 | currentFirstChild,
|
5096 | newChild.children || []
|
5097 | );
|
5098 | currentFirstChild.return = returnFiber;
|
5099 | returnFiber = currentFirstChild;
|
5100 | break a;
|
5101 | } else {
|
5102 | deleteRemainingChildren(returnFiber, currentFirstChild);
|
5103 | break;
|
5104 | }
|
5105 | else deleteChild(returnFiber, currentFirstChild);
|
5106 | currentFirstChild = currentFirstChild.sibling;
|
5107 | }
|
5108 | currentFirstChild = createFiberFromPortal(
|
5109 | newChild,
|
5110 | returnFiber.mode,
|
5111 | lanes
|
5112 | );
|
5113 | currentFirstChild.return = returnFiber;
|
5114 | returnFiber = currentFirstChild;
|
5115 | }
|
5116 | return placeSingleChild(returnFiber);
|
5117 | case REACT_LAZY_TYPE:
|
5118 | return (
|
5119 | (child = newChild._init),
|
5120 | reconcileChildFibersImpl(
|
5121 | returnFiber,
|
5122 | currentFirstChild,
|
5123 | child(newChild._payload),
|
5124 | lanes
|
5125 | )
|
5126 | );
|
5127 | }
|
5128 | if (isArrayImpl(newChild))
|
5129 | return reconcileChildrenArray(
|
5130 | returnFiber,
|
5131 | currentFirstChild,
|
5132 | newChild,
|
5133 | lanes
|
5134 | );
|
5135 | if (getIteratorFn(newChild)) {
|
5136 | child = getIteratorFn(newChild);
|
5137 | if ("function" !== typeof child)
|
5138 | throw Error(formatProdErrorMessage(150));
|
5139 | newChild = child.call(newChild);
|
5140 | return reconcileChildrenIterator(
|
5141 | returnFiber,
|
5142 | currentFirstChild,
|
5143 | newChild,
|
5144 | lanes
|
5145 | );
|
5146 | }
|
5147 | if ("function" === typeof newChild.then)
|
5148 | return reconcileChildFibersImpl(
|
5149 | returnFiber,
|
5150 | currentFirstChild,
|
5151 | unwrapThenable(newChild),
|
5152 | lanes
|
5153 | );
|
5154 | if (newChild.$$typeof === REACT_CONTEXT_TYPE)
|
5155 | return reconcileChildFibersImpl(
|
5156 | returnFiber,
|
5157 | currentFirstChild,
|
5158 | readContextDuringReconciliation(returnFiber, newChild, lanes),
|
5159 | lanes
|
5160 | );
|
5161 | throwOnInvalidObjectType(returnFiber, newChild);
|
5162 | }
|
5163 | return ("string" === typeof newChild && "" !== newChild) ||
|
5164 | "number" === typeof newChild ||
|
5165 | "bigint" === typeof newChild
|
5166 | ? ((newChild = "" + newChild),
|
5167 | null !== currentFirstChild && 6 === currentFirstChild.tag
|
5168 | ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
|
5169 | (currentFirstChild = useFiber(currentFirstChild, newChild)),
|
5170 | (currentFirstChild.return = returnFiber),
|
5171 | (returnFiber = currentFirstChild))
|
5172 | : (deleteRemainingChildren(returnFiber, currentFirstChild),
|
5173 | (currentFirstChild = createFiberFromText(
|
5174 | newChild,
|
5175 | returnFiber.mode,
|
5176 | lanes
|
5177 | )),
|
5178 | (currentFirstChild.return = returnFiber),
|
5179 | (returnFiber = currentFirstChild)),
|
5180 | placeSingleChild(returnFiber))
|
5181 | : deleteRemainingChildren(returnFiber, currentFirstChild);
|
5182 | }
|
5183 | return function (returnFiber, currentFirstChild, newChild, lanes) {
|
5184 | thenableIndexCounter$1 = 0;
|
5185 | returnFiber = reconcileChildFibersImpl(
|
5186 | returnFiber,
|
5187 | currentFirstChild,
|
5188 | newChild,
|
5189 | lanes
|
5190 | );
|
5191 | thenableState$1 = null;
|
5192 | return returnFiber;
|
5193 | };
|
5194 | }
|
5195 | var reconcileChildFibers = createChildReconciler(!0),
|
5196 | mountChildFibers = createChildReconciler(!1),
|
5197 | currentTreeHiddenStackCursor = createCursor(null),
|
5198 | prevEntangledRenderLanesCursor = createCursor(0);
|
5199 | function pushHiddenContext(fiber, context) {
|
5200 | fiber = entangledRenderLanes;
|
5201 | push(prevEntangledRenderLanesCursor, fiber);
|
5202 | push(currentTreeHiddenStackCursor, context);
|
5203 | entangledRenderLanes = fiber | context.baseLanes;
|
5204 | }
|
5205 | function reuseHiddenContextOnStack() {
|
5206 | push(prevEntangledRenderLanesCursor, entangledRenderLanes);
|
5207 | push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
|
5208 | }
|
5209 | function popHiddenContext() {
|
5210 | entangledRenderLanes = prevEntangledRenderLanesCursor.current;
|
5211 | pop(currentTreeHiddenStackCursor);
|
5212 | pop(prevEntangledRenderLanesCursor);
|
5213 | }
|
5214 | var suspenseHandlerStackCursor = createCursor(null),
|
5215 | shellBoundary = null;
|
5216 | function pushPrimaryTreeSuspenseHandler(handler) {
|
5217 | var current = handler.alternate;
|
5218 | push(suspenseStackCursor, suspenseStackCursor.current & 1);
|
5219 | push(suspenseHandlerStackCursor, handler);
|
5220 | null === shellBoundary &&
|
5221 | (null === current || null !== currentTreeHiddenStackCursor.current
|
5222 | ? (shellBoundary = handler)
|
5223 | : null !== current.memoizedState && (shellBoundary = handler));
|
5224 | }
|
5225 | function pushOffscreenSuspenseHandler(fiber) {
|
5226 | if (22 === fiber.tag) {
|
5227 | if (
|
5228 | (push(suspenseStackCursor, suspenseStackCursor.current),
|
5229 | push(suspenseHandlerStackCursor, fiber),
|
5230 | null === shellBoundary)
|
5231 | ) {
|
5232 | var current = fiber.alternate;
|
5233 | null !== current &&
|
5234 | null !== current.memoizedState &&
|
5235 | (shellBoundary = fiber);
|
5236 | }
|
5237 | } else reuseSuspenseHandlerOnStack(fiber);
|
5238 | }
|
5239 | function reuseSuspenseHandlerOnStack() {
|
5240 | push(suspenseStackCursor, suspenseStackCursor.current);
|
5241 | push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
|
5242 | }
|
5243 | function popSuspenseHandler(fiber) {
|
5244 | pop(suspenseHandlerStackCursor);
|
5245 | shellBoundary === fiber && (shellBoundary = null);
|
5246 | pop(suspenseStackCursor);
|
5247 | }
|
5248 | var suspenseStackCursor = createCursor(0);
|
5249 | function findFirstSuspended(row) {
|
5250 | for (var node = row; null !== node; ) {
|
5251 | if (13 === node.tag) {
|
5252 | var state = node.memoizedState;
|
5253 | if (
|
5254 | null !== state &&
|
5255 | ((state = state.dehydrated),
|
5256 | null === state || "$?" === state.data || "$!" === state.data)
|
5257 | )
|
5258 | return node;
|
5259 | } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
|
5260 | if (0 !== (node.flags & 128)) return node;
|
5261 | } else if (null !== node.child) {
|
5262 | node.child.return = node;
|
5263 | node = node.child;
|
5264 | continue;
|
5265 | }
|
5266 | if (node === row) break;
|
5267 | for (; null === node.sibling; ) {
|
5268 | if (null === node.return || node.return === row) return null;
|
5269 | node = node.return;
|
5270 | }
|
5271 | node.sibling.return = node.return;
|
5272 | node = node.sibling;
|
5273 | }
|
5274 | return null;
|
5275 | }
|
5276 | var AbortControllerLocal =
|
5277 | "undefined" !== typeof AbortController
|
5278 | ? AbortController
|
5279 | : function () {
|
5280 | var listeners = [],
|
5281 | signal = (this.signal = {
|
5282 | aborted: !1,
|
5283 | addEventListener: function (type, listener) {
|
5284 | listeners.push(listener);
|
5285 | }
|
5286 | });
|
5287 | this.abort = function () {
|
5288 | signal.aborted = !0;
|
5289 | listeners.forEach(function (listener) {
|
5290 | return listener();
|
5291 | });
|
5292 | };
|
5293 | },
|
5294 | scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
|
5295 | NormalPriority = Scheduler.unstable_NormalPriority,
|
5296 | CacheContext = {
|
5297 | $$typeof: REACT_CONTEXT_TYPE,
|
5298 | Consumer: null,
|
5299 | Provider: null,
|
5300 | _currentValue: null,
|
5301 | _currentValue2: null,
|
5302 | _threadCount: 0
|
5303 | };
|
5304 | function createCache() {
|
5305 | return {
|
5306 | controller: new AbortControllerLocal(),
|
5307 | data: new Map(),
|
5308 | refCount: 0
|
5309 | };
|
5310 | }
|
5311 | function releaseCache(cache) {
|
5312 | cache.refCount--;
|
5313 | 0 === cache.refCount &&
|
5314 | scheduleCallback$2(NormalPriority, function () {
|
5315 | cache.controller.abort();
|
5316 | });
|
5317 | }
|
5318 | var firstScheduledRoot = null,
|
5319 | lastScheduledRoot = null,
|
5320 | didScheduleMicrotask = !1,
|
5321 | mightHavePendingSyncWork = !1,
|
5322 | isFlushingWork = !1,
|
5323 | currentEventTransitionLane = 0;
|
5324 | function ensureRootIsScheduled(root) {
|
5325 | root !== lastScheduledRoot &&
|
5326 | null === root.next &&
|
5327 | (null === lastScheduledRoot
|
5328 | ? (firstScheduledRoot = lastScheduledRoot = root)
|
5329 | : (lastScheduledRoot = lastScheduledRoot.next = root));
|
5330 | mightHavePendingSyncWork = !0;
|
5331 | didScheduleMicrotask ||
|
5332 | ((didScheduleMicrotask = !0),
|
5333 | scheduleImmediateTask(processRootScheduleInMicrotask));
|
5334 | }
|
5335 | function flushSyncWorkAcrossRoots_impl(onlyLegacy) {
|
5336 | if (!isFlushingWork && mightHavePendingSyncWork) {
|
5337 | isFlushingWork = !0;
|
5338 | do {
|
5339 | var didPerformSomeWork = !1;
|
5340 | for (var root$103 = firstScheduledRoot; null !== root$103; ) {
|
5341 | if (!onlyLegacy) {
|
5342 | var workInProgressRootRenderLanes$105 = workInProgressRootRenderLanes;
|
5343 | workInProgressRootRenderLanes$105 = getNextLanes(
|
5344 | root$103,
|
5345 | root$103 === workInProgressRoot
|
5346 | ? workInProgressRootRenderLanes$105
|
5347 | : 0
|
5348 | );
|
5349 | 0 !== (workInProgressRootRenderLanes$105 & 3) &&
|
5350 | ((didPerformSomeWork = !0),
|
5351 | performSyncWorkOnRoot(root$103, workInProgressRootRenderLanes$105));
|
5352 | }
|
5353 | root$103 = root$103.next;
|
5354 | }
|
5355 | } while (didPerformSomeWork);
|
5356 | isFlushingWork = !1;
|
5357 | }
|
5358 | }
|
5359 | function processRootScheduleInMicrotask() {
|
5360 | mightHavePendingSyncWork = didScheduleMicrotask = !1;
|
5361 | for (
|
5362 | var currentTime = now$1(), prev = null, root = firstScheduledRoot;
|
5363 | null !== root;
|
5364 |
|
5365 | ) {
|
5366 | var next = root.next;
|
5367 | if (0 !== currentEventTransitionLane && shouldAttemptEagerTransition()) {
|
5368 | var root$jscomp$0 = root,
|
5369 | lane = currentEventTransitionLane;
|
5370 | root$jscomp$0.pendingLanes |= 2;
|
5371 | root$jscomp$0.entangledLanes |= 2;
|
5372 | root$jscomp$0.entanglements[1] |= lane;
|
5373 | }
|
5374 | root$jscomp$0 = scheduleTaskForRootDuringMicrotask(root, currentTime);
|
5375 | 0 === root$jscomp$0
|
5376 | ? ((root.next = null),
|
5377 | null === prev ? (firstScheduledRoot = next) : (prev.next = next),
|
5378 | null === next && (lastScheduledRoot = prev))
|
5379 | : ((prev = root),
|
5380 | 0 !== (root$jscomp$0 & 3) && (mightHavePendingSyncWork = !0));
|
5381 | root = next;
|
5382 | }
|
5383 | currentEventTransitionLane = 0;
|
5384 | flushSyncWorkAcrossRoots_impl(!1);
|
5385 | }
|
5386 | function scheduleTaskForRootDuringMicrotask(root, currentTime) {
|
5387 | for (
|
5388 | var suspendedLanes = root.suspendedLanes,
|
5389 | pingedLanes = root.pingedLanes,
|
5390 | expirationTimes = root.expirationTimes,
|
5391 | lanes = root.pendingLanes & -62914561;
|
5392 | 0 < lanes;
|
5393 |
|
5394 | ) {
|
5395 | var index$3 = 31 - clz32(lanes),
|
5396 | lane = 1 << index$3,
|
5397 | expirationTime = expirationTimes[index$3];
|
5398 | if (-1 === expirationTime) {
|
5399 | if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
|
5400 | expirationTimes[index$3] = computeExpirationTime(lane, currentTime);
|
5401 | } else expirationTime <= currentTime && (root.expiredLanes |= lane);
|
5402 | lanes &= ~lane;
|
5403 | }
|
5404 | currentTime = workInProgressRoot;
|
5405 | suspendedLanes = workInProgressRootRenderLanes;
|
5406 | suspendedLanes = getNextLanes(
|
5407 | root,
|
5408 | root === currentTime ? suspendedLanes : 0
|
5409 | );
|
5410 | pingedLanes = root.callbackNode;
|
5411 | if (
|
5412 | 0 === suspendedLanes ||
|
5413 | (root === currentTime && 2 === workInProgressSuspendedReason) ||
|
5414 | null !== root.cancelPendingCommit
|
5415 | )
|
5416 | return (
|
5417 | null !== pingedLanes &&
|
5418 | null !== pingedLanes &&
|
5419 | cancelCallback$1(pingedLanes),
|
5420 | (root.callbackNode = null),
|
5421 | (root.callbackPriority = 0)
|
5422 | );
|
5423 | if (0 !== (suspendedLanes & 3))
|
5424 | return (
|
5425 | null !== pingedLanes &&
|
5426 | null !== pingedLanes &&
|
5427 | cancelCallback$1(pingedLanes),
|
5428 | (root.callbackPriority = 2),
|
5429 | (root.callbackNode = null),
|
5430 | 2
|
5431 | );
|
5432 | currentTime = suspendedLanes & -suspendedLanes;
|
5433 | if (currentTime === root.callbackPriority) return currentTime;
|
5434 | null !== pingedLanes && cancelCallback$1(pingedLanes);
|
5435 | switch (lanesToEventPriority(suspendedLanes)) {
|
5436 | case 2:
|
5437 | suspendedLanes = ImmediatePriority;
|
5438 | break;
|
5439 | case 8:
|
5440 | suspendedLanes = UserBlockingPriority;
|
5441 | break;
|
5442 | case 32:
|
5443 | suspendedLanes = NormalPriority$1;
|
5444 | break;
|
5445 | case 268435456:
|
5446 | suspendedLanes = IdlePriority;
|
5447 | break;
|
5448 | default:
|
5449 | suspendedLanes = NormalPriority$1;
|
5450 | }
|
5451 | pingedLanes = performConcurrentWorkOnRoot.bind(null, root);
|
5452 | suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
|
5453 | root.callbackPriority = currentTime;
|
5454 | root.callbackNode = suspendedLanes;
|
5455 | return currentTime;
|
5456 | }
|
5457 | function scheduleImmediateTask(cb) {
|
5458 | scheduleMicrotask(function () {
|
5459 | 0 !== (executionContext & 6)
|
5460 | ? scheduleCallback$3(ImmediatePriority, cb)
|
5461 | : cb();
|
5462 | });
|
5463 | }
|
5464 | function requestTransitionLane() {
|
5465 | 0 === currentEventTransitionLane &&
|
5466 | (currentEventTransitionLane = claimNextTransitionLane());
|
5467 | return currentEventTransitionLane;
|
5468 | }
|
5469 | var currentEntangledListeners = null,
|
5470 | currentEntangledPendingCount = 0,
|
5471 | currentEntangledLane = 0,
|
5472 | currentEntangledActionThenable = null;
|
5473 | function entangleAsyncAction(transition, thenable) {
|
5474 | if (null === currentEntangledListeners) {
|
5475 | var entangledListeners = (currentEntangledListeners = []);
|
5476 | currentEntangledPendingCount = 0;
|
5477 | currentEntangledLane = requestTransitionLane();
|
5478 | currentEntangledActionThenable = {
|
5479 | status: "pending",
|
5480 | value: void 0,
|
5481 | then: function (resolve) {
|
5482 | entangledListeners.push(resolve);
|
5483 | }
|
5484 | };
|
5485 | }
|
5486 | currentEntangledPendingCount++;
|
5487 | thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
|
5488 | return thenable;
|
5489 | }
|
5490 | function pingEngtangledActionScope() {
|
5491 | if (
|
5492 | null !== currentEntangledListeners &&
|
5493 | 0 === --currentEntangledPendingCount
|
5494 | ) {
|
5495 | null !== currentEntangledActionThenable &&
|
5496 | (currentEntangledActionThenable.status = "fulfilled");
|
5497 | var listeners = currentEntangledListeners;
|
5498 | currentEntangledListeners = null;
|
5499 | currentEntangledLane = 0;
|
5500 | currentEntangledActionThenable = null;
|
5501 | for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
|
5502 | }
|
5503 | }
|
5504 | function chainThenableValue(thenable, result) {
|
5505 | var listeners = [],
|
5506 | thenableWithOverride = {
|
5507 | status: "pending",
|
5508 | value: null,
|
5509 | reason: null,
|
5510 | then: function (resolve) {
|
5511 | listeners.push(resolve);
|
5512 | }
|
5513 | };
|
5514 | thenable.then(
|
5515 | function () {
|
5516 | thenableWithOverride.status = "fulfilled";
|
5517 | thenableWithOverride.value = result;
|
5518 | for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
|
5519 | },
|
5520 | function (error) {
|
5521 | thenableWithOverride.status = "rejected";
|
5522 | thenableWithOverride.reason = error;
|
5523 | for (error = 0; error < listeners.length; error++)
|
5524 | (0, listeners[error])(void 0);
|
5525 | }
|
5526 | );
|
5527 | return thenableWithOverride;
|
5528 | }
|
5529 | function requestCurrentTransition() {
|
5530 | var transition = ReactSharedInternals.T;
|
5531 | null !== transition && transition._callbacks.add(handleAsyncAction);
|
5532 | return transition;
|
5533 | }
|
5534 | function handleAsyncAction(transition, thenable) {
|
5535 | entangleAsyncAction(transition, thenable);
|
5536 | }
|
5537 | function notifyTransitionCallbacks(transition, returnValue) {
|
5538 | transition._callbacks.forEach(function (callback) {
|
5539 | return callback(transition, returnValue);
|
5540 | });
|
5541 | }
|
5542 | var resumedCache = createCursor(null);
|
5543 | function peekCacheFromPool() {
|
5544 | var cacheResumedFromPreviousRender = resumedCache.current;
|
5545 | return null !== cacheResumedFromPreviousRender
|
5546 | ? cacheResumedFromPreviousRender
|
5547 | : workInProgressRoot.pooledCache;
|
5548 | }
|
5549 | function pushTransition(offscreenWorkInProgress, prevCachePool) {
|
5550 | null === prevCachePool
|
5551 | ? push(resumedCache, resumedCache.current)
|
5552 | : push(resumedCache, prevCachePool.pool);
|
5553 | }
|
5554 | function getSuspendedCache() {
|
5555 | var cacheFromPool = peekCacheFromPool();
|
5556 | return null === cacheFromPool
|
5557 | ? null
|
5558 | : { parent: CacheContext._currentValue, pool: cacheFromPool };
|
5559 | }
|
5560 | var renderLanes = 0,
|
5561 | currentlyRenderingFiber$1 = null,
|
5562 | currentHook = null,
|
5563 | workInProgressHook = null,
|
5564 | didScheduleRenderPhaseUpdate = !1,
|
5565 | didScheduleRenderPhaseUpdateDuringThisPass = !1,
|
5566 | shouldDoubleInvokeUserFnsInHooksDEV = !1,
|
5567 | localIdCounter = 0,
|
5568 | thenableIndexCounter = 0,
|
5569 | thenableState = null,
|
5570 | globalClientIdCounter = 0;
|
5571 | function throwInvalidHookError() {
|
5572 | throw Error(formatProdErrorMessage(321));
|
5573 | }
|
5574 | function areHookInputsEqual(nextDeps, prevDeps) {
|
5575 | if (null === prevDeps) return !1;
|
5576 | for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
|
5577 | if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
|
5578 | return !0;
|
5579 | }
|
5580 | function renderWithHooks(
|
5581 | current,
|
5582 | workInProgress,
|
5583 | Component,
|
5584 | props,
|
5585 | secondArg,
|
5586 | nextRenderLanes
|
5587 | ) {
|
5588 | renderLanes = nextRenderLanes;
|
5589 | currentlyRenderingFiber$1 = workInProgress;
|
5590 | workInProgress.memoizedState = null;
|
5591 | workInProgress.updateQueue = null;
|
5592 | workInProgress.lanes = 0;
|
5593 | ReactSharedInternals.H =
|
5594 | null === current || null === current.memoizedState
|
5595 | ? HooksDispatcherOnMount
|
5596 | : HooksDispatcherOnUpdate;
|
5597 | shouldDoubleInvokeUserFnsInHooksDEV = !1;
|
5598 | current = Component(props, secondArg);
|
5599 | shouldDoubleInvokeUserFnsInHooksDEV = !1;
|
5600 | didScheduleRenderPhaseUpdateDuringThisPass &&
|
5601 | (current = renderWithHooksAgain(
|
5602 | workInProgress,
|
5603 | Component,
|
5604 | props,
|
5605 | secondArg
|
5606 | ));
|
5607 | finishRenderingHooks();
|
5608 | return current;
|
5609 | }
|
5610 | function finishRenderingHooks() {
|
5611 | ReactSharedInternals.H = ContextOnlyDispatcher;
|
5612 | var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
|
5613 | renderLanes = 0;
|
5614 | workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
5615 | didScheduleRenderPhaseUpdate = !1;
|
5616 | thenableIndexCounter = 0;
|
5617 | thenableState = null;
|
5618 | if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
|
5619 | }
|
5620 | function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
5621 | currentlyRenderingFiber$1 = workInProgress;
|
5622 | var numberOfReRenders = 0;
|
5623 | do {
|
5624 | didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
|
5625 | thenableIndexCounter = 0;
|
5626 | didScheduleRenderPhaseUpdateDuringThisPass = !1;
|
5627 | if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
|
5628 | numberOfReRenders += 1;
|
5629 | workInProgressHook = currentHook = null;
|
5630 | workInProgress.updateQueue = null;
|
5631 | ReactSharedInternals.H = HooksDispatcherOnRerender;
|
5632 | var children = Component(props, secondArg);
|
5633 | } while (didScheduleRenderPhaseUpdateDuringThisPass);
|
5634 | return children;
|
5635 | }
|
5636 | function TransitionAwareHostComponent() {
|
5637 | var dispatcher = ReactSharedInternals.H,
|
5638 | maybeThenable = dispatcher.useState()[0];
|
5639 | maybeThenable =
|
5640 | "function" === typeof maybeThenable.then
|
5641 | ? useThenable(maybeThenable)
|
5642 | : maybeThenable;
|
5643 | dispatcher = dispatcher.useState()[0];
|
5644 | (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
|
5645 | (currentlyRenderingFiber$1.flags |= 1024);
|
5646 | return maybeThenable;
|
5647 | }
|
5648 | function checkDidRenderIdHook() {
|
5649 | var didRenderIdHook = 0 !== localIdCounter;
|
5650 | localIdCounter = 0;
|
5651 | return didRenderIdHook;
|
5652 | }
|
5653 | function bailoutHooks(current, workInProgress, lanes) {
|
5654 | workInProgress.updateQueue = current.updateQueue;
|
5655 | workInProgress.flags &= -2053;
|
5656 | current.lanes &= ~lanes;
|
5657 | }
|
5658 | function resetHooksOnUnwind(workInProgress) {
|
5659 | if (didScheduleRenderPhaseUpdate) {
|
5660 | for (
|
5661 | workInProgress = workInProgress.memoizedState;
|
5662 | null !== workInProgress;
|
5663 |
|
5664 | ) {
|
5665 | var queue = workInProgress.queue;
|
5666 | null !== queue && (queue.pending = null);
|
5667 | workInProgress = workInProgress.next;
|
5668 | }
|
5669 | didScheduleRenderPhaseUpdate = !1;
|
5670 | }
|
5671 | renderLanes = 0;
|
5672 | workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
|
5673 | didScheduleRenderPhaseUpdateDuringThisPass = !1;
|
5674 | thenableIndexCounter = localIdCounter = 0;
|
5675 | thenableState = null;
|
5676 | }
|
5677 | function mountWorkInProgressHook() {
|
5678 | var hook = {
|
5679 | memoizedState: null,
|
5680 | baseState: null,
|
5681 | baseQueue: null,
|
5682 | queue: null,
|
5683 | next: null
|
5684 | };
|
5685 | null === workInProgressHook
|
5686 | ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)
|
5687 | : (workInProgressHook = workInProgressHook.next = hook);
|
5688 | return workInProgressHook;
|
5689 | }
|
5690 | function updateWorkInProgressHook() {
|
5691 | if (null === currentHook) {
|
5692 | var nextCurrentHook = currentlyRenderingFiber$1.alternate;
|
5693 | nextCurrentHook =
|
5694 | null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
|
5695 | } else nextCurrentHook = currentHook.next;
|
5696 | var nextWorkInProgressHook =
|
5697 | null === workInProgressHook
|
5698 | ? currentlyRenderingFiber$1.memoizedState
|
5699 | : workInProgressHook.next;
|
5700 | if (null !== nextWorkInProgressHook)
|
5701 | (workInProgressHook = nextWorkInProgressHook),
|
5702 | (currentHook = nextCurrentHook);
|
5703 | else {
|
5704 | if (null === nextCurrentHook) {
|
5705 | if (null === currentlyRenderingFiber$1.alternate)
|
5706 | throw Error(formatProdErrorMessage(467));
|
5707 | throw Error(formatProdErrorMessage(310));
|
5708 | }
|
5709 | currentHook = nextCurrentHook;
|
5710 | nextCurrentHook = {
|
5711 | memoizedState: currentHook.memoizedState,
|
5712 | baseState: currentHook.baseState,
|
5713 | baseQueue: currentHook.baseQueue,
|
5714 | queue: currentHook.queue,
|
5715 | next: null
|
5716 | };
|
5717 | null === workInProgressHook
|
5718 | ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook =
|
5719 | nextCurrentHook)
|
5720 | : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
|
5721 | }
|
5722 | return workInProgressHook;
|
5723 | }
|
5724 | var createFunctionComponentUpdateQueue;
|
5725 | createFunctionComponentUpdateQueue = function () {
|
5726 | return { lastEffect: null, events: null, stores: null };
|
5727 | };
|
5728 | function useThenable(thenable) {
|
5729 | var index = thenableIndexCounter;
|
5730 | thenableIndexCounter += 1;
|
5731 | null === thenableState && (thenableState = []);
|
5732 | thenable = trackUsedThenable(thenableState, thenable, index);
|
5733 | null === currentlyRenderingFiber$1.alternate &&
|
5734 | (null === workInProgressHook
|
5735 | ? null === currentlyRenderingFiber$1.memoizedState
|
5736 | : null === workInProgressHook.next) &&
|
5737 | (ReactSharedInternals.H = HooksDispatcherOnMount);
|
5738 | return thenable;
|
5739 | }
|
5740 | function use(usable) {
|
5741 | if (null !== usable && "object" === typeof usable) {
|
5742 | if ("function" === typeof usable.then) return useThenable(usable);
|
5743 | if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
|
5744 | }
|
5745 | throw Error(formatProdErrorMessage(438, String(usable)));
|
5746 | }
|
5747 | function basicStateReducer(state, action) {
|
5748 | return "function" === typeof action ? action(state) : action;
|
5749 | }
|
5750 | function updateReducer(reducer) {
|
5751 | var hook = updateWorkInProgressHook();
|
5752 | return updateReducerImpl(hook, currentHook, reducer);
|
5753 | }
|
5754 | function updateReducerImpl(hook, current, reducer) {
|
5755 | var queue = hook.queue;
|
5756 | if (null === queue) throw Error(formatProdErrorMessage(311));
|
5757 | queue.lastRenderedReducer = reducer;
|
5758 | var baseQueue = hook.baseQueue,
|
5759 | pendingQueue = queue.pending;
|
5760 | if (null !== pendingQueue) {
|
5761 | if (null !== baseQueue) {
|
5762 | var baseFirst = baseQueue.next;
|
5763 | baseQueue.next = pendingQueue.next;
|
5764 | pendingQueue.next = baseFirst;
|
5765 | }
|
5766 | current.baseQueue = baseQueue = pendingQueue;
|
5767 | queue.pending = null;
|
5768 | }
|
5769 | pendingQueue = hook.baseState;
|
5770 | if (null === baseQueue) hook.memoizedState = pendingQueue;
|
5771 | else {
|
5772 | current = baseQueue.next;
|
5773 | var newBaseQueueFirst = (baseFirst = null),
|
5774 | newBaseQueueLast = null,
|
5775 | update = current,
|
5776 | didReadFromEntangledAsyncAction$106 = !1;
|
5777 | do {
|
5778 | var updateLane = update.lane & -536870913;
|
5779 | if (
|
5780 | updateLane !== update.lane
|
5781 | ? (workInProgressRootRenderLanes & updateLane) === updateLane
|
5782 | : (renderLanes & updateLane) === updateLane
|
5783 | ) {
|
5784 | var revertLane = update.revertLane;
|
5785 | if (0 === revertLane)
|
5786 | null !== newBaseQueueLast &&
|
5787 | (newBaseQueueLast = newBaseQueueLast.next =
|
5788 | {
|
5789 | lane: 0,
|
5790 | revertLane: 0,
|
5791 | action: update.action,
|
5792 | hasEagerState: update.hasEagerState,
|
5793 | eagerState: update.eagerState,
|
5794 | next: null
|
5795 | }),
|
5796 | updateLane === currentEntangledLane &&
|
5797 | (didReadFromEntangledAsyncAction$106 = !0);
|
5798 | else if ((renderLanes & revertLane) === revertLane) {
|
5799 | update = update.next;
|
5800 | revertLane === currentEntangledLane &&
|
5801 | (didReadFromEntangledAsyncAction$106 = !0);
|
5802 | continue;
|
5803 | } else
|
5804 | (updateLane = {
|
5805 | lane: 0,
|
5806 | revertLane: update.revertLane,
|
5807 | action: update.action,
|
5808 | hasEagerState: update.hasEagerState,
|
5809 | eagerState: update.eagerState,
|
5810 | next: null
|
5811 | }),
|
5812 | null === newBaseQueueLast
|
5813 | ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),
|
5814 | (baseFirst = pendingQueue))
|
5815 | : (newBaseQueueLast = newBaseQueueLast.next = updateLane),
|
5816 | (currentlyRenderingFiber$1.lanes |= revertLane),
|
5817 | (workInProgressRootSkippedLanes |= revertLane);
|
5818 | updateLane = update.action;
|
5819 | shouldDoubleInvokeUserFnsInHooksDEV &&
|
5820 | reducer(pendingQueue, updateLane);
|
5821 | pendingQueue = update.hasEagerState
|
5822 | ? update.eagerState
|
5823 | : reducer(pendingQueue, updateLane);
|
5824 | } else
|
5825 | (revertLane = {
|
5826 | lane: updateLane,
|
5827 | revertLane: update.revertLane,
|
5828 | action: update.action,
|
5829 | hasEagerState: update.hasEagerState,
|
5830 | eagerState: update.eagerState,
|
5831 | next: null
|
5832 | }),
|
5833 | null === newBaseQueueLast
|
5834 | ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),
|
5835 | (baseFirst = pendingQueue))
|
5836 | : (newBaseQueueLast = newBaseQueueLast.next = revertLane),
|
5837 | (currentlyRenderingFiber$1.lanes |= updateLane),
|
5838 | (workInProgressRootSkippedLanes |= updateLane);
|
5839 | update = update.next;
|
5840 | } while (null !== update && update !== current);
|
5841 | null === newBaseQueueLast
|
5842 | ? (baseFirst = pendingQueue)
|
5843 | : (newBaseQueueLast.next = newBaseQueueFirst);
|
5844 | if (
|
5845 | !objectIs(pendingQueue, hook.memoizedState) &&
|
5846 | ((didReceiveUpdate = !0),
|
5847 | didReadFromEntangledAsyncAction$106 &&
|
5848 | ((reducer = currentEntangledActionThenable), null !== reducer))
|
5849 | )
|
5850 | throw reducer;
|
5851 | hook.memoizedState = pendingQueue;
|
5852 | hook.baseState = baseFirst;
|
5853 | hook.baseQueue = newBaseQueueLast;
|
5854 | queue.lastRenderedState = pendingQueue;
|
5855 | }
|
5856 | null === baseQueue && (queue.lanes = 0);
|
5857 | return [hook.memoizedState, queue.dispatch];
|
5858 | }
|
5859 | function rerenderReducer(reducer) {
|
5860 | var hook = updateWorkInProgressHook(),
|
5861 | queue = hook.queue;
|
5862 | if (null === queue) throw Error(formatProdErrorMessage(311));
|
5863 | queue.lastRenderedReducer = reducer;
|
5864 | var dispatch = queue.dispatch,
|
5865 | lastRenderPhaseUpdate = queue.pending,
|
5866 | newState = hook.memoizedState;
|
5867 | if (null !== lastRenderPhaseUpdate) {
|
5868 | queue.pending = null;
|
5869 | var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
|
5870 | do (newState = reducer(newState, update.action)), (update = update.next);
|
5871 | while (update !== lastRenderPhaseUpdate);
|
5872 | objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
|
5873 | hook.memoizedState = newState;
|
5874 | null === hook.baseQueue && (hook.baseState = newState);
|
5875 | queue.lastRenderedState = newState;
|
5876 | }
|
5877 | return [newState, dispatch];
|
5878 | }
|
5879 | function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
5880 | var fiber = currentlyRenderingFiber$1,
|
5881 | hook = updateWorkInProgressHook(),
|
5882 | isHydrating$jscomp$0 = isHydrating;
|
5883 | if (isHydrating$jscomp$0) {
|
5884 | if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
|
5885 | getServerSnapshot = getServerSnapshot();
|
5886 | } else getServerSnapshot = getSnapshot();
|
5887 | var snapshotChanged = !objectIs(
|
5888 | (currentHook || hook).memoizedState,
|
5889 | getServerSnapshot
|
5890 | );
|
5891 | snapshotChanged &&
|
5892 | ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));
|
5893 | hook = hook.queue;
|
5894 | updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
|
5895 | subscribe
|
5896 | ]);
|
5897 | if (
|
5898 | hook.getSnapshot !== getSnapshot ||
|
5899 | snapshotChanged ||
|
5900 | (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)
|
5901 | ) {
|
5902 | fiber.flags |= 2048;
|
5903 | pushEffect(
|
5904 | 9,
|
5905 | updateStoreInstance.bind(
|
5906 | null,
|
5907 | fiber,
|
5908 | hook,
|
5909 | getServerSnapshot,
|
5910 | getSnapshot
|
5911 | ),
|
5912 | { destroy: void 0 },
|
5913 | null
|
5914 | );
|
5915 | if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
|
5916 | isHydrating$jscomp$0 ||
|
5917 | 0 !== (renderLanes & 60) ||
|
5918 | pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
|
5919 | }
|
5920 | return getServerSnapshot;
|
5921 | }
|
5922 | function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
|
5923 | fiber.flags |= 16384;
|
5924 | fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
|
5925 | getSnapshot = currentlyRenderingFiber$1.updateQueue;
|
5926 | null === getSnapshot
|
5927 | ? ((getSnapshot = createFunctionComponentUpdateQueue()),
|
5928 | (currentlyRenderingFiber$1.updateQueue = getSnapshot),
|
5929 | (getSnapshot.stores = [fiber]))
|
5930 | : ((renderedSnapshot = getSnapshot.stores),
|
5931 | null === renderedSnapshot
|
5932 | ? (getSnapshot.stores = [fiber])
|
5933 | : renderedSnapshot.push(fiber));
|
5934 | }
|
5935 | function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
|
5936 | inst.value = nextSnapshot;
|
5937 | inst.getSnapshot = getSnapshot;
|
5938 | checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
|
5939 | }
|
5940 | function subscribeToStore(fiber, inst, subscribe) {
|
5941 | return subscribe(function () {
|
5942 | checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
|
5943 | });
|
5944 | }
|
5945 | function checkIfSnapshotChanged(inst) {
|
5946 | var latestGetSnapshot = inst.getSnapshot;
|
5947 | inst = inst.value;
|
5948 | try {
|
5949 | var nextValue = latestGetSnapshot();
|
5950 | return !objectIs(inst, nextValue);
|
5951 | } catch (error) {
|
5952 | return !0;
|
5953 | }
|
5954 | }
|
5955 | function forceStoreRerender(fiber) {
|
5956 | var root = enqueueConcurrentRenderForLane(fiber, 2);
|
5957 | null !== root && scheduleUpdateOnFiber(root, fiber, 2);
|
5958 | }
|
5959 | function mountStateImpl(initialState) {
|
5960 | var hook = mountWorkInProgressHook();
|
5961 | if ("function" === typeof initialState) {
|
5962 | var initialStateInitializer = initialState;
|
5963 | initialState = initialStateInitializer();
|
5964 | shouldDoubleInvokeUserFnsInHooksDEV &&
|
5965 | (setIsStrictModeForDevtools(!0),
|
5966 | initialStateInitializer(),
|
5967 | setIsStrictModeForDevtools(!1));
|
5968 | }
|
5969 | hook.memoizedState = hook.baseState = initialState;
|
5970 | hook.queue = {
|
5971 | pending: null,
|
5972 | lanes: 0,
|
5973 | dispatch: null,
|
5974 | lastRenderedReducer: basicStateReducer,
|
5975 | lastRenderedState: initialState
|
5976 | };
|
5977 | return hook;
|
5978 | }
|
5979 | function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
5980 | hook.baseState = passthrough;
|
5981 | return updateReducerImpl(
|
5982 | hook,
|
5983 | currentHook,
|
5984 | "function" === typeof reducer ? reducer : basicStateReducer
|
5985 | );
|
5986 | }
|
5987 | function dispatchActionState(
|
5988 | fiber,
|
5989 | actionQueue,
|
5990 | setPendingState,
|
5991 | setState,
|
5992 | payload
|
5993 | ) {
|
5994 | if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
|
5995 | fiber = actionQueue.pending;
|
5996 | null === fiber
|
5997 | ? ((fiber = { payload: payload, next: null }),
|
5998 | (fiber.next = actionQueue.pending = fiber),
|
5999 | runActionStateAction(actionQueue, setPendingState, setState, payload))
|
6000 | : (actionQueue.pending = fiber.next =
|
6001 | { payload: payload, next: fiber.next });
|
6002 | }
|
6003 | function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
6004 | var action = actionQueue.action,
|
6005 | prevState = actionQueue.state,
|
6006 | prevTransition = ReactSharedInternals.T,
|
6007 | currentTransition = { _callbacks: new Set() };
|
6008 | ReactSharedInternals.T = currentTransition;
|
6009 | setPendingState(!0);
|
6010 | try {
|
6011 | var returnValue = action(prevState, payload);
|
6012 | null !== returnValue &&
|
6013 | "object" === typeof returnValue &&
|
6014 | "function" === typeof returnValue.then
|
6015 | ? (notifyTransitionCallbacks(currentTransition, returnValue),
|
6016 | returnValue.then(
|
6017 | function (nextState) {
|
6018 | actionQueue.state = nextState;
|
6019 | finishRunningActionStateAction(
|
6020 | actionQueue,
|
6021 | setPendingState,
|
6022 | setState
|
6023 | );
|
6024 | },
|
6025 | function () {
|
6026 | return finishRunningActionStateAction(
|
6027 | actionQueue,
|
6028 | setPendingState,
|
6029 | setState
|
6030 | );
|
6031 | }
|
6032 | ),
|
6033 | setState(returnValue))
|
6034 | : (setState(returnValue),
|
6035 | (actionQueue.state = returnValue),
|
6036 | finishRunningActionStateAction(actionQueue, setPendingState, setState));
|
6037 | } catch (error) {
|
6038 | setState({ then: function () {}, status: "rejected", reason: error }),
|
6039 | finishRunningActionStateAction(actionQueue, setPendingState, setState);
|
6040 | } finally {
|
6041 | ReactSharedInternals.T = prevTransition;
|
6042 | }
|
6043 | }
|
6044 | function finishRunningActionStateAction(
|
6045 | actionQueue,
|
6046 | setPendingState,
|
6047 | setState
|
6048 | ) {
|
6049 | var last = actionQueue.pending;
|
6050 | if (null !== last) {
|
6051 | var first = last.next;
|
6052 | first === last
|
6053 | ? (actionQueue.pending = null)
|
6054 | : ((first = first.next),
|
6055 | (last.next = first),
|
6056 | runActionStateAction(
|
6057 | actionQueue,
|
6058 | setPendingState,
|
6059 | setState,
|
6060 | first.payload
|
6061 | ));
|
6062 | }
|
6063 | }
|
6064 | function actionStateReducer(oldState, newState) {
|
6065 | return newState;
|
6066 | }
|
6067 | function mountActionState(action, initialStateProp) {
|
6068 | if (isHydrating) {
|
6069 | var ssrFormState = workInProgressRoot.formState;
|
6070 | if (null !== ssrFormState) {
|
6071 | a: {
|
6072 | var JSCompiler_inline_result = currentlyRenderingFiber$1;
|
6073 | if (isHydrating) {
|
6074 | if (nextHydratableInstance) {
|
6075 | b: {
|
6076 | var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;
|
6077 | for (
|
6078 | var inRootOrSingleton = rootOrSingletonContext;
|
6079 | 8 !== JSCompiler_inline_result$jscomp$0.nodeType;
|
6080 |
|
6081 | ) {
|
6082 | if (!inRootOrSingleton) {
|
6083 | JSCompiler_inline_result$jscomp$0 = null;
|
6084 | break b;
|
6085 | }
|
6086 | JSCompiler_inline_result$jscomp$0 = getNextHydratable(
|
6087 | JSCompiler_inline_result$jscomp$0.nextSibling
|
6088 | );
|
6089 | if (null === JSCompiler_inline_result$jscomp$0) {
|
6090 | JSCompiler_inline_result$jscomp$0 = null;
|
6091 | break b;
|
6092 | }
|
6093 | }
|
6094 | inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;
|
6095 | JSCompiler_inline_result$jscomp$0 =
|
6096 | "F!" === inRootOrSingleton || "F" === inRootOrSingleton
|
6097 | ? JSCompiler_inline_result$jscomp$0
|
6098 | : null;
|
6099 | }
|
6100 | if (JSCompiler_inline_result$jscomp$0) {
|
6101 | nextHydratableInstance = getNextHydratable(
|
6102 | JSCompiler_inline_result$jscomp$0.nextSibling
|
6103 | );
|
6104 | JSCompiler_inline_result =
|
6105 | "F!" === JSCompiler_inline_result$jscomp$0.data;
|
6106 | break a;
|
6107 | }
|
6108 | }
|
6109 | throwOnHydrationMismatch(JSCompiler_inline_result);
|
6110 | }
|
6111 | JSCompiler_inline_result = !1;
|
6112 | }
|
6113 | JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
|
6114 | }
|
6115 | }
|
6116 | ssrFormState = mountWorkInProgressHook();
|
6117 | ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
|
6118 | JSCompiler_inline_result = {
|
6119 | pending: null,
|
6120 | lanes: 0,
|
6121 | dispatch: null,
|
6122 | lastRenderedReducer: actionStateReducer,
|
6123 | lastRenderedState: initialStateProp
|
6124 | };
|
6125 | ssrFormState.queue = JSCompiler_inline_result;
|
6126 | ssrFormState = dispatchSetState.bind(
|
6127 | null,
|
6128 | currentlyRenderingFiber$1,
|
6129 | JSCompiler_inline_result
|
6130 | );
|
6131 | JSCompiler_inline_result.dispatch = ssrFormState;
|
6132 | JSCompiler_inline_result = mountStateImpl(!1);
|
6133 | inRootOrSingleton = dispatchOptimisticSetState.bind(
|
6134 | null,
|
6135 | currentlyRenderingFiber$1,
|
6136 | !1,
|
6137 | JSCompiler_inline_result.queue
|
6138 | );
|
6139 | JSCompiler_inline_result = mountWorkInProgressHook();
|
6140 | JSCompiler_inline_result$jscomp$0 = {
|
6141 | state: initialStateProp,
|
6142 | dispatch: null,
|
6143 | action: action,
|
6144 | pending: null
|
6145 | };
|
6146 | JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;
|
6147 | ssrFormState = dispatchActionState.bind(
|
6148 | null,
|
6149 | currentlyRenderingFiber$1,
|
6150 | JSCompiler_inline_result$jscomp$0,
|
6151 | inRootOrSingleton,
|
6152 | ssrFormState
|
6153 | );
|
6154 | JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;
|
6155 | JSCompiler_inline_result.memoizedState = action;
|
6156 | return [initialStateProp, ssrFormState, !1];
|
6157 | }
|
6158 | function updateActionState(action) {
|
6159 | var stateHook = updateWorkInProgressHook();
|
6160 | return updateActionStateImpl(stateHook, currentHook, action);
|
6161 | }
|
6162 | function updateActionStateImpl(stateHook, currentStateHook, action) {
|
6163 | currentStateHook = updateReducerImpl(
|
6164 | stateHook,
|
6165 | currentStateHook,
|
6166 | actionStateReducer
|
6167 | )[0];
|
6168 | stateHook = updateReducer(basicStateReducer)[0];
|
6169 | currentStateHook =
|
6170 | "object" === typeof currentStateHook &&
|
6171 | null !== currentStateHook &&
|
6172 | "function" === typeof currentStateHook.then
|
6173 | ? useThenable(currentStateHook)
|
6174 | : currentStateHook;
|
6175 | var actionQueueHook = updateWorkInProgressHook(),
|
6176 | actionQueue = actionQueueHook.queue,
|
6177 | dispatch = actionQueue.dispatch;
|
6178 | action !== actionQueueHook.memoizedState &&
|
6179 | ((currentlyRenderingFiber$1.flags |= 2048),
|
6180 | pushEffect(
|
6181 | 9,
|
6182 | actionStateActionEffect.bind(null, actionQueue, action),
|
6183 | { destroy: void 0 },
|
6184 | null
|
6185 | ));
|
6186 | return [currentStateHook, dispatch, stateHook];
|
6187 | }
|
6188 | function actionStateActionEffect(actionQueue, action) {
|
6189 | actionQueue.action = action;
|
6190 | }
|
6191 | function rerenderActionState(action) {
|
6192 | var stateHook = updateWorkInProgressHook(),
|
6193 | currentStateHook = currentHook;
|
6194 | if (null !== currentStateHook)
|
6195 | return updateActionStateImpl(stateHook, currentStateHook, action);
|
6196 | updateWorkInProgressHook();
|
6197 | stateHook = stateHook.memoizedState;
|
6198 | currentStateHook = updateWorkInProgressHook();
|
6199 | var dispatch = currentStateHook.queue.dispatch;
|
6200 | currentStateHook.memoizedState = action;
|
6201 | return [stateHook, dispatch, !1];
|
6202 | }
|
6203 | function pushEffect(tag, create, inst, deps) {
|
6204 | tag = { tag: tag, create: create, inst: inst, deps: deps, next: null };
|
6205 | create = currentlyRenderingFiber$1.updateQueue;
|
6206 | null === create
|
6207 | ? ((create = createFunctionComponentUpdateQueue()),
|
6208 | (currentlyRenderingFiber$1.updateQueue = create),
|
6209 | (create.lastEffect = tag.next = tag))
|
6210 | : ((inst = create.lastEffect),
|
6211 | null === inst
|
6212 | ? (create.lastEffect = tag.next = tag)
|
6213 | : ((deps = inst.next),
|
6214 | (inst.next = tag),
|
6215 | (tag.next = deps),
|
6216 | (create.lastEffect = tag)));
|
6217 | return tag;
|
6218 | }
|
6219 | function updateRef() {
|
6220 | return updateWorkInProgressHook().memoizedState;
|
6221 | }
|
6222 | function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
|
6223 | var hook = mountWorkInProgressHook();
|
6224 | currentlyRenderingFiber$1.flags |= fiberFlags;
|
6225 | hook.memoizedState = pushEffect(
|
6226 | 1 | hookFlags,
|
6227 | create,
|
6228 | { destroy: void 0 },
|
6229 | void 0 === deps ? null : deps
|
6230 | );
|
6231 | }
|
6232 | function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
|
6233 | var hook = updateWorkInProgressHook();
|
6234 | deps = void 0 === deps ? null : deps;
|
6235 | var inst = hook.memoizedState.inst;
|
6236 | null !== currentHook &&
|
6237 | null !== deps &&
|
6238 | areHookInputsEqual(deps, currentHook.memoizedState.deps)
|
6239 | ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps))
|
6240 | : ((currentlyRenderingFiber$1.flags |= fiberFlags),
|
6241 | (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps)));
|
6242 | }
|
6243 | function mountEffect(create, deps) {
|
6244 | mountEffectImpl(8390656, 8, create, deps);
|
6245 | }
|
6246 | function updateEffect(create, deps) {
|
6247 | updateEffectImpl(2048, 8, create, deps);
|
6248 | }
|
6249 | function updateInsertionEffect(create, deps) {
|
6250 | return updateEffectImpl(4, 2, create, deps);
|
6251 | }
|
6252 | function updateLayoutEffect(create, deps) {
|
6253 | return updateEffectImpl(4, 4, create, deps);
|
6254 | }
|
6255 | function imperativeHandleEffect(create, ref) {
|
6256 | if ("function" === typeof ref) {
|
6257 | create = create();
|
6258 | var refCleanup = ref(create);
|
6259 | return function () {
|
6260 | "function" === typeof refCleanup ? refCleanup() : ref(null);
|
6261 | };
|
6262 | }
|
6263 | if (null !== ref && void 0 !== ref)
|
6264 | return (
|
6265 | (create = create()),
|
6266 | (ref.current = create),
|
6267 | function () {
|
6268 | ref.current = null;
|
6269 | }
|
6270 | );
|
6271 | }
|
6272 | function updateImperativeHandle(ref, create, deps) {
|
6273 | deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
6274 | updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
|
6275 | }
|
6276 | function mountDebugValue() {}
|
6277 | function updateCallback(callback, deps) {
|
6278 | var hook = updateWorkInProgressHook();
|
6279 | deps = void 0 === deps ? null : deps;
|
6280 | var prevState = hook.memoizedState;
|
6281 | if (null !== deps && areHookInputsEqual(deps, prevState[1]))
|
6282 | return prevState[0];
|
6283 | hook.memoizedState = [callback, deps];
|
6284 | return callback;
|
6285 | }
|
6286 | function updateMemo(nextCreate, deps) {
|
6287 | var hook = updateWorkInProgressHook();
|
6288 | deps = void 0 === deps ? null : deps;
|
6289 | var prevState = hook.memoizedState;
|
6290 | if (null !== deps && areHookInputsEqual(deps, prevState[1]))
|
6291 | return prevState[0];
|
6292 | prevState = nextCreate();
|
6293 | shouldDoubleInvokeUserFnsInHooksDEV &&
|
6294 | (setIsStrictModeForDevtools(!0),
|
6295 | nextCreate(),
|
6296 | setIsStrictModeForDevtools(!1));
|
6297 | hook.memoizedState = [prevState, deps];
|
6298 | return prevState;
|
6299 | }
|
6300 | function mountDeferredValueImpl(hook, value, initialValue) {
|
6301 | if (void 0 === initialValue || 0 !== (renderLanes & 1073741824))
|
6302 | return (hook.memoizedState = value);
|
6303 | hook.memoizedState = initialValue;
|
6304 | hook = requestDeferredLane();
|
6305 | currentlyRenderingFiber$1.lanes |= hook;
|
6306 | workInProgressRootSkippedLanes |= hook;
|
6307 | return initialValue;
|
6308 | }
|
6309 | function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
|
6310 | if (objectIs(value, prevValue)) return value;
|
6311 | if (null !== currentTreeHiddenStackCursor.current)
|
6312 | return (
|
6313 | (hook = mountDeferredValueImpl(hook, value, initialValue)),
|
6314 | objectIs(hook, prevValue) || (didReceiveUpdate = !0),
|
6315 | hook
|
6316 | );
|
6317 | if (0 === (renderLanes & 42))
|
6318 | return (didReceiveUpdate = !0), (hook.memoizedState = value);
|
6319 | hook = requestDeferredLane();
|
6320 | currentlyRenderingFiber$1.lanes |= hook;
|
6321 | workInProgressRootSkippedLanes |= hook;
|
6322 | return prevValue;
|
6323 | }
|
6324 | function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
6325 | var previousPriority = ReactDOMSharedInternals.p;
|
6326 | ReactDOMSharedInternals.p =
|
6327 | 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
|
6328 | var prevTransition = ReactSharedInternals.T,
|
6329 | currentTransition = { _callbacks: new Set() };
|
6330 | ReactSharedInternals.T = currentTransition;
|
6331 | dispatchOptimisticSetState(fiber, !1, queue, pendingState);
|
6332 | try {
|
6333 | var returnValue = callback();
|
6334 | if (
|
6335 | null !== returnValue &&
|
6336 | "object" === typeof returnValue &&
|
6337 | "function" === typeof returnValue.then
|
6338 | ) {
|
6339 | notifyTransitionCallbacks(currentTransition, returnValue);
|
6340 | var thenableForFinishedState = chainThenableValue(
|
6341 | returnValue,
|
6342 | finishedState
|
6343 | );
|
6344 | dispatchSetState(fiber, queue, thenableForFinishedState);
|
6345 | } else dispatchSetState(fiber, queue, finishedState);
|
6346 | } catch (error) {
|
6347 | dispatchSetState(fiber, queue, {
|
6348 | then: function () {},
|
6349 | status: "rejected",
|
6350 | reason: error
|
6351 | });
|
6352 | } finally {
|
6353 | (ReactDOMSharedInternals.p = previousPriority),
|
6354 | (ReactSharedInternals.T = prevTransition);
|
6355 | }
|
6356 | }
|
6357 | function startHostTransition(formFiber, pendingState, callback, formData) {
|
6358 | if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));
|
6359 | var queue = ensureFormComponentIsStateful(formFiber).queue;
|
6360 | startTransition(
|
6361 | formFiber,
|
6362 | queue,
|
6363 | pendingState,
|
6364 | sharedNotPendingObject,
|
6365 | function () {
|
6366 | requestFormReset$2(formFiber);
|
6367 | return callback(formData);
|
6368 | }
|
6369 | );
|
6370 | }
|
6371 | function ensureFormComponentIsStateful(formFiber) {
|
6372 | var existingStateHook = formFiber.memoizedState;
|
6373 | if (null !== existingStateHook) return existingStateHook;
|
6374 | existingStateHook = {
|
6375 | memoizedState: sharedNotPendingObject,
|
6376 | baseState: sharedNotPendingObject,
|
6377 | baseQueue: null,
|
6378 | queue: {
|
6379 | pending: null,
|
6380 | lanes: 0,
|
6381 | dispatch: null,
|
6382 | lastRenderedReducer: basicStateReducer,
|
6383 | lastRenderedState: sharedNotPendingObject
|
6384 | },
|
6385 | next: null
|
6386 | };
|
6387 | var initialResetState = {};
|
6388 | existingStateHook.next = {
|
6389 | memoizedState: initialResetState,
|
6390 | baseState: initialResetState,
|
6391 | baseQueue: null,
|
6392 | queue: {
|
6393 | pending: null,
|
6394 | lanes: 0,
|
6395 | dispatch: null,
|
6396 | lastRenderedReducer: basicStateReducer,
|
6397 | lastRenderedState: initialResetState
|
6398 | },
|
6399 | next: null
|
6400 | };
|
6401 | formFiber.memoizedState = existingStateHook;
|
6402 | formFiber = formFiber.alternate;
|
6403 | null !== formFiber && (formFiber.memoizedState = existingStateHook);
|
6404 | return existingStateHook;
|
6405 | }
|
6406 | function requestFormReset$2(formFiber) {
|
6407 | requestCurrentTransition();
|
6408 | var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue;
|
6409 | dispatchSetState(formFiber, resetStateQueue, {});
|
6410 | }
|
6411 | function useHostTransitionStatus() {
|
6412 | var status = readContext(HostTransitionContext);
|
6413 | return null !== status ? status : sharedNotPendingObject;
|
6414 | }
|
6415 | function updateId() {
|
6416 | return updateWorkInProgressHook().memoizedState;
|
6417 | }
|
6418 | function updateRefresh() {
|
6419 | return updateWorkInProgressHook().memoizedState;
|
6420 | }
|
6421 | function refreshCache(fiber) {
|
6422 | for (var provider = fiber.return; null !== provider; ) {
|
6423 | switch (provider.tag) {
|
6424 | case 24:
|
6425 | case 3:
|
6426 | var lane = requestUpdateLane();
|
6427 | fiber = createUpdate(lane);
|
6428 | var root$114 = enqueueUpdate(provider, fiber, lane);
|
6429 | null !== root$114 &&
|
6430 | (scheduleUpdateOnFiber(root$114, provider, lane),
|
6431 | entangleTransitions(root$114, provider, lane));
|
6432 | provider = { cache: createCache() };
|
6433 | fiber.payload = provider;
|
6434 | return;
|
6435 | }
|
6436 | provider = provider.return;
|
6437 | }
|
6438 | }
|
6439 | function dispatchReducerAction(fiber, queue, action) {
|
6440 | var lane = requestUpdateLane();
|
6441 | action = {
|
6442 | lane: lane,
|
6443 | revertLane: 0,
|
6444 | action: action,
|
6445 | hasEagerState: !1,
|
6446 | eagerState: null,
|
6447 | next: null
|
6448 | };
|
6449 | isRenderPhaseUpdate(fiber)
|
6450 | ? enqueueRenderPhaseUpdate(queue, action)
|
6451 | : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),
|
6452 | null !== action &&
|
6453 | (scheduleUpdateOnFiber(action, fiber, lane),
|
6454 | entangleTransitionUpdate(action, queue, lane)));
|
6455 | markStateUpdateScheduled(fiber, lane);
|
6456 | }
|
6457 | function dispatchSetState(fiber, queue, action) {
|
6458 | var lane = requestUpdateLane(),
|
6459 | update = {
|
6460 | lane: lane,
|
6461 | revertLane: 0,
|
6462 | action: action,
|
6463 | hasEagerState: !1,
|
6464 | eagerState: null,
|
6465 | next: null
|
6466 | };
|
6467 | if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
|
6468 | else {
|
6469 | var alternate = fiber.alternate;
|
6470 | if (
|
6471 | 0 === fiber.lanes &&
|
6472 | (null === alternate || 0 === alternate.lanes) &&
|
6473 | ((alternate = queue.lastRenderedReducer), null !== alternate)
|
6474 | )
|
6475 | try {
|
6476 | var currentState = queue.lastRenderedState,
|
6477 | eagerState = alternate(currentState, action);
|
6478 | update.hasEagerState = !0;
|
6479 | update.eagerState = eagerState;
|
6480 | if (objectIs(eagerState, currentState)) {
|
6481 | enqueueUpdate$1(fiber, queue, update, 0);
|
6482 | null === workInProgressRoot && finishQueueingConcurrentUpdates();
|
6483 | return;
|
6484 | }
|
6485 | } catch (error) {
|
6486 | } finally {
|
6487 | }
|
6488 | action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
|
6489 | null !== action &&
|
6490 | (scheduleUpdateOnFiber(action, fiber, lane),
|
6491 | entangleTransitionUpdate(action, queue, lane));
|
6492 | }
|
6493 | markStateUpdateScheduled(fiber, lane);
|
6494 | }
|
6495 | function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
|
6496 | requestCurrentTransition();
|
6497 | action = {
|
6498 | lane: 2,
|
6499 | revertLane: requestTransitionLane(),
|
6500 | action: action,
|
6501 | hasEagerState: !1,
|
6502 | eagerState: null,
|
6503 | next: null
|
6504 | };
|
6505 | if (isRenderPhaseUpdate(fiber)) {
|
6506 | if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
|
6507 | } else
|
6508 | (throwIfDuringRender = enqueueConcurrentHookUpdate(
|
6509 | fiber,
|
6510 | queue,
|
6511 | action,
|
6512 | 2
|
6513 | )),
|
6514 | null !== throwIfDuringRender &&
|
6515 | scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
|
6516 | markStateUpdateScheduled(fiber, 2);
|
6517 | }
|
6518 | function isRenderPhaseUpdate(fiber) {
|
6519 | var alternate = fiber.alternate;
|
6520 | return (
|
6521 | fiber === currentlyRenderingFiber$1 ||
|
6522 | (null !== alternate && alternate === currentlyRenderingFiber$1)
|
6523 | );
|
6524 | }
|
6525 | function enqueueRenderPhaseUpdate(queue, update) {
|
6526 | didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =
|
6527 | !0;
|
6528 | var pending = queue.pending;
|
6529 | null === pending
|
6530 | ? (update.next = update)
|
6531 | : ((update.next = pending.next), (pending.next = update));
|
6532 | queue.pending = update;
|
6533 | }
|
6534 | function entangleTransitionUpdate(root, queue, lane) {
|
6535 | if (0 !== (lane & 4194176)) {
|
6536 | var queueLanes = queue.lanes;
|
6537 | queueLanes &= root.pendingLanes;
|
6538 | lane |= queueLanes;
|
6539 | queue.lanes = lane;
|
6540 | markRootEntangled(root, lane);
|
6541 | }
|
6542 | }
|
6543 | var ContextOnlyDispatcher = {
|
6544 | readContext: readContext,
|
6545 | use: use,
|
6546 | useCallback: throwInvalidHookError,
|
6547 | useContext: throwInvalidHookError,
|
6548 | useEffect: throwInvalidHookError,
|
6549 | useImperativeHandle: throwInvalidHookError,
|
6550 | useLayoutEffect: throwInvalidHookError,
|
6551 | useInsertionEffect: throwInvalidHookError,
|
6552 | useMemo: throwInvalidHookError,
|
6553 | useReducer: throwInvalidHookError,
|
6554 | useRef: throwInvalidHookError,
|
6555 | useState: throwInvalidHookError,
|
6556 | useDebugValue: throwInvalidHookError,
|
6557 | useDeferredValue: throwInvalidHookError,
|
6558 | useTransition: throwInvalidHookError,
|
6559 | useSyncExternalStore: throwInvalidHookError,
|
6560 | useId: throwInvalidHookError
|
6561 | };
|
6562 | ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError;
|
6563 | ContextOnlyDispatcher.useHostTransitionStatus = throwInvalidHookError;
|
6564 | ContextOnlyDispatcher.useFormState = throwInvalidHookError;
|
6565 | ContextOnlyDispatcher.useActionState = throwInvalidHookError;
|
6566 | ContextOnlyDispatcher.useOptimistic = throwInvalidHookError;
|
6567 | var HooksDispatcherOnMount = {
|
6568 | readContext: readContext,
|
6569 | use: use,
|
6570 | useCallback: function (callback, deps) {
|
6571 | mountWorkInProgressHook().memoizedState = [
|
6572 | callback,
|
6573 | void 0 === deps ? null : deps
|
6574 | ];
|
6575 | return callback;
|
6576 | },
|
6577 | useContext: readContext,
|
6578 | useEffect: mountEffect,
|
6579 | useImperativeHandle: function (ref, create, deps) {
|
6580 | deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
|
6581 | mountEffectImpl(
|
6582 | 4194308,
|
6583 | 4,
|
6584 | imperativeHandleEffect.bind(null, create, ref),
|
6585 | deps
|
6586 | );
|
6587 | },
|
6588 | useLayoutEffect: function (create, deps) {
|
6589 | return mountEffectImpl(4194308, 4, create, deps);
|
6590 | },
|
6591 | useInsertionEffect: function (create, deps) {
|
6592 | mountEffectImpl(4, 2, create, deps);
|
6593 | },
|
6594 | useMemo: function (nextCreate, deps) {
|
6595 | var hook = mountWorkInProgressHook();
|
6596 | deps = void 0 === deps ? null : deps;
|
6597 | var nextValue = nextCreate();
|
6598 | shouldDoubleInvokeUserFnsInHooksDEV &&
|
6599 | (setIsStrictModeForDevtools(!0),
|
6600 | nextCreate(),
|
6601 | setIsStrictModeForDevtools(!1));
|
6602 | hook.memoizedState = [nextValue, deps];
|
6603 | return nextValue;
|
6604 | },
|
6605 | useReducer: function (reducer, initialArg, init) {
|
6606 | var hook = mountWorkInProgressHook();
|
6607 | if (void 0 !== init) {
|
6608 | var initialState = init(initialArg);
|
6609 | shouldDoubleInvokeUserFnsInHooksDEV &&
|
6610 | (setIsStrictModeForDevtools(!0),
|
6611 | init(initialArg),
|
6612 | setIsStrictModeForDevtools(!1));
|
6613 | } else initialState = initialArg;
|
6614 | hook.memoizedState = hook.baseState = initialState;
|
6615 | reducer = {
|
6616 | pending: null,
|
6617 | lanes: 0,
|
6618 | dispatch: null,
|
6619 | lastRenderedReducer: reducer,
|
6620 | lastRenderedState: initialState
|
6621 | };
|
6622 | hook.queue = reducer;
|
6623 | reducer = reducer.dispatch = dispatchReducerAction.bind(
|
6624 | null,
|
6625 | currentlyRenderingFiber$1,
|
6626 | reducer
|
6627 | );
|
6628 | return [hook.memoizedState, reducer];
|
6629 | },
|
6630 | useRef: function (initialValue) {
|
6631 | var hook = mountWorkInProgressHook();
|
6632 | initialValue = { current: initialValue };
|
6633 | return (hook.memoizedState = initialValue);
|
6634 | },
|
6635 | useState: function (initialState) {
|
6636 | initialState = mountStateImpl(initialState);
|
6637 | var queue = initialState.queue,
|
6638 | dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);
|
6639 | queue.dispatch = dispatch;
|
6640 | return [initialState.memoizedState, dispatch];
|
6641 | },
|
6642 | useDebugValue: mountDebugValue,
|
6643 | useDeferredValue: function (value, initialValue) {
|
6644 | var hook = mountWorkInProgressHook();
|
6645 | return mountDeferredValueImpl(hook, value, initialValue);
|
6646 | },
|
6647 | useTransition: function () {
|
6648 | var stateHook = mountStateImpl(!1);
|
6649 | stateHook = startTransition.bind(
|
6650 | null,
|
6651 | currentlyRenderingFiber$1,
|
6652 | stateHook.queue,
|
6653 | !0,
|
6654 | !1
|
6655 | );
|
6656 | mountWorkInProgressHook().memoizedState = stateHook;
|
6657 | return [!1, stateHook];
|
6658 | },
|
6659 | useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
|
6660 | var fiber = currentlyRenderingFiber$1,
|
6661 | hook = mountWorkInProgressHook();
|
6662 | if (isHydrating) {
|
6663 | if (void 0 === getServerSnapshot)
|
6664 | throw Error(formatProdErrorMessage(407));
|
6665 | getServerSnapshot = getServerSnapshot();
|
6666 | } else {
|
6667 | getServerSnapshot = getSnapshot();
|
6668 | if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
|
6669 | 0 !== (workInProgressRootRenderLanes & 60) ||
|
6670 | pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
|
6671 | }
|
6672 | hook.memoizedState = getServerSnapshot;
|
6673 | var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
|
6674 | hook.queue = inst;
|
6675 | mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
|
6676 | subscribe
|
6677 | ]);
|
6678 | fiber.flags |= 2048;
|
6679 | pushEffect(
|
6680 | 9,
|
6681 | updateStoreInstance.bind(
|
6682 | null,
|
6683 | fiber,
|
6684 | inst,
|
6685 | getServerSnapshot,
|
6686 | getSnapshot
|
6687 | ),
|
6688 | { destroy: void 0 },
|
6689 | null
|
6690 | );
|
6691 | return getServerSnapshot;
|
6692 | },
|
6693 | useId: function () {
|
6694 | var hook = mountWorkInProgressHook(),
|
6695 | identifierPrefix = workInProgressRoot.identifierPrefix;
|
6696 | if (isHydrating) {
|
6697 | var JSCompiler_inline_result = treeContextOverflow;
|
6698 | var idWithLeadingBit = treeContextId;
|
6699 | JSCompiler_inline_result =
|
6700 | (
|
6701 | idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))
|
6702 | ).toString(32) + JSCompiler_inline_result;
|
6703 | identifierPrefix =
|
6704 | ":" + identifierPrefix + "R" + JSCompiler_inline_result;
|
6705 | JSCompiler_inline_result = localIdCounter++;
|
6706 | 0 < JSCompiler_inline_result &&
|
6707 | (identifierPrefix += "H" + JSCompiler_inline_result.toString(32));
|
6708 | identifierPrefix += ":";
|
6709 | } else
|
6710 | (JSCompiler_inline_result = globalClientIdCounter++),
|
6711 | (identifierPrefix =
|
6712 | ":" +
|
6713 | identifierPrefix +
|
6714 | "r" +
|
6715 | JSCompiler_inline_result.toString(32) +
|
6716 | ":");
|
6717 | return (hook.memoizedState = identifierPrefix);
|
6718 | },
|
6719 | useCacheRefresh: function () {
|
6720 | return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
|
6721 | null,
|
6722 | currentlyRenderingFiber$1
|
6723 | ));
|
6724 | }
|
6725 | };
|
6726 | HooksDispatcherOnMount.useHostTransitionStatus = useHostTransitionStatus;
|
6727 | HooksDispatcherOnMount.useFormState = mountActionState;
|
6728 | HooksDispatcherOnMount.useActionState = mountActionState;
|
6729 | HooksDispatcherOnMount.useOptimistic = function (passthrough) {
|
6730 | var hook = mountWorkInProgressHook();
|
6731 | hook.memoizedState = hook.baseState = passthrough;
|
6732 | var queue = {
|
6733 | pending: null,
|
6734 | lanes: 0,
|
6735 | dispatch: null,
|
6736 | lastRenderedReducer: null,
|
6737 | lastRenderedState: null
|
6738 | };
|
6739 | hook.queue = queue;
|
6740 | hook = dispatchOptimisticSetState.bind(
|
6741 | null,
|
6742 | currentlyRenderingFiber$1,
|
6743 | !0,
|
6744 | queue
|
6745 | );
|
6746 | queue.dispatch = hook;
|
6747 | return [passthrough, hook];
|
6748 | };
|
6749 | var HooksDispatcherOnUpdate = {
|
6750 | readContext: readContext,
|
6751 | use: use,
|
6752 | useCallback: updateCallback,
|
6753 | useContext: readContext,
|
6754 | useEffect: updateEffect,
|
6755 | useImperativeHandle: updateImperativeHandle,
|
6756 | useInsertionEffect: updateInsertionEffect,
|
6757 | useLayoutEffect: updateLayoutEffect,
|
6758 | useMemo: updateMemo,
|
6759 | useReducer: updateReducer,
|
6760 | useRef: updateRef,
|
6761 | useState: function () {
|
6762 | return updateReducer(basicStateReducer);
|
6763 | },
|
6764 | useDebugValue: mountDebugValue,
|
6765 | useDeferredValue: function (value, initialValue) {
|
6766 | var hook = updateWorkInProgressHook();
|
6767 | return updateDeferredValueImpl(
|
6768 | hook,
|
6769 | currentHook.memoizedState,
|
6770 | value,
|
6771 | initialValue
|
6772 | );
|
6773 | },
|
6774 | useTransition: function () {
|
6775 | var booleanOrThenable = updateReducer(basicStateReducer)[0],
|
6776 | start = updateWorkInProgressHook().memoizedState;
|
6777 | return [
|
6778 | "boolean" === typeof booleanOrThenable
|
6779 | ? booleanOrThenable
|
6780 | : useThenable(booleanOrThenable),
|
6781 | start
|
6782 | ];
|
6783 | },
|
6784 | useSyncExternalStore: updateSyncExternalStore,
|
6785 | useId: updateId
|
6786 | };
|
6787 | HooksDispatcherOnUpdate.useCacheRefresh = updateRefresh;
|
6788 | HooksDispatcherOnUpdate.useHostTransitionStatus = useHostTransitionStatus;
|
6789 | HooksDispatcherOnUpdate.useFormState = updateActionState;
|
6790 | HooksDispatcherOnUpdate.useActionState = updateActionState;
|
6791 | HooksDispatcherOnUpdate.useOptimistic = function (passthrough, reducer) {
|
6792 | var hook = updateWorkInProgressHook();
|
6793 | return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
6794 | };
|
6795 | var HooksDispatcherOnRerender = {
|
6796 | readContext: readContext,
|
6797 | use: use,
|
6798 | useCallback: updateCallback,
|
6799 | useContext: readContext,
|
6800 | useEffect: updateEffect,
|
6801 | useImperativeHandle: updateImperativeHandle,
|
6802 | useInsertionEffect: updateInsertionEffect,
|
6803 | useLayoutEffect: updateLayoutEffect,
|
6804 | useMemo: updateMemo,
|
6805 | useReducer: rerenderReducer,
|
6806 | useRef: updateRef,
|
6807 | useState: function () {
|
6808 | return rerenderReducer(basicStateReducer);
|
6809 | },
|
6810 | useDebugValue: mountDebugValue,
|
6811 | useDeferredValue: function (value, initialValue) {
|
6812 | var hook = updateWorkInProgressHook();
|
6813 | return null === currentHook
|
6814 | ? mountDeferredValueImpl(hook, value, initialValue)
|
6815 | : updateDeferredValueImpl(
|
6816 | hook,
|
6817 | currentHook.memoizedState,
|
6818 | value,
|
6819 | initialValue
|
6820 | );
|
6821 | },
|
6822 | useTransition: function () {
|
6823 | var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
|
6824 | start = updateWorkInProgressHook().memoizedState;
|
6825 | return [
|
6826 | "boolean" === typeof booleanOrThenable
|
6827 | ? booleanOrThenable
|
6828 | : useThenable(booleanOrThenable),
|
6829 | start
|
6830 | ];
|
6831 | },
|
6832 | useSyncExternalStore: updateSyncExternalStore,
|
6833 | useId: updateId
|
6834 | };
|
6835 | HooksDispatcherOnRerender.useCacheRefresh = updateRefresh;
|
6836 | HooksDispatcherOnRerender.useHostTransitionStatus = useHostTransitionStatus;
|
6837 | HooksDispatcherOnRerender.useFormState = rerenderActionState;
|
6838 | HooksDispatcherOnRerender.useActionState = rerenderActionState;
|
6839 | HooksDispatcherOnRerender.useOptimistic = function (passthrough, reducer) {
|
6840 | var hook = updateWorkInProgressHook();
|
6841 | if (null !== currentHook)
|
6842 | return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
6843 | hook.baseState = passthrough;
|
6844 | return [passthrough, hook.queue.dispatch];
|
6845 | };
|
6846 | var now = Scheduler.unstable_now,
|
6847 | commitTime = 0,
|
6848 | layoutEffectStartTime = -1,
|
6849 | profilerStartTime = -1,
|
6850 | passiveEffectStartTime = -1,
|
6851 | currentUpdateIsNested = !1,
|
6852 | nestedUpdateScheduled = !1;
|
6853 | function startProfilerTimer(fiber) {
|
6854 | profilerStartTime = now();
|
6855 | 0 > fiber.actualStartTime && (fiber.actualStartTime = now());
|
6856 | }
|
6857 | function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
|
6858 | if (0 <= profilerStartTime) {
|
6859 | var elapsedTime = now() - profilerStartTime;
|
6860 | fiber.actualDuration += elapsedTime;
|
6861 | overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
|
6862 | profilerStartTime = -1;
|
6863 | }
|
6864 | }
|
6865 | function recordLayoutEffectDuration(fiber) {
|
6866 | if (0 <= layoutEffectStartTime) {
|
6867 | var elapsedTime = now() - layoutEffectStartTime;
|
6868 | layoutEffectStartTime = -1;
|
6869 | for (fiber = fiber.return; null !== fiber; ) {
|
6870 | switch (fiber.tag) {
|
6871 | case 3:
|
6872 | fiber.stateNode.effectDuration += elapsedTime;
|
6873 | return;
|
6874 | case 12:
|
6875 | fiber.stateNode.effectDuration += elapsedTime;
|
6876 | return;
|
6877 | }
|
6878 | fiber = fiber.return;
|
6879 | }
|
6880 | }
|
6881 | }
|
6882 | function recordPassiveEffectDuration(fiber) {
|
6883 | if (0 <= passiveEffectStartTime) {
|
6884 | var elapsedTime = now() - passiveEffectStartTime;
|
6885 | passiveEffectStartTime = -1;
|
6886 | for (fiber = fiber.return; null !== fiber; ) {
|
6887 | switch (fiber.tag) {
|
6888 | case 3:
|
6889 | fiber = fiber.stateNode;
|
6890 | null !== fiber && (fiber.passiveEffectDuration += elapsedTime);
|
6891 | return;
|
6892 | case 12:
|
6893 | fiber = fiber.stateNode;
|
6894 | null !== fiber && (fiber.passiveEffectDuration += elapsedTime);
|
6895 | return;
|
6896 | }
|
6897 | fiber = fiber.return;
|
6898 | }
|
6899 | }
|
6900 | }
|
6901 | function startLayoutEffectTimer() {
|
6902 | layoutEffectStartTime = now();
|
6903 | }
|
6904 | function transferActualDuration(fiber) {
|
6905 | for (var child = fiber.child; child; )
|
6906 | (fiber.actualDuration += child.actualDuration), (child = child.sibling);
|
6907 | }
|
6908 | function defaultOnUncaughtError(error) {
|
6909 | reportGlobalError(error);
|
6910 | }
|
6911 | function defaultOnCaughtError(error) {
|
6912 | console.error(error);
|
6913 | }
|
6914 | function defaultOnRecoverableError(error) {
|
6915 | reportGlobalError(error);
|
6916 | }
|
6917 | function logUncaughtError(root, errorInfo) {
|
6918 | try {
|
6919 | var onUncaughtError = root.onUncaughtError;
|
6920 | onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
|
6921 | } catch (e$120) {
|
6922 | setTimeout(function () {
|
6923 | throw e$120;
|
6924 | });
|
6925 | }
|
6926 | }
|
6927 | function logCaughtError(root, boundary, errorInfo) {
|
6928 | try {
|
6929 | var onCaughtError = root.onCaughtError;
|
6930 | onCaughtError(errorInfo.value, {
|
6931 | componentStack: errorInfo.stack,
|
6932 | errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
|
6933 | });
|
6934 | } catch (e$121) {
|
6935 | setTimeout(function () {
|
6936 | throw e$121;
|
6937 | });
|
6938 | }
|
6939 | }
|
6940 | function createRootErrorUpdate(root, errorInfo, lane) {
|
6941 | lane = createUpdate(lane);
|
6942 | lane.tag = 3;
|
6943 | lane.payload = { element: null };
|
6944 | lane.callback = function () {
|
6945 | logUncaughtError(root, errorInfo);
|
6946 | };
|
6947 | return lane;
|
6948 | }
|
6949 | function createClassErrorUpdate(lane) {
|
6950 | lane = createUpdate(lane);
|
6951 | lane.tag = 3;
|
6952 | return lane;
|
6953 | }
|
6954 | function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
|
6955 | var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
|
6956 | if ("function" === typeof getDerivedStateFromError) {
|
6957 | var error = errorInfo.value;
|
6958 | update.payload = function () {
|
6959 | return getDerivedStateFromError(error);
|
6960 | };
|
6961 | update.callback = function () {
|
6962 | logCaughtError(root, fiber, errorInfo);
|
6963 | };
|
6964 | }
|
6965 | var inst = fiber.stateNode;
|
6966 | null !== inst &&
|
6967 | "function" === typeof inst.componentDidCatch &&
|
6968 | (update.callback = function () {
|
6969 | logCaughtError(root, fiber, errorInfo);
|
6970 | "function" !== typeof getDerivedStateFromError &&
|
6971 | (null === legacyErrorBoundariesThatAlreadyFailed
|
6972 | ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
|
6973 | : legacyErrorBoundariesThatAlreadyFailed.add(this));
|
6974 | var stack = errorInfo.stack;
|
6975 | this.componentDidCatch(errorInfo.value, {
|
6976 | componentStack: null !== stack ? stack : ""
|
6977 | });
|
6978 | });
|
6979 | }
|
6980 | function throwException(
|
6981 | root,
|
6982 | returnFiber,
|
6983 | sourceFiber,
|
6984 | value,
|
6985 | rootRenderLanes
|
6986 | ) {
|
6987 | sourceFiber.flags |= 32768;
|
6988 | isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes);
|
6989 | if (
|
6990 | null !== value &&
|
6991 | "object" === typeof value &&
|
6992 | "function" === typeof value.then
|
6993 | ) {
|
6994 | sourceFiber = suspenseHandlerStackCursor.current;
|
6995 | if (null !== sourceFiber) {
|
6996 | switch (sourceFiber.tag) {
|
6997 | case 13:
|
6998 | return (
|
6999 | null === shellBoundary
|
7000 | ? renderDidSuspendDelayIfPossible()
|
7001 | : null === sourceFiber.alternate &&
|
7002 | 0 === workInProgressRootExitStatus &&
|
7003 | (workInProgressRootExitStatus = 3),
|
7004 | (sourceFiber.flags &= -257),
|
7005 | (sourceFiber.flags |= 65536),
|
7006 | (sourceFiber.lanes = rootRenderLanes),
|
7007 | value === noopSuspenseyCommitThenable
|
7008 | ? (sourceFiber.flags |= 16384)
|
7009 | : ((returnFiber = sourceFiber.updateQueue),
|
7010 | null === returnFiber
|
7011 | ? (sourceFiber.updateQueue = new Set([value]))
|
7012 | : returnFiber.add(value),
|
7013 | attachPingListener(root, value, rootRenderLanes)),
|
7014 | !1
|
7015 | );
|
7016 | case 22:
|
7017 | return (
|
7018 | (sourceFiber.flags |= 65536),
|
7019 | value === noopSuspenseyCommitThenable
|
7020 | ? (sourceFiber.flags |= 16384)
|
7021 | : ((returnFiber = sourceFiber.updateQueue),
|
7022 | null === returnFiber
|
7023 | ? ((returnFiber = {
|
7024 | transitions: null,
|
7025 | markerInstances: null,
|
7026 | retryQueue: new Set([value])
|
7027 | }),
|
7028 | (sourceFiber.updateQueue = returnFiber))
|
7029 | : ((sourceFiber = returnFiber.retryQueue),
|
7030 | null === sourceFiber
|
7031 | ? (returnFiber.retryQueue = new Set([value]))
|
7032 | : sourceFiber.add(value)),
|
7033 | attachPingListener(root, value, rootRenderLanes)),
|
7034 | !1
|
7035 | );
|
7036 | }
|
7037 | throw Error(formatProdErrorMessage(435, sourceFiber.tag));
|
7038 | }
|
7039 | attachPingListener(root, value, rootRenderLanes);
|
7040 | renderDidSuspendDelayIfPossible();
|
7041 | return !1;
|
7042 | }
|
7043 | if (isHydrating)
|
7044 | return (
|
7045 | (returnFiber = suspenseHandlerStackCursor.current),
|
7046 | null !== returnFiber
|
7047 | ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),
|
7048 | (returnFiber.flags |= 65536),
|
7049 | (returnFiber.lanes = rootRenderLanes),
|
7050 | value !== HydrationMismatchException &&
|
7051 | ((root = Error(formatProdErrorMessage(422), { cause: value })),
|
7052 | queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))
|
7053 | : (value !== HydrationMismatchException &&
|
7054 | ((returnFiber = Error(formatProdErrorMessage(423), {
|
7055 | cause: value
|
7056 | })),
|
7057 | queueHydrationError(
|
7058 | createCapturedValueAtFiber(returnFiber, sourceFiber)
|
7059 | )),
|
7060 | (root = root.current.alternate),
|
7061 | (root.flags |= 65536),
|
7062 | (rootRenderLanes &= -rootRenderLanes),
|
7063 | (root.lanes |= rootRenderLanes),
|
7064 | (value = createCapturedValueAtFiber(value, sourceFiber)),
|
7065 | (rootRenderLanes = createRootErrorUpdate(
|
7066 | root.stateNode,
|
7067 | value,
|
7068 | rootRenderLanes
|
7069 | )),
|
7070 | enqueueCapturedUpdate(root, rootRenderLanes),
|
7071 | 4 !== workInProgressRootExitStatus &&
|
7072 | (workInProgressRootExitStatus = 2)),
|
7073 | !1
|
7074 | );
|
7075 | var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
|
7076 | wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);
|
7077 | null === workInProgressRootConcurrentErrors
|
7078 | ? (workInProgressRootConcurrentErrors = [wrapperError])
|
7079 | : workInProgressRootConcurrentErrors.push(wrapperError);
|
7080 | 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);
|
7081 | if (null === returnFiber) return !0;
|
7082 | value = createCapturedValueAtFiber(value, sourceFiber);
|
7083 | sourceFiber = returnFiber;
|
7084 | do {
|
7085 | switch (sourceFiber.tag) {
|
7086 | case 3:
|
7087 | return (
|
7088 | (sourceFiber.flags |= 65536),
|
7089 | (root = rootRenderLanes & -rootRenderLanes),
|
7090 | (sourceFiber.lanes |= root),
|
7091 | (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),
|
7092 | enqueueCapturedUpdate(sourceFiber, root),
|
7093 | !1
|
7094 | );
|
7095 | case 1:
|
7096 | if (
|
7097 | ((returnFiber = sourceFiber.type),
|
7098 | (wrapperError = sourceFiber.stateNode),
|
7099 | 0 === (sourceFiber.flags & 128) &&
|
7100 | ("function" === typeof returnFiber.getDerivedStateFromError ||
|
7101 | (null !== wrapperError &&
|
7102 | "function" === typeof wrapperError.componentDidCatch &&
|
7103 | (null === legacyErrorBoundariesThatAlreadyFailed ||
|
7104 | !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))
|
7105 | )
|
7106 | return (
|
7107 | (sourceFiber.flags |= 65536),
|
7108 | (rootRenderLanes &= -rootRenderLanes),
|
7109 | (sourceFiber.lanes |= rootRenderLanes),
|
7110 | (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),
|
7111 | initializeClassErrorUpdate(
|
7112 | rootRenderLanes,
|
7113 | root,
|
7114 | sourceFiber,
|
7115 | value
|
7116 | ),
|
7117 | enqueueCapturedUpdate(sourceFiber, rootRenderLanes),
|
7118 | !1
|
7119 | );
|
7120 | }
|
7121 | sourceFiber = sourceFiber.return;
|
7122 | } while (null !== sourceFiber);
|
7123 | return !1;
|
7124 | }
|
7125 | var SelectiveHydrationException = Error(formatProdErrorMessage(461)),
|
7126 | didReceiveUpdate = !1;
|
7127 | function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
|
7128 | workInProgress.child =
|
7129 | null === current
|
7130 | ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
|
7131 | : reconcileChildFibers(
|
7132 | workInProgress,
|
7133 | current.child,
|
7134 | nextChildren,
|
7135 | renderLanes
|
7136 | );
|
7137 | }
|
7138 | function updateForwardRef(
|
7139 | current,
|
7140 | workInProgress,
|
7141 | Component,
|
7142 | nextProps,
|
7143 | renderLanes
|
7144 | ) {
|
7145 | Component = Component.render;
|
7146 | var ref = workInProgress.ref;
|
7147 | if ("ref" in nextProps) {
|
7148 | var propsWithoutRef = {};
|
7149 | for (var key in nextProps)
|
7150 | "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
|
7151 | } else propsWithoutRef = nextProps;
|
7152 | prepareToReadContext(workInProgress, renderLanes);
|
7153 | markComponentRenderStarted(workInProgress);
|
7154 | nextProps = renderWithHooks(
|
7155 | current,
|
7156 | workInProgress,
|
7157 | Component,
|
7158 | propsWithoutRef,
|
7159 | ref,
|
7160 | renderLanes
|
7161 | );
|
7162 | key = checkDidRenderIdHook();
|
7163 | markComponentRenderStopped();
|
7164 | if (null !== current && !didReceiveUpdate)
|
7165 | return (
|
7166 | bailoutHooks(current, workInProgress, renderLanes),
|
7167 | bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
7168 | );
|
7169 | isHydrating && key && pushMaterializedTreeId(workInProgress);
|
7170 | workInProgress.flags |= 1;
|
7171 | reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
7172 | return workInProgress.child;
|
7173 | }
|
7174 | function updateMemoComponent(
|
7175 | current,
|
7176 | workInProgress,
|
7177 | Component,
|
7178 | nextProps,
|
7179 | renderLanes
|
7180 | ) {
|
7181 | if (null === current) {
|
7182 | var type = Component.type;
|
7183 | if (
|
7184 | "function" === typeof type &&
|
7185 | !shouldConstruct(type) &&
|
7186 | void 0 === type.defaultProps &&
|
7187 | null === Component.compare
|
7188 | )
|
7189 | return (
|
7190 | (workInProgress.tag = 15),
|
7191 | (workInProgress.type = type),
|
7192 | updateSimpleMemoComponent(
|
7193 | current,
|
7194 | workInProgress,
|
7195 | type,
|
7196 | nextProps,
|
7197 | renderLanes
|
7198 | )
|
7199 | );
|
7200 | current = createFiberFromTypeAndProps(
|
7201 | Component.type,
|
7202 | null,
|
7203 | nextProps,
|
7204 | workInProgress,
|
7205 | workInProgress.mode,
|
7206 | renderLanes
|
7207 | );
|
7208 | current.ref = workInProgress.ref;
|
7209 | current.return = workInProgress;
|
7210 | return (workInProgress.child = current);
|
7211 | }
|
7212 | type = current.child;
|
7213 | if (0 === (current.lanes & renderLanes)) {
|
7214 | var prevProps = type.memoizedProps;
|
7215 | Component = Component.compare;
|
7216 | Component = null !== Component ? Component : shallowEqual;
|
7217 | if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
|
7218 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
7219 | }
|
7220 | workInProgress.flags |= 1;
|
7221 | current = createWorkInProgress(type, nextProps);
|
7222 | current.ref = workInProgress.ref;
|
7223 | current.return = workInProgress;
|
7224 | return (workInProgress.child = current);
|
7225 | }
|
7226 | function updateSimpleMemoComponent(
|
7227 | current,
|
7228 | workInProgress,
|
7229 | Component,
|
7230 | nextProps,
|
7231 | renderLanes
|
7232 | ) {
|
7233 | if (null !== current) {
|
7234 | var prevProps = current.memoizedProps;
|
7235 | if (
|
7236 | shallowEqual(prevProps, nextProps) &&
|
7237 | current.ref === workInProgress.ref
|
7238 | )
|
7239 | if (
|
7240 | ((didReceiveUpdate = !1),
|
7241 | (workInProgress.pendingProps = nextProps = prevProps),
|
7242 | 0 !== (current.lanes & renderLanes))
|
7243 | )
|
7244 | 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
|
7245 | else
|
7246 | return (
|
7247 | (workInProgress.lanes = current.lanes),
|
7248 | bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
7249 | );
|
7250 | }
|
7251 | return updateFunctionComponent(
|
7252 | current,
|
7253 | workInProgress,
|
7254 | Component,
|
7255 | nextProps,
|
7256 | renderLanes
|
7257 | );
|
7258 | }
|
7259 | function updateOffscreenComponent(current, workInProgress, renderLanes) {
|
7260 | var nextProps = workInProgress.pendingProps,
|
7261 | nextChildren = nextProps.children,
|
7262 | nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
|
7263 | prevState = null !== current ? current.memoizedState : null;
|
7264 | markRef(current, workInProgress);
|
7265 | if ("hidden" === nextProps.mode || nextIsDetached) {
|
7266 | if (0 !== (workInProgress.flags & 128)) {
|
7267 | renderLanes =
|
7268 | null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;
|
7269 | if (null !== current) {
|
7270 | nextProps = workInProgress.child = current.child;
|
7271 | for (nextChildren = 0; null !== nextProps; )
|
7272 | (nextChildren =
|
7273 | nextChildren | nextProps.lanes | nextProps.childLanes),
|
7274 | (nextProps = nextProps.sibling);
|
7275 | workInProgress.childLanes = nextChildren & ~renderLanes;
|
7276 | } else (workInProgress.childLanes = 0), (workInProgress.child = null);
|
7277 | return deferHiddenOffscreenComponent(
|
7278 | current,
|
7279 | workInProgress,
|
7280 | renderLanes
|
7281 | );
|
7282 | }
|
7283 | if (0 !== (renderLanes & 536870912))
|
7284 | (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
|
7285 | null !== current &&
|
7286 | pushTransition(
|
7287 | workInProgress,
|
7288 | null !== prevState ? prevState.cachePool : null
|
7289 | ),
|
7290 | null !== prevState
|
7291 | ? pushHiddenContext(workInProgress, prevState)
|
7292 | : reuseHiddenContextOnStack(),
|
7293 | pushOffscreenSuspenseHandler(workInProgress);
|
7294 | else
|
7295 | return (
|
7296 | (workInProgress.lanes = workInProgress.childLanes = 536870912),
|
7297 | deferHiddenOffscreenComponent(
|
7298 | current,
|
7299 | workInProgress,
|
7300 | null !== prevState ? prevState.baseLanes | renderLanes : renderLanes
|
7301 | )
|
7302 | );
|
7303 | } else
|
7304 | null !== prevState
|
7305 | ? (pushTransition(workInProgress, prevState.cachePool),
|
7306 | pushHiddenContext(workInProgress, prevState),
|
7307 | reuseSuspenseHandlerOnStack(workInProgress),
|
7308 | (workInProgress.memoizedState = null))
|
7309 | : (null !== current && pushTransition(workInProgress, null),
|
7310 | reuseHiddenContextOnStack(),
|
7311 | reuseSuspenseHandlerOnStack(workInProgress));
|
7312 | reconcileChildren(current, workInProgress, nextChildren, renderLanes);
|
7313 | return workInProgress.child;
|
7314 | }
|
7315 | function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) {
|
7316 | var JSCompiler_inline_result = peekCacheFromPool();
|
7317 | JSCompiler_inline_result =
|
7318 | null === JSCompiler_inline_result
|
7319 | ? null
|
7320 | : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };
|
7321 | workInProgress.memoizedState = {
|
7322 | baseLanes: nextBaseLanes,
|
7323 | cachePool: JSCompiler_inline_result
|
7324 | };
|
7325 | null !== current && pushTransition(workInProgress, null);
|
7326 | reuseHiddenContextOnStack();
|
7327 | pushOffscreenSuspenseHandler(workInProgress);
|
7328 | return null;
|
7329 | }
|
7330 | function markRef(current, workInProgress) {
|
7331 | var ref = workInProgress.ref;
|
7332 | if (null === ref)
|
7333 | null !== current &&
|
7334 | null !== current.ref &&
|
7335 | (workInProgress.flags |= 2097664);
|
7336 | else {
|
7337 | if ("function" !== typeof ref && "object" !== typeof ref)
|
7338 | throw Error(formatProdErrorMessage(284));
|
7339 | if (null === current || current.ref !== ref)
|
7340 | workInProgress.flags |= 2097664;
|
7341 | }
|
7342 | }
|
7343 | function updateFunctionComponent(
|
7344 | current,
|
7345 | workInProgress,
|
7346 | Component,
|
7347 | nextProps,
|
7348 | renderLanes
|
7349 | ) {
|
7350 | prepareToReadContext(workInProgress, renderLanes);
|
7351 | markComponentRenderStarted(workInProgress);
|
7352 | Component = renderWithHooks(
|
7353 | current,
|
7354 | workInProgress,
|
7355 | Component,
|
7356 | nextProps,
|
7357 | void 0,
|
7358 | renderLanes
|
7359 | );
|
7360 | nextProps = checkDidRenderIdHook();
|
7361 | markComponentRenderStopped();
|
7362 | if (null !== current && !didReceiveUpdate)
|
7363 | return (
|
7364 | bailoutHooks(current, workInProgress, renderLanes),
|
7365 | bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
7366 | );
|
7367 | isHydrating && nextProps && pushMaterializedTreeId(workInProgress);
|
7368 | workInProgress.flags |= 1;
|
7369 | reconcileChildren(current, workInProgress, Component, renderLanes);
|
7370 | return workInProgress.child;
|
7371 | }
|
7372 | function replayFunctionComponent(
|
7373 | current,
|
7374 | workInProgress,
|
7375 | nextProps,
|
7376 | Component,
|
7377 | secondArg,
|
7378 | renderLanes
|
7379 | ) {
|
7380 | prepareToReadContext(workInProgress, renderLanes);
|
7381 | markComponentRenderStarted(workInProgress);
|
7382 | nextProps = renderWithHooksAgain(
|
7383 | workInProgress,
|
7384 | Component,
|
7385 | nextProps,
|
7386 | secondArg
|
7387 | );
|
7388 | finishRenderingHooks();
|
7389 | Component = checkDidRenderIdHook();
|
7390 | markComponentRenderStopped();
|
7391 | if (null !== current && !didReceiveUpdate)
|
7392 | return (
|
7393 | bailoutHooks(current, workInProgress, renderLanes),
|
7394 | bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
|
7395 | );
|
7396 | isHydrating && Component && pushMaterializedTreeId(workInProgress);
|
7397 | workInProgress.flags |= 1;
|
7398 | reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
7399 | return workInProgress.child;
|
7400 | }
|
7401 | function updateClassComponent(
|
7402 | current,
|
7403 | workInProgress,
|
7404 | Component,
|
7405 | nextProps,
|
7406 | renderLanes
|
7407 | ) {
|
7408 | prepareToReadContext(workInProgress, renderLanes);
|
7409 | if (null === workInProgress.stateNode) {
|
7410 | var context = emptyContextObject,
|
7411 | contextType = Component.contextType;
|
7412 | "object" === typeof contextType &&
|
7413 | null !== contextType &&
|
7414 | (context = readContext(contextType));
|
7415 | context = new Component(nextProps, context);
|
7416 | workInProgress.memoizedState =
|
7417 | null !== context.state && void 0 !== context.state ? context.state : null;
|
7418 | context.updater = classComponentUpdater;
|
7419 | workInProgress.stateNode = context;
|
7420 | context._reactInternals = workInProgress;
|
7421 | context = workInProgress.stateNode;
|
7422 | context.props = nextProps;
|
7423 | context.state = workInProgress.memoizedState;
|
7424 | context.refs = {};
|
7425 | initializeUpdateQueue(workInProgress);
|
7426 | contextType = Component.contextType;
|
7427 | context.context =
|
7428 | "object" === typeof contextType && null !== contextType
|
7429 | ? readContext(contextType)
|
7430 | : emptyContextObject;
|
7431 | context.state = workInProgress.memoizedState;
|
7432 | contextType = Component.getDerivedStateFromProps;
|
7433 | "function" === typeof contextType &&
|
7434 | (applyDerivedStateFromProps(
|
7435 | workInProgress,
|
7436 | Component,
|
7437 | contextType,
|
7438 | nextProps
|
7439 | ),
|
7440 | (context.state = workInProgress.memoizedState));
|
7441 | "function" === typeof Component.getDerivedStateFromProps ||
|
7442 | "function" === typeof context.getSnapshotBeforeUpdate ||
|
7443 | ("function" !== typeof context.UNSAFE_componentWillMount &&
|
7444 | "function" !== typeof context.componentWillMount) ||
|
7445 | ((contextType = context.state),
|
7446 | "function" === typeof context.componentWillMount &&
|
7447 | context.componentWillMount(),
|
7448 | "function" === typeof context.UNSAFE_componentWillMount &&
|
7449 | context.UNSAFE_componentWillMount(),
|
7450 | contextType !== context.state &&
|
7451 | classComponentUpdater.enqueueReplaceState(context, context.state, null),
|
7452 | processUpdateQueue(workInProgress, nextProps, context, renderLanes),
|
7453 | suspendIfUpdateReadFromEntangledAsyncAction(),
|
7454 | (context.state = workInProgress.memoizedState));
|
7455 | "function" === typeof context.componentDidMount &&
|
7456 | (workInProgress.flags |= 4194308);
|
7457 | nextProps = !0;
|
7458 | } else if (null === current) {
|
7459 | context = workInProgress.stateNode;
|
7460 | var unresolvedOldProps = workInProgress.memoizedProps,
|
7461 | oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
|
7462 | context.props = oldProps;
|
7463 | var oldContext = context.context,
|
7464 | contextType$jscomp$0 = Component.contextType;
|
7465 | contextType = emptyContextObject;
|
7466 | "object" === typeof contextType$jscomp$0 &&
|
7467 | null !== contextType$jscomp$0 &&
|
7468 | (contextType = readContext(contextType$jscomp$0));
|
7469 | var getDerivedStateFromProps = Component.getDerivedStateFromProps;
|
7470 | contextType$jscomp$0 =
|
7471 | "function" === typeof getDerivedStateFromProps ||
|
7472 | "function" === typeof context.getSnapshotBeforeUpdate;
|
7473 | unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;
|
7474 | contextType$jscomp$0 ||
|
7475 | ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
|
7476 | "function" !== typeof context.componentWillReceiveProps) ||
|
7477 | ((unresolvedOldProps || oldContext !== contextType) &&
|
7478 | callComponentWillReceiveProps(
|
7479 | workInProgress,
|
7480 | context,
|
7481 | nextProps,
|
7482 | contextType
|
7483 | ));
|
7484 | hasForceUpdate = !1;
|
7485 | var oldState = workInProgress.memoizedState;
|
7486 | context.state = oldState;
|
7487 | processUpdateQueue(workInProgress, nextProps, context, renderLanes);
|
7488 | suspendIfUpdateReadFromEntangledAsyncAction();
|
7489 | oldContext = workInProgress.memoizedState;
|
7490 | unresolvedOldProps || oldState !== oldContext || hasForceUpdate
|
7491 | ? ("function" === typeof getDerivedStateFromProps &&
|
7492 | (applyDerivedStateFromProps(
|
7493 | workInProgress,
|
7494 | Component,
|
7495 | getDerivedStateFromProps,
|
7496 | nextProps
|
7497 | ),
|
7498 | (oldContext = workInProgress.memoizedState)),
|
7499 | (oldProps =
|
7500 | hasForceUpdate ||
|
7501 | checkShouldComponentUpdate(
|
7502 | workInProgress,
|
7503 | Component,
|
7504 | oldProps,
|
7505 | nextProps,
|
7506 | oldState,
|
7507 | oldContext,
|
7508 | contextType
|
7509 | ))
|
7510 | ? (contextType$jscomp$0 ||
|
7511 | ("function" !== typeof context.UNSAFE_componentWillMount &&
|
7512 | "function" !== typeof context.componentWillMount) ||
|
7513 | ("function" === typeof context.componentWillMount &&
|
7514 | context.componentWillMount(),
|
7515 | "function" === typeof context.UNSAFE_componentWillMount &&
|
7516 | context.UNSAFE_componentWillMount()),
|
7517 | "function" === typeof context.componentDidMount &&
|
7518 | (workInProgress.flags |= 4194308))
|
7519 | : ("function" === typeof context.componentDidMount &&
|
7520 | (workInProgress.flags |= 4194308),
|
7521 | (workInProgress.memoizedProps = nextProps),
|
7522 | (workInProgress.memoizedState = oldContext)),
|
7523 | (context.props = nextProps),
|
7524 | (context.state = oldContext),
|
7525 | (context.context = contextType),
|
7526 | (nextProps = oldProps))
|
7527 | : ("function" === typeof context.componentDidMount &&
|
7528 | (workInProgress.flags |= 4194308),
|
7529 | (nextProps = !1));
|
7530 | } else {
|
7531 | context = workInProgress.stateNode;
|
7532 | cloneUpdateQueue(current, workInProgress);
|
7533 | contextType = workInProgress.memoizedProps;
|
7534 | contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
|
7535 | context.props = contextType$jscomp$0;
|
7536 | getDerivedStateFromProps = workInProgress.pendingProps;
|
7537 | oldState = context.context;
|
7538 | oldContext = Component.contextType;
|
7539 | oldProps = emptyContextObject;
|
7540 | "object" === typeof oldContext &&
|
7541 | null !== oldContext &&
|
7542 | (oldProps = readContext(oldContext));
|
7543 | unresolvedOldProps = Component.getDerivedStateFromProps;
|
7544 | (oldContext =
|
7545 | "function" === typeof unresolvedOldProps ||
|
7546 | "function" === typeof context.getSnapshotBeforeUpdate) ||
|
7547 | ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
|
7548 | "function" !== typeof context.componentWillReceiveProps) ||
|
7549 | ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&
|
7550 | callComponentWillReceiveProps(
|
7551 | workInProgress,
|
7552 | context,
|
7553 | nextProps,
|
7554 | oldProps
|
7555 | ));
|
7556 | hasForceUpdate = !1;
|
7557 | oldState = workInProgress.memoizedState;
|
7558 | context.state = oldState;
|
7559 | processUpdateQueue(workInProgress, nextProps, context, renderLanes);
|
7560 | suspendIfUpdateReadFromEntangledAsyncAction();
|
7561 | var newState = workInProgress.memoizedState;
|
7562 | contextType !== getDerivedStateFromProps ||
|
7563 | oldState !== newState ||
|
7564 | hasForceUpdate
|
7565 | ? ("function" === typeof unresolvedOldProps &&
|
7566 | (applyDerivedStateFromProps(
|
7567 | workInProgress,
|
7568 | Component,
|
7569 | unresolvedOldProps,
|
7570 | nextProps
|
7571 | ),
|
7572 | (newState = workInProgress.memoizedState)),
|
7573 | (contextType$jscomp$0 =
|
7574 | hasForceUpdate ||
|
7575 | checkShouldComponentUpdate(
|
7576 | workInProgress,
|
7577 | Component,
|
7578 | contextType$jscomp$0,
|
7579 | nextProps,
|
7580 | oldState,
|
7581 | newState,
|
7582 | oldProps
|
7583 | ) ||
|
7584 | !1)
|
7585 | ? (oldContext ||
|
7586 | ("function" !== typeof context.UNSAFE_componentWillUpdate &&
|
7587 | "function" !== typeof context.componentWillUpdate) ||
|
7588 | ("function" === typeof context.componentWillUpdate &&
|
7589 | context.componentWillUpdate(nextProps, newState, oldProps),
|
7590 | "function" === typeof context.UNSAFE_componentWillUpdate &&
|
7591 | context.UNSAFE_componentWillUpdate(
|
7592 | nextProps,
|
7593 | newState,
|
7594 | oldProps
|
7595 | )),
|
7596 | "function" === typeof context.componentDidUpdate &&
|
7597 | (workInProgress.flags |= 4),
|
7598 | "function" === typeof context.getSnapshotBeforeUpdate &&
|
7599 | (workInProgress.flags |= 1024))
|
7600 | : ("function" !== typeof context.componentDidUpdate ||
|
7601 | (contextType === current.memoizedProps &&
|
7602 | oldState === current.memoizedState) ||
|
7603 | (workInProgress.flags |= 4),
|
7604 | "function" !== typeof context.getSnapshotBeforeUpdate ||
|
7605 | (contextType === current.memoizedProps &&
|
7606 | oldState === current.memoizedState) ||
|
7607 | (workInProgress.flags |= 1024),
|
7608 | (workInProgress.memoizedProps = nextProps),
|
7609 | (workInProgress.memoizedState = newState)),
|
7610 | (context.props = nextProps),
|
7611 | (context.state = newState),
|
7612 | (context.context = oldProps),
|
7613 | (nextProps = contextType$jscomp$0))
|
7614 | : ("function" !== typeof context.componentDidUpdate ||
|
7615 | (contextType === current.memoizedProps &&
|
7616 | oldState === current.memoizedState) ||
|
7617 | (workInProgress.flags |= 4),
|
7618 | "function" !== typeof context.getSnapshotBeforeUpdate ||
|
7619 | (contextType === current.memoizedProps &&
|
7620 | oldState === current.memoizedState) ||
|
7621 | (workInProgress.flags |= 1024),
|
7622 | (nextProps = !1));
|
7623 | }
|
7624 | context = nextProps;
|
7625 | markRef(current, workInProgress);
|
7626 | nextProps = 0 !== (workInProgress.flags & 128);
|
7627 | context || nextProps
|
7628 | ? ((context = workInProgress.stateNode),
|
7629 | nextProps && "function" !== typeof Component.getDerivedStateFromError
|
7630 | ? ((Component = null), (profilerStartTime = -1))
|
7631 | : (markComponentRenderStarted(workInProgress),
|
7632 | (Component = context.render()),
|
7633 | markComponentRenderStopped()),
|
7634 | (workInProgress.flags |= 1),
|
7635 | null !== current && nextProps
|
7636 | ? ((workInProgress.child = reconcileChildFibers(
|
7637 | workInProgress,
|
7638 | current.child,
|
7639 | null,
|
7640 | renderLanes
|
7641 | )),
|
7642 | (workInProgress.child = reconcileChildFibers(
|
7643 | workInProgress,
|
7644 | null,
|
7645 | Component,
|
7646 | renderLanes
|
7647 | )))
|
7648 | : reconcileChildren(current, workInProgress, Component, renderLanes),
|
7649 | (workInProgress.memoizedState = context.state),
|
7650 | (current = workInProgress.child))
|
7651 | : (current = bailoutOnAlreadyFinishedWork(
|
7652 | current,
|
7653 | workInProgress,
|
7654 | renderLanes
|
7655 | ));
|
7656 | return current;
|
7657 | }
|
7658 | function mountHostRootWithoutHydrating(
|
7659 | current,
|
7660 | workInProgress,
|
7661 | nextChildren,
|
7662 | renderLanes
|
7663 | ) {
|
7664 | resetHydrationState();
|
7665 | workInProgress.flags |= 256;
|
7666 | reconcileChildren(current, workInProgress, nextChildren, renderLanes);
|
7667 | return workInProgress.child;
|
7668 | }
|
7669 | var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };
|
7670 | function mountSuspenseOffscreenState(renderLanes) {
|
7671 | return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
|
7672 | }
|
7673 | function getRemainingWorkInPrimaryTree(
|
7674 | current,
|
7675 | primaryTreeDidDefer,
|
7676 | renderLanes
|
7677 | ) {
|
7678 | current = null !== current ? current.childLanes & ~renderLanes : 0;
|
7679 | primaryTreeDidDefer && (current |= workInProgressDeferredLane);
|
7680 | return current;
|
7681 | }
|
7682 | function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
7683 | var nextProps = workInProgress.pendingProps,
|
7684 | showFallback = !1,
|
7685 | didSuspend = 0 !== (workInProgress.flags & 128),
|
7686 | JSCompiler_temp;
|
7687 | (JSCompiler_temp = didSuspend) ||
|
7688 | (JSCompiler_temp =
|
7689 | null !== current && null === current.memoizedState
|
7690 | ? !1
|
7691 | : 0 !== (suspenseStackCursor.current & 2));
|
7692 | JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));
|
7693 | JSCompiler_temp = 0 !== (workInProgress.flags & 32);
|
7694 | workInProgress.flags &= -33;
|
7695 | if (null === current) {
|
7696 | if (isHydrating) {
|
7697 | showFallback
|
7698 | ? pushPrimaryTreeSuspenseHandler(workInProgress)
|
7699 | : reuseSuspenseHandlerOnStack(workInProgress);
|
7700 | if (isHydrating) {
|
7701 | var nextInstance = nextHydratableInstance,
|
7702 | JSCompiler_temp$jscomp$0;
|
7703 | if ((JSCompiler_temp$jscomp$0 = nextInstance)) {
|
7704 | c: {
|
7705 | JSCompiler_temp$jscomp$0 = nextInstance;
|
7706 | for (
|
7707 | nextInstance = rootOrSingletonContext;
|
7708 | 8 !== JSCompiler_temp$jscomp$0.nodeType;
|
7709 |
|
7710 | ) {
|
7711 | if (!nextInstance) {
|
7712 | nextInstance = null;
|
7713 | break c;
|
7714 | }
|
7715 | JSCompiler_temp$jscomp$0 = getNextHydratable(
|
7716 | JSCompiler_temp$jscomp$0.nextSibling
|
7717 | );
|
7718 | if (null === JSCompiler_temp$jscomp$0) {
|
7719 | nextInstance = null;
|
7720 | break c;
|
7721 | }
|
7722 | }
|
7723 | nextInstance = JSCompiler_temp$jscomp$0;
|
7724 | }
|
7725 | null !== nextInstance
|
7726 | ? ((workInProgress.memoizedState = {
|
7727 | dehydrated: nextInstance,
|
7728 | treeContext:
|
7729 | null !== treeContextProvider
|
7730 | ? { id: treeContextId, overflow: treeContextOverflow }
|
7731 | : null,
|
7732 | retryLane: 536870912
|
7733 | }),
|
7734 | (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)),
|
7735 | (JSCompiler_temp$jscomp$0.stateNode = nextInstance),
|
7736 | (JSCompiler_temp$jscomp$0.return = workInProgress),
|
7737 | (workInProgress.child = JSCompiler_temp$jscomp$0),
|
7738 | (hydrationParentFiber = workInProgress),
|
7739 | (nextHydratableInstance = null),
|
7740 | (JSCompiler_temp$jscomp$0 = !0))
|
7741 | : (JSCompiler_temp$jscomp$0 = !1);
|
7742 | }
|
7743 | JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress);
|
7744 | }
|
7745 | nextInstance = workInProgress.memoizedState;
|
7746 | if (
|
7747 | null !== nextInstance &&
|
7748 | ((nextInstance = nextInstance.dehydrated), null !== nextInstance)
|
7749 | )
|
7750 | return (
|
7751 | "$!" === nextInstance.data
|
7752 | ? (workInProgress.lanes = 16)
|
7753 | : (workInProgress.lanes = 536870912),
|
7754 | null
|
7755 | );
|
7756 | popSuspenseHandler(workInProgress);
|
7757 | }
|
7758 | nextInstance = nextProps.children;
|
7759 | nextProps = nextProps.fallback;
|
7760 | if (showFallback)
|
7761 | return (
|
7762 | reuseSuspenseHandlerOnStack(workInProgress),
|
7763 | (showFallback = workInProgress.mode),
|
7764 | (nextInstance = mountWorkInProgressOffscreenFiber(
|
7765 | { mode: "hidden", children: nextInstance },
|
7766 | showFallback
|
7767 | )),
|
7768 | (nextProps = createFiberFromFragment(
|
7769 | nextProps,
|
7770 | showFallback,
|
7771 | renderLanes,
|
7772 | null
|
7773 | )),
|
7774 | (nextInstance.return = workInProgress),
|
7775 | (nextProps.return = workInProgress),
|
7776 | (nextInstance.sibling = nextProps),
|
7777 | (workInProgress.child = nextInstance),
|
7778 | (showFallback = workInProgress.child),
|
7779 | (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
|
7780 | (showFallback.childLanes = getRemainingWorkInPrimaryTree(
|
7781 | current,
|
7782 | JSCompiler_temp,
|
7783 | renderLanes
|
7784 | )),
|
7785 | (workInProgress.memoizedState = SUSPENDED_MARKER),
|
7786 | nextProps
|
7787 | );
|
7788 | pushPrimaryTreeSuspenseHandler(workInProgress);
|
7789 | return mountSuspensePrimaryChildren(workInProgress, nextInstance);
|
7790 | }
|
7791 | JSCompiler_temp$jscomp$0 = current.memoizedState;
|
7792 | if (
|
7793 | null !== JSCompiler_temp$jscomp$0 &&
|
7794 | ((nextInstance = JSCompiler_temp$jscomp$0.dehydrated),
|
7795 | null !== nextInstance)
|
7796 | ) {
|
7797 | if (didSuspend)
|
7798 | workInProgress.flags & 256
|
7799 | ? (pushPrimaryTreeSuspenseHandler(workInProgress),
|
7800 | (workInProgress.flags &= -257),
|
7801 | (workInProgress = retrySuspenseComponentWithoutHydrating(
|
7802 | current,
|
7803 | workInProgress,
|
7804 | renderLanes
|
7805 | )))
|
7806 | : null !== workInProgress.memoizedState
|
7807 | ? (reuseSuspenseHandlerOnStack(workInProgress),
|
7808 | (workInProgress.child = current.child),
|
7809 | (workInProgress.flags |= 128),
|
7810 | (workInProgress = null))
|
7811 | : (reuseSuspenseHandlerOnStack(workInProgress),
|
7812 | (showFallback = nextProps.fallback),
|
7813 | (nextInstance = workInProgress.mode),
|
7814 | (nextProps = mountWorkInProgressOffscreenFiber(
|
7815 | { mode: "visible", children: nextProps.children },
|
7816 | nextInstance
|
7817 | )),
|
7818 | (showFallback = createFiberFromFragment(
|
7819 | showFallback,
|
7820 | nextInstance,
|
7821 | renderLanes,
|
7822 | null
|
7823 | )),
|
7824 | (showFallback.flags |= 2),
|
7825 | (nextProps.return = workInProgress),
|
7826 | (showFallback.return = workInProgress),
|
7827 | (nextProps.sibling = showFallback),
|
7828 | (workInProgress.child = nextProps),
|
7829 | reconcileChildFibers(
|
7830 | workInProgress,
|
7831 | current.child,
|
7832 | null,
|
7833 | renderLanes
|
7834 | ),
|
7835 | (nextProps = workInProgress.child),
|
7836 | (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),
|
7837 | (nextProps.childLanes = getRemainingWorkInPrimaryTree(
|
7838 | current,
|
7839 | JSCompiler_temp,
|
7840 | renderLanes
|
7841 | )),
|
7842 | (workInProgress.memoizedState = SUSPENDED_MARKER),
|
7843 | (workInProgress = showFallback));
|
7844 | else if (
|
7845 | (pushPrimaryTreeSuspenseHandler(workInProgress),
|
7846 | "$!" === nextInstance.data)
|
7847 | ) {
|
7848 | JSCompiler_temp =
|
7849 | nextInstance.nextSibling && nextInstance.nextSibling.dataset;
|
7850 | if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;
|
7851 | JSCompiler_temp = digest;
|
7852 | nextProps = Error(formatProdErrorMessage(419));
|
7853 | nextProps.stack = "";
|
7854 | nextProps.digest = JSCompiler_temp;
|
7855 | queueHydrationError({ value: nextProps, source: null, stack: null });
|
7856 | workInProgress = retrySuspenseComponentWithoutHydrating(
|
7857 | current,
|
7858 | workInProgress,
|
7859 | renderLanes
|
7860 | );
|
7861 | } else if (
|
7862 | ((JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),
|
7863 | didReceiveUpdate || JSCompiler_temp)
|
7864 | ) {
|
7865 | JSCompiler_temp = workInProgressRoot;
|
7866 | if (null !== JSCompiler_temp) {
|
7867 | nextProps = renderLanes & -renderLanes;
|
7868 | if (0 !== (nextProps & 42)) nextProps = 1;
|
7869 | else
|
7870 | switch (nextProps) {
|
7871 | case 2:
|
7872 | nextProps = 1;
|
7873 | break;
|
7874 | case 8:
|
7875 | nextProps = 4;
|
7876 | break;
|
7877 | case 32:
|
7878 | nextProps = 16;
|
7879 | break;
|
7880 | case 128:
|
7881 | case 256:
|
7882 | case 512:
|
7883 | case 1024:
|
7884 | case 2048:
|
7885 | case 4096:
|
7886 | case 8192:
|
7887 | case 16384:
|
7888 | case 32768:
|
7889 | case 65536:
|
7890 | case 131072:
|
7891 | case 262144:
|
7892 | case 524288:
|
7893 | case 1048576:
|
7894 | case 2097152:
|
7895 | case 4194304:
|
7896 | case 8388608:
|
7897 | case 16777216:
|
7898 | case 33554432:
|
7899 | nextProps = 64;
|
7900 | break;
|
7901 | case 268435456:
|
7902 | nextProps = 134217728;
|
7903 | break;
|
7904 | default:
|
7905 | nextProps = 0;
|
7906 | }
|
7907 | nextProps =
|
7908 | 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
|
7909 | ? 0
|
7910 | : nextProps;
|
7911 | if (0 !== nextProps && nextProps !== JSCompiler_temp$jscomp$0.retryLane)
|
7912 | throw (
|
7913 | ((JSCompiler_temp$jscomp$0.retryLane = nextProps),
|
7914 | enqueueConcurrentRenderForLane(current, nextProps),
|
7915 | scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
|
7916 | SelectiveHydrationException)
|
7917 | );
|
7918 | }
|
7919 | "$?" === nextInstance.data || renderDidSuspendDelayIfPossible();
|
7920 | workInProgress = retrySuspenseComponentWithoutHydrating(
|
7921 | current,
|
7922 | workInProgress,
|
7923 | renderLanes
|
7924 | );
|
7925 | } else
|
7926 | "$?" === nextInstance.data
|
7927 | ? ((workInProgress.flags |= 128),
|
7928 | (workInProgress.child = current.child),
|
7929 | (workInProgress = retryDehydratedSuspenseBoundary.bind(
|
7930 | null,
|
7931 | current
|
7932 | )),
|
7933 | (nextInstance._reactRetry = workInProgress),
|
7934 | (workInProgress = null))
|
7935 | : ((current = JSCompiler_temp$jscomp$0.treeContext),
|
7936 | (nextHydratableInstance = getNextHydratable(
|
7937 | nextInstance.nextSibling
|
7938 | )),
|
7939 | (hydrationParentFiber = workInProgress),
|
7940 | (isHydrating = !0),
|
7941 | (hydrationErrors = null),
|
7942 | (rootOrSingletonContext = !1),
|
7943 | null !== current &&
|
7944 | ((idStack[idStackIndex++] = treeContextId),
|
7945 | (idStack[idStackIndex++] = treeContextOverflow),
|
7946 | (idStack[idStackIndex++] = treeContextProvider),
|
7947 | (treeContextId = current.id),
|
7948 | (treeContextOverflow = current.overflow),
|
7949 | (treeContextProvider = workInProgress)),
|
7950 | (workInProgress = mountSuspensePrimaryChildren(
|
7951 | workInProgress,
|
7952 | nextProps.children
|
7953 | )),
|
7954 | (workInProgress.flags |= 4096));
|
7955 | return workInProgress;
|
7956 | }
|
7957 | if (showFallback)
|
7958 | return (
|
7959 | reuseSuspenseHandlerOnStack(workInProgress),
|
7960 | (showFallback = nextProps.fallback),
|
7961 | (nextInstance = workInProgress.mode),
|
7962 | (JSCompiler_temp$jscomp$0 = current.child),
|
7963 | (digest = JSCompiler_temp$jscomp$0.sibling),
|
7964 | (nextProps = createWorkInProgress(JSCompiler_temp$jscomp$0, {
|
7965 | mode: "hidden",
|
7966 | children: nextProps.children
|
7967 | })),
|
7968 | (nextProps.subtreeFlags =
|
7969 | JSCompiler_temp$jscomp$0.subtreeFlags & 31457280),
|
7970 | null !== digest
|
7971 | ? (showFallback = createWorkInProgress(digest, showFallback))
|
7972 | : ((showFallback = createFiberFromFragment(
|
7973 | showFallback,
|
7974 | nextInstance,
|
7975 | renderLanes,
|
7976 | null
|
7977 | )),
|
7978 | (showFallback.flags |= 2)),
|
7979 | (showFallback.return = workInProgress),
|
7980 | (nextProps.return = workInProgress),
|
7981 | (nextProps.sibling = showFallback),
|
7982 | (workInProgress.child = nextProps),
|
7983 | (nextProps = showFallback),
|
7984 | (showFallback = workInProgress.child),
|
7985 | (nextInstance = current.child.memoizedState),
|
7986 | null === nextInstance
|
7987 | ? (nextInstance = mountSuspenseOffscreenState(renderLanes))
|
7988 | : ((JSCompiler_temp$jscomp$0 = nextInstance.cachePool),
|
7989 | null !== JSCompiler_temp$jscomp$0
|
7990 | ? ((digest = CacheContext._currentValue),
|
7991 | (JSCompiler_temp$jscomp$0 =
|
7992 | JSCompiler_temp$jscomp$0.parent !== digest
|
7993 | ? { parent: digest, pool: digest }
|
7994 | : JSCompiler_temp$jscomp$0))
|
7995 | : (JSCompiler_temp$jscomp$0 = getSuspendedCache()),
|
7996 | (nextInstance = {
|
7997 | baseLanes: nextInstance.baseLanes | renderLanes,
|
7998 | cachePool: JSCompiler_temp$jscomp$0
|
7999 | })),
|
8000 | (showFallback.memoizedState = nextInstance),
|
8001 | (showFallback.childLanes = getRemainingWorkInPrimaryTree(
|
8002 | current,
|
8003 | JSCompiler_temp,
|
8004 | renderLanes
|
8005 | )),
|
8006 | (workInProgress.memoizedState = SUSPENDED_MARKER),
|
8007 | nextProps
|
8008 | );
|
8009 | pushPrimaryTreeSuspenseHandler(workInProgress);
|
8010 | renderLanes = current.child;
|
8011 | current = renderLanes.sibling;
|
8012 | renderLanes = createWorkInProgress(renderLanes, {
|
8013 | mode: "visible",
|
8014 | children: nextProps.children
|
8015 | });
|
8016 | renderLanes.return = workInProgress;
|
8017 | renderLanes.sibling = null;
|
8018 | null !== current &&
|
8019 | ((JSCompiler_temp = workInProgress.deletions),
|
8020 | null === JSCompiler_temp
|
8021 | ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
|
8022 | : JSCompiler_temp.push(current));
|
8023 | workInProgress.child = renderLanes;
|
8024 | workInProgress.memoizedState = null;
|
8025 | return renderLanes;
|
8026 | }
|
8027 | function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
|
8028 | primaryChildren = mountWorkInProgressOffscreenFiber(
|
8029 | { mode: "visible", children: primaryChildren },
|
8030 | workInProgress.mode
|
8031 | );
|
8032 | primaryChildren.return = workInProgress;
|
8033 | return (workInProgress.child = primaryChildren);
|
8034 | }
|
8035 | function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
|
8036 | return createFiberFromOffscreen(offscreenProps, mode, 0, null);
|
8037 | }
|
8038 | function retrySuspenseComponentWithoutHydrating(
|
8039 | current,
|
8040 | workInProgress,
|
8041 | renderLanes
|
8042 | ) {
|
8043 | reconcileChildFibers(workInProgress, current.child, null, renderLanes);
|
8044 | current = mountSuspensePrimaryChildren(
|
8045 | workInProgress,
|
8046 | workInProgress.pendingProps.children
|
8047 | );
|
8048 | current.flags |= 2;
|
8049 | workInProgress.memoizedState = null;
|
8050 | return current;
|
8051 | }
|
8052 | function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
|
8053 | fiber.lanes |= renderLanes;
|
8054 | var alternate = fiber.alternate;
|
8055 | null !== alternate && (alternate.lanes |= renderLanes);
|
8056 | scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
|
8057 | }
|
8058 | function initSuspenseListRenderState(
|
8059 | workInProgress,
|
8060 | isBackwards,
|
8061 | tail,
|
8062 | lastContentRow,
|
8063 | tailMode
|
8064 | ) {
|
8065 | var renderState = workInProgress.memoizedState;
|
8066 | null === renderState
|
8067 | ? (workInProgress.memoizedState = {
|
8068 | isBackwards: isBackwards,
|
8069 | rendering: null,
|
8070 | renderingStartTime: 0,
|
8071 | last: lastContentRow,
|
8072 | tail: tail,
|
8073 | tailMode: tailMode
|
8074 | })
|
8075 | : ((renderState.isBackwards = isBackwards),
|
8076 | (renderState.rendering = null),
|
8077 | (renderState.renderingStartTime = 0),
|
8078 | (renderState.last = lastContentRow),
|
8079 | (renderState.tail = tail),
|
8080 | (renderState.tailMode = tailMode));
|
8081 | }
|
8082 | function updateSuspenseListComponent(current, workInProgress, renderLanes) {
|
8083 | var nextProps = workInProgress.pendingProps,
|
8084 | revealOrder = nextProps.revealOrder,
|
8085 | tailMode = nextProps.tail;
|
8086 | reconcileChildren(current, workInProgress, nextProps.children, renderLanes);
|
8087 | nextProps = suspenseStackCursor.current;
|
8088 | if (0 !== (nextProps & 2))
|
8089 | (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128);
|
8090 | else {
|
8091 | if (null !== current && 0 !== (current.flags & 128))
|
8092 | a: for (current = workInProgress.child; null !== current; ) {
|
8093 | if (13 === current.tag)
|
8094 | null !== current.memoizedState &&
|
8095 | scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
|
8096 | else if (19 === current.tag)
|
8097 | scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
|
8098 | else if (null !== current.child) {
|
8099 | current.child.return = current;
|
8100 | current = current.child;
|
8101 | continue;
|
8102 | }
|
8103 | if (current === workInProgress) break a;
|
8104 | for (; null === current.sibling; ) {
|
8105 | if (null === current.return || current.return === workInProgress)
|
8106 | break a;
|
8107 | current = current.return;
|
8108 | }
|
8109 | current.sibling.return = current.return;
|
8110 | current = current.sibling;
|
8111 | }
|
8112 | nextProps &= 1;
|
8113 | }
|
8114 | push(suspenseStackCursor, nextProps);
|
8115 | switch (revealOrder) {
|
8116 | case "forwards":
|
8117 | renderLanes = workInProgress.child;
|
8118 | for (revealOrder = null; null !== renderLanes; )
|
8119 | (current = renderLanes.alternate),
|
8120 | null !== current &&
|
8121 | null === findFirstSuspended(current) &&
|
8122 | (revealOrder = renderLanes),
|
8123 | (renderLanes = renderLanes.sibling);
|
8124 | renderLanes = revealOrder;
|
8125 | null === renderLanes
|
8126 | ? ((revealOrder = workInProgress.child), (workInProgress.child = null))
|
8127 | : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));
|
8128 | initSuspenseListRenderState(
|
8129 | workInProgress,
|
8130 | !1,
|
8131 | revealOrder,
|
8132 | renderLanes,
|
8133 | tailMode
|
8134 | );
|
8135 | break;
|
8136 | case "backwards":
|
8137 | renderLanes = null;
|
8138 | revealOrder = workInProgress.child;
|
8139 | for (workInProgress.child = null; null !== revealOrder; ) {
|
8140 | current = revealOrder.alternate;
|
8141 | if (null !== current && null === findFirstSuspended(current)) {
|
8142 | workInProgress.child = revealOrder;
|
8143 | break;
|
8144 | }
|
8145 | current = revealOrder.sibling;
|
8146 | revealOrder.sibling = renderLanes;
|
8147 | renderLanes = revealOrder;
|
8148 | revealOrder = current;
|
8149 | }
|
8150 | initSuspenseListRenderState(
|
8151 | workInProgress,
|
8152 | !0,
|
8153 | renderLanes,
|
8154 | null,
|
8155 | tailMode
|
8156 | );
|
8157 | break;
|
8158 | case "together":
|
8159 | initSuspenseListRenderState(workInProgress, !1, null, null, void 0);
|
8160 | break;
|
8161 | default:
|
8162 | workInProgress.memoizedState = null;
|
8163 | }
|
8164 | return workInProgress.child;
|
8165 | }
|
8166 | function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
|
8167 | null !== current && (workInProgress.dependencies = current.dependencies);
|
8168 | profilerStartTime = -1;
|
8169 | workInProgressRootSkippedLanes |= workInProgress.lanes;
|
8170 | if (0 === (renderLanes & workInProgress.childLanes)) return null;
|
8171 | if (null !== current && workInProgress.child !== current.child)
|
8172 | throw Error(formatProdErrorMessage(153));
|
8173 | if (null !== workInProgress.child) {
|
8174 | current = workInProgress.child;
|
8175 | renderLanes = createWorkInProgress(current, current.pendingProps);
|
8176 | workInProgress.child = renderLanes;
|
8177 | for (renderLanes.return = workInProgress; null !== current.sibling; )
|
8178 | (current = current.sibling),
|
8179 | (renderLanes = renderLanes.sibling =
|
8180 | createWorkInProgress(current, current.pendingProps)),
|
8181 | (renderLanes.return = workInProgress);
|
8182 | renderLanes.sibling = null;
|
8183 | }
|
8184 | return workInProgress.child;
|
8185 | }
|
8186 | function attemptEarlyBailoutIfNoScheduledUpdate(
|
8187 | current,
|
8188 | workInProgress,
|
8189 | renderLanes
|
8190 | ) {
|
8191 | switch (workInProgress.tag) {
|
8192 | case 3:
|
8193 | pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
8194 | pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
|
8195 | resetHydrationState();
|
8196 | break;
|
8197 | case 27:
|
8198 | case 5:
|
8199 | pushHostContext(workInProgress);
|
8200 | break;
|
8201 | case 4:
|
8202 | pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
8203 | break;
|
8204 | case 10:
|
8205 | pushProvider(
|
8206 | workInProgress,
|
8207 | workInProgress.type,
|
8208 | workInProgress.memoizedProps.value
|
8209 | );
|
8210 | break;
|
8211 | case 12:
|
8212 | 0 !== (renderLanes & workInProgress.childLanes) &&
|
8213 | (workInProgress.flags |= 4);
|
8214 | var stateNode = workInProgress.stateNode;
|
8215 | stateNode.effectDuration = 0;
|
8216 | stateNode.passiveEffectDuration = 0;
|
8217 | break;
|
8218 | case 13:
|
8219 | stateNode = workInProgress.memoizedState;
|
8220 | if (null !== stateNode) {
|
8221 | if (null !== stateNode.dehydrated)
|
8222 | return (
|
8223 | pushPrimaryTreeSuspenseHandler(workInProgress),
|
8224 | (workInProgress.flags |= 128),
|
8225 | null
|
8226 | );
|
8227 | if (0 !== (renderLanes & workInProgress.child.childLanes))
|
8228 | return updateSuspenseComponent(current, workInProgress, renderLanes);
|
8229 | pushPrimaryTreeSuspenseHandler(workInProgress);
|
8230 | current = bailoutOnAlreadyFinishedWork(
|
8231 | current,
|
8232 | workInProgress,
|
8233 | renderLanes
|
8234 | );
|
8235 | return null !== current ? current.sibling : null;
|
8236 | }
|
8237 | pushPrimaryTreeSuspenseHandler(workInProgress);
|
8238 | break;
|
8239 | case 19:
|
8240 | stateNode = 0 !== (renderLanes & workInProgress.childLanes);
|
8241 | if (0 !== (current.flags & 128)) {
|
8242 | if (stateNode)
|
8243 | return updateSuspenseListComponent(
|
8244 | current,
|
8245 | workInProgress,
|
8246 | renderLanes
|
8247 | );
|
8248 | workInProgress.flags |= 128;
|
8249 | }
|
8250 | var renderState = workInProgress.memoizedState;
|
8251 | null !== renderState &&
|
8252 | ((renderState.rendering = null),
|
8253 | (renderState.tail = null),
|
8254 | (renderState.lastEffect = null));
|
8255 | push(suspenseStackCursor, suspenseStackCursor.current);
|
8256 | if (stateNode) break;
|
8257 | else return null;
|
8258 | case 22:
|
8259 | case 23:
|
8260 | return (
|
8261 | (workInProgress.lanes = 0),
|
8262 | updateOffscreenComponent(current, workInProgress, renderLanes)
|
8263 | );
|
8264 | case 24:
|
8265 | pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
|
8266 | }
|
8267 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
8268 | }
|
8269 | function beginWork(current, workInProgress, renderLanes) {
|
8270 | if (null !== current)
|
8271 | if (current.memoizedProps !== workInProgress.pendingProps)
|
8272 | didReceiveUpdate = !0;
|
8273 | else {
|
8274 | if (
|
8275 | 0 === (current.lanes & renderLanes) &&
|
8276 | 0 === (workInProgress.flags & 128)
|
8277 | )
|
8278 | return (
|
8279 | (didReceiveUpdate = !1),
|
8280 | attemptEarlyBailoutIfNoScheduledUpdate(
|
8281 | current,
|
8282 | workInProgress,
|
8283 | renderLanes
|
8284 | )
|
8285 | );
|
8286 | didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;
|
8287 | }
|
8288 | else
|
8289 | (didReceiveUpdate = !1),
|
8290 | isHydrating &&
|
8291 | 0 !== (workInProgress.flags & 1048576) &&
|
8292 | pushTreeId(workInProgress, treeForkCount, workInProgress.index);
|
8293 | workInProgress.lanes = 0;
|
8294 | switch (workInProgress.tag) {
|
8295 | case 16:
|
8296 | a: {
|
8297 | current = workInProgress.pendingProps;
|
8298 | var lazyComponent = workInProgress.elementType,
|
8299 | init = lazyComponent._init;
|
8300 | lazyComponent = init(lazyComponent._payload);
|
8301 | workInProgress.type = lazyComponent;
|
8302 | if ("function" === typeof lazyComponent)
|
8303 | shouldConstruct(lazyComponent)
|
8304 | ? ((current = resolveClassComponentProps(lazyComponent, current)),
|
8305 | (workInProgress.tag = 1),
|
8306 | (workInProgress = updateClassComponent(
|
8307 | null,
|
8308 | workInProgress,
|
8309 | lazyComponent,
|
8310 | current,
|
8311 | renderLanes
|
8312 | )))
|
8313 | : ((workInProgress.tag = 0),
|
8314 | (workInProgress = updateFunctionComponent(
|
8315 | null,
|
8316 | workInProgress,
|
8317 | lazyComponent,
|
8318 | current,
|
8319 | renderLanes
|
8320 | )));
|
8321 | else {
|
8322 | if (void 0 !== lazyComponent && null !== lazyComponent)
|
8323 | if (
|
8324 | ((init = lazyComponent.$$typeof), init === REACT_FORWARD_REF_TYPE)
|
8325 | ) {
|
8326 | workInProgress.tag = 11;
|
8327 | workInProgress = updateForwardRef(
|
8328 | null,
|
8329 | workInProgress,
|
8330 | lazyComponent,
|
8331 | current,
|
8332 | renderLanes
|
8333 | );
|
8334 | break a;
|
8335 | } else if (init === REACT_MEMO_TYPE) {
|
8336 | workInProgress.tag = 14;
|
8337 | workInProgress = updateMemoComponent(
|
8338 | null,
|
8339 | workInProgress,
|
8340 | lazyComponent,
|
8341 | current,
|
8342 | renderLanes
|
8343 | );
|
8344 | break a;
|
8345 | }
|
8346 | throw Error(formatProdErrorMessage(306, lazyComponent, ""));
|
8347 | }
|
8348 | }
|
8349 | return workInProgress;
|
8350 | case 0:
|
8351 | return updateFunctionComponent(
|
8352 | current,
|
8353 | workInProgress,
|
8354 | workInProgress.type,
|
8355 | workInProgress.pendingProps,
|
8356 | renderLanes
|
8357 | );
|
8358 | case 1:
|
8359 | return (
|
8360 | (lazyComponent = workInProgress.type),
|
8361 | (init = resolveClassComponentProps(
|
8362 | lazyComponent,
|
8363 | workInProgress.pendingProps
|
8364 | )),
|
8365 | updateClassComponent(
|
8366 | current,
|
8367 | workInProgress,
|
8368 | lazyComponent,
|
8369 | init,
|
8370 | renderLanes
|
8371 | )
|
8372 | );
|
8373 | case 3:
|
8374 | a: {
|
8375 | pushHostContainer(
|
8376 | workInProgress,
|
8377 | workInProgress.stateNode.containerInfo
|
8378 | );
|
8379 | if (null === current) throw Error(formatProdErrorMessage(387));
|
8380 | var nextProps = workInProgress.pendingProps;
|
8381 | init = workInProgress.memoizedState;
|
8382 | lazyComponent = init.element;
|
8383 | cloneUpdateQueue(current, workInProgress);
|
8384 | processUpdateQueue(workInProgress, nextProps, null, renderLanes);
|
8385 | var nextState = workInProgress.memoizedState;
|
8386 | nextProps = nextState.cache;
|
8387 | pushProvider(workInProgress, CacheContext, nextProps);
|
8388 | nextProps !== init.cache &&
|
8389 | propagateContextChange(workInProgress, CacheContext, renderLanes);
|
8390 | suspendIfUpdateReadFromEntangledAsyncAction();
|
8391 | nextProps = nextState.element;
|
8392 | if (init.isDehydrated)
|
8393 | if (
|
8394 | ((init = {
|
8395 | element: nextProps,
|
8396 | isDehydrated: !1,
|
8397 | cache: nextState.cache
|
8398 | }),
|
8399 | (workInProgress.updateQueue.baseState = init),
|
8400 | (workInProgress.memoizedState = init),
|
8401 | workInProgress.flags & 256)
|
8402 | ) {
|
8403 | workInProgress = mountHostRootWithoutHydrating(
|
8404 | current,
|
8405 | workInProgress,
|
8406 | nextProps,
|
8407 | renderLanes
|
8408 | );
|
8409 | break a;
|
8410 | } else if (nextProps !== lazyComponent) {
|
8411 | lazyComponent = createCapturedValueAtFiber(
|
8412 | Error(formatProdErrorMessage(424)),
|
8413 | workInProgress
|
8414 | );
|
8415 | queueHydrationError(lazyComponent);
|
8416 | workInProgress = mountHostRootWithoutHydrating(
|
8417 | current,
|
8418 | workInProgress,
|
8419 | nextProps,
|
8420 | renderLanes
|
8421 | );
|
8422 | break a;
|
8423 | } else
|
8424 | for (
|
8425 | nextHydratableInstance = getNextHydratable(
|
8426 | workInProgress.stateNode.containerInfo.firstChild
|
8427 | ),
|
8428 | hydrationParentFiber = workInProgress,
|
8429 | isHydrating = !0,
|
8430 | hydrationErrors = null,
|
8431 | rootOrSingletonContext = !0,
|
8432 | renderLanes = mountChildFibers(
|
8433 | workInProgress,
|
8434 | null,
|
8435 | nextProps,
|
8436 | renderLanes
|
8437 | ),
|
8438 | workInProgress.child = renderLanes;
|
8439 | renderLanes;
|
8440 |
|
8441 | )
|
8442 | (renderLanes.flags = (renderLanes.flags & -3) | 4096),
|
8443 | (renderLanes = renderLanes.sibling);
|
8444 | else {
|
8445 | resetHydrationState();
|
8446 | if (nextProps === lazyComponent) {
|
8447 | workInProgress = bailoutOnAlreadyFinishedWork(
|
8448 | current,
|
8449 | workInProgress,
|
8450 | renderLanes
|
8451 | );
|
8452 | break a;
|
8453 | }
|
8454 | reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
8455 | }
|
8456 | workInProgress = workInProgress.child;
|
8457 | }
|
8458 | return workInProgress;
|
8459 | case 26:
|
8460 | return (
|
8461 | markRef(current, workInProgress),
|
8462 | (renderLanes = workInProgress.memoizedState =
|
8463 | getResource(
|
8464 | workInProgress.type,
|
8465 | null === current ? null : current.memoizedProps,
|
8466 | workInProgress.pendingProps
|
8467 | )),
|
8468 | null !== current ||
|
8469 | isHydrating ||
|
8470 | null !== renderLanes ||
|
8471 | ((renderLanes = workInProgress.type),
|
8472 | (current = workInProgress.pendingProps),
|
8473 | (lazyComponent = getOwnerDocumentFromRootContainer(
|
8474 | rootInstanceStackCursor.current
|
8475 | ).createElement(renderLanes)),
|
8476 | (lazyComponent[internalInstanceKey] = workInProgress),
|
8477 | (lazyComponent[internalPropsKey] = current),
|
8478 | setInitialProperties(lazyComponent, renderLanes, current),
|
8479 | markNodeAsHoistable(lazyComponent),
|
8480 | (workInProgress.stateNode = lazyComponent)),
|
8481 | null
|
8482 | );
|
8483 | case 27:
|
8484 | return (
|
8485 | pushHostContext(workInProgress),
|
8486 | null === current &&
|
8487 | isHydrating &&
|
8488 | ((lazyComponent = workInProgress.stateNode =
|
8489 | resolveSingletonInstance(
|
8490 | workInProgress.type,
|
8491 | workInProgress.pendingProps,
|
8492 | rootInstanceStackCursor.current
|
8493 | )),
|
8494 | (hydrationParentFiber = workInProgress),
|
8495 | (rootOrSingletonContext = !0),
|
8496 | (nextHydratableInstance = getNextHydratable(
|
8497 | lazyComponent.firstChild
|
8498 | ))),
|
8499 | (lazyComponent = workInProgress.pendingProps.children),
|
8500 | null !== current || isHydrating
|
8501 | ? reconcileChildren(
|
8502 | current,
|
8503 | workInProgress,
|
8504 | lazyComponent,
|
8505 | renderLanes
|
8506 | )
|
8507 | : (workInProgress.child = reconcileChildFibers(
|
8508 | workInProgress,
|
8509 | null,
|
8510 | lazyComponent,
|
8511 | renderLanes
|
8512 | )),
|
8513 | markRef(current, workInProgress),
|
8514 | workInProgress.child
|
8515 | );
|
8516 | case 5:
|
8517 | if (null === current && isHydrating) {
|
8518 | if ((init = lazyComponent = nextHydratableInstance))
|
8519 | (lazyComponent = canHydrateInstance(
|
8520 | lazyComponent,
|
8521 | workInProgress.type,
|
8522 | workInProgress.pendingProps,
|
8523 | rootOrSingletonContext
|
8524 | )),
|
8525 | null !== lazyComponent
|
8526 | ? ((workInProgress.stateNode = lazyComponent),
|
8527 | (hydrationParentFiber = workInProgress),
|
8528 | (nextHydratableInstance = getNextHydratable(
|
8529 | lazyComponent.firstChild
|
8530 | )),
|
8531 | (rootOrSingletonContext = !1),
|
8532 | (init = !0))
|
8533 | : (init = !1);
|
8534 | init || throwOnHydrationMismatch(workInProgress);
|
8535 | }
|
8536 | pushHostContext(workInProgress);
|
8537 | init = workInProgress.type;
|
8538 | nextProps = workInProgress.pendingProps;
|
8539 | nextState = null !== current ? current.memoizedProps : null;
|
8540 | lazyComponent = nextProps.children;
|
8541 | shouldSetTextContent(init, nextProps)
|
8542 | ? (lazyComponent = null)
|
8543 | : null !== nextState &&
|
8544 | shouldSetTextContent(init, nextState) &&
|
8545 | (workInProgress.flags |= 32);
|
8546 | null !== workInProgress.memoizedState &&
|
8547 | ((init = renderWithHooks(
|
8548 | current,
|
8549 | workInProgress,
|
8550 | TransitionAwareHostComponent,
|
8551 | null,
|
8552 | null,
|
8553 | renderLanes
|
8554 | )),
|
8555 | (HostTransitionContext._currentValue = init),
|
8556 | didReceiveUpdate &&
|
8557 | null !== current &&
|
8558 | current.memoizedState.memoizedState !== init &&
|
8559 | propagateContextChange(
|
8560 | workInProgress,
|
8561 | HostTransitionContext,
|
8562 | renderLanes
|
8563 | ));
|
8564 | markRef(current, workInProgress);
|
8565 | reconcileChildren(current, workInProgress, lazyComponent, renderLanes);
|
8566 | return workInProgress.child;
|
8567 | case 6:
|
8568 | if (null === current && isHydrating) {
|
8569 | if ((current = renderLanes = nextHydratableInstance))
|
8570 | (renderLanes = canHydrateTextInstance(
|
8571 | renderLanes,
|
8572 | workInProgress.pendingProps,
|
8573 | rootOrSingletonContext
|
8574 | )),
|
8575 | null !== renderLanes
|
8576 | ? ((workInProgress.stateNode = renderLanes),
|
8577 | (hydrationParentFiber = workInProgress),
|
8578 | (nextHydratableInstance = null),
|
8579 | (current = !0))
|
8580 | : (current = !1);
|
8581 | current || throwOnHydrationMismatch(workInProgress);
|
8582 | }
|
8583 | return null;
|
8584 | case 13:
|
8585 | return updateSuspenseComponent(current, workInProgress, renderLanes);
|
8586 | case 4:
|
8587 | return (
|
8588 | pushHostContainer(
|
8589 | workInProgress,
|
8590 | workInProgress.stateNode.containerInfo
|
8591 | ),
|
8592 | (lazyComponent = workInProgress.pendingProps),
|
8593 | null === current
|
8594 | ? (workInProgress.child = reconcileChildFibers(
|
8595 | workInProgress,
|
8596 | null,
|
8597 | lazyComponent,
|
8598 | renderLanes
|
8599 | ))
|
8600 | : reconcileChildren(
|
8601 | current,
|
8602 | workInProgress,
|
8603 | lazyComponent,
|
8604 | renderLanes
|
8605 | ),
|
8606 | workInProgress.child
|
8607 | );
|
8608 | case 11:
|
8609 | return updateForwardRef(
|
8610 | current,
|
8611 | workInProgress,
|
8612 | workInProgress.type,
|
8613 | workInProgress.pendingProps,
|
8614 | renderLanes
|
8615 | );
|
8616 | case 7:
|
8617 | return (
|
8618 | reconcileChildren(
|
8619 | current,
|
8620 | workInProgress,
|
8621 | workInProgress.pendingProps,
|
8622 | renderLanes
|
8623 | ),
|
8624 | workInProgress.child
|
8625 | );
|
8626 | case 8:
|
8627 | return (
|
8628 | reconcileChildren(
|
8629 | current,
|
8630 | workInProgress,
|
8631 | workInProgress.pendingProps.children,
|
8632 | renderLanes
|
8633 | ),
|
8634 | workInProgress.child
|
8635 | );
|
8636 | case 12:
|
8637 | return (
|
8638 | (workInProgress.flags |= 4),
|
8639 | (lazyComponent = workInProgress.stateNode),
|
8640 | (lazyComponent.effectDuration = 0),
|
8641 | (lazyComponent.passiveEffectDuration = 0),
|
8642 | reconcileChildren(
|
8643 | current,
|
8644 | workInProgress,
|
8645 | workInProgress.pendingProps.children,
|
8646 | renderLanes
|
8647 | ),
|
8648 | workInProgress.child
|
8649 | );
|
8650 | case 10:
|
8651 | a: {
|
8652 | lazyComponent = workInProgress.type;
|
8653 | init = workInProgress.pendingProps;
|
8654 | nextProps = workInProgress.memoizedProps;
|
8655 | nextState = init.value;
|
8656 | pushProvider(workInProgress, lazyComponent, nextState);
|
8657 | if (null !== nextProps)
|
8658 | if (objectIs(nextProps.value, nextState)) {
|
8659 | if (nextProps.children === init.children) {
|
8660 | workInProgress = bailoutOnAlreadyFinishedWork(
|
8661 | current,
|
8662 | workInProgress,
|
8663 | renderLanes
|
8664 | );
|
8665 | break a;
|
8666 | }
|
8667 | } else
|
8668 | propagateContextChange(workInProgress, lazyComponent, renderLanes);
|
8669 | reconcileChildren(current, workInProgress, init.children, renderLanes);
|
8670 | workInProgress = workInProgress.child;
|
8671 | }
|
8672 | return workInProgress;
|
8673 | case 9:
|
8674 | return (
|
8675 | (init = workInProgress.type._context),
|
8676 | (lazyComponent = workInProgress.pendingProps.children),
|
8677 | prepareToReadContext(workInProgress, renderLanes),
|
8678 | (init = readContext(init)),
|
8679 | markComponentRenderStarted(workInProgress),
|
8680 | (lazyComponent = lazyComponent(init)),
|
8681 | markComponentRenderStopped(),
|
8682 | (workInProgress.flags |= 1),
|
8683 | reconcileChildren(current, workInProgress, lazyComponent, renderLanes),
|
8684 | workInProgress.child
|
8685 | );
|
8686 | case 14:
|
8687 | return updateMemoComponent(
|
8688 | current,
|
8689 | workInProgress,
|
8690 | workInProgress.type,
|
8691 | workInProgress.pendingProps,
|
8692 | renderLanes
|
8693 | );
|
8694 | case 15:
|
8695 | return updateSimpleMemoComponent(
|
8696 | current,
|
8697 | workInProgress,
|
8698 | workInProgress.type,
|
8699 | workInProgress.pendingProps,
|
8700 | renderLanes
|
8701 | );
|
8702 | case 19:
|
8703 | return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
8704 | case 22:
|
8705 | return updateOffscreenComponent(current, workInProgress, renderLanes);
|
8706 | case 24:
|
8707 | return (
|
8708 | prepareToReadContext(workInProgress, renderLanes),
|
8709 | (lazyComponent = readContext(CacheContext)),
|
8710 | null === current
|
8711 | ? ((init = peekCacheFromPool()),
|
8712 | null === init &&
|
8713 | ((init = workInProgressRoot),
|
8714 | (nextProps = createCache()),
|
8715 | (init.pooledCache = nextProps),
|
8716 | nextProps.refCount++,
|
8717 | null !== nextProps && (init.pooledCacheLanes |= renderLanes),
|
8718 | (init = nextProps)),
|
8719 | (workInProgress.memoizedState = {
|
8720 | parent: lazyComponent,
|
8721 | cache: init
|
8722 | }),
|
8723 | initializeUpdateQueue(workInProgress),
|
8724 | pushProvider(workInProgress, CacheContext, init))
|
8725 | : (0 !== (current.lanes & renderLanes) &&
|
8726 | (cloneUpdateQueue(current, workInProgress),
|
8727 | processUpdateQueue(workInProgress, null, null, renderLanes),
|
8728 | suspendIfUpdateReadFromEntangledAsyncAction()),
|
8729 | (init = current.memoizedState),
|
8730 | (nextProps = workInProgress.memoizedState),
|
8731 | init.parent !== lazyComponent
|
8732 | ? ((init = { parent: lazyComponent, cache: lazyComponent }),
|
8733 | (workInProgress.memoizedState = init),
|
8734 | 0 === workInProgress.lanes &&
|
8735 | (workInProgress.memoizedState =
|
8736 | workInProgress.updateQueue.baseState =
|
8737 | init),
|
8738 | pushProvider(workInProgress, CacheContext, lazyComponent))
|
8739 | : ((lazyComponent = nextProps.cache),
|
8740 | pushProvider(workInProgress, CacheContext, lazyComponent),
|
8741 | lazyComponent !== init.cache &&
|
8742 | propagateContextChange(
|
8743 | workInProgress,
|
8744 | CacheContext,
|
8745 | renderLanes
|
8746 | ))),
|
8747 | reconcileChildren(
|
8748 | current,
|
8749 | workInProgress,
|
8750 | workInProgress.pendingProps.children,
|
8751 | renderLanes
|
8752 | ),
|
8753 | workInProgress.child
|
8754 | );
|
8755 | }
|
8756 | throw Error(formatProdErrorMessage(156, workInProgress.tag));
|
8757 | }
|
8758 | var valueCursor = createCursor(null),
|
8759 | currentlyRenderingFiber = null,
|
8760 | lastContextDependency = null,
|
8761 | lastFullyObservedContext = null;
|
8762 | function resetContextDependencies() {
|
8763 | lastFullyObservedContext =
|
8764 | lastContextDependency =
|
8765 | currentlyRenderingFiber =
|
8766 | null;
|
8767 | }
|
8768 | function pushProvider(providerFiber, context, nextValue) {
|
8769 | push(valueCursor, context._currentValue);
|
8770 | context._currentValue = nextValue;
|
8771 | }
|
8772 | function popProvider(context) {
|
8773 | context._currentValue = valueCursor.current;
|
8774 | pop(valueCursor);
|
8775 | }
|
8776 | function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
|
8777 | for (; null !== parent; ) {
|
8778 | var alternate = parent.alternate;
|
8779 | (parent.childLanes & renderLanes) !== renderLanes
|
8780 | ? ((parent.childLanes |= renderLanes),
|
8781 | null !== alternate && (alternate.childLanes |= renderLanes))
|
8782 | : null !== alternate &&
|
8783 | (alternate.childLanes & renderLanes) !== renderLanes &&
|
8784 | (alternate.childLanes |= renderLanes);
|
8785 | if (parent === propagationRoot) break;
|
8786 | parent = parent.return;
|
8787 | }
|
8788 | }
|
8789 | function propagateContextChange(workInProgress, context, renderLanes) {
|
8790 | var fiber = workInProgress.child;
|
8791 | null !== fiber && (fiber.return = workInProgress);
|
8792 | for (; null !== fiber; ) {
|
8793 | var list = fiber.dependencies;
|
8794 | if (null !== list) {
|
8795 | var nextFiber = fiber.child;
|
8796 | for (var dependency = list.firstContext; null !== dependency; ) {
|
8797 | if (dependency.context === context) {
|
8798 | if (1 === fiber.tag) {
|
8799 | dependency = createUpdate(renderLanes & -renderLanes);
|
8800 | dependency.tag = 2;
|
8801 | var updateQueue = fiber.updateQueue;
|
8802 | if (null !== updateQueue) {
|
8803 | updateQueue = updateQueue.shared;
|
8804 | var pending = updateQueue.pending;
|
8805 | null === pending
|
8806 | ? (dependency.next = dependency)
|
8807 | : ((dependency.next = pending.next),
|
8808 | (pending.next = dependency));
|
8809 | updateQueue.pending = dependency;
|
8810 | }
|
8811 | }
|
8812 | fiber.lanes |= renderLanes;
|
8813 | dependency = fiber.alternate;
|
8814 | null !== dependency && (dependency.lanes |= renderLanes);
|
8815 | scheduleContextWorkOnParentPath(
|
8816 | fiber.return,
|
8817 | renderLanes,
|
8818 | workInProgress
|
8819 | );
|
8820 | list.lanes |= renderLanes;
|
8821 | break;
|
8822 | }
|
8823 | dependency = dependency.next;
|
8824 | }
|
8825 | } else if (10 === fiber.tag)
|
8826 | nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
|
8827 | else if (18 === fiber.tag) {
|
8828 | nextFiber = fiber.return;
|
8829 | if (null === nextFiber) throw Error(formatProdErrorMessage(341));
|
8830 | nextFiber.lanes |= renderLanes;
|
8831 | list = nextFiber.alternate;
|
8832 | null !== list && (list.lanes |= renderLanes);
|
8833 | scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);
|
8834 | nextFiber = fiber.sibling;
|
8835 | } else nextFiber = fiber.child;
|
8836 | if (null !== nextFiber) nextFiber.return = fiber;
|
8837 | else
|
8838 | for (nextFiber = fiber; null !== nextFiber; ) {
|
8839 | if (nextFiber === workInProgress) {
|
8840 | nextFiber = null;
|
8841 | break;
|
8842 | }
|
8843 | fiber = nextFiber.sibling;
|
8844 | if (null !== fiber) {
|
8845 | fiber.return = nextFiber.return;
|
8846 | nextFiber = fiber;
|
8847 | break;
|
8848 | }
|
8849 | nextFiber = nextFiber.return;
|
8850 | }
|
8851 | fiber = nextFiber;
|
8852 | }
|
8853 | }
|
8854 | function prepareToReadContext(workInProgress, renderLanes) {
|
8855 | currentlyRenderingFiber = workInProgress;
|
8856 | lastFullyObservedContext = lastContextDependency = null;
|
8857 | workInProgress = workInProgress.dependencies;
|
8858 | null !== workInProgress &&
|
8859 | null !== workInProgress.firstContext &&
|
8860 | (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0),
|
8861 | (workInProgress.firstContext = null));
|
8862 | }
|
8863 | function readContext(context) {
|
8864 | return readContextForConsumer(currentlyRenderingFiber, context);
|
8865 | }
|
8866 | function readContextDuringReconciliation(consumer, context, renderLanes) {
|
8867 | null === currentlyRenderingFiber &&
|
8868 | prepareToReadContext(consumer, renderLanes);
|
8869 | return readContextForConsumer(consumer, context);
|
8870 | }
|
8871 | function readContextForConsumer(consumer, context) {
|
8872 | var value = context._currentValue;
|
8873 | if (lastFullyObservedContext !== context)
|
8874 | if (
|
8875 | ((context = { context: context, memoizedValue: value, next: null }),
|
8876 | null === lastContextDependency)
|
8877 | ) {
|
8878 | if (null === consumer) throw Error(formatProdErrorMessage(308));
|
8879 | lastContextDependency = context;
|
8880 | consumer.dependencies = { lanes: 0, firstContext: context };
|
8881 | } else lastContextDependency = lastContextDependency.next = context;
|
8882 | return value;
|
8883 | }
|
8884 | var hasForceUpdate = !1;
|
8885 | function initializeUpdateQueue(fiber) {
|
8886 | fiber.updateQueue = {
|
8887 | baseState: fiber.memoizedState,
|
8888 | firstBaseUpdate: null,
|
8889 | lastBaseUpdate: null,
|
8890 | shared: { pending: null, lanes: 0, hiddenCallbacks: null },
|
8891 | callbacks: null
|
8892 | };
|
8893 | }
|
8894 | function cloneUpdateQueue(current, workInProgress) {
|
8895 | current = current.updateQueue;
|
8896 | workInProgress.updateQueue === current &&
|
8897 | (workInProgress.updateQueue = {
|
8898 | baseState: current.baseState,
|
8899 | firstBaseUpdate: current.firstBaseUpdate,
|
8900 | lastBaseUpdate: current.lastBaseUpdate,
|
8901 | shared: current.shared,
|
8902 | callbacks: null
|
8903 | });
|
8904 | }
|
8905 | function createUpdate(lane) {
|
8906 | return { lane: lane, tag: 0, payload: null, callback: null, next: null };
|
8907 | }
|
8908 | function enqueueUpdate(fiber, update, lane) {
|
8909 | var updateQueue = fiber.updateQueue;
|
8910 | if (null === updateQueue) return null;
|
8911 | updateQueue = updateQueue.shared;
|
8912 | if (0 !== (executionContext & 2)) {
|
8913 | var pending = updateQueue.pending;
|
8914 | null === pending
|
8915 | ? (update.next = update)
|
8916 | : ((update.next = pending.next), (pending.next = update));
|
8917 | updateQueue.pending = update;
|
8918 | update = getRootForUpdatedFiber(fiber);
|
8919 | markUpdateLaneFromFiberToRoot(fiber, null, lane);
|
8920 | return update;
|
8921 | }
|
8922 | enqueueUpdate$1(fiber, updateQueue, update, lane);
|
8923 | return getRootForUpdatedFiber(fiber);
|
8924 | }
|
8925 | function entangleTransitions(root, fiber, lane) {
|
8926 | fiber = fiber.updateQueue;
|
8927 | if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) {
|
8928 | var queueLanes = fiber.lanes;
|
8929 | queueLanes &= root.pendingLanes;
|
8930 | lane |= queueLanes;
|
8931 | fiber.lanes = lane;
|
8932 | markRootEntangled(root, lane);
|
8933 | }
|
8934 | }
|
8935 | function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
|
8936 | var queue = workInProgress.updateQueue,
|
8937 | current = workInProgress.alternate;
|
8938 | if (
|
8939 | null !== current &&
|
8940 | ((current = current.updateQueue), queue === current)
|
8941 | ) {
|
8942 | var newFirst = null,
|
8943 | newLast = null;
|
8944 | queue = queue.firstBaseUpdate;
|
8945 | if (null !== queue) {
|
8946 | do {
|
8947 | var clone = {
|
8948 | lane: queue.lane,
|
8949 | tag: queue.tag,
|
8950 | payload: queue.payload,
|
8951 | callback: null,
|
8952 | next: null
|
8953 | };
|
8954 | null === newLast
|
8955 | ? (newFirst = newLast = clone)
|
8956 | : (newLast = newLast.next = clone);
|
8957 | queue = queue.next;
|
8958 | } while (null !== queue);
|
8959 | null === newLast
|
8960 | ? (newFirst = newLast = capturedUpdate)
|
8961 | : (newLast = newLast.next = capturedUpdate);
|
8962 | } else newFirst = newLast = capturedUpdate;
|
8963 | queue = {
|
8964 | baseState: current.baseState,
|
8965 | firstBaseUpdate: newFirst,
|
8966 | lastBaseUpdate: newLast,
|
8967 | shared: current.shared,
|
8968 | callbacks: current.callbacks
|
8969 | };
|
8970 | workInProgress.updateQueue = queue;
|
8971 | return;
|
8972 | }
|
8973 | workInProgress = queue.lastBaseUpdate;
|
8974 | null === workInProgress
|
8975 | ? (queue.firstBaseUpdate = capturedUpdate)
|
8976 | : (workInProgress.next = capturedUpdate);
|
8977 | queue.lastBaseUpdate = capturedUpdate;
|
8978 | }
|
8979 | var didReadFromEntangledAsyncAction = !1;
|
8980 | function suspendIfUpdateReadFromEntangledAsyncAction() {
|
8981 | if (didReadFromEntangledAsyncAction) {
|
8982 | var entangledActionThenable = currentEntangledActionThenable;
|
8983 | if (null !== entangledActionThenable) throw entangledActionThenable;
|
8984 | }
|
8985 | }
|
8986 | function processUpdateQueue(
|
8987 | workInProgress$jscomp$0,
|
8988 | props,
|
8989 | instance$jscomp$0,
|
8990 | renderLanes
|
8991 | ) {
|
8992 | didReadFromEntangledAsyncAction = !1;
|
8993 | var queue = workInProgress$jscomp$0.updateQueue;
|
8994 | hasForceUpdate = !1;
|
8995 | var firstBaseUpdate = queue.firstBaseUpdate,
|
8996 | lastBaseUpdate = queue.lastBaseUpdate,
|
8997 | pendingQueue = queue.shared.pending;
|
8998 | if (null !== pendingQueue) {
|
8999 | queue.shared.pending = null;
|
9000 | var lastPendingUpdate = pendingQueue,
|
9001 | firstPendingUpdate = lastPendingUpdate.next;
|
9002 | lastPendingUpdate.next = null;
|
9003 | null === lastBaseUpdate
|
9004 | ? (firstBaseUpdate = firstPendingUpdate)
|
9005 | : (lastBaseUpdate.next = firstPendingUpdate);
|
9006 | lastBaseUpdate = lastPendingUpdate;
|
9007 | var current = workInProgress$jscomp$0.alternate;
|
9008 | null !== current &&
|
9009 | ((current = current.updateQueue),
|
9010 | (pendingQueue = current.lastBaseUpdate),
|
9011 | pendingQueue !== lastBaseUpdate &&
|
9012 | (null === pendingQueue
|
9013 | ? (current.firstBaseUpdate = firstPendingUpdate)
|
9014 | : (pendingQueue.next = firstPendingUpdate),
|
9015 | (current.lastBaseUpdate = lastPendingUpdate)));
|
9016 | }
|
9017 | if (null !== firstBaseUpdate) {
|
9018 | var newState = queue.baseState;
|
9019 | lastBaseUpdate = 0;
|
9020 | current = firstPendingUpdate = lastPendingUpdate = null;
|
9021 | pendingQueue = firstBaseUpdate;
|
9022 | do {
|
9023 | var updateLane = pendingQueue.lane & -536870913,
|
9024 | isHiddenUpdate = updateLane !== pendingQueue.lane;
|
9025 | if (
|
9026 | isHiddenUpdate
|
9027 | ? (workInProgressRootRenderLanes & updateLane) === updateLane
|
9028 | : (renderLanes & updateLane) === updateLane
|
9029 | ) {
|
9030 | 0 !== updateLane &&
|
9031 | updateLane === currentEntangledLane &&
|
9032 | (didReadFromEntangledAsyncAction = !0);
|
9033 | null !== current &&
|
9034 | (current = current.next =
|
9035 | {
|
9036 | lane: 0,
|
9037 | tag: pendingQueue.tag,
|
9038 | payload: pendingQueue.payload,
|
9039 | callback: null,
|
9040 | next: null
|
9041 | });
|
9042 | a: {
|
9043 | var workInProgress = workInProgress$jscomp$0,
|
9044 | update = pendingQueue;
|
9045 | updateLane = props;
|
9046 | var instance = instance$jscomp$0;
|
9047 | switch (update.tag) {
|
9048 | case 1:
|
9049 | workInProgress = update.payload;
|
9050 | if ("function" === typeof workInProgress) {
|
9051 | newState = workInProgress.call(instance, newState, updateLane);
|
9052 | break a;
|
9053 | }
|
9054 | newState = workInProgress;
|
9055 | break a;
|
9056 | case 3:
|
9057 | workInProgress.flags = (workInProgress.flags & -65537) | 128;
|
9058 | case 0:
|
9059 | workInProgress = update.payload;
|
9060 | updateLane =
|
9061 | "function" === typeof workInProgress
|
9062 | ? workInProgress.call(instance, newState, updateLane)
|
9063 | : workInProgress;
|
9064 | if (null === updateLane || void 0 === updateLane) break a;
|
9065 | newState = assign({}, newState, updateLane);
|
9066 | break a;
|
9067 | case 2:
|
9068 | hasForceUpdate = !0;
|
9069 | }
|
9070 | }
|
9071 | updateLane = pendingQueue.callback;
|
9072 | null !== updateLane &&
|
9073 | ((workInProgress$jscomp$0.flags |= 64),
|
9074 | isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),
|
9075 | (isHiddenUpdate = queue.callbacks),
|
9076 | null === isHiddenUpdate
|
9077 | ? (queue.callbacks = [updateLane])
|
9078 | : isHiddenUpdate.push(updateLane));
|
9079 | } else
|
9080 | (isHiddenUpdate = {
|
9081 | lane: updateLane,
|
9082 | tag: pendingQueue.tag,
|
9083 | payload: pendingQueue.payload,
|
9084 | callback: pendingQueue.callback,
|
9085 | next: null
|
9086 | }),
|
9087 | null === current
|
9088 | ? ((firstPendingUpdate = current = isHiddenUpdate),
|
9089 | (lastPendingUpdate = newState))
|
9090 | : (current = current.next = isHiddenUpdate),
|
9091 | (lastBaseUpdate |= updateLane);
|
9092 | pendingQueue = pendingQueue.next;
|
9093 | if (null === pendingQueue)
|
9094 | if (((pendingQueue = queue.shared.pending), null === pendingQueue))
|
9095 | break;
|
9096 | else
|
9097 | (isHiddenUpdate = pendingQueue),
|
9098 | (pendingQueue = isHiddenUpdate.next),
|
9099 | (isHiddenUpdate.next = null),
|
9100 | (queue.lastBaseUpdate = isHiddenUpdate),
|
9101 | (queue.shared.pending = null);
|
9102 | } while (1);
|
9103 | null === current && (lastPendingUpdate = newState);
|
9104 | queue.baseState = lastPendingUpdate;
|
9105 | queue.firstBaseUpdate = firstPendingUpdate;
|
9106 | queue.lastBaseUpdate = current;
|
9107 | null === firstBaseUpdate && (queue.shared.lanes = 0);
|
9108 | workInProgressRootSkippedLanes |= lastBaseUpdate;
|
9109 | workInProgress$jscomp$0.lanes = lastBaseUpdate;
|
9110 | workInProgress$jscomp$0.memoizedState = newState;
|
9111 | }
|
9112 | }
|
9113 | function callCallback(callback, context) {
|
9114 | if ("function" !== typeof callback)
|
9115 | throw Error(formatProdErrorMessage(191, callback));
|
9116 | callback.call(context);
|
9117 | }
|
9118 | function commitCallbacks(updateQueue, context) {
|
9119 | var callbacks = updateQueue.callbacks;
|
9120 | if (null !== callbacks)
|
9121 | for (
|
9122 | updateQueue.callbacks = null, updateQueue = 0;
|
9123 | updateQueue < callbacks.length;
|
9124 | updateQueue++
|
9125 | )
|
9126 | callCallback(callbacks[updateQueue], context);
|
9127 | }
|
9128 | function applyDerivedStateFromProps(
|
9129 | workInProgress,
|
9130 | ctor,
|
9131 | getDerivedStateFromProps,
|
9132 | nextProps
|
9133 | ) {
|
9134 | ctor = workInProgress.memoizedState;
|
9135 | getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
|
9136 | getDerivedStateFromProps =
|
9137 | null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
|
9138 | ? ctor
|
9139 | : assign({}, ctor, getDerivedStateFromProps);
|
9140 | workInProgress.memoizedState = getDerivedStateFromProps;
|
9141 | 0 === workInProgress.lanes &&
|
9142 | (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
|
9143 | }
|
9144 | var classComponentUpdater = {
|
9145 | isMounted: function (component) {
|
9146 | return (component = component._reactInternals)
|
9147 | ? getNearestMountedFiber(component) === component
|
9148 | : !1;
|
9149 | },
|
9150 | enqueueSetState: function (inst, payload, callback) {
|
9151 | inst = inst._reactInternals;
|
9152 | var lane = requestUpdateLane(),
|
9153 | update = createUpdate(lane);
|
9154 | update.payload = payload;
|
9155 | void 0 !== callback && null !== callback && (update.callback = callback);
|
9156 | payload = enqueueUpdate(inst, update, lane);
|
9157 | null !== payload &&
|
9158 | (scheduleUpdateOnFiber(payload, inst, lane),
|
9159 | entangleTransitions(payload, inst, lane));
|
9160 | markStateUpdateScheduled(inst, lane);
|
9161 | },
|
9162 | enqueueReplaceState: function (inst, payload, callback) {
|
9163 | inst = inst._reactInternals;
|
9164 | var lane = requestUpdateLane(),
|
9165 | update = createUpdate(lane);
|
9166 | update.tag = 1;
|
9167 | update.payload = payload;
|
9168 | void 0 !== callback && null !== callback && (update.callback = callback);
|
9169 | payload = enqueueUpdate(inst, update, lane);
|
9170 | null !== payload &&
|
9171 | (scheduleUpdateOnFiber(payload, inst, lane),
|
9172 | entangleTransitions(payload, inst, lane));
|
9173 | markStateUpdateScheduled(inst, lane);
|
9174 | },
|
9175 | enqueueForceUpdate: function (inst, callback) {
|
9176 | inst = inst._reactInternals;
|
9177 | var lane = requestUpdateLane(),
|
9178 | update = createUpdate(lane);
|
9179 | update.tag = 2;
|
9180 | void 0 !== callback && null !== callback && (update.callback = callback);
|
9181 | callback = enqueueUpdate(inst, update, lane);
|
9182 | null !== callback &&
|
9183 | (scheduleUpdateOnFiber(callback, inst, lane),
|
9184 | entangleTransitions(callback, inst, lane));
|
9185 | null !== injectedProfilingHooks &&
|
9186 | "function" === typeof injectedProfilingHooks.markForceUpdateScheduled &&
|
9187 | injectedProfilingHooks.markForceUpdateScheduled(inst, lane);
|
9188 | }
|
9189 | };
|
9190 | function checkShouldComponentUpdate(
|
9191 | workInProgress,
|
9192 | ctor,
|
9193 | oldProps,
|
9194 | newProps,
|
9195 | oldState,
|
9196 | newState,
|
9197 | nextContext
|
9198 | ) {
|
9199 | workInProgress = workInProgress.stateNode;
|
9200 | return "function" === typeof workInProgress.shouldComponentUpdate
|
9201 | ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
|
9202 | : ctor.prototype && ctor.prototype.isPureReactComponent
|
9203 | ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
|
9204 | : !0;
|
9205 | }
|
9206 | function callComponentWillReceiveProps(
|
9207 | workInProgress,
|
9208 | instance,
|
9209 | newProps,
|
9210 | nextContext
|
9211 | ) {
|
9212 | workInProgress = instance.state;
|
9213 | "function" === typeof instance.componentWillReceiveProps &&
|
9214 | instance.componentWillReceiveProps(newProps, nextContext);
|
9215 | "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
|
9216 | instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
|
9217 | instance.state !== workInProgress &&
|
9218 | classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
9219 | }
|
9220 | function resolveClassComponentProps(Component, baseProps) {
|
9221 | var newProps = baseProps;
|
9222 | if ("ref" in baseProps) {
|
9223 | newProps = {};
|
9224 | for (var propName in baseProps)
|
9225 | "ref" !== propName && (newProps[propName] = baseProps[propName]);
|
9226 | }
|
9227 | if ((Component = Component.defaultProps)) {
|
9228 | newProps === baseProps && (newProps = assign({}, newProps));
|
9229 | for (var propName$162 in Component)
|
9230 | void 0 === newProps[propName$162] &&
|
9231 | (newProps[propName$162] = Component[propName$162]);
|
9232 | }
|
9233 | return newProps;
|
9234 | }
|
9235 | var offscreenSubtreeIsHidden = !1,
|
9236 | offscreenSubtreeWasHidden = !1,
|
9237 | needsFormReset = !1,
|
9238 | PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
|
9239 | nextEffect = null,
|
9240 | inProgressLanes = null,
|
9241 | inProgressRoot = null;
|
9242 | function shouldProfile(current) {
|
9243 | return 0 !== (current.mode & 2) && 0 !== (executionContext & 4);
|
9244 | }
|
9245 | function callComponentWillUnmountWithTimer(current, instance) {
|
9246 | instance.props = resolveClassComponentProps(
|
9247 | current.type,
|
9248 | current.memoizedProps
|
9249 | );
|
9250 | instance.state = current.memoizedState;
|
9251 | if (shouldProfile(current))
|
9252 | try {
|
9253 | startLayoutEffectTimer(), instance.componentWillUnmount();
|
9254 | } finally {
|
9255 | recordLayoutEffectDuration(current);
|
9256 | }
|
9257 | else instance.componentWillUnmount();
|
9258 | }
|
9259 | function safelyAttachRef(current, nearestMountedAncestor) {
|
9260 | try {
|
9261 | var ref = current.ref;
|
9262 | if (null !== ref) {
|
9263 | var instance = current.stateNode;
|
9264 | switch (current.tag) {
|
9265 | case 26:
|
9266 | case 27:
|
9267 | case 5:
|
9268 | var instanceToUse = instance;
|
9269 | break;
|
9270 | default:
|
9271 | instanceToUse = instance;
|
9272 | }
|
9273 | if ("function" === typeof ref)
|
9274 | if (shouldProfile(current))
|
9275 | try {
|
9276 | startLayoutEffectTimer(), (current.refCleanup = ref(instanceToUse));
|
9277 | } finally {
|
9278 | recordLayoutEffectDuration(current);
|
9279 | }
|
9280 | else current.refCleanup = ref(instanceToUse);
|
9281 | else ref.current = instanceToUse;
|
9282 | }
|
9283 | } catch (error) {
|
9284 | captureCommitPhaseError(current, nearestMountedAncestor, error);
|
9285 | }
|
9286 | }
|
9287 | function safelyDetachRef(current, nearestMountedAncestor) {
|
9288 | var ref = current.ref,
|
9289 | refCleanup = current.refCleanup;
|
9290 | if (null !== ref)
|
9291 | if ("function" === typeof refCleanup)
|
9292 | try {
|
9293 | if (shouldProfile(current))
|
9294 | try {
|
9295 | startLayoutEffectTimer(), refCleanup();
|
9296 | } finally {
|
9297 | recordLayoutEffectDuration(current);
|
9298 | }
|
9299 | else refCleanup();
|
9300 | } catch (error) {
|
9301 | captureCommitPhaseError(current, nearestMountedAncestor, error);
|
9302 | } finally {
|
9303 | (current.refCleanup = null),
|
9304 | (current = current.alternate),
|
9305 | null != current && (current.refCleanup = null);
|
9306 | }
|
9307 | else if ("function" === typeof ref)
|
9308 | try {
|
9309 | if (shouldProfile(current))
|
9310 | try {
|
9311 | startLayoutEffectTimer(), ref(null);
|
9312 | } finally {
|
9313 | recordLayoutEffectDuration(current);
|
9314 | }
|
9315 | else ref(null);
|
9316 | } catch (error$163) {
|
9317 | captureCommitPhaseError(current, nearestMountedAncestor, error$163);
|
9318 | }
|
9319 | else ref.current = null;
|
9320 | }
|
9321 | function safelyCallDestroy(current, nearestMountedAncestor, destroy) {
|
9322 | try {
|
9323 | destroy();
|
9324 | } catch (error) {
|
9325 | captureCommitPhaseError(current, nearestMountedAncestor, error);
|
9326 | }
|
9327 | }
|
9328 | var shouldFireAfterActiveInstanceBlur = !1;
|
9329 | function commitBeforeMutationEffects(root, firstChild) {
|
9330 | eventsEnabled = _enabled;
|
9331 | root = getActiveElementDeep();
|
9332 | if (hasSelectionCapabilities(root)) {
|
9333 | if ("selectionStart" in root)
|
9334 | var JSCompiler_temp = {
|
9335 | start: root.selectionStart,
|
9336 | end: root.selectionEnd
|
9337 | };
|
9338 | else
|
9339 | a: {
|
9340 | JSCompiler_temp =
|
9341 | ((JSCompiler_temp = root.ownerDocument) &&
|
9342 | JSCompiler_temp.defaultView) ||
|
9343 | window;
|
9344 | var selection =
|
9345 | JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
|
9346 | if (selection && 0 !== selection.rangeCount) {
|
9347 | JSCompiler_temp = selection.anchorNode;
|
9348 | var anchorOffset = selection.anchorOffset,
|
9349 | focusNode = selection.focusNode;
|
9350 | selection = selection.focusOffset;
|
9351 | try {
|
9352 | JSCompiler_temp.nodeType, focusNode.nodeType;
|
9353 | } catch (e$22) {
|
9354 | JSCompiler_temp = null;
|
9355 | break a;
|
9356 | }
|
9357 | var length = 0,
|
9358 | start = -1,
|
9359 | end = -1,
|
9360 | indexWithinAnchor = 0,
|
9361 | indexWithinFocus = 0,
|
9362 | node = root,
|
9363 | parentNode = null;
|
9364 | b: for (;;) {
|
9365 | for (var next; ; ) {
|
9366 | node !== JSCompiler_temp ||
|
9367 | (0 !== anchorOffset && 3 !== node.nodeType) ||
|
9368 | (start = length + anchorOffset);
|
9369 | node !== focusNode ||
|
9370 | (0 !== selection && 3 !== node.nodeType) ||
|
9371 | (end = length + selection);
|
9372 | 3 === node.nodeType && (length += node.nodeValue.length);
|
9373 | if (null === (next = node.firstChild)) break;
|
9374 | parentNode = node;
|
9375 | node = next;
|
9376 | }
|
9377 | for (;;) {
|
9378 | if (node === root) break b;
|
9379 | parentNode === JSCompiler_temp &&
|
9380 | ++indexWithinAnchor === anchorOffset &&
|
9381 | (start = length);
|
9382 | parentNode === focusNode &&
|
9383 | ++indexWithinFocus === selection &&
|
9384 | (end = length);
|
9385 | if (null !== (next = node.nextSibling)) break;
|
9386 | node = parentNode;
|
9387 | parentNode = node.parentNode;
|
9388 | }
|
9389 | node = next;
|
9390 | }
|
9391 | JSCompiler_temp =
|
9392 | -1 === start || -1 === end ? null : { start: start, end: end };
|
9393 | } else JSCompiler_temp = null;
|
9394 | }
|
9395 | JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
|
9396 | } else JSCompiler_temp = null;
|
9397 | selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };
|
9398 | _enabled = !1;
|
9399 | for (nextEffect = firstChild; null !== nextEffect; )
|
9400 | if (
|
9401 | ((firstChild = nextEffect),
|
9402 | (root = firstChild.child),
|
9403 | 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
|
9404 | )
|
9405 | (root.return = firstChild), (nextEffect = root);
|
9406 | else
|
9407 | for (; null !== nextEffect; ) {
|
9408 | firstChild = nextEffect;
|
9409 | try {
|
9410 | var current = firstChild.alternate,
|
9411 | flags = firstChild.flags;
|
9412 | switch (firstChild.tag) {
|
9413 | case 0:
|
9414 | break;
|
9415 | case 11:
|
9416 | case 15:
|
9417 | break;
|
9418 | case 1:
|
9419 | if (0 !== (flags & 1024) && null !== current) {
|
9420 | var prevState = current.memoizedState,
|
9421 | instance = firstChild.stateNode,
|
9422 | snapshot = instance.getSnapshotBeforeUpdate(
|
9423 | resolveClassComponentProps(
|
9424 | firstChild.type,
|
9425 | current.memoizedProps
|
9426 | ),
|
9427 | prevState
|
9428 | );
|
9429 | instance.__reactInternalSnapshotBeforeUpdate = snapshot;
|
9430 | }
|
9431 | break;
|
9432 | case 3:
|
9433 | if (0 !== (flags & 1024)) {
|
9434 | var container = firstChild.stateNode.containerInfo,
|
9435 | nodeType = container.nodeType;
|
9436 | if (9 === nodeType) clearContainerSparingly(container);
|
9437 | else if (1 === nodeType)
|
9438 | switch (container.nodeName) {
|
9439 | case "HEAD":
|
9440 | case "HTML":
|
9441 | case "BODY":
|
9442 | clearContainerSparingly(container);
|
9443 | break;
|
9444 | default:
|
9445 | container.textContent = "";
|
9446 | }
|
9447 | }
|
9448 | break;
|
9449 | case 5:
|
9450 | case 26:
|
9451 | case 27:
|
9452 | case 6:
|
9453 | case 4:
|
9454 | case 17:
|
9455 | break;
|
9456 | default:
|
9457 | if (0 !== (flags & 1024))
|
9458 | throw Error(formatProdErrorMessage(163));
|
9459 | }
|
9460 | } catch (error) {
|
9461 | captureCommitPhaseError(firstChild, firstChild.return, error);
|
9462 | }
|
9463 | root = firstChild.sibling;
|
9464 | if (null !== root) {
|
9465 | root.return = firstChild.return;
|
9466 | nextEffect = root;
|
9467 | break;
|
9468 | }
|
9469 | nextEffect = firstChild.return;
|
9470 | }
|
9471 | current = shouldFireAfterActiveInstanceBlur;
|
9472 | shouldFireAfterActiveInstanceBlur = !1;
|
9473 | return current;
|
9474 | }
|
9475 | function commitHookEffectListUnmount(
|
9476 | flags,
|
9477 | finishedWork,
|
9478 | nearestMountedAncestor
|
9479 | ) {
|
9480 | var updateQueue = finishedWork.updateQueue;
|
9481 | updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;
|
9482 | if (null !== updateQueue) {
|
9483 | var effect = (updateQueue = updateQueue.next);
|
9484 | do {
|
9485 | if ((effect.tag & flags) === flags) {
|
9486 | var inst = effect.inst,
|
9487 | destroy = inst.destroy;
|
9488 | void 0 !== destroy &&
|
9489 | ((inst.destroy = void 0),
|
9490 | 0 !== (flags & 8)
|
9491 | ? null !== injectedProfilingHooks &&
|
9492 | "function" ===
|
9493 | typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted &&
|
9494 | injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(
|
9495 | finishedWork
|
9496 | )
|
9497 | : 0 !== (flags & 4) &&
|
9498 | markComponentLayoutEffectUnmountStarted(finishedWork),
|
9499 | safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy),
|
9500 | 0 !== (flags & 8)
|
9501 | ? null !== injectedProfilingHooks &&
|
9502 | "function" ===
|
9503 | typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped &&
|
9504 | injectedProfilingHooks.markComponentPassiveEffectUnmountStopped()
|
9505 | : 0 !== (flags & 4) && markComponentLayoutEffectUnmountStopped());
|
9506 | }
|
9507 | effect = effect.next;
|
9508 | } while (effect !== updateQueue);
|
9509 | }
|
9510 | }
|
9511 | function commitHookEffectListMount(flags, finishedWork) {
|
9512 | var updateQueue = finishedWork.updateQueue;
|
9513 | updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;
|
9514 | if (null !== updateQueue) {
|
9515 | var effect = (updateQueue = updateQueue.next);
|
9516 | do {
|
9517 | if ((effect.tag & flags) === flags) {
|
9518 | 0 !== (flags & 8)
|
9519 | ? null !== injectedProfilingHooks &&
|
9520 | "function" ===
|
9521 | typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted &&
|
9522 | injectedProfilingHooks.markComponentPassiveEffectMountStarted(
|
9523 | finishedWork
|
9524 | )
|
9525 | : 0 !== (flags & 4) &&
|
9526 | null !== injectedProfilingHooks &&
|
9527 | "function" ===
|
9528 | typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted &&
|
9529 | injectedProfilingHooks.markComponentLayoutEffectMountStarted(
|
9530 | finishedWork
|
9531 | );
|
9532 | var create = effect.create,
|
9533 | inst = effect.inst;
|
9534 | create = create();
|
9535 | inst.destroy = create;
|
9536 | 0 !== (flags & 8)
|
9537 | ? null !== injectedProfilingHooks &&
|
9538 | "function" ===
|
9539 | typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped &&
|
9540 | injectedProfilingHooks.markComponentPassiveEffectMountStopped()
|
9541 | : 0 !== (flags & 4) &&
|
9542 | null !== injectedProfilingHooks &&
|
9543 | "function" ===
|
9544 | typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped &&
|
9545 | injectedProfilingHooks.markComponentLayoutEffectMountStopped();
|
9546 | }
|
9547 | effect = effect.next;
|
9548 | } while (effect !== updateQueue);
|
9549 | }
|
9550 | }
|
9551 | function commitHookLayoutEffects(finishedWork, hookFlags) {
|
9552 | if (shouldProfile(finishedWork)) {
|
9553 | try {
|
9554 | startLayoutEffectTimer(),
|
9555 | commitHookEffectListMount(hookFlags, finishedWork);
|
9556 | } catch (error) {
|
9557 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9558 | }
|
9559 | recordLayoutEffectDuration(finishedWork);
|
9560 | } else
|
9561 | try {
|
9562 | commitHookEffectListMount(hookFlags, finishedWork);
|
9563 | } catch (error$167) {
|
9564 | captureCommitPhaseError(finishedWork, finishedWork.return, error$167);
|
9565 | }
|
9566 | }
|
9567 | function commitClassCallbacks(finishedWork) {
|
9568 | var updateQueue = finishedWork.updateQueue;
|
9569 | if (null !== updateQueue) {
|
9570 | var instance = finishedWork.stateNode;
|
9571 | try {
|
9572 | commitCallbacks(updateQueue, instance);
|
9573 | } catch (error) {
|
9574 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9575 | }
|
9576 | }
|
9577 | }
|
9578 | function commitHostComponentMount(finishedWork) {
|
9579 | var type = finishedWork.type,
|
9580 | props = finishedWork.memoizedProps,
|
9581 | instance = finishedWork.stateNode;
|
9582 | try {
|
9583 | a: switch (type) {
|
9584 | case "button":
|
9585 | case "input":
|
9586 | case "select":
|
9587 | case "textarea":
|
9588 | props.autoFocus && instance.focus();
|
9589 | break a;
|
9590 | case "img":
|
9591 | props.src && (instance.src = props.src);
|
9592 | }
|
9593 | } catch (error) {
|
9594 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9595 | }
|
9596 | }
|
9597 | function commitProfilerUpdate(finishedWork, current) {
|
9598 | if (executionContext & 4)
|
9599 | try {
|
9600 | var _finishedWork$memoize2 = finishedWork.memoizedProps,
|
9601 | onCommit = _finishedWork$memoize2.onCommit,
|
9602 | onRender = _finishedWork$memoize2.onRender,
|
9603 | effectDuration = finishedWork.stateNode.effectDuration;
|
9604 | _finishedWork$memoize2 = commitTime;
|
9605 | current = null === current ? "mount" : "update";
|
9606 | currentUpdateIsNested && (current = "nested-update");
|
9607 | "function" === typeof onRender &&
|
9608 | onRender(
|
9609 | finishedWork.memoizedProps.id,
|
9610 | current,
|
9611 | finishedWork.actualDuration,
|
9612 | finishedWork.treeBaseDuration,
|
9613 | finishedWork.actualStartTime,
|
9614 | _finishedWork$memoize2
|
9615 | );
|
9616 | "function" === typeof onCommit &&
|
9617 | onCommit(
|
9618 | finishedWork.memoizedProps.id,
|
9619 | current,
|
9620 | effectDuration,
|
9621 | _finishedWork$memoize2
|
9622 | );
|
9623 | enqueuePendingPassiveProfilerEffect(finishedWork);
|
9624 | var parentFiber = finishedWork.return;
|
9625 | a: for (; null !== parentFiber; ) {
|
9626 | switch (parentFiber.tag) {
|
9627 | case 3:
|
9628 | parentFiber.stateNode.effectDuration += effectDuration;
|
9629 | break a;
|
9630 | case 12:
|
9631 | parentFiber.stateNode.effectDuration += effectDuration;
|
9632 | break a;
|
9633 | }
|
9634 | parentFiber = parentFiber.return;
|
9635 | }
|
9636 | } catch (error) {
|
9637 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9638 | }
|
9639 | }
|
9640 | function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
|
9641 | var flags = finishedWork.flags;
|
9642 | switch (finishedWork.tag) {
|
9643 | case 0:
|
9644 | case 11:
|
9645 | case 15:
|
9646 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9647 | flags & 4 && commitHookLayoutEffects(finishedWork, 5);
|
9648 | break;
|
9649 | case 1:
|
9650 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9651 | if (flags & 4)
|
9652 | if (((finishedRoot = finishedWork.stateNode), null === current))
|
9653 | if (shouldProfile(finishedWork)) {
|
9654 | try {
|
9655 | startLayoutEffectTimer(), finishedRoot.componentDidMount();
|
9656 | } catch (error) {
|
9657 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9658 | }
|
9659 | recordLayoutEffectDuration(finishedWork);
|
9660 | } else
|
9661 | try {
|
9662 | finishedRoot.componentDidMount();
|
9663 | } catch (error$168) {
|
9664 | captureCommitPhaseError(
|
9665 | finishedWork,
|
9666 | finishedWork.return,
|
9667 | error$168
|
9668 | );
|
9669 | }
|
9670 | else {
|
9671 | var prevProps = resolveClassComponentProps(
|
9672 | finishedWork.type,
|
9673 | current.memoizedProps
|
9674 | );
|
9675 | current = current.memoizedState;
|
9676 | if (shouldProfile(finishedWork)) {
|
9677 | try {
|
9678 | startLayoutEffectTimer(),
|
9679 | finishedRoot.componentDidUpdate(
|
9680 | prevProps,
|
9681 | current,
|
9682 | finishedRoot.__reactInternalSnapshotBeforeUpdate
|
9683 | );
|
9684 | } catch (error$169) {
|
9685 | captureCommitPhaseError(
|
9686 | finishedWork,
|
9687 | finishedWork.return,
|
9688 | error$169
|
9689 | );
|
9690 | }
|
9691 | recordLayoutEffectDuration(finishedWork);
|
9692 | } else
|
9693 | try {
|
9694 | finishedRoot.componentDidUpdate(
|
9695 | prevProps,
|
9696 | current,
|
9697 | finishedRoot.__reactInternalSnapshotBeforeUpdate
|
9698 | );
|
9699 | } catch (error$170) {
|
9700 | captureCommitPhaseError(
|
9701 | finishedWork,
|
9702 | finishedWork.return,
|
9703 | error$170
|
9704 | );
|
9705 | }
|
9706 | }
|
9707 | flags & 64 && commitClassCallbacks(finishedWork);
|
9708 | flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
|
9709 | break;
|
9710 | case 3:
|
9711 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9712 | if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {
|
9713 | finishedRoot = null;
|
9714 | if (null !== finishedWork.child)
|
9715 | switch (finishedWork.child.tag) {
|
9716 | case 27:
|
9717 | case 5:
|
9718 | finishedRoot = finishedWork.child.stateNode;
|
9719 | break;
|
9720 | case 1:
|
9721 | finishedRoot = finishedWork.child.stateNode;
|
9722 | }
|
9723 | try {
|
9724 | commitCallbacks(flags, finishedRoot);
|
9725 | } catch (error) {
|
9726 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
9727 | }
|
9728 | }
|
9729 | break;
|
9730 | case 26:
|
9731 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9732 | flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
|
9733 | break;
|
9734 | case 27:
|
9735 | case 5:
|
9736 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9737 | null === current && flags & 4 && commitHostComponentMount(finishedWork);
|
9738 | flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
|
9739 | break;
|
9740 | case 12:
|
9741 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9742 | flags & 4 && commitProfilerUpdate(finishedWork, current);
|
9743 | break;
|
9744 | case 13:
|
9745 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9746 | flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
|
9747 | break;
|
9748 | case 22:
|
9749 | prevProps =
|
9750 | null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
|
9751 | if (!prevProps) {
|
9752 | current =
|
9753 | (null !== current && null !== current.memoizedState) ||
|
9754 | offscreenSubtreeWasHidden;
|
9755 | var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
|
9756 | prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
|
9757 | offscreenSubtreeIsHidden = prevProps;
|
9758 | (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden
|
9759 | ? recursivelyTraverseReappearLayoutEffects(
|
9760 | finishedRoot,
|
9761 | finishedWork,
|
9762 | 0 !== (finishedWork.subtreeFlags & 8772)
|
9763 | )
|
9764 | : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9765 | offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
|
9766 | offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
9767 | }
|
9768 | flags & 512 &&
|
9769 | ("manual" === finishedWork.memoizedProps.mode
|
9770 | ? safelyAttachRef(finishedWork, finishedWork.return)
|
9771 | : safelyDetachRef(finishedWork, finishedWork.return));
|
9772 | break;
|
9773 | default:
|
9774 | recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
|
9775 | }
|
9776 | }
|
9777 | function detachFiberAfterEffects(fiber) {
|
9778 | var alternate = fiber.alternate;
|
9779 | null !== alternate &&
|
9780 | ((fiber.alternate = null), detachFiberAfterEffects(alternate));
|
9781 | fiber.child = null;
|
9782 | fiber.deletions = null;
|
9783 | fiber.sibling = null;
|
9784 | 5 === fiber.tag &&
|
9785 | ((alternate = fiber.stateNode),
|
9786 | null !== alternate && detachDeletedInstance(alternate));
|
9787 | fiber.stateNode = null;
|
9788 | fiber.return = null;
|
9789 | fiber.dependencies = null;
|
9790 | fiber.memoizedProps = null;
|
9791 | fiber.memoizedState = null;
|
9792 | fiber.pendingProps = null;
|
9793 | fiber.stateNode = null;
|
9794 | fiber.updateQueue = null;
|
9795 | }
|
9796 | function isHostParent(fiber) {
|
9797 | return (
|
9798 | 5 === fiber.tag ||
|
9799 | 3 === fiber.tag ||
|
9800 | 26 === fiber.tag ||
|
9801 | 27 === fiber.tag ||
|
9802 | 4 === fiber.tag
|
9803 | );
|
9804 | }
|
9805 | function getHostSibling(fiber) {
|
9806 | a: for (;;) {
|
9807 | for (; null === fiber.sibling; ) {
|
9808 | if (null === fiber.return || isHostParent(fiber.return)) return null;
|
9809 | fiber = fiber.return;
|
9810 | }
|
9811 | fiber.sibling.return = fiber.return;
|
9812 | for (
|
9813 | fiber = fiber.sibling;
|
9814 | 5 !== fiber.tag &&
|
9815 | 6 !== fiber.tag &&
|
9816 | 27 !== fiber.tag &&
|
9817 | 18 !== fiber.tag;
|
9818 |
|
9819 | ) {
|
9820 | if (fiber.flags & 2) continue a;
|
9821 | if (null === fiber.child || 4 === fiber.tag) continue a;
|
9822 | else (fiber.child.return = fiber), (fiber = fiber.child);
|
9823 | }
|
9824 | if (!(fiber.flags & 2)) return fiber.stateNode;
|
9825 | }
|
9826 | }
|
9827 | function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
|
9828 | var tag = node.tag;
|
9829 | if (5 === tag || 6 === tag)
|
9830 | (node = node.stateNode),
|
9831 | before
|
9832 | ? 8 === parent.nodeType
|
9833 | ? parent.parentNode.insertBefore(node, before)
|
9834 | : parent.insertBefore(node, before)
|
9835 | : (8 === parent.nodeType
|
9836 | ? ((before = parent.parentNode), before.insertBefore(node, parent))
|
9837 | : ((before = parent), before.appendChild(node)),
|
9838 | (parent = parent._reactRootContainer),
|
9839 | (null !== parent && void 0 !== parent) ||
|
9840 | null !== before.onclick ||
|
9841 | (before.onclick = noop$3));
|
9842 | else if (4 !== tag && 27 !== tag && ((node = node.child), null !== node))
|
9843 | for (
|
9844 | insertOrAppendPlacementNodeIntoContainer(node, before, parent),
|
9845 | node = node.sibling;
|
9846 | null !== node;
|
9847 |
|
9848 | )
|
9849 | insertOrAppendPlacementNodeIntoContainer(node, before, parent),
|
9850 | (node = node.sibling);
|
9851 | }
|
9852 | function insertOrAppendPlacementNode(node, before, parent) {
|
9853 | var tag = node.tag;
|
9854 | if (5 === tag || 6 === tag)
|
9855 | (node = node.stateNode),
|
9856 | before ? parent.insertBefore(node, before) : parent.appendChild(node);
|
9857 | else if (4 !== tag && 27 !== tag && ((node = node.child), null !== node))
|
9858 | for (
|
9859 | insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
|
9860 | null !== node;
|
9861 |
|
9862 | )
|
9863 | insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
|
9864 | }
|
9865 | var hostParent = null,
|
9866 | hostParentIsContainer = !1;
|
9867 | function recursivelyTraverseDeletionEffects(
|
9868 | finishedRoot,
|
9869 | nearestMountedAncestor,
|
9870 | parent
|
9871 | ) {
|
9872 | for (parent = parent.child; null !== parent; )
|
9873 | commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
|
9874 | (parent = parent.sibling);
|
9875 | }
|
9876 | function commitDeletionEffectsOnFiber(
|
9877 | finishedRoot,
|
9878 | nearestMountedAncestor,
|
9879 | deletedFiber
|
9880 | ) {
|
9881 | if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
|
9882 | try {
|
9883 | injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
|
9884 | } catch (err) {}
|
9885 | switch (deletedFiber.tag) {
|
9886 | case 26:
|
9887 | offscreenSubtreeWasHidden ||
|
9888 | safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
9889 | recursivelyTraverseDeletionEffects(
|
9890 | finishedRoot,
|
9891 | nearestMountedAncestor,
|
9892 | deletedFiber
|
9893 | );
|
9894 | deletedFiber.memoizedState
|
9895 | ? deletedFiber.memoizedState.count--
|
9896 | : deletedFiber.stateNode &&
|
9897 | ((deletedFiber = deletedFiber.stateNode),
|
9898 | deletedFiber.parentNode.removeChild(deletedFiber));
|
9899 | break;
|
9900 | case 27:
|
9901 | offscreenSubtreeWasHidden ||
|
9902 | safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
9903 | var prevHostParent = hostParent,
|
9904 | prevHostParentIsContainer = hostParentIsContainer;
|
9905 | hostParent = deletedFiber.stateNode;
|
9906 | recursivelyTraverseDeletionEffects(
|
9907 | finishedRoot,
|
9908 | nearestMountedAncestor,
|
9909 | deletedFiber
|
9910 | );
|
9911 | deletedFiber = deletedFiber.stateNode;
|
9912 | for (finishedRoot = deletedFiber.attributes; finishedRoot.length; )
|
9913 | deletedFiber.removeAttributeNode(finishedRoot[0]);
|
9914 | detachDeletedInstance(deletedFiber);
|
9915 | hostParent = prevHostParent;
|
9916 | hostParentIsContainer = prevHostParentIsContainer;
|
9917 | break;
|
9918 | case 5:
|
9919 | offscreenSubtreeWasHidden ||
|
9920 | safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
9921 | case 6:
|
9922 | prevHostParent = hostParent;
|
9923 | prevHostParentIsContainer = hostParentIsContainer;
|
9924 | hostParent = null;
|
9925 | recursivelyTraverseDeletionEffects(
|
9926 | finishedRoot,
|
9927 | nearestMountedAncestor,
|
9928 | deletedFiber
|
9929 | );
|
9930 | hostParent = prevHostParent;
|
9931 | hostParentIsContainer = prevHostParentIsContainer;
|
9932 | null !== hostParent &&
|
9933 | (hostParentIsContainer
|
9934 | ? ((finishedRoot = hostParent),
|
9935 | (deletedFiber = deletedFiber.stateNode),
|
9936 | 8 === finishedRoot.nodeType
|
9937 | ? finishedRoot.parentNode.removeChild(deletedFiber)
|
9938 | : finishedRoot.removeChild(deletedFiber))
|
9939 | : hostParent.removeChild(deletedFiber.stateNode));
|
9940 | break;
|
9941 | case 18:
|
9942 | null !== hostParent &&
|
9943 | (hostParentIsContainer
|
9944 | ? ((finishedRoot = hostParent),
|
9945 | (deletedFiber = deletedFiber.stateNode),
|
9946 | 8 === finishedRoot.nodeType
|
9947 | ? clearSuspenseBoundary(finishedRoot.parentNode, deletedFiber)
|
9948 | : 1 === finishedRoot.nodeType &&
|
9949 | clearSuspenseBoundary(finishedRoot, deletedFiber),
|
9950 | retryIfBlockedOn(finishedRoot))
|
9951 | : clearSuspenseBoundary(hostParent, deletedFiber.stateNode));
|
9952 | break;
|
9953 | case 4:
|
9954 | prevHostParent = hostParent;
|
9955 | prevHostParentIsContainer = hostParentIsContainer;
|
9956 | hostParent = deletedFiber.stateNode.containerInfo;
|
9957 | hostParentIsContainer = !0;
|
9958 | recursivelyTraverseDeletionEffects(
|
9959 | finishedRoot,
|
9960 | nearestMountedAncestor,
|
9961 | deletedFiber
|
9962 | );
|
9963 | hostParent = prevHostParent;
|
9964 | hostParentIsContainer = prevHostParentIsContainer;
|
9965 | break;
|
9966 | case 0:
|
9967 | case 11:
|
9968 | case 14:
|
9969 | case 15:
|
9970 | if (
|
9971 | !offscreenSubtreeWasHidden &&
|
9972 | ((prevHostParent = deletedFiber.updateQueue),
|
9973 | null !== prevHostParent &&
|
9974 | ((prevHostParent = prevHostParent.lastEffect),
|
9975 | null !== prevHostParent))
|
9976 | ) {
|
9977 | prevHostParentIsContainer = prevHostParent = prevHostParent.next;
|
9978 | do {
|
9979 | var tag = prevHostParentIsContainer.tag,
|
9980 | inst = prevHostParentIsContainer.inst,
|
9981 | destroy = inst.destroy;
|
9982 | void 0 !== destroy &&
|
9983 | (0 !== (tag & 2)
|
9984 | ? ((inst.destroy = void 0),
|
9985 | safelyCallDestroy(
|
9986 | deletedFiber,
|
9987 | nearestMountedAncestor,
|
9988 | destroy
|
9989 | ))
|
9990 | : 0 !== (tag & 4) &&
|
9991 | (markComponentLayoutEffectUnmountStarted(deletedFiber),
|
9992 | shouldProfile(deletedFiber)
|
9993 | ? (startLayoutEffectTimer(),
|
9994 | (inst.destroy = void 0),
|
9995 | safelyCallDestroy(
|
9996 | deletedFiber,
|
9997 | nearestMountedAncestor,
|
9998 | destroy
|
9999 | ),
|
10000 | recordLayoutEffectDuration(deletedFiber))
|
10001 | : ((inst.destroy = void 0),
|
10002 | safelyCallDestroy(
|
10003 | deletedFiber,
|
10004 | nearestMountedAncestor,
|
10005 | destroy
|
10006 | )),
|
10007 | markComponentLayoutEffectUnmountStopped()));
|
10008 | prevHostParentIsContainer = prevHostParentIsContainer.next;
|
10009 | } while (prevHostParentIsContainer !== prevHostParent);
|
10010 | }
|
10011 | recursivelyTraverseDeletionEffects(
|
10012 | finishedRoot,
|
10013 | nearestMountedAncestor,
|
10014 | deletedFiber
|
10015 | );
|
10016 | break;
|
10017 | case 1:
|
10018 | if (
|
10019 | !offscreenSubtreeWasHidden &&
|
10020 | (safelyDetachRef(deletedFiber, nearestMountedAncestor),
|
10021 | (prevHostParent = deletedFiber.stateNode),
|
10022 | "function" === typeof prevHostParent.componentWillUnmount)
|
10023 | )
|
10024 | try {
|
10025 | callComponentWillUnmountWithTimer(deletedFiber, prevHostParent);
|
10026 | } catch (error) {
|
10027 | captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);
|
10028 | }
|
10029 | recursivelyTraverseDeletionEffects(
|
10030 | finishedRoot,
|
10031 | nearestMountedAncestor,
|
10032 | deletedFiber
|
10033 | );
|
10034 | break;
|
10035 | case 21:
|
10036 | recursivelyTraverseDeletionEffects(
|
10037 | finishedRoot,
|
10038 | nearestMountedAncestor,
|
10039 | deletedFiber
|
10040 | );
|
10041 | break;
|
10042 | case 22:
|
10043 | safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
10044 | offscreenSubtreeWasHidden =
|
10045 | (prevHostParent = offscreenSubtreeWasHidden) ||
|
10046 | null !== deletedFiber.memoizedState;
|
10047 | recursivelyTraverseDeletionEffects(
|
10048 | finishedRoot,
|
10049 | nearestMountedAncestor,
|
10050 | deletedFiber
|
10051 | );
|
10052 | offscreenSubtreeWasHidden = prevHostParent;
|
10053 | break;
|
10054 | default:
|
10055 | recursivelyTraverseDeletionEffects(
|
10056 | finishedRoot,
|
10057 | nearestMountedAncestor,
|
10058 | deletedFiber
|
10059 | );
|
10060 | }
|
10061 | }
|
10062 | function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
|
10063 | if (
|
10064 | null === finishedWork.memoizedState &&
|
10065 | ((finishedRoot = finishedWork.alternate),
|
10066 | null !== finishedRoot &&
|
10067 | ((finishedRoot = finishedRoot.memoizedState),
|
10068 | null !== finishedRoot &&
|
10069 | ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))
|
10070 | )
|
10071 | try {
|
10072 | retryIfBlockedOn(finishedRoot);
|
10073 | } catch (error) {
|
10074 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
10075 | }
|
10076 | }
|
10077 | function getRetryCache(finishedWork) {
|
10078 | switch (finishedWork.tag) {
|
10079 | case 13:
|
10080 | case 19:
|
10081 | var retryCache = finishedWork.stateNode;
|
10082 | null === retryCache &&
|
10083 | (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
|
10084 | return retryCache;
|
10085 | case 22:
|
10086 | return (
|
10087 | (finishedWork = finishedWork.stateNode),
|
10088 | (retryCache = finishedWork._retryCache),
|
10089 | null === retryCache &&
|
10090 | (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),
|
10091 | retryCache
|
10092 | );
|
10093 | default:
|
10094 | throw Error(formatProdErrorMessage(435, finishedWork.tag));
|
10095 | }
|
10096 | }
|
10097 | function attachSuspenseRetryListeners(finishedWork, wakeables) {
|
10098 | var retryCache = getRetryCache(finishedWork);
|
10099 | wakeables.forEach(function (wakeable) {
|
10100 | var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
|
10101 | if (!retryCache.has(wakeable)) {
|
10102 | retryCache.add(wakeable);
|
10103 | if (isDevToolsPresent)
|
10104 | if (null !== inProgressLanes && null !== inProgressRoot)
|
10105 | restorePendingUpdaters(inProgressRoot, inProgressLanes);
|
10106 | else throw Error(formatProdErrorMessage(413));
|
10107 | wakeable.then(retry, retry);
|
10108 | }
|
10109 | });
|
10110 | }
|
10111 | function commitMutationEffects(root, finishedWork, committedLanes) {
|
10112 | inProgressLanes = committedLanes;
|
10113 | inProgressRoot = root;
|
10114 | commitMutationEffectsOnFiber(finishedWork, root);
|
10115 | inProgressRoot = inProgressLanes = null;
|
10116 | }
|
10117 | function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
|
10118 | var deletions = parentFiber.deletions;
|
10119 | if (null !== deletions)
|
10120 | for (var i = 0; i < deletions.length; i++) {
|
10121 | var childToDelete = deletions[i];
|
10122 | try {
|
10123 | var root = root$jscomp$0,
|
10124 | returnFiber = parentFiber,
|
10125 | parent = returnFiber;
|
10126 | a: for (; null !== parent; ) {
|
10127 | switch (parent.tag) {
|
10128 | case 27:
|
10129 | case 5:
|
10130 | hostParent = parent.stateNode;
|
10131 | hostParentIsContainer = !1;
|
10132 | break a;
|
10133 | case 3:
|
10134 | hostParent = parent.stateNode.containerInfo;
|
10135 | hostParentIsContainer = !0;
|
10136 | break a;
|
10137 | case 4:
|
10138 | hostParent = parent.stateNode.containerInfo;
|
10139 | hostParentIsContainer = !0;
|
10140 | break a;
|
10141 | }
|
10142 | parent = parent.return;
|
10143 | }
|
10144 | if (null === hostParent) throw Error(formatProdErrorMessage(160));
|
10145 | commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
|
10146 | hostParent = null;
|
10147 | hostParentIsContainer = !1;
|
10148 | var alternate = childToDelete.alternate;
|
10149 | null !== alternate && (alternate.return = null);
|
10150 | childToDelete.return = null;
|
10151 | } catch (error) {
|
10152 | captureCommitPhaseError(childToDelete, parentFiber, error);
|
10153 | }
|
10154 | }
|
10155 | if (parentFiber.subtreeFlags & 13878)
|
10156 | for (parentFiber = parentFiber.child; null !== parentFiber; )
|
10157 | commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
|
10158 | (parentFiber = parentFiber.sibling);
|
10159 | }
|
10160 | var currentHoistableRoot = null;
|
10161 | function commitMutationEffectsOnFiber(finishedWork, root) {
|
10162 | var current = finishedWork.alternate,
|
10163 | flags = finishedWork.flags;
|
10164 | switch (finishedWork.tag) {
|
10165 | case 0:
|
10166 | case 11:
|
10167 | case 14:
|
10168 | case 15:
|
10169 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10170 | commitReconciliationEffects(finishedWork);
|
10171 | if (flags & 4) {
|
10172 | try {
|
10173 | commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
|
10174 | commitHookEffectListMount(3, finishedWork);
|
10175 | } catch (error) {
|
10176 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
10177 | }
|
10178 | if (shouldProfile(finishedWork)) {
|
10179 | try {
|
10180 | startLayoutEffectTimer(),
|
10181 | commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
10182 | } catch (error$184) {
|
10183 | captureCommitPhaseError(
|
10184 | finishedWork,
|
10185 | finishedWork.return,
|
10186 | error$184
|
10187 | );
|
10188 | }
|
10189 | recordLayoutEffectDuration(finishedWork);
|
10190 | } else
|
10191 | try {
|
10192 | commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
10193 | } catch (error$185) {
|
10194 | captureCommitPhaseError(
|
10195 | finishedWork,
|
10196 | finishedWork.return,
|
10197 | error$185
|
10198 | );
|
10199 | }
|
10200 | }
|
10201 | break;
|
10202 | case 1:
|
10203 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10204 | commitReconciliationEffects(finishedWork);
|
10205 | flags & 512 &&
|
10206 | null !== current &&
|
10207 | safelyDetachRef(current, current.return);
|
10208 | flags & 64 &&
|
10209 | offscreenSubtreeIsHidden &&
|
10210 | ((finishedWork = finishedWork.updateQueue),
|
10211 | null !== finishedWork &&
|
10212 | ((flags = finishedWork.callbacks),
|
10213 | null !== flags &&
|
10214 | ((current = finishedWork.shared.hiddenCallbacks),
|
10215 | (finishedWork.shared.hiddenCallbacks =
|
10216 | null === current ? flags : current.concat(flags)))));
|
10217 | break;
|
10218 | case 26:
|
10219 | var hoistableRoot = currentHoistableRoot;
|
10220 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10221 | commitReconciliationEffects(finishedWork);
|
10222 | flags & 512 &&
|
10223 | null !== current &&
|
10224 | safelyDetachRef(current, current.return);
|
10225 | if (flags & 4)
|
10226 | if (
|
10227 | ((root = null !== current ? current.memoizedState : null),
|
10228 | (flags = finishedWork.memoizedState),
|
10229 | null === current)
|
10230 | )
|
10231 | if (null === flags)
|
10232 | if (null === finishedWork.stateNode) {
|
10233 | a: {
|
10234 | flags = finishedWork.type;
|
10235 | current = finishedWork.memoizedProps;
|
10236 | root = hoistableRoot.ownerDocument || hoistableRoot;
|
10237 | b: switch (flags) {
|
10238 | case "title":
|
10239 | hoistableRoot = root.getElementsByTagName("title")[0];
|
10240 | if (
|
10241 | !hoistableRoot ||
|
10242 | hoistableRoot[internalHoistableMarker] ||
|
10243 | hoistableRoot[internalInstanceKey] ||
|
10244 | "http://www.w3.org/2000/svg" ===
|
10245 | hoistableRoot.namespaceURI ||
|
10246 | hoistableRoot.hasAttribute("itemprop")
|
10247 | )
|
10248 | (hoistableRoot = root.createElement(flags)),
|
10249 | root.head.insertBefore(
|
10250 | hoistableRoot,
|
10251 | root.querySelector("head > title")
|
10252 | );
|
10253 | setInitialProperties(hoistableRoot, flags, current);
|
10254 | hoistableRoot[internalInstanceKey] = finishedWork;
|
10255 | markNodeAsHoistable(hoistableRoot);
|
10256 | flags = hoistableRoot;
|
10257 | break a;
|
10258 | case "link":
|
10259 | var maybeNodes = getHydratableHoistableCache(
|
10260 | "link",
|
10261 | "href",
|
10262 | root
|
10263 | ).get(flags + (current.href || ""));
|
10264 | if (maybeNodes)
|
10265 | for (var i = 0; i < maybeNodes.length; i++)
|
10266 | if (
|
10267 | ((hoistableRoot = maybeNodes[i]),
|
10268 | hoistableRoot.getAttribute("href") ===
|
10269 | (null == current.href ? null : current.href) &&
|
10270 | hoistableRoot.getAttribute("rel") ===
|
10271 | (null == current.rel ? null : current.rel) &&
|
10272 | hoistableRoot.getAttribute("title") ===
|
10273 | (null == current.title ? null : current.title) &&
|
10274 | hoistableRoot.getAttribute("crossorigin") ===
|
10275 | (null == current.crossOrigin
|
10276 | ? null
|
10277 | : current.crossOrigin))
|
10278 | ) {
|
10279 | maybeNodes.splice(i, 1);
|
10280 | break b;
|
10281 | }
|
10282 | hoistableRoot = root.createElement(flags);
|
10283 | setInitialProperties(hoistableRoot, flags, current);
|
10284 | root.head.appendChild(hoistableRoot);
|
10285 | break;
|
10286 | case "meta":
|
10287 | if (
|
10288 | (maybeNodes = getHydratableHoistableCache(
|
10289 | "meta",
|
10290 | "content",
|
10291 | root
|
10292 | ).get(flags + (current.content || "")))
|
10293 | )
|
10294 | for (i = 0; i < maybeNodes.length; i++)
|
10295 | if (
|
10296 | ((hoistableRoot = maybeNodes[i]),
|
10297 | hoistableRoot.getAttribute("content") ===
|
10298 | (null == current.content
|
10299 | ? null
|
10300 | : "" + current.content) &&
|
10301 | hoistableRoot.getAttribute("name") ===
|
10302 | (null == current.name ? null : current.name) &&
|
10303 | hoistableRoot.getAttribute("property") ===
|
10304 | (null == current.property
|
10305 | ? null
|
10306 | : current.property) &&
|
10307 | hoistableRoot.getAttribute("http-equiv") ===
|
10308 | (null == current.httpEquiv
|
10309 | ? null
|
10310 | : current.httpEquiv) &&
|
10311 | hoistableRoot.getAttribute("charset") ===
|
10312 | (null == current.charSet
|
10313 | ? null
|
10314 | : current.charSet))
|
10315 | ) {
|
10316 | maybeNodes.splice(i, 1);
|
10317 | break b;
|
10318 | }
|
10319 | hoistableRoot = root.createElement(flags);
|
10320 | setInitialProperties(hoistableRoot, flags, current);
|
10321 | root.head.appendChild(hoistableRoot);
|
10322 | break;
|
10323 | default:
|
10324 | throw Error(formatProdErrorMessage(468, flags));
|
10325 | }
|
10326 | hoistableRoot[internalInstanceKey] = finishedWork;
|
10327 | markNodeAsHoistable(hoistableRoot);
|
10328 | flags = hoistableRoot;
|
10329 | }
|
10330 | finishedWork.stateNode = flags;
|
10331 | } else
|
10332 | mountHoistable(
|
10333 | hoistableRoot,
|
10334 | finishedWork.type,
|
10335 | finishedWork.stateNode
|
10336 | );
|
10337 | else
|
10338 | finishedWork.stateNode = acquireResource(
|
10339 | hoistableRoot,
|
10340 | flags,
|
10341 | finishedWork.memoizedProps
|
10342 | );
|
10343 | else if (root !== flags)
|
10344 | null === root
|
10345 | ? null !== current.stateNode &&
|
10346 | ((current = current.stateNode),
|
10347 | current.parentNode.removeChild(current))
|
10348 | : root.count--,
|
10349 | null === flags
|
10350 | ? mountHoistable(
|
10351 | hoistableRoot,
|
10352 | finishedWork.type,
|
10353 | finishedWork.stateNode
|
10354 | )
|
10355 | : acquireResource(
|
10356 | hoistableRoot,
|
10357 | flags,
|
10358 | finishedWork.memoizedProps
|
10359 | );
|
10360 | else if (null === flags && null !== finishedWork.stateNode)
|
10361 | try {
|
10362 | var domElement = finishedWork.stateNode,
|
10363 | newProps = finishedWork.memoizedProps;
|
10364 | updateProperties(
|
10365 | domElement,
|
10366 | finishedWork.type,
|
10367 | current.memoizedProps,
|
10368 | newProps
|
10369 | );
|
10370 | domElement[internalPropsKey] = newProps;
|
10371 | } catch (error$186) {
|
10372 | captureCommitPhaseError(
|
10373 | finishedWork,
|
10374 | finishedWork.return,
|
10375 | error$186
|
10376 | );
|
10377 | }
|
10378 | break;
|
10379 | case 27:
|
10380 | if (flags & 4 && null === finishedWork.alternate) {
|
10381 | hoistableRoot = finishedWork.stateNode;
|
10382 | maybeNodes = finishedWork.memoizedProps;
|
10383 | for (i = hoistableRoot.firstChild; i; ) {
|
10384 | var nextNode = i.nextSibling,
|
10385 | nodeName = i.nodeName;
|
10386 | i[internalHoistableMarker] ||
|
10387 | "HEAD" === nodeName ||
|
10388 | "BODY" === nodeName ||
|
10389 | "SCRIPT" === nodeName ||
|
10390 | "STYLE" === nodeName ||
|
10391 | ("LINK" === nodeName && "stylesheet" === i.rel.toLowerCase()) ||
|
10392 | hoistableRoot.removeChild(i);
|
10393 | i = nextNode;
|
10394 | }
|
10395 | i = finishedWork.type;
|
10396 | for (nextNode = hoistableRoot.attributes; nextNode.length; )
|
10397 | hoistableRoot.removeAttributeNode(nextNode[0]);
|
10398 | setInitialProperties(hoistableRoot, i, maybeNodes);
|
10399 | hoistableRoot[internalInstanceKey] = finishedWork;
|
10400 | hoistableRoot[internalPropsKey] = maybeNodes;
|
10401 | }
|
10402 | case 5:
|
10403 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10404 | commitReconciliationEffects(finishedWork);
|
10405 | flags & 512 &&
|
10406 | null !== current &&
|
10407 | safelyDetachRef(current, current.return);
|
10408 | if (finishedWork.flags & 32) {
|
10409 | root = finishedWork.stateNode;
|
10410 | try {
|
10411 | setTextContent(root, "");
|
10412 | } catch (error$187) {
|
10413 | captureCommitPhaseError(finishedWork, finishedWork.return, error$187);
|
10414 | }
|
10415 | }
|
10416 | if (flags & 4 && ((root = finishedWork.stateNode), null != root)) {
|
10417 | hoistableRoot = finishedWork.memoizedProps;
|
10418 | current = null !== current ? current.memoizedProps : hoistableRoot;
|
10419 | maybeNodes = finishedWork.type;
|
10420 | try {
|
10421 | updateProperties(root, maybeNodes, current, hoistableRoot),
|
10422 | (root[internalPropsKey] = hoistableRoot);
|
10423 | } catch (error$189) {
|
10424 | captureCommitPhaseError(finishedWork, finishedWork.return, error$189);
|
10425 | }
|
10426 | }
|
10427 | flags & 1024 && (needsFormReset = !0);
|
10428 | break;
|
10429 | case 6:
|
10430 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10431 | commitReconciliationEffects(finishedWork);
|
10432 | if (flags & 4) {
|
10433 | if (null === finishedWork.stateNode)
|
10434 | throw Error(formatProdErrorMessage(162));
|
10435 | flags = finishedWork.stateNode;
|
10436 | current = finishedWork.memoizedProps;
|
10437 | try {
|
10438 | flags.nodeValue = current;
|
10439 | } catch (error$190) {
|
10440 | captureCommitPhaseError(finishedWork, finishedWork.return, error$190);
|
10441 | }
|
10442 | }
|
10443 | break;
|
10444 | case 3:
|
10445 | tagCaches = null;
|
10446 | hoistableRoot = currentHoistableRoot;
|
10447 | currentHoistableRoot = getHoistableRoot(root.containerInfo);
|
10448 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10449 | currentHoistableRoot = hoistableRoot;
|
10450 | commitReconciliationEffects(finishedWork);
|
10451 | if (flags & 4 && null !== current && current.memoizedState.isDehydrated)
|
10452 | try {
|
10453 | retryIfBlockedOn(root.containerInfo);
|
10454 | } catch (error$191) {
|
10455 | captureCommitPhaseError(finishedWork, finishedWork.return, error$191);
|
10456 | }
|
10457 | needsFormReset &&
|
10458 | ((needsFormReset = !1), recursivelyResetForms(finishedWork));
|
10459 | break;
|
10460 | case 4:
|
10461 | flags = currentHoistableRoot;
|
10462 | currentHoistableRoot = getHoistableRoot(
|
10463 | finishedWork.stateNode.containerInfo
|
10464 | );
|
10465 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10466 | commitReconciliationEffects(finishedWork);
|
10467 | currentHoistableRoot = flags;
|
10468 | break;
|
10469 | case 13:
|
10470 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10471 | commitReconciliationEffects(finishedWork);
|
10472 | finishedWork.child.flags & 8192 &&
|
10473 | (null !== finishedWork.memoizedState) !==
|
10474 | (null !== current && null !== current.memoizedState) &&
|
10475 | (globalMostRecentFallbackTime = now$1());
|
10476 | flags & 4 &&
|
10477 | ((flags = finishedWork.updateQueue),
|
10478 | null !== flags &&
|
10479 | ((finishedWork.updateQueue = null),
|
10480 | attachSuspenseRetryListeners(finishedWork, flags)));
|
10481 | break;
|
10482 | case 22:
|
10483 | flags & 512 &&
|
10484 | null !== current &&
|
10485 | safelyDetachRef(current, current.return);
|
10486 | domElement = null !== finishedWork.memoizedState;
|
10487 | newProps = null !== current && null !== current.memoizedState;
|
10488 | var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
|
10489 | prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
|
10490 | offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || domElement;
|
10491 | offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || newProps;
|
10492 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10493 | offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
10494 | offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
|
10495 | commitReconciliationEffects(finishedWork);
|
10496 | root = finishedWork.stateNode;
|
10497 | root._current = finishedWork;
|
10498 | root._visibility &= -3;
|
10499 | root._visibility |= root._pendingVisibility & 2;
|
10500 | if (
|
10501 | flags & 8192 &&
|
10502 | ((root._visibility = domElement
|
10503 | ? root._visibility & -2
|
10504 | : root._visibility | 1),
|
10505 | domElement &&
|
10506 | ((root = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden),
|
10507 | null === current ||
|
10508 | newProps ||
|
10509 | root ||
|
10510 | recursivelyTraverseDisappearLayoutEffects(finishedWork)),
|
10511 | null === finishedWork.memoizedProps ||
|
10512 | "manual" !== finishedWork.memoizedProps.mode)
|
10513 | )
|
10514 | a: for (current = null, root = finishedWork; ; ) {
|
10515 | if (5 === root.tag || 26 === root.tag || 27 === root.tag) {
|
10516 | if (null === current) {
|
10517 | current = root;
|
10518 | try {
|
10519 | (hoistableRoot = root.stateNode),
|
10520 | domElement
|
10521 | ? ((maybeNodes = hoistableRoot.style),
|
10522 | "function" === typeof maybeNodes.setProperty
|
10523 | ? maybeNodes.setProperty("display", "none", "important")
|
10524 | : (maybeNodes.display = "none"))
|
10525 | : ((i = root.stateNode),
|
10526 | (nextNode = root.memoizedProps.style),
|
10527 | (nodeName =
|
10528 | void 0 !== nextNode &&
|
10529 | null !== nextNode &&
|
10530 | nextNode.hasOwnProperty("display")
|
10531 | ? nextNode.display
|
10532 | : null),
|
10533 | (i.style.display =
|
10534 | null == nodeName || "boolean" === typeof nodeName
|
10535 | ? ""
|
10536 | : ("" + nodeName).trim()));
|
10537 | } catch (error) {
|
10538 | captureCommitPhaseError(
|
10539 | finishedWork,
|
10540 | finishedWork.return,
|
10541 | error
|
10542 | );
|
10543 | }
|
10544 | }
|
10545 | } else if (6 === root.tag) {
|
10546 | if (null === current)
|
10547 | try {
|
10548 | root.stateNode.nodeValue = domElement ? "" : root.memoizedProps;
|
10549 | } catch (error$174) {
|
10550 | captureCommitPhaseError(
|
10551 | finishedWork,
|
10552 | finishedWork.return,
|
10553 | error$174
|
10554 | );
|
10555 | }
|
10556 | } else if (
|
10557 | ((22 !== root.tag && 23 !== root.tag) ||
|
10558 | null === root.memoizedState ||
|
10559 | root === finishedWork) &&
|
10560 | null !== root.child
|
10561 | ) {
|
10562 | root.child.return = root;
|
10563 | root = root.child;
|
10564 | continue;
|
10565 | }
|
10566 | if (root === finishedWork) break a;
|
10567 | for (; null === root.sibling; ) {
|
10568 | if (null === root.return || root.return === finishedWork) break a;
|
10569 | current === root && (current = null);
|
10570 | root = root.return;
|
10571 | }
|
10572 | current === root && (current = null);
|
10573 | root.sibling.return = root.return;
|
10574 | root = root.sibling;
|
10575 | }
|
10576 | flags & 4 &&
|
10577 | ((flags = finishedWork.updateQueue),
|
10578 | null !== flags &&
|
10579 | ((current = flags.retryQueue),
|
10580 | null !== current &&
|
10581 | ((flags.retryQueue = null),
|
10582 | attachSuspenseRetryListeners(finishedWork, current))));
|
10583 | break;
|
10584 | case 19:
|
10585 | recursivelyTraverseMutationEffects(root, finishedWork);
|
10586 | commitReconciliationEffects(finishedWork);
|
10587 | flags & 4 &&
|
10588 | ((flags = finishedWork.updateQueue),
|
10589 | null !== flags &&
|
10590 | ((finishedWork.updateQueue = null),
|
10591 | attachSuspenseRetryListeners(finishedWork, flags)));
|
10592 | break;
|
10593 | case 21:
|
10594 | break;
|
10595 | default:
|
10596 | recursivelyTraverseMutationEffects(root, finishedWork),
|
10597 | commitReconciliationEffects(finishedWork);
|
10598 | }
|
10599 | }
|
10600 | function commitReconciliationEffects(finishedWork) {
|
10601 | var flags = finishedWork.flags;
|
10602 | if (flags & 2) {
|
10603 | try {
|
10604 | if (27 !== finishedWork.tag) {
|
10605 | b: {
|
10606 | for (var parent = finishedWork.return; null !== parent; ) {
|
10607 | if (isHostParent(parent)) {
|
10608 | var JSCompiler_inline_result = parent;
|
10609 | break b;
|
10610 | }
|
10611 | parent = parent.return;
|
10612 | }
|
10613 | throw Error(formatProdErrorMessage(160));
|
10614 | }
|
10615 | switch (JSCompiler_inline_result.tag) {
|
10616 | case 27:
|
10617 | var parent$jscomp$0 = JSCompiler_inline_result.stateNode,
|
10618 | before = getHostSibling(finishedWork);
|
10619 | insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0);
|
10620 | break;
|
10621 | case 5:
|
10622 | var parent$175 = JSCompiler_inline_result.stateNode;
|
10623 | JSCompiler_inline_result.flags & 32 &&
|
10624 | (setTextContent(parent$175, ""),
|
10625 | (JSCompiler_inline_result.flags &= -33));
|
10626 | var before$176 = getHostSibling(finishedWork);
|
10627 | insertOrAppendPlacementNode(finishedWork, before$176, parent$175);
|
10628 | break;
|
10629 | case 3:
|
10630 | case 4:
|
10631 | var parent$177 = JSCompiler_inline_result.stateNode.containerInfo,
|
10632 | before$178 = getHostSibling(finishedWork);
|
10633 | insertOrAppendPlacementNodeIntoContainer(
|
10634 | finishedWork,
|
10635 | before$178,
|
10636 | parent$177
|
10637 | );
|
10638 | break;
|
10639 | default:
|
10640 | throw Error(formatProdErrorMessage(161));
|
10641 | }
|
10642 | }
|
10643 | } catch (error) {
|
10644 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
10645 | }
|
10646 | finishedWork.flags &= -3;
|
10647 | }
|
10648 | flags & 4096 && (finishedWork.flags &= -4097);
|
10649 | }
|
10650 | function recursivelyResetForms(parentFiber) {
|
10651 | if (parentFiber.subtreeFlags & 1024)
|
10652 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
10653 | var fiber = parentFiber;
|
10654 | recursivelyResetForms(fiber);
|
10655 | 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
|
10656 | parentFiber = parentFiber.sibling;
|
10657 | }
|
10658 | }
|
10659 | function commitLayoutEffects(finishedWork, root, committedLanes) {
|
10660 | inProgressLanes = committedLanes;
|
10661 | inProgressRoot = root;
|
10662 | commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
|
10663 | inProgressRoot = inProgressLanes = null;
|
10664 | }
|
10665 | function recursivelyTraverseLayoutEffects(root, parentFiber) {
|
10666 | if (parentFiber.subtreeFlags & 8772)
|
10667 | for (parentFiber = parentFiber.child; null !== parentFiber; )
|
10668 | commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),
|
10669 | (parentFiber = parentFiber.sibling);
|
10670 | }
|
10671 | function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
|
10672 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
10673 | var finishedWork = parentFiber;
|
10674 | switch (finishedWork.tag) {
|
10675 | case 0:
|
10676 | case 11:
|
10677 | case 14:
|
10678 | case 15:
|
10679 | if (shouldProfile(finishedWork))
|
10680 | try {
|
10681 | startLayoutEffectTimer(),
|
10682 | commitHookEffectListUnmount(4, finishedWork, finishedWork.return);
|
10683 | } finally {
|
10684 | recordLayoutEffectDuration(finishedWork);
|
10685 | }
|
10686 | else commitHookEffectListUnmount(4, finishedWork, finishedWork.return);
|
10687 | recursivelyTraverseDisappearLayoutEffects(finishedWork);
|
10688 | break;
|
10689 | case 1:
|
10690 | safelyDetachRef(finishedWork, finishedWork.return);
|
10691 | var instance = finishedWork.stateNode;
|
10692 | if ("function" === typeof instance.componentWillUnmount) {
|
10693 | var current = finishedWork,
|
10694 | nearestMountedAncestor = finishedWork.return;
|
10695 | try {
|
10696 | callComponentWillUnmountWithTimer(current, instance);
|
10697 | } catch (error) {
|
10698 | captureCommitPhaseError(current, nearestMountedAncestor, error);
|
10699 | }
|
10700 | }
|
10701 | recursivelyTraverseDisappearLayoutEffects(finishedWork);
|
10702 | break;
|
10703 | case 26:
|
10704 | case 27:
|
10705 | case 5:
|
10706 | safelyDetachRef(finishedWork, finishedWork.return);
|
10707 | recursivelyTraverseDisappearLayoutEffects(finishedWork);
|
10708 | break;
|
10709 | case 22:
|
10710 | safelyDetachRef(finishedWork, finishedWork.return);
|
10711 | null === finishedWork.memoizedState &&
|
10712 | recursivelyTraverseDisappearLayoutEffects(finishedWork);
|
10713 | break;
|
10714 | default:
|
10715 | recursivelyTraverseDisappearLayoutEffects(finishedWork);
|
10716 | }
|
10717 | parentFiber = parentFiber.sibling;
|
10718 | }
|
10719 | }
|
10720 | function recursivelyTraverseReappearLayoutEffects(
|
10721 | finishedRoot$jscomp$0,
|
10722 | parentFiber,
|
10723 | includeWorkInProgressEffects
|
10724 | ) {
|
10725 | includeWorkInProgressEffects =
|
10726 | includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
|
10727 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
10728 | var current = parentFiber.alternate,
|
10729 | finishedRoot = finishedRoot$jscomp$0,
|
10730 | finishedWork = parentFiber,
|
10731 | flags = finishedWork.flags;
|
10732 | switch (finishedWork.tag) {
|
10733 | case 0:
|
10734 | case 11:
|
10735 | case 15:
|
10736 | recursivelyTraverseReappearLayoutEffects(
|
10737 | finishedRoot,
|
10738 | finishedWork,
|
10739 | includeWorkInProgressEffects
|
10740 | );
|
10741 | commitHookLayoutEffects(finishedWork, 4);
|
10742 | break;
|
10743 | case 1:
|
10744 | recursivelyTraverseReappearLayoutEffects(
|
10745 | finishedRoot,
|
10746 | finishedWork,
|
10747 | includeWorkInProgressEffects
|
10748 | );
|
10749 | finishedRoot = finishedWork.stateNode;
|
10750 | if ("function" === typeof finishedRoot.componentDidMount)
|
10751 | try {
|
10752 | finishedRoot.componentDidMount();
|
10753 | } catch (error) {
|
10754 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
10755 | }
|
10756 | current = finishedWork.updateQueue;
|
10757 | if (null !== current) {
|
10758 | var hiddenCallbacks = current.shared.hiddenCallbacks;
|
10759 | if (null !== hiddenCallbacks)
|
10760 | for (
|
10761 | current.shared.hiddenCallbacks = null, current = 0;
|
10762 | current < hiddenCallbacks.length;
|
10763 | current++
|
10764 | )
|
10765 | callCallback(hiddenCallbacks[current], finishedRoot);
|
10766 | }
|
10767 | includeWorkInProgressEffects &&
|
10768 | flags & 64 &&
|
10769 | commitClassCallbacks(finishedWork);
|
10770 | safelyAttachRef(finishedWork, finishedWork.return);
|
10771 | break;
|
10772 | case 26:
|
10773 | case 27:
|
10774 | case 5:
|
10775 | recursivelyTraverseReappearLayoutEffects(
|
10776 | finishedRoot,
|
10777 | finishedWork,
|
10778 | includeWorkInProgressEffects
|
10779 | );
|
10780 | includeWorkInProgressEffects &&
|
10781 | null === current &&
|
10782 | flags & 4 &&
|
10783 | commitHostComponentMount(finishedWork);
|
10784 | safelyAttachRef(finishedWork, finishedWork.return);
|
10785 | break;
|
10786 | case 12:
|
10787 | recursivelyTraverseReappearLayoutEffects(
|
10788 | finishedRoot,
|
10789 | finishedWork,
|
10790 | includeWorkInProgressEffects
|
10791 | );
|
10792 | includeWorkInProgressEffects &&
|
10793 | flags & 4 &&
|
10794 | commitProfilerUpdate(finishedWork, current);
|
10795 | break;
|
10796 | case 13:
|
10797 | recursivelyTraverseReappearLayoutEffects(
|
10798 | finishedRoot,
|
10799 | finishedWork,
|
10800 | includeWorkInProgressEffects
|
10801 | );
|
10802 | includeWorkInProgressEffects &&
|
10803 | flags & 4 &&
|
10804 | commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
|
10805 | break;
|
10806 | case 22:
|
10807 | null === finishedWork.memoizedState &&
|
10808 | recursivelyTraverseReappearLayoutEffects(
|
10809 | finishedRoot,
|
10810 | finishedWork,
|
10811 | includeWorkInProgressEffects
|
10812 | );
|
10813 | safelyAttachRef(finishedWork, finishedWork.return);
|
10814 | break;
|
10815 | default:
|
10816 | recursivelyTraverseReappearLayoutEffects(
|
10817 | finishedRoot,
|
10818 | finishedWork,
|
10819 | includeWorkInProgressEffects
|
10820 | );
|
10821 | }
|
10822 | parentFiber = parentFiber.sibling;
|
10823 | }
|
10824 | }
|
10825 | function commitHookPassiveMountEffects(finishedWork, hookFlags) {
|
10826 | if (shouldProfile(finishedWork)) {
|
10827 | passiveEffectStartTime = now();
|
10828 | try {
|
10829 | commitHookEffectListMount(hookFlags, finishedWork);
|
10830 | } catch (error) {
|
10831 | captureCommitPhaseError(finishedWork, finishedWork.return, error);
|
10832 | }
|
10833 | recordPassiveEffectDuration(finishedWork);
|
10834 | } else
|
10835 | try {
|
10836 | commitHookEffectListMount(hookFlags, finishedWork);
|
10837 | } catch (error$196) {
|
10838 | captureCommitPhaseError(finishedWork, finishedWork.return, error$196);
|
10839 | }
|
10840 | }
|
10841 | function commitOffscreenPassiveMountEffects(current, finishedWork) {
|
10842 | var previousCache = null;
|
10843 | null !== current &&
|
10844 | null !== current.memoizedState &&
|
10845 | null !== current.memoizedState.cachePool &&
|
10846 | (previousCache = current.memoizedState.cachePool.pool);
|
10847 | current = null;
|
10848 | null !== finishedWork.memoizedState &&
|
10849 | null !== finishedWork.memoizedState.cachePool &&
|
10850 | (current = finishedWork.memoizedState.cachePool.pool);
|
10851 | current !== previousCache &&
|
10852 | (null != current && current.refCount++,
|
10853 | null != previousCache && releaseCache(previousCache));
|
10854 | }
|
10855 | function commitCachePassiveMountEffect(current, finishedWork) {
|
10856 | current = null;
|
10857 | null !== finishedWork.alternate &&
|
10858 | (current = finishedWork.alternate.memoizedState.cache);
|
10859 | finishedWork = finishedWork.memoizedState.cache;
|
10860 | finishedWork !== current &&
|
10861 | (finishedWork.refCount++, null != current && releaseCache(current));
|
10862 | }
|
10863 | function recursivelyTraversePassiveMountEffects(
|
10864 | root,
|
10865 | parentFiber,
|
10866 | committedLanes,
|
10867 | committedTransitions
|
10868 | ) {
|
10869 | if (parentFiber.subtreeFlags & 10256)
|
10870 | for (parentFiber = parentFiber.child; null !== parentFiber; )
|
10871 | commitPassiveMountOnFiber(
|
10872 | root,
|
10873 | parentFiber,
|
10874 | committedLanes,
|
10875 | committedTransitions
|
10876 | ),
|
10877 | (parentFiber = parentFiber.sibling);
|
10878 | }
|
10879 | function commitPassiveMountOnFiber(
|
10880 | finishedRoot,
|
10881 | finishedWork,
|
10882 | committedLanes,
|
10883 | committedTransitions
|
10884 | ) {
|
10885 | var flags = finishedWork.flags;
|
10886 | switch (finishedWork.tag) {
|
10887 | case 0:
|
10888 | case 11:
|
10889 | case 15:
|
10890 | recursivelyTraversePassiveMountEffects(
|
10891 | finishedRoot,
|
10892 | finishedWork,
|
10893 | committedLanes,
|
10894 | committedTransitions
|
10895 | );
|
10896 | flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);
|
10897 | break;
|
10898 | case 3:
|
10899 | recursivelyTraversePassiveMountEffects(
|
10900 | finishedRoot,
|
10901 | finishedWork,
|
10902 | committedLanes,
|
10903 | committedTransitions
|
10904 | );
|
10905 | flags & 2048 &&
|
10906 | ((finishedRoot = null),
|
10907 | null !== finishedWork.alternate &&
|
10908 | (finishedRoot = finishedWork.alternate.memoizedState.cache),
|
10909 | (finishedWork = finishedWork.memoizedState.cache),
|
10910 | finishedWork !== finishedRoot &&
|
10911 | (finishedWork.refCount++,
|
10912 | null != finishedRoot && releaseCache(finishedRoot)));
|
10913 | break;
|
10914 | case 23:
|
10915 | break;
|
10916 | case 22:
|
10917 | var instance = finishedWork.stateNode;
|
10918 | null !== finishedWork.memoizedState
|
10919 | ? instance._visibility & 4
|
10920 | ? recursivelyTraversePassiveMountEffects(
|
10921 | finishedRoot,
|
10922 | finishedWork,
|
10923 | committedLanes,
|
10924 | committedTransitions
|
10925 | )
|
10926 | : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)
|
10927 | : instance._visibility & 4
|
10928 | ? recursivelyTraversePassiveMountEffects(
|
10929 | finishedRoot,
|
10930 | finishedWork,
|
10931 | committedLanes,
|
10932 | committedTransitions
|
10933 | )
|
10934 | : ((instance._visibility |= 4),
|
10935 | recursivelyTraverseReconnectPassiveEffects(
|
10936 | finishedRoot,
|
10937 | finishedWork,
|
10938 | committedLanes,
|
10939 | committedTransitions,
|
10940 | 0 !== (finishedWork.subtreeFlags & 10256)
|
10941 | ));
|
10942 | flags & 2048 &&
|
10943 | commitOffscreenPassiveMountEffects(
|
10944 | finishedWork.alternate,
|
10945 | finishedWork
|
10946 | );
|
10947 | break;
|
10948 | case 24:
|
10949 | recursivelyTraversePassiveMountEffects(
|
10950 | finishedRoot,
|
10951 | finishedWork,
|
10952 | committedLanes,
|
10953 | committedTransitions
|
10954 | );
|
10955 | flags & 2048 &&
|
10956 | commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
|
10957 | break;
|
10958 | default:
|
10959 | recursivelyTraversePassiveMountEffects(
|
10960 | finishedRoot,
|
10961 | finishedWork,
|
10962 | committedLanes,
|
10963 | committedTransitions
|
10964 | );
|
10965 | }
|
10966 | }
|
10967 | function recursivelyTraverseReconnectPassiveEffects(
|
10968 | finishedRoot$jscomp$0,
|
10969 | parentFiber,
|
10970 | committedLanes$jscomp$0,
|
10971 | committedTransitions$jscomp$0,
|
10972 | includeWorkInProgressEffects
|
10973 | ) {
|
10974 | includeWorkInProgressEffects =
|
10975 | includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256);
|
10976 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
10977 | var finishedRoot = finishedRoot$jscomp$0,
|
10978 | finishedWork = parentFiber,
|
10979 | committedLanes = committedLanes$jscomp$0,
|
10980 | committedTransitions = committedTransitions$jscomp$0,
|
10981 | flags = finishedWork.flags;
|
10982 | switch (finishedWork.tag) {
|
10983 | case 0:
|
10984 | case 11:
|
10985 | case 15:
|
10986 | recursivelyTraverseReconnectPassiveEffects(
|
10987 | finishedRoot,
|
10988 | finishedWork,
|
10989 | committedLanes,
|
10990 | committedTransitions,
|
10991 | includeWorkInProgressEffects
|
10992 | );
|
10993 | commitHookPassiveMountEffects(finishedWork, 8);
|
10994 | break;
|
10995 | case 23:
|
10996 | break;
|
10997 | case 22:
|
10998 | var instance = finishedWork.stateNode;
|
10999 | null !== finishedWork.memoizedState
|
11000 | ? instance._visibility & 4
|
11001 | ? recursivelyTraverseReconnectPassiveEffects(
|
11002 | finishedRoot,
|
11003 | finishedWork,
|
11004 | committedLanes,
|
11005 | committedTransitions,
|
11006 | includeWorkInProgressEffects
|
11007 | )
|
11008 | : recursivelyTraverseAtomicPassiveEffects(
|
11009 | finishedRoot,
|
11010 | finishedWork
|
11011 | )
|
11012 | : ((instance._visibility |= 4),
|
11013 | recursivelyTraverseReconnectPassiveEffects(
|
11014 | finishedRoot,
|
11015 | finishedWork,
|
11016 | committedLanes,
|
11017 | committedTransitions,
|
11018 | includeWorkInProgressEffects
|
11019 | ));
|
11020 | includeWorkInProgressEffects &&
|
11021 | flags & 2048 &&
|
11022 | commitOffscreenPassiveMountEffects(
|
11023 | finishedWork.alternate,
|
11024 | finishedWork
|
11025 | );
|
11026 | break;
|
11027 | case 24:
|
11028 | recursivelyTraverseReconnectPassiveEffects(
|
11029 | finishedRoot,
|
11030 | finishedWork,
|
11031 | committedLanes,
|
11032 | committedTransitions,
|
11033 | includeWorkInProgressEffects
|
11034 | );
|
11035 | includeWorkInProgressEffects &&
|
11036 | flags & 2048 &&
|
11037 | commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
|
11038 | break;
|
11039 | default:
|
11040 | recursivelyTraverseReconnectPassiveEffects(
|
11041 | finishedRoot,
|
11042 | finishedWork,
|
11043 | committedLanes,
|
11044 | committedTransitions,
|
11045 | includeWorkInProgressEffects
|
11046 | );
|
11047 | }
|
11048 | parentFiber = parentFiber.sibling;
|
11049 | }
|
11050 | }
|
11051 | function recursivelyTraverseAtomicPassiveEffects(
|
11052 | finishedRoot$jscomp$0,
|
11053 | parentFiber
|
11054 | ) {
|
11055 | if (parentFiber.subtreeFlags & 10256)
|
11056 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
11057 | var finishedRoot = finishedRoot$jscomp$0,
|
11058 | finishedWork = parentFiber,
|
11059 | flags = finishedWork.flags;
|
11060 | switch (finishedWork.tag) {
|
11061 | case 22:
|
11062 | recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
|
11063 | flags & 2048 &&
|
11064 | commitOffscreenPassiveMountEffects(
|
11065 | finishedWork.alternate,
|
11066 | finishedWork
|
11067 | );
|
11068 | break;
|
11069 | case 24:
|
11070 | recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
|
11071 | flags & 2048 &&
|
11072 | commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
|
11073 | break;
|
11074 | default:
|
11075 | recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
|
11076 | }
|
11077 | parentFiber = parentFiber.sibling;
|
11078 | }
|
11079 | }
|
11080 | var suspenseyCommitFlag = 8192;
|
11081 | function recursivelyAccumulateSuspenseyCommit(parentFiber) {
|
11082 | if (parentFiber.subtreeFlags & suspenseyCommitFlag)
|
11083 | for (parentFiber = parentFiber.child; null !== parentFiber; )
|
11084 | accumulateSuspenseyCommitOnFiber(parentFiber),
|
11085 | (parentFiber = parentFiber.sibling);
|
11086 | }
|
11087 | function accumulateSuspenseyCommitOnFiber(fiber) {
|
11088 | switch (fiber.tag) {
|
11089 | case 26:
|
11090 | recursivelyAccumulateSuspenseyCommit(fiber);
|
11091 | fiber.flags & suspenseyCommitFlag &&
|
11092 | null !== fiber.memoizedState &&
|
11093 | suspendResource(
|
11094 | currentHoistableRoot,
|
11095 | fiber.memoizedState,
|
11096 | fiber.memoizedProps
|
11097 | );
|
11098 | break;
|
11099 | case 5:
|
11100 | recursivelyAccumulateSuspenseyCommit(fiber);
|
11101 | break;
|
11102 | case 3:
|
11103 | case 4:
|
11104 | var previousHoistableRoot = currentHoistableRoot;
|
11105 | currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);
|
11106 | recursivelyAccumulateSuspenseyCommit(fiber);
|
11107 | currentHoistableRoot = previousHoistableRoot;
|
11108 | break;
|
11109 | case 22:
|
11110 | null === fiber.memoizedState &&
|
11111 | ((previousHoistableRoot = fiber.alternate),
|
11112 | null !== previousHoistableRoot &&
|
11113 | null !== previousHoistableRoot.memoizedState
|
11114 | ? ((previousHoistableRoot = suspenseyCommitFlag),
|
11115 | (suspenseyCommitFlag = 16777216),
|
11116 | recursivelyAccumulateSuspenseyCommit(fiber),
|
11117 | (suspenseyCommitFlag = previousHoistableRoot))
|
11118 | : recursivelyAccumulateSuspenseyCommit(fiber));
|
11119 | break;
|
11120 | default:
|
11121 | recursivelyAccumulateSuspenseyCommit(fiber);
|
11122 | }
|
11123 | }
|
11124 | function detachAlternateSiblings(parentFiber) {
|
11125 | var previousFiber = parentFiber.alternate;
|
11126 | if (
|
11127 | null !== previousFiber &&
|
11128 | ((parentFiber = previousFiber.child), null !== parentFiber)
|
11129 | ) {
|
11130 | previousFiber.child = null;
|
11131 | do
|
11132 | (previousFiber = parentFiber.sibling),
|
11133 | (parentFiber.sibling = null),
|
11134 | (parentFiber = previousFiber);
|
11135 | while (null !== parentFiber);
|
11136 | }
|
11137 | }
|
11138 | function commitHookPassiveUnmountEffects(
|
11139 | finishedWork,
|
11140 | nearestMountedAncestor,
|
11141 | hookFlags
|
11142 | ) {
|
11143 | shouldProfile(finishedWork)
|
11144 | ? ((passiveEffectStartTime = now()),
|
11145 | commitHookEffectListUnmount(
|
11146 | hookFlags,
|
11147 | finishedWork,
|
11148 | nearestMountedAncestor
|
11149 | ),
|
11150 | recordPassiveEffectDuration(finishedWork))
|
11151 | : commitHookEffectListUnmount(
|
11152 | hookFlags,
|
11153 | finishedWork,
|
11154 | nearestMountedAncestor
|
11155 | );
|
11156 | }
|
11157 | function recursivelyTraversePassiveUnmountEffects(parentFiber) {
|
11158 | var deletions = parentFiber.deletions;
|
11159 | if (0 !== (parentFiber.flags & 16)) {
|
11160 | if (null !== deletions)
|
11161 | for (var i = 0; i < deletions.length; i++) {
|
11162 | var childToDelete = deletions[i];
|
11163 | nextEffect = childToDelete;
|
11164 | commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
|
11165 | childToDelete,
|
11166 | parentFiber
|
11167 | );
|
11168 | }
|
11169 | detachAlternateSiblings(parentFiber);
|
11170 | }
|
11171 | if (parentFiber.subtreeFlags & 10256)
|
11172 | for (parentFiber = parentFiber.child; null !== parentFiber; )
|
11173 | commitPassiveUnmountOnFiber(parentFiber),
|
11174 | (parentFiber = parentFiber.sibling);
|
11175 | }
|
11176 | function commitPassiveUnmountOnFiber(finishedWork) {
|
11177 | switch (finishedWork.tag) {
|
11178 | case 0:
|
11179 | case 11:
|
11180 | case 15:
|
11181 | recursivelyTraversePassiveUnmountEffects(finishedWork);
|
11182 | finishedWork.flags & 2048 &&
|
11183 | commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, 9);
|
11184 | break;
|
11185 | case 22:
|
11186 | var instance = finishedWork.stateNode;
|
11187 | null !== finishedWork.memoizedState &&
|
11188 | instance._visibility & 4 &&
|
11189 | (null === finishedWork.return || 13 !== finishedWork.return.tag)
|
11190 | ? ((instance._visibility &= -5),
|
11191 | recursivelyTraverseDisconnectPassiveEffects(finishedWork))
|
11192 | : recursivelyTraversePassiveUnmountEffects(finishedWork);
|
11193 | break;
|
11194 | default:
|
11195 | recursivelyTraversePassiveUnmountEffects(finishedWork);
|
11196 | }
|
11197 | }
|
11198 | function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
|
11199 | var deletions = parentFiber.deletions;
|
11200 | if (0 !== (parentFiber.flags & 16)) {
|
11201 | if (null !== deletions)
|
11202 | for (var i = 0; i < deletions.length; i++) {
|
11203 | var childToDelete = deletions[i];
|
11204 | nextEffect = childToDelete;
|
11205 | commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
|
11206 | childToDelete,
|
11207 | parentFiber
|
11208 | );
|
11209 | }
|
11210 | detachAlternateSiblings(parentFiber);
|
11211 | }
|
11212 | for (parentFiber = parentFiber.child; null !== parentFiber; ) {
|
11213 | deletions = parentFiber;
|
11214 | switch (deletions.tag) {
|
11215 | case 0:
|
11216 | case 11:
|
11217 | case 15:
|
11218 | commitHookPassiveUnmountEffects(deletions, deletions.return, 8);
|
11219 | recursivelyTraverseDisconnectPassiveEffects(deletions);
|
11220 | break;
|
11221 | case 22:
|
11222 | i = deletions.stateNode;
|
11223 | i._visibility & 4 &&
|
11224 | ((i._visibility &= -5),
|
11225 | recursivelyTraverseDisconnectPassiveEffects(deletions));
|
11226 | break;
|
11227 | default:
|
11228 | recursivelyTraverseDisconnectPassiveEffects(deletions);
|
11229 | }
|
11230 | parentFiber = parentFiber.sibling;
|
11231 | }
|
11232 | }
|
11233 | function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
|
11234 | deletedSubtreeRoot,
|
11235 | nearestMountedAncestor
|
11236 | ) {
|
11237 | for (; null !== nextEffect; ) {
|
11238 | var fiber = nextEffect;
|
11239 | switch (fiber.tag) {
|
11240 | case 0:
|
11241 | case 11:
|
11242 | case 15:
|
11243 | commitHookPassiveUnmountEffects(fiber, nearestMountedAncestor, 8);
|
11244 | break;
|
11245 | case 23:
|
11246 | case 22:
|
11247 | if (
|
11248 | null !== fiber.memoizedState &&
|
11249 | null !== fiber.memoizedState.cachePool
|
11250 | ) {
|
11251 | var cache = fiber.memoizedState.cachePool.pool;
|
11252 | null != cache && cache.refCount++;
|
11253 | }
|
11254 | break;
|
11255 | case 24:
|
11256 | releaseCache(fiber.memoizedState.cache);
|
11257 | }
|
11258 | cache = fiber.child;
|
11259 | if (null !== cache) (cache.return = fiber), (nextEffect = cache);
|
11260 | else
|
11261 | a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
|
11262 | cache = nextEffect;
|
11263 | var sibling = cache.sibling,
|
11264 | returnFiber = cache.return;
|
11265 | detachFiberAfterEffects(cache);
|
11266 | if (cache === fiber) {
|
11267 | nextEffect = null;
|
11268 | break a;
|
11269 | }
|
11270 | if (null !== sibling) {
|
11271 | sibling.return = returnFiber;
|
11272 | nextEffect = sibling;
|
11273 | break a;
|
11274 | }
|
11275 | nextEffect = returnFiber;
|
11276 | }
|
11277 | }
|
11278 | }
|
11279 | function FiberNode(tag, pendingProps, key, mode) {
|
11280 | this.tag = tag;
|
11281 | this.key = key;
|
11282 | this.sibling =
|
11283 | this.child =
|
11284 | this.return =
|
11285 | this.stateNode =
|
11286 | this.type =
|
11287 | this.elementType =
|
11288 | null;
|
11289 | this.index = 0;
|
11290 | this.refCleanup = this.ref = null;
|
11291 | this.pendingProps = pendingProps;
|
11292 | this.dependencies =
|
11293 | this.memoizedState =
|
11294 | this.updateQueue =
|
11295 | this.memoizedProps =
|
11296 | null;
|
11297 | this.mode = mode;
|
11298 | this.subtreeFlags = this.flags = 0;
|
11299 | this.deletions = null;
|
11300 | this.childLanes = this.lanes = 0;
|
11301 | this.alternate = null;
|
11302 | this.actualDuration = 0;
|
11303 | this.actualStartTime = -1;
|
11304 | this.treeBaseDuration = this.selfBaseDuration = 0;
|
11305 | }
|
11306 | function createFiber(tag, pendingProps, key, mode) {
|
11307 | return new FiberNode(tag, pendingProps, key, mode);
|
11308 | }
|
11309 | function shouldConstruct(Component) {
|
11310 | Component = Component.prototype;
|
11311 | return !(!Component || !Component.isReactComponent);
|
11312 | }
|
11313 | function createWorkInProgress(current, pendingProps) {
|
11314 | var workInProgress = current.alternate;
|
11315 | null === workInProgress
|
11316 | ? ((workInProgress = createFiber(
|
11317 | current.tag,
|
11318 | pendingProps,
|
11319 | current.key,
|
11320 | current.mode
|
11321 | )),
|
11322 | (workInProgress.elementType = current.elementType),
|
11323 | (workInProgress.type = current.type),
|
11324 | (workInProgress.stateNode = current.stateNode),
|
11325 | (workInProgress.alternate = current),
|
11326 | (current.alternate = workInProgress))
|
11327 | : ((workInProgress.pendingProps = pendingProps),
|
11328 | (workInProgress.type = current.type),
|
11329 | (workInProgress.flags = 0),
|
11330 | (workInProgress.subtreeFlags = 0),
|
11331 | (workInProgress.deletions = null),
|
11332 | (workInProgress.actualDuration = 0),
|
11333 | (workInProgress.actualStartTime = -1));
|
11334 | workInProgress.flags = current.flags & 31457280;
|
11335 | workInProgress.childLanes = current.childLanes;
|
11336 | workInProgress.lanes = current.lanes;
|
11337 | workInProgress.child = current.child;
|
11338 | workInProgress.memoizedProps = current.memoizedProps;
|
11339 | workInProgress.memoizedState = current.memoizedState;
|
11340 | workInProgress.updateQueue = current.updateQueue;
|
11341 | pendingProps = current.dependencies;
|
11342 | workInProgress.dependencies =
|
11343 | null === pendingProps
|
11344 | ? null
|
11345 | : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };
|
11346 | workInProgress.sibling = current.sibling;
|
11347 | workInProgress.index = current.index;
|
11348 | workInProgress.ref = current.ref;
|
11349 | workInProgress.refCleanup = current.refCleanup;
|
11350 | workInProgress.selfBaseDuration = current.selfBaseDuration;
|
11351 | workInProgress.treeBaseDuration = current.treeBaseDuration;
|
11352 | return workInProgress;
|
11353 | }
|
11354 | function resetWorkInProgress(workInProgress, renderLanes) {
|
11355 | workInProgress.flags &= 31457282;
|
11356 | var current = workInProgress.alternate;
|
11357 | null === current
|
11358 | ? ((workInProgress.childLanes = 0),
|
11359 | (workInProgress.lanes = renderLanes),
|
11360 | (workInProgress.child = null),
|
11361 | (workInProgress.subtreeFlags = 0),
|
11362 | (workInProgress.memoizedProps = null),
|
11363 | (workInProgress.memoizedState = null),
|
11364 | (workInProgress.updateQueue = null),
|
11365 | (workInProgress.dependencies = null),
|
11366 | (workInProgress.stateNode = null),
|
11367 | (workInProgress.selfBaseDuration = 0),
|
11368 | (workInProgress.treeBaseDuration = 0))
|
11369 | : ((workInProgress.childLanes = current.childLanes),
|
11370 | (workInProgress.lanes = current.lanes),
|
11371 | (workInProgress.child = current.child),
|
11372 | (workInProgress.subtreeFlags = 0),
|
11373 | (workInProgress.deletions = null),
|
11374 | (workInProgress.memoizedProps = current.memoizedProps),
|
11375 | (workInProgress.memoizedState = current.memoizedState),
|
11376 | (workInProgress.updateQueue = current.updateQueue),
|
11377 | (workInProgress.type = current.type),
|
11378 | (renderLanes = current.dependencies),
|
11379 | (workInProgress.dependencies =
|
11380 | null === renderLanes
|
11381 | ? null
|
11382 | : {
|
11383 | lanes: renderLanes.lanes,
|
11384 | firstContext: renderLanes.firstContext
|
11385 | }),
|
11386 | (workInProgress.selfBaseDuration = current.selfBaseDuration),
|
11387 | (workInProgress.treeBaseDuration = current.treeBaseDuration));
|
11388 | return workInProgress;
|
11389 | }
|
11390 | function createFiberFromTypeAndProps(
|
11391 | type,
|
11392 | key,
|
11393 | pendingProps,
|
11394 | owner,
|
11395 | mode,
|
11396 | lanes
|
11397 | ) {
|
11398 | var fiberTag = 0;
|
11399 | owner = type;
|
11400 | if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
|
11401 | else if ("string" === typeof type)
|
11402 | fiberTag = isHostHoistableType(
|
11403 | type,
|
11404 | pendingProps,
|
11405 | contextStackCursor.current
|
11406 | )
|
11407 | ? 26
|
11408 | : "html" === type || "head" === type || "body" === type
|
11409 | ? 27
|
11410 | : 5;
|
11411 | else
|
11412 | a: switch (type) {
|
11413 | case REACT_FRAGMENT_TYPE:
|
11414 | return createFiberFromFragment(pendingProps.children, mode, lanes, key);
|
11415 | case REACT_STRICT_MODE_TYPE:
|
11416 | fiberTag = 8;
|
11417 | mode |= 24;
|
11418 | break;
|
11419 | case REACT_PROFILER_TYPE:
|
11420 | return (
|
11421 | (type = createFiber(12, pendingProps, key, mode | 2)),
|
11422 | (type.elementType = REACT_PROFILER_TYPE),
|
11423 | (type.lanes = lanes),
|
11424 | (type.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),
|
11425 | type
|
11426 | );
|
11427 | case REACT_SUSPENSE_TYPE:
|
11428 | return (
|
11429 | (type = createFiber(13, pendingProps, key, mode)),
|
11430 | (type.elementType = REACT_SUSPENSE_TYPE),
|
11431 | (type.lanes = lanes),
|
11432 | type
|
11433 | );
|
11434 | case REACT_SUSPENSE_LIST_TYPE:
|
11435 | return (
|
11436 | (type = createFiber(19, pendingProps, key, mode)),
|
11437 | (type.elementType = REACT_SUSPENSE_LIST_TYPE),
|
11438 | (type.lanes = lanes),
|
11439 | type
|
11440 | );
|
11441 | case REACT_OFFSCREEN_TYPE:
|
11442 | return createFiberFromOffscreen(pendingProps, mode, lanes, key);
|
11443 | default:
|
11444 | if ("object" === typeof type && null !== type)
|
11445 | switch (type.$$typeof) {
|
11446 | case REACT_PROVIDER_TYPE:
|
11447 | case REACT_CONTEXT_TYPE:
|
11448 | fiberTag = 10;
|
11449 | break a;
|
11450 | case REACT_CONSUMER_TYPE:
|
11451 | fiberTag = 9;
|
11452 | break a;
|
11453 | case REACT_FORWARD_REF_TYPE:
|
11454 | fiberTag = 11;
|
11455 | break a;
|
11456 | case REACT_MEMO_TYPE:
|
11457 | fiberTag = 14;
|
11458 | break a;
|
11459 | case REACT_LAZY_TYPE:
|
11460 | fiberTag = 16;
|
11461 | owner = null;
|
11462 | break a;
|
11463 | }
|
11464 | throw Error(
|
11465 | formatProdErrorMessage(130, null == type ? type : typeof type, "")
|
11466 | );
|
11467 | }
|
11468 | key = createFiber(fiberTag, pendingProps, key, mode);
|
11469 | key.elementType = type;
|
11470 | key.type = owner;
|
11471 | key.lanes = lanes;
|
11472 | return key;
|
11473 | }
|
11474 | function createFiberFromFragment(elements, mode, lanes, key) {
|
11475 | elements = createFiber(7, elements, key, mode);
|
11476 | elements.lanes = lanes;
|
11477 | return elements;
|
11478 | }
|
11479 | function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
|
11480 | pendingProps = createFiber(22, pendingProps, key, mode);
|
11481 | pendingProps.elementType = REACT_OFFSCREEN_TYPE;
|
11482 | pendingProps.lanes = lanes;
|
11483 | var primaryChildInstance = {
|
11484 | _visibility: 1,
|
11485 | _pendingVisibility: 1,
|
11486 | _pendingMarkers: null,
|
11487 | _retryCache: null,
|
11488 | _transitions: null,
|
11489 | _current: null,
|
11490 | detach: function () {
|
11491 | var fiber = primaryChildInstance._current;
|
11492 | if (null === fiber) throw Error(formatProdErrorMessage(456));
|
11493 | if (0 === (primaryChildInstance._pendingVisibility & 2)) {
|
11494 | var root = enqueueConcurrentRenderForLane(fiber, 2);
|
11495 | null !== root &&
|
11496 | ((primaryChildInstance._pendingVisibility |= 2),
|
11497 | scheduleUpdateOnFiber(root, fiber, 2));
|
11498 | }
|
11499 | },
|
11500 | attach: function () {
|
11501 | var fiber = primaryChildInstance._current;
|
11502 | if (null === fiber) throw Error(formatProdErrorMessage(456));
|
11503 | if (0 !== (primaryChildInstance._pendingVisibility & 2)) {
|
11504 | var root = enqueueConcurrentRenderForLane(fiber, 2);
|
11505 | null !== root &&
|
11506 | ((primaryChildInstance._pendingVisibility &= -3),
|
11507 | scheduleUpdateOnFiber(root, fiber, 2));
|
11508 | }
|
11509 | }
|
11510 | };
|
11511 | pendingProps.stateNode = primaryChildInstance;
|
11512 | return pendingProps;
|
11513 | }
|
11514 | function createFiberFromText(content, mode, lanes) {
|
11515 | content = createFiber(6, content, null, mode);
|
11516 | content.lanes = lanes;
|
11517 | return content;
|
11518 | }
|
11519 | function createFiberFromPortal(portal, mode, lanes) {
|
11520 | mode = createFiber(
|
11521 | 4,
|
11522 | null !== portal.children ? portal.children : [],
|
11523 | portal.key,
|
11524 | mode
|
11525 | );
|
11526 | mode.lanes = lanes;
|
11527 | mode.stateNode = {
|
11528 | containerInfo: portal.containerInfo,
|
11529 | pendingChildren: null,
|
11530 | implementation: portal.implementation
|
11531 | };
|
11532 | return mode;
|
11533 | }
|
11534 | function markUpdate(workInProgress) {
|
11535 | workInProgress.flags |= 4;
|
11536 | }
|
11537 | function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
|
11538 | if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
|
11539 | workInProgress.flags &= -16777217;
|
11540 | else if (
|
11541 | ((workInProgress.flags |= 16777216),
|
11542 | 0 === (workInProgressRootRenderLanes & 42) &&
|
11543 | ((resource =
|
11544 | "stylesheet" === resource.type && 0 === (resource.state.loading & 3)
|
11545 | ? !1
|
11546 | : !0),
|
11547 | !resource))
|
11548 | )
|
11549 | if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
|
11550 | else
|
11551 | throw (
|
11552 | ((suspendedThenable = noopSuspenseyCommitThenable),
|
11553 | SuspenseyCommitException)
|
11554 | );
|
11555 | }
|
11556 | function scheduleRetryEffect(workInProgress, retryQueue) {
|
11557 | null !== retryQueue
|
11558 | ? (workInProgress.flags |= 4)
|
11559 | : workInProgress.flags & 16384 &&
|
11560 | ((retryQueue =
|
11561 | 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),
|
11562 | (workInProgress.lanes |= retryQueue));
|
11563 | }
|
11564 | function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
11565 | if (!isHydrating)
|
11566 | switch (renderState.tailMode) {
|
11567 | case "hidden":
|
11568 | hasRenderedATailFallback = renderState.tail;
|
11569 | for (var lastTailNode = null; null !== hasRenderedATailFallback; )
|
11570 | null !== hasRenderedATailFallback.alternate &&
|
11571 | (lastTailNode = hasRenderedATailFallback),
|
11572 | (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
|
11573 | null === lastTailNode
|
11574 | ? (renderState.tail = null)
|
11575 | : (lastTailNode.sibling = null);
|
11576 | break;
|
11577 | case "collapsed":
|
11578 | lastTailNode = renderState.tail;
|
11579 | for (var lastTailNode$202 = null; null !== lastTailNode; )
|
11580 | null !== lastTailNode.alternate && (lastTailNode$202 = lastTailNode),
|
11581 | (lastTailNode = lastTailNode.sibling);
|
11582 | null === lastTailNode$202
|
11583 | ? hasRenderedATailFallback || null === renderState.tail
|
11584 | ? (renderState.tail = null)
|
11585 | : (renderState.tail.sibling = null)
|
11586 | : (lastTailNode$202.sibling = null);
|
11587 | }
|
11588 | }
|
11589 | function bubbleProperties(completedWork) {
|
11590 | var didBailout =
|
11591 | null !== completedWork.alternate &&
|
11592 | completedWork.alternate.child === completedWork.child,
|
11593 | newChildLanes = 0,
|
11594 | subtreeFlags = 0;
|
11595 | if (didBailout)
|
11596 | if (0 !== (completedWork.mode & 2)) {
|
11597 | for (
|
11598 | var treeBaseDuration$204 = completedWork.selfBaseDuration,
|
11599 | child$205 = completedWork.child;
|
11600 | null !== child$205;
|
11601 |
|
11602 | )
|
11603 | (newChildLanes |= child$205.lanes | child$205.childLanes),
|
11604 | (subtreeFlags |= child$205.subtreeFlags & 31457280),
|
11605 | (subtreeFlags |= child$205.flags & 31457280),
|
11606 | (treeBaseDuration$204 += child$205.treeBaseDuration),
|
11607 | (child$205 = child$205.sibling);
|
11608 | completedWork.treeBaseDuration = treeBaseDuration$204;
|
11609 | } else
|
11610 | for (
|
11611 | treeBaseDuration$204 = completedWork.child;
|
11612 | null !== treeBaseDuration$204;
|
11613 |
|
11614 | )
|
11615 | (newChildLanes |=
|
11616 | treeBaseDuration$204.lanes | treeBaseDuration$204.childLanes),
|
11617 | (subtreeFlags |= treeBaseDuration$204.subtreeFlags & 31457280),
|
11618 | (subtreeFlags |= treeBaseDuration$204.flags & 31457280),
|
11619 | (treeBaseDuration$204.return = completedWork),
|
11620 | (treeBaseDuration$204 = treeBaseDuration$204.sibling);
|
11621 | else if (0 !== (completedWork.mode & 2)) {
|
11622 | treeBaseDuration$204 = completedWork.actualDuration;
|
11623 | child$205 = completedWork.selfBaseDuration;
|
11624 | for (var child = completedWork.child; null !== child; )
|
11625 | (newChildLanes |= child.lanes | child.childLanes),
|
11626 | (subtreeFlags |= child.subtreeFlags),
|
11627 | (subtreeFlags |= child.flags),
|
11628 | (treeBaseDuration$204 += child.actualDuration),
|
11629 | (child$205 += child.treeBaseDuration),
|
11630 | (child = child.sibling);
|
11631 | completedWork.actualDuration = treeBaseDuration$204;
|
11632 | completedWork.treeBaseDuration = child$205;
|
11633 | } else
|
11634 | for (
|
11635 | treeBaseDuration$204 = completedWork.child;
|
11636 | null !== treeBaseDuration$204;
|
11637 |
|
11638 | )
|
11639 | (newChildLanes |=
|
11640 | treeBaseDuration$204.lanes | treeBaseDuration$204.childLanes),
|
11641 | (subtreeFlags |= treeBaseDuration$204.subtreeFlags),
|
11642 | (subtreeFlags |= treeBaseDuration$204.flags),
|
11643 | (treeBaseDuration$204.return = completedWork),
|
11644 | (treeBaseDuration$204 = treeBaseDuration$204.sibling);
|
11645 | completedWork.subtreeFlags |= subtreeFlags;
|
11646 | completedWork.childLanes = newChildLanes;
|
11647 | return didBailout;
|
11648 | }
|
11649 | function completeWork(current, workInProgress, renderLanes) {
|
11650 | var newProps = workInProgress.pendingProps;
|
11651 | popTreeContext(workInProgress);
|
11652 | switch (workInProgress.tag) {
|
11653 | case 16:
|
11654 | case 15:
|
11655 | case 0:
|
11656 | case 11:
|
11657 | case 7:
|
11658 | case 8:
|
11659 | case 12:
|
11660 | case 9:
|
11661 | case 14:
|
11662 | return bubbleProperties(workInProgress), null;
|
11663 | case 1:
|
11664 | return bubbleProperties(workInProgress), null;
|
11665 | case 3:
|
11666 | renderLanes = workInProgress.stateNode;
|
11667 | newProps = null;
|
11668 | null !== current && (newProps = current.memoizedState.cache);
|
11669 | workInProgress.memoizedState.cache !== newProps &&
|
11670 | (workInProgress.flags |= 2048);
|
11671 | popProvider(CacheContext);
|
11672 | popHostContainer();
|
11673 | renderLanes.pendingContext &&
|
11674 | ((renderLanes.context = renderLanes.pendingContext),
|
11675 | (renderLanes.pendingContext = null));
|
11676 | if (null === current || null === current.child)
|
11677 | popHydrationState(workInProgress)
|
11678 | ? markUpdate(workInProgress)
|
11679 | : null === current ||
|
11680 | (current.memoizedState.isDehydrated &&
|
11681 | 0 === (workInProgress.flags & 256)) ||
|
11682 | ((workInProgress.flags |= 1024),
|
11683 | null !== hydrationErrors &&
|
11684 | (queueRecoverableErrors(hydrationErrors),
|
11685 | (hydrationErrors = null)));
|
11686 | bubbleProperties(workInProgress);
|
11687 | return null;
|
11688 | case 26:
|
11689 | renderLanes = workInProgress.memoizedState;
|
11690 | if (null === current)
|
11691 | markUpdate(workInProgress),
|
11692 | null !== renderLanes
|
11693 | ? (bubbleProperties(workInProgress),
|
11694 | preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
|
11695 | : (bubbleProperties(workInProgress),
|
11696 | (workInProgress.flags &= -16777217));
|
11697 | else {
|
11698 | var currentResource = current.memoizedState;
|
11699 | renderLanes !== currentResource && markUpdate(workInProgress);
|
11700 | null !== renderLanes
|
11701 | ? (bubbleProperties(workInProgress),
|
11702 | renderLanes === currentResource
|
11703 | ? (workInProgress.flags &= -16777217)
|
11704 | : preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
|
11705 | : (current.memoizedProps !== newProps && markUpdate(workInProgress),
|
11706 | bubbleProperties(workInProgress),
|
11707 | (workInProgress.flags &= -16777217));
|
11708 | }
|
11709 | return null;
|
11710 | case 27:
|
11711 | popHostContext(workInProgress);
|
11712 | renderLanes = rootInstanceStackCursor.current;
|
11713 | currentResource = workInProgress.type;
|
11714 | if (null !== current && null != workInProgress.stateNode)
|
11715 | current.memoizedProps !== newProps && markUpdate(workInProgress);
|
11716 | else {
|
11717 | if (!newProps) {
|
11718 | if (null === workInProgress.stateNode)
|
11719 | throw Error(formatProdErrorMessage(166));
|
11720 | bubbleProperties(workInProgress);
|
11721 | return null;
|
11722 | }
|
11723 | current = contextStackCursor.current;
|
11724 | popHydrationState(workInProgress)
|
11725 | ? prepareToHydrateHostInstance(workInProgress, current)
|
11726 | : ((current = resolveSingletonInstance(
|
11727 | currentResource,
|
11728 | newProps,
|
11729 | renderLanes
|
11730 | )),
|
11731 | (workInProgress.stateNode = current),
|
11732 | markUpdate(workInProgress));
|
11733 | }
|
11734 | bubbleProperties(workInProgress);
|
11735 | return null;
|
11736 | case 5:
|
11737 | popHostContext(workInProgress);
|
11738 | renderLanes = workInProgress.type;
|
11739 | if (null !== current && null != workInProgress.stateNode)
|
11740 | current.memoizedProps !== newProps && markUpdate(workInProgress);
|
11741 | else {
|
11742 | if (!newProps) {
|
11743 | if (null === workInProgress.stateNode)
|
11744 | throw Error(formatProdErrorMessage(166));
|
11745 | bubbleProperties(workInProgress);
|
11746 | return null;
|
11747 | }
|
11748 | current = contextStackCursor.current;
|
11749 | if (popHydrationState(workInProgress))
|
11750 | prepareToHydrateHostInstance(workInProgress, current);
|
11751 | else {
|
11752 | currentResource = getOwnerDocumentFromRootContainer(
|
11753 | rootInstanceStackCursor.current
|
11754 | );
|
11755 | switch (current) {
|
11756 | case 1:
|
11757 | current = currentResource.createElementNS(
|
11758 | "http://www.w3.org/2000/svg",
|
11759 | renderLanes
|
11760 | );
|
11761 | break;
|
11762 | case 2:
|
11763 | current = currentResource.createElementNS(
|
11764 | "http://www.w3.org/1998/Math/MathML",
|
11765 | renderLanes
|
11766 | );
|
11767 | break;
|
11768 | default:
|
11769 | switch (renderLanes) {
|
11770 | case "svg":
|
11771 | current = currentResource.createElementNS(
|
11772 | "http://www.w3.org/2000/svg",
|
11773 | renderLanes
|
11774 | );
|
11775 | break;
|
11776 | case "math":
|
11777 | current = currentResource.createElementNS(
|
11778 | "http://www.w3.org/1998/Math/MathML",
|
11779 | renderLanes
|
11780 | );
|
11781 | break;
|
11782 | case "script":
|
11783 | current = currentResource.createElement("div");
|
11784 | current.innerHTML = "<script>\x3c/script>";
|
11785 | current = current.removeChild(current.firstChild);
|
11786 | break;
|
11787 | case "select":
|
11788 | current =
|
11789 | "string" === typeof newProps.is
|
11790 | ? currentResource.createElement("select", {
|
11791 | is: newProps.is
|
11792 | })
|
11793 | : currentResource.createElement("select");
|
11794 | newProps.multiple
|
11795 | ? (current.multiple = !0)
|
11796 | : newProps.size && (current.size = newProps.size);
|
11797 | break;
|
11798 | default:
|
11799 | current =
|
11800 | "string" === typeof newProps.is
|
11801 | ? currentResource.createElement(renderLanes, {
|
11802 | is: newProps.is
|
11803 | })
|
11804 | : currentResource.createElement(renderLanes);
|
11805 | }
|
11806 | }
|
11807 | current[internalInstanceKey] = workInProgress;
|
11808 | current[internalPropsKey] = newProps;
|
11809 | a: for (
|
11810 | currentResource = workInProgress.child;
|
11811 | null !== currentResource;
|
11812 |
|
11813 | ) {
|
11814 | if (5 === currentResource.tag || 6 === currentResource.tag)
|
11815 | current.appendChild(currentResource.stateNode);
|
11816 | else if (
|
11817 | 4 !== currentResource.tag &&
|
11818 | 27 !== currentResource.tag &&
|
11819 | null !== currentResource.child
|
11820 | ) {
|
11821 | currentResource.child.return = currentResource;
|
11822 | currentResource = currentResource.child;
|
11823 | continue;
|
11824 | }
|
11825 | if (currentResource === workInProgress) break a;
|
11826 | for (; null === currentResource.sibling; ) {
|
11827 | if (
|
11828 | null === currentResource.return ||
|
11829 | currentResource.return === workInProgress
|
11830 | )
|
11831 | break a;
|
11832 | currentResource = currentResource.return;
|
11833 | }
|
11834 | currentResource.sibling.return = currentResource.return;
|
11835 | currentResource = currentResource.sibling;
|
11836 | }
|
11837 | workInProgress.stateNode = current;
|
11838 | a: switch (
|
11839 | (setInitialProperties(current, renderLanes, newProps), renderLanes)
|
11840 | ) {
|
11841 | case "button":
|
11842 | case "input":
|
11843 | case "select":
|
11844 | case "textarea":
|
11845 | current = !!newProps.autoFocus;
|
11846 | break a;
|
11847 | case "img":
|
11848 | current = !0;
|
11849 | break a;
|
11850 | default:
|
11851 | current = !1;
|
11852 | }
|
11853 | current && markUpdate(workInProgress);
|
11854 | }
|
11855 | }
|
11856 | bubbleProperties(workInProgress);
|
11857 | workInProgress.flags &= -16777217;
|
11858 | return null;
|
11859 | case 6:
|
11860 | if (current && null != workInProgress.stateNode)
|
11861 | current.memoizedProps !== newProps && markUpdate(workInProgress);
|
11862 | else {
|
11863 | if ("string" !== typeof newProps && null === workInProgress.stateNode)
|
11864 | throw Error(formatProdErrorMessage(166));
|
11865 | current = rootInstanceStackCursor.current;
|
11866 | if (popHydrationState(workInProgress)) {
|
11867 | current = workInProgress.stateNode;
|
11868 | renderLanes = workInProgress.memoizedProps;
|
11869 | newProps = null;
|
11870 | currentResource = hydrationParentFiber;
|
11871 | if (null !== currentResource)
|
11872 | switch (currentResource.tag) {
|
11873 | case 27:
|
11874 | case 5:
|
11875 | newProps = currentResource.memoizedProps;
|
11876 | }
|
11877 | current[internalInstanceKey] = workInProgress;
|
11878 | current =
|
11879 | current.nodeValue === renderLanes ||
|
11880 | (null !== newProps && !0 === newProps.suppressHydrationWarning) ||
|
11881 | checkForUnmatchedText(current.nodeValue, renderLanes)
|
11882 | ? !0
|
11883 | : !1;
|
11884 | current || throwOnHydrationMismatch(workInProgress);
|
11885 | } else
|
11886 | (current =
|
11887 | getOwnerDocumentFromRootContainer(current).createTextNode(
|
11888 | newProps
|
11889 | )),
|
11890 | (current[internalInstanceKey] = workInProgress),
|
11891 | (workInProgress.stateNode = current);
|
11892 | }
|
11893 | bubbleProperties(workInProgress);
|
11894 | return null;
|
11895 | case 13:
|
11896 | newProps = workInProgress.memoizedState;
|
11897 | if (
|
11898 | null === current ||
|
11899 | (null !== current.memoizedState &&
|
11900 | null !== current.memoizedState.dehydrated)
|
11901 | ) {
|
11902 | currentResource = popHydrationState(workInProgress);
|
11903 | if (null !== newProps && null !== newProps.dehydrated) {
|
11904 | if (null === current) {
|
11905 | if (!currentResource) throw Error(formatProdErrorMessage(318));
|
11906 | currentResource = workInProgress.memoizedState;
|
11907 | currentResource =
|
11908 | null !== currentResource ? currentResource.dehydrated : null;
|
11909 | if (!currentResource) throw Error(formatProdErrorMessage(317));
|
11910 | currentResource[internalInstanceKey] = workInProgress;
|
11911 | bubbleProperties(workInProgress);
|
11912 | 0 !== (workInProgress.mode & 2) &&
|
11913 | null !== newProps &&
|
11914 | ((currentResource = workInProgress.child),
|
11915 | null !== currentResource &&
|
11916 | (workInProgress.treeBaseDuration -=
|
11917 | currentResource.treeBaseDuration));
|
11918 | } else
|
11919 | resetHydrationState(),
|
11920 | 0 === (workInProgress.flags & 128) &&
|
11921 | (workInProgress.memoizedState = null),
|
11922 | (workInProgress.flags |= 4),
|
11923 | bubbleProperties(workInProgress),
|
11924 | 0 !== (workInProgress.mode & 2) &&
|
11925 | null !== newProps &&
|
11926 | ((currentResource = workInProgress.child),
|
11927 | null !== currentResource &&
|
11928 | (workInProgress.treeBaseDuration -=
|
11929 | currentResource.treeBaseDuration));
|
11930 | currentResource = !1;
|
11931 | } else
|
11932 | null !== hydrationErrors &&
|
11933 | (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),
|
11934 | (currentResource = !0);
|
11935 | if (!currentResource) {
|
11936 | if (workInProgress.flags & 256)
|
11937 | return popSuspenseHandler(workInProgress), workInProgress;
|
11938 | popSuspenseHandler(workInProgress);
|
11939 | return null;
|
11940 | }
|
11941 | }
|
11942 | popSuspenseHandler(workInProgress);
|
11943 | if (0 !== (workInProgress.flags & 128))
|
11944 | return (
|
11945 | (workInProgress.lanes = renderLanes),
|
11946 | 0 !== (workInProgress.mode & 2) &&
|
11947 | transferActualDuration(workInProgress),
|
11948 | workInProgress
|
11949 | );
|
11950 | renderLanes = null !== newProps;
|
11951 | current = null !== current && null !== current.memoizedState;
|
11952 | if (renderLanes) {
|
11953 | newProps = workInProgress.child;
|
11954 | currentResource = null;
|
11955 | null !== newProps.alternate &&
|
11956 | null !== newProps.alternate.memoizedState &&
|
11957 | null !== newProps.alternate.memoizedState.cachePool &&
|
11958 | (currentResource = newProps.alternate.memoizedState.cachePool.pool);
|
11959 | var cache$220 = null;
|
11960 | null !== newProps.memoizedState &&
|
11961 | null !== newProps.memoizedState.cachePool &&
|
11962 | (cache$220 = newProps.memoizedState.cachePool.pool);
|
11963 | cache$220 !== currentResource && (newProps.flags |= 2048);
|
11964 | }
|
11965 | renderLanes !== current &&
|
11966 | renderLanes &&
|
11967 | (workInProgress.child.flags |= 8192);
|
11968 | scheduleRetryEffect(workInProgress, workInProgress.updateQueue);
|
11969 | bubbleProperties(workInProgress);
|
11970 | 0 !== (workInProgress.mode & 2) &&
|
11971 | renderLanes &&
|
11972 | ((current = workInProgress.child),
|
11973 | null !== current &&
|
11974 | (workInProgress.treeBaseDuration -= current.treeBaseDuration));
|
11975 | return null;
|
11976 | case 4:
|
11977 | return (
|
11978 | popHostContainer(),
|
11979 | null === current &&
|
11980 | listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
|
11981 | bubbleProperties(workInProgress),
|
11982 | null
|
11983 | );
|
11984 | case 10:
|
11985 | return (
|
11986 | popProvider(workInProgress.type), bubbleProperties(workInProgress), null
|
11987 | );
|
11988 | case 19:
|
11989 | pop(suspenseStackCursor);
|
11990 | currentResource = workInProgress.memoizedState;
|
11991 | if (null === currentResource)
|
11992 | return bubbleProperties(workInProgress), null;
|
11993 | newProps = 0 !== (workInProgress.flags & 128);
|
11994 | cache$220 = currentResource.rendering;
|
11995 | if (null === cache$220)
|
11996 | if (newProps) cutOffTailIfNeeded(currentResource, !1);
|
11997 | else {
|
11998 | if (
|
11999 | 0 !== workInProgressRootExitStatus ||
|
12000 | (null !== current && 0 !== (current.flags & 128))
|
12001 | )
|
12002 | for (current = workInProgress.child; null !== current; ) {
|
12003 | cache$220 = findFirstSuspended(current);
|
12004 | if (null !== cache$220) {
|
12005 | workInProgress.flags |= 128;
|
12006 | cutOffTailIfNeeded(currentResource, !1);
|
12007 | current = cache$220.updateQueue;
|
12008 | workInProgress.updateQueue = current;
|
12009 | scheduleRetryEffect(workInProgress, current);
|
12010 | workInProgress.subtreeFlags = 0;
|
12011 | current = renderLanes;
|
12012 | for (renderLanes = workInProgress.child; null !== renderLanes; )
|
12013 | resetWorkInProgress(renderLanes, current),
|
12014 | (renderLanes = renderLanes.sibling);
|
12015 | push(
|
12016 | suspenseStackCursor,
|
12017 | (suspenseStackCursor.current & 1) | 2
|
12018 | );
|
12019 | return workInProgress.child;
|
12020 | }
|
12021 | current = current.sibling;
|
12022 | }
|
12023 | null !== currentResource.tail &&
|
12024 | now$1() > workInProgressRootRenderTargetTime &&
|
12025 | ((workInProgress.flags |= 128),
|
12026 | (newProps = !0),
|
12027 | cutOffTailIfNeeded(currentResource, !1),
|
12028 | (workInProgress.lanes = 4194304));
|
12029 | }
|
12030 | else {
|
12031 | if (!newProps)
|
12032 | if (((current = findFirstSuspended(cache$220)), null !== current)) {
|
12033 | if (
|
12034 | ((workInProgress.flags |= 128),
|
12035 | (newProps = !0),
|
12036 | (current = current.updateQueue),
|
12037 | (workInProgress.updateQueue = current),
|
12038 | scheduleRetryEffect(workInProgress, current),
|
12039 | cutOffTailIfNeeded(currentResource, !0),
|
12040 | null === currentResource.tail &&
|
12041 | "hidden" === currentResource.tailMode &&
|
12042 | !cache$220.alternate &&
|
12043 | !isHydrating)
|
12044 | )
|
12045 | return bubbleProperties(workInProgress), null;
|
12046 | } else
|
12047 | 2 * now$1() - currentResource.renderingStartTime >
|
12048 | workInProgressRootRenderTargetTime &&
|
12049 | 536870912 !== renderLanes &&
|
12050 | ((workInProgress.flags |= 128),
|
12051 | (newProps = !0),
|
12052 | cutOffTailIfNeeded(currentResource, !1),
|
12053 | (workInProgress.lanes = 4194304));
|
12054 | currentResource.isBackwards
|
12055 | ? ((cache$220.sibling = workInProgress.child),
|
12056 | (workInProgress.child = cache$220))
|
12057 | : ((current = currentResource.last),
|
12058 | null !== current
|
12059 | ? (current.sibling = cache$220)
|
12060 | : (workInProgress.child = cache$220),
|
12061 | (currentResource.last = cache$220));
|
12062 | }
|
12063 | if (null !== currentResource.tail)
|
12064 | return (
|
12065 | (workInProgress = currentResource.tail),
|
12066 | (currentResource.rendering = workInProgress),
|
12067 | (currentResource.tail = workInProgress.sibling),
|
12068 | (currentResource.renderingStartTime = now$1()),
|
12069 | (workInProgress.sibling = null),
|
12070 | (current = suspenseStackCursor.current),
|
12071 | push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),
|
12072 | workInProgress
|
12073 | );
|
12074 | bubbleProperties(workInProgress);
|
12075 | return null;
|
12076 | case 22:
|
12077 | case 23:
|
12078 | return (
|
12079 | popSuspenseHandler(workInProgress),
|
12080 | popHiddenContext(),
|
12081 | (newProps = null !== workInProgress.memoizedState),
|
12082 | null !== current
|
12083 | ? (null !== current.memoizedState) !== newProps &&
|
12084 | (workInProgress.flags |= 8192)
|
12085 | : newProps && (workInProgress.flags |= 8192),
|
12086 | newProps
|
12087 | ? 0 !== (renderLanes & 536870912) &&
|
12088 | 0 === (workInProgress.flags & 128) &&
|
12089 | (bubbleProperties(workInProgress),
|
12090 | workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
|
12091 | : bubbleProperties(workInProgress),
|
12092 | (renderLanes = workInProgress.updateQueue),
|
12093 | null !== renderLanes &&
|
12094 | scheduleRetryEffect(workInProgress, renderLanes.retryQueue),
|
12095 | (renderLanes = null),
|
12096 | null !== current &&
|
12097 | null !== current.memoizedState &&
|
12098 | null !== current.memoizedState.cachePool &&
|
12099 | (renderLanes = current.memoizedState.cachePool.pool),
|
12100 | (newProps = null),
|
12101 | null !== workInProgress.memoizedState &&
|
12102 | null !== workInProgress.memoizedState.cachePool &&
|
12103 | (newProps = workInProgress.memoizedState.cachePool.pool),
|
12104 | newProps !== renderLanes && (workInProgress.flags |= 2048),
|
12105 | null !== current && pop(resumedCache),
|
12106 | null
|
12107 | );
|
12108 | case 24:
|
12109 | return (
|
12110 | (renderLanes = null),
|
12111 | null !== current && (renderLanes = current.memoizedState.cache),
|
12112 | workInProgress.memoizedState.cache !== renderLanes &&
|
12113 | (workInProgress.flags |= 2048),
|
12114 | popProvider(CacheContext),
|
12115 | bubbleProperties(workInProgress),
|
12116 | null
|
12117 | );
|
12118 | case 25:
|
12119 | return null;
|
12120 | }
|
12121 | throw Error(formatProdErrorMessage(156, workInProgress.tag));
|
12122 | }
|
12123 | function unwindWork(current, workInProgress) {
|
12124 | popTreeContext(workInProgress);
|
12125 | switch (workInProgress.tag) {
|
12126 | case 1:
|
12127 | return (
|
12128 | (current = workInProgress.flags),
|
12129 | current & 65536
|
12130 | ? ((workInProgress.flags = (current & -65537) | 128),
|
12131 | 0 !== (workInProgress.mode & 2) &&
|
12132 | transferActualDuration(workInProgress),
|
12133 | workInProgress)
|
12134 | : null
|
12135 | );
|
12136 | case 3:
|
12137 | return (
|
12138 | popProvider(CacheContext),
|
12139 | popHostContainer(),
|
12140 | (current = workInProgress.flags),
|
12141 | 0 !== (current & 65536) && 0 === (current & 128)
|
12142 | ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
|
12143 | : null
|
12144 | );
|
12145 | case 26:
|
12146 | case 27:
|
12147 | case 5:
|
12148 | return popHostContext(workInProgress), null;
|
12149 | case 13:
|
12150 | popSuspenseHandler(workInProgress);
|
12151 | current = workInProgress.memoizedState;
|
12152 | if (null !== current && null !== current.dehydrated) {
|
12153 | if (null === workInProgress.alternate)
|
12154 | throw Error(formatProdErrorMessage(340));
|
12155 | resetHydrationState();
|
12156 | }
|
12157 | current = workInProgress.flags;
|
12158 | return current & 65536
|
12159 | ? ((workInProgress.flags = (current & -65537) | 128),
|
12160 | 0 !== (workInProgress.mode & 2) &&
|
12161 | transferActualDuration(workInProgress),
|
12162 | workInProgress)
|
12163 | : null;
|
12164 | case 19:
|
12165 | return pop(suspenseStackCursor), null;
|
12166 | case 4:
|
12167 | return popHostContainer(), null;
|
12168 | case 10:
|
12169 | return popProvider(workInProgress.type), null;
|
12170 | case 22:
|
12171 | case 23:
|
12172 | return (
|
12173 | popSuspenseHandler(workInProgress),
|
12174 | popHiddenContext(),
|
12175 | null !== current && pop(resumedCache),
|
12176 | (current = workInProgress.flags),
|
12177 | current & 65536
|
12178 | ? ((workInProgress.flags = (current & -65537) | 128),
|
12179 | 0 !== (workInProgress.mode & 2) &&
|
12180 | transferActualDuration(workInProgress),
|
12181 | workInProgress)
|
12182 | : null
|
12183 | );
|
12184 | case 24:
|
12185 | return popProvider(CacheContext), null;
|
12186 | case 25:
|
12187 | return null;
|
12188 | default:
|
12189 | return null;
|
12190 | }
|
12191 | }
|
12192 | function unwindInterruptedWork(current, interruptedWork) {
|
12193 | popTreeContext(interruptedWork);
|
12194 | switch (interruptedWork.tag) {
|
12195 | case 3:
|
12196 | popProvider(CacheContext);
|
12197 | popHostContainer();
|
12198 | break;
|
12199 | case 26:
|
12200 | case 27:
|
12201 | case 5:
|
12202 | popHostContext(interruptedWork);
|
12203 | break;
|
12204 | case 4:
|
12205 | popHostContainer();
|
12206 | break;
|
12207 | case 13:
|
12208 | popSuspenseHandler(interruptedWork);
|
12209 | break;
|
12210 | case 19:
|
12211 | pop(suspenseStackCursor);
|
12212 | break;
|
12213 | case 10:
|
12214 | popProvider(interruptedWork.type);
|
12215 | break;
|
12216 | case 22:
|
12217 | case 23:
|
12218 | popSuspenseHandler(interruptedWork);
|
12219 | popHiddenContext();
|
12220 | null !== current && pop(resumedCache);
|
12221 | break;
|
12222 | case 24:
|
12223 | popProvider(CacheContext);
|
12224 | }
|
12225 | }
|
12226 | var DefaultAsyncDispatcher = {
|
12227 | getCacheForType: function (resourceType) {
|
12228 | var cache = readContext(CacheContext),
|
12229 | cacheForType = cache.data.get(resourceType);
|
12230 | void 0 === cacheForType &&
|
12231 | ((cacheForType = resourceType()),
|
12232 | cache.data.set(resourceType, cacheForType));
|
12233 | return cacheForType;
|
12234 | }
|
12235 | },
|
12236 | PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
|
12237 | executionContext = 0,
|
12238 | workInProgressRoot = null,
|
12239 | workInProgress = null,
|
12240 | workInProgressRootRenderLanes = 0,
|
12241 | workInProgressSuspendedReason = 0,
|
12242 | workInProgressThrownValue = null,
|
12243 | workInProgressRootDidAttachPingListener = !1,
|
12244 | entangledRenderLanes = 0,
|
12245 | workInProgressRootExitStatus = 0,
|
12246 | workInProgressRootSkippedLanes = 0,
|
12247 | workInProgressRootInterleavedUpdatedLanes = 0,
|
12248 | workInProgressRootPingedLanes = 0,
|
12249 | workInProgressDeferredLane = 0,
|
12250 | workInProgressRootConcurrentErrors = null,
|
12251 | workInProgressRootRecoverableErrors = null,
|
12252 | workInProgressRootDidIncludeRecursiveRenderUpdate = !1,
|
12253 | didIncludeCommitPhaseUpdate = !1,
|
12254 | globalMostRecentFallbackTime = 0,
|
12255 | workInProgressRootRenderTargetTime = Infinity,
|
12256 | workInProgressTransitions = null,
|
12257 | legacyErrorBoundariesThatAlreadyFailed = null,
|
12258 | rootDoesHavePassiveEffects = !1,
|
12259 | rootWithPendingPassiveEffects = null,
|
12260 | pendingPassiveEffectsLanes = 0,
|
12261 | pendingPassiveProfilerEffects = [],
|
12262 | pendingPassiveEffectsRemainingLanes = 0,
|
12263 | pendingPassiveTransitions = null,
|
12264 | nestedUpdateCount = 0,
|
12265 | rootWithNestedUpdates = null;
|
12266 | function requestUpdateLane() {
|
12267 | if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)
|
12268 | return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
|
12269 | if (null !== requestCurrentTransition()) {
|
12270 | var actionScopeLane = currentEntangledLane;
|
12271 | return 0 !== actionScopeLane ? actionScopeLane : requestTransitionLane();
|
12272 | }
|
12273 | return resolveUpdatePriority();
|
12274 | }
|
12275 | function requestDeferredLane() {
|
12276 | 0 === workInProgressDeferredLane &&
|
12277 | (workInProgressDeferredLane =
|
12278 | 0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
12279 | ? claimNextTransitionLane()
|
12280 | : 536870912);
|
12281 | var suspenseHandler = suspenseHandlerStackCursor.current;
|
12282 | null !== suspenseHandler && (suspenseHandler.flags |= 32);
|
12283 | return workInProgressDeferredLane;
|
12284 | }
|
12285 | function scheduleUpdateOnFiber(root, fiber, lane) {
|
12286 | if (
|
12287 | (root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||
|
12288 | null !== root.cancelPendingCommit
|
12289 | )
|
12290 | prepareFreshStack(root, 0),
|
12291 | markRootSuspended(
|
12292 | root,
|
12293 | workInProgressRootRenderLanes,
|
12294 | workInProgressDeferredLane
|
12295 | );
|
12296 | markRootUpdated(root, lane);
|
12297 | if (0 === (executionContext & 2) || root !== workInProgressRoot)
|
12298 | isDevToolsPresent && addFiberToLanesMap(root, fiber, lane),
|
12299 | root === workInProgressRoot &&
|
12300 | (0 === (executionContext & 2) &&
|
12301 | (workInProgressRootInterleavedUpdatedLanes |= lane),
|
12302 | 4 === workInProgressRootExitStatus &&
|
12303 | markRootSuspended(
|
12304 | root,
|
12305 | workInProgressRootRenderLanes,
|
12306 | workInProgressDeferredLane
|
12307 | )),
|
12308 | ensureRootIsScheduled(root);
|
12309 | }
|
12310 | function performConcurrentWorkOnRoot(root, didTimeout) {
|
12311 | nestedUpdateScheduled = currentUpdateIsNested = !1;
|
12312 | if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
|
12313 | var originalCallbackNode = root.callbackNode;
|
12314 | if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)
|
12315 | return null;
|
12316 | var lanes = getNextLanes(
|
12317 | root,
|
12318 | root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
12319 | );
|
12320 | if (0 === lanes) return null;
|
12321 | var shouldTimeSlice =
|
12322 | 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout;
|
12323 | didTimeout = shouldTimeSlice
|
12324 | ? renderRootConcurrent(root, lanes)
|
12325 | : renderRootSync(root, lanes);
|
12326 | if (0 !== didTimeout) {
|
12327 | var renderWasConcurrent = shouldTimeSlice;
|
12328 | do {
|
12329 | if (6 === didTimeout) markRootSuspended(root, lanes, 0);
|
12330 | else {
|
12331 | shouldTimeSlice = root.current.alternate;
|
12332 | if (
|
12333 | renderWasConcurrent &&
|
12334 | !isRenderConsistentWithExternalStores(shouldTimeSlice)
|
12335 | ) {
|
12336 | didTimeout = renderRootSync(root, lanes);
|
12337 | renderWasConcurrent = !1;
|
12338 | continue;
|
12339 | }
|
12340 | if (2 === didTimeout) {
|
12341 | renderWasConcurrent = lanes;
|
12342 | var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
12343 | root,
|
12344 | renderWasConcurrent
|
12345 | );
|
12346 | if (
|
12347 | 0 !== errorRetryLanes &&
|
12348 | ((lanes = errorRetryLanes),
|
12349 | (didTimeout = recoverFromConcurrentError(
|
12350 | root,
|
12351 | renderWasConcurrent,
|
12352 | errorRetryLanes
|
12353 | )),
|
12354 | (renderWasConcurrent = !1),
|
12355 | 2 !== didTimeout)
|
12356 | )
|
12357 | continue;
|
12358 | }
|
12359 | if (1 === didTimeout) {
|
12360 | prepareFreshStack(root, 0);
|
12361 | markRootSuspended(root, lanes, 0);
|
12362 | break;
|
12363 | }
|
12364 | root.finishedWork = shouldTimeSlice;
|
12365 | root.finishedLanes = lanes;
|
12366 | a: {
|
12367 | renderWasConcurrent = root;
|
12368 | switch (didTimeout) {
|
12369 | case 0:
|
12370 | case 1:
|
12371 | throw Error(formatProdErrorMessage(345));
|
12372 | case 4:
|
12373 | if ((lanes & 4194176) === lanes) {
|
12374 | markRootSuspended(
|
12375 | renderWasConcurrent,
|
12376 | lanes,
|
12377 | workInProgressDeferredLane
|
12378 | );
|
12379 | break a;
|
12380 | }
|
12381 | break;
|
12382 | case 2:
|
12383 | workInProgressRootRecoverableErrors = null;
|
12384 | break;
|
12385 | case 3:
|
12386 | case 5:
|
12387 | break;
|
12388 | default:
|
12389 | throw Error(formatProdErrorMessage(329));
|
12390 | }
|
12391 | if (
|
12392 | (lanes & 62914560) === lanes &&
|
12393 | ((didTimeout = globalMostRecentFallbackTime + 300 - now$1()),
|
12394 | 10 < didTimeout)
|
12395 | ) {
|
12396 | markRootSuspended(
|
12397 | renderWasConcurrent,
|
12398 | lanes,
|
12399 | workInProgressDeferredLane
|
12400 | );
|
12401 | if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
|
12402 | renderWasConcurrent.timeoutHandle = scheduleTimeout(
|
12403 | commitRootWhenReady.bind(
|
12404 | null,
|
12405 | renderWasConcurrent,
|
12406 | shouldTimeSlice,
|
12407 | workInProgressRootRecoverableErrors,
|
12408 | workInProgressTransitions,
|
12409 | workInProgressRootDidIncludeRecursiveRenderUpdate,
|
12410 | lanes,
|
12411 | workInProgressDeferredLane
|
12412 | ),
|
12413 | didTimeout
|
12414 | );
|
12415 | break a;
|
12416 | }
|
12417 | commitRootWhenReady(
|
12418 | renderWasConcurrent,
|
12419 | shouldTimeSlice,
|
12420 | workInProgressRootRecoverableErrors,
|
12421 | workInProgressTransitions,
|
12422 | workInProgressRootDidIncludeRecursiveRenderUpdate,
|
12423 | lanes,
|
12424 | workInProgressDeferredLane
|
12425 | );
|
12426 | }
|
12427 | }
|
12428 | break;
|
12429 | } while (1);
|
12430 | }
|
12431 | ensureRootIsScheduled(root);
|
12432 | scheduleTaskForRootDuringMicrotask(root, now$1());
|
12433 | root =
|
12434 | root.callbackNode === originalCallbackNode
|
12435 | ? performConcurrentWorkOnRoot.bind(null, root)
|
12436 | : null;
|
12437 | return root;
|
12438 | }
|
12439 | function recoverFromConcurrentError(
|
12440 | root,
|
12441 | originallyAttemptedLanes,
|
12442 | errorRetryLanes
|
12443 | ) {
|
12444 | var errorsFromFirstAttempt = workInProgressRootConcurrentErrors,
|
12445 | wasRootDehydrated = root.current.memoizedState.isDehydrated;
|
12446 | wasRootDehydrated && (prepareFreshStack(root, errorRetryLanes).flags |= 256);
|
12447 | errorRetryLanes = renderRootSync(root, errorRetryLanes);
|
12448 | if (2 !== errorRetryLanes) {
|
12449 | if (workInProgressRootDidAttachPingListener && !wasRootDehydrated)
|
12450 | return (
|
12451 | (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes),
|
12452 | (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes),
|
12453 | 4
|
12454 | );
|
12455 | root = workInProgressRootRecoverableErrors;
|
12456 | workInProgressRootRecoverableErrors = errorsFromFirstAttempt;
|
12457 | null !== root && queueRecoverableErrors(root);
|
12458 | }
|
12459 | return errorRetryLanes;
|
12460 | }
|
12461 | function queueRecoverableErrors(errors) {
|
12462 | null === workInProgressRootRecoverableErrors
|
12463 | ? (workInProgressRootRecoverableErrors = errors)
|
12464 | : workInProgressRootRecoverableErrors.push.apply(
|
12465 | workInProgressRootRecoverableErrors,
|
12466 | errors
|
12467 | );
|
12468 | }
|
12469 | function commitRootWhenReady(
|
12470 | root,
|
12471 | finishedWork,
|
12472 | recoverableErrors,
|
12473 | transitions,
|
12474 | didIncludeRenderPhaseUpdate,
|
12475 | lanes,
|
12476 | spawnedLane
|
12477 | ) {
|
12478 | if (
|
12479 | 0 === (lanes & 42) &&
|
12480 | ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop$1 }),
|
12481 | accumulateSuspenseyCommitOnFiber(finishedWork),
|
12482 | (finishedWork = waitForCommitToBeReady()),
|
12483 | null !== finishedWork)
|
12484 | ) {
|
12485 | root.cancelPendingCommit = finishedWork(
|
12486 | commitRoot.bind(
|
12487 | null,
|
12488 | root,
|
12489 | recoverableErrors,
|
12490 | transitions,
|
12491 | didIncludeRenderPhaseUpdate
|
12492 | )
|
12493 | );
|
12494 | markRootSuspended(root, lanes, spawnedLane);
|
12495 | return;
|
12496 | }
|
12497 | commitRoot(
|
12498 | root,
|
12499 | recoverableErrors,
|
12500 | transitions,
|
12501 | didIncludeRenderPhaseUpdate,
|
12502 | spawnedLane
|
12503 | );
|
12504 | }
|
12505 | function isRenderConsistentWithExternalStores(finishedWork) {
|
12506 | for (var node = finishedWork; ; ) {
|
12507 | if (node.flags & 16384) {
|
12508 | var updateQueue = node.updateQueue;
|
12509 | if (
|
12510 | null !== updateQueue &&
|
12511 | ((updateQueue = updateQueue.stores), null !== updateQueue)
|
12512 | )
|
12513 | for (var i = 0; i < updateQueue.length; i++) {
|
12514 | var check = updateQueue[i],
|
12515 | getSnapshot = check.getSnapshot;
|
12516 | check = check.value;
|
12517 | try {
|
12518 | if (!objectIs(getSnapshot(), check)) return !1;
|
12519 | } catch (error) {
|
12520 | return !1;
|
12521 | }
|
12522 | }
|
12523 | }
|
12524 | updateQueue = node.child;
|
12525 | if (node.subtreeFlags & 16384 && null !== updateQueue)
|
12526 | (updateQueue.return = node), (node = updateQueue);
|
12527 | else {
|
12528 | if (node === finishedWork) break;
|
12529 | for (; null === node.sibling; ) {
|
12530 | if (null === node.return || node.return === finishedWork) return !0;
|
12531 | node = node.return;
|
12532 | }
|
12533 | node.sibling.return = node.return;
|
12534 | node = node.sibling;
|
12535 | }
|
12536 | }
|
12537 | return !0;
|
12538 | }
|
12539 | function markRootUpdated(root, updatedLanes) {
|
12540 | root.pendingLanes |= updatedLanes;
|
12541 | 268435456 !== updatedLanes &&
|
12542 | ((root.suspendedLanes = 0), (root.pingedLanes = 0));
|
12543 | executionContext & 2
|
12544 | ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0)
|
12545 | : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0);
|
12546 | throwIfInfiniteUpdateLoopDetected();
|
12547 | }
|
12548 | function markRootSuspended(root, suspendedLanes, spawnedLane) {
|
12549 | suspendedLanes &= ~workInProgressRootPingedLanes;
|
12550 | suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
|
12551 | root.suspendedLanes |= suspendedLanes;
|
12552 | root.pingedLanes &= ~suspendedLanes;
|
12553 | for (
|
12554 | var expirationTimes = root.expirationTimes, lanes = suspendedLanes;
|
12555 | 0 < lanes;
|
12556 |
|
12557 | ) {
|
12558 | var index$4 = 31 - clz32(lanes),
|
12559 | lane = 1 << index$4;
|
12560 | expirationTimes[index$4] = -1;
|
12561 | lanes &= ~lane;
|
12562 | }
|
12563 | 0 !== spawnedLane &&
|
12564 | markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
|
12565 | }
|
12566 | function performSyncWorkOnRoot(root, lanes) {
|
12567 | if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
|
12568 | if (flushPassiveEffects()) return ensureRootIsScheduled(root), null;
|
12569 | currentUpdateIsNested = nestedUpdateScheduled;
|
12570 | nestedUpdateScheduled = !1;
|
12571 | var exitStatus = renderRootSync(root, lanes);
|
12572 | if (2 === exitStatus) {
|
12573 | var originallyAttemptedLanes = lanes,
|
12574 | errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
12575 | root,
|
12576 | originallyAttemptedLanes
|
12577 | );
|
12578 | 0 !== errorRetryLanes &&
|
12579 | ((lanes = errorRetryLanes),
|
12580 | (exitStatus = recoverFromConcurrentError(
|
12581 | root,
|
12582 | originallyAttemptedLanes,
|
12583 | errorRetryLanes
|
12584 | )));
|
12585 | }
|
12586 | if (1 === exitStatus)
|
12587 | return (
|
12588 | prepareFreshStack(root, 0),
|
12589 | markRootSuspended(root, lanes, 0),
|
12590 | ensureRootIsScheduled(root),
|
12591 | null
|
12592 | );
|
12593 | if (6 === exitStatus)
|
12594 | return (
|
12595 | markRootSuspended(root, lanes, workInProgressDeferredLane),
|
12596 | ensureRootIsScheduled(root),
|
12597 | null
|
12598 | );
|
12599 | root.finishedWork = root.current.alternate;
|
12600 | root.finishedLanes = lanes;
|
12601 | commitRoot(
|
12602 | root,
|
12603 | workInProgressRootRecoverableErrors,
|
12604 | workInProgressTransitions,
|
12605 | workInProgressRootDidIncludeRecursiveRenderUpdate,
|
12606 | workInProgressDeferredLane
|
12607 | );
|
12608 | ensureRootIsScheduled(root);
|
12609 | return null;
|
12610 | }
|
12611 | function flushSyncWork$1() {
|
12612 | return 0 === (executionContext & 6)
|
12613 | ? (flushSyncWorkAcrossRoots_impl(!1), !1)
|
12614 | : !0;
|
12615 | }
|
12616 | function resetWorkInProgressStack() {
|
12617 | if (null !== workInProgress) {
|
12618 | if (0 === workInProgressSuspendedReason)
|
12619 | var interruptedWork = workInProgress.return;
|
12620 | else
|
12621 | (interruptedWork = workInProgress),
|
12622 | resetContextDependencies(),
|
12623 | resetHooksOnUnwind(interruptedWork),
|
12624 | (thenableState$1 = null),
|
12625 | (thenableIndexCounter$1 = 0),
|
12626 | (interruptedWork = workInProgress);
|
12627 | for (; null !== interruptedWork; )
|
12628 | unwindInterruptedWork(interruptedWork.alternate, interruptedWork),
|
12629 | (interruptedWork = interruptedWork.return);
|
12630 | workInProgress = null;
|
12631 | }
|
12632 | }
|
12633 | function prepareFreshStack(root, lanes) {
|
12634 | root.finishedWork = null;
|
12635 | root.finishedLanes = 0;
|
12636 | var timeoutHandle = root.timeoutHandle;
|
12637 | -1 !== timeoutHandle &&
|
12638 | ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
|
12639 | timeoutHandle = root.cancelPendingCommit;
|
12640 | null !== timeoutHandle &&
|
12641 | ((root.cancelPendingCommit = null), timeoutHandle());
|
12642 | resetWorkInProgressStack();
|
12643 | workInProgressRoot = root;
|
12644 | workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
|
12645 | workInProgressRootRenderLanes = lanes;
|
12646 | workInProgressSuspendedReason = 0;
|
12647 | workInProgressThrownValue = null;
|
12648 | workInProgressRootDidAttachPingListener = !1;
|
12649 | workInProgressDeferredLane =
|
12650 | workInProgressRootPingedLanes =
|
12651 | workInProgressRootInterleavedUpdatedLanes =
|
12652 | workInProgressRootSkippedLanes =
|
12653 | workInProgressRootExitStatus =
|
12654 | 0;
|
12655 | workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
|
12656 | null;
|
12657 | workInProgressRootDidIncludeRecursiveRenderUpdate = !1;
|
12658 | 0 !== (lanes & 8) && (lanes |= lanes & 32);
|
12659 | var allEntangledLanes = root.entangledLanes;
|
12660 | if (0 !== allEntangledLanes)
|
12661 | for (
|
12662 | root = root.entanglements, allEntangledLanes &= lanes;
|
12663 | 0 < allEntangledLanes;
|
12664 |
|
12665 | ) {
|
12666 | var index$2 = 31 - clz32(allEntangledLanes),
|
12667 | lane = 1 << index$2;
|
12668 | lanes |= root[index$2];
|
12669 | allEntangledLanes &= ~lane;
|
12670 | }
|
12671 | entangledRenderLanes = lanes;
|
12672 | finishQueueingConcurrentUpdates();
|
12673 | return timeoutHandle;
|
12674 | }
|
12675 | function handleThrow(root, thrownValue) {
|
12676 | currentlyRenderingFiber$1 = null;
|
12677 | ReactSharedInternals.H = ContextOnlyDispatcher;
|
12678 | thrownValue === SuspenseException
|
12679 | ? ((thrownValue = getSuspendedThenable()),
|
12680 | (workInProgressSuspendedReason =
|
12681 | shouldRemainOnPreviousScreen() &&
|
12682 | 0 === (workInProgressRootSkippedLanes & 134217727) &&
|
12683 | 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)
|
12684 | ? 2
|
12685 | : 3))
|
12686 | : thrownValue === SuspenseyCommitException
|
12687 | ? ((thrownValue = getSuspendedThenable()),
|
12688 | (workInProgressSuspendedReason = 4))
|
12689 | : (workInProgressSuspendedReason =
|
12690 | thrownValue === SelectiveHydrationException
|
12691 | ? 8
|
12692 | : null !== thrownValue &&
|
12693 | "object" === typeof thrownValue &&
|
12694 | "function" === typeof thrownValue.then
|
12695 | ? 6
|
12696 | : 1);
|
12697 | workInProgressThrownValue = thrownValue;
|
12698 | var erroredWork = workInProgress;
|
12699 | if (null === erroredWork)
|
12700 | (workInProgressRootExitStatus = 1),
|
12701 | logUncaughtError(
|
12702 | root,
|
12703 | createCapturedValueAtFiber(thrownValue, root.current)
|
12704 | );
|
12705 | else
|
12706 | switch (
|
12707 | (erroredWork.mode & 2 &&
|
12708 | stopProfilerTimerIfRunningAndRecordDelta(erroredWork, !0),
|
12709 | markComponentRenderStopped(),
|
12710 | workInProgressSuspendedReason)
|
12711 | ) {
|
12712 | case 1:
|
12713 | null !== injectedProfilingHooks &&
|
12714 | "function" === typeof injectedProfilingHooks.markComponentErrored &&
|
12715 | injectedProfilingHooks.markComponentErrored(
|
12716 | erroredWork,
|
12717 | thrownValue,
|
12718 | workInProgressRootRenderLanes
|
12719 | );
|
12720 | break;
|
12721 | case 2:
|
12722 | case 3:
|
12723 | case 6:
|
12724 | case 7:
|
12725 | null !== injectedProfilingHooks &&
|
12726 | "function" === typeof injectedProfilingHooks.markComponentSuspended &&
|
12727 | injectedProfilingHooks.markComponentSuspended(
|
12728 | erroredWork,
|
12729 | thrownValue,
|
12730 | workInProgressRootRenderLanes
|
12731 | );
|
12732 | }
|
12733 | }
|
12734 | function shouldRemainOnPreviousScreen() {
|
12735 | var handler = suspenseHandlerStackCursor.current;
|
12736 | return null === handler
|
12737 | ? !0
|
12738 | : (workInProgressRootRenderLanes & 4194176) ===
|
12739 | workInProgressRootRenderLanes
|
12740 | ? null === shellBoundary
|
12741 | ? !0
|
12742 | : !1
|
12743 | : (workInProgressRootRenderLanes & 62914560) ===
|
12744 | workInProgressRootRenderLanes ||
|
12745 | 0 !== (workInProgressRootRenderLanes & 536870912)
|
12746 | ? handler === shellBoundary
|
12747 | : !1;
|
12748 | }
|
12749 | function pushDispatcher() {
|
12750 | var prevDispatcher = ReactSharedInternals.H;
|
12751 | ReactSharedInternals.H = ContextOnlyDispatcher;
|
12752 | return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
|
12753 | }
|
12754 | function pushAsyncDispatcher() {
|
12755 | var prevAsyncDispatcher = ReactSharedInternals.A;
|
12756 | ReactSharedInternals.A = DefaultAsyncDispatcher;
|
12757 | return prevAsyncDispatcher;
|
12758 | }
|
12759 | function renderDidSuspendDelayIfPossible() {
|
12760 | workInProgressRootExitStatus = 4;
|
12761 | (0 === (workInProgressRootSkippedLanes & 134217727) &&
|
12762 | 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
|
12763 | null === workInProgressRoot ||
|
12764 | markRootSuspended(
|
12765 | workInProgressRoot,
|
12766 | workInProgressRootRenderLanes,
|
12767 | workInProgressDeferredLane
|
12768 | );
|
12769 | }
|
12770 | function renderRootSync(root, lanes) {
|
12771 | var prevExecutionContext = executionContext;
|
12772 | executionContext |= 2;
|
12773 | var prevDispatcher = pushDispatcher(),
|
12774 | prevAsyncDispatcher = pushAsyncDispatcher();
|
12775 | if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
|
12776 | if (isDevToolsPresent) {
|
12777 | var memoizedUpdaters = root.memoizedUpdaters;
|
12778 | 0 < memoizedUpdaters.size &&
|
12779 | (restorePendingUpdaters(root, workInProgressRootRenderLanes),
|
12780 | memoizedUpdaters.clear());
|
12781 | movePendingFibersToMemoized(root, lanes);
|
12782 | }
|
12783 | workInProgressTransitions = null;
|
12784 | prepareFreshStack(root, lanes);
|
12785 | }
|
12786 | markRenderStarted(lanes);
|
12787 | lanes = !1;
|
12788 | a: do
|
12789 | try {
|
12790 | if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
|
12791 | memoizedUpdaters = workInProgress;
|
12792 | var thrownValue = workInProgressThrownValue;
|
12793 | switch (workInProgressSuspendedReason) {
|
12794 | case 8:
|
12795 | resetWorkInProgressStack();
|
12796 | workInProgressRootExitStatus = 6;
|
12797 | break a;
|
12798 | case 3:
|
12799 | case 2:
|
12800 | lanes ||
|
12801 | null !== suspenseHandlerStackCursor.current ||
|
12802 | (lanes = !0);
|
12803 | default:
|
12804 | (workInProgressSuspendedReason = 0),
|
12805 | (workInProgressThrownValue = null),
|
12806 | throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue);
|
12807 | }
|
12808 | }
|
12809 | workLoopSync();
|
12810 | break;
|
12811 | } catch (thrownValue$235) {
|
12812 | handleThrow(root, thrownValue$235);
|
12813 | }
|
12814 | while (1);
|
12815 | lanes && root.shellSuspendCounter++;
|
12816 | resetContextDependencies();
|
12817 | executionContext = prevExecutionContext;
|
12818 | ReactSharedInternals.H = prevDispatcher;
|
12819 | ReactSharedInternals.A = prevAsyncDispatcher;
|
12820 | if (null !== workInProgress) throw Error(formatProdErrorMessage(261));
|
12821 | markRenderStopped();
|
12822 | workInProgressRoot = null;
|
12823 | workInProgressRootRenderLanes = 0;
|
12824 | finishQueueingConcurrentUpdates();
|
12825 | return workInProgressRootExitStatus;
|
12826 | }
|
12827 | function workLoopSync() {
|
12828 | for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
|
12829 | }
|
12830 | function renderRootConcurrent(root, lanes) {
|
12831 | var prevExecutionContext = executionContext;
|
12832 | executionContext |= 2;
|
12833 | var prevDispatcher = pushDispatcher(),
|
12834 | prevAsyncDispatcher = pushAsyncDispatcher();
|
12835 | if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
|
12836 | if (isDevToolsPresent) {
|
12837 | var memoizedUpdaters = root.memoizedUpdaters;
|
12838 | 0 < memoizedUpdaters.size &&
|
12839 | (restorePendingUpdaters(root, workInProgressRootRenderLanes),
|
12840 | memoizedUpdaters.clear());
|
12841 | movePendingFibersToMemoized(root, lanes);
|
12842 | }
|
12843 | workInProgressTransitions = null;
|
12844 | workInProgressRootRenderTargetTime = now$1() + 500;
|
12845 | prepareFreshStack(root, lanes);
|
12846 | }
|
12847 | markRenderStarted(lanes);
|
12848 | a: do
|
12849 | try {
|
12850 | if (0 !== workInProgressSuspendedReason && null !== workInProgress)
|
12851 | b: switch (
|
12852 | ((lanes = workInProgress),
|
12853 | (memoizedUpdaters = workInProgressThrownValue),
|
12854 | workInProgressSuspendedReason)
|
12855 | ) {
|
12856 | case 1:
|
12857 | workInProgressSuspendedReason = 0;
|
12858 | workInProgressThrownValue = null;
|
12859 | throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters);
|
12860 | break;
|
12861 | case 2:
|
12862 | if (isThenableResolved(memoizedUpdaters)) {
|
12863 | workInProgressSuspendedReason = 0;
|
12864 | workInProgressThrownValue = null;
|
12865 | replaySuspendedUnitOfWork(lanes);
|
12866 | break;
|
12867 | }
|
12868 | lanes = function () {
|
12869 | 2 === workInProgressSuspendedReason &&
|
12870 | workInProgressRoot === root &&
|
12871 | (workInProgressSuspendedReason = 7);
|
12872 | ensureRootIsScheduled(root);
|
12873 | };
|
12874 | memoizedUpdaters.then(lanes, lanes);
|
12875 | break a;
|
12876 | case 3:
|
12877 | workInProgressSuspendedReason = 7;
|
12878 | break a;
|
12879 | case 4:
|
12880 | workInProgressSuspendedReason = 5;
|
12881 | break a;
|
12882 | case 7:
|
12883 | isThenableResolved(memoizedUpdaters)
|
12884 | ? ((workInProgressSuspendedReason = 0),
|
12885 | (workInProgressThrownValue = null),
|
12886 | replaySuspendedUnitOfWork(lanes))
|
12887 | : ((workInProgressSuspendedReason = 0),
|
12888 | (workInProgressThrownValue = null),
|
12889 | throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters));
|
12890 | break;
|
12891 | case 5:
|
12892 | switch (workInProgress.tag) {
|
12893 | case 5:
|
12894 | case 26:
|
12895 | case 27:
|
12896 | lanes = workInProgress;
|
12897 | workInProgressSuspendedReason = 0;
|
12898 | workInProgressThrownValue = null;
|
12899 | var sibling = lanes.sibling;
|
12900 | if (null !== sibling) workInProgress = sibling;
|
12901 | else {
|
12902 | var returnFiber = lanes.return;
|
12903 | null !== returnFiber
|
12904 | ? ((workInProgress = returnFiber),
|
12905 | completeUnitOfWork(returnFiber))
|
12906 | : (workInProgress = null);
|
12907 | }
|
12908 | break b;
|
12909 | }
|
12910 | workInProgressSuspendedReason = 0;
|
12911 | workInProgressThrownValue = null;
|
12912 | throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters);
|
12913 | break;
|
12914 | case 6:
|
12915 | workInProgressSuspendedReason = 0;
|
12916 | workInProgressThrownValue = null;
|
12917 | throwAndUnwindWorkLoop(root, lanes, memoizedUpdaters);
|
12918 | break;
|
12919 | case 8:
|
12920 | resetWorkInProgressStack();
|
12921 | workInProgressRootExitStatus = 6;
|
12922 | break a;
|
12923 | default:
|
12924 | throw Error(formatProdErrorMessage(462));
|
12925 | }
|
12926 | workLoopConcurrent();
|
12927 | break;
|
12928 | } catch (thrownValue$237) {
|
12929 | handleThrow(root, thrownValue$237);
|
12930 | }
|
12931 | while (1);
|
12932 | resetContextDependencies();
|
12933 | ReactSharedInternals.H = prevDispatcher;
|
12934 | ReactSharedInternals.A = prevAsyncDispatcher;
|
12935 | executionContext = prevExecutionContext;
|
12936 | if (null !== workInProgress)
|
12937 | return (
|
12938 | null !== injectedProfilingHooks &&
|
12939 | "function" === typeof injectedProfilingHooks.markRenderYielded &&
|
12940 | injectedProfilingHooks.markRenderYielded(),
|
12941 | 0
|
12942 | );
|
12943 | markRenderStopped();
|
12944 | workInProgressRoot = null;
|
12945 | workInProgressRootRenderLanes = 0;
|
12946 | finishQueueingConcurrentUpdates();
|
12947 | return workInProgressRootExitStatus;
|
12948 | }
|
12949 | function workLoopConcurrent() {
|
12950 | for (; null !== workInProgress && !shouldYield(); )
|
12951 | performUnitOfWork(workInProgress);
|
12952 | }
|
12953 | function performUnitOfWork(unitOfWork) {
|
12954 | var current = unitOfWork.alternate;
|
12955 | 0 !== (unitOfWork.mode & 2)
|
12956 | ? (startProfilerTimer(unitOfWork),
|
12957 | (current = beginWork(current, unitOfWork, entangledRenderLanes)),
|
12958 | stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
|
12959 | : (current = beginWork(current, unitOfWork, entangledRenderLanes));
|
12960 | unitOfWork.memoizedProps = unitOfWork.pendingProps;
|
12961 | null === current
|
12962 | ? completeUnitOfWork(unitOfWork)
|
12963 | : (workInProgress = current);
|
12964 | }
|
12965 | function replaySuspendedUnitOfWork(unitOfWork) {
|
12966 | var current = unitOfWork.alternate,
|
12967 | isProfilingMode = 0 !== (unitOfWork.mode & 2);
|
12968 | isProfilingMode && startProfilerTimer(unitOfWork);
|
12969 | switch (unitOfWork.tag) {
|
12970 | case 15:
|
12971 | case 0:
|
12972 | current = replayFunctionComponent(
|
12973 | current,
|
12974 | unitOfWork,
|
12975 | unitOfWork.pendingProps,
|
12976 | unitOfWork.type,
|
12977 | void 0,
|
12978 | workInProgressRootRenderLanes
|
12979 | );
|
12980 | break;
|
12981 | case 11:
|
12982 | current = replayFunctionComponent(
|
12983 | current,
|
12984 | unitOfWork,
|
12985 | unitOfWork.pendingProps,
|
12986 | unitOfWork.type.render,
|
12987 | unitOfWork.ref,
|
12988 | workInProgressRootRenderLanes
|
12989 | );
|
12990 | break;
|
12991 | case 5:
|
12992 | resetHooksOnUnwind(unitOfWork);
|
12993 | default:
|
12994 | unwindInterruptedWork(current, unitOfWork),
|
12995 | (unitOfWork = workInProgress =
|
12996 | resetWorkInProgress(unitOfWork, entangledRenderLanes)),
|
12997 | (current = beginWork(current, unitOfWork, entangledRenderLanes));
|
12998 | }
|
12999 | isProfilingMode && stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0);
|
13000 | unitOfWork.memoizedProps = unitOfWork.pendingProps;
|
13001 | null === current
|
13002 | ? completeUnitOfWork(unitOfWork)
|
13003 | : (workInProgress = current);
|
13004 | }
|
13005 | function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
|
13006 | resetContextDependencies();
|
13007 | resetHooksOnUnwind(unitOfWork);
|
13008 | thenableState$1 = null;
|
13009 | thenableIndexCounter$1 = 0;
|
13010 | var returnFiber = unitOfWork.return;
|
13011 | try {
|
13012 | if (
|
13013 | throwException(
|
13014 | root,
|
13015 | returnFiber,
|
13016 | unitOfWork,
|
13017 | thrownValue,
|
13018 | workInProgressRootRenderLanes
|
13019 | )
|
13020 | ) {
|
13021 | workInProgressRootExitStatus = 1;
|
13022 | logUncaughtError(
|
13023 | root,
|
13024 | createCapturedValueAtFiber(thrownValue, root.current)
|
13025 | );
|
13026 | workInProgress = null;
|
13027 | return;
|
13028 | }
|
13029 | } catch (error) {
|
13030 | if (null !== returnFiber) throw ((workInProgress = returnFiber), error);
|
13031 | workInProgressRootExitStatus = 1;
|
13032 | logUncaughtError(
|
13033 | root,
|
13034 | createCapturedValueAtFiber(thrownValue, root.current)
|
13035 | );
|
13036 | workInProgress = null;
|
13037 | return;
|
13038 | }
|
13039 | if (unitOfWork.flags & 32768)
|
13040 | a: {
|
13041 | root = unitOfWork;
|
13042 | do {
|
13043 | unitOfWork = unwindWork(root.alternate, root);
|
13044 | if (null !== unitOfWork) {
|
13045 | unitOfWork.flags &= 32767;
|
13046 | workInProgress = unitOfWork;
|
13047 | break a;
|
13048 | }
|
13049 | if (0 !== (root.mode & 2)) {
|
13050 | stopProfilerTimerIfRunningAndRecordDelta(root, !1);
|
13051 | unitOfWork = root.actualDuration;
|
13052 | for (thrownValue = root.child; null !== thrownValue; )
|
13053 | (unitOfWork += thrownValue.actualDuration),
|
13054 | (thrownValue = thrownValue.sibling);
|
13055 | root.actualDuration = unitOfWork;
|
13056 | }
|
13057 | root = root.return;
|
13058 | null !== root &&
|
13059 | ((root.flags |= 32768),
|
13060 | (root.subtreeFlags = 0),
|
13061 | (root.deletions = null));
|
13062 | workInProgress = root;
|
13063 | } while (null !== root);
|
13064 | workInProgressRootExitStatus = 6;
|
13065 | workInProgress = null;
|
13066 | }
|
13067 | else completeUnitOfWork(unitOfWork);
|
13068 | }
|
13069 | function completeUnitOfWork(unitOfWork) {
|
13070 | var completedWork = unitOfWork;
|
13071 | do {
|
13072 | var current = completedWork.alternate;
|
13073 | unitOfWork = completedWork.return;
|
13074 | 0 === (completedWork.mode & 2)
|
13075 | ? (current = completeWork(current, completedWork, entangledRenderLanes))
|
13076 | : (startProfilerTimer(completedWork),
|
13077 | (current = completeWork(current, completedWork, entangledRenderLanes)),
|
13078 | stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
|
13079 | if (null !== current) {
|
13080 | workInProgress = current;
|
13081 | return;
|
13082 | }
|
13083 | completedWork = completedWork.sibling;
|
13084 | if (null !== completedWork) {
|
13085 | workInProgress = completedWork;
|
13086 | return;
|
13087 | }
|
13088 | workInProgress = completedWork = unitOfWork;
|
13089 | } while (null !== completedWork);
|
13090 | 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
|
13091 | }
|
13092 | function commitRoot(
|
13093 | root,
|
13094 | recoverableErrors,
|
13095 | transitions,
|
13096 | didIncludeRenderPhaseUpdate,
|
13097 | spawnedLane
|
13098 | ) {
|
13099 | var prevTransition = ReactSharedInternals.T,
|
13100 | previousUpdateLanePriority = ReactDOMSharedInternals.p;
|
13101 | try {
|
13102 | (ReactDOMSharedInternals.p = 2),
|
13103 | (ReactSharedInternals.T = null),
|
13104 | commitRootImpl(
|
13105 | root,
|
13106 | recoverableErrors,
|
13107 | transitions,
|
13108 | didIncludeRenderPhaseUpdate,
|
13109 | previousUpdateLanePriority,
|
13110 | spawnedLane
|
13111 | );
|
13112 | } finally {
|
13113 | (ReactSharedInternals.T = prevTransition),
|
13114 | (ReactDOMSharedInternals.p = previousUpdateLanePriority);
|
13115 | }
|
13116 | return null;
|
13117 | }
|
13118 | function commitRootImpl(
|
13119 | root,
|
13120 | recoverableErrors,
|
13121 | transitions,
|
13122 | didIncludeRenderPhaseUpdate,
|
13123 | renderPriorityLevel,
|
13124 | spawnedLane
|
13125 | ) {
|
13126 | do flushPassiveEffects();
|
13127 | while (null !== rootWithPendingPassiveEffects);
|
13128 | if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
|
13129 | var finishedWork = root.finishedWork,
|
13130 | lanes = root.finishedLanes;
|
13131 | null !== injectedProfilingHooks &&
|
13132 | "function" === typeof injectedProfilingHooks.markCommitStarted &&
|
13133 | injectedProfilingHooks.markCommitStarted(lanes);
|
13134 | if (null === finishedWork) return markCommitStopped(), null;
|
13135 | root.finishedWork = null;
|
13136 | root.finishedLanes = 0;
|
13137 | if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
|
13138 | root.callbackNode = null;
|
13139 | root.callbackPriority = 0;
|
13140 | root.cancelPendingCommit = null;
|
13141 | var remainingLanes = finishedWork.lanes | finishedWork.childLanes;
|
13142 | remainingLanes |= concurrentlyUpdatedLanes;
|
13143 | markRootFinished(root, remainingLanes, spawnedLane);
|
13144 | didIncludeCommitPhaseUpdate = !1;
|
13145 | root === workInProgressRoot &&
|
13146 | ((workInProgress = workInProgressRoot = null),
|
13147 | (workInProgressRootRenderLanes = 0));
|
13148 | (0 === (finishedWork.subtreeFlags & 10256) &&
|
13149 | 0 === (finishedWork.flags & 10256)) ||
|
13150 | rootDoesHavePassiveEffects ||
|
13151 | ((rootDoesHavePassiveEffects = !0),
|
13152 | (pendingPassiveEffectsRemainingLanes = remainingLanes),
|
13153 | (pendingPassiveTransitions = transitions),
|
13154 | scheduleCallback(NormalPriority$1, function () {
|
13155 | flushPassiveEffects();
|
13156 | return null;
|
13157 | }));
|
13158 | transitions = 0 !== (finishedWork.flags & 15990);
|
13159 | if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) {
|
13160 | transitions = ReactSharedInternals.T;
|
13161 | ReactSharedInternals.T = null;
|
13162 | spawnedLane = ReactDOMSharedInternals.p;
|
13163 | ReactDOMSharedInternals.p = 2;
|
13164 | var prevExecutionContext = executionContext;
|
13165 | executionContext |= 4;
|
13166 | commitBeforeMutationEffects(root, finishedWork);
|
13167 | commitTime = now();
|
13168 | commitMutationEffects(root, finishedWork, lanes);
|
13169 | restoreSelection(selectionInformation);
|
13170 | _enabled = !!eventsEnabled;
|
13171 | selectionInformation = eventsEnabled = null;
|
13172 | root.current = finishedWork;
|
13173 | null !== injectedProfilingHooks &&
|
13174 | "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted &&
|
13175 | injectedProfilingHooks.markLayoutEffectsStarted(lanes);
|
13176 | commitLayoutEffects(finishedWork, root, lanes);
|
13177 | null !== injectedProfilingHooks &&
|
13178 | "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped &&
|
13179 | injectedProfilingHooks.markLayoutEffectsStopped();
|
13180 | requestPaint();
|
13181 | executionContext = prevExecutionContext;
|
13182 | ReactDOMSharedInternals.p = spawnedLane;
|
13183 | ReactSharedInternals.T = transitions;
|
13184 | } else (root.current = finishedWork), (commitTime = now());
|
13185 | rootDoesHavePassiveEffects
|
13186 | ? ((rootDoesHavePassiveEffects = !1),
|
13187 | (rootWithPendingPassiveEffects = root),
|
13188 | (pendingPassiveEffectsLanes = lanes))
|
13189 | : releaseRootPooledCache(root, remainingLanes);
|
13190 | remainingLanes = root.pendingLanes;
|
13191 | 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
|
13192 | onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
|
13193 | isDevToolsPresent && root.memoizedUpdaters.clear();
|
13194 | ensureRootIsScheduled(root);
|
13195 | if (null !== recoverableErrors)
|
13196 | for (
|
13197 | renderPriorityLevel = root.onRecoverableError, finishedWork = 0;
|
13198 | finishedWork < recoverableErrors.length;
|
13199 | finishedWork++
|
13200 | )
|
13201 | (remainingLanes = recoverableErrors[finishedWork]),
|
13202 | renderPriorityLevel(remainingLanes.value, {
|
13203 | componentStack: remainingLanes.stack
|
13204 | });
|
13205 | 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects();
|
13206 | remainingLanes = root.pendingLanes;
|
13207 | didIncludeRenderPhaseUpdate ||
|
13208 | didIncludeCommitPhaseUpdate ||
|
13209 | (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
|
13210 | ? ((nestedUpdateScheduled = !0),
|
13211 | root === rootWithNestedUpdates
|
13212 | ? nestedUpdateCount++
|
13213 | : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)))
|
13214 | : (nestedUpdateCount = 0);
|
13215 | flushSyncWorkAcrossRoots_impl(!1);
|
13216 | markCommitStopped();
|
13217 | return null;
|
13218 | }
|
13219 | function releaseRootPooledCache(root, remainingLanes) {
|
13220 | 0 === (root.pooledCacheLanes &= remainingLanes) &&
|
13221 | ((remainingLanes = root.pooledCache),
|
13222 | null != remainingLanes &&
|
13223 | ((root.pooledCache = null), releaseCache(remainingLanes)));
|
13224 | }
|
13225 | function flushPassiveEffects() {
|
13226 | if (null !== rootWithPendingPassiveEffects) {
|
13227 | var root$241 = rootWithPendingPassiveEffects,
|
13228 | remainingLanes = pendingPassiveEffectsRemainingLanes;
|
13229 | pendingPassiveEffectsRemainingLanes = 0;
|
13230 | var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
|
13231 | prevTransition = ReactSharedInternals.T,
|
13232 | previousPriority = ReactDOMSharedInternals.p;
|
13233 | try {
|
13234 | ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
|
13235 | ReactSharedInternals.T = null;
|
13236 | if (null === rootWithPendingPassiveEffects)
|
13237 | var JSCompiler_inline_result = !1;
|
13238 | else {
|
13239 | var transitions = pendingPassiveTransitions;
|
13240 | pendingPassiveTransitions = null;
|
13241 | renderPriority = rootWithPendingPassiveEffects;
|
13242 | var lanes = pendingPassiveEffectsLanes;
|
13243 | rootWithPendingPassiveEffects = null;
|
13244 | pendingPassiveEffectsLanes = 0;
|
13245 | if (0 !== (executionContext & 6))
|
13246 | throw Error(formatProdErrorMessage(331));
|
13247 | null !== injectedProfilingHooks &&
|
13248 | "function" ===
|
13249 | typeof injectedProfilingHooks.markPassiveEffectsStarted &&
|
13250 | injectedProfilingHooks.markPassiveEffectsStarted(lanes);
|
13251 | var prevExecutionContext = executionContext;
|
13252 | executionContext |= 4;
|
13253 | commitPassiveUnmountOnFiber(renderPriority.current);
|
13254 | commitPassiveMountOnFiber(
|
13255 | renderPriority,
|
13256 | renderPriority.current,
|
13257 | lanes,
|
13258 | transitions
|
13259 | );
|
13260 | transitions = pendingPassiveProfilerEffects;
|
13261 | pendingPassiveProfilerEffects = [];
|
13262 | for (lanes = 0; lanes < transitions.length; lanes++) {
|
13263 | var finishedWork = transitions[lanes];
|
13264 | if (executionContext & 4 && 0 !== (finishedWork.flags & 4))
|
13265 | switch (finishedWork.tag) {
|
13266 | case 12:
|
13267 | var passiveEffectDuration =
|
13268 | finishedWork.stateNode.passiveEffectDuration,
|
13269 | _finishedWork$memoize = finishedWork.memoizedProps,
|
13270 | id = _finishedWork$memoize.id,
|
13271 | onPostCommit = _finishedWork$memoize.onPostCommit,
|
13272 | commitTime$165 = commitTime,
|
13273 | phase = null === finishedWork.alternate ? "mount" : "update";
|
13274 | currentUpdateIsNested && (phase = "nested-update");
|
13275 | "function" === typeof onPostCommit &&
|
13276 | onPostCommit(
|
13277 | id,
|
13278 | phase,
|
13279 | passiveEffectDuration,
|
13280 | commitTime$165
|
13281 | );
|
13282 | var parentFiber = finishedWork.return;
|
13283 | b: for (; null !== parentFiber; ) {
|
13284 | switch (parentFiber.tag) {
|
13285 | case 3:
|
13286 | parentFiber.stateNode.passiveEffectDuration +=
|
13287 | passiveEffectDuration;
|
13288 | break b;
|
13289 | case 12:
|
13290 | parentFiber.stateNode.passiveEffectDuration +=
|
13291 | passiveEffectDuration;
|
13292 | break b;
|
13293 | }
|
13294 | parentFiber = parentFiber.return;
|
13295 | }
|
13296 | }
|
13297 | }
|
13298 | null !== injectedProfilingHooks &&
|
13299 | "function" ===
|
13300 | typeof injectedProfilingHooks.markPassiveEffectsStopped &&
|
13301 | injectedProfilingHooks.markPassiveEffectsStopped();
|
13302 | executionContext = prevExecutionContext;
|
13303 | flushSyncWorkAcrossRoots_impl(!1);
|
13304 | if (
|
13305 | injectedHook &&
|
13306 | "function" === typeof injectedHook.onPostCommitFiberRoot
|
13307 | )
|
13308 | try {
|
13309 | injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
|
13310 | } catch (err) {}
|
13311 | var stateNode = renderPriority.current.stateNode;
|
13312 | stateNode.effectDuration = 0;
|
13313 | stateNode.passiveEffectDuration = 0;
|
13314 | JSCompiler_inline_result = !0;
|
13315 | }
|
13316 | return JSCompiler_inline_result;
|
13317 | } finally {
|
13318 | (ReactDOMSharedInternals.p = previousPriority),
|
13319 | (ReactSharedInternals.T = prevTransition),
|
13320 | releaseRootPooledCache(root$241, remainingLanes);
|
13321 | }
|
13322 | }
|
13323 | return !1;
|
13324 | }
|
13325 | function enqueuePendingPassiveProfilerEffect(fiber) {
|
13326 | pendingPassiveProfilerEffects.push(fiber);
|
13327 | rootDoesHavePassiveEffects ||
|
13328 | ((rootDoesHavePassiveEffects = !0),
|
13329 | scheduleCallback(NormalPriority$1, function () {
|
13330 | flushPassiveEffects();
|
13331 | return null;
|
13332 | }));
|
13333 | }
|
13334 | function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
|
13335 | sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
|
13336 | sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
|
13337 | rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
|
13338 | null !== rootFiber &&
|
13339 | (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber));
|
13340 | }
|
13341 | function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
|
13342 | if (3 === sourceFiber.tag)
|
13343 | captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
|
13344 | else
|
13345 | for (; null !== nearestMountedAncestor; ) {
|
13346 | if (3 === nearestMountedAncestor.tag) {
|
13347 | captureCommitPhaseErrorOnRoot(
|
13348 | nearestMountedAncestor,
|
13349 | sourceFiber,
|
13350 | error
|
13351 | );
|
13352 | break;
|
13353 | } else if (1 === nearestMountedAncestor.tag) {
|
13354 | var instance = nearestMountedAncestor.stateNode;
|
13355 | if (
|
13356 | "function" ===
|
13357 | typeof nearestMountedAncestor.type.getDerivedStateFromError ||
|
13358 | ("function" === typeof instance.componentDidCatch &&
|
13359 | (null === legacyErrorBoundariesThatAlreadyFailed ||
|
13360 | !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
|
13361 | ) {
|
13362 | sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
|
13363 | error = createClassErrorUpdate(2);
|
13364 | instance = enqueueUpdate(nearestMountedAncestor, error, 2);
|
13365 | null !== instance &&
|
13366 | (initializeClassErrorUpdate(
|
13367 | error,
|
13368 | instance,
|
13369 | nearestMountedAncestor,
|
13370 | sourceFiber
|
13371 | ),
|
13372 | markRootUpdated(instance, 2),
|
13373 | ensureRootIsScheduled(instance));
|
13374 | break;
|
13375 | }
|
13376 | }
|
13377 | nearestMountedAncestor = nearestMountedAncestor.return;
|
13378 | }
|
13379 | }
|
13380 | function attachPingListener(root, wakeable, lanes) {
|
13381 | var pingCache = root.pingCache;
|
13382 | if (null === pingCache) {
|
13383 | pingCache = root.pingCache = new PossiblyWeakMap();
|
13384 | var threadIDs = new Set();
|
13385 | pingCache.set(wakeable, threadIDs);
|
13386 | } else
|
13387 | (threadIDs = pingCache.get(wakeable)),
|
13388 | void 0 === threadIDs &&
|
13389 | ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
|
13390 | threadIDs.has(lanes) ||
|
13391 | ((workInProgressRootDidAttachPingListener = !0),
|
13392 | threadIDs.add(lanes),
|
13393 | (pingCache = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
|
13394 | isDevToolsPresent && restorePendingUpdaters(root, lanes),
|
13395 | wakeable.then(pingCache, pingCache));
|
13396 | }
|
13397 | function pingSuspendedRoot(root, wakeable, pingedLanes) {
|
13398 | var pingCache = root.pingCache;
|
13399 | null !== pingCache && pingCache.delete(wakeable);
|
13400 | root.pingedLanes |= root.suspendedLanes & pingedLanes;
|
13401 | executionContext & 2
|
13402 | ? (workInProgressRootDidIncludeRecursiveRenderUpdate = !0)
|
13403 | : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0);
|
13404 | throwIfInfiniteUpdateLoopDetected();
|
13405 | workInProgressRoot === root &&
|
13406 | (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&
|
13407 | (4 === workInProgressRootExitStatus ||
|
13408 | (3 === workInProgressRootExitStatus &&
|
13409 | (workInProgressRootRenderLanes & 62914560) ===
|
13410 | workInProgressRootRenderLanes &&
|
13411 | 300 > now$1() - globalMostRecentFallbackTime)
|
13412 | ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
|
13413 | : (workInProgressRootPingedLanes |= pingedLanes));
|
13414 | ensureRootIsScheduled(root);
|
13415 | }
|
13416 | function retryTimedOutBoundary(boundaryFiber, retryLane) {
|
13417 | 0 === retryLane && (retryLane = claimNextRetryLane());
|
13418 | boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
|
13419 | null !== boundaryFiber &&
|
13420 | (markRootUpdated(boundaryFiber, retryLane),
|
13421 | ensureRootIsScheduled(boundaryFiber));
|
13422 | }
|
13423 | function retryDehydratedSuspenseBoundary(boundaryFiber) {
|
13424 | var suspenseState = boundaryFiber.memoizedState,
|
13425 | retryLane = 0;
|
13426 | null !== suspenseState && (retryLane = suspenseState.retryLane);
|
13427 | retryTimedOutBoundary(boundaryFiber, retryLane);
|
13428 | }
|
13429 | function resolveRetryWakeable(boundaryFiber, wakeable) {
|
13430 | var retryLane = 0;
|
13431 | switch (boundaryFiber.tag) {
|
13432 | case 13:
|
13433 | var retryCache = boundaryFiber.stateNode;
|
13434 | var suspenseState = boundaryFiber.memoizedState;
|
13435 | null !== suspenseState && (retryLane = suspenseState.retryLane);
|
13436 | break;
|
13437 | case 19:
|
13438 | retryCache = boundaryFiber.stateNode;
|
13439 | break;
|
13440 | case 22:
|
13441 | retryCache = boundaryFiber.stateNode._retryCache;
|
13442 | break;
|
13443 | default:
|
13444 | throw Error(formatProdErrorMessage(314));
|
13445 | }
|
13446 | null !== retryCache && retryCache.delete(wakeable);
|
13447 | retryTimedOutBoundary(boundaryFiber, retryLane);
|
13448 | }
|
13449 | function throwIfInfiniteUpdateLoopDetected() {
|
13450 | if (50 < nestedUpdateCount)
|
13451 | throw (
|
13452 | ((nestedUpdateCount = 0),
|
13453 | (rootWithNestedUpdates = null),
|
13454 | executionContext & 2 &&
|
13455 | null !== workInProgressRoot &&
|
13456 | (workInProgressRoot.errorRecoveryDisabledLanes |=
|
13457 | workInProgressRootRenderLanes),
|
13458 | Error(formatProdErrorMessage(185)))
|
13459 | );
|
13460 | }
|
13461 | function restorePendingUpdaters(root, lanes) {
|
13462 | isDevToolsPresent &&
|
13463 | root.memoizedUpdaters.forEach(function (schedulingFiber) {
|
13464 | addFiberToLanesMap(root, schedulingFiber, lanes);
|
13465 | });
|
13466 | }
|
13467 | function scheduleCallback(priorityLevel, callback) {
|
13468 | return scheduleCallback$3(priorityLevel, callback);
|
13469 | }
|
13470 | var eventsEnabled = null,
|
13471 | selectionInformation = null;
|
13472 | function getOwnerDocumentFromRootContainer(rootContainerElement) {
|
13473 | return 9 === rootContainerElement.nodeType
|
13474 | ? rootContainerElement
|
13475 | : rootContainerElement.ownerDocument;
|
13476 | }
|
13477 | function getOwnHostContext(namespaceURI) {
|
13478 | switch (namespaceURI) {
|
13479 | case "http://www.w3.org/2000/svg":
|
13480 | return 1;
|
13481 | case "http://www.w3.org/1998/Math/MathML":
|
13482 | return 2;
|
13483 | default:
|
13484 | return 0;
|
13485 | }
|
13486 | }
|
13487 | function getChildHostContextProd(parentNamespace, type) {
|
13488 | if (0 === parentNamespace)
|
13489 | switch (type) {
|
13490 | case "svg":
|
13491 | return 1;
|
13492 | case "math":
|
13493 | return 2;
|
13494 | default:
|
13495 | return 0;
|
13496 | }
|
13497 | return 1 === parentNamespace && "foreignObject" === type
|
13498 | ? 0
|
13499 | : parentNamespace;
|
13500 | }
|
13501 | function shouldSetTextContent(type, props) {
|
13502 | return (
|
13503 | "textarea" === type ||
|
13504 | "noscript" === type ||
|
13505 | "string" === typeof props.children ||
|
13506 | "number" === typeof props.children ||
|
13507 | "bigint" === typeof props.children ||
|
13508 | ("object" === typeof props.dangerouslySetInnerHTML &&
|
13509 | null !== props.dangerouslySetInnerHTML &&
|
13510 | null != props.dangerouslySetInnerHTML.__html)
|
13511 | );
|
13512 | }
|
13513 | var currentPopstateTransitionEvent = null;
|
13514 | function shouldAttemptEagerTransition() {
|
13515 | var event = window.event;
|
13516 | if (event && "popstate" === event.type) {
|
13517 | if (event === currentPopstateTransitionEvent) return !1;
|
13518 | currentPopstateTransitionEvent = event;
|
13519 | return !0;
|
13520 | }
|
13521 | currentPopstateTransitionEvent = null;
|
13522 | return !1;
|
13523 | }
|
13524 | var scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0,
|
13525 | cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0,
|
13526 | localPromise = "function" === typeof Promise ? Promise : void 0,
|
13527 | scheduleMicrotask =
|
13528 | "function" === typeof queueMicrotask
|
13529 | ? queueMicrotask
|
13530 | : "undefined" !== typeof localPromise
|
13531 | ? function (callback) {
|
13532 | return localPromise
|
13533 | .resolve(null)
|
13534 | .then(callback)
|
13535 | .catch(handleErrorInNextTick);
|
13536 | }
|
13537 | : scheduleTimeout;
|
13538 | function handleErrorInNextTick(error) {
|
13539 | setTimeout(function () {
|
13540 | throw error;
|
13541 | });
|
13542 | }
|
13543 | function clearSuspenseBoundary(parentInstance, suspenseInstance) {
|
13544 | var node = suspenseInstance,
|
13545 | depth = 0;
|
13546 | do {
|
13547 | var nextNode = node.nextSibling;
|
13548 | parentInstance.removeChild(node);
|
13549 | if (nextNode && 8 === nextNode.nodeType)
|
13550 | if (((node = nextNode.data), "/$" === node)) {
|
13551 | if (0 === depth) {
|
13552 | parentInstance.removeChild(nextNode);
|
13553 | retryIfBlockedOn(suspenseInstance);
|
13554 | return;
|
13555 | }
|
13556 | depth--;
|
13557 | } else ("$" !== node && "$?" !== node && "$!" !== node) || depth++;
|
13558 | node = nextNode;
|
13559 | } while (node);
|
13560 | retryIfBlockedOn(suspenseInstance);
|
13561 | }
|
13562 | function clearContainerSparingly(container) {
|
13563 | var nextNode = container.firstChild;
|
13564 | nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
|
13565 | for (; nextNode; ) {
|
13566 | var node = nextNode;
|
13567 | nextNode = nextNode.nextSibling;
|
13568 | switch (node.nodeName) {
|
13569 | case "HTML":
|
13570 | case "HEAD":
|
13571 | case "BODY":
|
13572 | clearContainerSparingly(node);
|
13573 | detachDeletedInstance(node);
|
13574 | continue;
|
13575 | case "SCRIPT":
|
13576 | case "STYLE":
|
13577 | continue;
|
13578 | case "LINK":
|
13579 | if ("stylesheet" === node.rel.toLowerCase()) continue;
|
13580 | }
|
13581 | container.removeChild(node);
|
13582 | }
|
13583 | }
|
13584 | function canHydrateInstance(instance, type, props, inRootOrSingleton) {
|
13585 | for (; 1 === instance.nodeType; ) {
|
13586 | var anyProps = props;
|
13587 | if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
|
13588 | if (
|
13589 | !inRootOrSingleton &&
|
13590 | ("INPUT" !== instance.nodeName || "hidden" !== instance.type)
|
13591 | )
|
13592 | break;
|
13593 | } else if (!inRootOrSingleton)
|
13594 | if ("input" === type && "hidden" === instance.type) {
|
13595 | var name = null == anyProps.name ? null : "" + anyProps.name;
|
13596 | if (
|
13597 | "hidden" === anyProps.type &&
|
13598 | instance.getAttribute("name") === name
|
13599 | )
|
13600 | return instance;
|
13601 | } else return instance;
|
13602 | else if (!instance[internalHoistableMarker])
|
13603 | switch (type) {
|
13604 | case "meta":
|
13605 | if (!instance.hasAttribute("itemprop")) break;
|
13606 | return instance;
|
13607 | case "link":
|
13608 | name = instance.getAttribute("rel");
|
13609 | if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
|
13610 | break;
|
13611 | else if (
|
13612 | name !== anyProps.rel ||
|
13613 | instance.getAttribute("href") !==
|
13614 | (null == anyProps.href ? null : anyProps.href) ||
|
13615 | instance.getAttribute("crossorigin") !==
|
13616 | (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
|
13617 | instance.getAttribute("title") !==
|
13618 | (null == anyProps.title ? null : anyProps.title)
|
13619 | )
|
13620 | break;
|
13621 | return instance;
|
13622 | case "style":
|
13623 | if (instance.hasAttribute("data-precedence")) break;
|
13624 | return instance;
|
13625 | case "script":
|
13626 | name = instance.getAttribute("src");
|
13627 | if (
|
13628 | (name !== (null == anyProps.src ? null : anyProps.src) ||
|
13629 | instance.getAttribute("type") !==
|
13630 | (null == anyProps.type ? null : anyProps.type) ||
|
13631 | instance.getAttribute("crossorigin") !==
|
13632 | (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&
|
13633 | name &&
|
13634 | instance.hasAttribute("async") &&
|
13635 | !instance.hasAttribute("itemprop")
|
13636 | )
|
13637 | break;
|
13638 | return instance;
|
13639 | default:
|
13640 | return instance;
|
13641 | }
|
13642 | instance = getNextHydratable(instance.nextSibling);
|
13643 | if (null === instance) break;
|
13644 | }
|
13645 | return null;
|
13646 | }
|
13647 | function canHydrateTextInstance(instance, text, inRootOrSingleton) {
|
13648 | if ("" === text) return null;
|
13649 | for (; 3 !== instance.nodeType; ) {
|
13650 | if (
|
13651 | (1 !== instance.nodeType ||
|
13652 | "INPUT" !== instance.nodeName ||
|
13653 | "hidden" !== instance.type) &&
|
13654 | !inRootOrSingleton
|
13655 | )
|
13656 | return null;
|
13657 | instance = getNextHydratable(instance.nextSibling);
|
13658 | if (null === instance) return null;
|
13659 | }
|
13660 | return instance;
|
13661 | }
|
13662 | function getNextHydratable(node) {
|
13663 | for (; null != node; node = node.nextSibling) {
|
13664 | var nodeType = node.nodeType;
|
13665 | if (1 === nodeType || 3 === nodeType) break;
|
13666 | if (8 === nodeType) {
|
13667 | nodeType = node.data;
|
13668 | if (
|
13669 | "$" === nodeType ||
|
13670 | "$!" === nodeType ||
|
13671 | "$?" === nodeType ||
|
13672 | "F!" === nodeType ||
|
13673 | "F" === nodeType
|
13674 | )
|
13675 | break;
|
13676 | if ("/$" === nodeType) return null;
|
13677 | }
|
13678 | }
|
13679 | return node;
|
13680 | }
|
13681 | function getParentSuspenseInstance(targetInstance) {
|
13682 | targetInstance = targetInstance.previousSibling;
|
13683 | for (var depth = 0; targetInstance; ) {
|
13684 | if (8 === targetInstance.nodeType) {
|
13685 | var data = targetInstance.data;
|
13686 | if ("$" === data || "$!" === data || "$?" === data) {
|
13687 | if (0 === depth) return targetInstance;
|
13688 | depth--;
|
13689 | } else "/$" === data && depth++;
|
13690 | }
|
13691 | targetInstance = targetInstance.previousSibling;
|
13692 | }
|
13693 | return null;
|
13694 | }
|
13695 | function resolveSingletonInstance(type, props, rootContainerInstance) {
|
13696 | props = getOwnerDocumentFromRootContainer(rootContainerInstance);
|
13697 | switch (type) {
|
13698 | case "html":
|
13699 | type = props.documentElement;
|
13700 | if (!type) throw Error(formatProdErrorMessage(452));
|
13701 | return type;
|
13702 | case "head":
|
13703 | type = props.head;
|
13704 | if (!type) throw Error(formatProdErrorMessage(453));
|
13705 | return type;
|
13706 | case "body":
|
13707 | type = props.body;
|
13708 | if (!type) throw Error(formatProdErrorMessage(454));
|
13709 | return type;
|
13710 | default:
|
13711 | throw Error(formatProdErrorMessage(451));
|
13712 | }
|
13713 | }
|
13714 | var preloadPropsMap = new Map(),
|
13715 | preconnectsSet = new Set();
|
13716 | function getHoistableRoot(container) {
|
13717 | return "function" === typeof container.getRootNode
|
13718 | ? container.getRootNode()
|
13719 | : container.ownerDocument;
|
13720 | }
|
13721 | var previousDispatcher = ReactDOMSharedInternals.d;
|
13722 | ReactDOMSharedInternals.d = {
|
13723 | f: flushSyncWork,
|
13724 | r: requestFormReset$1,
|
13725 | D: prefetchDNS$1,
|
13726 | C: preconnect$1,
|
13727 | L: preload$1,
|
13728 | m: preloadModule$1,
|
13729 | X: preinitScript,
|
13730 | S: preinitStyle,
|
13731 | M: preinitModuleScript
|
13732 | };
|
13733 | function flushSyncWork() {
|
13734 | var previousWasRendering = previousDispatcher.f(),
|
13735 | wasRendering = flushSyncWork$1();
|
13736 | return previousWasRendering || wasRendering;
|
13737 | }
|
13738 | function requestFormReset$1(form) {
|
13739 | var formInst = getInstanceFromNode(form);
|
13740 | null !== formInst && 5 === formInst.tag && "form" === formInst.type
|
13741 | ? requestFormReset$2(formInst)
|
13742 | : previousDispatcher.r(form);
|
13743 | }
|
13744 | var globalDocument = "undefined" === typeof document ? null : document;
|
13745 | function preconnectAs(rel, href, crossOrigin) {
|
13746 | var ownerDocument = globalDocument;
|
13747 | if (ownerDocument && "string" === typeof href && href) {
|
13748 | var limitedEscapedHref =
|
13749 | escapeSelectorAttributeValueInsideDoubleQuotes(href);
|
13750 | limitedEscapedHref =
|
13751 | 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
|
13752 | "string" === typeof crossOrigin &&
|
13753 | (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
|
13754 | preconnectsSet.has(limitedEscapedHref) ||
|
13755 | (preconnectsSet.add(limitedEscapedHref),
|
13756 | (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),
|
13757 | null === ownerDocument.querySelector(limitedEscapedHref) &&
|
13758 | ((href = ownerDocument.createElement("link")),
|
13759 | setInitialProperties(href, "link", rel),
|
13760 | markNodeAsHoistable(href),
|
13761 | ownerDocument.head.appendChild(href)));
|
13762 | }
|
13763 | }
|
13764 | function prefetchDNS$1(href) {
|
13765 | previousDispatcher.D(href);
|
13766 | preconnectAs("dns-prefetch", href, null);
|
13767 | }
|
13768 | function preconnect$1(href, crossOrigin) {
|
13769 | previousDispatcher.C(href, crossOrigin);
|
13770 | preconnectAs("preconnect", href, crossOrigin);
|
13771 | }
|
13772 | function preload$1(href, as, options) {
|
13773 | previousDispatcher.L(href, as, options);
|
13774 | var ownerDocument = globalDocument;
|
13775 | if (ownerDocument && href && as) {
|
13776 | var preloadSelector =
|
13777 | 'link[rel="preload"][as="' +
|
13778 | escapeSelectorAttributeValueInsideDoubleQuotes(as) +
|
13779 | '"]';
|
13780 | "image" === as
|
13781 | ? options && options.imageSrcSet
|
13782 | ? ((preloadSelector +=
|
13783 | '[imagesrcset="' +
|
13784 | escapeSelectorAttributeValueInsideDoubleQuotes(
|
13785 | options.imageSrcSet
|
13786 | ) +
|
13787 | '"]'),
|
13788 | "string" === typeof options.imageSizes &&
|
13789 | (preloadSelector +=
|
13790 | '[imagesizes="' +
|
13791 | escapeSelectorAttributeValueInsideDoubleQuotes(
|
13792 | options.imageSizes
|
13793 | ) +
|
13794 | '"]'))
|
13795 | : (preloadSelector +=
|
13796 | '[href="' +
|
13797 | escapeSelectorAttributeValueInsideDoubleQuotes(href) +
|
13798 | '"]')
|
13799 | : (preloadSelector +=
|
13800 | '[href="' +
|
13801 | escapeSelectorAttributeValueInsideDoubleQuotes(href) +
|
13802 | '"]');
|
13803 | var key = preloadSelector;
|
13804 | switch (as) {
|
13805 | case "style":
|
13806 | key = getStyleKey(href);
|
13807 | break;
|
13808 | case "script":
|
13809 | key = getScriptKey(href);
|
13810 | }
|
13811 | preloadPropsMap.has(key) ||
|
13812 | ((href = assign(
|
13813 | {
|
13814 | rel: "preload",
|
13815 | href:
|
13816 | "image" === as && options && options.imageSrcSet ? void 0 : href,
|
13817 | as: as
|
13818 | },
|
13819 | options
|
13820 | )),
|
13821 | preloadPropsMap.set(key, href),
|
13822 | null !== ownerDocument.querySelector(preloadSelector) ||
|
13823 | ("style" === as &&
|
13824 | ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||
|
13825 | ("script" === as &&
|
13826 | ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||
|
13827 | ((as = ownerDocument.createElement("link")),
|
13828 | setInitialProperties(as, "link", href),
|
13829 | markNodeAsHoistable(as),
|
13830 | ownerDocument.head.appendChild(as)));
|
13831 | }
|
13832 | }
|
13833 | function preloadModule$1(href, options) {
|
13834 | previousDispatcher.m(href, options);
|
13835 | var ownerDocument = globalDocument;
|
13836 | if (ownerDocument && href) {
|
13837 | var as = options && "string" === typeof options.as ? options.as : "script",
|
13838 | preloadSelector =
|
13839 | 'link[rel="modulepreload"][as="' +
|
13840 | escapeSelectorAttributeValueInsideDoubleQuotes(as) +
|
13841 | '"][href="' +
|
13842 | escapeSelectorAttributeValueInsideDoubleQuotes(href) +
|
13843 | '"]',
|
13844 | key = preloadSelector;
|
13845 | switch (as) {
|
13846 | case "audioworklet":
|
13847 | case "paintworklet":
|
13848 | case "serviceworker":
|
13849 | case "sharedworker":
|
13850 | case "worker":
|
13851 | case "script":
|
13852 | key = getScriptKey(href);
|
13853 | }
|
13854 | if (
|
13855 | !preloadPropsMap.has(key) &&
|
13856 | ((href = assign({ rel: "modulepreload", href: href }, options)),
|
13857 | preloadPropsMap.set(key, href),
|
13858 | null === ownerDocument.querySelector(preloadSelector))
|
13859 | ) {
|
13860 | switch (as) {
|
13861 | case "audioworklet":
|
13862 | case "paintworklet":
|
13863 | case "serviceworker":
|
13864 | case "sharedworker":
|
13865 | case "worker":
|
13866 | case "script":
|
13867 | if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
|
13868 | return;
|
13869 | }
|
13870 | as = ownerDocument.createElement("link");
|
13871 | setInitialProperties(as, "link", href);
|
13872 | markNodeAsHoistable(as);
|
13873 | ownerDocument.head.appendChild(as);
|
13874 | }
|
13875 | }
|
13876 | }
|
13877 | function preinitStyle(href, precedence, options) {
|
13878 | previousDispatcher.S(href, precedence, options);
|
13879 | var ownerDocument = globalDocument;
|
13880 | if (ownerDocument && href) {
|
13881 | var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,
|
13882 | key = getStyleKey(href);
|
13883 | precedence = precedence || "default";
|
13884 | var resource = styles.get(key);
|
13885 | if (!resource) {
|
13886 | var state = { loading: 0, preload: null };
|
13887 | if (
|
13888 | (resource = ownerDocument.querySelector(
|
13889 | getStylesheetSelectorFromKey(key)
|
13890 | ))
|
13891 | )
|
13892 | state.loading = 5;
|
13893 | else {
|
13894 | href = assign(
|
13895 | { rel: "stylesheet", href: href, "data-precedence": precedence },
|
13896 | options
|
13897 | );
|
13898 | (options = preloadPropsMap.get(key)) &&
|
13899 | adoptPreloadPropsForStylesheet(href, options);
|
13900 | var link = (resource = ownerDocument.createElement("link"));
|
13901 | markNodeAsHoistable(link);
|
13902 | setInitialProperties(link, "link", href);
|
13903 | link._p = new Promise(function (resolve, reject) {
|
13904 | link.onload = resolve;
|
13905 | link.onerror = reject;
|
13906 | });
|
13907 | link.addEventListener("load", function () {
|
13908 | state.loading |= 1;
|
13909 | });
|
13910 | link.addEventListener("error", function () {
|
13911 | state.loading |= 2;
|
13912 | });
|
13913 | state.loading |= 4;
|
13914 | insertStylesheet(resource, precedence, ownerDocument);
|
13915 | }
|
13916 | resource = {
|
13917 | type: "stylesheet",
|
13918 | instance: resource,
|
13919 | count: 1,
|
13920 | state: state
|
13921 | };
|
13922 | styles.set(key, resource);
|
13923 | }
|
13924 | }
|
13925 | }
|
13926 | function preinitScript(src, options) {
|
13927 | previousDispatcher.X(src, options);
|
13928 | var ownerDocument = globalDocument;
|
13929 | if (ownerDocument && src) {
|
13930 | var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
|
13931 | key = getScriptKey(src),
|
13932 | resource = scripts.get(key);
|
13933 | resource ||
|
13934 | ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
|
13935 | resource ||
|
13936 | ((src = assign({ src: src, async: !0 }, options)),
|
13937 | (options = preloadPropsMap.get(key)) &&
|
13938 | adoptPreloadPropsForScript(src, options),
|
13939 | (resource = ownerDocument.createElement("script")),
|
13940 | markNodeAsHoistable(resource),
|
13941 | setInitialProperties(resource, "link", src),
|
13942 | ownerDocument.head.appendChild(resource)),
|
13943 | (resource = {
|
13944 | type: "script",
|
13945 | instance: resource,
|
13946 | count: 1,
|
13947 | state: null
|
13948 | }),
|
13949 | scripts.set(key, resource));
|
13950 | }
|
13951 | }
|
13952 | function preinitModuleScript(src, options) {
|
13953 | previousDispatcher.M(src, options);
|
13954 | var ownerDocument = globalDocument;
|
13955 | if (ownerDocument && src) {
|
13956 | var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
|
13957 | key = getScriptKey(src),
|
13958 | resource = scripts.get(key);
|
13959 | resource ||
|
13960 | ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
|
13961 | resource ||
|
13962 | ((src = assign({ src: src, async: !0, type: "module" }, options)),
|
13963 | (options = preloadPropsMap.get(key)) &&
|
13964 | adoptPreloadPropsForScript(src, options),
|
13965 | (resource = ownerDocument.createElement("script")),
|
13966 | markNodeAsHoistable(resource),
|
13967 | setInitialProperties(resource, "link", src),
|
13968 | ownerDocument.head.appendChild(resource)),
|
13969 | (resource = {
|
13970 | type: "script",
|
13971 | instance: resource,
|
13972 | count: 1,
|
13973 | state: null
|
13974 | }),
|
13975 | scripts.set(key, resource));
|
13976 | }
|
13977 | }
|
13978 | function getResource(type, currentProps, pendingProps) {
|
13979 | currentProps = (currentProps = rootInstanceStackCursor.current)
|
13980 | ? getHoistableRoot(currentProps)
|
13981 | : null;
|
13982 | if (!currentProps) throw Error(formatProdErrorMessage(446));
|
13983 | switch (type) {
|
13984 | case "meta":
|
13985 | case "title":
|
13986 | return null;
|
13987 | case "style":
|
13988 | return "string" === typeof pendingProps.precedence &&
|
13989 | "string" === typeof pendingProps.href
|
13990 | ? ((pendingProps = getStyleKey(pendingProps.href)),
|
13991 | (currentProps = getResourcesFromRoot(currentProps).hoistableStyles),
|
13992 | (type = currentProps.get(pendingProps)),
|
13993 | type ||
|
13994 | ((type = { type: "style", instance: null, count: 0, state: null }),
|
13995 | currentProps.set(pendingProps, type)),
|
13996 | type)
|
13997 | : { type: "void", instance: null, count: 0, state: null };
|
13998 | case "link":
|
13999 | if (
|
14000 | "stylesheet" === pendingProps.rel &&
|
14001 | "string" === typeof pendingProps.href &&
|
14002 | "string" === typeof pendingProps.precedence
|
14003 | ) {
|
14004 | type = getStyleKey(pendingProps.href);
|
14005 | var styles$246 = getResourcesFromRoot(currentProps).hoistableStyles,
|
14006 | resource$247 = styles$246.get(type);
|
14007 | resource$247 ||
|
14008 | ((currentProps = currentProps.ownerDocument || currentProps),
|
14009 | (resource$247 = {
|
14010 | type: "stylesheet",
|
14011 | instance: null,
|
14012 | count: 0,
|
14013 | state: { loading: 0, preload: null }
|
14014 | }),
|
14015 | styles$246.set(type, resource$247),
|
14016 | preloadPropsMap.has(type) ||
|
14017 | preloadStylesheet(
|
14018 | currentProps,
|
14019 | type,
|
14020 | {
|
14021 | rel: "preload",
|
14022 | as: "style",
|
14023 | href: pendingProps.href,
|
14024 | crossOrigin: pendingProps.crossOrigin,
|
14025 | integrity: pendingProps.integrity,
|
14026 | media: pendingProps.media,
|
14027 | hrefLang: pendingProps.hrefLang,
|
14028 | referrerPolicy: pendingProps.referrerPolicy
|
14029 | },
|
14030 | resource$247.state
|
14031 | ));
|
14032 | return resource$247;
|
14033 | }
|
14034 | return null;
|
14035 | case "script":
|
14036 | return (
|
14037 | (type = pendingProps.async),
|
14038 | (pendingProps = pendingProps.src),
|
14039 | "string" === typeof pendingProps &&
|
14040 | type &&
|
14041 | "function" !== typeof type &&
|
14042 | "symbol" !== typeof type
|
14043 | ? ((pendingProps = getScriptKey(pendingProps)),
|
14044 | (currentProps =
|
14045 | getResourcesFromRoot(currentProps).hoistableScripts),
|
14046 | (type = currentProps.get(pendingProps)),
|
14047 | type ||
|
14048 | ((type = {
|
14049 | type: "script",
|
14050 | instance: null,
|
14051 | count: 0,
|
14052 | state: null
|
14053 | }),
|
14054 | currentProps.set(pendingProps, type)),
|
14055 | type)
|
14056 | : { type: "void", instance: null, count: 0, state: null }
|
14057 | );
|
14058 | default:
|
14059 | throw Error(formatProdErrorMessage(444, type));
|
14060 | }
|
14061 | }
|
14062 | function getStyleKey(href) {
|
14063 | return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
|
14064 | }
|
14065 | function getStylesheetSelectorFromKey(key) {
|
14066 | return 'link[rel="stylesheet"][' + key + "]";
|
14067 | }
|
14068 | function stylesheetPropsFromRawProps(rawProps) {
|
14069 | return assign({}, rawProps, {
|
14070 | "data-precedence": rawProps.precedence,
|
14071 | precedence: null
|
14072 | });
|
14073 | }
|
14074 | function preloadStylesheet(ownerDocument, key, preloadProps, state) {
|
14075 | preloadPropsMap.set(key, preloadProps);
|
14076 | ownerDocument.querySelector(getStylesheetSelectorFromKey(key)) ||
|
14077 | (ownerDocument.querySelector('link[rel="preload"][as="style"][' + key + "]")
|
14078 | ? (state.loading = 1)
|
14079 | : ((key = ownerDocument.createElement("link")),
|
14080 | (state.preload = key),
|
14081 | key.addEventListener("load", function () {
|
14082 | return (state.loading |= 1);
|
14083 | }),
|
14084 | key.addEventListener("error", function () {
|
14085 | return (state.loading |= 2);
|
14086 | }),
|
14087 | setInitialProperties(key, "link", preloadProps),
|
14088 | markNodeAsHoistable(key),
|
14089 | ownerDocument.head.appendChild(key)));
|
14090 | }
|
14091 | function getScriptKey(src) {
|
14092 | return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
|
14093 | }
|
14094 | function getScriptSelectorFromKey(key) {
|
14095 | return "script[async]" + key;
|
14096 | }
|
14097 | function acquireResource(hoistableRoot, resource, props) {
|
14098 | resource.count++;
|
14099 | if (null === resource.instance)
|
14100 | switch (resource.type) {
|
14101 | case "style":
|
14102 | var instance = hoistableRoot.querySelector(
|
14103 | 'style[data-href~="' +
|
14104 | escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +
|
14105 | '"]'
|
14106 | );
|
14107 | if (instance)
|
14108 | return (
|
14109 | (resource.instance = instance),
|
14110 | markNodeAsHoistable(instance),
|
14111 | instance
|
14112 | );
|
14113 | var styleProps = assign({}, props, {
|
14114 | "data-href": props.href,
|
14115 | "data-precedence": props.precedence,
|
14116 | href: null,
|
14117 | precedence: null
|
14118 | });
|
14119 | instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(
|
14120 | "style"
|
14121 | );
|
14122 | markNodeAsHoistable(instance);
|
14123 | setInitialProperties(instance, "style", styleProps);
|
14124 | insertStylesheet(instance, props.precedence, hoistableRoot);
|
14125 | return (resource.instance = instance);
|
14126 | case "stylesheet":
|
14127 | styleProps = getStyleKey(props.href);
|
14128 | var instance$251 = hoistableRoot.querySelector(
|
14129 | getStylesheetSelectorFromKey(styleProps)
|
14130 | );
|
14131 | if (instance$251)
|
14132 | return (
|
14133 | (resource.state.loading |= 4),
|
14134 | (resource.instance = instance$251),
|
14135 | markNodeAsHoistable(instance$251),
|
14136 | instance$251
|
14137 | );
|
14138 | instance = stylesheetPropsFromRawProps(props);
|
14139 | (styleProps = preloadPropsMap.get(styleProps)) &&
|
14140 | adoptPreloadPropsForStylesheet(instance, styleProps);
|
14141 | instance$251 = (
|
14142 | hoistableRoot.ownerDocument || hoistableRoot
|
14143 | ).createElement("link");
|
14144 | markNodeAsHoistable(instance$251);
|
14145 | var linkInstance = instance$251;
|
14146 | linkInstance._p = new Promise(function (resolve, reject) {
|
14147 | linkInstance.onload = resolve;
|
14148 | linkInstance.onerror = reject;
|
14149 | });
|
14150 | setInitialProperties(instance$251, "link", instance);
|
14151 | resource.state.loading |= 4;
|
14152 | insertStylesheet(instance$251, props.precedence, hoistableRoot);
|
14153 | return (resource.instance = instance$251);
|
14154 | case "script":
|
14155 | instance$251 = getScriptKey(props.src);
|
14156 | if (
|
14157 | (styleProps = hoistableRoot.querySelector(
|
14158 | getScriptSelectorFromKey(instance$251)
|
14159 | ))
|
14160 | )
|
14161 | return (
|
14162 | (resource.instance = styleProps),
|
14163 | markNodeAsHoistable(styleProps),
|
14164 | styleProps
|
14165 | );
|
14166 | instance = props;
|
14167 | if ((styleProps = preloadPropsMap.get(instance$251)))
|
14168 | (instance = assign({}, props)),
|
14169 | adoptPreloadPropsForScript(instance, styleProps);
|
14170 | hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
|
14171 | styleProps = hoistableRoot.createElement("script");
|
14172 | markNodeAsHoistable(styleProps);
|
14173 | setInitialProperties(styleProps, "link", instance);
|
14174 | hoistableRoot.head.appendChild(styleProps);
|
14175 | return (resource.instance = styleProps);
|
14176 | case "void":
|
14177 | return null;
|
14178 | default:
|
14179 | throw Error(formatProdErrorMessage(443, resource.type));
|
14180 | }
|
14181 | else
|
14182 | "stylesheet" === resource.type &&
|
14183 | 0 === (resource.state.loading & 4) &&
|
14184 | ((instance = resource.instance),
|
14185 | (resource.state.loading |= 4),
|
14186 | insertStylesheet(instance, props.precedence, hoistableRoot));
|
14187 | return resource.instance;
|
14188 | }
|
14189 | function insertStylesheet(instance, precedence, root) {
|
14190 | for (
|
14191 | var nodes = root.querySelectorAll(
|
14192 | 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
|
14193 | ),
|
14194 | last = nodes.length ? nodes[nodes.length - 1] : null,
|
14195 | prior = last,
|
14196 | i = 0;
|
14197 | i < nodes.length;
|
14198 | i++
|
14199 | ) {
|
14200 | var node = nodes[i];
|
14201 | if (node.dataset.precedence === precedence) prior = node;
|
14202 | else if (prior !== last) break;
|
14203 | }
|
14204 | prior
|
14205 | ? prior.parentNode.insertBefore(instance, prior.nextSibling)
|
14206 | : ((precedence = 9 === root.nodeType ? root.head : root),
|
14207 | precedence.insertBefore(instance, precedence.firstChild));
|
14208 | }
|
14209 | function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
|
14210 | null == stylesheetProps.crossOrigin &&
|
14211 | (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
|
14212 | null == stylesheetProps.referrerPolicy &&
|
14213 | (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
|
14214 | null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
|
14215 | }
|
14216 | function adoptPreloadPropsForScript(scriptProps, preloadProps) {
|
14217 | null == scriptProps.crossOrigin &&
|
14218 | (scriptProps.crossOrigin = preloadProps.crossOrigin);
|
14219 | null == scriptProps.referrerPolicy &&
|
14220 | (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
|
14221 | null == scriptProps.integrity &&
|
14222 | (scriptProps.integrity = preloadProps.integrity);
|
14223 | }
|
14224 | var tagCaches = null;
|
14225 | function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
|
14226 | if (null === tagCaches) {
|
14227 | var cache = new Map();
|
14228 | var caches = (tagCaches = new Map());
|
14229 | caches.set(ownerDocument, cache);
|
14230 | } else
|
14231 | (caches = tagCaches),
|
14232 | (cache = caches.get(ownerDocument)),
|
14233 | cache || ((cache = new Map()), caches.set(ownerDocument, cache));
|
14234 | if (cache.has(type)) return cache;
|
14235 | cache.set(type, null);
|
14236 | ownerDocument = ownerDocument.getElementsByTagName(type);
|
14237 | for (caches = 0; caches < ownerDocument.length; caches++) {
|
14238 | var node = ownerDocument[caches];
|
14239 | if (
|
14240 | !(
|
14241 | node[internalHoistableMarker] ||
|
14242 | node[internalInstanceKey] ||
|
14243 | ("link" === type && "stylesheet" === node.getAttribute("rel"))
|
14244 | ) &&
|
14245 | "http://www.w3.org/2000/svg" !== node.namespaceURI
|
14246 | ) {
|
14247 | var nodeKey = node.getAttribute(keyAttribute) || "";
|
14248 | nodeKey = type + nodeKey;
|
14249 | var existing = cache.get(nodeKey);
|
14250 | existing ? existing.push(node) : cache.set(nodeKey, [node]);
|
14251 | }
|
14252 | }
|
14253 | return cache;
|
14254 | }
|
14255 | function mountHoistable(hoistableRoot, type, instance) {
|
14256 | hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
|
14257 | hoistableRoot.head.insertBefore(
|
14258 | instance,
|
14259 | "title" === type ? hoistableRoot.querySelector("head > title") : null
|
14260 | );
|
14261 | }
|
14262 | function isHostHoistableType(type, props, hostContext) {
|
14263 | if (1 === hostContext || null != props.itemProp) return !1;
|
14264 | switch (type) {
|
14265 | case "meta":
|
14266 | case "title":
|
14267 | return !0;
|
14268 | case "style":
|
14269 | if (
|
14270 | "string" !== typeof props.precedence ||
|
14271 | "string" !== typeof props.href ||
|
14272 | "" === props.href
|
14273 | )
|
14274 | break;
|
14275 | return !0;
|
14276 | case "link":
|
14277 | if (
|
14278 | "string" !== typeof props.rel ||
|
14279 | "string" !== typeof props.href ||
|
14280 | "" === props.href ||
|
14281 | props.onLoad ||
|
14282 | props.onError
|
14283 | )
|
14284 | break;
|
14285 | switch (props.rel) {
|
14286 | case "stylesheet":
|
14287 | return (
|
14288 | (type = props.disabled),
|
14289 | "string" === typeof props.precedence && null == type
|
14290 | );
|
14291 | default:
|
14292 | return !0;
|
14293 | }
|
14294 | case "script":
|
14295 | if (
|
14296 | props.async &&
|
14297 | "function" !== typeof props.async &&
|
14298 | "symbol" !== typeof props.async &&
|
14299 | !props.onLoad &&
|
14300 | !props.onError &&
|
14301 | props.src &&
|
14302 | "string" === typeof props.src
|
14303 | )
|
14304 | return !0;
|
14305 | }
|
14306 | return !1;
|
14307 | }
|
14308 | var suspendedState = null;
|
14309 | function noop$1() {}
|
14310 | function suspendResource(hoistableRoot, resource, props) {
|
14311 | if (null === suspendedState) throw Error(formatProdErrorMessage(475));
|
14312 | var state = suspendedState;
|
14313 | if (
|
14314 | "stylesheet" === resource.type &&
|
14315 | ("string" !== typeof props.media ||
|
14316 | !1 !== matchMedia(props.media).matches) &&
|
14317 | 0 === (resource.state.loading & 4)
|
14318 | ) {
|
14319 | if (null === resource.instance) {
|
14320 | var key = getStyleKey(props.href),
|
14321 | instance = hoistableRoot.querySelector(
|
14322 | getStylesheetSelectorFromKey(key)
|
14323 | );
|
14324 | if (instance) {
|
14325 | hoistableRoot = instance._p;
|
14326 | null !== hoistableRoot &&
|
14327 | "object" === typeof hoistableRoot &&
|
14328 | "function" === typeof hoistableRoot.then &&
|
14329 | (state.count++,
|
14330 | (state = onUnsuspend.bind(state)),
|
14331 | hoistableRoot.then(state, state));
|
14332 | resource.state.loading |= 4;
|
14333 | resource.instance = instance;
|
14334 | markNodeAsHoistable(instance);
|
14335 | return;
|
14336 | }
|
14337 | instance = hoistableRoot.ownerDocument || hoistableRoot;
|
14338 | props = stylesheetPropsFromRawProps(props);
|
14339 | (key = preloadPropsMap.get(key)) &&
|
14340 | adoptPreloadPropsForStylesheet(props, key);
|
14341 | instance = instance.createElement("link");
|
14342 | markNodeAsHoistable(instance);
|
14343 | var linkInstance = instance;
|
14344 | linkInstance._p = new Promise(function (resolve, reject) {
|
14345 | linkInstance.onload = resolve;
|
14346 | linkInstance.onerror = reject;
|
14347 | });
|
14348 | setInitialProperties(instance, "link", props);
|
14349 | resource.instance = instance;
|
14350 | }
|
14351 | null === state.stylesheets && (state.stylesheets = new Map());
|
14352 | state.stylesheets.set(resource, hoistableRoot);
|
14353 | (hoistableRoot = resource.state.preload) &&
|
14354 | 0 === (resource.state.loading & 3) &&
|
14355 | (state.count++,
|
14356 | (resource = onUnsuspend.bind(state)),
|
14357 | hoistableRoot.addEventListener("load", resource),
|
14358 | hoistableRoot.addEventListener("error", resource));
|
14359 | }
|
14360 | }
|
14361 | function waitForCommitToBeReady() {
|
14362 | if (null === suspendedState) throw Error(formatProdErrorMessage(475));
|
14363 | var state = suspendedState;
|
14364 | state.stylesheets &&
|
14365 | 0 === state.count &&
|
14366 | insertSuspendedStylesheets(state, state.stylesheets);
|
14367 | return 0 < state.count
|
14368 | ? function (commit) {
|
14369 | var stylesheetTimer = setTimeout(function () {
|
14370 | state.stylesheets &&
|
14371 | insertSuspendedStylesheets(state, state.stylesheets);
|
14372 | if (state.unsuspend) {
|
14373 | var unsuspend = state.unsuspend;
|
14374 | state.unsuspend = null;
|
14375 | unsuspend();
|
14376 | }
|
14377 | }, 6e4);
|
14378 | state.unsuspend = commit;
|
14379 | return function () {
|
14380 | state.unsuspend = null;
|
14381 | clearTimeout(stylesheetTimer);
|
14382 | };
|
14383 | }
|
14384 | : null;
|
14385 | }
|
14386 | function onUnsuspend() {
|
14387 | this.count--;
|
14388 | if (0 === this.count)
|
14389 | if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);
|
14390 | else if (this.unsuspend) {
|
14391 | var unsuspend = this.unsuspend;
|
14392 | this.unsuspend = null;
|
14393 | unsuspend();
|
14394 | }
|
14395 | }
|
14396 | var precedencesByRoot = null;
|
14397 | function insertSuspendedStylesheets(state, resources) {
|
14398 | state.stylesheets = null;
|
14399 | null !== state.unsuspend &&
|
14400 | (state.count++,
|
14401 | (precedencesByRoot = new Map()),
|
14402 | resources.forEach(insertStylesheetIntoRoot, state),
|
14403 | (precedencesByRoot = null),
|
14404 | onUnsuspend.call(state));
|
14405 | }
|
14406 | function insertStylesheetIntoRoot(root, resource) {
|
14407 | if (!(resource.state.loading & 4)) {
|
14408 | var precedences = precedencesByRoot.get(root);
|
14409 | if (precedences) var last = precedences.get(null);
|
14410 | else {
|
14411 | precedences = new Map();
|
14412 | precedencesByRoot.set(root, precedences);
|
14413 | for (
|
14414 | var nodes = root.querySelectorAll(
|
14415 | "link[data-precedence],style[data-precedence]"
|
14416 | ),
|
14417 | i = 0;
|
14418 | i < nodes.length;
|
14419 | i++
|
14420 | ) {
|
14421 | var node = nodes[i];
|
14422 | if (
|
14423 | "link" === node.nodeName ||
|
14424 | "not all" !== node.getAttribute("media")
|
14425 | )
|
14426 | precedences.set(node.dataset.precedence, node), (last = node);
|
14427 | }
|
14428 | last && precedences.set(null, last);
|
14429 | }
|
14430 | nodes = resource.instance;
|
14431 | node = nodes.getAttribute("data-precedence");
|
14432 | i = precedences.get(node) || last;
|
14433 | i === last && precedences.set(null, nodes);
|
14434 | precedences.set(node, nodes);
|
14435 | this.count++;
|
14436 | last = onUnsuspend.bind(this);
|
14437 | nodes.addEventListener("load", last);
|
14438 | nodes.addEventListener("error", last);
|
14439 | i
|
14440 | ? i.parentNode.insertBefore(nodes, i.nextSibling)
|
14441 | : ((root = 9 === root.nodeType ? root.head : root),
|
14442 | root.insertBefore(nodes, root.firstChild));
|
14443 | resource.state.loading |= 4;
|
14444 | }
|
14445 | }
|
14446 | function FiberRootNode(
|
14447 | containerInfo,
|
14448 | tag,
|
14449 | hydrate,
|
14450 | identifierPrefix,
|
14451 | onUncaughtError,
|
14452 | onCaughtError,
|
14453 | onRecoverableError,
|
14454 | formState
|
14455 | ) {
|
14456 | this.tag = 1;
|
14457 | this.containerInfo = containerInfo;
|
14458 | this.finishedWork =
|
14459 | this.pingCache =
|
14460 | this.current =
|
14461 | this.pendingChildren =
|
14462 | null;
|
14463 | this.timeoutHandle = -1;
|
14464 | this.callbackNode =
|
14465 | this.next =
|
14466 | this.pendingContext =
|
14467 | this.context =
|
14468 | this.cancelPendingCommit =
|
14469 | null;
|
14470 | this.callbackPriority = 0;
|
14471 | this.expirationTimes = createLaneMap(-1);
|
14472 | this.entangledLanes =
|
14473 | this.shellSuspendCounter =
|
14474 | this.errorRecoveryDisabledLanes =
|
14475 | this.finishedLanes =
|
14476 | this.expiredLanes =
|
14477 | this.pingedLanes =
|
14478 | this.suspendedLanes =
|
14479 | this.pendingLanes =
|
14480 | 0;
|
14481 | this.entanglements = createLaneMap(0);
|
14482 | this.hiddenUpdates = createLaneMap(null);
|
14483 | this.identifierPrefix = identifierPrefix;
|
14484 | this.onUncaughtError = onUncaughtError;
|
14485 | this.onCaughtError = onCaughtError;
|
14486 | this.onRecoverableError = onRecoverableError;
|
14487 | this.pooledCache = null;
|
14488 | this.pooledCacheLanes = 0;
|
14489 | this.formState = formState;
|
14490 | this.incompleteTransitions = new Map();
|
14491 | this.passiveEffectDuration = this.effectDuration = 0;
|
14492 | this.memoizedUpdaters = new Set();
|
14493 | containerInfo = this.pendingUpdatersLaneMap = [];
|
14494 | for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set());
|
14495 | }
|
14496 | function createFiberRoot(
|
14497 | containerInfo,
|
14498 | tag,
|
14499 | hydrate,
|
14500 | initialChildren,
|
14501 | hydrationCallbacks,
|
14502 | isStrictMode,
|
14503 | concurrentUpdatesByDefaultOverride,
|
14504 | identifierPrefix,
|
14505 | onUncaughtError,
|
14506 | onCaughtError,
|
14507 | onRecoverableError,
|
14508 | transitionCallbacks,
|
14509 | formState
|
14510 | ) {
|
14511 | containerInfo = new FiberRootNode(
|
14512 | containerInfo,
|
14513 | tag,
|
14514 | hydrate,
|
14515 | identifierPrefix,
|
14516 | onUncaughtError,
|
14517 | onCaughtError,
|
14518 | onRecoverableError,
|
14519 | formState
|
14520 | );
|
14521 | tag = 1;
|
14522 | !0 === isStrictMode && (tag |= 24);
|
14523 | isDevToolsPresent && (tag |= 2);
|
14524 | isStrictMode = createFiber(3, null, null, tag);
|
14525 | containerInfo.current = isStrictMode;
|
14526 | isStrictMode.stateNode = containerInfo;
|
14527 | tag = createCache();
|
14528 | tag.refCount++;
|
14529 | containerInfo.pooledCache = tag;
|
14530 | tag.refCount++;
|
14531 | isStrictMode.memoizedState = {
|
14532 | element: initialChildren,
|
14533 | isDehydrated: hydrate,
|
14534 | cache: tag
|
14535 | };
|
14536 | initializeUpdateQueue(isStrictMode);
|
14537 | return containerInfo;
|
14538 | }
|
14539 | function createPortal$1(children, containerInfo, implementation) {
|
14540 | var key =
|
14541 | 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
14542 | return {
|
14543 | $$typeof: REACT_PORTAL_TYPE,
|
14544 | key: null == key ? null : "" + key,
|
14545 | children: children,
|
14546 | containerInfo: containerInfo,
|
14547 | implementation: implementation
|
14548 | };
|
14549 | }
|
14550 | function getContextForSubtree(parentComponent) {
|
14551 | if (!parentComponent) return emptyContextObject;
|
14552 | parentComponent = emptyContextObject;
|
14553 | return parentComponent;
|
14554 | }
|
14555 | function updateContainerImpl(
|
14556 | rootFiber,
|
14557 | lane,
|
14558 | element,
|
14559 | container,
|
14560 | parentComponent,
|
14561 | callback
|
14562 | ) {
|
14563 | null !== injectedProfilingHooks &&
|
14564 | "function" === typeof injectedProfilingHooks.markRenderScheduled &&
|
14565 | injectedProfilingHooks.markRenderScheduled(lane);
|
14566 | parentComponent = getContextForSubtree(parentComponent);
|
14567 | null === container.context
|
14568 | ? (container.context = parentComponent)
|
14569 | : (container.pendingContext = parentComponent);
|
14570 | container = createUpdate(lane);
|
14571 | container.payload = { element: element };
|
14572 | callback = void 0 === callback ? null : callback;
|
14573 | null !== callback && (container.callback = callback);
|
14574 | element = enqueueUpdate(rootFiber, container, lane);
|
14575 | null !== element &&
|
14576 | (scheduleUpdateOnFiber(element, rootFiber, lane),
|
14577 | entangleTransitions(element, rootFiber, lane));
|
14578 | }
|
14579 | function markRetryLaneImpl(fiber, retryLane) {
|
14580 | fiber = fiber.memoizedState;
|
14581 | if (null !== fiber && null !== fiber.dehydrated) {
|
14582 | var a = fiber.retryLane;
|
14583 | fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
|
14584 | }
|
14585 | }
|
14586 | function markRetryLaneIfNotHydrated(fiber, retryLane) {
|
14587 | markRetryLaneImpl(fiber, retryLane);
|
14588 | (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
|
14589 | }
|
14590 | function attemptContinuousHydration(fiber) {
|
14591 | if (13 === fiber.tag) {
|
14592 | var root = enqueueConcurrentRenderForLane(fiber, 67108864);
|
14593 | null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
|
14594 | markRetryLaneIfNotHydrated(fiber, 67108864);
|
14595 | }
|
14596 | }
|
14597 | function emptyFindFiberByHostInstance() {
|
14598 | return null;
|
14599 | }
|
14600 | var _enabled = !0;
|
14601 | function dispatchDiscreteEvent(
|
14602 | domEventName,
|
14603 | eventSystemFlags,
|
14604 | container,
|
14605 | nativeEvent
|
14606 | ) {
|
14607 | var prevTransition = ReactSharedInternals.T;
|
14608 | ReactSharedInternals.T = null;
|
14609 | var previousPriority = ReactDOMSharedInternals.p;
|
14610 | try {
|
14611 | (ReactDOMSharedInternals.p = 2),
|
14612 | dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
|
14613 | } finally {
|
14614 | (ReactDOMSharedInternals.p = previousPriority),
|
14615 | (ReactSharedInternals.T = prevTransition);
|
14616 | }
|
14617 | }
|
14618 | function dispatchContinuousEvent(
|
14619 | domEventName,
|
14620 | eventSystemFlags,
|
14621 | container,
|
14622 | nativeEvent
|
14623 | ) {
|
14624 | var prevTransition = ReactSharedInternals.T;
|
14625 | ReactSharedInternals.T = null;
|
14626 | var previousPriority = ReactDOMSharedInternals.p;
|
14627 | try {
|
14628 | (ReactDOMSharedInternals.p = 8),
|
14629 | dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
|
14630 | } finally {
|
14631 | (ReactDOMSharedInternals.p = previousPriority),
|
14632 | (ReactSharedInternals.T = prevTransition);
|
14633 | }
|
14634 | }
|
14635 | function dispatchEvent(
|
14636 | domEventName,
|
14637 | eventSystemFlags,
|
14638 | targetContainer,
|
14639 | nativeEvent
|
14640 | ) {
|
14641 | if (_enabled) {
|
14642 | var blockedOn = findInstanceBlockingEvent(nativeEvent);
|
14643 | if (null === blockedOn)
|
14644 | dispatchEventForPluginEventSystem(
|
14645 | domEventName,
|
14646 | eventSystemFlags,
|
14647 | nativeEvent,
|
14648 | return_targetInst,
|
14649 | targetContainer
|
14650 | ),
|
14651 | clearIfContinuousEvent(domEventName, nativeEvent);
|
14652 | else if (
|
14653 | queueIfContinuousEvent(
|
14654 | blockedOn,
|
14655 | domEventName,
|
14656 | eventSystemFlags,
|
14657 | targetContainer,
|
14658 | nativeEvent
|
14659 | )
|
14660 | )
|
14661 | nativeEvent.stopPropagation();
|
14662 | else if (
|
14663 | (clearIfContinuousEvent(domEventName, nativeEvent),
|
14664 | eventSystemFlags & 4 &&
|
14665 | -1 < discreteReplayableEvents.indexOf(domEventName))
|
14666 | ) {
|
14667 | for (; null !== blockedOn; ) {
|
14668 | var fiber = getInstanceFromNode(blockedOn);
|
14669 | if (null !== fiber)
|
14670 | switch (fiber.tag) {
|
14671 | case 3:
|
14672 | fiber = fiber.stateNode;
|
14673 | if (fiber.current.memoizedState.isDehydrated) {
|
14674 | var lanes = getHighestPriorityLanes(fiber.pendingLanes);
|
14675 | if (0 !== lanes) {
|
14676 | var root = fiber;
|
14677 | root.pendingLanes |= 2;
|
14678 | for (root.entangledLanes |= 2; lanes; ) {
|
14679 | var lane = 1 << (31 - clz32(lanes));
|
14680 | root.entanglements[1] |= lane;
|
14681 | lanes &= ~lane;
|
14682 | }
|
14683 | ensureRootIsScheduled(fiber);
|
14684 | 0 === (executionContext & 6) &&
|
14685 | ((workInProgressRootRenderTargetTime = now$1() + 500),
|
14686 | flushSyncWorkAcrossRoots_impl(!1));
|
14687 | }
|
14688 | }
|
14689 | break;
|
14690 | case 13:
|
14691 | (root = enqueueConcurrentRenderForLane(fiber, 2)),
|
14692 | null !== root && scheduleUpdateOnFiber(root, fiber, 2),
|
14693 | flushSyncWork$1(),
|
14694 | markRetryLaneIfNotHydrated(fiber, 2);
|
14695 | }
|
14696 | fiber = findInstanceBlockingEvent(nativeEvent);
|
14697 | null === fiber &&
|
14698 | dispatchEventForPluginEventSystem(
|
14699 | domEventName,
|
14700 | eventSystemFlags,
|
14701 | nativeEvent,
|
14702 | return_targetInst,
|
14703 | targetContainer
|
14704 | );
|
14705 | if (fiber === blockedOn) break;
|
14706 | blockedOn = fiber;
|
14707 | }
|
14708 | null !== blockedOn && nativeEvent.stopPropagation();
|
14709 | } else
|
14710 | dispatchEventForPluginEventSystem(
|
14711 | domEventName,
|
14712 | eventSystemFlags,
|
14713 | nativeEvent,
|
14714 | null,
|
14715 | targetContainer
|
14716 | );
|
14717 | }
|
14718 | }
|
14719 | function findInstanceBlockingEvent(nativeEvent) {
|
14720 | nativeEvent = getEventTarget(nativeEvent);
|
14721 | return findInstanceBlockingTarget(nativeEvent);
|
14722 | }
|
14723 | var return_targetInst = null;
|
14724 | function findInstanceBlockingTarget(targetNode) {
|
14725 | return_targetInst = null;
|
14726 | targetNode = getClosestInstanceFromNode(targetNode);
|
14727 | if (null !== targetNode) {
|
14728 | var nearestMounted = getNearestMountedFiber(targetNode);
|
14729 | if (null === nearestMounted) targetNode = null;
|
14730 | else {
|
14731 | var tag = nearestMounted.tag;
|
14732 | if (13 === tag) {
|
14733 | targetNode = getSuspenseInstanceFromFiber(nearestMounted);
|
14734 | if (null !== targetNode) return targetNode;
|
14735 | targetNode = null;
|
14736 | } else if (3 === tag) {
|
14737 | if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
|
14738 | return 3 === nearestMounted.tag
|
14739 | ? nearestMounted.stateNode.containerInfo
|
14740 | : null;
|
14741 | targetNode = null;
|
14742 | } else nearestMounted !== targetNode && (targetNode = null);
|
14743 | }
|
14744 | }
|
14745 | return_targetInst = targetNode;
|
14746 | return null;
|
14747 | }
|
14748 | function getEventPriority(domEventName) {
|
14749 | switch (domEventName) {
|
14750 | case "cancel":
|
14751 | case "click":
|
14752 | case "close":
|
14753 | case "contextmenu":
|
14754 | case "copy":
|
14755 | case "cut":
|
14756 | case "auxclick":
|
14757 | case "dblclick":
|
14758 | case "dragend":
|
14759 | case "dragstart":
|
14760 | case "drop":
|
14761 | case "focusin":
|
14762 | case "focusout":
|
14763 | case "input":
|
14764 | case "invalid":
|
14765 | case "keydown":
|
14766 | case "keypress":
|
14767 | case "keyup":
|
14768 | case "mousedown":
|
14769 | case "mouseup":
|
14770 | case "paste":
|
14771 | case "pause":
|
14772 | case "play":
|
14773 | case "pointercancel":
|
14774 | case "pointerdown":
|
14775 | case "pointerup":
|
14776 | case "ratechange":
|
14777 | case "reset":
|
14778 | case "resize":
|
14779 | case "seeked":
|
14780 | case "submit":
|
14781 | case "touchcancel":
|
14782 | case "touchend":
|
14783 | case "touchstart":
|
14784 | case "volumechange":
|
14785 | case "change":
|
14786 | case "selectionchange":
|
14787 | case "textInput":
|
14788 | case "compositionstart":
|
14789 | case "compositionend":
|
14790 | case "compositionupdate":
|
14791 | case "beforeblur":
|
14792 | case "afterblur":
|
14793 | case "beforeinput":
|
14794 | case "blur":
|
14795 | case "fullscreenchange":
|
14796 | case "focus":
|
14797 | case "hashchange":
|
14798 | case "popstate":
|
14799 | case "select":
|
14800 | case "selectstart":
|
14801 | return 2;
|
14802 | case "drag":
|
14803 | case "dragenter":
|
14804 | case "dragexit":
|
14805 | case "dragleave":
|
14806 | case "dragover":
|
14807 | case "mousemove":
|
14808 | case "mouseout":
|
14809 | case "mouseover":
|
14810 | case "pointermove":
|
14811 | case "pointerout":
|
14812 | case "pointerover":
|
14813 | case "scroll":
|
14814 | case "toggle":
|
14815 | case "touchmove":
|
14816 | case "wheel":
|
14817 | case "mouseenter":
|
14818 | case "mouseleave":
|
14819 | case "pointerenter":
|
14820 | case "pointerleave":
|
14821 | return 8;
|
14822 | case "message":
|
14823 | switch (getCurrentPriorityLevel()) {
|
14824 | case ImmediatePriority:
|
14825 | return 2;
|
14826 | case UserBlockingPriority:
|
14827 | return 8;
|
14828 | case NormalPriority$1:
|
14829 | case LowPriority:
|
14830 | return 32;
|
14831 | case IdlePriority:
|
14832 | return 268435456;
|
14833 | default:
|
14834 | return 32;
|
14835 | }
|
14836 | default:
|
14837 | return 32;
|
14838 | }
|
14839 | }
|
14840 | var hasScheduledReplayAttempt = !1,
|
14841 | queuedFocus = null,
|
14842 | queuedDrag = null,
|
14843 | queuedMouse = null,
|
14844 | queuedPointers = new Map(),
|
14845 | queuedPointerCaptures = new Map(),
|
14846 | queuedExplicitHydrationTargets = [],
|
14847 | discreteReplayableEvents =
|
14848 | "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(
|
14849 | " "
|
14850 | );
|
14851 | function clearIfContinuousEvent(domEventName, nativeEvent) {
|
14852 | switch (domEventName) {
|
14853 | case "focusin":
|
14854 | case "focusout":
|
14855 | queuedFocus = null;
|
14856 | break;
|
14857 | case "dragenter":
|
14858 | case "dragleave":
|
14859 | queuedDrag = null;
|
14860 | break;
|
14861 | case "mouseover":
|
14862 | case "mouseout":
|
14863 | queuedMouse = null;
|
14864 | break;
|
14865 | case "pointerover":
|
14866 | case "pointerout":
|
14867 | queuedPointers.delete(nativeEvent.pointerId);
|
14868 | break;
|
14869 | case "gotpointercapture":
|
14870 | case "lostpointercapture":
|
14871 | queuedPointerCaptures.delete(nativeEvent.pointerId);
|
14872 | }
|
14873 | }
|
14874 | function accumulateOrCreateContinuousQueuedReplayableEvent(
|
14875 | existingQueuedEvent,
|
14876 | blockedOn,
|
14877 | domEventName,
|
14878 | eventSystemFlags,
|
14879 | targetContainer,
|
14880 | nativeEvent
|
14881 | ) {
|
14882 | if (
|
14883 | null === existingQueuedEvent ||
|
14884 | existingQueuedEvent.nativeEvent !== nativeEvent
|
14885 | )
|
14886 | return (
|
14887 | (existingQueuedEvent = {
|
14888 | blockedOn: blockedOn,
|
14889 | domEventName: domEventName,
|
14890 | eventSystemFlags: eventSystemFlags,
|
14891 | nativeEvent: nativeEvent,
|
14892 | targetContainers: [targetContainer]
|
14893 | }),
|
14894 | null !== blockedOn &&
|
14895 | ((blockedOn = getInstanceFromNode(blockedOn)),
|
14896 | null !== blockedOn && attemptContinuousHydration(blockedOn)),
|
14897 | existingQueuedEvent
|
14898 | );
|
14899 | existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
|
14900 | blockedOn = existingQueuedEvent.targetContainers;
|
14901 | null !== targetContainer &&
|
14902 | -1 === blockedOn.indexOf(targetContainer) &&
|
14903 | blockedOn.push(targetContainer);
|
14904 | return existingQueuedEvent;
|
14905 | }
|
14906 | function queueIfContinuousEvent(
|
14907 | blockedOn,
|
14908 | domEventName,
|
14909 | eventSystemFlags,
|
14910 | targetContainer,
|
14911 | nativeEvent
|
14912 | ) {
|
14913 | switch (domEventName) {
|
14914 | case "focusin":
|
14915 | return (
|
14916 | (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
|
14917 | queuedFocus,
|
14918 | blockedOn,
|
14919 | domEventName,
|
14920 | eventSystemFlags,
|
14921 | targetContainer,
|
14922 | nativeEvent
|
14923 | )),
|
14924 | !0
|
14925 | );
|
14926 | case "dragenter":
|
14927 | return (
|
14928 | (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
|
14929 | queuedDrag,
|
14930 | blockedOn,
|
14931 | domEventName,
|
14932 | eventSystemFlags,
|
14933 | targetContainer,
|
14934 | nativeEvent
|
14935 | )),
|
14936 | !0
|
14937 | );
|
14938 | case "mouseover":
|
14939 | return (
|
14940 | (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
|
14941 | queuedMouse,
|
14942 | blockedOn,
|
14943 | domEventName,
|
14944 | eventSystemFlags,
|
14945 | targetContainer,
|
14946 | nativeEvent
|
14947 | )),
|
14948 | !0
|
14949 | );
|
14950 | case "pointerover":
|
14951 | var pointerId = nativeEvent.pointerId;
|
14952 | queuedPointers.set(
|
14953 | pointerId,
|
14954 | accumulateOrCreateContinuousQueuedReplayableEvent(
|
14955 | queuedPointers.get(pointerId) || null,
|
14956 | blockedOn,
|
14957 | domEventName,
|
14958 | eventSystemFlags,
|
14959 | targetContainer,
|
14960 | nativeEvent
|
14961 | )
|
14962 | );
|
14963 | return !0;
|
14964 | case "gotpointercapture":
|
14965 | return (
|
14966 | (pointerId = nativeEvent.pointerId),
|
14967 | queuedPointerCaptures.set(
|
14968 | pointerId,
|
14969 | accumulateOrCreateContinuousQueuedReplayableEvent(
|
14970 | queuedPointerCaptures.get(pointerId) || null,
|
14971 | blockedOn,
|
14972 | domEventName,
|
14973 | eventSystemFlags,
|
14974 | targetContainer,
|
14975 | nativeEvent
|
14976 | )
|
14977 | ),
|
14978 | !0
|
14979 | );
|
14980 | }
|
14981 | return !1;
|
14982 | }
|
14983 | function attemptExplicitHydrationTarget(queuedTarget) {
|
14984 | var targetInst = getClosestInstanceFromNode(queuedTarget.target);
|
14985 | if (null !== targetInst) {
|
14986 | var nearestMounted = getNearestMountedFiber(targetInst);
|
14987 | if (null !== nearestMounted)
|
14988 | if (((targetInst = nearestMounted.tag), 13 === targetInst)) {
|
14989 | if (
|
14990 | ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),
|
14991 | null !== targetInst)
|
14992 | ) {
|
14993 | queuedTarget.blockedOn = targetInst;
|
14994 | runWithPriority(queuedTarget.priority, function () {
|
14995 | if (13 === nearestMounted.tag) {
|
14996 | var lane = requestUpdateLane(),
|
14997 | root = enqueueConcurrentRenderForLane(nearestMounted, lane);
|
14998 | null !== root &&
|
14999 | scheduleUpdateOnFiber(root, nearestMounted, lane);
|
15000 | markRetryLaneIfNotHydrated(nearestMounted, lane);
|
15001 | }
|
15002 | });
|
15003 | return;
|
15004 | }
|
15005 | } else if (
|
15006 | 3 === targetInst &&
|
15007 | nearestMounted.stateNode.current.memoizedState.isDehydrated
|
15008 | ) {
|
15009 | queuedTarget.blockedOn =
|
15010 | 3 === nearestMounted.tag
|
15011 | ? nearestMounted.stateNode.containerInfo
|
15012 | : null;
|
15013 | return;
|
15014 | }
|
15015 | }
|
15016 | queuedTarget.blockedOn = null;
|
15017 | }
|
15018 | function attemptReplayContinuousQueuedEvent(queuedEvent) {
|
15019 | if (null !== queuedEvent.blockedOn) return !1;
|
15020 | for (
|
15021 | var targetContainers = queuedEvent.targetContainers;
|
15022 | 0 < targetContainers.length;
|
15023 |
|
15024 | ) {
|
15025 | var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
|
15026 | if (null === nextBlockedOn) {
|
15027 | nextBlockedOn = queuedEvent.nativeEvent;
|
15028 | var nativeEventClone = new nextBlockedOn.constructor(
|
15029 | nextBlockedOn.type,
|
15030 | nextBlockedOn
|
15031 | );
|
15032 | currentReplayingEvent = nativeEventClone;
|
15033 | nextBlockedOn.target.dispatchEvent(nativeEventClone);
|
15034 | currentReplayingEvent = null;
|
15035 | } else
|
15036 | return (
|
15037 | (targetContainers = getInstanceFromNode(nextBlockedOn)),
|
15038 | null !== targetContainers &&
|
15039 | attemptContinuousHydration(targetContainers),
|
15040 | (queuedEvent.blockedOn = nextBlockedOn),
|
15041 | !1
|
15042 | );
|
15043 | targetContainers.shift();
|
15044 | }
|
15045 | return !0;
|
15046 | }
|
15047 | function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
|
15048 | attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
|
15049 | }
|
15050 | function replayUnblockedEvents() {
|
15051 | hasScheduledReplayAttempt = !1;
|
15052 | null !== queuedFocus &&
|
15053 | attemptReplayContinuousQueuedEvent(queuedFocus) &&
|
15054 | (queuedFocus = null);
|
15055 | null !== queuedDrag &&
|
15056 | attemptReplayContinuousQueuedEvent(queuedDrag) &&
|
15057 | (queuedDrag = null);
|
15058 | null !== queuedMouse &&
|
15059 | attemptReplayContinuousQueuedEvent(queuedMouse) &&
|
15060 | (queuedMouse = null);
|
15061 | queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
|
15062 | queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
|
15063 | }
|
15064 | function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
|
15065 | queuedEvent.blockedOn === unblocked &&
|
15066 | ((queuedEvent.blockedOn = null),
|
15067 | hasScheduledReplayAttempt ||
|
15068 | ((hasScheduledReplayAttempt = !0),
|
15069 | Scheduler.unstable_scheduleCallback(
|
15070 | Scheduler.unstable_NormalPriority,
|
15071 | replayUnblockedEvents
|
15072 | )));
|
15073 | }
|
15074 | var lastScheduledReplayQueue = null;
|
15075 | function scheduleReplayQueueIfNeeded(formReplayingQueue) {
|
15076 | lastScheduledReplayQueue !== formReplayingQueue &&
|
15077 | ((lastScheduledReplayQueue = formReplayingQueue),
|
15078 | Scheduler.unstable_scheduleCallback(
|
15079 | Scheduler.unstable_NormalPriority,
|
15080 | function () {
|
15081 | lastScheduledReplayQueue === formReplayingQueue &&
|
15082 | (lastScheduledReplayQueue = null);
|
15083 | for (var i = 0; i < formReplayingQueue.length; i += 3) {
|
15084 | var form = formReplayingQueue[i],
|
15085 | submitterOrAction = formReplayingQueue[i + 1],
|
15086 | formData = formReplayingQueue[i + 2];
|
15087 | if ("function" !== typeof submitterOrAction)
|
15088 | if (null === findInstanceBlockingTarget(submitterOrAction || form))
|
15089 | continue;
|
15090 | else break;
|
15091 | var formInst = getInstanceFromNode(form);
|
15092 | null !== formInst &&
|
15093 | (formReplayingQueue.splice(i, 3),
|
15094 | (i -= 3),
|
15095 | startHostTransition(
|
15096 | formInst,
|
15097 | {
|
15098 | pending: !0,
|
15099 | data: formData,
|
15100 | method: form.method,
|
15101 | action: submitterOrAction
|
15102 | },
|
15103 | submitterOrAction,
|
15104 | formData
|
15105 | ));
|
15106 | }
|
15107 | }
|
15108 | ));
|
15109 | }
|
15110 | function retryIfBlockedOn(unblocked) {
|
15111 | function unblock(queuedEvent) {
|
15112 | return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
|
15113 | }
|
15114 | null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
|
15115 | null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
|
15116 | null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
|
15117 | queuedPointers.forEach(unblock);
|
15118 | queuedPointerCaptures.forEach(unblock);
|
15119 | for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
|
15120 | var queuedTarget = queuedExplicitHydrationTargets[i];
|
15121 | queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
|
15122 | }
|
15123 | for (
|
15124 | ;
|
15125 | 0 < queuedExplicitHydrationTargets.length &&
|
15126 | ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);
|
15127 |
|
15128 | )
|
15129 | attemptExplicitHydrationTarget(i),
|
15130 | null === i.blockedOn && queuedExplicitHydrationTargets.shift();
|
15131 | i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
|
15132 | if (null != i)
|
15133 | for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
|
15134 | var form = i[queuedTarget],
|
15135 | submitterOrAction = i[queuedTarget + 1],
|
15136 | formProps = form[internalPropsKey] || null;
|
15137 | if ("function" === typeof submitterOrAction)
|
15138 | formProps || scheduleReplayQueueIfNeeded(i);
|
15139 | else if (formProps) {
|
15140 | var action = null;
|
15141 | if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
|
15142 | if (
|
15143 | ((form = submitterOrAction),
|
15144 | (formProps = submitterOrAction[internalPropsKey] || null))
|
15145 | )
|
15146 | action = formProps.formAction;
|
15147 | else {
|
15148 | if (null !== findInstanceBlockingTarget(form)) continue;
|
15149 | }
|
15150 | else action = formProps.action;
|
15151 | "function" === typeof action
|
15152 | ? (i[queuedTarget + 1] = action)
|
15153 | : (i.splice(queuedTarget, 3), (queuedTarget -= 3));
|
15154 | scheduleReplayQueueIfNeeded(i);
|
15155 | }
|
15156 | }
|
15157 | }
|
15158 | function ReactDOMRoot(internalRoot) {
|
15159 | this._internalRoot = internalRoot;
|
15160 | }
|
15161 | ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
|
15162 | function (children) {
|
15163 | var root = this._internalRoot;
|
15164 | if (null === root) throw Error(formatProdErrorMessage(409));
|
15165 | var current = root.current,
|
15166 | lane = requestUpdateLane();
|
15167 | updateContainerImpl(current, lane, children, root, null, null);
|
15168 | };
|
15169 | ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
|
15170 | function () {
|
15171 | var root = this._internalRoot;
|
15172 | if (null !== root) {
|
15173 | this._internalRoot = null;
|
15174 | var container = root.containerInfo;
|
15175 | 0 === root.tag && flushPassiveEffects();
|
15176 | updateContainerImpl(root.current, 2, null, root, null, null);
|
15177 | flushSyncWork$1();
|
15178 | container[internalContainerInstanceKey] = null;
|
15179 | }
|
15180 | };
|
15181 | function ReactDOMHydrationRoot(internalRoot) {
|
15182 | this._internalRoot = internalRoot;
|
15183 | }
|
15184 | ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
|
15185 | if (target) {
|
15186 | var updatePriority = resolveUpdatePriority();
|
15187 | target = { blockedOn: null, target: target, priority: updatePriority };
|
15188 | for (
|
15189 | var i = 0;
|
15190 | i < queuedExplicitHydrationTargets.length &&
|
15191 | 0 !== updatePriority &&
|
15192 | updatePriority < queuedExplicitHydrationTargets[i].priority;
|
15193 | i++
|
15194 | );
|
15195 | queuedExplicitHydrationTargets.splice(i, 0, target);
|
15196 | 0 === i && attemptExplicitHydrationTarget(target);
|
15197 | }
|
15198 | };
|
15199 | ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
|
15200 | var fiber = componentOrElement._reactInternals;
|
15201 | if (void 0 === fiber) {
|
15202 | if ("function" === typeof componentOrElement.render)
|
15203 | throw Error(formatProdErrorMessage(188));
|
15204 | componentOrElement = Object.keys(componentOrElement).join(",");
|
15205 | throw Error(formatProdErrorMessage(268, componentOrElement));
|
15206 | }
|
15207 | componentOrElement = findCurrentHostFiber(fiber);
|
15208 | componentOrElement =
|
15209 | null === componentOrElement ? null : componentOrElement.stateNode;
|
15210 | return componentOrElement;
|
15211 | };
|
15212 | var devToolsConfig$jscomp$inline_1728 = {
|
15213 | findFiberByHostInstance: getClosestInstanceFromNode,
|
15214 | bundleType: 0,
|
15215 | version: "19.0.0-beta-4508873393-20240430",
|
15216 | rendererPackageName: "react-dom"
|
15217 | };
|
15218 | (function (internals) {
|
15219 | if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
|
15220 | var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
15221 | if (hook.isDisabled || !hook.supportsFiber) return !0;
|
15222 | try {
|
15223 | (internals = assign({}, internals, {
|
15224 | getLaneLabelMap: getLaneLabelMap,
|
15225 | injectProfilingHooks: injectProfilingHooks
|
15226 | })),
|
15227 | (rendererID = hook.inject(internals)),
|
15228 | (injectedHook = hook);
|
15229 | } catch (err) {}
|
15230 | return hook.checkDCE ? !0 : !1;
|
15231 | })({
|
15232 | bundleType: devToolsConfig$jscomp$inline_1728.bundleType,
|
15233 | version: devToolsConfig$jscomp$inline_1728.version,
|
15234 | rendererPackageName: devToolsConfig$jscomp$inline_1728.rendererPackageName,
|
15235 | rendererConfig: devToolsConfig$jscomp$inline_1728.rendererConfig,
|
15236 | overrideHookState: null,
|
15237 | overrideHookStateDeletePath: null,
|
15238 | overrideHookStateRenamePath: null,
|
15239 | overrideProps: null,
|
15240 | overridePropsDeletePath: null,
|
15241 | overridePropsRenamePath: null,
|
15242 | setErrorHandler: null,
|
15243 | setSuspenseHandler: null,
|
15244 | scheduleUpdate: null,
|
15245 | currentDispatcherRef: ReactSharedInternals,
|
15246 | findHostInstanceByFiber: function (fiber) {
|
15247 | fiber = findCurrentHostFiber(fiber);
|
15248 | return null === fiber ? null : fiber.stateNode;
|
15249 | },
|
15250 | findFiberByHostInstance:
|
15251 | devToolsConfig$jscomp$inline_1728.findFiberByHostInstance ||
|
15252 | emptyFindFiberByHostInstance,
|
15253 | findHostInstancesForRefresh: null,
|
15254 | scheduleRefresh: null,
|
15255 | scheduleRoot: null,
|
15256 | setRefreshHandler: null,
|
15257 | getCurrentFiber: null,
|
15258 | reconcilerVersion: "19.0.0-beta-4508873393-20240430"
|
15259 | });
|
15260 | function noop() {}
|
15261 | function getCrossOriginStringAs(as, input) {
|
15262 | if ("font" === as) return "";
|
15263 | if ("string" === typeof input)
|
15264 | return "use-credentials" === input ? input : "";
|
15265 | }
|
15266 | exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = {
|
15267 | d: {
|
15268 | f: noop,
|
15269 | r: function () {
|
15270 | throw Error(formatProdErrorMessage(522));
|
15271 | },
|
15272 | D: noop,
|
15273 | C: noop,
|
15274 | L: noop,
|
15275 | m: noop,
|
15276 | X: noop,
|
15277 | S: noop,
|
15278 | M: noop
|
15279 | },
|
15280 | p: 0,
|
15281 | findDOMNode: null
|
15282 | };
|
15283 | exports.createPortal = function (children, container) {
|
15284 | var key =
|
15285 | 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
|
15286 | if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
|
15287 | return createPortal$1(children, container, null, key);
|
15288 | };
|
15289 | exports.createRoot = function (container, options) {
|
15290 | if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
|
15291 | var isStrictMode = !1,
|
15292 | identifierPrefix = "",
|
15293 | onUncaughtError = defaultOnUncaughtError,
|
15294 | onCaughtError = defaultOnCaughtError,
|
15295 | onRecoverableError = defaultOnRecoverableError,
|
15296 | transitionCallbacks = null;
|
15297 | null !== options &&
|
15298 | void 0 !== options &&
|
15299 | (!0 === options.unstable_strictMode && (isStrictMode = !0),
|
15300 | void 0 !== options.identifierPrefix &&
|
15301 | (identifierPrefix = options.identifierPrefix),
|
15302 | void 0 !== options.onUncaughtError &&
|
15303 | (onUncaughtError = options.onUncaughtError),
|
15304 | void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
|
15305 | void 0 !== options.onRecoverableError &&
|
15306 | (onRecoverableError = options.onRecoverableError),
|
15307 | void 0 !== options.unstable_transitionCallbacks &&
|
15308 | (transitionCallbacks = options.unstable_transitionCallbacks));
|
15309 | options = createFiberRoot(
|
15310 | container,
|
15311 | 1,
|
15312 | !1,
|
15313 | null,
|
15314 | null,
|
15315 | isStrictMode,
|
15316 | !1,
|
15317 | identifierPrefix,
|
15318 | onUncaughtError,
|
15319 | onCaughtError,
|
15320 | onRecoverableError,
|
15321 | transitionCallbacks,
|
15322 | null
|
15323 | );
|
15324 | container[internalContainerInstanceKey] = options.current;
|
15325 | listenToAllSupportedEvents(
|
15326 | 8 === container.nodeType ? container.parentNode : container
|
15327 | );
|
15328 | return new ReactDOMRoot(options);
|
15329 | };
|
15330 | exports.flushSync = function (fn) {
|
15331 | var previousTransition = ReactSharedInternals.T,
|
15332 | previousUpdatePriority = ReactDOMSharedInternals.p;
|
15333 | try {
|
15334 | if (((ReactSharedInternals.T = null), (ReactDOMSharedInternals.p = 2), fn))
|
15335 | return fn();
|
15336 | } finally {
|
15337 | (ReactSharedInternals.T = previousTransition),
|
15338 | (ReactDOMSharedInternals.p = previousUpdatePriority),
|
15339 | ReactDOMSharedInternals.d.f();
|
15340 | }
|
15341 | };
|
15342 | exports.hydrateRoot = function (container, initialChildren, options) {
|
15343 | if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
|
15344 | var isStrictMode = !1,
|
15345 | identifierPrefix = "",
|
15346 | onUncaughtError = defaultOnUncaughtError,
|
15347 | onCaughtError = defaultOnCaughtError,
|
15348 | onRecoverableError = defaultOnRecoverableError,
|
15349 | transitionCallbacks = null,
|
15350 | formState = null;
|
15351 | null !== options &&
|
15352 | void 0 !== options &&
|
15353 | (!0 === options.unstable_strictMode && (isStrictMode = !0),
|
15354 | void 0 !== options.identifierPrefix &&
|
15355 | (identifierPrefix = options.identifierPrefix),
|
15356 | void 0 !== options.onUncaughtError &&
|
15357 | (onUncaughtError = options.onUncaughtError),
|
15358 | void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
|
15359 | void 0 !== options.onRecoverableError &&
|
15360 | (onRecoverableError = options.onRecoverableError),
|
15361 | void 0 !== options.unstable_transitionCallbacks &&
|
15362 | (transitionCallbacks = options.unstable_transitionCallbacks),
|
15363 | void 0 !== options.formState && (formState = options.formState));
|
15364 | initialChildren = createFiberRoot(
|
15365 | container,
|
15366 | 1,
|
15367 | !0,
|
15368 | initialChildren,
|
15369 | null != options ? options : null,
|
15370 | isStrictMode,
|
15371 | !1,
|
15372 | identifierPrefix,
|
15373 | onUncaughtError,
|
15374 | onCaughtError,
|
15375 | onRecoverableError,
|
15376 | transitionCallbacks,
|
15377 | formState
|
15378 | );
|
15379 | initialChildren.context = getContextForSubtree(null);
|
15380 | options = initialChildren.current;
|
15381 | isStrictMode = requestUpdateLane();
|
15382 | identifierPrefix = createUpdate(isStrictMode);
|
15383 | identifierPrefix.callback = null;
|
15384 | enqueueUpdate(options, identifierPrefix, isStrictMode);
|
15385 | initialChildren.current.lanes = isStrictMode;
|
15386 | markRootUpdated(initialChildren, isStrictMode);
|
15387 | ensureRootIsScheduled(initialChildren);
|
15388 | container[internalContainerInstanceKey] = initialChildren.current;
|
15389 | listenToAllSupportedEvents(container);
|
15390 | return new ReactDOMHydrationRoot(initialChildren);
|
15391 | };
|
15392 | exports.preconnect = function (href, options) {
|
15393 | "string" === typeof href &&
|
15394 | (options
|
15395 | ? ((options = options.crossOrigin),
|
15396 | (options =
|
15397 | "string" === typeof options
|
15398 | ? "use-credentials" === options
|
15399 | ? options
|
15400 | : ""
|
15401 | : void 0))
|
15402 | : (options = null),
|
15403 | ReactDOMSharedInternals.d.C(href, options));
|
15404 | };
|
15405 | exports.prefetchDNS = function (href) {
|
15406 | "string" === typeof href && ReactDOMSharedInternals.d.D(href);
|
15407 | };
|
15408 | exports.preinit = function (href, options) {
|
15409 | if ("string" === typeof href && options && "string" === typeof options.as) {
|
15410 | var as = options.as,
|
15411 | crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
|
15412 | integrity =
|
15413 | "string" === typeof options.integrity ? options.integrity : void 0,
|
15414 | fetchPriority =
|
15415 | "string" === typeof options.fetchPriority
|
15416 | ? options.fetchPriority
|
15417 | : void 0;
|
15418 | "style" === as
|
15419 | ? ReactDOMSharedInternals.d.S(
|
15420 | href,
|
15421 | "string" === typeof options.precedence ? options.precedence : void 0,
|
15422 | {
|
15423 | crossOrigin: crossOrigin,
|
15424 | integrity: integrity,
|
15425 | fetchPriority: fetchPriority
|
15426 | }
|
15427 | )
|
15428 | : "script" === as &&
|
15429 | ReactDOMSharedInternals.d.X(href, {
|
15430 | crossOrigin: crossOrigin,
|
15431 | integrity: integrity,
|
15432 | fetchPriority: fetchPriority,
|
15433 | nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
15434 | });
|
15435 | }
|
15436 | };
|
15437 | exports.preinitModule = function (href, options) {
|
15438 | if ("string" === typeof href)
|
15439 | if ("object" === typeof options && null !== options) {
|
15440 | if (null == options.as || "script" === options.as) {
|
15441 | var crossOrigin = getCrossOriginStringAs(
|
15442 | options.as,
|
15443 | options.crossOrigin
|
15444 | );
|
15445 | ReactDOMSharedInternals.d.M(href, {
|
15446 | crossOrigin: crossOrigin,
|
15447 | integrity:
|
15448 | "string" === typeof options.integrity ? options.integrity : void 0,
|
15449 | nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
15450 | });
|
15451 | }
|
15452 | } else null == options && ReactDOMSharedInternals.d.M(href);
|
15453 | };
|
15454 | exports.preload = function (href, options) {
|
15455 | if (
|
15456 | "string" === typeof href &&
|
15457 | "object" === typeof options &&
|
15458 | null !== options &&
|
15459 | "string" === typeof options.as
|
15460 | ) {
|
15461 | var as = options.as,
|
15462 | crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
|
15463 | ReactDOMSharedInternals.d.L(href, as, {
|
15464 | crossOrigin: crossOrigin,
|
15465 | integrity:
|
15466 | "string" === typeof options.integrity ? options.integrity : void 0,
|
15467 | nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
15468 | type: "string" === typeof options.type ? options.type : void 0,
|
15469 | fetchPriority:
|
15470 | "string" === typeof options.fetchPriority
|
15471 | ? options.fetchPriority
|
15472 | : void 0,
|
15473 | referrerPolicy:
|
15474 | "string" === typeof options.referrerPolicy
|
15475 | ? options.referrerPolicy
|
15476 | : void 0,
|
15477 | imageSrcSet:
|
15478 | "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
|
15479 | imageSizes:
|
15480 | "string" === typeof options.imageSizes ? options.imageSizes : void 0,
|
15481 | media: "string" === typeof options.media ? options.media : void 0
|
15482 | });
|
15483 | }
|
15484 | };
|
15485 | exports.preloadModule = function (href, options) {
|
15486 | if ("string" === typeof href)
|
15487 | if (options) {
|
15488 | var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
|
15489 | ReactDOMSharedInternals.d.m(href, {
|
15490 | as:
|
15491 | "string" === typeof options.as && "script" !== options.as
|
15492 | ? options.as
|
15493 | : void 0,
|
15494 | crossOrigin: crossOrigin,
|
15495 | integrity:
|
15496 | "string" === typeof options.integrity ? options.integrity : void 0
|
15497 | });
|
15498 | } else ReactDOMSharedInternals.d.m(href);
|
15499 | };
|
15500 | exports.requestFormReset = function (form) {
|
15501 | ReactDOMSharedInternals.d.r(form);
|
15502 | };
|
15503 | exports.unstable_batchedUpdates = function (fn, a) {
|
15504 | return fn(a);
|
15505 | };
|
15506 | exports.useFormState = function (action, initialState, permalink) {
|
15507 | return ReactSharedInternals.H.useFormState(action, initialState, permalink);
|
15508 | };
|
15509 | exports.useFormStatus = function () {
|
15510 | return ReactSharedInternals.H.useHostTransitionStatus();
|
15511 | };
|
15512 | exports.version = "19.0.0-beta-4508873393-20240430";
|
15513 | "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
15514 | "function" ===
|
15515 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
15516 | __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|