PluginProbe
Gutenberg / 23.7.2
Gutenberg v23.7.2
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / vendors / react-dom-19.js

react-dom-19.js in Gutenberg 23.7.2, at build/scripts/vendors/react-dom-19.js

20,696 lines 1.0 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var ReactDOM = (() => {
2 function __wpWarnCompat(key) {var w = __wpWarnCompat.warned || (__wpWarnCompat.warned = {});if (w[key]) return;w[key] = true;var messages = {"legacy-element":"A React element created by an older React runtime (React 17/18) was detected and is handled by a compatibility patch. This usually means a bundled package ships its own React; align it with React 19.","inert":"An empty-string `inert` attribute was used. React 19 treats `inert` as a boolean, so the value was coerced to `true` by a compatibility patch. Pass `inert={true}` instead."};if (typeof console !== "undefined" && console.warn) {console.warn("[wordpress-react-19] " + messages[key]);}}
3
4 var __create = Object.create;
5 var __defProp = Object.defineProperty;
6 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7 var __getOwnPropNames = Object.getOwnPropertyNames;
8 var __getProtoOf = Object.getPrototypeOf;
9 var __hasOwnProp = Object.prototype.hasOwnProperty;
10 var __esm = (fn, res) => function __init() {
11 return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12 };
13 var __commonJS = (cb, mod) => function __require() {
14 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15 };
16 var __export = (target, all) => {
17 for (var name in all)
18 __defProp(target, name, { get: all[name], enumerable: true });
19 };
20 var __copyProps = (to, from, except, desc) => {
21 if (from && typeof from === "object" || typeof from === "function") {
22 for (let key of __getOwnPropNames(from))
23 if (!__hasOwnProp.call(to, key) && key !== except)
24 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25 }
26 return to;
27 };
28 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29 // If the importer is in node compatibility mode or this is not an ESM
30 // file that has been converted to a CommonJS file using a Babel-
31 // compatible transform (i.e. "__esModule" has not been set), then set
32 // "default" to the CommonJS "module.exports" for node compatibility.
33 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34 mod
35 ));
36 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
38 // ../react-19/warn-compat.js
39 var warn_compat_exports = {};
40 __export(warn_compat_exports, {
41 warnCompat: () => warnCompat
42 });
43 function warnCompat(key, message) {
44 if (warned.has(key)) {
45 return;
46 }
47 warned.add(key);
48 if (typeof console !== "undefined" && console.warn) {
49 console.warn(`${PREFIX} ${message}`);
50 }
51 }
52 var PREFIX, warned;
53 var init_warn_compat = __esm({
54 "../react-19/warn-compat.js"() {
55 PREFIX = "[wordpress-react-19]";
56 warned = /* @__PURE__ */ new Set();
57 }
58 });
59
60 // react-external:react
61 var require_react = __commonJS({
62 "react-external:react"(exports, module) {
63 module.exports = globalThis.React;
64 }
65 });
66
67 // ../react-19/node_modules/react-dom/cjs/react-dom.development.js
68 var require_react_dom_development = __commonJS({
69 "../react-19/node_modules/react-dom/cjs/react-dom.development.js"(exports) {
70 "use strict";
71 (function() {
72 function noop() {
73 }
74 function testStringCoercion(value) {
75 return "" + value;
76 }
77 function createPortal$1(children, containerInfo, implementation) {
78 var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
79 try {
80 testStringCoercion(key);
81 var JSCompiler_inline_result = false;
82 } catch (e) {
83 JSCompiler_inline_result = true;
84 }
85 JSCompiler_inline_result && (console.error(
86 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
87 "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
88 ), testStringCoercion(key));
89 return {
90 $$typeof: REACT_PORTAL_TYPE,
91 key: null == key ? null : "" + key,
92 children,
93 containerInfo,
94 implementation
95 };
96 }
97 function getCrossOriginStringAs(as, input) {
98 if ("font" === as) return "";
99 if ("string" === typeof input)
100 return "use-credentials" === input ? input : "";
101 }
102 function getValueDescriptorExpectingObjectForWarning(thing) {
103 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
104 }
105 function getValueDescriptorExpectingEnumForWarning(thing) {
106 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
107 }
108 function resolveDispatcher() {
109 var dispatcher = ReactSharedInternals.H;
110 null === dispatcher && console.error(
111 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
112 );
113 return dispatcher;
114 }
115 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
116 var React = require_react(), Internals = {
117 d: {
118 f: noop,
119 r: function() {
120 throw Error(
121 "Invalid form element. requestFormReset must be passed a form that was rendered by React."
122 );
123 },
124 D: noop,
125 C: noop,
126 L: noop,
127 m: noop,
128 X: noop,
129 S: noop,
130 M: noop
131 },
132 p: 0,
133 findDOMNode: null
134 }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
135 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
136 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
137 );
138 exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
139 exports.createPortal = function(children, container) {
140 var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
141 if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
142 throw Error("Target container is not a DOM element.");
143 return createPortal$1(children, container, null, key);
144 };
145 exports.flushSync = function(fn) {
146 var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
147 try {
148 if (ReactSharedInternals.T = null, Internals.p = 2, fn)
149 return fn();
150 } finally {
151 ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
152 "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
153 );
154 }
155 };
156 exports.preconnect = function(href, options) {
157 "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
158 "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
159 getValueDescriptorExpectingEnumForWarning(options)
160 ) : null != options && "string" !== typeof options.crossOrigin && console.error(
161 "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
162 getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
163 ) : console.error(
164 "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
165 getValueDescriptorExpectingObjectForWarning(href)
166 );
167 "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
168 };
169 exports.prefetchDNS = function(href) {
170 if ("string" !== typeof href || !href)
171 console.error(
172 "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
173 getValueDescriptorExpectingObjectForWarning(href)
174 );
175 else if (1 < arguments.length) {
176 var options = arguments[1];
177 "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
178 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
179 getValueDescriptorExpectingEnumForWarning(options)
180 ) : console.error(
181 "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
182 getValueDescriptorExpectingEnumForWarning(options)
183 );
184 }
185 "string" === typeof href && Internals.d.D(href);
186 };
187 exports.preinit = function(href, options) {
188 "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
189 "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
190 getValueDescriptorExpectingEnumForWarning(options)
191 ) : "style" !== options.as && "script" !== options.as && console.error(
192 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
193 getValueDescriptorExpectingEnumForWarning(options.as)
194 ) : console.error(
195 "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
196 getValueDescriptorExpectingObjectForWarning(href)
197 );
198 if ("string" === typeof href && options && "string" === typeof options.as) {
199 var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
200 "style" === as ? Internals.d.S(
201 href,
202 "string" === typeof options.precedence ? options.precedence : void 0,
203 {
204 crossOrigin,
205 integrity,
206 fetchPriority
207 }
208 ) : "script" === as && Internals.d.X(href, {
209 crossOrigin,
210 integrity,
211 fetchPriority,
212 nonce: "string" === typeof options.nonce ? options.nonce : void 0
213 });
214 }
215 };
216 exports.preinitModule = function(href, options) {
217 var encountered = "";
218 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
219 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
220 if (encountered)
221 console.error(
222 "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
223 encountered
224 );
225 else
226 switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
227 case "script":
228 break;
229 default:
230 encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
231 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
232 encountered,
233 href
234 );
235 }
236 if ("string" === typeof href)
237 if ("object" === typeof options && null !== options) {
238 if (null == options.as || "script" === options.as)
239 encountered = getCrossOriginStringAs(
240 options.as,
241 options.crossOrigin
242 ), Internals.d.M(href, {
243 crossOrigin: encountered,
244 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
245 nonce: "string" === typeof options.nonce ? options.nonce : void 0
246 });
247 } else null == options && Internals.d.M(href);
248 };
249 exports.preload = function(href, options) {
250 var encountered = "";
251 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
252 null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
253 encountered && console.error(
254 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
255 encountered
256 );
257 if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
258 encountered = options.as;
259 var crossOrigin = getCrossOriginStringAs(
260 encountered,
261 options.crossOrigin
262 );
263 Internals.d.L(href, encountered, {
264 crossOrigin,
265 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
266 nonce: "string" === typeof options.nonce ? options.nonce : void 0,
267 type: "string" === typeof options.type ? options.type : void 0,
268 fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
269 referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
270 imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
271 imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
272 media: "string" === typeof options.media ? options.media : void 0
273 });
274 }
275 };
276 exports.preloadModule = function(href, options) {
277 var encountered = "";
278 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
279 void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
280 encountered && console.error(
281 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
282 encountered
283 );
284 "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
285 options.as,
286 options.crossOrigin
287 ), Internals.d.m(href, {
288 as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
289 crossOrigin: encountered,
290 integrity: "string" === typeof options.integrity ? options.integrity : void 0
291 })) : Internals.d.m(href));
292 };
293 exports.requestFormReset = function(form) {
294 Internals.d.r(form);
295 };
296 exports.unstable_batchedUpdates = function(fn, a) {
297 return fn(a);
298 };
299 exports.useFormState = function(action, initialState, permalink) {
300 return resolveDispatcher().useFormState(action, initialState, permalink);
301 };
302 exports.useFormStatus = function() {
303 return resolveDispatcher().useHostTransitionStatus();
304 };
305 exports.version = "19.2.7";
306 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
307 })();
308 }
309 });
310
311 // ../react-19/node_modules/react-dom/index.js
312 var require_react_dom = __commonJS({
313 "../react-19/node_modules/react-dom/index.js"(exports, module) {
314 "use strict";
315 if (false) {
316 checkDCE();
317 module.exports = null;
318 } else {
319 module.exports = require_react_dom_development();
320 }
321 }
322 });
323
324 // ../react-19/node_modules/scheduler/cjs/scheduler.development.js
325 var require_scheduler_development = __commonJS({
326 "../react-19/node_modules/scheduler/cjs/scheduler.development.js"(exports) {
327 "use strict";
328 (function() {
329 function performWorkUntilDeadline() {
330 needsPaint = false;
331 if (isMessageLoopRunning) {
332 var currentTime = exports.unstable_now();
333 startTime = currentTime;
334 var hasMoreWork = true;
335 try {
336 a: {
337 isHostCallbackScheduled = false;
338 isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
339 isPerformingWork = true;
340 var previousPriorityLevel = currentPriorityLevel;
341 try {
342 b: {
343 advanceTimers(currentTime);
344 for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
345 var callback = currentTask.callback;
346 if ("function" === typeof callback) {
347 currentTask.callback = null;
348 currentPriorityLevel = currentTask.priorityLevel;
349 var continuationCallback = callback(
350 currentTask.expirationTime <= currentTime
351 );
352 currentTime = exports.unstable_now();
353 if ("function" === typeof continuationCallback) {
354 currentTask.callback = continuationCallback;
355 advanceTimers(currentTime);
356 hasMoreWork = true;
357 break b;
358 }
359 currentTask === peek(taskQueue) && pop(taskQueue);
360 advanceTimers(currentTime);
361 } else pop(taskQueue);
362 currentTask = peek(taskQueue);
363 }
364 if (null !== currentTask) hasMoreWork = true;
365 else {
366 var firstTimer = peek(timerQueue);
367 null !== firstTimer && requestHostTimeout(
368 handleTimeout,
369 firstTimer.startTime - currentTime
370 );
371 hasMoreWork = false;
372 }
373 }
374 break a;
375 } finally {
376 currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
377 }
378 hasMoreWork = void 0;
379 }
380 } finally {
381 hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
382 }
383 }
384 }
385 function push(heap, node) {
386 var index = heap.length;
387 heap.push(node);
388 a: for (; 0 < index; ) {
389 var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
390 if (0 < compare(parent, node))
391 heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
392 else break a;
393 }
394 }
395 function peek(heap) {
396 return 0 === heap.length ? null : heap[0];
397 }
398 function pop(heap) {
399 if (0 === heap.length) return null;
400 var first = heap[0], last = heap.pop();
401 if (last !== first) {
402 heap[0] = last;
403 a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
404 var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
405 if (0 > compare(left, last))
406 rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
407 else if (rightIndex < length && 0 > compare(right, last))
408 heap[index] = right, heap[rightIndex] = last, index = rightIndex;
409 else break a;
410 }
411 }
412 return first;
413 }
414 function compare(a, b) {
415 var diff = a.sortIndex - b.sortIndex;
416 return 0 !== diff ? diff : a.id - b.id;
417 }
418 function advanceTimers(currentTime) {
419 for (var timer = peek(timerQueue); null !== timer; ) {
420 if (null === timer.callback) pop(timerQueue);
421 else if (timer.startTime <= currentTime)
422 pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
423 else break;
424 timer = peek(timerQueue);
425 }
426 }
427 function handleTimeout(currentTime) {
428 isHostTimeoutScheduled = false;
429 advanceTimers(currentTime);
430 if (!isHostCallbackScheduled)
431 if (null !== peek(taskQueue))
432 isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
433 else {
434 var firstTimer = peek(timerQueue);
435 null !== firstTimer && requestHostTimeout(
436 handleTimeout,
437 firstTimer.startTime - currentTime
438 );
439 }
440 }
441 function shouldYieldToHost() {
442 return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
443 }
444 function requestHostTimeout(callback, ms) {
445 taskTimeoutID = localSetTimeout(function() {
446 callback(exports.unstable_now());
447 }, ms);
448 }
449 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
450 exports.unstable_now = void 0;
451 if ("object" === typeof performance && "function" === typeof performance.now) {
452 var localPerformance = performance;
453 exports.unstable_now = function() {
454 return localPerformance.now();
455 };
456 } else {
457 var localDate = Date, initialTime = localDate.now();
458 exports.unstable_now = function() {
459 return localDate.now() - initialTime;
460 };
461 }
462 var taskQueue = [], timerQueue = [], taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = false, isHostCallbackScheduled = false, isHostTimeoutScheduled = false, needsPaint = false, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, isMessageLoopRunning = false, taskTimeoutID = -1, frameInterval = 5, startTime = -1;
463 if ("function" === typeof localSetImmediate)
464 var schedulePerformWorkUntilDeadline = function() {
465 localSetImmediate(performWorkUntilDeadline);
466 };
467 else if ("undefined" !== typeof MessageChannel) {
468 var channel = new MessageChannel(), port = channel.port2;
469 channel.port1.onmessage = performWorkUntilDeadline;
470 schedulePerformWorkUntilDeadline = function() {
471 port.postMessage(null);
472 };
473 } else
474 schedulePerformWorkUntilDeadline = function() {
475 localSetTimeout(performWorkUntilDeadline, 0);
476 };
477 exports.unstable_IdlePriority = 5;
478 exports.unstable_ImmediatePriority = 1;
479 exports.unstable_LowPriority = 4;
480 exports.unstable_NormalPriority = 3;
481 exports.unstable_Profiling = null;
482 exports.unstable_UserBlockingPriority = 2;
483 exports.unstable_cancelCallback = function(task) {
484 task.callback = null;
485 };
486 exports.unstable_forceFrameRate = function(fps) {
487 0 > fps || 125 < fps ? console.error(
488 "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
489 ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
490 };
491 exports.unstable_getCurrentPriorityLevel = function() {
492 return currentPriorityLevel;
493 };
494 exports.unstable_next = function(eventHandler) {
495 switch (currentPriorityLevel) {
496 case 1:
497 case 2:
498 case 3:
499 var priorityLevel = 3;
500 break;
501 default:
502 priorityLevel = currentPriorityLevel;
503 }
504 var previousPriorityLevel = currentPriorityLevel;
505 currentPriorityLevel = priorityLevel;
506 try {
507 return eventHandler();
508 } finally {
509 currentPriorityLevel = previousPriorityLevel;
510 }
511 };
512 exports.unstable_requestPaint = function() {
513 needsPaint = true;
514 };
515 exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
516 switch (priorityLevel) {
517 case 1:
518 case 2:
519 case 3:
520 case 4:
521 case 5:
522 break;
523 default:
524 priorityLevel = 3;
525 }
526 var previousPriorityLevel = currentPriorityLevel;
527 currentPriorityLevel = priorityLevel;
528 try {
529 return eventHandler();
530 } finally {
531 currentPriorityLevel = previousPriorityLevel;
532 }
533 };
534 exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
535 var currentTime = exports.unstable_now();
536 "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
537 switch (priorityLevel) {
538 case 1:
539 var timeout = -1;
540 break;
541 case 2:
542 timeout = 250;
543 break;
544 case 5:
545 timeout = 1073741823;
546 break;
547 case 4:
548 timeout = 1e4;
549 break;
550 default:
551 timeout = 5e3;
552 }
553 timeout = options + timeout;
554 priorityLevel = {
555 id: taskIdCounter++,
556 callback,
557 priorityLevel,
558 startTime: options,
559 expirationTime: timeout,
560 sortIndex: -1
561 };
562 options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
563 return priorityLevel;
564 };
565 exports.unstable_shouldYield = shouldYieldToHost;
566 exports.unstable_wrapCallback = function(callback) {
567 var parentPriorityLevel = currentPriorityLevel;
568 return function() {
569 var previousPriorityLevel = currentPriorityLevel;
570 currentPriorityLevel = parentPriorityLevel;
571 try {
572 return callback.apply(this, arguments);
573 } finally {
574 currentPriorityLevel = previousPriorityLevel;
575 }
576 };
577 };
578 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
579 })();
580 }
581 });
582
583 // ../react-19/node_modules/scheduler/index.js
584 var require_scheduler = __commonJS({
585 "../react-19/node_modules/scheduler/index.js"(exports, module) {
586 "use strict";
587 if (false) {
588 module.exports = null;
589 } else {
590 module.exports = require_scheduler_development();
591 }
592 }
593 });
594
595 // ../react-19/node_modules/react-dom/cjs/react-dom-client.development.js
596 var require_react_dom_client_development = __commonJS({
597 "../react-19/node_modules/react-dom/cjs/react-dom-client.development.js"(exports) {
598 "use strict";
599 (function() {
600 function findHook(fiber, id) {
601 for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
602 fiber = fiber.next, id--;
603 return fiber;
604 }
605 function copyWithSetImpl(obj, path, index, value) {
606 if (index >= path.length) return value;
607 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
608 updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
609 return updated;
610 }
611 function copyWithRename(obj, oldPath, newPath) {
612 if (oldPath.length !== newPath.length)
613 console.warn("copyWithRename() expects paths of the same length");
614 else {
615 for (var i = 0; i < newPath.length - 1; i++)
616 if (oldPath[i] !== newPath[i]) {
617 console.warn(
618 "copyWithRename() expects paths to be the same except for the deepest key"
619 );
620 return;
621 }
622 return copyWithRenameImpl(obj, oldPath, newPath, 0);
623 }
624 }
625 function copyWithRenameImpl(obj, oldPath, newPath, index) {
626 var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
627 index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
628 obj[oldKey],
629 oldPath,
630 newPath,
631 index + 1
632 );
633 return updated;
634 }
635 function copyWithDeleteImpl(obj, path, index) {
636 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
637 if (index + 1 === path.length)
638 return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
639 updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
640 return updated;
641 }
642 function shouldSuspendImpl() {
643 return false;
644 }
645 function shouldErrorImpl() {
646 return null;
647 }
648 function warnInvalidHookAccess() {
649 console.error(
650 "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
651 );
652 }
653 function warnInvalidContextAccess() {
654 console.error(
655 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
656 );
657 }
658 function noop() {
659 }
660 function warnForMissingKey() {
661 }
662 function setToSortedString(set) {
663 var array = [];
664 set.forEach(function(value) {
665 array.push(value);
666 });
667 return array.sort().join(", ");
668 }
669 function createFiber(tag, pendingProps, key, mode) {
670 return new FiberNode(tag, pendingProps, key, mode);
671 }
672 function scheduleRoot(root2, element) {
673 root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1());
674 }
675 function scheduleRefresh(root2, update) {
676 if (null !== resolveFamily) {
677 var staleFamilies = update.staleFamilies;
678 update = update.updatedFamilies;
679 flushPendingEffects();
680 scheduleFibersWithFamiliesRecursively(
681 root2.current,
682 update,
683 staleFamilies
684 );
685 flushSyncWork$1();
686 }
687 }
688 function setRefreshHandler(handler) {
689 resolveFamily = handler;
690 }
691 function isValidContainer(node) {
692 return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType);
693 }
694 function getNearestMountedFiber(fiber) {
695 var node = fiber, nearestMounted = fiber;
696 if (fiber.alternate) for (; node.return; ) node = node.return;
697 else {
698 fiber = node;
699 do
700 node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
701 while (fiber);
702 }
703 return 3 === node.tag ? nearestMounted : null;
704 }
705 function getSuspenseInstanceFromFiber(fiber) {
706 if (13 === fiber.tag) {
707 var suspenseState = fiber.memoizedState;
708 null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState));
709 if (null !== suspenseState) return suspenseState.dehydrated;
710 }
711 return null;
712 }
713 function getActivityInstanceFromFiber(fiber) {
714 if (31 === fiber.tag) {
715 var activityState = fiber.memoizedState;
716 null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState));
717 if (null !== activityState) return activityState.dehydrated;
718 }
719 return null;
720 }
721 function assertIsMounted(fiber) {
722 if (getNearestMountedFiber(fiber) !== fiber)
723 throw Error("Unable to find node on an unmounted component.");
724 }
725 function findCurrentFiberUsingSlowPath(fiber) {
726 var alternate = fiber.alternate;
727 if (!alternate) {
728 alternate = getNearestMountedFiber(fiber);
729 if (null === alternate)
730 throw Error("Unable to find node on an unmounted component.");
731 return alternate !== fiber ? null : fiber;
732 }
733 for (var a = fiber, b = alternate; ; ) {
734 var parentA = a.return;
735 if (null === parentA) break;
736 var parentB = parentA.alternate;
737 if (null === parentB) {
738 b = parentA.return;
739 if (null !== b) {
740 a = b;
741 continue;
742 }
743 break;
744 }
745 if (parentA.child === parentB.child) {
746 for (parentB = parentA.child; parentB; ) {
747 if (parentB === a) return assertIsMounted(parentA), fiber;
748 if (parentB === b) return assertIsMounted(parentA), alternate;
749 parentB = parentB.sibling;
750 }
751 throw Error("Unable to find node on an unmounted component.");
752 }
753 if (a.return !== b.return) a = parentA, b = parentB;
754 else {
755 for (var didFindChild = false, _child = parentA.child; _child; ) {
756 if (_child === a) {
757 didFindChild = true;
758 a = parentA;
759 b = parentB;
760 break;
761 }
762 if (_child === b) {
763 didFindChild = true;
764 b = parentA;
765 a = parentB;
766 break;
767 }
768 _child = _child.sibling;
769 }
770 if (!didFindChild) {
771 for (_child = parentB.child; _child; ) {
772 if (_child === a) {
773 didFindChild = true;
774 a = parentB;
775 b = parentA;
776 break;
777 }
778 if (_child === b) {
779 didFindChild = true;
780 b = parentB;
781 a = parentA;
782 break;
783 }
784 _child = _child.sibling;
785 }
786 if (!didFindChild)
787 throw Error(
788 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
789 );
790 }
791 }
792 if (a.alternate !== b)
793 throw Error(
794 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
795 );
796 }
797 if (3 !== a.tag)
798 throw Error("Unable to find node on an unmounted component.");
799 return a.stateNode.current === a ? fiber : alternate;
800 }
801 function findCurrentHostFiberImpl(node) {
802 var tag = node.tag;
803 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
804 for (node = node.child; null !== node; ) {
805 tag = findCurrentHostFiberImpl(node);
806 if (null !== tag) return tag;
807 node = node.sibling;
808 }
809 return null;
810 }
811 function getIteratorFn(maybeIterable) {
812 if (null === maybeIterable || "object" !== typeof maybeIterable)
813 return null;
814 maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
815 return "function" === typeof maybeIterable ? maybeIterable : null;
816 }
817 function getComponentNameFromType(type) {
818 if (null == type) return null;
819 if ("function" === typeof type)
820 return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
821 if ("string" === typeof type) return type;
822 switch (type) {
823 case REACT_FRAGMENT_TYPE:
824 return "Fragment";
825 case REACT_PROFILER_TYPE:
826 return "Profiler";
827 case REACT_STRICT_MODE_TYPE:
828 return "StrictMode";
829 case REACT_SUSPENSE_TYPE:
830 return "Suspense";
831 case REACT_SUSPENSE_LIST_TYPE:
832 return "SuspenseList";
833 case REACT_ACTIVITY_TYPE:
834 return "Activity";
835 }
836 if ("object" === typeof type)
837 switch ("number" === typeof type.tag && console.error(
838 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
839 ), type.$$typeof) {
840 case REACT_PORTAL_TYPE:
841 return "Portal";
842 case REACT_CONTEXT_TYPE:
843 return type.displayName || "Context";
844 case REACT_CONSUMER_TYPE:
845 return (type._context.displayName || "Context") + ".Consumer";
846 case REACT_FORWARD_REF_TYPE:
847 var innerType = type.render;
848 type = type.displayName;
849 type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
850 return type;
851 case REACT_MEMO_TYPE:
852 return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
853 case REACT_LAZY_TYPE:
854 innerType = type._payload;
855 type = type._init;
856 try {
857 return getComponentNameFromType(type(innerType));
858 } catch (x) {
859 }
860 }
861 return null;
862 }
863 function getComponentNameFromOwner(owner) {
864 return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null;
865 }
866 function getComponentNameFromFiber(fiber) {
867 var type = fiber.type;
868 switch (fiber.tag) {
869 case 31:
870 return "Activity";
871 case 24:
872 return "Cache";
873 case 9:
874 return (type._context.displayName || "Context") + ".Consumer";
875 case 10:
876 return type.displayName || "Context";
877 case 18:
878 return "DehydratedFragment";
879 case 11:
880 return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
881 case 7:
882 return "Fragment";
883 case 26:
884 case 27:
885 case 5:
886 return type;
887 case 4:
888 return "Portal";
889 case 3:
890 return "Root";
891 case 6:
892 return "Text";
893 case 16:
894 return getComponentNameFromType(type);
895 case 8:
896 return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
897 case 22:
898 return "Offscreen";
899 case 12:
900 return "Profiler";
901 case 21:
902 return "Scope";
903 case 13:
904 return "Suspense";
905 case 19:
906 return "SuspenseList";
907 case 25:
908 return "TracingMarker";
909 case 1:
910 case 0:
911 case 14:
912 case 15:
913 if ("function" === typeof type)
914 return type.displayName || type.name || null;
915 if ("string" === typeof type) return type;
916 break;
917 case 29:
918 type = fiber._debugInfo;
919 if (null != type) {
920 for (var i = type.length - 1; 0 <= i; i--)
921 if ("string" === typeof type[i].name) return type[i].name;
922 }
923 if (null !== fiber.return)
924 return getComponentNameFromFiber(fiber.return);
925 }
926 return null;
927 }
928 function createCursor(defaultValue) {
929 return { current: defaultValue };
930 }
931 function pop(cursor, fiber) {
932 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--);
933 }
934 function push(cursor, value, fiber) {
935 index$jscomp$0++;
936 valueStack[index$jscomp$0] = cursor.current;
937 fiberStack[index$jscomp$0] = fiber;
938 cursor.current = value;
939 }
940 function requiredContext(c) {
941 null === c && console.error(
942 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
943 );
944 return c;
945 }
946 function pushHostContainer(fiber, nextRootInstance) {
947 push(rootInstanceStackCursor, nextRootInstance, fiber);
948 push(contextFiberStackCursor, fiber, fiber);
949 push(contextStackCursor, null, fiber);
950 var nextRootContext = nextRootInstance.nodeType;
951 switch (nextRootContext) {
952 case 9:
953 case 11:
954 nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
955 nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone;
956 break;
957 default:
958 if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
959 nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(
960 nextRootInstance,
961 nextRootContext
962 );
963 else
964 switch (nextRootContext) {
965 case "svg":
966 nextRootInstance = HostContextNamespaceSvg;
967 break;
968 case "math":
969 nextRootInstance = HostContextNamespaceMath;
970 break;
971 default:
972 nextRootInstance = HostContextNamespaceNone;
973 }
974 }
975 nextRootContext = nextRootContext.toLowerCase();
976 nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
977 nextRootContext = {
978 context: nextRootInstance,
979 ancestorInfo: nextRootContext
980 };
981 pop(contextStackCursor, fiber);
982 push(contextStackCursor, nextRootContext, fiber);
983 }
984 function popHostContainer(fiber) {
985 pop(contextStackCursor, fiber);
986 pop(contextFiberStackCursor, fiber);
987 pop(rootInstanceStackCursor, fiber);
988 }
989 function getHostContext() {
990 return requiredContext(contextStackCursor.current);
991 }
992 function pushHostContext(fiber) {
993 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
994 var context = requiredContext(contextStackCursor.current);
995 var type = fiber.type;
996 var nextContext = getChildHostContextProd(context.context, type);
997 type = updatedAncestorInfoDev(context.ancestorInfo, type);
998 nextContext = { context: nextContext, ancestorInfo: type };
999 context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
1000 }
1001 function popHostContext(fiber) {
1002 contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
1003 hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition);
1004 }
1005 function disabledLog() {
1006 }
1007 function disableLogs() {
1008 if (0 === disabledDepth) {
1009 prevLog = console.log;
1010 prevInfo = console.info;
1011 prevWarn = console.warn;
1012 prevError = console.error;
1013 prevGroup = console.group;
1014 prevGroupCollapsed = console.groupCollapsed;
1015 prevGroupEnd = console.groupEnd;
1016 var props = {
1017 configurable: true,
1018 enumerable: true,
1019 value: disabledLog,
1020 writable: true
1021 };
1022 Object.defineProperties(console, {
1023 info: props,
1024 log: props,
1025 warn: props,
1026 error: props,
1027 group: props,
1028 groupCollapsed: props,
1029 groupEnd: props
1030 });
1031 }
1032 disabledDepth++;
1033 }
1034 function reenableLogs() {
1035 disabledDepth--;
1036 if (0 === disabledDepth) {
1037 var props = { configurable: true, enumerable: true, writable: true };
1038 Object.defineProperties(console, {
1039 log: assign({}, props, { value: prevLog }),
1040 info: assign({}, props, { value: prevInfo }),
1041 warn: assign({}, props, { value: prevWarn }),
1042 error: assign({}, props, { value: prevError }),
1043 group: assign({}, props, { value: prevGroup }),
1044 groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1045 groupEnd: assign({}, props, { value: prevGroupEnd })
1046 });
1047 }
1048 0 > disabledDepth && console.error(
1049 "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1050 );
1051 }
1052 function formatOwnerStack(error) {
1053 var prevPrepareStackTrace = Error.prepareStackTrace;
1054 Error.prepareStackTrace = void 0;
1055 error = error.stack;
1056 Error.prepareStackTrace = prevPrepareStackTrace;
1057 error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
1058 prevPrepareStackTrace = error.indexOf("\n");
1059 -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
1060 prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
1061 -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
1062 "\n",
1063 prevPrepareStackTrace
1064 ));
1065 if (-1 !== prevPrepareStackTrace)
1066 error = error.slice(0, prevPrepareStackTrace);
1067 else return "";
1068 return error;
1069 }
1070 function describeBuiltInComponentFrame(name) {
1071 if (void 0 === prefix)
1072 try {
1073 throw Error();
1074 } catch (x) {
1075 var match = x.stack.trim().match(/\n( *(at )?)/);
1076 prefix = match && match[1] || "";
1077 suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
1078 }
1079 return "\n" + prefix + name + suffix;
1080 }
1081 function describeNativeComponentFrame(fn, construct) {
1082 if (!fn || reentry) return "";
1083 var frame = componentFrameCache.get(fn);
1084 if (void 0 !== frame) return frame;
1085 reentry = true;
1086 frame = Error.prepareStackTrace;
1087 Error.prepareStackTrace = void 0;
1088 var previousDispatcher2 = null;
1089 previousDispatcher2 = ReactSharedInternals.H;
1090 ReactSharedInternals.H = null;
1091 disableLogs();
1092 try {
1093 var RunInRootFrame = {
1094 DetermineComponentFrameRoot: function() {
1095 try {
1096 if (construct) {
1097 var Fake = function() {
1098 throw Error();
1099 };
1100 Object.defineProperty(Fake.prototype, "props", {
1101 set: function() {
1102 throw Error();
1103 }
1104 });
1105 if ("object" === typeof Reflect && Reflect.construct) {
1106 try {
1107 Reflect.construct(Fake, []);
1108 } catch (x) {
1109 var control = x;
1110 }
1111 Reflect.construct(fn, [], Fake);
1112 } else {
1113 try {
1114 Fake.call();
1115 } catch (x$0) {
1116 control = x$0;
1117 }
1118 fn.call(Fake.prototype);
1119 }
1120 } else {
1121 try {
1122 throw Error();
1123 } catch (x$1) {
1124 control = x$1;
1125 }
1126 (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
1127 });
1128 }
1129 } catch (sample) {
1130 if (sample && control && "string" === typeof sample.stack)
1131 return [sample.stack, control.stack];
1132 }
1133 return [null, null];
1134 }
1135 };
1136 RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
1137 var namePropDescriptor = Object.getOwnPropertyDescriptor(
1138 RunInRootFrame.DetermineComponentFrameRoot,
1139 "name"
1140 );
1141 namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
1142 RunInRootFrame.DetermineComponentFrameRoot,
1143 "name",
1144 { value: "DetermineComponentFrameRoot" }
1145 );
1146 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
1147 if (sampleStack && controlStack) {
1148 var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
1149 for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
1150 "DetermineComponentFrameRoot"
1151 ); )
1152 namePropDescriptor++;
1153 for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
1154 "DetermineComponentFrameRoot"
1155 ); )
1156 _RunInRootFrame$Deter++;
1157 if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
1158 for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
1159 _RunInRootFrame$Deter--;
1160 for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
1161 if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1162 if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1163 do
1164 if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1165 var _frame = "\n" + sampleLines[namePropDescriptor].replace(
1166 " at new ",
1167 " at "
1168 );
1169 fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
1170 "function" === typeof fn && componentFrameCache.set(fn, _frame);
1171 return _frame;
1172 }
1173 while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1174 }
1175 break;
1176 }
1177 }
1178 } finally {
1179 reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
1180 }
1181 sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
1182 "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1183 return sampleLines;
1184 }
1185 function describeFiber(fiber, childFiber) {
1186 switch (fiber.tag) {
1187 case 26:
1188 case 27:
1189 case 5:
1190 return describeBuiltInComponentFrame(fiber.type);
1191 case 16:
1192 return describeBuiltInComponentFrame("Lazy");
1193 case 13:
1194 return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense");
1195 case 19:
1196 return describeBuiltInComponentFrame("SuspenseList");
1197 case 0:
1198 case 15:
1199 return describeNativeComponentFrame(fiber.type, false);
1200 case 11:
1201 return describeNativeComponentFrame(fiber.type.render, false);
1202 case 1:
1203 return describeNativeComponentFrame(fiber.type, true);
1204 case 31:
1205 return describeBuiltInComponentFrame("Activity");
1206 default:
1207 return "";
1208 }
1209 }
1210 function getStackByFiberInDevAndProd(workInProgress2) {
1211 try {
1212 var info = "", previous = null;
1213 do {
1214 info += describeFiber(workInProgress2, previous);
1215 var debugInfo = workInProgress2._debugInfo;
1216 if (debugInfo)
1217 for (var i = debugInfo.length - 1; 0 <= i; i--) {
1218 var entry = debugInfo[i];
1219 if ("string" === typeof entry.name) {
1220 var JSCompiler_temp_const = info;
1221 a: {
1222 var name = entry.name, env = entry.env, location = entry.debugLocation;
1223 if (null != location) {
1224 var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1);
1225 if (-1 !== lastLine.indexOf(name)) {
1226 var JSCompiler_inline_result = "\n" + lastLine;
1227 break a;
1228 }
1229 }
1230 JSCompiler_inline_result = describeBuiltInComponentFrame(
1231 name + (env ? " [" + env + "]" : "")
1232 );
1233 }
1234 info = JSCompiler_temp_const + JSCompiler_inline_result;
1235 }
1236 }
1237 previous = workInProgress2;
1238 workInProgress2 = workInProgress2.return;
1239 } while (workInProgress2);
1240 return info;
1241 } catch (x) {
1242 return "\nError generating stack: " + x.message + "\n" + x.stack;
1243 }
1244 }
1245 function describeFunctionComponentFrameWithoutLineNumber(fn) {
1246 return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
1247 }
1248 function getCurrentFiberOwnerNameInDevOrNull() {
1249 if (null === current) return null;
1250 var owner = current._debugOwner;
1251 return null != owner ? getComponentNameFromOwner(owner) : null;
1252 }
1253 function getCurrentFiberStackInDev() {
1254 if (null === current) return "";
1255 var workInProgress2 = current;
1256 try {
1257 var info = "";
1258 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
1259 switch (workInProgress2.tag) {
1260 case 26:
1261 case 27:
1262 case 5:
1263 info += describeBuiltInComponentFrame(workInProgress2.type);
1264 break;
1265 case 13:
1266 info += describeBuiltInComponentFrame("Suspense");
1267 break;
1268 case 19:
1269 info += describeBuiltInComponentFrame("SuspenseList");
1270 break;
1271 case 31:
1272 info += describeBuiltInComponentFrame("Activity");
1273 break;
1274 case 30:
1275 case 0:
1276 case 15:
1277 case 1:
1278 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1279 workInProgress2.type
1280 ));
1281 break;
1282 case 11:
1283 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1284 workInProgress2.type.render
1285 ));
1286 }
1287 for (; workInProgress2; )
1288 if ("number" === typeof workInProgress2.tag) {
1289 var fiber = workInProgress2;
1290 workInProgress2 = fiber._debugOwner;
1291 var debugStack = fiber._debugStack;
1292 if (workInProgress2 && debugStack) {
1293 var formattedStack = formatOwnerStack(debugStack);
1294 "" !== formattedStack && (info += "\n" + formattedStack);
1295 }
1296 } else if (null != workInProgress2.debugStack) {
1297 var ownerStack = workInProgress2.debugStack;
1298 (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
1299 } else break;
1300 var JSCompiler_inline_result = info;
1301 } catch (x) {
1302 JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
1303 }
1304 return JSCompiler_inline_result;
1305 }
1306 function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1307 var previousFiber = current;
1308 setCurrentFiber(fiber);
1309 try {
1310 return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
1311 callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1312 ) : callback(arg0, arg1, arg2, arg3, arg4);
1313 } finally {
1314 setCurrentFiber(previousFiber);
1315 }
1316 throw Error(
1317 "runWithFiberInDEV should never be called in production. This is a bug in React."
1318 );
1319 }
1320 function setCurrentFiber(fiber) {
1321 ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
1322 isRendering = false;
1323 current = fiber;
1324 }
1325 function typeName(value) {
1326 return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1327 }
1328 function willCoercionThrow(value) {
1329 try {
1330 return testStringCoercion(value), false;
1331 } catch (e) {
1332 return true;
1333 }
1334 }
1335 function testStringCoercion(value) {
1336 return "" + value;
1337 }
1338 function checkAttributeStringCoercion(value, attributeName) {
1339 if (willCoercionThrow(value))
1340 return console.error(
1341 "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
1342 attributeName,
1343 typeName(value)
1344 ), testStringCoercion(value);
1345 }
1346 function checkCSSPropertyStringCoercion(value, propName) {
1347 if (willCoercionThrow(value))
1348 return console.error(
1349 "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
1350 propName,
1351 typeName(value)
1352 ), testStringCoercion(value);
1353 }
1354 function checkFormFieldValueStringCoercion(value) {
1355 if (willCoercionThrow(value))
1356 return console.error(
1357 "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
1358 typeName(value)
1359 ), testStringCoercion(value);
1360 }
1361 function injectInternals(internals) {
1362 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
1363 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1364 if (hook.isDisabled) return true;
1365 if (!hook.supportsFiber)
1366 return console.error(
1367 "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
1368 ), true;
1369 try {
1370 rendererID = hook.inject(internals), injectedHook = hook;
1371 } catch (err) {
1372 console.error("React instrumentation encountered an error: %o.", err);
1373 }
1374 return hook.checkDCE ? true : false;
1375 }
1376 function setIsStrictModeForDevtools(newIsStrictMode) {
1377 "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
1378 if (injectedHook && "function" === typeof injectedHook.setStrictMode)
1379 try {
1380 injectedHook.setStrictMode(rendererID, newIsStrictMode);
1381 } catch (err) {
1382 hasLoggedError || (hasLoggedError = true, console.error(
1383 "React instrumentation encountered an error: %o",
1384 err
1385 ));
1386 }
1387 }
1388 function clz32Fallback(x) {
1389 x >>>= 0;
1390 return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0;
1391 }
1392 function getHighestPriorityLanes(lanes) {
1393 var pendingSyncLanes = lanes & 42;
1394 if (0 !== pendingSyncLanes) return pendingSyncLanes;
1395 switch (lanes & -lanes) {
1396 case 1:
1397 return 1;
1398 case 2:
1399 return 2;
1400 case 4:
1401 return 4;
1402 case 8:
1403 return 8;
1404 case 16:
1405 return 16;
1406 case 32:
1407 return 32;
1408 case 64:
1409 return 64;
1410 case 128:
1411 return 128;
1412 case 256:
1413 case 512:
1414 case 1024:
1415 case 2048:
1416 case 4096:
1417 case 8192:
1418 case 16384:
1419 case 32768:
1420 case 65536:
1421 case 131072:
1422 return lanes & 261888;
1423 case 262144:
1424 case 524288:
1425 case 1048576:
1426 case 2097152:
1427 return lanes & 3932160;
1428 case 4194304:
1429 case 8388608:
1430 case 16777216:
1431 case 33554432:
1432 return lanes & 62914560;
1433 case 67108864:
1434 return 67108864;
1435 case 134217728:
1436 return 134217728;
1437 case 268435456:
1438 return 268435456;
1439 case 536870912:
1440 return 536870912;
1441 case 1073741824:
1442 return 0;
1443 default:
1444 return console.error(
1445 "Should have found matching lanes. This is a bug in React."
1446 ), lanes;
1447 }
1448 }
1449 function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
1450 var pendingLanes = root2.pendingLanes;
1451 if (0 === pendingLanes) return 0;
1452 var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
1453 root2 = root2.warmLanes;
1454 var nonIdlePendingLanes = pendingLanes & 134217727;
1455 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root2, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
1456 return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes;
1457 }
1458 function checkIfRootIsPrerendering(root2, renderLanes2) {
1459 return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2);
1460 }
1461 function computeExpirationTime(lane, currentTime) {
1462 switch (lane) {
1463 case 1:
1464 case 2:
1465 case 4:
1466 case 8:
1467 case 64:
1468 return currentTime + 250;
1469 case 16:
1470 case 32:
1471 case 128:
1472 case 256:
1473 case 512:
1474 case 1024:
1475 case 2048:
1476 case 4096:
1477 case 8192:
1478 case 16384:
1479 case 32768:
1480 case 65536:
1481 case 131072:
1482 case 262144:
1483 case 524288:
1484 case 1048576:
1485 case 2097152:
1486 return currentTime + 5e3;
1487 case 4194304:
1488 case 8388608:
1489 case 16777216:
1490 case 33554432:
1491 return -1;
1492 case 67108864:
1493 case 134217728:
1494 case 268435456:
1495 case 536870912:
1496 case 1073741824:
1497 return -1;
1498 default:
1499 return console.error(
1500 "Should have found matching lanes. This is a bug in React."
1501 ), -1;
1502 }
1503 }
1504 function claimNextRetryLane() {
1505 var lane = nextRetryLane;
1506 nextRetryLane <<= 1;
1507 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1508 return lane;
1509 }
1510 function createLaneMap(initial) {
1511 for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1512 return laneMap;
1513 }
1514 function markRootUpdated$1(root2, updateLane) {
1515 root2.pendingLanes |= updateLane;
1516 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
1517 }
1518 function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
1519 var previouslyPendingLanes = root2.pendingLanes;
1520 root2.pendingLanes = remainingLanes;
1521 root2.suspendedLanes = 0;
1522 root2.pingedLanes = 0;
1523 root2.warmLanes = 0;
1524 root2.expiredLanes &= remainingLanes;
1525 root2.entangledLanes &= remainingLanes;
1526 root2.errorRecoveryDisabledLanes &= remainingLanes;
1527 root2.shellSuspendCounter = 0;
1528 var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
1529 for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
1530 var index = 31 - clz32(remainingLanes), lane = 1 << index;
1531 entanglements[index] = 0;
1532 expirationTimes[index] = -1;
1533 var hiddenUpdatesForLane = hiddenUpdates[index];
1534 if (null !== hiddenUpdatesForLane)
1535 for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
1536 var update = hiddenUpdatesForLane[index];
1537 null !== update && (update.lane &= -536870913);
1538 }
1539 remainingLanes &= ~lane;
1540 }
1541 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0);
1542 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1543 }
1544 function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
1545 root2.pendingLanes |= spawnedLane;
1546 root2.suspendedLanes &= ~spawnedLane;
1547 var spawnedLaneIndex = 31 - clz32(spawnedLane);
1548 root2.entangledLanes |= spawnedLane;
1549 root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930;
1550 }
1551 function markRootEntangled(root2, entangledLanes) {
1552 var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
1553 for (root2 = root2.entanglements; rootEntangledLanes; ) {
1554 var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
1555 lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes);
1556 rootEntangledLanes &= ~lane;
1557 }
1558 }
1559 function getBumpedLaneForHydration(root2, renderLanes2) {
1560 var renderLane = renderLanes2 & -renderLanes2;
1561 renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
1562 return 0 !== (renderLane & (root2.suspendedLanes | renderLanes2)) ? 0 : renderLane;
1563 }
1564 function getBumpedLaneForHydrationByLane(lane) {
1565 switch (lane) {
1566 case 2:
1567 lane = 1;
1568 break;
1569 case 8:
1570 lane = 4;
1571 break;
1572 case 32:
1573 lane = 16;
1574 break;
1575 case 256:
1576 case 512:
1577 case 1024:
1578 case 2048:
1579 case 4096:
1580 case 8192:
1581 case 16384:
1582 case 32768:
1583 case 65536:
1584 case 131072:
1585 case 262144:
1586 case 524288:
1587 case 1048576:
1588 case 2097152:
1589 case 4194304:
1590 case 8388608:
1591 case 16777216:
1592 case 33554432:
1593 lane = 128;
1594 break;
1595 case 268435456:
1596 lane = 134217728;
1597 break;
1598 default:
1599 lane = 0;
1600 }
1601 return lane;
1602 }
1603 function addFiberToLanesMap(root2, fiber, lanes) {
1604 if (isDevToolsPresent)
1605 for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) {
1606 var index = 31 - clz32(lanes), lane = 1 << index;
1607 root2[index].add(fiber);
1608 lanes &= ~lane;
1609 }
1610 }
1611 function movePendingFibersToMemoized(root2, lanes) {
1612 if (isDevToolsPresent)
1613 for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) {
1614 var index = 31 - clz32(lanes);
1615 root2 = 1 << index;
1616 index = pendingUpdatersLaneMap[index];
1617 0 < index.size && (index.forEach(function(fiber) {
1618 var alternate = fiber.alternate;
1619 null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
1620 }), index.clear());
1621 lanes &= ~root2;
1622 }
1623 }
1624 function lanesToEventPriority(lanes) {
1625 lanes &= -lanes;
1626 return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority;
1627 }
1628 function resolveUpdatePriority() {
1629 var updatePriority = ReactDOMSharedInternals.p;
1630 if (0 !== updatePriority) return updatePriority;
1631 updatePriority = window.event;
1632 return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type);
1633 }
1634 function runWithPriority(priority, fn) {
1635 var previousPriority = ReactDOMSharedInternals.p;
1636 try {
1637 return ReactDOMSharedInternals.p = priority, fn();
1638 } finally {
1639 ReactDOMSharedInternals.p = previousPriority;
1640 }
1641 }
1642 function detachDeletedInstance(node) {
1643 delete node[internalInstanceKey];
1644 delete node[internalPropsKey];
1645 delete node[internalEventHandlersKey];
1646 delete node[internalEventHandlerListenersKey];
1647 delete node[internalEventHandlesSetKey];
1648 }
1649 function getClosestInstanceFromNode(targetNode) {
1650 var targetInst = targetNode[internalInstanceKey];
1651 if (targetInst) return targetInst;
1652 for (var parentNode = targetNode.parentNode; parentNode; ) {
1653 if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
1654 parentNode = targetInst.alternate;
1655 if (null !== targetInst.child || null !== parentNode && null !== parentNode.child)
1656 for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) {
1657 if (parentNode = targetNode[internalInstanceKey])
1658 return parentNode;
1659 targetNode = getParentHydrationBoundary(targetNode);
1660 }
1661 return targetInst;
1662 }
1663 targetNode = parentNode;
1664 parentNode = targetNode.parentNode;
1665 }
1666 return null;
1667 }
1668 function getInstanceFromNode(node) {
1669 if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
1670 var tag = node.tag;
1671 if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag)
1672 return node;
1673 }
1674 return null;
1675 }
1676 function getNodeFromInstance(inst) {
1677 var tag = inst.tag;
1678 if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1679 return inst.stateNode;
1680 throw Error("getNodeFromInstance: Invalid argument.");
1681 }
1682 function getResourcesFromRoot(root2) {
1683 var resources = root2[internalRootNodeResourcesKey];
1684 resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() });
1685 return resources;
1686 }
1687 function markNodeAsHoistable(node) {
1688 node[internalHoistableMarker] = true;
1689 }
1690 function registerTwoPhaseEvent(registrationName, dependencies) {
1691 registerDirectEvent(registrationName, dependencies);
1692 registerDirectEvent(registrationName + "Capture", dependencies);
1693 }
1694 function registerDirectEvent(registrationName, dependencies) {
1695 registrationNameDependencies[registrationName] && console.error(
1696 "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1697 registrationName
1698 );
1699 registrationNameDependencies[registrationName] = dependencies;
1700 var lowerCasedName = registrationName.toLowerCase();
1701 possibleRegistrationNames[lowerCasedName] = registrationName;
1702 "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName);
1703 for (registrationName = 0; registrationName < dependencies.length; registrationName++)
1704 allNativeEvents.add(dependencies[registrationName]);
1705 }
1706 function checkControlledValueProps(tagName, props) {
1707 hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error(
1708 "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
1709 ) : console.error(
1710 "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
1711 ));
1712 props.onChange || props.readOnly || props.disabled || null == props.checked || console.error(
1713 "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
1714 );
1715 }
1716 function isAttributeNameSafe(attributeName) {
1717 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1718 return true;
1719 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1720 return false;
1721 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1722 return validatedAttributeNameCache[attributeName] = true;
1723 illegalAttributeNameCache[attributeName] = true;
1724 console.error("Invalid attribute name: `%s`", attributeName);
1725 return false;
1726 }
1727 function getValueForAttributeOnCustomComponent(node, name, expected) {
1728 if (isAttributeNameSafe(name)) {
1729 if (!node.hasAttribute(name)) {
1730 switch (typeof expected) {
1731 case "symbol":
1732 case "object":
1733 return expected;
1734 case "function":
1735 return expected;
1736 case "boolean":
1737 if (false === expected) return expected;
1738 }
1739 return void 0 === expected ? void 0 : null;
1740 }
1741 node = node.getAttribute(name);
1742 if ("" === node && true === expected) return true;
1743 checkAttributeStringCoercion(expected, name);
1744 return node === "" + expected ? expected : node;
1745 }
1746 }
1747 function setValueForAttribute(node, name, value) {
1748 if (isAttributeNameSafe(name))
1749 if (null === value) node.removeAttribute(name);
1750 else {
1751 switch (typeof value) {
1752 case "undefined":
1753 case "function":
1754 case "symbol":
1755 node.removeAttribute(name);
1756 return;
1757 case "boolean":
1758 var prefix2 = name.toLowerCase().slice(0, 5);
1759 if ("data-" !== prefix2 && "aria-" !== prefix2) {
1760 node.removeAttribute(name);
1761 return;
1762 }
1763 }
1764 checkAttributeStringCoercion(value, name);
1765 node.setAttribute(name, "" + value);
1766 }
1767 }
1768 function setValueForKnownAttribute(node, name, value) {
1769 if (null === value) node.removeAttribute(name);
1770 else {
1771 switch (typeof value) {
1772 case "undefined":
1773 case "function":
1774 case "symbol":
1775 case "boolean":
1776 node.removeAttribute(name);
1777 return;
1778 }
1779 checkAttributeStringCoercion(value, name);
1780 node.setAttribute(name, "" + value);
1781 }
1782 }
1783 function setValueForNamespacedAttribute(node, namespace, name, value) {
1784 if (null === value) node.removeAttribute(name);
1785 else {
1786 switch (typeof value) {
1787 case "undefined":
1788 case "function":
1789 case "symbol":
1790 case "boolean":
1791 node.removeAttribute(name);
1792 return;
1793 }
1794 checkAttributeStringCoercion(value, name);
1795 node.setAttributeNS(namespace, name, "" + value);
1796 }
1797 }
1798 function getToStringValue(value) {
1799 switch (typeof value) {
1800 case "bigint":
1801 case "boolean":
1802 case "number":
1803 case "string":
1804 case "undefined":
1805 return value;
1806 case "object":
1807 return checkFormFieldValueStringCoercion(value), value;
1808 default:
1809 return "";
1810 }
1811 }
1812 function isCheckable(elem) {
1813 var type = elem.type;
1814 return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type);
1815 }
1816 function trackValueOnNode(node, valueField, currentValue) {
1817 var descriptor = Object.getOwnPropertyDescriptor(
1818 node.constructor.prototype,
1819 valueField
1820 );
1821 if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) {
1822 var get = descriptor.get, set = descriptor.set;
1823 Object.defineProperty(node, valueField, {
1824 configurable: true,
1825 get: function() {
1826 return get.call(this);
1827 },
1828 set: function(value) {
1829 checkFormFieldValueStringCoercion(value);
1830 currentValue = "" + value;
1831 set.call(this, value);
1832 }
1833 });
1834 Object.defineProperty(node, valueField, {
1835 enumerable: descriptor.enumerable
1836 });
1837 return {
1838 getValue: function() {
1839 return currentValue;
1840 },
1841 setValue: function(value) {
1842 checkFormFieldValueStringCoercion(value);
1843 currentValue = "" + value;
1844 },
1845 stopTracking: function() {
1846 node._valueTracker = null;
1847 delete node[valueField];
1848 }
1849 };
1850 }
1851 }
1852 function track(node) {
1853 if (!node._valueTracker) {
1854 var valueField = isCheckable(node) ? "checked" : "value";
1855 node._valueTracker = trackValueOnNode(
1856 node,
1857 valueField,
1858 "" + node[valueField]
1859 );
1860 }
1861 }
1862 function updateValueIfChanged(node) {
1863 if (!node) return false;
1864 var tracker = node._valueTracker;
1865 if (!tracker) return true;
1866 var lastValue = tracker.getValue();
1867 var value = "";
1868 node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value);
1869 node = value;
1870 return node !== lastValue ? (tracker.setValue(node), true) : false;
1871 }
1872 function getActiveElement(doc) {
1873 doc = doc || ("undefined" !== typeof document ? document : void 0);
1874 if ("undefined" === typeof doc) return null;
1875 try {
1876 return doc.activeElement || doc.body;
1877 } catch (e) {
1878 return doc.body;
1879 }
1880 }
1881 function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
1882 return value.replace(
1883 escapeSelectorAttributeValueInsideDoubleQuotesRegex,
1884 function(ch) {
1885 return "\\" + ch.charCodeAt(0).toString(16) + " ";
1886 }
1887 );
1888 }
1889 function validateInputProps(element, props) {
1890 void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error(
1891 "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
1892 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1893 props.type
1894 ), didWarnCheckedDefaultChecked = true);
1895 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error(
1896 "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
1897 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1898 props.type
1899 ), didWarnValueDefaultValue$1 = true);
1900 }
1901 function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
1902 element.name = "";
1903 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type");
1904 if (null != value)
1905 if ("number" === type) {
1906 if (0 === value && "" === element.value || element.value != value)
1907 element.value = "" + getToStringValue(value);
1908 } else
1909 element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value));
1910 else
1911 "submit" !== type && "reset" !== type || element.removeAttribute("value");
1912 null != value ? setDefaultValue(element, type, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, type, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value");
1913 null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked);
1914 null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked);
1915 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name");
1916 }
1917 function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
1918 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type);
1919 if (null != value || null != defaultValue) {
1920 if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) {
1921 track(element);
1922 return;
1923 }
1924 defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1925 value = null != value ? "" + getToStringValue(value) : defaultValue;
1926 isHydrating2 || value === element.value || (element.value = value);
1927 element.defaultValue = value;
1928 }
1929 checked = null != checked ? checked : defaultChecked;
1930 checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
1931 element.checked = isHydrating2 ? element.checked : !!checked;
1932 element.defaultChecked = !!checked;
1933 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name);
1934 track(element);
1935 }
1936 function setDefaultValue(node, type, value) {
1937 "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
1938 }
1939 function validateOptionProps(element, props) {
1940 null == props.value && ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) {
1941 null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
1942 "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
1943 ));
1944 }) : null == props.dangerouslySetInnerHTML || didWarnInvalidInnerHTML || (didWarnInvalidInnerHTML = true, console.error(
1945 "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
1946 )));
1947 null == props.selected || didWarnSelectedSetOnOption || (console.error(
1948 "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
1949 ), didWarnSelectedSetOnOption = true);
1950 }
1951 function getDeclarationErrorAddendum() {
1952 var ownerName = getCurrentFiberOwnerNameInDevOrNull();
1953 return ownerName ? "\n\nCheck the render method of `" + ownerName + "`." : "";
1954 }
1955 function updateOptions(node, multiple, propValue, setDefaultSelected) {
1956 node = node.options;
1957 if (multiple) {
1958 multiple = {};
1959 for (var i = 0; i < propValue.length; i++)
1960 multiple["$" + propValue[i]] = true;
1961 for (propValue = 0; propValue < node.length; propValue++)
1962 i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true);
1963 } else {
1964 propValue = "" + getToStringValue(propValue);
1965 multiple = null;
1966 for (i = 0; i < node.length; i++) {
1967 if (node[i].value === propValue) {
1968 node[i].selected = true;
1969 setDefaultSelected && (node[i].defaultSelected = true);
1970 return;
1971 }
1972 null !== multiple || node[i].disabled || (multiple = node[i]);
1973 }
1974 null !== multiple && (multiple.selected = true);
1975 }
1976 }
1977 function validateSelectProps(element, props) {
1978 for (element = 0; element < valuePropNames.length; element++) {
1979 var propName = valuePropNames[element];
1980 if (null != props[propName]) {
1981 var propNameIsArray = isArrayImpl(props[propName]);
1982 props.multiple && !propNameIsArray ? console.error(
1983 "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
1984 propName,
1985 getDeclarationErrorAddendum()
1986 ) : !props.multiple && propNameIsArray && console.error(
1987 "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
1988 propName,
1989 getDeclarationErrorAddendum()
1990 );
1991 }
1992 }
1993 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (console.error(
1994 "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"
1995 ), didWarnValueDefaultValue = true);
1996 }
1997 function validateTextareaProps(element, props) {
1998 void 0 === props.value || void 0 === props.defaultValue || didWarnValDefaultVal || (console.error(
1999 "%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
2000 getCurrentFiberOwnerNameInDevOrNull() || "A component"
2001 ), didWarnValDefaultVal = true);
2002 null != props.children && null == props.value && console.error(
2003 "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
2004 );
2005 }
2006 function updateTextarea(element, value, defaultValue) {
2007 if (null != value && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), null == defaultValue)) {
2008 element.defaultValue !== value && (element.defaultValue = value);
2009 return;
2010 }
2011 element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
2012 }
2013 function initTextarea(element, value, defaultValue, children) {
2014 if (null == value) {
2015 if (null != children) {
2016 if (null != defaultValue)
2017 throw Error(
2018 "If you supply `defaultValue` on a <textarea>, do not pass children."
2019 );
2020 if (isArrayImpl(children)) {
2021 if (1 < children.length)
2022 throw Error("<textarea> can only have at most one child.");
2023 children = children[0];
2024 }
2025 defaultValue = children;
2026 }
2027 null == defaultValue && (defaultValue = "");
2028 value = defaultValue;
2029 }
2030 defaultValue = getToStringValue(value);
2031 element.defaultValue = defaultValue;
2032 children = element.textContent;
2033 children === defaultValue && "" !== children && null !== children && (element.value = children);
2034 track(element);
2035 }
2036 function findNotableNode(node, indent) {
2037 return void 0 === node.serverProps && 0 === node.serverTail.length && 1 === node.children.length && 3 < node.distanceFromLeaf && node.distanceFromLeaf > 15 - indent ? findNotableNode(node.children[0], indent) : node;
2038 }
2039 function indentation(indent) {
2040 return " " + " ".repeat(indent);
2041 }
2042 function added(indent) {
2043 return "+ " + " ".repeat(indent);
2044 }
2045 function removed(indent) {
2046 return "- " + " ".repeat(indent);
2047 }
2048 function describeFiberType(fiber) {
2049 switch (fiber.tag) {
2050 case 26:
2051 case 27:
2052 case 5:
2053 return fiber.type;
2054 case 16:
2055 return "Lazy";
2056 case 31:
2057 return "Activity";
2058 case 13:
2059 return "Suspense";
2060 case 19:
2061 return "SuspenseList";
2062 case 0:
2063 case 15:
2064 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2065 case 11:
2066 return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
2067 case 1:
2068 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2069 default:
2070 return null;
2071 }
2072 }
2073 function describeTextNode(content, maxLength) {
2074 return needsEscaping.test(content) ? (content = JSON.stringify(content), content.length > maxLength - 2 ? 8 > maxLength ? '{"..."}' : "{" + content.slice(0, maxLength - 7) + '..."}' : "{" + content + "}") : content.length > maxLength ? 5 > maxLength ? '{"..."}' : content.slice(0, maxLength - 3) + "..." : content;
2075 }
2076 function describeTextDiff(clientText, serverProps, indent) {
2077 var maxLength = 120 - 2 * indent;
2078 if (null === serverProps)
2079 return added(indent) + describeTextNode(clientText, maxLength) + "\n";
2080 if ("string" === typeof serverProps) {
2081 for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
2082 firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
2083 return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
2084 }
2085 return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
2086 }
2087 function objectName(object) {
2088 return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m, p0) {
2089 return p0;
2090 });
2091 }
2092 function describeValue(value, maxLength) {
2093 switch (typeof value) {
2094 case "string":
2095 return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
2096 case "object":
2097 if (null === value) return "null";
2098 if (isArrayImpl(value)) return "[...]";
2099 if ((value.$$typeof === REACT_ELEMENT_TYPE || (value.$$typeof === REACT_LEGACY_ELEMENT_TYPE && (__wpWarnCompat("legacy-element"), true))))
2100 return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
2101 var name = objectName(value);
2102 if ("Object" === name) {
2103 name = "";
2104 maxLength -= 2;
2105 for (var propName in value)
2106 if (value.hasOwnProperty(propName)) {
2107 var jsonPropName = JSON.stringify(propName);
2108 jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
2109 maxLength -= propName.length - 2;
2110 jsonPropName = describeValue(
2111 value[propName],
2112 15 > maxLength ? maxLength : 15
2113 );
2114 maxLength -= jsonPropName.length;
2115 if (0 > maxLength) {
2116 name += "" === name ? "..." : ", ...";
2117 break;
2118 }
2119 name += ("" === name ? "" : ",") + propName + ":" + jsonPropName;
2120 }
2121 return "{" + name + "}";
2122 }
2123 return name;
2124 case "function":
2125 return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
2126 default:
2127 return String(value);
2128 }
2129 }
2130 function describePropValue(value, maxLength) {
2131 return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
2132 }
2133 function describeExpandedElement(type, props, rowPrefix) {
2134 var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
2135 for (propName in props)
2136 if (props.hasOwnProperty(propName) && "children" !== propName) {
2137 var propValue = describePropValue(
2138 props[propName],
2139 120 - rowPrefix.length - propName.length - 1
2140 );
2141 remainingRowLength -= propName.length + propValue.length + 2;
2142 properties.push(propName + "=" + propValue);
2143 }
2144 return 0 === properties.length ? rowPrefix + "<" + type + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
2145 }
2146 function describePropertiesDiff(clientObject, serverObject, indent) {
2147 var properties = "", remainingServerProperties = assign({}, serverObject), propName;
2148 for (propName in clientObject)
2149 if (clientObject.hasOwnProperty(propName)) {
2150 delete remainingServerProperties[propName];
2151 var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
2152 serverObject.hasOwnProperty(propName) ? (maxLength = describeValue(serverObject[propName], maxLength), properties += added(indent) + propName + ": " + clientPropValue + "\n", properties += removed(indent) + propName + ": " + maxLength + "\n") : properties += added(indent) + propName + ": " + clientPropValue + "\n";
2153 }
2154 for (var _propName in remainingServerProperties)
2155 remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
2156 remainingServerProperties[_propName],
2157 120 - 2 * indent - _propName.length - 2
2158 ), properties += removed(indent) + _propName + ": " + clientObject + "\n");
2159 return properties;
2160 }
2161 function describeElementDiff(type, clientProps, serverProps, indent) {
2162 var content = "", serverPropNames = /* @__PURE__ */ new Map();
2163 for (propName$jscomp$0 in serverProps)
2164 serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
2165 propName$jscomp$0.toLowerCase(),
2166 propName$jscomp$0
2167 );
2168 if (1 === serverPropNames.size && serverPropNames.has("children"))
2169 content += describeExpandedElement(
2170 type,
2171 clientProps,
2172 indentation(indent)
2173 );
2174 else {
2175 for (var _propName2 in clientProps)
2176 if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
2177 var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
2178 if (void 0 !== serverPropName) {
2179 serverPropNames.delete(_propName2.toLowerCase());
2180 var propName$jscomp$0 = clientProps[_propName2];
2181 serverPropName = serverProps[serverPropName];
2182 var clientPropValue = describePropValue(
2183 propName$jscomp$0,
2184 maxLength$jscomp$0
2185 );
2186 maxLength$jscomp$0 = describePropValue(
2187 serverPropName,
2188 maxLength$jscomp$0
2189 );
2190 "object" === typeof propName$jscomp$0 && null !== propName$jscomp$0 && "object" === typeof serverPropName && null !== serverPropName && "Object" === objectName(propName$jscomp$0) && "Object" === objectName(serverPropName) && (2 < Object.keys(propName$jscomp$0).length || 2 < Object.keys(serverPropName).length || -1 < clientPropValue.indexOf("...") || -1 < maxLength$jscomp$0.indexOf("...")) ? content += indentation(indent + 1) + _propName2 + "={{\n" + describePropertiesDiff(
2191 propName$jscomp$0,
2192 serverPropName,
2193 indent + 2
2194 ) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
2195 } else
2196 content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
2197 }
2198 serverPropNames.forEach(function(propName) {
2199 if ("children" !== propName) {
2200 var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
2201 content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
2202 }
2203 });
2204 content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
2205 }
2206 type = serverProps.children;
2207 clientProps = clientProps.children;
2208 if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
2209 serverPropNames = "";
2210 if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2211 serverPropNames = "" + clientProps;
2212 content += describeTextDiff(serverPropNames, "" + type, indent + 1);
2213 } else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2214 content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
2215 return content;
2216 }
2217 function describeSiblingFiber(fiber, indent) {
2218 var type = describeFiberType(fiber);
2219 if (null === type) {
2220 type = "";
2221 for (fiber = fiber.child; fiber; )
2222 type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
2223 return type;
2224 }
2225 return indentation(indent) + "<" + type + ">\n";
2226 }
2227 function describeNode(node, indent) {
2228 var skipToNode = findNotableNode(node, indent);
2229 if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
2230 return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
2231 skipToNode = "";
2232 var debugInfo = node.fiber._debugInfo;
2233 if (debugInfo)
2234 for (var i = 0; i < debugInfo.length; i++) {
2235 var serverComponentName = debugInfo[i].name;
2236 "string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
2237 }
2238 debugInfo = "";
2239 i = node.fiber.pendingProps;
2240 if (6 === node.fiber.tag)
2241 debugInfo = describeTextDiff(i, node.serverProps, indent), indent++;
2242 else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
2243 if (void 0 === node.serverProps) {
2244 debugInfo = indent;
2245 var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
2246 for (propName in i)
2247 if (i.hasOwnProperty(propName) && "children" !== propName) {
2248 var propValue = describePropValue(i[propName], 15);
2249 maxLength -= propName.length + propValue.length + 2;
2250 if (0 > maxLength) {
2251 content += " ...";
2252 break;
2253 }
2254 content += " " + propName + "=" + propValue;
2255 }
2256 debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
2257 indent++;
2258 } else
2259 null === node.serverProps ? (debugInfo = describeExpandedElement(
2260 serverComponentName,
2261 i,
2262 added(indent)
2263 ), indent++) : "string" === typeof node.serverProps ? console.error(
2264 "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
2265 ) : (debugInfo = describeElementDiff(
2266 serverComponentName,
2267 i,
2268 node.serverProps,
2269 indent
2270 ), indent++);
2271 var propName = "";
2272 i = node.fiber.child;
2273 for (serverComponentName = 0; i && serverComponentName < node.children.length; )
2274 maxLength = node.children[serverComponentName], maxLength.fiber === i ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i, indent), i = i.sibling;
2275 i && 0 < node.children.length && (propName += indentation(indent) + "...\n");
2276 i = node.serverTail;
2277 null === node.serverProps && indent--;
2278 for (node = 0; node < i.length; node++)
2279 serverComponentName = i[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
2280 serverComponentName.type,
2281 serverComponentName.props,
2282 removed(indent)
2283 );
2284 return skipToNode + debugInfo + propName;
2285 }
2286 function describeDiff(rootNode) {
2287 try {
2288 return "\n\n" + describeNode(rootNode, 0);
2289 } catch (x) {
2290 return "";
2291 }
2292 }
2293 function describeAncestors(ancestor, child, props) {
2294 for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
2295 fiber === ancestor && (distanceFromLeaf = 0), node = {
2296 fiber,
2297 children: null !== node ? [node] : [],
2298 serverProps: fiber === child ? props : fiber === ancestor ? null : void 0,
2299 serverTail: [],
2300 distanceFromLeaf
2301 }, distanceFromLeaf++, fiber = fiber.return;
2302 return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
2303 }
2304 function updatedAncestorInfoDev(oldInfo, tag) {
2305 var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev), info = { tag };
2306 -1 !== inScopeTags.indexOf(tag) && (ancestorInfo.aTagInScope = null, ancestorInfo.buttonTagInScope = null, ancestorInfo.nobrTagInScope = null);
2307 -1 !== buttonScopeTags.indexOf(tag) && (ancestorInfo.pTagInButtonScope = null);
2308 -1 !== specialTags.indexOf(tag) && "address" !== tag && "div" !== tag && "p" !== tag && (ancestorInfo.listItemTagAutoclosing = null, ancestorInfo.dlItemTagAutoclosing = null);
2309 ancestorInfo.current = info;
2310 "form" === tag && (ancestorInfo.formTag = info);
2311 "a" === tag && (ancestorInfo.aTagInScope = info);
2312 "button" === tag && (ancestorInfo.buttonTagInScope = info);
2313 "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
2314 "p" === tag && (ancestorInfo.pTagInButtonScope = info);
2315 "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
2316 if ("dd" === tag || "dt" === tag)
2317 ancestorInfo.dlItemTagAutoclosing = info;
2318 "#document" === tag || "html" === tag ? ancestorInfo.containerTagInScope = null : ancestorInfo.containerTagInScope || (ancestorInfo.containerTagInScope = info);
2319 null !== oldInfo || "#document" !== tag && "html" !== tag && "body" !== tag ? true === ancestorInfo.implicitRootScope && (ancestorInfo.implicitRootScope = false) : ancestorInfo.implicitRootScope = true;
2320 return ancestorInfo;
2321 }
2322 function isTagValidWithParent(tag, parentTag, implicitRootScope) {
2323 switch (parentTag) {
2324 case "select":
2325 return "hr" === tag || "option" === tag || "optgroup" === tag || "script" === tag || "template" === tag || "#text" === tag;
2326 case "optgroup":
2327 return "option" === tag || "#text" === tag;
2328 case "option":
2329 return "#text" === tag;
2330 case "tr":
2331 return "th" === tag || "td" === tag || "style" === tag || "script" === tag || "template" === tag;
2332 case "tbody":
2333 case "thead":
2334 case "tfoot":
2335 return "tr" === tag || "style" === tag || "script" === tag || "template" === tag;
2336 case "colgroup":
2337 return "col" === tag || "template" === tag;
2338 case "table":
2339 return "caption" === tag || "colgroup" === tag || "tbody" === tag || "tfoot" === tag || "thead" === tag || "style" === tag || "script" === tag || "template" === tag;
2340 case "head":
2341 return "base" === tag || "basefont" === tag || "bgsound" === tag || "link" === tag || "meta" === tag || "title" === tag || "noscript" === tag || "noframes" === tag || "style" === tag || "script" === tag || "template" === tag;
2342 case "html":
2343 if (implicitRootScope) break;
2344 return "head" === tag || "body" === tag || "frameset" === tag;
2345 case "frameset":
2346 return "frame" === tag;
2347 case "#document":
2348 if (!implicitRootScope) return "html" === tag;
2349 }
2350 switch (tag) {
2351 case "h1":
2352 case "h2":
2353 case "h3":
2354 case "h4":
2355 case "h5":
2356 case "h6":
2357 return "h1" !== parentTag && "h2" !== parentTag && "h3" !== parentTag && "h4" !== parentTag && "h5" !== parentTag && "h6" !== parentTag;
2358 case "rp":
2359 case "rt":
2360 return -1 === impliedEndTags.indexOf(parentTag);
2361 case "caption":
2362 case "col":
2363 case "colgroup":
2364 case "frameset":
2365 case "frame":
2366 case "tbody":
2367 case "td":
2368 case "tfoot":
2369 case "th":
2370 case "thead":
2371 case "tr":
2372 return null == parentTag;
2373 case "head":
2374 return implicitRootScope || null === parentTag;
2375 case "html":
2376 return implicitRootScope && "#document" === parentTag || null === parentTag;
2377 case "body":
2378 return implicitRootScope && ("#document" === parentTag || "html" === parentTag) || null === parentTag;
2379 }
2380 return true;
2381 }
2382 function findInvalidAncestorForTag(tag, ancestorInfo) {
2383 switch (tag) {
2384 case "address":
2385 case "article":
2386 case "aside":
2387 case "blockquote":
2388 case "center":
2389 case "details":
2390 case "dialog":
2391 case "dir":
2392 case "div":
2393 case "dl":
2394 case "fieldset":
2395 case "figcaption":
2396 case "figure":
2397 case "footer":
2398 case "header":
2399 case "hgroup":
2400 case "main":
2401 case "menu":
2402 case "nav":
2403 case "ol":
2404 case "p":
2405 case "section":
2406 case "summary":
2407 case "ul":
2408 case "pre":
2409 case "listing":
2410 case "table":
2411 case "hr":
2412 case "xmp":
2413 case "h1":
2414 case "h2":
2415 case "h3":
2416 case "h4":
2417 case "h5":
2418 case "h6":
2419 return ancestorInfo.pTagInButtonScope;
2420 case "form":
2421 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
2422 case "li":
2423 return ancestorInfo.listItemTagAutoclosing;
2424 case "dd":
2425 case "dt":
2426 return ancestorInfo.dlItemTagAutoclosing;
2427 case "button":
2428 return ancestorInfo.buttonTagInScope;
2429 case "a":
2430 return ancestorInfo.aTagInScope;
2431 case "nobr":
2432 return ancestorInfo.nobrTagInScope;
2433 }
2434 return null;
2435 }
2436 function findAncestor(parent, tagName) {
2437 for (; parent; ) {
2438 switch (parent.tag) {
2439 case 5:
2440 case 26:
2441 case 27:
2442 if (parent.type === tagName) return parent;
2443 }
2444 parent = parent.return;
2445 }
2446 return null;
2447 }
2448 function validateDOMNesting(childTag, ancestorInfo) {
2449 ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
2450 var parentInfo = ancestorInfo.current;
2451 ancestorInfo = (parentInfo = isTagValidWithParent(
2452 childTag,
2453 parentInfo && parentInfo.tag,
2454 ancestorInfo.implicitRootScope
2455 ) ? null : parentInfo) ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
2456 ancestorInfo = parentInfo || ancestorInfo;
2457 if (!ancestorInfo) return true;
2458 var ancestorTag = ancestorInfo.tag;
2459 ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
2460 if (didWarn[ancestorInfo]) return false;
2461 didWarn[ancestorInfo] = true;
2462 var ancestor = (ancestorInfo = current) ? findAncestor(ancestorInfo.return, ancestorTag) : null, ancestorDescription = null !== ancestorInfo && null !== ancestor ? describeAncestors(ancestor, ancestorInfo, null) : "", tagDisplayName = "<" + childTag + ">";
2463 parentInfo ? (parentInfo = "", "table" === ancestorTag && "tr" === childTag && (parentInfo += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."), console.error(
2464 "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
2465 tagDisplayName,
2466 ancestorTag,
2467 parentInfo,
2468 ancestorDescription
2469 )) : console.error(
2470 "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
2471 tagDisplayName,
2472 ancestorTag,
2473 ancestorDescription
2474 );
2475 ancestorInfo && (childTag = ancestorInfo.return, null === ancestor || null === childTag || ancestor === childTag && childTag._debugOwner === ancestorInfo._debugOwner || runWithFiberInDEV(ancestor, function() {
2476 console.error(
2477 "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
2478 ancestorTag,
2479 tagDisplayName
2480 );
2481 }));
2482 return false;
2483 }
2484 function validateTextNesting(childText, parentTag, implicitRootScope) {
2485 if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
2486 return true;
2487 implicitRootScope = "#text|" + parentTag;
2488 if (didWarn[implicitRootScope]) return false;
2489 didWarn[implicitRootScope] = true;
2490 var ancestor = (implicitRootScope = current) ? findAncestor(implicitRootScope, parentTag) : null;
2491 implicitRootScope = null !== implicitRootScope && null !== ancestor ? describeAncestors(
2492 ancestor,
2493 implicitRootScope,
2494 6 !== implicitRootScope.tag ? { children: null } : null
2495 ) : "";
2496 /\S/.test(childText) ? console.error(
2497 "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
2498 parentTag,
2499 implicitRootScope
2500 ) : console.error(
2501 "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s",
2502 parentTag,
2503 implicitRootScope
2504 );
2505 return false;
2506 }
2507 function setTextContent(node, text) {
2508 if (text) {
2509 var firstChild = node.firstChild;
2510 if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) {
2511 firstChild.nodeValue = text;
2512 return;
2513 }
2514 }
2515 node.textContent = text;
2516 }
2517 function camelize(string) {
2518 return string.replace(hyphenPattern, function(_, character) {
2519 return character.toUpperCase();
2520 });
2521 }
2522 function setValueForStyle(style2, styleName, value) {
2523 var isCustomProperty = 0 === styleName.indexOf("--");
2524 isCustomProperty || (-1 < styleName.indexOf("-") ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2525 "Unsupported style property %s. Did you mean %s?",
2526 styleName,
2527 camelize(styleName.replace(msPattern, "ms-"))
2528 )) : badVendoredStyleNamePattern.test(styleName) ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2529 "Unsupported vendor-prefixed style property %s. Did you mean %s?",
2530 styleName,
2531 styleName.charAt(0).toUpperCase() + styleName.slice(1)
2532 )) : !badStyleValueWithSemicolonPattern.test(value) || warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value] || (warnedStyleValues[value] = true, console.error(
2533 `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
2534 styleName,
2535 value.replace(badStyleValueWithSemicolonPattern, "")
2536 )), "number" === typeof value && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error(
2537 "`NaN` is an invalid value for the `%s` css style property.",
2538 styleName
2539 )) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error(
2540 "`Infinity` is an invalid value for the `%s` css style property.",
2541 styleName
2542 ))));
2543 null == value || "boolean" === typeof value || "" === value ? isCustomProperty ? style2.setProperty(styleName, "") : "float" === styleName ? style2.cssFloat = "" : style2[styleName] = "" : isCustomProperty ? style2.setProperty(styleName, value) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? "float" === styleName ? style2.cssFloat = value : (checkCSSPropertyStringCoercion(value, styleName), style2[styleName] = ("" + value).trim()) : style2[styleName] = value + "px";
2544 }
2545 function setValueForStyles(node, styles, prevStyles) {
2546 if (null != styles && "object" !== typeof styles)
2547 throw Error(
2548 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
2549 );
2550 styles && Object.freeze(styles);
2551 node = node.style;
2552 if (null != prevStyles) {
2553 if (styles) {
2554 var expandedUpdates = {};
2555 if (prevStyles) {
2556 for (var key in prevStyles)
2557 if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
2558 for (var longhands = shorthandToLonghand[key] || [key], i = 0; i < longhands.length; i++)
2559 expandedUpdates[longhands[i]] = key;
2560 }
2561 for (var _key in styles)
2562 if (styles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== styles[_key]))
2563 for (key = shorthandToLonghand[_key] || [_key], longhands = 0; longhands < key.length; longhands++)
2564 expandedUpdates[key[longhands]] = _key;
2565 _key = {};
2566 for (var key$jscomp$0 in styles)
2567 for (key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0], longhands = 0; longhands < key.length; longhands++)
2568 _key[key[longhands]] = key$jscomp$0;
2569 key$jscomp$0 = {};
2570 for (var _key2 in expandedUpdates)
2571 if (key = expandedUpdates[_key2], (longhands = _key[_key2]) && key !== longhands && (i = key + "," + longhands, !key$jscomp$0[i])) {
2572 key$jscomp$0[i] = true;
2573 i = console;
2574 var value = styles[key];
2575 i.error.call(
2576 i,
2577 "%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",
2578 null == value || "boolean" === typeof value || "" === value ? "Removing" : "Updating",
2579 key,
2580 longhands
2581 );
2582 }
2583 }
2584 for (var styleName in prevStyles)
2585 !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = "");
2586 for (var _styleName in styles)
2587 _key2 = styles[_styleName], styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== _key2 && setValueForStyle(node, _styleName, _key2);
2588 } else
2589 for (expandedUpdates in styles)
2590 styles.hasOwnProperty(expandedUpdates) && setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
2591 }
2592 function isCustomElement(tagName) {
2593 if (-1 === tagName.indexOf("-")) return false;
2594 switch (tagName) {
2595 case "annotation-xml":
2596 case "color-profile":
2597 case "font-face":
2598 case "font-face-src":
2599 case "font-face-uri":
2600 case "font-face-format":
2601 case "font-face-name":
2602 case "missing-glyph":
2603 return false;
2604 default:
2605 return true;
2606 }
2607 }
2608 function getAttributeAlias(name) {
2609 return aliases.get(name) || name;
2610 }
2611 function validateProperty$1(tagName, name) {
2612 if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
2613 return true;
2614 if (rARIACamel$1.test(name)) {
2615 tagName = "aria-" + name.slice(4).toLowerCase();
2616 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2617 if (null == tagName)
2618 return console.error(
2619 "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
2620 name
2621 ), warnedProperties$1[name] = true;
2622 if (name !== tagName)
2623 return console.error(
2624 "Invalid ARIA attribute `%s`. Did you mean `%s`?",
2625 name,
2626 tagName
2627 ), warnedProperties$1[name] = true;
2628 }
2629 if (rARIA$1.test(name)) {
2630 tagName = name.toLowerCase();
2631 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2632 if (null == tagName) return warnedProperties$1[name] = true, false;
2633 name !== tagName && (console.error(
2634 "Unknown ARIA attribute `%s`. Did you mean `%s`?",
2635 name,
2636 tagName
2637 ), warnedProperties$1[name] = true);
2638 }
2639 return true;
2640 }
2641 function validateProperties$2(type, props) {
2642 var invalidProps = [], key;
2643 for (key in props)
2644 validateProperty$1(type, key) || invalidProps.push(key);
2645 props = invalidProps.map(function(prop) {
2646 return "`" + prop + "`";
2647 }).join(", ");
2648 1 === invalidProps.length ? console.error(
2649 "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2650 props,
2651 type
2652 ) : 1 < invalidProps.length && console.error(
2653 "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2654 props,
2655 type
2656 );
2657 }
2658 function validateProperty(tagName, name, value, eventRegistry) {
2659 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
2660 return true;
2661 var lowerCasedName = name.toLowerCase();
2662 if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
2663 return console.error(
2664 "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
2665 ), warnedProperties[name] = true;
2666 if ("function" === typeof value && ("form" === tagName && "action" === name || "input" === tagName && "formAction" === name || "button" === tagName && "formAction" === name))
2667 return true;
2668 if (null != eventRegistry) {
2669 tagName = eventRegistry.possibleRegistrationNames;
2670 if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
2671 return true;
2672 eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
2673 if (null != eventRegistry)
2674 return console.error(
2675 "Invalid event handler property `%s`. Did you mean `%s`?",
2676 name,
2677 eventRegistry
2678 ), warnedProperties[name] = true;
2679 if (EVENT_NAME_REGEX.test(name))
2680 return console.error(
2681 "Unknown event handler property `%s`. It will be ignored.",
2682 name
2683 ), warnedProperties[name] = true;
2684 } else if (EVENT_NAME_REGEX.test(name))
2685 return INVALID_EVENT_NAME_REGEX.test(name) && console.error(
2686 "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
2687 name
2688 ), warnedProperties[name] = true;
2689 if (rARIA.test(name) || rARIACamel.test(name)) return true;
2690 if ("innerhtml" === lowerCasedName)
2691 return console.error(
2692 "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
2693 ), warnedProperties[name] = true;
2694 if ("aria" === lowerCasedName)
2695 return console.error(
2696 "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
2697 ), warnedProperties[name] = true;
2698 if ("is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value)
2699 return console.error(
2700 "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
2701 typeof value
2702 ), warnedProperties[name] = true;
2703 if ("number" === typeof value && isNaN(value))
2704 return console.error(
2705 "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
2706 name
2707 ), warnedProperties[name] = true;
2708 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
2709 if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name)
2710 return console.error(
2711 "Invalid DOM property `%s`. Did you mean `%s`?",
2712 name,
2713 lowerCasedName
2714 ), warnedProperties[name] = true;
2715 } else if (name !== lowerCasedName)
2716 return console.error(
2717 "React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
2718 name,
2719 lowerCasedName
2720 ), warnedProperties[name] = true;
2721 switch (name) {
2722 case "dangerouslySetInnerHTML":
2723 case "children":
2724 case "style":
2725 case "suppressContentEditableWarning":
2726 case "suppressHydrationWarning":
2727 case "defaultValue":
2728 case "defaultChecked":
2729 case "innerHTML":
2730 case "ref":
2731 return true;
2732 case "innerText":
2733 case "textContent":
2734 return true;
2735 }
2736 switch (typeof value) {
2737 case "boolean":
2738 switch (name) {
2739 case "autoFocus":
2740 case "checked":
2741 case "multiple":
2742 case "muted":
2743 case "selected":
2744 case "contentEditable":
2745 case "spellCheck":
2746 case "draggable":
2747 case "value":
2748 case "autoReverse":
2749 case "externalResourcesRequired":
2750 case "focusable":
2751 case "preserveAlpha":
2752 case "allowFullScreen":
2753 case "async":
2754 case "autoPlay":
2755 case "controls":
2756 case "default":
2757 case "defer":
2758 case "disabled":
2759 case "disablePictureInPicture":
2760 case "disableRemotePlayback":
2761 case "formNoValidate":
2762 case "hidden":
2763 case "loop":
2764 case "noModule":
2765 case "noValidate":
2766 case "open":
2767 case "playsInline":
2768 case "readOnly":
2769 case "required":
2770 case "reversed":
2771 case "scoped":
2772 case "seamless":
2773 case "itemScope":
2774 case "capture":
2775 case "download":
2776 case "inert":
2777 return true;
2778 default:
2779 lowerCasedName = name.toLowerCase().slice(0, 5);
2780 if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
2781 return true;
2782 value ? console.error(
2783 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',
2784 value,
2785 name,
2786 name,
2787 value,
2788 name
2789 ) : console.error(
2790 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
2791 value,
2792 name,
2793 name,
2794 value,
2795 name,
2796 name,
2797 name
2798 );
2799 return warnedProperties[name] = true;
2800 }
2801 case "function":
2802 case "symbol":
2803 return warnedProperties[name] = true, false;
2804 case "string":
2805 if ("false" === value || "true" === value) {
2806 switch (name) {
2807 case "checked":
2808 case "selected":
2809 case "multiple":
2810 case "muted":
2811 case "allowFullScreen":
2812 case "async":
2813 case "autoPlay":
2814 case "controls":
2815 case "default":
2816 case "defer":
2817 case "disabled":
2818 case "disablePictureInPicture":
2819 case "disableRemotePlayback":
2820 case "formNoValidate":
2821 case "hidden":
2822 case "loop":
2823 case "noModule":
2824 case "noValidate":
2825 case "open":
2826 case "playsInline":
2827 case "readOnly":
2828 case "required":
2829 case "reversed":
2830 case "scoped":
2831 case "seamless":
2832 case "itemScope":
2833 case "inert":
2834 break;
2835 default:
2836 return true;
2837 }
2838 console.error(
2839 "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
2840 value,
2841 name,
2842 "false" === value ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".',
2843 name,
2844 value
2845 );
2846 warnedProperties[name] = true;
2847 }
2848 }
2849 return true;
2850 }
2851 function warnUnknownProperties(type, props, eventRegistry) {
2852 var unknownProps = [], key;
2853 for (key in props)
2854 validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key);
2855 props = unknownProps.map(function(prop) {
2856 return "`" + prop + "`";
2857 }).join(", ");
2858 1 === unknownProps.length ? console.error(
2859 "Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",
2860 props,
2861 type
2862 ) : 1 < unknownProps.length && console.error(
2863 "Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",
2864 props,
2865 type
2866 );
2867 }
2868 function sanitizeURL(url) {
2869 return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
2870 }
2871 function noop$1() {
2872 }
2873 function getEventTarget(nativeEvent) {
2874 nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
2875 nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement);
2876 return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
2877 }
2878 function restoreStateOfTarget(target) {
2879 var internalInstance = getInstanceFromNode(target);
2880 if (internalInstance && (target = internalInstance.stateNode)) {
2881 var props = target[internalPropsKey] || null;
2882 a: switch (target = internalInstance.stateNode, internalInstance.type) {
2883 case "input":
2884 updateInput(
2885 target,
2886 props.value,
2887 props.defaultValue,
2888 props.defaultValue,
2889 props.checked,
2890 props.defaultChecked,
2891 props.type,
2892 props.name
2893 );
2894 internalInstance = props.name;
2895 if ("radio" === props.type && null != internalInstance) {
2896 for (props = target; props.parentNode; ) props = props.parentNode;
2897 checkAttributeStringCoercion(internalInstance, "name");
2898 props = props.querySelectorAll(
2899 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
2900 "" + internalInstance
2901 ) + '"][type="radio"]'
2902 );
2903 for (internalInstance = 0; internalInstance < props.length; internalInstance++) {
2904 var otherNode = props[internalInstance];
2905 if (otherNode !== target && otherNode.form === target.form) {
2906 var otherProps = otherNode[internalPropsKey] || null;
2907 if (!otherProps)
2908 throw Error(
2909 "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
2910 );
2911 updateInput(
2912 otherNode,
2913 otherProps.value,
2914 otherProps.defaultValue,
2915 otherProps.defaultValue,
2916 otherProps.checked,
2917 otherProps.defaultChecked,
2918 otherProps.type,
2919 otherProps.name
2920 );
2921 }
2922 }
2923 for (internalInstance = 0; internalInstance < props.length; internalInstance++)
2924 otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
2925 }
2926 break a;
2927 case "textarea":
2928 updateTextarea(target, props.value, props.defaultValue);
2929 break a;
2930 case "select":
2931 internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false);
2932 }
2933 }
2934 }
2935 function batchedUpdates$1(fn, a, b) {
2936 if (isInsideEventHandler) return fn(a, b);
2937 isInsideEventHandler = true;
2938 try {
2939 var JSCompiler_inline_result = fn(a);
2940 return JSCompiler_inline_result;
2941 } finally {
2942 if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) {
2943 if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn))
2944 for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
2945 }
2946 }
2947 }
2948 function getListener(inst, registrationName) {
2949 var stateNode = inst.stateNode;
2950 if (null === stateNode) return null;
2951 var props = stateNode[internalPropsKey] || null;
2952 if (null === props) return null;
2953 stateNode = props[registrationName];
2954 a: switch (registrationName) {
2955 case "onClick":
2956 case "onClickCapture":
2957 case "onDoubleClick":
2958 case "onDoubleClickCapture":
2959 case "onMouseDown":
2960 case "onMouseDownCapture":
2961 case "onMouseMove":
2962 case "onMouseMoveCapture":
2963 case "onMouseUp":
2964 case "onMouseUpCapture":
2965 case "onMouseEnter":
2966 (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
2967 inst = !props;
2968 break a;
2969 default:
2970 inst = false;
2971 }
2972 if (inst) return null;
2973 if (stateNode && "function" !== typeof stateNode)
2974 throw Error(
2975 "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof stateNode + "` type."
2976 );
2977 return stateNode;
2978 }
2979 function getData() {
2980 if (fallbackText) return fallbackText;
2981 var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
2982 for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
2983 var minEnd = startLength - start;
2984 for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
2985 return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
2986 }
2987 function getEventCharCode(nativeEvent) {
2988 var keyCode = nativeEvent.keyCode;
2989 "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode;
2990 10 === nativeEvent && (nativeEvent = 13);
2991 return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
2992 }
2993 function functionThatReturnsTrue() {
2994 return true;
2995 }
2996 function functionThatReturnsFalse() {
2997 return false;
2998 }
2999 function createSyntheticEvent(Interface) {
3000 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
3001 this._reactName = reactName;
3002 this._targetInst = targetInst;
3003 this.type = reactEventType;
3004 this.nativeEvent = nativeEvent;
3005 this.target = nativeEventTarget;
3006 this.currentTarget = null;
3007 for (var propName in Interface)
3008 Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
3009 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
3010 this.isPropagationStopped = functionThatReturnsFalse;
3011 return this;
3012 }
3013 assign(SyntheticBaseEvent.prototype, {
3014 preventDefault: function() {
3015 this.defaultPrevented = true;
3016 var event = this.nativeEvent;
3017 event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
3018 },
3019 stopPropagation: function() {
3020 var event = this.nativeEvent;
3021 event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
3022 },
3023 persist: function() {
3024 },
3025 isPersistent: functionThatReturnsTrue
3026 });
3027 return SyntheticBaseEvent;
3028 }
3029 function modifierStateGetter(keyArg) {
3030 var nativeEvent = this.nativeEvent;
3031 return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false;
3032 }
3033 function getEventModifierState() {
3034 return modifierStateGetter;
3035 }
3036 function isFallbackCompositionEnd(domEventName, nativeEvent) {
3037 switch (domEventName) {
3038 case "keyup":
3039 return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
3040 case "keydown":
3041 return nativeEvent.keyCode !== START_KEYCODE;
3042 case "keypress":
3043 case "mousedown":
3044 case "focusout":
3045 return true;
3046 default:
3047 return false;
3048 }
3049 }
3050 function getDataFromCustomEvent(nativeEvent) {
3051 nativeEvent = nativeEvent.detail;
3052 return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
3053 }
3054 function getNativeBeforeInputChars(domEventName, nativeEvent) {
3055 switch (domEventName) {
3056 case "compositionend":
3057 return getDataFromCustomEvent(nativeEvent);
3058 case "keypress":
3059 if (nativeEvent.which !== SPACEBAR_CODE) return null;
3060 hasSpaceKeypress = true;
3061 return SPACEBAR_CHAR;
3062 case "textInput":
3063 return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
3064 default:
3065 return null;
3066 }
3067 }
3068 function getFallbackBeforeInputChars(domEventName, nativeEvent) {
3069 if (isComposing)
3070 return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = false, domEventName) : null;
3071 switch (domEventName) {
3072 case "paste":
3073 return null;
3074 case "keypress":
3075 if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
3076 if (nativeEvent.char && 1 < nativeEvent.char.length)
3077 return nativeEvent.char;
3078 if (nativeEvent.which)
3079 return String.fromCharCode(nativeEvent.which);
3080 }
3081 return null;
3082 case "compositionend":
3083 return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data;
3084 default:
3085 return null;
3086 }
3087 }
3088 function isTextInputElement(elem) {
3089 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3090 return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false;
3091 }
3092 function isEventSupported(eventNameSuffix) {
3093 if (!canUseDOM) return false;
3094 eventNameSuffix = "on" + eventNameSuffix;
3095 var isSupported = eventNameSuffix in document;
3096 isSupported || (isSupported = document.createElement("div"), isSupported.setAttribute(eventNameSuffix, "return;"), isSupported = "function" === typeof isSupported[eventNameSuffix]);
3097 return isSupported;
3098 }
3099 function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
3100 restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target;
3101 inst = accumulateTwoPhaseListeners(inst, "onChange");
3102 0 < inst.length && (nativeEvent = new SyntheticEvent(
3103 "onChange",
3104 "change",
3105 null,
3106 nativeEvent,
3107 target
3108 ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
3109 }
3110 function runEventInBatch(dispatchQueue) {
3111 processDispatchQueue(dispatchQueue, 0);
3112 }
3113 function getInstIfValueChanged(targetInst) {
3114 var targetNode = getNodeFromInstance(targetInst);
3115 if (updateValueIfChanged(targetNode)) return targetInst;
3116 }
3117 function getTargetInstForChangeEvent(domEventName, targetInst) {
3118 if ("change" === domEventName) return targetInst;
3119 }
3120 function stopWatchingForValueChange() {
3121 activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
3122 }
3123 function handlePropertyChange(nativeEvent) {
3124 if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) {
3125 var dispatchQueue = [];
3126 createAndAccumulateChangeEvent(
3127 dispatchQueue,
3128 activeElementInst$1,
3129 nativeEvent,
3130 getEventTarget(nativeEvent)
3131 );
3132 batchedUpdates$1(runEventInBatch, dispatchQueue);
3133 }
3134 }
3135 function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
3136 "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange();
3137 }
3138 function getTargetInstForInputEventPolyfill(domEventName) {
3139 if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName)
3140 return getInstIfValueChanged(activeElementInst$1);
3141 }
3142 function getTargetInstForClickEvent(domEventName, targetInst) {
3143 if ("click" === domEventName) return getInstIfValueChanged(targetInst);
3144 }
3145 function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
3146 if ("input" === domEventName || "change" === domEventName)
3147 return getInstIfValueChanged(targetInst);
3148 }
3149 function is(x, y) {
3150 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
3151 }
3152 function shallowEqual(objA, objB) {
3153 if (objectIs(objA, objB)) return true;
3154 if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
3155 return false;
3156 var keysA = Object.keys(objA), keysB = Object.keys(objB);
3157 if (keysA.length !== keysB.length) return false;
3158 for (keysB = 0; keysB < keysA.length; keysB++) {
3159 var currentKey = keysA[keysB];
3160 if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
3161 return false;
3162 }
3163 return true;
3164 }
3165 function getLeafNode(node) {
3166 for (; node && node.firstChild; ) node = node.firstChild;
3167 return node;
3168 }
3169 function getNodeForCharacterOffset(root2, offset) {
3170 var node = getLeafNode(root2);
3171 root2 = 0;
3172 for (var nodeEnd; node; ) {
3173 if (3 === node.nodeType) {
3174 nodeEnd = root2 + node.textContent.length;
3175 if (root2 <= offset && nodeEnd >= offset)
3176 return { node, offset: offset - root2 };
3177 root2 = nodeEnd;
3178 }
3179 a: {
3180 for (; node; ) {
3181 if (node.nextSibling) {
3182 node = node.nextSibling;
3183 break a;
3184 }
3185 node = node.parentNode;
3186 }
3187 node = void 0;
3188 }
3189 node = getLeafNode(node);
3190 }
3191 }
3192 function containsNode(outerNode, innerNode) {
3193 return outerNode && innerNode ? outerNode === innerNode ? true : outerNode && 3 === outerNode.nodeType ? false : innerNode && 3 === innerNode.nodeType ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : outerNode.compareDocumentPosition ? !!(outerNode.compareDocumentPosition(innerNode) & 16) : false : false;
3194 }
3195 function getActiveElementDeep(containerInfo) {
3196 containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window;
3197 for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
3198 try {
3199 var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href;
3200 } catch (err) {
3201 JSCompiler_inline_result = false;
3202 }
3203 if (JSCompiler_inline_result) containerInfo = element.contentWindow;
3204 else break;
3205 element = getActiveElement(containerInfo.document);
3206 }
3207 return element;
3208 }
3209 function hasSelectionCapabilities(elem) {
3210 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3211 return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable);
3212 }
3213 function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
3214 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument;
3215 mouseDown || null == activeElement || activeElement !== getActiveElement(doc) || (doc = activeElement, "selectionStart" in doc && hasSelectionCapabilities(doc) ? doc = { start: doc.selectionStart, end: doc.selectionEnd } : (doc = (doc.ownerDocument && doc.ownerDocument.defaultView || window).getSelection(), doc = {
3216 anchorNode: doc.anchorNode,
3217 anchorOffset: doc.anchorOffset,
3218 focusNode: doc.focusNode,
3219 focusOffset: doc.focusOffset
3220 }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
3221 "onSelect",
3222 "select",
3223 null,
3224 nativeEvent,
3225 nativeEventTarget
3226 ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
3227 }
3228 function makePrefixMap(styleProp, eventName) {
3229 var prefixes = {};
3230 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
3231 prefixes["Webkit" + styleProp] = "webkit" + eventName;
3232 prefixes["Moz" + styleProp] = "moz" + eventName;
3233 return prefixes;
3234 }
3235 function getVendorPrefixedEventName(eventName) {
3236 if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
3237 if (!vendorPrefixes[eventName]) return eventName;
3238 var prefixMap = vendorPrefixes[eventName], styleProp;
3239 for (styleProp in prefixMap)
3240 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
3241 return prefixedEventNames[eventName] = prefixMap[styleProp];
3242 return eventName;
3243 }
3244 function registerSimpleEvent(domEventName, reactName) {
3245 topLevelEventsToReactNames.set(domEventName, reactName);
3246 registerTwoPhaseEvent(reactName, [domEventName]);
3247 }
3248 function getArrayKind(array) {
3249 for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {
3250 var value = array[i];
3251 if ("object" === typeof value && null !== value)
3252 if (isArrayImpl(value) && 2 === value.length && "string" === typeof value[0]) {
3253 if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)
3254 return COMPLEX_ARRAY;
3255 kind = ENTRIES_ARRAY;
3256 } else return COMPLEX_ARRAY;
3257 else {
3258 if ("function" === typeof value || "string" === typeof value && 50 < value.length || kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)
3259 return COMPLEX_ARRAY;
3260 kind = PRIMITIVE_ARRAY;
3261 }
3262 }
3263 return kind;
3264 }
3265 function addObjectToProperties(object, properties, indent, prefix2) {
3266 for (var key in object)
3267 hasOwnProperty.call(object, key) && "_" !== key[0] && addValueToProperties(key, object[key], properties, indent, prefix2);
3268 }
3269 function addValueToProperties(propertyName, value, properties, indent, prefix2) {
3270 switch (typeof value) {
3271 case "object":
3272 if (null === value) {
3273 value = "null";
3274 break;
3275 } else {
3276 if ((value.$$typeof === REACT_ELEMENT_TYPE || (value.$$typeof === REACT_LEGACY_ELEMENT_TYPE && (__wpWarnCompat("legacy-element"), true)))) {
3277 var typeName2 = getComponentNameFromType(value.type) || "\u2026", key = value.key;
3278 value = value.props;
3279 var propsKeys = Object.keys(value), propsLength = propsKeys.length;
3280 if (null == key && 0 === propsLength) {
3281 value = "<" + typeName2 + " />";
3282 break;
3283 }
3284 if (3 > indent || 1 === propsLength && "children" === propsKeys[0] && null == key) {
3285 value = "<" + typeName2 + " \u2026 />";
3286 break;
3287 }
3288 properties.push([
3289 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3290 "<" + typeName2
3291 ]);
3292 null !== key && addValueToProperties(
3293 "key",
3294 key,
3295 properties,
3296 indent + 1,
3297 prefix2
3298 );
3299 propertyName = false;
3300 for (var propKey in value)
3301 "children" === propKey ? null != value.children && (!isArrayImpl(value.children) || 0 < value.children.length) && (propertyName = true) : hasOwnProperty.call(value, propKey) && "_" !== propKey[0] && addValueToProperties(
3302 propKey,
3303 value[propKey],
3304 properties,
3305 indent + 1,
3306 prefix2
3307 );
3308 properties.push([
3309 "",
3310 propertyName ? ">\u2026</" + typeName2 + ">" : "/>"
3311 ]);
3312 return;
3313 }
3314 typeName2 = Object.prototype.toString.call(value);
3315 typeName2 = typeName2.slice(8, typeName2.length - 1);
3316 if ("Array" === typeName2) {
3317 if (propKey = getArrayKind(value), propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY) {
3318 value = JSON.stringify(value);
3319 break;
3320 } else if (propKey === ENTRIES_ARRAY) {
3321 properties.push([
3322 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3323 ""
3324 ]);
3325 for (propertyName = 0; propertyName < value.length; propertyName++)
3326 typeName2 = value[propertyName], addValueToProperties(
3327 typeName2[0],
3328 typeName2[1],
3329 properties,
3330 indent + 1,
3331 prefix2
3332 );
3333 return;
3334 }
3335 }
3336 if ("Promise" === typeName2) {
3337 if ("fulfilled" === value.status) {
3338 if (typeName2 = properties.length, addValueToProperties(
3339 propertyName,
3340 value.value,
3341 properties,
3342 indent,
3343 prefix2
3344 ), properties.length > typeName2) {
3345 properties = properties[typeName2];
3346 properties[1] = "Promise<" + (properties[1] || "Object") + ">";
3347 return;
3348 }
3349 } else if ("rejected" === value.status && (typeName2 = properties.length, addValueToProperties(
3350 propertyName,
3351 value.reason,
3352 properties,
3353 indent,
3354 prefix2
3355 ), properties.length > typeName2)) {
3356 properties = properties[typeName2];
3357 properties[1] = "Rejected Promise<" + properties[1] + ">";
3358 return;
3359 }
3360 properties.push([
3361 "\xA0\xA0".repeat(indent) + propertyName,
3362 "Promise"
3363 ]);
3364 return;
3365 }
3366 "Object" === typeName2 && (propKey = Object.getPrototypeOf(value)) && "function" === typeof propKey.constructor && (typeName2 = propKey.constructor.name);
3367 properties.push([
3368 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3369 "Object" === typeName2 ? 3 > indent ? "" : "\u2026" : typeName2
3370 ]);
3371 3 > indent && addObjectToProperties(value, properties, indent + 1, prefix2);
3372 return;
3373 }
3374 case "function":
3375 value = "" === value.name ? "() => {}" : value.name + "() {}";
3376 break;
3377 case "string":
3378 value = value === OMITTED_PROP_ERROR ? "\u2026" : JSON.stringify(value);
3379 break;
3380 case "undefined":
3381 value = "undefined";
3382 break;
3383 case "boolean":
3384 value = value ? "true" : "false";
3385 break;
3386 default:
3387 value = String(value);
3388 }
3389 properties.push([
3390 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3391 value
3392 ]);
3393 }
3394 function addObjectDiffToProperties(prev, next, properties, indent) {
3395 var isDeeplyEqual = true;
3396 for (key in prev)
3397 key in next || (properties.push([
3398 REMOVED + "\xA0\xA0".repeat(indent) + key,
3399 "\u2026"
3400 ]), isDeeplyEqual = false);
3401 for (var _key in next)
3402 if (_key in prev) {
3403 var key = prev[_key];
3404 var nextValue = next[_key];
3405 if (key !== nextValue) {
3406 if (0 === indent && "children" === _key)
3407 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key, properties.push(
3408 [REMOVED + isDeeplyEqual, "\u2026"],
3409 [ADDED + isDeeplyEqual, "\u2026"]
3410 );
3411 else {
3412 if (!(3 <= indent)) {
3413 if ("object" === typeof key && "object" === typeof nextValue && null !== key && null !== nextValue && key.$$typeof === nextValue.$$typeof)
3414 if ((nextValue.$$typeof === REACT_ELEMENT_TYPE || (nextValue.$$typeof === REACT_LEGACY_ELEMENT_TYPE && (__wpWarnCompat("legacy-element"), true)))) {
3415 if (key.type === nextValue.type && key.key === nextValue.key) {
3416 key = getComponentNameFromType(nextValue.type) || "\u2026";
3417 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key;
3418 key = "<" + key + " \u2026 />";
3419 properties.push(
3420 [REMOVED + isDeeplyEqual, key],
3421 [ADDED + isDeeplyEqual, key]
3422 );
3423 isDeeplyEqual = false;
3424 continue;
3425 }
3426 } else {
3427 var prevKind = Object.prototype.toString.call(key), nextKind = Object.prototype.toString.call(nextValue);
3428 if (prevKind === nextKind && ("[object Object]" === nextKind || "[object Array]" === nextKind)) {
3429 prevKind = [
3430 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3431 "[object Array]" === nextKind ? "Array" : ""
3432 ];
3433 properties.push(prevKind);
3434 nextKind = properties.length;
3435 addObjectDiffToProperties(
3436 key,
3437 nextValue,
3438 properties,
3439 indent + 1
3440 ) ? nextKind === properties.length && (prevKind[1] = "Referentially unequal but deeply equal objects. Consider memoization.") : isDeeplyEqual = false;
3441 continue;
3442 }
3443 }
3444 else if ("function" === typeof key && "function" === typeof nextValue && key.name === nextValue.name && key.length === nextValue.length && (prevKind = Function.prototype.toString.call(key), nextKind = Function.prototype.toString.call(nextValue), prevKind === nextKind)) {
3445 key = "" === nextValue.name ? "() => {}" : nextValue.name + "() {}";
3446 properties.push([
3447 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3448 key + " Referentially unequal function closure. Consider memoization."
3449 ]);
3450 continue;
3451 }
3452 }
3453 addValueToProperties(_key, key, properties, indent, REMOVED);
3454 addValueToProperties(_key, nextValue, properties, indent, ADDED);
3455 }
3456 isDeeplyEqual = false;
3457 }
3458 } else
3459 properties.push([
3460 ADDED + "\xA0\xA0".repeat(indent) + _key,
3461 "\u2026"
3462 ]), isDeeplyEqual = false;
3463 return isDeeplyEqual;
3464 }
3465 function setCurrentTrackFromLanes(lanes) {
3466 currentTrack = lanes & 63 ? "Blocking" : lanes & 64 ? "Gesture" : lanes & 4194176 ? "Transition" : lanes & 62914560 ? "Suspense" : lanes & 2080374784 ? "Idle" : "Other";
3467 }
3468 function logComponentTrigger(fiber, startTime, endTime, trigger) {
3469 supportsUserTiming && (reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = trigger, reusableComponentDevToolDetails.properties = null, (fiber = fiber._debugTask) ? fiber.run(
3470 performance.measure.bind(
3471 performance,
3472 trigger,
3473 reusableComponentOptions
3474 )
3475 ) : performance.measure(trigger, reusableComponentOptions));
3476 }
3477 function logComponentReappeared(fiber, startTime, endTime) {
3478 logComponentTrigger(fiber, startTime, endTime, "Reconnect");
3479 }
3480 function logComponentRender(fiber, startTime, endTime, wasHydrated, committedLanes) {
3481 var name = getComponentNameFromFiber(fiber);
3482 if (null !== name && supportsUserTiming) {
3483 var alternate = fiber.alternate, selfTime = fiber.actualDuration;
3484 if (null === alternate || alternate.child !== fiber.child)
3485 for (var child = fiber.child; null !== child; child = child.sibling)
3486 selfTime -= child.actualDuration;
3487 wasHydrated = 0.5 > selfTime ? wasHydrated ? "tertiary-light" : "primary-light" : 10 > selfTime ? wasHydrated ? "tertiary" : "primary" : 100 > selfTime ? wasHydrated ? "tertiary-dark" : "primary-dark" : "error";
3488 var props = fiber.memoizedProps;
3489 selfTime = fiber._debugTask;
3490 null !== props && null !== alternate && alternate.memoizedProps !== props ? (child = [resuableChangedPropsEntry], props = addObjectDiffToProperties(
3491 alternate.memoizedProps,
3492 props,
3493 child,
3494 0
3495 ), 1 < child.length && (props && !alreadyWarnedForDeepEquality && 0 === (alternate.lanes & committedLanes) && 100 < fiber.actualDuration ? (alreadyWarnedForDeepEquality = true, child[0] = reusableDeeplyEqualPropsEntry, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = DEEP_EQUALITY_WARNING) : (reusableComponentDevToolDetails.color = wasHydrated, reusableComponentDevToolDetails.tooltipText = name), reusableComponentDevToolDetails.properties = child, reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, null != selfTime ? selfTime.run(
3496 performance.measure.bind(
3497 performance,
3498 "\u200B" + name,
3499 reusableComponentOptions
3500 )
3501 ) : performance.measure(
3502 "\u200B" + name,
3503 reusableComponentOptions
3504 ))) : null != selfTime ? selfTime.run(
3505 console.timeStamp.bind(
3506 console,
3507 name,
3508 startTime,
3509 endTime,
3510 COMPONENTS_TRACK,
3511 void 0,
3512 wasHydrated
3513 )
3514 ) : console.timeStamp(
3515 name,
3516 startTime,
3517 endTime,
3518 COMPONENTS_TRACK,
3519 void 0,
3520 wasHydrated
3521 );
3522 }
3523 }
3524 function logComponentErrored(fiber, startTime, endTime, errors) {
3525 if (supportsUserTiming) {
3526 var name = getComponentNameFromFiber(fiber);
3527 if (null !== name) {
3528 for (var debugTask = null, properties = [], i = 0; i < errors.length; i++) {
3529 var capturedValue = errors[i];
3530 null == debugTask && null !== capturedValue.source && (debugTask = capturedValue.source._debugTask);
3531 capturedValue = capturedValue.value;
3532 properties.push([
3533 "Error",
3534 "object" === typeof capturedValue && null !== capturedValue && "string" === typeof capturedValue.message ? String(capturedValue.message) : String(capturedValue)
3535 ]);
3536 }
3537 null !== fiber.key && addValueToProperties("key", fiber.key, properties, 0, "");
3538 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, properties, 0, "");
3539 null == debugTask && (debugTask = fiber._debugTask);
3540 fiber = {
3541 start: startTime,
3542 end: endTime,
3543 detail: {
3544 devtools: {
3545 color: "error",
3546 track: COMPONENTS_TRACK,
3547 tooltipText: 13 === fiber.tag ? "Hydration failed" : "Error boundary caught an error",
3548 properties
3549 }
3550 }
3551 };
3552 debugTask ? debugTask.run(
3553 performance.measure.bind(performance, "\u200B" + name, fiber)
3554 ) : performance.measure("\u200B" + name, fiber);
3555 }
3556 }
3557 }
3558 function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
3559 if (null !== errors) {
3560 if (supportsUserTiming) {
3561 var name = getComponentNameFromFiber(fiber);
3562 if (null !== name) {
3563 selfTime = [];
3564 for (var i = 0; i < errors.length; i++) {
3565 var error = errors[i].value;
3566 selfTime.push([
3567 "Error",
3568 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3569 ]);
3570 }
3571 null !== fiber.key && addValueToProperties("key", fiber.key, selfTime, 0, "");
3572 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, selfTime, 0, "");
3573 startTime = {
3574 start: startTime,
3575 end: endTime,
3576 detail: {
3577 devtools: {
3578 color: "error",
3579 track: COMPONENTS_TRACK,
3580 tooltipText: "A lifecycle or effect errored",
3581 properties: selfTime
3582 }
3583 }
3584 };
3585 (fiber = fiber._debugTask) ? fiber.run(
3586 performance.measure.bind(
3587 performance,
3588 "\u200B" + name,
3589 startTime
3590 )
3591 ) : performance.measure("\u200B" + name, startTime);
3592 }
3593 }
3594 } else
3595 name = getComponentNameFromFiber(fiber), null !== name && supportsUserTiming && (errors = 1 > selfTime ? "secondary-light" : 100 > selfTime ? "secondary" : 500 > selfTime ? "secondary-dark" : "error", (fiber = fiber._debugTask) ? fiber.run(
3596 console.timeStamp.bind(
3597 console,
3598 name,
3599 startTime,
3600 endTime,
3601 COMPONENTS_TRACK,
3602 void 0,
3603 errors
3604 )
3605 ) : console.timeStamp(
3606 name,
3607 startTime,
3608 endTime,
3609 COMPONENTS_TRACK,
3610 void 0,
3611 errors
3612 ));
3613 }
3614 function logRenderPhase(startTime, endTime, lanes, debugTask) {
3615 if (supportsUserTiming && !(endTime <= startTime)) {
3616 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark";
3617 lanes = (lanes & 536870912) === lanes ? "Prepared" : (lanes & 201326741) === lanes ? "Hydrated" : "Render";
3618 debugTask ? debugTask.run(
3619 console.timeStamp.bind(
3620 console,
3621 lanes,
3622 startTime,
3623 endTime,
3624 currentTrack,
3625 LANES_TRACK_GROUP,
3626 color
3627 )
3628 ) : console.timeStamp(
3629 lanes,
3630 startTime,
3631 endTime,
3632 currentTrack,
3633 LANES_TRACK_GROUP,
3634 color
3635 );
3636 }
3637 }
3638 function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {
3639 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3640 console.timeStamp.bind(
3641 console,
3642 "Prewarm",
3643 startTime,
3644 endTime,
3645 currentTrack,
3646 LANES_TRACK_GROUP,
3647 lanes
3648 )
3649 ) : console.timeStamp(
3650 "Prewarm",
3651 startTime,
3652 endTime,
3653 currentTrack,
3654 LANES_TRACK_GROUP,
3655 lanes
3656 ));
3657 }
3658 function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {
3659 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3660 console.timeStamp.bind(
3661 console,
3662 "Suspended",
3663 startTime,
3664 endTime,
3665 currentTrack,
3666 LANES_TRACK_GROUP,
3667 lanes
3668 )
3669 ) : console.timeStamp(
3670 "Suspended",
3671 startTime,
3672 endTime,
3673 currentTrack,
3674 LANES_TRACK_GROUP,
3675 lanes
3676 ));
3677 }
3678 function logRecoveredRenderPhase(startTime, endTime, lanes, recoverableErrors, hydrationFailed, debugTask) {
3679 if (supportsUserTiming && !(endTime <= startTime)) {
3680 lanes = [];
3681 for (var i = 0; i < recoverableErrors.length; i++) {
3682 var error = recoverableErrors[i].value;
3683 lanes.push([
3684 "Recoverable Error",
3685 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3686 ]);
3687 }
3688 startTime = {
3689 start: startTime,
3690 end: endTime,
3691 detail: {
3692 devtools: {
3693 color: "primary-dark",
3694 track: currentTrack,
3695 trackGroup: LANES_TRACK_GROUP,
3696 tooltipText: hydrationFailed ? "Hydration Failed" : "Recovered after Error",
3697 properties: lanes
3698 }
3699 }
3700 };
3701 debugTask ? debugTask.run(
3702 performance.measure.bind(performance, "Recovered", startTime)
3703 ) : performance.measure("Recovered", startTime);
3704 }
3705 }
3706 function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {
3707 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3708 console.timeStamp.bind(
3709 console,
3710 "Errored",
3711 startTime,
3712 endTime,
3713 currentTrack,
3714 LANES_TRACK_GROUP,
3715 "error"
3716 )
3717 ) : console.timeStamp(
3718 "Errored",
3719 startTime,
3720 endTime,
3721 currentTrack,
3722 LANES_TRACK_GROUP,
3723 "error"
3724 ));
3725 }
3726 function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
3727 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3728 console.timeStamp.bind(
3729 console,
3730 reason,
3731 startTime,
3732 endTime,
3733 currentTrack,
3734 LANES_TRACK_GROUP,
3735 "secondary-light"
3736 )
3737 ) : console.timeStamp(
3738 reason,
3739 startTime,
3740 endTime,
3741 currentTrack,
3742 LANES_TRACK_GROUP,
3743 "secondary-light"
3744 ));
3745 }
3746 function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
3747 if (supportsUserTiming && !(endTime <= startTime)) {
3748 for (var properties = [], i = 0; i < errors.length; i++) {
3749 var error = errors[i].value;
3750 properties.push([
3751 "Error",
3752 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3753 ]);
3754 }
3755 startTime = {
3756 start: startTime,
3757 end: endTime,
3758 detail: {
3759 devtools: {
3760 color: "error",
3761 track: currentTrack,
3762 trackGroup: LANES_TRACK_GROUP,
3763 tooltipText: passive ? "Remaining Effects Errored" : "Commit Errored",
3764 properties
3765 }
3766 }
3767 };
3768 debugTask ? debugTask.run(
3769 performance.measure.bind(performance, "Errored", startTime)
3770 ) : performance.measure("Errored", startTime);
3771 }
3772 }
3773 function logAnimatingPhase(startTime, endTime, debugTask) {
3774 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3775 console.timeStamp.bind(
3776 console,
3777 "Animating",
3778 startTime,
3779 endTime,
3780 currentTrack,
3781 LANES_TRACK_GROUP,
3782 "secondary-dark"
3783 )
3784 ) : console.timeStamp(
3785 "Animating",
3786 startTime,
3787 endTime,
3788 currentTrack,
3789 LANES_TRACK_GROUP,
3790 "secondary-dark"
3791 ));
3792 }
3793 function finishQueueingConcurrentUpdates() {
3794 for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
3795 var fiber = concurrentQueues[i];
3796 concurrentQueues[i++] = null;
3797 var queue = concurrentQueues[i];
3798 concurrentQueues[i++] = null;
3799 var update = concurrentQueues[i];
3800 concurrentQueues[i++] = null;
3801 var lane = concurrentQueues[i];
3802 concurrentQueues[i++] = null;
3803 if (null !== queue && null !== update) {
3804 var pending = queue.pending;
3805 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
3806 queue.pending = update;
3807 }
3808 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
3809 }
3810 }
3811 function enqueueUpdate$1(fiber, queue, update, lane) {
3812 concurrentQueues[concurrentQueuesIndex++] = fiber;
3813 concurrentQueues[concurrentQueuesIndex++] = queue;
3814 concurrentQueues[concurrentQueuesIndex++] = update;
3815 concurrentQueues[concurrentQueuesIndex++] = lane;
3816 concurrentlyUpdatedLanes |= lane;
3817 fiber.lanes |= lane;
3818 fiber = fiber.alternate;
3819 null !== fiber && (fiber.lanes |= lane);
3820 }
3821 function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
3822 enqueueUpdate$1(fiber, queue, update, lane);
3823 return getRootForUpdatedFiber(fiber);
3824 }
3825 function enqueueConcurrentRenderForLane(fiber, lane) {
3826 enqueueUpdate$1(fiber, null, null, lane);
3827 return getRootForUpdatedFiber(fiber);
3828 }
3829 function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
3830 sourceFiber.lanes |= lane;
3831 var alternate = sourceFiber.alternate;
3832 null !== alternate && (alternate.lanes |= lane);
3833 for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
3834 parent.childLanes |= lane, alternate = parent.alternate, null !== alternate && (alternate.childLanes |= lane), 22 === parent.tag && (sourceFiber = parent.stateNode, null === sourceFiber || sourceFiber._visibility & OffscreenVisible || (isHidden = true)), sourceFiber = parent, parent = parent.return;
3835 return 3 === sourceFiber.tag ? (parent = sourceFiber.stateNode, isHidden && null !== update && (isHidden = 31 - clz32(lane), sourceFiber = parent.hiddenUpdates, alternate = sourceFiber[isHidden], null === alternate ? sourceFiber[isHidden] = [update] : alternate.push(update), update.lane = lane | 536870912), parent) : null;
3836 }
3837 function getRootForUpdatedFiber(sourceFiber) {
3838 if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
3839 throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
3840 "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
3841 );
3842 nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
3843 "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
3844 ));
3845 null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
3846 for (var node = sourceFiber, parent = node.return; null !== parent; )
3847 null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
3848 return 3 === node.tag ? node.stateNode : null;
3849 }
3850 function resolveFunctionForHotReloading(type) {
3851 if (null === resolveFamily) return type;
3852 var family = resolveFamily(type);
3853 return void 0 === family ? type : family.current;
3854 }
3855 function resolveForwardRefForHotReloading(type) {
3856 if (null === resolveFamily) return type;
3857 var family = resolveFamily(type);
3858 return void 0 === family ? null !== type && void 0 !== type && "function" === typeof type.render && (family = resolveFunctionForHotReloading(type.render), type.render !== family) ? (family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }, void 0 !== type.displayName && (family.displayName = type.displayName), family) : type : family.current;
3859 }
3860 function isCompatibleFamilyForHotReloading(fiber, element) {
3861 if (null === resolveFamily) return false;
3862 var prevType = fiber.elementType;
3863 element = element.type;
3864 var needsCompareFamilies = false, $$typeofNextType = "object" === typeof element && null !== element ? element.$$typeof : null;
3865 switch (fiber.tag) {
3866 case 1:
3867 "function" === typeof element && (needsCompareFamilies = true);
3868 break;
3869 case 0:
3870 "function" === typeof element ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3871 break;
3872 case 11:
3873 $$typeofNextType === REACT_FORWARD_REF_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3874 break;
3875 case 14:
3876 case 15:
3877 $$typeofNextType === REACT_MEMO_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3878 break;
3879 default:
3880 return false;
3881 }
3882 return needsCompareFamilies && (fiber = resolveFamily(prevType), void 0 !== fiber && fiber === resolveFamily(element)) ? true : false;
3883 }
3884 function markFailedErrorBoundaryForHotReloading(fiber) {
3885 null !== resolveFamily && "function" === typeof WeakSet && (null === failedBoundaries && (failedBoundaries = /* @__PURE__ */ new WeakSet()), failedBoundaries.add(fiber));
3886 }
3887 function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
3888 do {
3889 var _fiber = fiber, alternate = _fiber.alternate, child = _fiber.child, sibling = _fiber.sibling, tag = _fiber.tag;
3890 _fiber = _fiber.type;
3891 var candidateType = null;
3892 switch (tag) {
3893 case 0:
3894 case 15:
3895 case 1:
3896 candidateType = _fiber;
3897 break;
3898 case 11:
3899 candidateType = _fiber.render;
3900 }
3901 if (null === resolveFamily)
3902 throw Error("Expected resolveFamily to be set during hot reload.");
3903 var needsRender = false;
3904 _fiber = false;
3905 null !== candidateType && (candidateType = resolveFamily(candidateType), void 0 !== candidateType && (staleFamilies.has(candidateType) ? _fiber = true : updatedFamilies.has(candidateType) && (1 === tag ? _fiber = true : needsRender = true)));
3906 null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (_fiber = true);
3907 _fiber && (fiber._debugNeedsRemount = true);
3908 if (_fiber || needsRender)
3909 alternate = enqueueConcurrentRenderForLane(fiber, 2), null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
3910 null === child || _fiber || scheduleFibersWithFamiliesRecursively(
3911 child,
3912 updatedFamilies,
3913 staleFamilies
3914 );
3915 if (null === sibling) break;
3916 fiber = sibling;
3917 } while (1);
3918 }
3919 function FiberNode(tag, pendingProps, key, mode) {
3920 this.tag = tag;
3921 this.key = key;
3922 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
3923 this.index = 0;
3924 this.refCleanup = this.ref = null;
3925 this.pendingProps = pendingProps;
3926 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
3927 this.mode = mode;
3928 this.subtreeFlags = this.flags = 0;
3929 this.deletions = null;
3930 this.childLanes = this.lanes = 0;
3931 this.alternate = null;
3932 this.actualDuration = -0;
3933 this.actualStartTime = -1.1;
3934 this.treeBaseDuration = this.selfBaseDuration = -0;
3935 this._debugTask = this._debugStack = this._debugOwner = this._debugInfo = null;
3936 this._debugNeedsRemount = false;
3937 this._debugHookTypes = null;
3938 hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
3939 }
3940 function shouldConstruct(Component) {
3941 Component = Component.prototype;
3942 return !(!Component || !Component.isReactComponent);
3943 }
3944 function createWorkInProgress(current2, pendingProps) {
3945 var workInProgress2 = current2.alternate;
3946 null === workInProgress2 ? (workInProgress2 = createFiber(
3947 current2.tag,
3948 pendingProps,
3949 current2.key,
3950 current2.mode
3951 ), workInProgress2.elementType = current2.elementType, workInProgress2.type = current2.type, workInProgress2.stateNode = current2.stateNode, workInProgress2._debugOwner = current2._debugOwner, workInProgress2._debugStack = current2._debugStack, workInProgress2._debugTask = current2._debugTask, workInProgress2._debugHookTypes = current2._debugHookTypes, workInProgress2.alternate = current2, current2.alternate = workInProgress2) : (workInProgress2.pendingProps = pendingProps, workInProgress2.type = current2.type, workInProgress2.flags = 0, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.actualDuration = -0, workInProgress2.actualStartTime = -1.1);
3952 workInProgress2.flags = current2.flags & 65011712;
3953 workInProgress2.childLanes = current2.childLanes;
3954 workInProgress2.lanes = current2.lanes;
3955 workInProgress2.child = current2.child;
3956 workInProgress2.memoizedProps = current2.memoizedProps;
3957 workInProgress2.memoizedState = current2.memoizedState;
3958 workInProgress2.updateQueue = current2.updateQueue;
3959 pendingProps = current2.dependencies;
3960 workInProgress2.dependencies = null === pendingProps ? null : {
3961 lanes: pendingProps.lanes,
3962 firstContext: pendingProps.firstContext,
3963 _debugThenableState: pendingProps._debugThenableState
3964 };
3965 workInProgress2.sibling = current2.sibling;
3966 workInProgress2.index = current2.index;
3967 workInProgress2.ref = current2.ref;
3968 workInProgress2.refCleanup = current2.refCleanup;
3969 workInProgress2.selfBaseDuration = current2.selfBaseDuration;
3970 workInProgress2.treeBaseDuration = current2.treeBaseDuration;
3971 workInProgress2._debugInfo = current2._debugInfo;
3972 workInProgress2._debugNeedsRemount = current2._debugNeedsRemount;
3973 switch (workInProgress2.tag) {
3974 case 0:
3975 case 15:
3976 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3977 break;
3978 case 1:
3979 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3980 break;
3981 case 11:
3982 workInProgress2.type = resolveForwardRefForHotReloading(current2.type);
3983 }
3984 return workInProgress2;
3985 }
3986 function resetWorkInProgress(workInProgress2, renderLanes2) {
3987 workInProgress2.flags &= 65011714;
3988 var current2 = workInProgress2.alternate;
3989 null === current2 ? (workInProgress2.childLanes = 0, workInProgress2.lanes = renderLanes2, workInProgress2.child = null, workInProgress2.subtreeFlags = 0, workInProgress2.memoizedProps = null, workInProgress2.memoizedState = null, workInProgress2.updateQueue = null, workInProgress2.dependencies = null, workInProgress2.stateNode = null, workInProgress2.selfBaseDuration = 0, workInProgress2.treeBaseDuration = 0) : (workInProgress2.childLanes = current2.childLanes, workInProgress2.lanes = current2.lanes, workInProgress2.child = current2.child, workInProgress2.subtreeFlags = 0, workInProgress2.deletions = null, workInProgress2.memoizedProps = current2.memoizedProps, workInProgress2.memoizedState = current2.memoizedState, workInProgress2.updateQueue = current2.updateQueue, workInProgress2.type = current2.type, renderLanes2 = current2.dependencies, workInProgress2.dependencies = null === renderLanes2 ? null : {
3990 lanes: renderLanes2.lanes,
3991 firstContext: renderLanes2.firstContext,
3992 _debugThenableState: renderLanes2._debugThenableState
3993 }, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
3994 return workInProgress2;
3995 }
3996 function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
3997 var fiberTag = 0, resolvedType = type;
3998 if ("function" === typeof type)
3999 shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
4000 else if ("string" === typeof type)
4001 fiberTag = getHostContext(), fiberTag = isHostHoistableType(type, pendingProps, fiberTag) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5;
4002 else
4003 a: switch (type) {
4004 case REACT_ACTIVITY_TYPE:
4005 return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
4006 case REACT_FRAGMENT_TYPE:
4007 return createFiberFromFragment(
4008 pendingProps.children,
4009 mode,
4010 lanes,
4011 key
4012 );
4013 case REACT_STRICT_MODE_TYPE:
4014 fiberTag = 8;
4015 mode |= StrictLegacyMode;
4016 mode |= StrictEffectsMode;
4017 break;
4018 case REACT_PROFILER_TYPE:
4019 return type = pendingProps, owner = mode, "string" !== typeof type.id && console.error(
4020 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
4021 typeof type.id
4022 ), key = createFiber(12, type, key, owner | ProfileMode), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
4023 case REACT_SUSPENSE_TYPE:
4024 return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
4025 case REACT_SUSPENSE_LIST_TYPE:
4026 return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
4027 default:
4028 if ("object" === typeof type && null !== type)
4029 switch (type.$$typeof) {
4030 case REACT_CONTEXT_TYPE:
4031 fiberTag = 10;
4032 break a;
4033 case REACT_CONSUMER_TYPE:
4034 fiberTag = 9;
4035 break a;
4036 case REACT_FORWARD_REF_TYPE:
4037 fiberTag = 11;
4038 resolvedType = resolveForwardRefForHotReloading(resolvedType);
4039 break a;
4040 case REACT_MEMO_TYPE:
4041 fiberTag = 14;
4042 break a;
4043 case REACT_LAZY_TYPE:
4044 fiberTag = 16;
4045 resolvedType = null;
4046 break a;
4047 }
4048 resolvedType = "";
4049 if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
4050 resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
4051 null === type ? pendingProps = "null" : isArrayImpl(type) ? pendingProps = "array" : void 0 !== type && (type.$$typeof === REACT_ELEMENT_TYPE || (type.$$typeof === REACT_LEGACY_ELEMENT_TYPE && (__wpWarnCompat("legacy-element"), true))) ? (pendingProps = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type;
4052 (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
4053 fiberTag = 29;
4054 pendingProps = Error(
4055 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (pendingProps + "." + resolvedType)
4056 );
4057 resolvedType = null;
4058 }
4059 key = createFiber(fiberTag, pendingProps, key, mode);
4060 key.elementType = type;
4061 key.type = resolvedType;
4062 key.lanes = lanes;
4063 key._debugOwner = owner;
4064 return key;
4065 }
4066 function createFiberFromElement(element, mode, lanes) {
4067 mode = createFiberFromTypeAndProps(
4068 element.type,
4069 element.key,
4070 element.props,
4071 element._owner,
4072 mode,
4073 lanes
4074 );
4075 mode._debugOwner = element._owner;
4076 mode._debugStack = element._debugStack;
4077 mode._debugTask = element._debugTask;
4078 return mode;
4079 }
4080 function createFiberFromFragment(elements, mode, lanes, key) {
4081 elements = createFiber(7, elements, key, mode);
4082 elements.lanes = lanes;
4083 return elements;
4084 }
4085 function createFiberFromText(content, mode, lanes) {
4086 content = createFiber(6, content, null, mode);
4087 content.lanes = lanes;
4088 return content;
4089 }
4090 function createFiberFromDehydratedFragment(dehydratedNode) {
4091 var fiber = createFiber(18, null, null, NoMode);
4092 fiber.stateNode = dehydratedNode;
4093 return fiber;
4094 }
4095 function createFiberFromPortal(portal, mode, lanes) {
4096 mode = createFiber(
4097 4,
4098 null !== portal.children ? portal.children : [],
4099 portal.key,
4100 mode
4101 );
4102 mode.lanes = lanes;
4103 mode.stateNode = {
4104 containerInfo: portal.containerInfo,
4105 pendingChildren: null,
4106 implementation: portal.implementation
4107 };
4108 return mode;
4109 }
4110 function createCapturedValueAtFiber(value, source) {
4111 if ("object" === typeof value && null !== value) {
4112 var existing = CapturedStacks.get(value);
4113 if (void 0 !== existing) return existing;
4114 source = {
4115 value,
4116 source,
4117 stack: getStackByFiberInDevAndProd(source)
4118 };
4119 CapturedStacks.set(value, source);
4120 return source;
4121 }
4122 return {
4123 value,
4124 source,
4125 stack: getStackByFiberInDevAndProd(source)
4126 };
4127 }
4128 function pushTreeFork(workInProgress2, totalChildren) {
4129 warnIfNotHydrating();
4130 forkStack[forkStackIndex++] = treeForkCount;
4131 forkStack[forkStackIndex++] = treeForkProvider;
4132 treeForkProvider = workInProgress2;
4133 treeForkCount = totalChildren;
4134 }
4135 function pushTreeId(workInProgress2, totalChildren, index) {
4136 warnIfNotHydrating();
4137 idStack[idStackIndex++] = treeContextId;
4138 idStack[idStackIndex++] = treeContextOverflow;
4139 idStack[idStackIndex++] = treeContextProvider;
4140 treeContextProvider = workInProgress2;
4141 var baseIdWithLeadingBit = treeContextId;
4142 workInProgress2 = treeContextOverflow;
4143 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
4144 baseIdWithLeadingBit &= ~(1 << baseLength);
4145 index += 1;
4146 var length = 32 - clz32(totalChildren) + baseLength;
4147 if (30 < length) {
4148 var numberOfOverflowBits = baseLength - baseLength % 5;
4149 length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
4150 baseIdWithLeadingBit >>= numberOfOverflowBits;
4151 baseLength -= numberOfOverflowBits;
4152 treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
4153 treeContextOverflow = length + workInProgress2;
4154 } else
4155 treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
4156 }
4157 function pushMaterializedTreeId(workInProgress2) {
4158 warnIfNotHydrating();
4159 null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
4160 }
4161 function popTreeContext(workInProgress2) {
4162 for (; workInProgress2 === treeForkProvider; )
4163 treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
4164 for (; workInProgress2 === treeContextProvider; )
4165 treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
4166 }
4167 function getSuspendedTreeContext() {
4168 warnIfNotHydrating();
4169 return null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null;
4170 }
4171 function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
4172 warnIfNotHydrating();
4173 idStack[idStackIndex++] = treeContextId;
4174 idStack[idStackIndex++] = treeContextOverflow;
4175 idStack[idStackIndex++] = treeContextProvider;
4176 treeContextId = suspendedContext.id;
4177 treeContextOverflow = suspendedContext.overflow;
4178 treeContextProvider = workInProgress2;
4179 }
4180 function warnIfNotHydrating() {
4181 isHydrating || console.error(
4182 "Expected to be hydrating. This is a bug in React. Please file an issue."
4183 );
4184 }
4185 function buildHydrationDiffNode(fiber, distanceFromLeaf) {
4186 if (null === fiber.return) {
4187 if (null === hydrationDiffRootDEV)
4188 hydrationDiffRootDEV = {
4189 fiber,
4190 children: [],
4191 serverProps: void 0,
4192 serverTail: [],
4193 distanceFromLeaf
4194 };
4195 else {
4196 if (hydrationDiffRootDEV.fiber !== fiber)
4197 throw Error(
4198 "Saw multiple hydration diff roots in a pass. This is a bug in React."
4199 );
4200 hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
4201 }
4202 return hydrationDiffRootDEV;
4203 }
4204 var siblings = buildHydrationDiffNode(
4205 fiber.return,
4206 distanceFromLeaf + 1
4207 ).children;
4208 if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
4209 return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
4210 distanceFromLeaf = {
4211 fiber,
4212 children: [],
4213 serverProps: void 0,
4214 serverTail: [],
4215 distanceFromLeaf
4216 };
4217 siblings.push(distanceFromLeaf);
4218 return distanceFromLeaf;
4219 }
4220 function warnIfHydrating() {
4221 isHydrating && console.error(
4222 "We should not be hydrating here. This is a bug in React. Please file a bug."
4223 );
4224 }
4225 function warnNonHydratedInstance(fiber, rejectedCandidate) {
4226 didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
4227 }
4228 function throwOnHydrationMismatch(fiber) {
4229 var fromText = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : false, diff = "", diffRoot = hydrationDiffRootDEV;
4230 null !== diffRoot && (hydrationDiffRootDEV = null, diff = describeDiff(diffRoot));
4231 queueHydrationError(
4232 createCapturedValueAtFiber(
4233 Error(
4234 "Hydration failed because the server rendered " + (fromText ? "text" : "HTML") + " didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" + diff
4235 ),
4236 fiber
4237 )
4238 );
4239 throw HydrationMismatchException;
4240 }
4241 function prepareToHydrateHostInstance(fiber) {
4242 var didHydrate = fiber.stateNode;
4243 var type = fiber.type, props = fiber.memoizedProps;
4244 didHydrate[internalInstanceKey] = fiber;
4245 didHydrate[internalPropsKey] = props;
4246 validatePropertiesInDevelopment(type, props);
4247 switch (type) {
4248 case "dialog":
4249 listenToNonDelegatedEvent("cancel", didHydrate);
4250 listenToNonDelegatedEvent("close", didHydrate);
4251 break;
4252 case "iframe":
4253 case "object":
4254 case "embed":
4255 listenToNonDelegatedEvent("load", didHydrate);
4256 break;
4257 case "video":
4258 case "audio":
4259 for (type = 0; type < mediaEventTypes.length; type++)
4260 listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
4261 break;
4262 case "source":
4263 listenToNonDelegatedEvent("error", didHydrate);
4264 break;
4265 case "img":
4266 case "image":
4267 case "link":
4268 listenToNonDelegatedEvent("error", didHydrate);
4269 listenToNonDelegatedEvent("load", didHydrate);
4270 break;
4271 case "details":
4272 listenToNonDelegatedEvent("toggle", didHydrate);
4273 break;
4274 case "input":
4275 checkControlledValueProps("input", props);
4276 listenToNonDelegatedEvent("invalid", didHydrate);
4277 validateInputProps(didHydrate, props);
4278 initInput(
4279 didHydrate,
4280 props.value,
4281 props.defaultValue,
4282 props.checked,
4283 props.defaultChecked,
4284 props.type,
4285 props.name,
4286 true
4287 );
4288 break;
4289 case "option":
4290 validateOptionProps(didHydrate, props);
4291 break;
4292 case "select":
4293 checkControlledValueProps("select", props);
4294 listenToNonDelegatedEvent("invalid", didHydrate);
4295 validateSelectProps(didHydrate, props);
4296 break;
4297 case "textarea":
4298 checkControlledValueProps("textarea", props), listenToNonDelegatedEvent("invalid", didHydrate), validateTextareaProps(didHydrate, props), initTextarea(
4299 didHydrate,
4300 props.value,
4301 props.defaultValue,
4302 props.children
4303 );
4304 }
4305 type = props.children;
4306 "string" !== typeof type && "number" !== typeof type && "bigint" !== typeof type || didHydrate.textContent === "" + type || true === props.suppressHydrationWarning || checkForUnmatchedText(didHydrate.textContent, type) ? (null != props.popover && (listenToNonDelegatedEvent("beforetoggle", didHydrate), listenToNonDelegatedEvent("toggle", didHydrate)), null != props.onScroll && listenToNonDelegatedEvent("scroll", didHydrate), null != props.onScrollEnd && listenToNonDelegatedEvent("scrollend", didHydrate), null != props.onClick && (didHydrate.onclick = noop$1), didHydrate = true) : didHydrate = false;
4307 didHydrate || throwOnHydrationMismatch(fiber, true);
4308 }
4309 function popToNextHostParent(fiber) {
4310 for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
4311 switch (hydrationParentFiber.tag) {
4312 case 5:
4313 case 31:
4314 case 13:
4315 rootOrSingletonContext = false;
4316 return;
4317 case 27:
4318 case 3:
4319 rootOrSingletonContext = true;
4320 return;
4321 default:
4322 hydrationParentFiber = hydrationParentFiber.return;
4323 }
4324 }
4325 function popHydrationState(fiber) {
4326 if (fiber !== hydrationParentFiber) return false;
4327 if (!isHydrating)
4328 return popToNextHostParent(fiber), isHydrating = true, false;
4329 var tag = fiber.tag, JSCompiler_temp;
4330 if (JSCompiler_temp = 3 !== tag && 27 !== tag) {
4331 if (JSCompiler_temp = 5 === tag)
4332 JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps);
4333 JSCompiler_temp = !JSCompiler_temp;
4334 }
4335 if (JSCompiler_temp && nextHydratableInstance) {
4336 for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
4337 var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(JSCompiler_temp);
4338 diffNode.serverTail.push(description);
4339 JSCompiler_temp = "Suspense" === description.type ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling);
4340 }
4341 throwOnHydrationMismatch(fiber);
4342 }
4343 popToNextHostParent(fiber);
4344 if (13 === tag) {
4345 fiber = fiber.memoizedState;
4346 fiber = null !== fiber ? fiber.dehydrated : null;
4347 if (!fiber)
4348 throw Error(
4349 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4350 );
4351 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4352 } else if (31 === tag) {
4353 fiber = fiber.memoizedState;
4354 fiber = null !== fiber ? fiber.dehydrated : null;
4355 if (!fiber)
4356 throw Error(
4357 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4358 );
4359 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4360 } else
4361 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
4362 return true;
4363 }
4364 function resetHydrationState() {
4365 nextHydratableInstance = hydrationParentFiber = null;
4366 didSuspendOrErrorDEV = isHydrating = false;
4367 }
4368 function upgradeHydrationErrorsToRecoverable() {
4369 var queuedErrors = hydrationErrors;
4370 null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
4371 workInProgressRootRecoverableErrors,
4372 queuedErrors
4373 ), hydrationErrors = null);
4374 return queuedErrors;
4375 }
4376 function queueHydrationError(error) {
4377 null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
4378 }
4379 function emitPendingHydrationWarnings() {
4380 var diffRoot = hydrationDiffRootDEV;
4381 if (null !== diffRoot) {
4382 hydrationDiffRootDEV = null;
4383 for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
4384 diffRoot = diffRoot.children[0];
4385 runWithFiberInDEV(diffRoot.fiber, function() {
4386 console.error(
4387 "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
4388 "https://react.dev/link/hydration-mismatch",
4389 diff
4390 );
4391 });
4392 }
4393 }
4394 function resetContextDependencies() {
4395 lastContextDependency = currentlyRenderingFiber$1 = null;
4396 isDisallowedContextReadInDEV = false;
4397 }
4398 function pushProvider(providerFiber, context, nextValue) {
4399 push(valueCursor, context._currentValue, providerFiber);
4400 context._currentValue = nextValue;
4401 push(rendererCursorDEV, context._currentRenderer, providerFiber);
4402 void 0 !== context._currentRenderer && null !== context._currentRenderer && context._currentRenderer !== rendererSigil && console.error(
4403 "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
4404 );
4405 context._currentRenderer = rendererSigil;
4406 }
4407 function popProvider(context, providerFiber) {
4408 context._currentValue = valueCursor.current;
4409 var currentRenderer = rendererCursorDEV.current;
4410 pop(rendererCursorDEV, providerFiber);
4411 context._currentRenderer = currentRenderer;
4412 pop(valueCursor, providerFiber);
4413 }
4414 function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
4415 for (; null !== parent; ) {
4416 var alternate = parent.alternate;
4417 (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
4418 if (parent === propagationRoot) break;
4419 parent = parent.return;
4420 }
4421 parent !== propagationRoot && console.error(
4422 "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
4423 );
4424 }
4425 function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
4426 var fiber = workInProgress2.child;
4427 null !== fiber && (fiber.return = workInProgress2);
4428 for (; null !== fiber; ) {
4429 var list = fiber.dependencies;
4430 if (null !== list) {
4431 var nextFiber = fiber.child;
4432 list = list.firstContext;
4433 a: for (; null !== list; ) {
4434 var dependency = list;
4435 list = fiber;
4436 for (var i = 0; i < contexts.length; i++)
4437 if (dependency.context === contexts[i]) {
4438 list.lanes |= renderLanes2;
4439 dependency = list.alternate;
4440 null !== dependency && (dependency.lanes |= renderLanes2);
4441 scheduleContextWorkOnParentPath(
4442 list.return,
4443 renderLanes2,
4444 workInProgress2
4445 );
4446 forcePropagateEntireTree || (nextFiber = null);
4447 break a;
4448 }
4449 list = dependency.next;
4450 }
4451 } else if (18 === fiber.tag) {
4452 nextFiber = fiber.return;
4453 if (null === nextFiber)
4454 throw Error(
4455 "We just came from a parent so we must have had a parent. This is a bug in React."
4456 );
4457 nextFiber.lanes |= renderLanes2;
4458 list = nextFiber.alternate;
4459 null !== list && (list.lanes |= renderLanes2);
4460 scheduleContextWorkOnParentPath(
4461 nextFiber,
4462 renderLanes2,
4463 workInProgress2
4464 );
4465 nextFiber = null;
4466 } else nextFiber = fiber.child;
4467 if (null !== nextFiber) nextFiber.return = fiber;
4468 else
4469 for (nextFiber = fiber; null !== nextFiber; ) {
4470 if (nextFiber === workInProgress2) {
4471 nextFiber = null;
4472 break;
4473 }
4474 fiber = nextFiber.sibling;
4475 if (null !== fiber) {
4476 fiber.return = nextFiber.return;
4477 nextFiber = fiber;
4478 break;
4479 }
4480 nextFiber = nextFiber.return;
4481 }
4482 fiber = nextFiber;
4483 }
4484 }
4485 function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
4486 current2 = null;
4487 for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
4488 if (!isInsidePropagationBailout) {
4489 if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
4490 else if (0 !== (parent.flags & 262144)) break;
4491 }
4492 if (10 === parent.tag) {
4493 var currentParent = parent.alternate;
4494 if (null === currentParent)
4495 throw Error("Should have a current fiber. This is a bug in React.");
4496 currentParent = currentParent.memoizedProps;
4497 if (null !== currentParent) {
4498 var context = parent.type;
4499 objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]);
4500 }
4501 } else if (parent === hostTransitionProviderCursor.current) {
4502 currentParent = parent.alternate;
4503 if (null === currentParent)
4504 throw Error("Should have a current fiber. This is a bug in React.");
4505 currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
4506 }
4507 parent = parent.return;
4508 }
4509 null !== current2 && propagateContextChanges(
4510 workInProgress2,
4511 current2,
4512 renderLanes2,
4513 forcePropagateEntireTree
4514 );
4515 workInProgress2.flags |= 262144;
4516 }
4517 function checkIfContextChanged(currentDependencies) {
4518 for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
4519 if (!objectIs(
4520 currentDependencies.context._currentValue,
4521 currentDependencies.memoizedValue
4522 ))
4523 return true;
4524 currentDependencies = currentDependencies.next;
4525 }
4526 return false;
4527 }
4528 function prepareToReadContext(workInProgress2) {
4529 currentlyRenderingFiber$1 = workInProgress2;
4530 lastContextDependency = null;
4531 workInProgress2 = workInProgress2.dependencies;
4532 null !== workInProgress2 && (workInProgress2.firstContext = null);
4533 }
4534 function readContext(context) {
4535 isDisallowedContextReadInDEV && console.error(
4536 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
4537 );
4538 return readContextForConsumer(currentlyRenderingFiber$1, context);
4539 }
4540 function readContextDuringReconciliation(consumer, context) {
4541 null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
4542 return readContextForConsumer(consumer, context);
4543 }
4544 function readContextForConsumer(consumer, context) {
4545 var value = context._currentValue;
4546 context = { context, memoizedValue: value, next: null };
4547 if (null === lastContextDependency) {
4548 if (null === consumer)
4549 throw Error(
4550 "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
4551 );
4552 lastContextDependency = context;
4553 consumer.dependencies = {
4554 lanes: 0,
4555 firstContext: context,
4556 _debugThenableState: null
4557 };
4558 consumer.flags |= 524288;
4559 } else lastContextDependency = lastContextDependency.next = context;
4560 return value;
4561 }
4562 function createCache() {
4563 return {
4564 controller: new AbortControllerLocal(),
4565 data: /* @__PURE__ */ new Map(),
4566 refCount: 0
4567 };
4568 }
4569 function retainCache(cache) {
4570 cache.controller.signal.aborted && console.warn(
4571 "A cache instance was retained after it was already freed. This likely indicates a bug in React."
4572 );
4573 cache.refCount++;
4574 }
4575 function releaseCache(cache) {
4576 cache.refCount--;
4577 0 > cache.refCount && console.warn(
4578 "A cache instance was released after it was already freed. This likely indicates a bug in React."
4579 );
4580 0 === cache.refCount && scheduleCallback$2(NormalPriority, function() {
4581 cache.controller.abort();
4582 });
4583 }
4584 function startUpdateTimerByLane(lane, method, fiber) {
4585 if (0 !== (lane & 127))
4586 0 > blockingUpdateTime && (blockingUpdateTime = now(), blockingUpdateTask = createTask(method), blockingUpdateMethodName = method, null != fiber && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), (executionContext & (RenderContext | CommitContext)) !== NoContext && (componentEffectSpawnedUpdate = true, blockingUpdateType = SPAWNED_UPDATE), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== method && (blockingUpdateType = SPAWNED_UPDATE), blockingEventTime = lane, blockingEventType = method);
4587 else if (0 !== (lane & 4194048) && 0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = createTask(method), transitionUpdateMethodName = method, null != fiber && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
4588 lane = resolveEventTimeStamp();
4589 method = resolveEventType();
4590 if (lane !== transitionEventRepeatTime || method !== transitionEventType)
4591 transitionEventRepeatTime = -1.1;
4592 transitionEventTime = lane;
4593 transitionEventType = method;
4594 }
4595 }
4596 function startHostActionTimer(fiber) {
4597 if (0 > blockingUpdateTime) {
4598 blockingUpdateTime = now();
4599 blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;
4600 (executionContext & (RenderContext | CommitContext)) !== NoContext && (blockingUpdateType = SPAWNED_UPDATE);
4601 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
4602 newEventTime !== blockingEventRepeatTime || newEventType !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);
4603 blockingEventTime = newEventTime;
4604 blockingEventType = newEventType;
4605 }
4606 if (0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = null != fiber._debugTask ? fiber._debugTask : null, 0 > transitionStartTime)) {
4607 fiber = resolveEventTimeStamp();
4608 newEventTime = resolveEventType();
4609 if (fiber !== transitionEventRepeatTime || newEventTime !== transitionEventType)
4610 transitionEventRepeatTime = -1.1;
4611 transitionEventTime = fiber;
4612 transitionEventType = newEventTime;
4613 }
4614 }
4615 function pushNestedEffectDurations() {
4616 var prevEffectDuration = profilerEffectDuration;
4617 profilerEffectDuration = 0;
4618 return prevEffectDuration;
4619 }
4620 function popNestedEffectDurations(prevEffectDuration) {
4621 var elapsedTime = profilerEffectDuration;
4622 profilerEffectDuration = prevEffectDuration;
4623 return elapsedTime;
4624 }
4625 function bubbleNestedEffectDurations(prevEffectDuration) {
4626 var elapsedTime = profilerEffectDuration;
4627 profilerEffectDuration += prevEffectDuration;
4628 return elapsedTime;
4629 }
4630 function resetComponentEffectTimers() {
4631 componentEffectEndTime = componentEffectStartTime = -1.1;
4632 }
4633 function pushComponentEffectStart() {
4634 var prevEffectStart = componentEffectStartTime;
4635 componentEffectStartTime = -1.1;
4636 return prevEffectStart;
4637 }
4638 function popComponentEffectStart(prevEffectStart) {
4639 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
4640 }
4641 function pushComponentEffectDuration() {
4642 var prevEffectDuration = componentEffectDuration;
4643 componentEffectDuration = -0;
4644 return prevEffectDuration;
4645 }
4646 function popComponentEffectDuration(prevEffectDuration) {
4647 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
4648 }
4649 function pushComponentEffectErrors() {
4650 var prevErrors = componentEffectErrors;
4651 componentEffectErrors = null;
4652 return prevErrors;
4653 }
4654 function pushComponentEffectDidSpawnUpdate() {
4655 var prev = componentEffectSpawnedUpdate;
4656 componentEffectSpawnedUpdate = false;
4657 return prev;
4658 }
4659 function startProfilerTimer(fiber) {
4660 profilerStartTime = now();
4661 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
4662 }
4663 function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
4664 if (0 <= profilerStartTime) {
4665 var elapsedTime = now() - profilerStartTime;
4666 fiber.actualDuration += elapsedTime;
4667 fiber.selfBaseDuration = elapsedTime;
4668 profilerStartTime = -1;
4669 }
4670 }
4671 function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
4672 if (0 <= profilerStartTime) {
4673 var elapsedTime = now() - profilerStartTime;
4674 fiber.actualDuration += elapsedTime;
4675 profilerStartTime = -1;
4676 }
4677 }
4678 function recordEffectDuration() {
4679 if (0 <= profilerStartTime) {
4680 var endTime = now(), elapsedTime = endTime - profilerStartTime;
4681 profilerStartTime = -1;
4682 profilerEffectDuration += elapsedTime;
4683 componentEffectDuration += elapsedTime;
4684 componentEffectEndTime = endTime;
4685 }
4686 }
4687 function recordEffectError(errorInfo) {
4688 null === componentEffectErrors && (componentEffectErrors = []);
4689 componentEffectErrors.push(errorInfo);
4690 null === commitErrors && (commitErrors = []);
4691 commitErrors.push(errorInfo);
4692 }
4693 function startEffectTimer() {
4694 profilerStartTime = now();
4695 0 > componentEffectStartTime && (componentEffectStartTime = profilerStartTime);
4696 }
4697 function transferActualDuration(fiber) {
4698 for (var child = fiber.child; child; )
4699 fiber.actualDuration += child.actualDuration, child = child.sibling;
4700 }
4701 function entangleAsyncAction(transition, thenable) {
4702 if (null === currentEntangledListeners) {
4703 var entangledListeners = currentEntangledListeners = [];
4704 currentEntangledPendingCount = 0;
4705 currentEntangledLane = requestTransitionLane();
4706 currentEntangledActionThenable = {
4707 status: "pending",
4708 value: void 0,
4709 then: function(resolve) {
4710 entangledListeners.push(resolve);
4711 }
4712 };
4713 }
4714 currentEntangledPendingCount++;
4715 thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
4716 return thenable;
4717 }
4718 function pingEngtangledActionScope() {
4719 if (0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), null !== currentEntangledListeners)) {
4720 null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
4721 var listeners = currentEntangledListeners;
4722 currentEntangledListeners = null;
4723 currentEntangledLane = 0;
4724 currentEntangledActionThenable = null;
4725 for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
4726 }
4727 }
4728 function chainThenableValue(thenable, result) {
4729 var listeners = [], thenableWithOverride = {
4730 status: "pending",
4731 value: null,
4732 reason: null,
4733 then: function(resolve) {
4734 listeners.push(resolve);
4735 }
4736 };
4737 thenable.then(
4738 function() {
4739 thenableWithOverride.status = "fulfilled";
4740 thenableWithOverride.value = result;
4741 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
4742 },
4743 function(error) {
4744 thenableWithOverride.status = "rejected";
4745 thenableWithOverride.reason = error;
4746 for (error = 0; error < listeners.length; error++)
4747 (0, listeners[error])(void 0);
4748 }
4749 );
4750 return thenableWithOverride;
4751 }
4752 function peekCacheFromPool() {
4753 var cacheResumedFromPreviousRender = resumedCache.current;
4754 return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
4755 }
4756 function pushTransition(offscreenWorkInProgress, prevCachePool) {
4757 null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
4758 }
4759 function getSuspendedCache() {
4760 var cacheFromPool = peekCacheFromPool();
4761 return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
4762 }
4763 function createThenableState() {
4764 return { didWarnAboutUncachedPromise: false, thenables: [] };
4765 }
4766 function isThenableResolved(thenable) {
4767 thenable = thenable.status;
4768 return "fulfilled" === thenable || "rejected" === thenable;
4769 }
4770 function trackUsedThenable(thenableState2, thenable, index) {
4771 null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
4772 var trackedThenables = thenableState2.thenables;
4773 index = trackedThenables[index];
4774 void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
4775 "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
4776 )), thenable.then(noop$1, noop$1), thenable = index);
4777 if (void 0 === thenable._debugInfo) {
4778 thenableState2 = performance.now();
4779 trackedThenables = thenable.displayName;
4780 var ioInfo = {
4781 name: "string" === typeof trackedThenables ? trackedThenables : "Promise",
4782 start: thenableState2,
4783 end: thenableState2,
4784 value: thenable
4785 };
4786 thenable._debugInfo = [{ awaited: ioInfo }];
4787 "fulfilled" !== thenable.status && "rejected" !== thenable.status && (thenableState2 = function() {
4788 ioInfo.end = performance.now();
4789 }, thenable.then(thenableState2, thenableState2));
4790 }
4791 switch (thenable.status) {
4792 case "fulfilled":
4793 return thenable.value;
4794 case "rejected":
4795 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4796 default:
4797 if ("string" === typeof thenable.status)
4798 thenable.then(noop$1, noop$1);
4799 else {
4800 thenableState2 = workInProgressRoot;
4801 if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
4802 throw Error(
4803 "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4804 );
4805 thenableState2 = thenable;
4806 thenableState2.status = "pending";
4807 thenableState2.then(
4808 function(fulfilledValue) {
4809 if ("pending" === thenable.status) {
4810 var fulfilledThenable = thenable;
4811 fulfilledThenable.status = "fulfilled";
4812 fulfilledThenable.value = fulfilledValue;
4813 }
4814 },
4815 function(error) {
4816 if ("pending" === thenable.status) {
4817 var rejectedThenable = thenable;
4818 rejectedThenable.status = "rejected";
4819 rejectedThenable.reason = error;
4820 }
4821 }
4822 );
4823 }
4824 switch (thenable.status) {
4825 case "fulfilled":
4826 return thenable.value;
4827 case "rejected":
4828 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4829 }
4830 suspendedThenable = thenable;
4831 needsToResetSuspendedThenableDEV = true;
4832 throw SuspenseException;
4833 }
4834 }
4835 function resolveLazy(lazyType) {
4836 try {
4837 return callLazyInitInDEV(lazyType);
4838 } catch (x) {
4839 if (null !== x && "object" === typeof x && "function" === typeof x.then)
4840 throw suspendedThenable = x, needsToResetSuspendedThenableDEV = true, SuspenseException;
4841 throw x;
4842 }
4843 }
4844 function getSuspendedThenable() {
4845 if (null === suspendedThenable)
4846 throw Error(
4847 "Expected a suspended thenable. This is a bug in React. Please file an issue."
4848 );
4849 var thenable = suspendedThenable;
4850 suspendedThenable = null;
4851 needsToResetSuspendedThenableDEV = false;
4852 return thenable;
4853 }
4854 function checkIfUseWrappedInAsyncCatch(rejectedReason) {
4855 if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
4856 throw Error(
4857 "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
4858 );
4859 }
4860 function pushDebugInfo(debugInfo) {
4861 var previousDebugInfo = currentDebugInfo;
4862 null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
4863 return previousDebugInfo;
4864 }
4865 function getCurrentDebugTask() {
4866 var debugInfo = currentDebugInfo;
4867 if (null != debugInfo) {
4868 for (var i = debugInfo.length - 1; 0 <= i; i--)
4869 if (null != debugInfo[i].name) {
4870 var debugTask = debugInfo[i].debugTask;
4871 if (null != debugTask) return debugTask;
4872 }
4873 }
4874 return null;
4875 }
4876 function validateFragmentProps(element, fiber, returnFiber) {
4877 for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
4878 var key = keys[i];
4879 if ("children" !== key && "key" !== key) {
4880 null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
4881 runWithFiberInDEV(
4882 fiber,
4883 function(erroredKey) {
4884 console.error(
4885 "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
4886 erroredKey
4887 );
4888 },
4889 key
4890 );
4891 break;
4892 }
4893 }
4894 }
4895 function unwrapThenable(thenable) {
4896 var index = thenableIndexCounter$1;
4897 thenableIndexCounter$1 += 1;
4898 null === thenableState$1 && (thenableState$1 = createThenableState());
4899 return trackUsedThenable(thenableState$1, thenable, index);
4900 }
4901 function coerceRef(workInProgress2, element) {
4902 element = (element.props.ref ?? element.ref);
4903 workInProgress2.ref = void 0 !== element ? element : null;
4904 }
4905 function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
4906 if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
4907 throw Error(
4908 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
4909 );
4910 returnFiber = Object.prototype.toString.call(newChild);
4911 throw Error(
4912 "Objects are not valid as a React child (found: " + ("[object Object]" === returnFiber ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : returnFiber) + "). If you meant to render a collection of children, use an array instead."
4913 );
4914 }
4915 function throwOnInvalidObjectType(returnFiber, newChild) {
4916 var debugTask = getCurrentDebugTask();
4917 null !== debugTask ? debugTask.run(
4918 throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)
4919 ) : throwOnInvalidObjectTypeImpl(returnFiber, newChild);
4920 }
4921 function warnOnFunctionTypeImpl(returnFiber, invalidChild) {
4922 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4923 ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
4924 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
4925 invalidChild,
4926 invalidChild,
4927 invalidChild
4928 ) : console.error(
4929 "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
4930 invalidChild,
4931 invalidChild,
4932 parentName,
4933 invalidChild,
4934 parentName
4935 ));
4936 }
4937 function warnOnFunctionType(returnFiber, invalidChild) {
4938 var debugTask = getCurrentDebugTask();
4939 null !== debugTask ? debugTask.run(
4940 warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)
4941 ) : warnOnFunctionTypeImpl(returnFiber, invalidChild);
4942 }
4943 function warnOnSymbolTypeImpl(returnFiber, invalidChild) {
4944 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4945 ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
4946 "Symbols are not valid as a React child.\n root.render(%s)",
4947 invalidChild
4948 ) : console.error(
4949 "Symbols are not valid as a React child.\n <%s>%s</%s>",
4950 parentName,
4951 invalidChild,
4952 parentName
4953 ));
4954 }
4955 function warnOnSymbolType(returnFiber, invalidChild) {
4956 var debugTask = getCurrentDebugTask();
4957 null !== debugTask ? debugTask.run(
4958 warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)
4959 ) : warnOnSymbolTypeImpl(returnFiber, invalidChild);
4960 }
4961 function createChildReconciler(shouldTrackSideEffects) {
4962 function deleteChild(returnFiber, childToDelete) {
4963 if (shouldTrackSideEffects) {
4964 var deletions = returnFiber.deletions;
4965 null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
4966 }
4967 }
4968 function deleteRemainingChildren(returnFiber, currentFirstChild) {
4969 if (!shouldTrackSideEffects) return null;
4970 for (; null !== currentFirstChild; )
4971 deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4972 return null;
4973 }
4974 function mapRemainingChildren(currentFirstChild) {
4975 for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
4976 null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4977 return existingChildren;
4978 }
4979 function useFiber(fiber, pendingProps) {
4980 fiber = createWorkInProgress(fiber, pendingProps);
4981 fiber.index = 0;
4982 fiber.sibling = null;
4983 return fiber;
4984 }
4985 function placeChild(newFiber, lastPlacedIndex, newIndex) {
4986 newFiber.index = newIndex;
4987 if (!shouldTrackSideEffects)
4988 return newFiber.flags |= 1048576, lastPlacedIndex;
4989 newIndex = newFiber.alternate;
4990 if (null !== newIndex)
4991 return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
4992 newFiber.flags |= 67108866;
4993 return lastPlacedIndex;
4994 }
4995 function placeSingleChild(newFiber) {
4996 shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
4997 return newFiber;
4998 }
4999 function updateTextNode(returnFiber, current2, textContent, lanes) {
5000 if (null === current2 || 6 !== current2.tag)
5001 return current2 = createFiberFromText(
5002 textContent,
5003 returnFiber.mode,
5004 lanes
5005 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
5006 current2 = useFiber(current2, textContent);
5007 current2.return = returnFiber;
5008 current2._debugInfo = currentDebugInfo;
5009 return current2;
5010 }
5011 function updateElement(returnFiber, current2, element, lanes) {
5012 var elementType = element.type;
5013 if (elementType === REACT_FRAGMENT_TYPE)
5014 return current2 = updateFragment(
5015 returnFiber,
5016 current2,
5017 element.props.children,
5018 lanes,
5019 element.key
5020 ), validateFragmentProps(element, current2, returnFiber), current2;
5021 if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type))
5022 return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
5023 current2 = createFiberFromElement(element, returnFiber.mode, lanes);
5024 coerceRef(current2, element);
5025 current2.return = returnFiber;
5026 current2._debugInfo = currentDebugInfo;
5027 return current2;
5028 }
5029 function updatePortal(returnFiber, current2, portal, lanes) {
5030 if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
5031 return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
5032 current2 = useFiber(current2, portal.children || []);
5033 current2.return = returnFiber;
5034 current2._debugInfo = currentDebugInfo;
5035 return current2;
5036 }
5037 function updateFragment(returnFiber, current2, fragment, lanes, key) {
5038 if (null === current2 || 7 !== current2.tag)
5039 return current2 = createFiberFromFragment(
5040 fragment,
5041 returnFiber.mode,
5042 lanes,
5043 key
5044 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
5045 current2 = useFiber(current2, fragment);
5046 current2.return = returnFiber;
5047 current2._debugInfo = currentDebugInfo;
5048 return current2;
5049 }
5050 function createChild(returnFiber, newChild, lanes) {
5051 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5052 return newChild = createFiberFromText(
5053 "" + newChild,
5054 returnFiber.mode,
5055 lanes
5056 ), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
5057 if ("object" === typeof newChild && null !== newChild) {
5058 switch (newChild.$$typeof) {
5059 case REACT_LEGACY_ELEMENT_TYPE: __wpWarnCompat("legacy-element"); case REACT_ELEMENT_TYPE:
5060 return lanes = createFiberFromElement(
5061 newChild,
5062 returnFiber.mode,
5063 lanes
5064 ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5065 case REACT_PORTAL_TYPE:
5066 return newChild = createFiberFromPortal(
5067 newChild,
5068 returnFiber.mode,
5069 lanes
5070 ), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
5071 case REACT_LAZY_TYPE:
5072 var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5073 newChild = resolveLazy(newChild);
5074 returnFiber = createChild(returnFiber, newChild, lanes);
5075 currentDebugInfo = _prevDebugInfo;
5076 return returnFiber;
5077 }
5078 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5079 return lanes = createFiberFromFragment(
5080 newChild,
5081 returnFiber.mode,
5082 lanes,
5083 null
5084 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5085 if ("function" === typeof newChild.then)
5086 return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
5087 returnFiber,
5088 unwrapThenable(newChild),
5089 lanes
5090 ), currentDebugInfo = _prevDebugInfo, returnFiber;
5091 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5092 return createChild(
5093 returnFiber,
5094 readContextDuringReconciliation(returnFiber, newChild),
5095 lanes
5096 );
5097 throwOnInvalidObjectType(returnFiber, newChild);
5098 }
5099 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5100 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5101 return null;
5102 }
5103 function updateSlot(returnFiber, oldFiber, newChild, lanes) {
5104 var key = null !== oldFiber ? oldFiber.key : null;
5105 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5106 return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
5107 if ("object" === typeof newChild && null !== newChild) {
5108 switch (newChild.$$typeof) {
5109 case REACT_LEGACY_ELEMENT_TYPE: __wpWarnCompat("legacy-element"); case REACT_ELEMENT_TYPE:
5110 return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5111 returnFiber,
5112 oldFiber,
5113 newChild,
5114 lanes
5115 ), currentDebugInfo = key, returnFiber) : null;
5116 case REACT_PORTAL_TYPE:
5117 return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
5118 case REACT_LAZY_TYPE:
5119 return key = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = updateSlot(
5120 returnFiber,
5121 oldFiber,
5122 newChild,
5123 lanes
5124 ), currentDebugInfo = key, returnFiber;
5125 }
5126 if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
5127 if (null !== key) return null;
5128 key = pushDebugInfo(newChild._debugInfo);
5129 returnFiber = updateFragment(
5130 returnFiber,
5131 oldFiber,
5132 newChild,
5133 lanes,
5134 null
5135 );
5136 currentDebugInfo = key;
5137 return returnFiber;
5138 }
5139 if ("function" === typeof newChild.then)
5140 return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
5141 returnFiber,
5142 oldFiber,
5143 unwrapThenable(newChild),
5144 lanes
5145 ), currentDebugInfo = key, returnFiber;
5146 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5147 return updateSlot(
5148 returnFiber,
5149 oldFiber,
5150 readContextDuringReconciliation(returnFiber, newChild),
5151 lanes
5152 );
5153 throwOnInvalidObjectType(returnFiber, newChild);
5154 }
5155 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5156 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5157 return null;
5158 }
5159 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
5160 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5161 return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
5162 if ("object" === typeof newChild && null !== newChild) {
5163 switch (newChild.$$typeof) {
5164 case REACT_LEGACY_ELEMENT_TYPE: __wpWarnCompat("legacy-element"); case REACT_ELEMENT_TYPE:
5165 return newIdx = existingChildren.get(
5166 null === newChild.key ? newIdx : newChild.key
5167 ) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5168 returnFiber,
5169 newIdx,
5170 newChild,
5171 lanes
5172 ), currentDebugInfo = existingChildren, returnFiber;
5173 case REACT_PORTAL_TYPE:
5174 return existingChildren = existingChildren.get(
5175 null === newChild.key ? newIdx : newChild.key
5176 ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
5177 case REACT_LAZY_TYPE:
5178 var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
5179 newChild = resolveLazy(newChild);
5180 returnFiber = updateFromMap(
5181 existingChildren,
5182 returnFiber,
5183 newIdx,
5184 newChild,
5185 lanes
5186 );
5187 currentDebugInfo = _prevDebugInfo7;
5188 return returnFiber;
5189 }
5190 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5191 return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
5192 returnFiber,
5193 newIdx,
5194 newChild,
5195 lanes,
5196 null
5197 ), currentDebugInfo = existingChildren, returnFiber;
5198 if ("function" === typeof newChild.then)
5199 return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
5200 existingChildren,
5201 returnFiber,
5202 newIdx,
5203 unwrapThenable(newChild),
5204 lanes
5205 ), currentDebugInfo = _prevDebugInfo7, returnFiber;
5206 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5207 return updateFromMap(
5208 existingChildren,
5209 returnFiber,
5210 newIdx,
5211 readContextDuringReconciliation(returnFiber, newChild),
5212 lanes
5213 );
5214 throwOnInvalidObjectType(returnFiber, newChild);
5215 }
5216 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5217 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5218 return null;
5219 }
5220 function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
5221 if ("object" !== typeof child || null === child) return knownKeys;
5222 switch (child.$$typeof) {
5223 case REACT_LEGACY_ELEMENT_TYPE: __wpWarnCompat("legacy-element"); case REACT_ELEMENT_TYPE:
5224 case REACT_PORTAL_TYPE:
5225 warnForMissingKey(returnFiber, workInProgress2, child);
5226 var key = child.key;
5227 if ("string" !== typeof key) break;
5228 if (null === knownKeys) {
5229 knownKeys = /* @__PURE__ */ new Set();
5230 knownKeys.add(key);
5231 break;
5232 }
5233 if (!knownKeys.has(key)) {
5234 knownKeys.add(key);
5235 break;
5236 }
5237 runWithFiberInDEV(workInProgress2, function() {
5238 console.error(
5239 "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.",
5240 key
5241 );
5242 });
5243 break;
5244 case REACT_LAZY_TYPE:
5245 child = resolveLazy(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
5246 }
5247 return knownKeys;
5248 }
5249 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
5250 for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
5251 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5252 var newFiber = updateSlot(
5253 returnFiber,
5254 oldFiber,
5255 newChildren[newIdx],
5256 lanes
5257 );
5258 if (null === newFiber) {
5259 null === oldFiber && (oldFiber = nextOldFiber);
5260 break;
5261 }
5262 knownKeys = warnOnInvalidKey(
5263 returnFiber,
5264 newFiber,
5265 newChildren[newIdx],
5266 knownKeys
5267 );
5268 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5269 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5270 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5271 previousNewFiber = newFiber;
5272 oldFiber = nextOldFiber;
5273 }
5274 if (newIdx === newChildren.length)
5275 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5276 if (null === oldFiber) {
5277 for (; newIdx < newChildren.length; newIdx++)
5278 oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5279 returnFiber,
5280 oldFiber,
5281 newChildren[newIdx],
5282 knownKeys
5283 ), currentFirstChild = placeChild(
5284 oldFiber,
5285 currentFirstChild,
5286 newIdx
5287 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5288 isHydrating && pushTreeFork(returnFiber, newIdx);
5289 return resultingFirstChild;
5290 }
5291 for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
5292 nextOldFiber = updateFromMap(
5293 oldFiber,
5294 returnFiber,
5295 newIdx,
5296 newChildren[newIdx],
5297 lanes
5298 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5299 returnFiber,
5300 nextOldFiber,
5301 newChildren[newIdx],
5302 knownKeys
5303 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5304 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5305 ), currentFirstChild = placeChild(
5306 nextOldFiber,
5307 currentFirstChild,
5308 newIdx
5309 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5310 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5311 return deleteChild(returnFiber, child);
5312 });
5313 isHydrating && pushTreeFork(returnFiber, newIdx);
5314 return resultingFirstChild;
5315 }
5316 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
5317 if (null == newChildren)
5318 throw Error("An iterable object provided no iterator.");
5319 for (var resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null, knownKeys = null, step = newChildren.next(); null !== oldFiber && !step.done; newIdx++, step = newChildren.next()) {
5320 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5321 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
5322 if (null === newFiber) {
5323 null === oldFiber && (oldFiber = nextOldFiber);
5324 break;
5325 }
5326 knownKeys = warnOnInvalidKey(
5327 returnFiber,
5328 newFiber,
5329 step.value,
5330 knownKeys
5331 );
5332 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5333 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5334 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5335 previousNewFiber = newFiber;
5336 oldFiber = nextOldFiber;
5337 }
5338 if (step.done)
5339 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5340 if (null === oldFiber) {
5341 for (; !step.done; newIdx++, step = newChildren.next())
5342 oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5343 returnFiber,
5344 oldFiber,
5345 step.value,
5346 knownKeys
5347 ), currentFirstChild = placeChild(
5348 oldFiber,
5349 currentFirstChild,
5350 newIdx
5351 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5352 isHydrating && pushTreeFork(returnFiber, newIdx);
5353 return resultingFirstChild;
5354 }
5355 for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
5356 nextOldFiber = updateFromMap(
5357 oldFiber,
5358 returnFiber,
5359 newIdx,
5360 step.value,
5361 lanes
5362 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5363 returnFiber,
5364 nextOldFiber,
5365 step.value,
5366 knownKeys
5367 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5368 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5369 ), currentFirstChild = placeChild(
5370 nextOldFiber,
5371 currentFirstChild,
5372 newIdx
5373 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5374 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5375 return deleteChild(returnFiber, child);
5376 });
5377 isHydrating && pushTreeFork(returnFiber, newIdx);
5378 return resultingFirstChild;
5379 }
5380 function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
5381 "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
5382 if ("object" === typeof newChild && null !== newChild) {
5383 switch (newChild.$$typeof) {
5384 case REACT_LEGACY_ELEMENT_TYPE: __wpWarnCompat("legacy-element"); case REACT_ELEMENT_TYPE:
5385 var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5386 a: {
5387 for (var key = newChild.key; null !== currentFirstChild; ) {
5388 if (currentFirstChild.key === key) {
5389 key = newChild.type;
5390 if (key === REACT_FRAGMENT_TYPE) {
5391 if (7 === currentFirstChild.tag) {
5392 deleteRemainingChildren(
5393 returnFiber,
5394 currentFirstChild.sibling
5395 );
5396 lanes = useFiber(
5397 currentFirstChild,
5398 newChild.props.children
5399 );
5400 lanes.return = returnFiber;
5401 lanes._debugOwner = newChild._owner;
5402 lanes._debugInfo = currentDebugInfo;
5403 validateFragmentProps(newChild, lanes, returnFiber);
5404 returnFiber = lanes;
5405 break a;
5406 }
5407 } else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
5408 currentFirstChild,
5409 newChild
5410 ) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
5411 deleteRemainingChildren(
5412 returnFiber,
5413 currentFirstChild.sibling
5414 );
5415 lanes = useFiber(currentFirstChild, newChild.props);
5416 coerceRef(lanes, newChild);
5417 lanes.return = returnFiber;
5418 lanes._debugOwner = newChild._owner;
5419 lanes._debugInfo = currentDebugInfo;
5420 returnFiber = lanes;
5421 break a;
5422 }
5423 deleteRemainingChildren(returnFiber, currentFirstChild);
5424 break;
5425 } else deleteChild(returnFiber, currentFirstChild);
5426 currentFirstChild = currentFirstChild.sibling;
5427 }
5428 newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
5429 newChild.props.children,
5430 returnFiber.mode,
5431 lanes,
5432 newChild.key
5433 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
5434 newChild,
5435 returnFiber.mode,
5436 lanes
5437 ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
5438 }
5439 returnFiber = placeSingleChild(returnFiber);
5440 currentDebugInfo = prevDebugInfo;
5441 return returnFiber;
5442 case REACT_PORTAL_TYPE:
5443 a: {
5444 prevDebugInfo = newChild;
5445 for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
5446 if (currentFirstChild.key === newChild)
5447 if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
5448 deleteRemainingChildren(
5449 returnFiber,
5450 currentFirstChild.sibling
5451 );
5452 lanes = useFiber(
5453 currentFirstChild,
5454 prevDebugInfo.children || []
5455 );
5456 lanes.return = returnFiber;
5457 returnFiber = lanes;
5458 break a;
5459 } else {
5460 deleteRemainingChildren(returnFiber, currentFirstChild);
5461 break;
5462 }
5463 else deleteChild(returnFiber, currentFirstChild);
5464 currentFirstChild = currentFirstChild.sibling;
5465 }
5466 lanes = createFiberFromPortal(
5467 prevDebugInfo,
5468 returnFiber.mode,
5469 lanes
5470 );
5471 lanes.return = returnFiber;
5472 returnFiber = lanes;
5473 }
5474 return placeSingleChild(returnFiber);
5475 case REACT_LAZY_TYPE:
5476 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = reconcileChildFibersImpl(
5477 returnFiber,
5478 currentFirstChild,
5479 newChild,
5480 lanes
5481 ), currentDebugInfo = prevDebugInfo, returnFiber;
5482 }
5483 if (isArrayImpl(newChild))
5484 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
5485 returnFiber,
5486 currentFirstChild,
5487 newChild,
5488 lanes
5489 ), currentDebugInfo = prevDebugInfo, returnFiber;
5490 if (getIteratorFn(newChild)) {
5491 prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5492 key = getIteratorFn(newChild);
5493 if ("function" !== typeof key)
5494 throw Error(
5495 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
5496 );
5497 var newChildren = key.call(newChild);
5498 if (newChildren === newChild) {
5499 if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
5500 didWarnAboutGenerators || console.error(
5501 "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
5502 ), didWarnAboutGenerators = true;
5503 } else
5504 newChild.entries !== key || didWarnAboutMaps || (console.error(
5505 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
5506 ), didWarnAboutMaps = true);
5507 returnFiber = reconcileChildrenIterator(
5508 returnFiber,
5509 currentFirstChild,
5510 newChildren,
5511 lanes
5512 );
5513 currentDebugInfo = prevDebugInfo;
5514 return returnFiber;
5515 }
5516 if ("function" === typeof newChild.then)
5517 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
5518 returnFiber,
5519 currentFirstChild,
5520 unwrapThenable(newChild),
5521 lanes
5522 ), currentDebugInfo = prevDebugInfo, returnFiber;
5523 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5524 return reconcileChildFibersImpl(
5525 returnFiber,
5526 currentFirstChild,
5527 readContextDuringReconciliation(returnFiber, newChild),
5528 lanes
5529 );
5530 throwOnInvalidObjectType(returnFiber, newChild);
5531 }
5532 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5533 return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
5534 returnFiber,
5535 currentFirstChild.sibling
5536 ), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
5537 prevDebugInfo,
5538 returnFiber.mode,
5539 lanes
5540 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
5541 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5542 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5543 return deleteRemainingChildren(returnFiber, currentFirstChild);
5544 }
5545 return function(returnFiber, currentFirstChild, newChild, lanes) {
5546 var prevDebugInfo = currentDebugInfo;
5547 currentDebugInfo = null;
5548 try {
5549 thenableIndexCounter$1 = 0;
5550 var firstChildFiber = reconcileChildFibersImpl(
5551 returnFiber,
5552 currentFirstChild,
5553 newChild,
5554 lanes
5555 );
5556 thenableState$1 = null;
5557 return firstChildFiber;
5558 } catch (x) {
5559 if (x === SuspenseException || x === SuspenseActionException) throw x;
5560 var fiber = createFiber(29, x, null, returnFiber.mode);
5561 fiber.lanes = lanes;
5562 fiber.return = returnFiber;
5563 var debugInfo = fiber._debugInfo = currentDebugInfo;
5564 fiber._debugOwner = returnFiber._debugOwner;
5565 fiber._debugTask = returnFiber._debugTask;
5566 if (null != debugInfo) {
5567 for (var i = debugInfo.length - 1; 0 <= i; i--)
5568 if ("string" === typeof debugInfo[i].stack) {
5569 fiber._debugOwner = debugInfo[i];
5570 fiber._debugTask = debugInfo[i].debugTask;
5571 break;
5572 }
5573 }
5574 return fiber;
5575 } finally {
5576 currentDebugInfo = prevDebugInfo;
5577 }
5578 };
5579 }
5580 function validateSuspenseListNestedChild(childSlot, index) {
5581 var isAnArray = isArrayImpl(childSlot);
5582 childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
5583 return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
5584 "A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
5585 isAnArray,
5586 index,
5587 isAnArray
5588 ), false) : true;
5589 }
5590 function initializeUpdateQueue(fiber) {
5591 fiber.updateQueue = {
5592 baseState: fiber.memoizedState,
5593 firstBaseUpdate: null,
5594 lastBaseUpdate: null,
5595 shared: { pending: null, lanes: 0, hiddenCallbacks: null },
5596 callbacks: null
5597 };
5598 }
5599 function cloneUpdateQueue(current2, workInProgress2) {
5600 current2 = current2.updateQueue;
5601 workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
5602 baseState: current2.baseState,
5603 firstBaseUpdate: current2.firstBaseUpdate,
5604 lastBaseUpdate: current2.lastBaseUpdate,
5605 shared: current2.shared,
5606 callbacks: null
5607 });
5608 }
5609 function createUpdate(lane) {
5610 return {
5611 lane,
5612 tag: UpdateState,
5613 payload: null,
5614 callback: null,
5615 next: null
5616 };
5617 }
5618 function enqueueUpdate(fiber, update, lane) {
5619 var updateQueue = fiber.updateQueue;
5620 if (null === updateQueue) return null;
5621 updateQueue = updateQueue.shared;
5622 if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
5623 var componentName2 = getComponentNameFromFiber(fiber);
5624 console.error(
5625 "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s",
5626 componentName2
5627 );
5628 didWarnUpdateInsideUpdate = true;
5629 }
5630 if ((executionContext & RenderContext) !== NoContext)
5631 return componentName2 = updateQueue.pending, null === componentName2 ? update.next = update : (update.next = componentName2.next, componentName2.next = update), updateQueue.pending = update, update = getRootForUpdatedFiber(fiber), markUpdateLaneFromFiberToRoot(fiber, null, lane), update;
5632 enqueueUpdate$1(fiber, updateQueue, update, lane);
5633 return getRootForUpdatedFiber(fiber);
5634 }
5635 function entangleTransitions(root2, fiber, lane) {
5636 fiber = fiber.updateQueue;
5637 if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
5638 var queueLanes = fiber.lanes;
5639 queueLanes &= root2.pendingLanes;
5640 lane |= queueLanes;
5641 fiber.lanes = lane;
5642 markRootEntangled(root2, lane);
5643 }
5644 }
5645 function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
5646 var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
5647 if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
5648 var newFirst = null, newLast = null;
5649 queue = queue.firstBaseUpdate;
5650 if (null !== queue) {
5651 do {
5652 var clone = {
5653 lane: queue.lane,
5654 tag: queue.tag,
5655 payload: queue.payload,
5656 callback: null,
5657 next: null
5658 };
5659 null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone;
5660 queue = queue.next;
5661 } while (null !== queue);
5662 null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
5663 } else newFirst = newLast = capturedUpdate;
5664 queue = {
5665 baseState: current2.baseState,
5666 firstBaseUpdate: newFirst,
5667 lastBaseUpdate: newLast,
5668 shared: current2.shared,
5669 callbacks: current2.callbacks
5670 };
5671 workInProgress2.updateQueue = queue;
5672 return;
5673 }
5674 workInProgress2 = queue.lastBaseUpdate;
5675 null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
5676 queue.lastBaseUpdate = capturedUpdate;
5677 }
5678 function suspendIfUpdateReadFromEntangledAsyncAction() {
5679 if (didReadFromEntangledAsyncAction) {
5680 var entangledActionThenable = currentEntangledActionThenable;
5681 if (null !== entangledActionThenable) throw entangledActionThenable;
5682 }
5683 }
5684 function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
5685 didReadFromEntangledAsyncAction = false;
5686 var queue = workInProgress2.updateQueue;
5687 hasForceUpdate = false;
5688 currentlyProcessingQueue = queue.shared;
5689 var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
5690 if (null !== pendingQueue) {
5691 queue.shared.pending = null;
5692 var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
5693 lastPendingUpdate.next = null;
5694 null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
5695 lastBaseUpdate = lastPendingUpdate;
5696 var current2 = workInProgress2.alternate;
5697 null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
5698 }
5699 if (null !== firstBaseUpdate) {
5700 var newState = queue.baseState;
5701 lastBaseUpdate = 0;
5702 current2 = firstPendingUpdate = lastPendingUpdate = null;
5703 pendingQueue = firstBaseUpdate;
5704 do {
5705 var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
5706 if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
5707 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
5708 null !== current2 && (current2 = current2.next = {
5709 lane: 0,
5710 tag: pendingQueue.tag,
5711 payload: pendingQueue.payload,
5712 callback: null,
5713 next: null
5714 });
5715 a: {
5716 updateLane = workInProgress2;
5717 var partialState = pendingQueue;
5718 var nextProps = props, instance = instance$jscomp$0;
5719 switch (partialState.tag) {
5720 case ReplaceState:
5721 partialState = partialState.payload;
5722 if ("function" === typeof partialState) {
5723 isDisallowedContextReadInDEV = true;
5724 var nextState = partialState.call(
5725 instance,
5726 newState,
5727 nextProps
5728 );
5729 if (updateLane.mode & StrictLegacyMode) {
5730 setIsStrictModeForDevtools(true);
5731 try {
5732 partialState.call(instance, newState, nextProps);
5733 } finally {
5734 setIsStrictModeForDevtools(false);
5735 }
5736 }
5737 isDisallowedContextReadInDEV = false;
5738 newState = nextState;
5739 break a;
5740 }
5741 newState = partialState;
5742 break a;
5743 case CaptureUpdate:
5744 updateLane.flags = updateLane.flags & -65537 | 128;
5745 case UpdateState:
5746 nextState = partialState.payload;
5747 if ("function" === typeof nextState) {
5748 isDisallowedContextReadInDEV = true;
5749 partialState = nextState.call(
5750 instance,
5751 newState,
5752 nextProps
5753 );
5754 if (updateLane.mode & StrictLegacyMode) {
5755 setIsStrictModeForDevtools(true);
5756 try {
5757 nextState.call(instance, newState, nextProps);
5758 } finally {
5759 setIsStrictModeForDevtools(false);
5760 }
5761 }
5762 isDisallowedContextReadInDEV = false;
5763 } else partialState = nextState;
5764 if (null === partialState || void 0 === partialState) break a;
5765 newState = assign({}, newState, partialState);
5766 break a;
5767 case ForceUpdate:
5768 hasForceUpdate = true;
5769 }
5770 }
5771 updateLane = pendingQueue.callback;
5772 null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
5773 } else
5774 isHiddenUpdate = {
5775 lane: updateLane,
5776 tag: pendingQueue.tag,
5777 payload: pendingQueue.payload,
5778 callback: pendingQueue.callback,
5779 next: null
5780 }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
5781 pendingQueue = pendingQueue.next;
5782 if (null === pendingQueue)
5783 if (pendingQueue = queue.shared.pending, null === pendingQueue)
5784 break;
5785 else
5786 isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
5787 } while (1);
5788 null === current2 && (lastPendingUpdate = newState);
5789 queue.baseState = lastPendingUpdate;
5790 queue.firstBaseUpdate = firstPendingUpdate;
5791 queue.lastBaseUpdate = current2;
5792 null === firstBaseUpdate && (queue.shared.lanes = 0);
5793 workInProgressRootSkippedLanes |= lastBaseUpdate;
5794 workInProgress2.lanes = lastBaseUpdate;
5795 workInProgress2.memoizedState = newState;
5796 }
5797 currentlyProcessingQueue = null;
5798 }
5799 function callCallback(callback, context) {
5800 if ("function" !== typeof callback)
5801 throw Error(
5802 "Invalid argument passed as callback. Expected a function. Instead received: " + callback
5803 );
5804 callback.call(context);
5805 }
5806 function commitHiddenCallbacks(updateQueue, context) {
5807 var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
5808 if (null !== hiddenCallbacks)
5809 for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
5810 callCallback(hiddenCallbacks[updateQueue], context);
5811 }
5812 function commitCallbacks(updateQueue, context) {
5813 var callbacks = updateQueue.callbacks;
5814 if (null !== callbacks)
5815 for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
5816 callCallback(callbacks[updateQueue], context);
5817 }
5818 function pushHiddenContext(fiber, context) {
5819 var prevEntangledRenderLanes = entangledRenderLanes;
5820 push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
5821 push(currentTreeHiddenStackCursor, context, fiber);
5822 entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
5823 }
5824 function reuseHiddenContextOnStack(fiber) {
5825 push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
5826 push(
5827 currentTreeHiddenStackCursor,
5828 currentTreeHiddenStackCursor.current,
5829 fiber
5830 );
5831 }
5832 function popHiddenContext(fiber) {
5833 entangledRenderLanes = prevEntangledRenderLanesCursor.current;
5834 pop(currentTreeHiddenStackCursor, fiber);
5835 pop(prevEntangledRenderLanesCursor, fiber);
5836 }
5837 function pushPrimaryTreeSuspenseHandler(handler) {
5838 var current2 = handler.alternate;
5839 push(
5840 suspenseStackCursor,
5841 suspenseStackCursor.current & SubtreeSuspenseContextMask,
5842 handler
5843 );
5844 push(suspenseHandlerStackCursor, handler, handler);
5845 null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
5846 }
5847 function pushDehydratedActivitySuspenseHandler(fiber) {
5848 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5849 push(suspenseHandlerStackCursor, fiber, fiber);
5850 null === shellBoundary && (shellBoundary = fiber);
5851 }
5852 function pushOffscreenSuspenseHandler(fiber) {
5853 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
5854 }
5855 function reuseSuspenseHandlerOnStack(fiber) {
5856 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5857 push(
5858 suspenseHandlerStackCursor,
5859 suspenseHandlerStackCursor.current,
5860 fiber
5861 );
5862 }
5863 function popSuspenseHandler(fiber) {
5864 pop(suspenseHandlerStackCursor, fiber);
5865 shellBoundary === fiber && (shellBoundary = null);
5866 pop(suspenseStackCursor, fiber);
5867 }
5868 function findFirstSuspended(row) {
5869 for (var node = row; null !== node; ) {
5870 if (13 === node.tag) {
5871 var state = node.memoizedState;
5872 if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
5873 return node;
5874 } else if (19 === node.tag && ("forwards" === node.memoizedProps.revealOrder || "backwards" === node.memoizedProps.revealOrder || "unstable_legacy-backwards" === node.memoizedProps.revealOrder || "together" === node.memoizedProps.revealOrder)) {
5875 if (0 !== (node.flags & 128)) return node;
5876 } else if (null !== node.child) {
5877 node.child.return = node;
5878 node = node.child;
5879 continue;
5880 }
5881 if (node === row) break;
5882 for (; null === node.sibling; ) {
5883 if (null === node.return || node.return === row) return null;
5884 node = node.return;
5885 }
5886 node.sibling.return = node.return;
5887 node = node.sibling;
5888 }
5889 return null;
5890 }
5891 function mountHookTypesDev() {
5892 var hookName = currentHookNameInDev;
5893 null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
5894 }
5895 function updateHookTypesDev() {
5896 var hookName = currentHookNameInDev;
5897 if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
5898 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5899 if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
5900 for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
5901 var oldHookName = hookTypesDev[i], newHookName = i === hookTypesUpdateIndexDev ? hookName : oldHookName;
5902 for (oldHookName = i + 1 + ". " + oldHookName; 30 > oldHookName.length; )
5903 oldHookName += " ";
5904 oldHookName += newHookName + "\n";
5905 table += oldHookName;
5906 }
5907 console.error(
5908 "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
5909 componentName2,
5910 table
5911 );
5912 }
5913 }
5914 }
5915 function checkDepsAreArrayDev(deps) {
5916 void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
5917 "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
5918 currentHookNameInDev,
5919 typeof deps
5920 );
5921 }
5922 function warnOnUseFormStateInDev() {
5923 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5924 didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
5925 "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
5926 componentName2
5927 ));
5928 }
5929 function throwInvalidHookError() {
5930 throw Error(
5931 "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
5932 );
5933 }
5934 function areHookInputsEqual(nextDeps, prevDeps) {
5935 if (ignorePreviousDependencies) return false;
5936 if (null === prevDeps)
5937 return console.error(
5938 "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
5939 currentHookNameInDev
5940 ), false;
5941 nextDeps.length !== prevDeps.length && console.error(
5942 "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
5943 currentHookNameInDev,
5944 "[" + prevDeps.join(", ") + "]",
5945 "[" + nextDeps.join(", ") + "]"
5946 );
5947 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
5948 if (!objectIs(nextDeps[i], prevDeps[i])) return false;
5949 return true;
5950 }
5951 function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
5952 renderLanes = nextRenderLanes;
5953 currentlyRenderingFiber = workInProgress2;
5954 hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
5955 hookTypesUpdateIndexDev = -1;
5956 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
5957 if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
5958 nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
5959 "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
5960 null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
5961 ));
5962 workInProgress2.memoizedState = null;
5963 workInProgress2.updateQueue = null;
5964 workInProgress2.lanes = 0;
5965 ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
5966 shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & StrictLegacyMode) !== NoMode;
5967 var children = callComponentInDEV(Component, props, secondArg);
5968 shouldDoubleInvokeUserFnsInHooksDEV = false;
5969 didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
5970 workInProgress2,
5971 Component,
5972 props,
5973 secondArg
5974 ));
5975 if (nextRenderLanes) {
5976 setIsStrictModeForDevtools(true);
5977 try {
5978 children = renderWithHooksAgain(
5979 workInProgress2,
5980 Component,
5981 props,
5982 secondArg
5983 );
5984 } finally {
5985 setIsStrictModeForDevtools(false);
5986 }
5987 }
5988 finishRenderingHooks(current2, workInProgress2);
5989 return children;
5990 }
5991 function finishRenderingHooks(current2, workInProgress2) {
5992 workInProgress2._debugHookTypes = hookTypesDev;
5993 null === workInProgress2.dependencies ? null !== thenableState && (workInProgress2.dependencies = {
5994 lanes: 0,
5995 firstContext: null,
5996 _debugThenableState: thenableState
5997 }) : workInProgress2.dependencies._debugThenableState = thenableState;
5998 ReactSharedInternals.H = ContextOnlyDispatcher;
5999 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
6000 renderLanes = 0;
6001 hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
6002 hookTypesUpdateIndexDev = -1;
6003 null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
6004 "Internal React error: Expected static flag was missing. Please notify the React team."
6005 );
6006 didScheduleRenderPhaseUpdate = false;
6007 thenableIndexCounter = 0;
6008 thenableState = null;
6009 if (didRenderTooFewHooks)
6010 throw Error(
6011 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
6012 );
6013 null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
6014 needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
6015 current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
6016 "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
6017 )));
6018 }
6019 function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
6020 currentlyRenderingFiber = workInProgress2;
6021 var numberOfReRenders = 0;
6022 do {
6023 didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
6024 thenableIndexCounter = 0;
6025 didScheduleRenderPhaseUpdateDuringThisPass = false;
6026 if (numberOfReRenders >= RE_RENDER_LIMIT)
6027 throw Error(
6028 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
6029 );
6030 numberOfReRenders += 1;
6031 ignorePreviousDependencies = false;
6032 workInProgressHook = currentHook = null;
6033 if (null != workInProgress2.updateQueue) {
6034 var children = workInProgress2.updateQueue;
6035 children.lastEffect = null;
6036 children.events = null;
6037 children.stores = null;
6038 null != children.memoCache && (children.memoCache.index = 0);
6039 }
6040 hookTypesUpdateIndexDev = -1;
6041 ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
6042 children = callComponentInDEV(Component, props, secondArg);
6043 } while (didScheduleRenderPhaseUpdateDuringThisPass);
6044 return children;
6045 }
6046 function TransitionAwareHostComponent() {
6047 var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
6048 maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
6049 dispatcher = dispatcher.useState()[0];
6050 (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
6051 return maybeThenable;
6052 }
6053 function checkDidRenderIdHook() {
6054 var didRenderIdHook = 0 !== localIdCounter;
6055 localIdCounter = 0;
6056 return didRenderIdHook;
6057 }
6058 function bailoutHooks(current2, workInProgress2, lanes) {
6059 workInProgress2.updateQueue = current2.updateQueue;
6060 workInProgress2.flags = (workInProgress2.mode & StrictEffectsMode) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
6061 current2.lanes &= ~lanes;
6062 }
6063 function resetHooksOnUnwind(workInProgress2) {
6064 if (didScheduleRenderPhaseUpdate) {
6065 for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
6066 var queue = workInProgress2.queue;
6067 null !== queue && (queue.pending = null);
6068 workInProgress2 = workInProgress2.next;
6069 }
6070 didScheduleRenderPhaseUpdate = false;
6071 }
6072 renderLanes = 0;
6073 hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
6074 hookTypesUpdateIndexDev = -1;
6075 currentHookNameInDev = null;
6076 didScheduleRenderPhaseUpdateDuringThisPass = false;
6077 thenableIndexCounter = localIdCounter = 0;
6078 thenableState = null;
6079 }
6080 function mountWorkInProgressHook() {
6081 var hook = {
6082 memoizedState: null,
6083 baseState: null,
6084 baseQueue: null,
6085 queue: null,
6086 next: null
6087 };
6088 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
6089 return workInProgressHook;
6090 }
6091 function updateWorkInProgressHook() {
6092 if (null === currentHook) {
6093 var nextCurrentHook = currentlyRenderingFiber.alternate;
6094 nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
6095 } else nextCurrentHook = currentHook.next;
6096 var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
6097 if (null !== nextWorkInProgressHook)
6098 workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
6099 else {
6100 if (null === nextCurrentHook) {
6101 if (null === currentlyRenderingFiber.alternate)
6102 throw Error(
6103 "Update hook called on initial render. This is likely a bug in React. Please file an issue."
6104 );
6105 throw Error("Rendered more hooks than during the previous render.");
6106 }
6107 currentHook = nextCurrentHook;
6108 nextCurrentHook = {
6109 memoizedState: currentHook.memoizedState,
6110 baseState: currentHook.baseState,
6111 baseQueue: currentHook.baseQueue,
6112 queue: currentHook.queue,
6113 next: null
6114 };
6115 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
6116 }
6117 return workInProgressHook;
6118 }
6119 function createFunctionComponentUpdateQueue() {
6120 return { lastEffect: null, events: null, stores: null, memoCache: null };
6121 }
6122 function useThenable(thenable) {
6123 var index = thenableIndexCounter;
6124 thenableIndexCounter += 1;
6125 null === thenableState && (thenableState = createThenableState());
6126 thenable = trackUsedThenable(thenableState, thenable, index);
6127 index = currentlyRenderingFiber;
6128 null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
6129 return thenable;
6130 }
6131 function use(usable) {
6132 if (null !== usable && "object" === typeof usable) {
6133 if ("function" === typeof usable.then) return useThenable(usable);
6134 if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
6135 }
6136 throw Error("An unsupported type was passed to use(): " + String(usable));
6137 }
6138 function useMemoCache(size) {
6139 var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
6140 null !== updateQueue && (memoCache = updateQueue.memoCache);
6141 if (null == memoCache) {
6142 var current2 = currentlyRenderingFiber.alternate;
6143 null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
6144 data: current2.data.map(function(array) {
6145 return array.slice();
6146 }),
6147 index: 0
6148 })));
6149 }
6150 null == memoCache && (memoCache = { data: [], index: 0 });
6151 null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
6152 updateQueue.memoCache = memoCache;
6153 updateQueue = memoCache.data[memoCache.index];
6154 if (void 0 === updateQueue || ignorePreviousDependencies)
6155 for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
6156 updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
6157 else
6158 updateQueue.length !== size && console.error(
6159 "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
6160 updateQueue.length,
6161 size
6162 );
6163 memoCache.index++;
6164 return updateQueue;
6165 }
6166 function basicStateReducer(state, action) {
6167 return "function" === typeof action ? action(state) : action;
6168 }
6169 function mountReducer(reducer, initialArg, init) {
6170 var hook = mountWorkInProgressHook();
6171 if (void 0 !== init) {
6172 var initialState = init(initialArg);
6173 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6174 setIsStrictModeForDevtools(true);
6175 try {
6176 init(initialArg);
6177 } finally {
6178 setIsStrictModeForDevtools(false);
6179 }
6180 }
6181 } else initialState = initialArg;
6182 hook.memoizedState = hook.baseState = initialState;
6183 reducer = {
6184 pending: null,
6185 lanes: 0,
6186 dispatch: null,
6187 lastRenderedReducer: reducer,
6188 lastRenderedState: initialState
6189 };
6190 hook.queue = reducer;
6191 reducer = reducer.dispatch = dispatchReducerAction.bind(
6192 null,
6193 currentlyRenderingFiber,
6194 reducer
6195 );
6196 return [hook.memoizedState, reducer];
6197 }
6198 function updateReducer(reducer) {
6199 var hook = updateWorkInProgressHook();
6200 return updateReducerImpl(hook, currentHook, reducer);
6201 }
6202 function updateReducerImpl(hook, current2, reducer) {
6203 var queue = hook.queue;
6204 if (null === queue)
6205 throw Error(
6206 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6207 );
6208 queue.lastRenderedReducer = reducer;
6209 var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
6210 if (null !== pendingQueue) {
6211 if (null !== baseQueue) {
6212 var baseFirst = baseQueue.next;
6213 baseQueue.next = pendingQueue.next;
6214 pendingQueue.next = baseFirst;
6215 }
6216 current2.baseQueue !== baseQueue && console.error(
6217 "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
6218 );
6219 current2.baseQueue = baseQueue = pendingQueue;
6220 queue.pending = null;
6221 }
6222 pendingQueue = hook.baseState;
6223 if (null === baseQueue) hook.memoizedState = pendingQueue;
6224 else {
6225 current2 = baseQueue.next;
6226 var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
6227 do {
6228 var updateLane = update.lane & -536870913;
6229 if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
6230 var revertLane = update.revertLane;
6231 if (0 === revertLane)
6232 null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
6233 lane: 0,
6234 revertLane: 0,
6235 gesture: null,
6236 action: update.action,
6237 hasEagerState: update.hasEagerState,
6238 eagerState: update.eagerState,
6239 next: null
6240 }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6241 else if ((renderLanes & revertLane) === revertLane) {
6242 update = update.next;
6243 revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6244 continue;
6245 } else
6246 updateLane = {
6247 lane: 0,
6248 revertLane: update.revertLane,
6249 gesture: null,
6250 action: update.action,
6251 hasEagerState: update.hasEagerState,
6252 eagerState: update.eagerState,
6253 next: null
6254 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
6255 updateLane = update.action;
6256 shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
6257 pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
6258 } else
6259 revertLane = {
6260 lane: updateLane,
6261 revertLane: update.revertLane,
6262 gesture: update.gesture,
6263 action: update.action,
6264 hasEagerState: update.hasEagerState,
6265 eagerState: update.eagerState,
6266 next: null
6267 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
6268 update = update.next;
6269 } while (null !== update && update !== current2);
6270 null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
6271 if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
6272 throw reducer;
6273 hook.memoizedState = pendingQueue;
6274 hook.baseState = baseFirst;
6275 hook.baseQueue = newBaseQueueLast;
6276 queue.lastRenderedState = pendingQueue;
6277 }
6278 null === baseQueue && (queue.lanes = 0);
6279 return [hook.memoizedState, queue.dispatch];
6280 }
6281 function rerenderReducer(reducer) {
6282 var hook = updateWorkInProgressHook(), queue = hook.queue;
6283 if (null === queue)
6284 throw Error(
6285 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6286 );
6287 queue.lastRenderedReducer = reducer;
6288 var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
6289 if (null !== lastRenderPhaseUpdate) {
6290 queue.pending = null;
6291 var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
6292 do
6293 newState = reducer(newState, update.action), update = update.next;
6294 while (update !== lastRenderPhaseUpdate);
6295 objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
6296 hook.memoizedState = newState;
6297 null === hook.baseQueue && (hook.baseState = newState);
6298 queue.lastRenderedState = newState;
6299 }
6300 return [newState, dispatch];
6301 }
6302 function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6303 var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
6304 if (isHydrating) {
6305 if (void 0 === getServerSnapshot)
6306 throw Error(
6307 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6308 );
6309 var nextSnapshot = getServerSnapshot();
6310 didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
6311 "The result of getServerSnapshot should be cached to avoid an infinite loop"
6312 ), didWarnUncachedGetSnapshot = true);
6313 } else {
6314 nextSnapshot = getSnapshot();
6315 didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
6316 "The result of getSnapshot should be cached to avoid an infinite loop"
6317 ), didWarnUncachedGetSnapshot = true));
6318 if (null === workInProgressRoot)
6319 throw Error(
6320 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6321 );
6322 0 !== (workInProgressRootRenderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
6323 }
6324 hook.memoizedState = nextSnapshot;
6325 getServerSnapshot = { value: nextSnapshot, getSnapshot };
6326 hook.queue = getServerSnapshot;
6327 mountEffect(
6328 subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
6329 [subscribe]
6330 );
6331 fiber.flags |= 2048;
6332 pushSimpleEffect(
6333 HasEffect | Passive,
6334 { destroy: void 0 },
6335 updateStoreInstance.bind(
6336 null,
6337 fiber,
6338 getServerSnapshot,
6339 nextSnapshot,
6340 getSnapshot
6341 ),
6342 null
6343 );
6344 return nextSnapshot;
6345 }
6346 function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6347 var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
6348 if (isHydrating$jscomp$0) {
6349 if (void 0 === getServerSnapshot)
6350 throw Error(
6351 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6352 );
6353 getServerSnapshot = getServerSnapshot();
6354 } else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
6355 var cachedSnapshot = getSnapshot();
6356 objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
6357 "The result of getSnapshot should be cached to avoid an infinite loop"
6358 ), didWarnUncachedGetSnapshot = true);
6359 }
6360 if (cachedSnapshot = !objectIs(
6361 (currentHook || hook).memoizedState,
6362 getServerSnapshot
6363 ))
6364 hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
6365 hook = hook.queue;
6366 var create = subscribeToStore.bind(null, fiber, hook, subscribe);
6367 updateEffectImpl(2048, Passive, create, [subscribe]);
6368 if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
6369 fiber.flags |= 2048;
6370 pushSimpleEffect(
6371 HasEffect | Passive,
6372 { destroy: void 0 },
6373 updateStoreInstance.bind(
6374 null,
6375 fiber,
6376 hook,
6377 getServerSnapshot,
6378 getSnapshot
6379 ),
6380 null
6381 );
6382 if (null === workInProgressRoot)
6383 throw Error(
6384 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6385 );
6386 isHydrating$jscomp$0 || 0 !== (renderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
6387 }
6388 return getServerSnapshot;
6389 }
6390 function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
6391 fiber.flags |= 16384;
6392 fiber = { getSnapshot, value: renderedSnapshot };
6393 getSnapshot = currentlyRenderingFiber.updateQueue;
6394 null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
6395 }
6396 function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
6397 inst.value = nextSnapshot;
6398 inst.getSnapshot = getSnapshot;
6399 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
6400 }
6401 function subscribeToStore(fiber, inst, subscribe) {
6402 return subscribe(function() {
6403 checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber));
6404 });
6405 }
6406 function checkIfSnapshotChanged(inst) {
6407 var latestGetSnapshot = inst.getSnapshot;
6408 inst = inst.value;
6409 try {
6410 var nextValue = latestGetSnapshot();
6411 return !objectIs(inst, nextValue);
6412 } catch (error) {
6413 return true;
6414 }
6415 }
6416 function forceStoreRerender(fiber) {
6417 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
6418 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
6419 }
6420 function mountStateImpl(initialState) {
6421 var hook = mountWorkInProgressHook();
6422 if ("function" === typeof initialState) {
6423 var initialStateInitializer = initialState;
6424 initialState = initialStateInitializer();
6425 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6426 setIsStrictModeForDevtools(true);
6427 try {
6428 initialStateInitializer();
6429 } finally {
6430 setIsStrictModeForDevtools(false);
6431 }
6432 }
6433 }
6434 hook.memoizedState = hook.baseState = initialState;
6435 hook.queue = {
6436 pending: null,
6437 lanes: 0,
6438 dispatch: null,
6439 lastRenderedReducer: basicStateReducer,
6440 lastRenderedState: initialState
6441 };
6442 return hook;
6443 }
6444 function mountState(initialState) {
6445 initialState = mountStateImpl(initialState);
6446 var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
6447 queue.dispatch = dispatch;
6448 return [initialState.memoizedState, dispatch];
6449 }
6450 function mountOptimistic(passthrough) {
6451 var hook = mountWorkInProgressHook();
6452 hook.memoizedState = hook.baseState = passthrough;
6453 var queue = {
6454 pending: null,
6455 lanes: 0,
6456 dispatch: null,
6457 lastRenderedReducer: null,
6458 lastRenderedState: null
6459 };
6460 hook.queue = queue;
6461 hook = dispatchOptimisticSetState.bind(
6462 null,
6463 currentlyRenderingFiber,
6464 true,
6465 queue
6466 );
6467 queue.dispatch = hook;
6468 return [passthrough, hook];
6469 }
6470 function updateOptimistic(passthrough, reducer) {
6471 var hook = updateWorkInProgressHook();
6472 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6473 }
6474 function updateOptimisticImpl(hook, current2, passthrough, reducer) {
6475 hook.baseState = passthrough;
6476 return updateReducerImpl(
6477 hook,
6478 currentHook,
6479 "function" === typeof reducer ? reducer : basicStateReducer
6480 );
6481 }
6482 function rerenderOptimistic(passthrough, reducer) {
6483 var hook = updateWorkInProgressHook();
6484 if (null !== currentHook)
6485 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6486 hook.baseState = passthrough;
6487 return [passthrough, hook.queue.dispatch];
6488 }
6489 function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
6490 if (isRenderPhaseUpdate(fiber))
6491 throw Error("Cannot update form state while rendering.");
6492 fiber = actionQueue.action;
6493 if (null !== fiber) {
6494 var actionNode = {
6495 payload,
6496 action: fiber,
6497 next: null,
6498 isTransition: true,
6499 status: "pending",
6500 value: null,
6501 reason: null,
6502 listeners: [],
6503 then: function(listener) {
6504 actionNode.listeners.push(listener);
6505 }
6506 };
6507 null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
6508 setState(actionNode);
6509 setPendingState = actionQueue.pending;
6510 null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
6511 }
6512 }
6513 function runActionStateAction(actionQueue, node) {
6514 var action = node.action, payload = node.payload, prevState = actionQueue.state;
6515 if (node.isTransition) {
6516 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6517 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6518 ReactSharedInternals.T = currentTransition;
6519 try {
6520 var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
6521 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6522 handleActionReturnValue(actionQueue, node, returnValue);
6523 } catch (error) {
6524 onActionError(actionQueue, node, error);
6525 } finally {
6526 null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6527 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6528 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
6529 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
6530 ));
6531 }
6532 } else
6533 try {
6534 currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
6535 } catch (error$4) {
6536 onActionError(actionQueue, node, error$4);
6537 }
6538 }
6539 function handleActionReturnValue(actionQueue, node, returnValue) {
6540 null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(
6541 function(nextState) {
6542 onActionSuccess(actionQueue, node, nextState);
6543 },
6544 function(error) {
6545 return onActionError(actionQueue, node, error);
6546 }
6547 ), node.isTransition || console.error(
6548 "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
6549 )) : onActionSuccess(actionQueue, node, returnValue);
6550 }
6551 function onActionSuccess(actionQueue, actionNode, nextState) {
6552 actionNode.status = "fulfilled";
6553 actionNode.value = nextState;
6554 notifyActionListeners(actionNode);
6555 actionQueue.state = nextState;
6556 actionNode = actionQueue.pending;
6557 null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
6558 }
6559 function onActionError(actionQueue, actionNode, error) {
6560 var last = actionQueue.pending;
6561 actionQueue.pending = null;
6562 if (null !== last) {
6563 last = last.next;
6564 do
6565 actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
6566 while (actionNode !== last);
6567 }
6568 actionQueue.action = null;
6569 }
6570 function notifyActionListeners(actionNode) {
6571 actionNode = actionNode.listeners;
6572 for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
6573 }
6574 function actionStateReducer(oldState, newState) {
6575 return newState;
6576 }
6577 function mountActionState(action, initialStateProp) {
6578 if (isHydrating) {
6579 var ssrFormState = workInProgressRoot.formState;
6580 if (null !== ssrFormState) {
6581 a: {
6582 var isMatching = currentlyRenderingFiber;
6583 if (isHydrating) {
6584 if (nextHydratableInstance) {
6585 b: {
6586 var markerInstance = nextHydratableInstance;
6587 for (var inRootOrSingleton = rootOrSingletonContext; 8 !== markerInstance.nodeType; ) {
6588 if (!inRootOrSingleton) {
6589 markerInstance = null;
6590 break b;
6591 }
6592 markerInstance = getNextHydratable(
6593 markerInstance.nextSibling
6594 );
6595 if (null === markerInstance) {
6596 markerInstance = null;
6597 break b;
6598 }
6599 }
6600 inRootOrSingleton = markerInstance.data;
6601 markerInstance = inRootOrSingleton === FORM_STATE_IS_MATCHING || inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING ? markerInstance : null;
6602 }
6603 if (markerInstance) {
6604 nextHydratableInstance = getNextHydratable(
6605 markerInstance.nextSibling
6606 );
6607 isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
6608 break a;
6609 }
6610 }
6611 throwOnHydrationMismatch(isMatching);
6612 }
6613 isMatching = false;
6614 }
6615 isMatching && (initialStateProp = ssrFormState[0]);
6616 }
6617 }
6618 ssrFormState = mountWorkInProgressHook();
6619 ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
6620 isMatching = {
6621 pending: null,
6622 lanes: 0,
6623 dispatch: null,
6624 lastRenderedReducer: actionStateReducer,
6625 lastRenderedState: initialStateProp
6626 };
6627 ssrFormState.queue = isMatching;
6628 ssrFormState = dispatchSetState.bind(
6629 null,
6630 currentlyRenderingFiber,
6631 isMatching
6632 );
6633 isMatching.dispatch = ssrFormState;
6634 isMatching = mountStateImpl(false);
6635 inRootOrSingleton = dispatchOptimisticSetState.bind(
6636 null,
6637 currentlyRenderingFiber,
6638 false,
6639 isMatching.queue
6640 );
6641 isMatching = mountWorkInProgressHook();
6642 markerInstance = {
6643 state: initialStateProp,
6644 dispatch: null,
6645 action,
6646 pending: null
6647 };
6648 isMatching.queue = markerInstance;
6649 ssrFormState = dispatchActionState.bind(
6650 null,
6651 currentlyRenderingFiber,
6652 markerInstance,
6653 inRootOrSingleton,
6654 ssrFormState
6655 );
6656 markerInstance.dispatch = ssrFormState;
6657 isMatching.memoizedState = action;
6658 return [initialStateProp, ssrFormState, false];
6659 }
6660 function updateActionState(action) {
6661 var stateHook = updateWorkInProgressHook();
6662 return updateActionStateImpl(stateHook, currentHook, action);
6663 }
6664 function updateActionStateImpl(stateHook, currentStateHook, action) {
6665 currentStateHook = updateReducerImpl(
6666 stateHook,
6667 currentStateHook,
6668 actionStateReducer
6669 )[0];
6670 stateHook = updateReducer(basicStateReducer)[0];
6671 if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
6672 try {
6673 var state = useThenable(currentStateHook);
6674 } catch (x) {
6675 if (x === SuspenseException) throw SuspenseActionException;
6676 throw x;
6677 }
6678 else state = currentStateHook;
6679 currentStateHook = updateWorkInProgressHook();
6680 var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
6681 action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
6682 HasEffect | Passive,
6683 { destroy: void 0 },
6684 actionStateActionEffect.bind(null, actionQueue, action),
6685 null
6686 ));
6687 return [state, dispatch, stateHook];
6688 }
6689 function actionStateActionEffect(actionQueue, action) {
6690 actionQueue.action = action;
6691 }
6692 function rerenderActionState(action) {
6693 var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
6694 if (null !== currentStateHook)
6695 return updateActionStateImpl(stateHook, currentStateHook, action);
6696 updateWorkInProgressHook();
6697 stateHook = stateHook.memoizedState;
6698 currentStateHook = updateWorkInProgressHook();
6699 var dispatch = currentStateHook.queue.dispatch;
6700 currentStateHook.memoizedState = action;
6701 return [stateHook, dispatch, false];
6702 }
6703 function pushSimpleEffect(tag, inst, create, deps) {
6704 tag = { tag, create, deps, inst, next: null };
6705 inst = currentlyRenderingFiber.updateQueue;
6706 null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
6707 create = inst.lastEffect;
6708 null === create ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag);
6709 return tag;
6710 }
6711 function mountRef(initialValue) {
6712 var hook = mountWorkInProgressHook();
6713 initialValue = { current: initialValue };
6714 return hook.memoizedState = initialValue;
6715 }
6716 function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
6717 var hook = mountWorkInProgressHook();
6718 currentlyRenderingFiber.flags |= fiberFlags;
6719 hook.memoizedState = pushSimpleEffect(
6720 HasEffect | hookFlags,
6721 { destroy: void 0 },
6722 create,
6723 void 0 === deps ? null : deps
6724 );
6725 }
6726 function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
6727 var hook = updateWorkInProgressHook();
6728 deps = void 0 === deps ? null : deps;
6729 var inst = hook.memoizedState.inst;
6730 null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
6731 HasEffect | hookFlags,
6732 inst,
6733 create,
6734 deps
6735 ));
6736 }
6737 function mountEffect(create, deps) {
6738 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ? mountEffectImpl(276826112, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps);
6739 }
6740 function useEffectEventImpl(payload) {
6741 currentlyRenderingFiber.flags |= 4;
6742 var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
6743 if (null === componentUpdateQueue)
6744 componentUpdateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = componentUpdateQueue, componentUpdateQueue.events = [payload];
6745 else {
6746 var events = componentUpdateQueue.events;
6747 null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
6748 }
6749 }
6750 function mountEvent(callback) {
6751 var hook = mountWorkInProgressHook(), ref = { impl: callback };
6752 hook.memoizedState = ref;
6753 return function() {
6754 if ((executionContext & RenderContext) !== NoContext)
6755 throw Error(
6756 "A function wrapped in useEffectEvent can't be called during rendering."
6757 );
6758 return ref.impl.apply(void 0, arguments);
6759 };
6760 }
6761 function updateEvent(callback) {
6762 var ref = updateWorkInProgressHook().memoizedState;
6763 useEffectEventImpl({ ref, nextImpl: callback });
6764 return function() {
6765 if ((executionContext & RenderContext) !== NoContext)
6766 throw Error(
6767 "A function wrapped in useEffectEvent can't be called during rendering."
6768 );
6769 return ref.impl.apply(void 0, arguments);
6770 };
6771 }
6772 function mountLayoutEffect(create, deps) {
6773 var fiberFlags = 4194308;
6774 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6775 return mountEffectImpl(fiberFlags, Layout, create, deps);
6776 }
6777 function imperativeHandleEffect(create, ref) {
6778 if ("function" === typeof ref) {
6779 create = create();
6780 var refCleanup = ref(create);
6781 return function() {
6782 "function" === typeof refCleanup ? refCleanup() : ref(null);
6783 };
6784 }
6785 if (null !== ref && void 0 !== ref)
6786 return ref.hasOwnProperty("current") || console.error(
6787 "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
6788 "an object with keys {" + Object.keys(ref).join(", ") + "}"
6789 ), create = create(), ref.current = create, function() {
6790 ref.current = null;
6791 };
6792 }
6793 function mountImperativeHandle(ref, create, deps) {
6794 "function" !== typeof create && console.error(
6795 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6796 null !== create ? typeof create : "null"
6797 );
6798 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6799 var fiberFlags = 4194308;
6800 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6801 mountEffectImpl(
6802 fiberFlags,
6803 Layout,
6804 imperativeHandleEffect.bind(null, create, ref),
6805 deps
6806 );
6807 }
6808 function updateImperativeHandle(ref, create, deps) {
6809 "function" !== typeof create && console.error(
6810 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6811 null !== create ? typeof create : "null"
6812 );
6813 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6814 updateEffectImpl(
6815 4,
6816 Layout,
6817 imperativeHandleEffect.bind(null, create, ref),
6818 deps
6819 );
6820 }
6821 function mountCallback(callback, deps) {
6822 mountWorkInProgressHook().memoizedState = [
6823 callback,
6824 void 0 === deps ? null : deps
6825 ];
6826 return callback;
6827 }
6828 function updateCallback(callback, deps) {
6829 var hook = updateWorkInProgressHook();
6830 deps = void 0 === deps ? null : deps;
6831 var prevState = hook.memoizedState;
6832 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6833 return prevState[0];
6834 hook.memoizedState = [callback, deps];
6835 return callback;
6836 }
6837 function mountMemo(nextCreate, deps) {
6838 var hook = mountWorkInProgressHook();
6839 deps = void 0 === deps ? null : deps;
6840 var nextValue = nextCreate();
6841 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6842 setIsStrictModeForDevtools(true);
6843 try {
6844 nextCreate();
6845 } finally {
6846 setIsStrictModeForDevtools(false);
6847 }
6848 }
6849 hook.memoizedState = [nextValue, deps];
6850 return nextValue;
6851 }
6852 function updateMemo(nextCreate, deps) {
6853 var hook = updateWorkInProgressHook();
6854 deps = void 0 === deps ? null : deps;
6855 var prevState = hook.memoizedState;
6856 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6857 return prevState[0];
6858 prevState = nextCreate();
6859 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6860 setIsStrictModeForDevtools(true);
6861 try {
6862 nextCreate();
6863 } finally {
6864 setIsStrictModeForDevtools(false);
6865 }
6866 }
6867 hook.memoizedState = [prevState, deps];
6868 return prevState;
6869 }
6870 function mountDeferredValue(value, initialValue) {
6871 var hook = mountWorkInProgressHook();
6872 return mountDeferredValueImpl(hook, value, initialValue);
6873 }
6874 function updateDeferredValue(value, initialValue) {
6875 var hook = updateWorkInProgressHook();
6876 return updateDeferredValueImpl(
6877 hook,
6878 currentHook.memoizedState,
6879 value,
6880 initialValue
6881 );
6882 }
6883 function rerenderDeferredValue(value, initialValue) {
6884 var hook = updateWorkInProgressHook();
6885 return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
6886 hook,
6887 currentHook.memoizedState,
6888 value,
6889 initialValue
6890 );
6891 }
6892 function mountDeferredValueImpl(hook, value, initialValue) {
6893 if (void 0 === initialValue || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6894 return hook.memoizedState = value;
6895 hook.memoizedState = initialValue;
6896 hook = requestDeferredLane();
6897 currentlyRenderingFiber.lanes |= hook;
6898 workInProgressRootSkippedLanes |= hook;
6899 return initialValue;
6900 }
6901 function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
6902 if (objectIs(value, prevValue)) return value;
6903 if (null !== currentTreeHiddenStackCursor.current)
6904 return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
6905 if (0 === (renderLanes & 42) || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6906 return didReceiveUpdate = true, hook.memoizedState = value;
6907 hook = requestDeferredLane();
6908 currentlyRenderingFiber.lanes |= hook;
6909 workInProgressRootSkippedLanes |= hook;
6910 return prevValue;
6911 }
6912 function releaseAsyncTransition() {
6913 ReactSharedInternals.asyncTransitions--;
6914 }
6915 function startTransition(fiber, queue, pendingState, finishedState, callback) {
6916 var previousPriority = ReactDOMSharedInternals.p;
6917 ReactDOMSharedInternals.p = 0 !== previousPriority && previousPriority < ContinuousEventPriority ? previousPriority : ContinuousEventPriority;
6918 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6919 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6920 ReactSharedInternals.T = currentTransition;
6921 dispatchOptimisticSetState(fiber, false, queue, pendingState);
6922 try {
6923 var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
6924 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6925 if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
6926 ReactSharedInternals.asyncTransitions++;
6927 returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
6928 var thenableForFinishedState = chainThenableValue(
6929 returnValue,
6930 finishedState
6931 );
6932 dispatchSetStateInternal(
6933 fiber,
6934 queue,
6935 thenableForFinishedState,
6936 requestUpdateLane(fiber)
6937 );
6938 } else
6939 dispatchSetStateInternal(
6940 fiber,
6941 queue,
6942 finishedState,
6943 requestUpdateLane(fiber)
6944 );
6945 } catch (error) {
6946 dispatchSetStateInternal(
6947 fiber,
6948 queue,
6949 { then: function() {
6950 }, status: "rejected", reason: error },
6951 requestUpdateLane(fiber)
6952 );
6953 } finally {
6954 ReactDOMSharedInternals.p = previousPriority, null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6955 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6956 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
6957 "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
6958 ));
6959 }
6960 }
6961 function startHostTransition(formFiber, pendingState, action, formData) {
6962 if (5 !== formFiber.tag)
6963 throw Error(
6964 "Expected the form instance to be a HostComponent. This is a bug in React."
6965 );
6966 var queue = ensureFormComponentIsStateful(formFiber).queue;
6967 startHostActionTimer(formFiber);
6968 startTransition(
6969 formFiber,
6970 queue,
6971 pendingState,
6972 NotPendingTransition,
6973 null === action ? noop : function() {
6974 requestFormReset$1(formFiber);
6975 return action(formData);
6976 }
6977 );
6978 }
6979 function ensureFormComponentIsStateful(formFiber) {
6980 var existingStateHook = formFiber.memoizedState;
6981 if (null !== existingStateHook) return existingStateHook;
6982 existingStateHook = {
6983 memoizedState: NotPendingTransition,
6984 baseState: NotPendingTransition,
6985 baseQueue: null,
6986 queue: {
6987 pending: null,
6988 lanes: 0,
6989 dispatch: null,
6990 lastRenderedReducer: basicStateReducer,
6991 lastRenderedState: NotPendingTransition
6992 },
6993 next: null
6994 };
6995 var initialResetState = {};
6996 existingStateHook.next = {
6997 memoizedState: initialResetState,
6998 baseState: initialResetState,
6999 baseQueue: null,
7000 queue: {
7001 pending: null,
7002 lanes: 0,
7003 dispatch: null,
7004 lastRenderedReducer: basicStateReducer,
7005 lastRenderedState: initialResetState
7006 },
7007 next: null
7008 };
7009 formFiber.memoizedState = existingStateHook;
7010 formFiber = formFiber.alternate;
7011 null !== formFiber && (formFiber.memoizedState = existingStateHook);
7012 return existingStateHook;
7013 }
7014 function requestFormReset$1(formFiber) {
7015 null === ReactSharedInternals.T && console.error(
7016 "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
7017 );
7018 var stateHook = ensureFormComponentIsStateful(formFiber);
7019 null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
7020 dispatchSetStateInternal(
7021 formFiber,
7022 stateHook.next.queue,
7023 {},
7024 requestUpdateLane(formFiber)
7025 );
7026 }
7027 function mountTransition() {
7028 var stateHook = mountStateImpl(false);
7029 stateHook = startTransition.bind(
7030 null,
7031 currentlyRenderingFiber,
7032 stateHook.queue,
7033 true,
7034 false
7035 );
7036 mountWorkInProgressHook().memoizedState = stateHook;
7037 return [false, stateHook];
7038 }
7039 function updateTransition() {
7040 var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
7041 return [
7042 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
7043 start
7044 ];
7045 }
7046 function rerenderTransition() {
7047 var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
7048 return [
7049 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
7050 start
7051 ];
7052 }
7053 function useHostTransitionStatus() {
7054 return readContext(HostTransitionContext);
7055 }
7056 function mountId() {
7057 var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
7058 if (isHydrating) {
7059 var treeId = treeContextOverflow;
7060 var idWithLeadingBit = treeContextId;
7061 treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
7062 identifierPrefix = "_" + identifierPrefix + "R_" + treeId;
7063 treeId = localIdCounter++;
7064 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
7065 identifierPrefix += "_";
7066 } else
7067 treeId = globalClientIdCounter++, identifierPrefix = "_" + identifierPrefix + "r_" + treeId.toString(32) + "_";
7068 return hook.memoizedState = identifierPrefix;
7069 }
7070 function mountRefresh() {
7071 return mountWorkInProgressHook().memoizedState = refreshCache.bind(
7072 null,
7073 currentlyRenderingFiber
7074 );
7075 }
7076 function refreshCache(fiber, seedKey) {
7077 for (var provider = fiber.return; null !== provider; ) {
7078 switch (provider.tag) {
7079 case 24:
7080 case 3:
7081 var lane = requestUpdateLane(provider), refreshUpdate = createUpdate(lane), root2 = enqueueUpdate(provider, refreshUpdate, lane);
7082 null !== root2 && (startUpdateTimerByLane(lane, "refresh()", fiber), scheduleUpdateOnFiber(root2, provider, lane), entangleTransitions(root2, provider, lane));
7083 fiber = createCache();
7084 null !== seedKey && void 0 !== seedKey && null !== root2 && console.error(
7085 "The seed argument is not enabled outside experimental channels."
7086 );
7087 refreshUpdate.payload = { cache: fiber };
7088 return;
7089 }
7090 provider = provider.return;
7091 }
7092 }
7093 function dispatchReducerAction(fiber, queue, action) {
7094 var args = arguments;
7095 "function" === typeof args[3] && console.error(
7096 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
7097 );
7098 args = requestUpdateLane(fiber);
7099 var update = {
7100 lane: args,
7101 revertLane: 0,
7102 gesture: null,
7103 action,
7104 hasEagerState: false,
7105 eagerState: null,
7106 next: null
7107 };
7108 isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (startUpdateTimerByLane(args, "dispatch()", fiber), scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
7109 }
7110 function dispatchSetState(fiber, queue, action) {
7111 var args = arguments;
7112 "function" === typeof args[3] && console.error(
7113 "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
7114 );
7115 args = requestUpdateLane(fiber);
7116 dispatchSetStateInternal(fiber, queue, action, args) && startUpdateTimerByLane(args, "setState()", fiber);
7117 }
7118 function dispatchSetStateInternal(fiber, queue, action, lane) {
7119 var update = {
7120 lane,
7121 revertLane: 0,
7122 gesture: null,
7123 action,
7124 hasEagerState: false,
7125 eagerState: null,
7126 next: null
7127 };
7128 if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
7129 else {
7130 var alternate = fiber.alternate;
7131 if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
7132 var prevDispatcher = ReactSharedInternals.H;
7133 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
7134 try {
7135 var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
7136 update.hasEagerState = true;
7137 update.eagerState = eagerState;
7138 if (objectIs(eagerState, currentState))
7139 return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
7140 } catch (error) {
7141 } finally {
7142 ReactSharedInternals.H = prevDispatcher;
7143 }
7144 }
7145 action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
7146 if (null !== action)
7147 return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
7148 }
7149 return false;
7150 }
7151 function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
7152 null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
7153 "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
7154 );
7155 action = {
7156 lane: 2,
7157 revertLane: requestTransitionLane(),
7158 gesture: null,
7159 action,
7160 hasEagerState: false,
7161 eagerState: null,
7162 next: null
7163 };
7164 if (isRenderPhaseUpdate(fiber)) {
7165 if (throwIfDuringRender)
7166 throw Error("Cannot update optimistic state while rendering.");
7167 console.error("Cannot call startTransition while rendering.");
7168 } else
7169 throwIfDuringRender = enqueueConcurrentHookUpdate(
7170 fiber,
7171 queue,
7172 action,
7173 2
7174 ), null !== throwIfDuringRender && (startUpdateTimerByLane(2, "setOptimistic()", fiber), scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
7175 }
7176 function isRenderPhaseUpdate(fiber) {
7177 var alternate = fiber.alternate;
7178 return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
7179 }
7180 function enqueueRenderPhaseUpdate(queue, update) {
7181 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
7182 var pending = queue.pending;
7183 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
7184 queue.pending = update;
7185 }
7186 function entangleTransitionUpdate(root2, queue, lane) {
7187 if (0 !== (lane & 4194048)) {
7188 var queueLanes = queue.lanes;
7189 queueLanes &= root2.pendingLanes;
7190 lane |= queueLanes;
7191 queue.lanes = lane;
7192 markRootEntangled(root2, lane);
7193 }
7194 }
7195 function warnOnInvalidCallback(callback) {
7196 if (null !== callback && "function" !== typeof callback) {
7197 var key = String(callback);
7198 didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
7199 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
7200 callback
7201 ));
7202 }
7203 }
7204 function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
7205 var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
7206 if (workInProgress2.mode & StrictLegacyMode) {
7207 setIsStrictModeForDevtools(true);
7208 try {
7209 partialState = getDerivedStateFromProps(nextProps, prevState);
7210 } finally {
7211 setIsStrictModeForDevtools(false);
7212 }
7213 }
7214 void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
7215 "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
7216 ctor
7217 )));
7218 prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
7219 workInProgress2.memoizedState = prevState;
7220 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
7221 }
7222 function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
7223 var instance = workInProgress2.stateNode;
7224 if ("function" === typeof instance.shouldComponentUpdate) {
7225 oldProps = instance.shouldComponentUpdate(
7226 newProps,
7227 newState,
7228 nextContext
7229 );
7230 if (workInProgress2.mode & StrictLegacyMode) {
7231 setIsStrictModeForDevtools(true);
7232 try {
7233 oldProps = instance.shouldComponentUpdate(
7234 newProps,
7235 newState,
7236 nextContext
7237 );
7238 } finally {
7239 setIsStrictModeForDevtools(false);
7240 }
7241 }
7242 void 0 === oldProps && console.error(
7243 "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
7244 getComponentNameFromType(ctor) || "Component"
7245 );
7246 return oldProps;
7247 }
7248 return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
7249 }
7250 function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
7251 var oldState = instance.state;
7252 "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
7253 "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
7254 instance.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
7255 "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7256 workInProgress2
7257 )), classComponentUpdater.enqueueReplaceState(
7258 instance,
7259 instance.state,
7260 null
7261 ));
7262 }
7263 function resolveClassComponentProps(Component, baseProps) {
7264 var newProps = baseProps;
7265 if ("ref" in baseProps) {
7266 newProps = {};
7267 for (var propName in baseProps)
7268 "ref" !== propName && (newProps[propName] = baseProps[propName]);
7269 }
7270 if (Component = Component.defaultProps) {
7271 newProps === baseProps && (newProps = assign({}, newProps));
7272 for (var _propName in Component)
7273 void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
7274 }
7275 return newProps;
7276 }
7277 function defaultOnUncaughtError(error) {
7278 reportGlobalError(error);
7279 console.warn(
7280 "%s\n\n%s\n",
7281 componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
7282 "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
7283 );
7284 }
7285 function defaultOnCaughtError(error) {
7286 var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component." : "The above error occurred in one of your React components.", recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + ".");
7287 if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
7288 var JSCompiler_inline_result = error.environmentName;
7289 error = [
7290 "%o\n\n%s\n\n%s\n",
7291 error,
7292 componentNameMessage,
7293 recreateMessage
7294 ].slice(0);
7295 "string" === typeof error[0] ? error.splice(
7296 0,
7297 1,
7298 badgeFormat + " " + error[0],
7299 badgeStyle,
7300 pad + JSCompiler_inline_result + pad,
7301 resetStyle
7302 ) : error.splice(
7303 0,
7304 0,
7305 badgeFormat,
7306 badgeStyle,
7307 pad + JSCompiler_inline_result + pad,
7308 resetStyle
7309 );
7310 error.unshift(console);
7311 JSCompiler_inline_result = bind.apply(console.error, error);
7312 JSCompiler_inline_result();
7313 } else
7314 console.error(
7315 "%o\n\n%s\n\n%s\n",
7316 error,
7317 componentNameMessage,
7318 recreateMessage
7319 );
7320 }
7321 function defaultOnRecoverableError(error) {
7322 reportGlobalError(error);
7323 }
7324 function logUncaughtError(root2, errorInfo) {
7325 try {
7326 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7327 errorBoundaryName = null;
7328 var error = errorInfo.value;
7329 if (null !== ReactSharedInternals.actQueue)
7330 ReactSharedInternals.thrownErrors.push(error);
7331 else {
7332 var onUncaughtError = root2.onUncaughtError;
7333 onUncaughtError(error, { componentStack: errorInfo.stack });
7334 }
7335 } catch (e$5) {
7336 setTimeout(function() {
7337 throw e$5;
7338 });
7339 }
7340 }
7341 function logCaughtError(root2, boundary, errorInfo) {
7342 try {
7343 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7344 errorBoundaryName = getComponentNameFromFiber(boundary);
7345 var onCaughtError = root2.onCaughtError;
7346 onCaughtError(errorInfo.value, {
7347 componentStack: errorInfo.stack,
7348 errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
7349 });
7350 } catch (e$6) {
7351 setTimeout(function() {
7352 throw e$6;
7353 });
7354 }
7355 }
7356 function createRootErrorUpdate(root2, errorInfo, lane) {
7357 lane = createUpdate(lane);
7358 lane.tag = CaptureUpdate;
7359 lane.payload = { element: null };
7360 lane.callback = function() {
7361 runWithFiberInDEV(errorInfo.source, logUncaughtError, root2, errorInfo);
7362 };
7363 return lane;
7364 }
7365 function createClassErrorUpdate(lane) {
7366 lane = createUpdate(lane);
7367 lane.tag = CaptureUpdate;
7368 return lane;
7369 }
7370 function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
7371 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
7372 if ("function" === typeof getDerivedStateFromError) {
7373 var error = errorInfo.value;
7374 update.payload = function() {
7375 return getDerivedStateFromError(error);
7376 };
7377 update.callback = function() {
7378 markFailedErrorBoundaryForHotReloading(fiber);
7379 runWithFiberInDEV(
7380 errorInfo.source,
7381 logCaughtError,
7382 root2,
7383 fiber,
7384 errorInfo
7385 );
7386 };
7387 }
7388 var inst = fiber.stateNode;
7389 null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
7390 markFailedErrorBoundaryForHotReloading(fiber);
7391 runWithFiberInDEV(
7392 errorInfo.source,
7393 logCaughtError,
7394 root2,
7395 fiber,
7396 errorInfo
7397 );
7398 "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
7399 callComponentDidCatchInDEV(this, errorInfo);
7400 "function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
7401 "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
7402 getComponentNameFromFiber(fiber) || "Unknown"
7403 );
7404 });
7405 }
7406 function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
7407 sourceFiber.flags |= 32768;
7408 isDevToolsPresent && restorePendingUpdaters(root2, rootRenderLanes);
7409 if (null !== value && "object" === typeof value && "function" === typeof value.then) {
7410 returnFiber = sourceFiber.alternate;
7411 null !== returnFiber && propagateParentContextChanges(
7412 returnFiber,
7413 sourceFiber,
7414 rootRenderLanes,
7415 true
7416 );
7417 isHydrating && (didSuspendOrErrorDEV = true);
7418 sourceFiber = suspenseHandlerStackCursor.current;
7419 if (null !== sourceFiber) {
7420 switch (sourceFiber.tag) {
7421 case 31:
7422 case 13:
7423 return null === shellBoundary ? renderDidSuspendDelayIfPossible() : null === sourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended), sourceFiber.flags &= -257, sourceFiber.flags |= 65536, sourceFiber.lanes = rootRenderLanes, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? sourceFiber.updateQueue = /* @__PURE__ */ new Set([value]) : returnFiber.add(value), attachPingListener(root2, value, rootRenderLanes)), false;
7424 case 22:
7425 return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
7426 transitions: null,
7427 markerInstances: null,
7428 retryQueue: /* @__PURE__ */ new Set([value])
7429 }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), false;
7430 }
7431 throw Error(
7432 "Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
7433 );
7434 }
7435 attachPingListener(root2, value, rootRenderLanes);
7436 renderDidSuspendDelayIfPossible();
7437 return false;
7438 }
7439 if (isHydrating)
7440 return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
7441 createCapturedValueAtFiber(
7442 Error(
7443 "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
7444 { cause: value }
7445 ),
7446 sourceFiber
7447 )
7448 )) : (value !== HydrationMismatchException && queueHydrationError(
7449 createCapturedValueAtFiber(
7450 Error(
7451 "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
7452 { cause: value }
7453 ),
7454 sourceFiber
7455 )
7456 ), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
7457 root2.stateNode,
7458 value,
7459 rootRenderLanes
7460 ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
7461 var error = createCapturedValueAtFiber(
7462 Error(
7463 "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
7464 { cause: value }
7465 ),
7466 sourceFiber
7467 );
7468 null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
7469 workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
7470 if (null === returnFiber) return true;
7471 value = createCapturedValueAtFiber(value, sourceFiber);
7472 sourceFiber = returnFiber;
7473 do {
7474 switch (sourceFiber.tag) {
7475 case 3:
7476 return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(
7477 sourceFiber.stateNode,
7478 value,
7479 root2
7480 ), enqueueCapturedUpdate(sourceFiber, root2), false;
7481 case 1:
7482 if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
7483 return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
7484 rootRenderLanes,
7485 root2,
7486 sourceFiber,
7487 value
7488 ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
7489 }
7490 sourceFiber = sourceFiber.return;
7491 } while (null !== sourceFiber);
7492 return false;
7493 }
7494 function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
7495 workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
7496 workInProgress2,
7497 current2.child,
7498 nextChildren,
7499 renderLanes2
7500 );
7501 }
7502 function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
7503 Component = Component.render;
7504 var ref = workInProgress2.ref;
7505 if ("ref" in nextProps) {
7506 var propsWithoutRef = {};
7507 for (var key in nextProps)
7508 "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
7509 } else propsWithoutRef = nextProps;
7510 prepareToReadContext(workInProgress2);
7511 nextProps = renderWithHooks(
7512 current2,
7513 workInProgress2,
7514 Component,
7515 propsWithoutRef,
7516 ref,
7517 renderLanes2
7518 );
7519 key = checkDidRenderIdHook();
7520 if (null !== current2 && !didReceiveUpdate)
7521 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7522 isHydrating && key && pushMaterializedTreeId(workInProgress2);
7523 workInProgress2.flags |= 1;
7524 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7525 return workInProgress2.child;
7526 }
7527 function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7528 if (null === current2) {
7529 var type = Component.type;
7530 if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
7531 return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
7532 current2,
7533 workInProgress2,
7534 Component,
7535 nextProps,
7536 renderLanes2
7537 );
7538 current2 = createFiberFromTypeAndProps(
7539 Component.type,
7540 null,
7541 nextProps,
7542 workInProgress2,
7543 workInProgress2.mode,
7544 renderLanes2
7545 );
7546 current2.ref = workInProgress2.ref;
7547 current2.return = workInProgress2;
7548 return workInProgress2.child = current2;
7549 }
7550 type = current2.child;
7551 if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
7552 var prevProps = type.memoizedProps;
7553 Component = Component.compare;
7554 Component = null !== Component ? Component : shallowEqual;
7555 if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
7556 return bailoutOnAlreadyFinishedWork(
7557 current2,
7558 workInProgress2,
7559 renderLanes2
7560 );
7561 }
7562 workInProgress2.flags |= 1;
7563 current2 = createWorkInProgress(type, nextProps);
7564 current2.ref = workInProgress2.ref;
7565 current2.return = workInProgress2;
7566 return workInProgress2.child = current2;
7567 }
7568 function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7569 if (null !== current2) {
7570 var prevProps = current2.memoizedProps;
7571 if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
7572 if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
7573 0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
7574 else
7575 return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7576 }
7577 return updateFunctionComponent(
7578 current2,
7579 workInProgress2,
7580 Component,
7581 nextProps,
7582 renderLanes2
7583 );
7584 }
7585 function updateOffscreenComponent(current2, workInProgress2, renderLanes2, nextProps) {
7586 var nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
7587 null === current2 && null === workInProgress2.stateNode && (workInProgress2.stateNode = {
7588 _visibility: OffscreenVisible,
7589 _pendingMarkers: null,
7590 _retryCache: null,
7591 _transitions: null
7592 });
7593 if ("hidden" === nextProps.mode) {
7594 if (0 !== (workInProgress2.flags & 128)) {
7595 prevState = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
7596 if (null !== current2) {
7597 nextProps = workInProgress2.child = current2.child;
7598 for (nextChildren = 0; null !== nextProps; )
7599 nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
7600 nextProps = nextChildren & ~prevState;
7601 } else nextProps = 0, workInProgress2.child = null;
7602 return deferHiddenOffscreenComponent(
7603 current2,
7604 workInProgress2,
7605 prevState,
7606 renderLanes2,
7607 nextProps
7608 );
7609 }
7610 if (0 !== (renderLanes2 & 536870912))
7611 workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
7612 workInProgress2,
7613 null !== prevState ? prevState.cachePool : null
7614 ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
7615 else
7616 return nextProps = workInProgress2.lanes = 536870912, deferHiddenOffscreenComponent(
7617 current2,
7618 workInProgress2,
7619 null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
7620 renderLanes2,
7621 nextProps
7622 );
7623 } else
7624 null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
7625 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
7626 return workInProgress2.child;
7627 }
7628 function bailoutOffscreenComponent(current2, workInProgress2) {
7629 null !== current2 && 22 === current2.tag || null !== workInProgress2.stateNode || (workInProgress2.stateNode = {
7630 _visibility: OffscreenVisible,
7631 _pendingMarkers: null,
7632 _retryCache: null,
7633 _transitions: null
7634 });
7635 return workInProgress2.sibling;
7636 }
7637 function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2, remainingChildLanes) {
7638 var JSCompiler_inline_result = peekCacheFromPool();
7639 JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
7640 parent: CacheContext._currentValue,
7641 pool: JSCompiler_inline_result
7642 };
7643 workInProgress2.memoizedState = {
7644 baseLanes: nextBaseLanes,
7645 cachePool: JSCompiler_inline_result
7646 };
7647 null !== current2 && pushTransition(workInProgress2, null);
7648 reuseHiddenContextOnStack(workInProgress2);
7649 pushOffscreenSuspenseHandler(workInProgress2);
7650 null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
7651 workInProgress2.childLanes = remainingChildLanes;
7652 return null;
7653 }
7654 function mountActivityChildren(workInProgress2, nextProps) {
7655 var hiddenProp = nextProps.hidden;
7656 void 0 !== hiddenProp && console.error(
7657 `<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
7658 - <Activity %s>
7659 + <Activity %s>`,
7660 true === hiddenProp ? "hidden" : false === hiddenProp ? "hidden={false}" : "hidden={...}",
7661 hiddenProp ? 'mode="hidden"' : 'mode="visible"'
7662 );
7663 nextProps = mountWorkInProgressOffscreenFiber(
7664 { mode: nextProps.mode, children: nextProps.children },
7665 workInProgress2.mode
7666 );
7667 nextProps.ref = workInProgress2.ref;
7668 workInProgress2.child = nextProps;
7669 nextProps.return = workInProgress2;
7670 return nextProps;
7671 }
7672 function retryActivityComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
7673 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
7674 current2 = mountActivityChildren(
7675 workInProgress2,
7676 workInProgress2.pendingProps
7677 );
7678 current2.flags |= 2;
7679 popSuspenseHandler(workInProgress2);
7680 workInProgress2.memoizedState = null;
7681 return current2;
7682 }
7683 function updateActivityComponent(current2, workInProgress2, renderLanes2) {
7684 var nextProps = workInProgress2.pendingProps, didSuspend = 0 !== (workInProgress2.flags & 128);
7685 workInProgress2.flags &= -129;
7686 if (null === current2) {
7687 if (isHydrating) {
7688 if ("hidden" === nextProps.mode)
7689 return current2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.lanes = 536870912, bailoutOffscreenComponent(null, current2);
7690 pushDehydratedActivitySuspenseHandler(workInProgress2);
7691 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
7692 current2,
7693 rootOrSingletonContext
7694 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data === ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (nextProps = {
7695 dehydrated: renderLanes2,
7696 treeContext: getSuspendedTreeContext(),
7697 retryLane: 536870912,
7698 hydrationErrors: null
7699 }, workInProgress2.memoizedState = nextProps, nextProps = createFiberFromDehydratedFragment(renderLanes2), nextProps.return = workInProgress2, workInProgress2.child = nextProps, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
7700 if (null === renderLanes2)
7701 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
7702 workInProgress2.lanes = 536870912;
7703 return null;
7704 }
7705 return mountActivityChildren(workInProgress2, nextProps);
7706 }
7707 var prevState = current2.memoizedState;
7708 if (null !== prevState) {
7709 var activityInstance = prevState.dehydrated;
7710 pushDehydratedActivitySuspenseHandler(workInProgress2);
7711 if (didSuspend)
7712 if (workInProgress2.flags & 256)
7713 workInProgress2.flags &= -257, workInProgress2 = retryActivityComponentWithoutHydrating(
7714 current2,
7715 workInProgress2,
7716 renderLanes2
7717 );
7718 else if (null !== workInProgress2.memoizedState)
7719 workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null;
7720 else
7721 throw Error(
7722 "Client rendering an Activity suspended it again. This is a bug in React."
7723 );
7724 else if (warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), didReceiveUpdate || propagateParentContextChanges(
7725 current2,
7726 workInProgress2,
7727 renderLanes2,
7728 false
7729 ), didSuspend = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || didSuspend) {
7730 nextProps = workInProgressRoot;
7731 if (null !== nextProps && (activityInstance = getBumpedLaneForHydration(
7732 nextProps,
7733 renderLanes2
7734 ), 0 !== activityInstance && activityInstance !== prevState.retryLane))
7735 throw prevState.retryLane = activityInstance, enqueueConcurrentRenderForLane(current2, activityInstance), scheduleUpdateOnFiber(nextProps, current2, activityInstance), SelectiveHydrationException;
7736 renderDidSuspendDelayIfPossible();
7737 workInProgress2 = retryActivityComponentWithoutHydrating(
7738 current2,
7739 workInProgress2,
7740 renderLanes2
7741 );
7742 } else
7743 current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
7744 activityInstance.nextSibling
7745 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.flags |= 4096;
7746 return workInProgress2;
7747 }
7748 prevState = current2.child;
7749 nextProps = { mode: nextProps.mode, children: nextProps.children };
7750 0 !== (renderLanes2 & 536870912) && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
7751 current2 = createWorkInProgress(prevState, nextProps);
7752 current2.ref = workInProgress2.ref;
7753 workInProgress2.child = current2;
7754 current2.return = workInProgress2;
7755 return current2;
7756 }
7757 function markRef(current2, workInProgress2) {
7758 var ref = workInProgress2.ref;
7759 if (null === ref)
7760 null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
7761 else {
7762 if ("function" !== typeof ref && "object" !== typeof ref)
7763 throw Error(
7764 "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
7765 );
7766 if (null === current2 || current2.ref !== ref)
7767 workInProgress2.flags |= 4194816;
7768 }
7769 }
7770 function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7771 if (Component.prototype && "function" === typeof Component.prototype.render) {
7772 var componentName2 = getComponentNameFromType(Component) || "Unknown";
7773 didWarnAboutBadClass[componentName2] || (console.error(
7774 "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
7775 componentName2,
7776 componentName2
7777 ), didWarnAboutBadClass[componentName2] = true);
7778 }
7779 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7780 workInProgress2,
7781 null
7782 );
7783 null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
7784 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
7785 componentName2
7786 ))));
7787 prepareToReadContext(workInProgress2);
7788 Component = renderWithHooks(
7789 current2,
7790 workInProgress2,
7791 Component,
7792 nextProps,
7793 void 0,
7794 renderLanes2
7795 );
7796 nextProps = checkDidRenderIdHook();
7797 if (null !== current2 && !didReceiveUpdate)
7798 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7799 isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
7800 workInProgress2.flags |= 1;
7801 reconcileChildren(current2, workInProgress2, Component, renderLanes2);
7802 return workInProgress2.child;
7803 }
7804 function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
7805 prepareToReadContext(workInProgress2);
7806 hookTypesUpdateIndexDev = -1;
7807 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
7808 workInProgress2.updateQueue = null;
7809 nextProps = renderWithHooksAgain(
7810 workInProgress2,
7811 Component,
7812 nextProps,
7813 secondArg
7814 );
7815 finishRenderingHooks(current2, workInProgress2);
7816 Component = checkDidRenderIdHook();
7817 if (null !== current2 && !didReceiveUpdate)
7818 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7819 isHydrating && Component && pushMaterializedTreeId(workInProgress2);
7820 workInProgress2.flags |= 1;
7821 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7822 return workInProgress2.child;
7823 }
7824 function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7825 switch (shouldErrorImpl(workInProgress2)) {
7826 case false:
7827 var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
7828 workInProgress2.memoizedProps,
7829 _instance.context
7830 ).state;
7831 _instance.updater.enqueueSetState(_instance, state, null);
7832 break;
7833 case true:
7834 workInProgress2.flags |= 128;
7835 workInProgress2.flags |= 65536;
7836 _instance = Error("Simulated error coming from DevTools");
7837 var lane = renderLanes2 & -renderLanes2;
7838 workInProgress2.lanes |= lane;
7839 state = workInProgressRoot;
7840 if (null === state)
7841 throw Error(
7842 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
7843 );
7844 lane = createClassErrorUpdate(lane);
7845 initializeClassErrorUpdate(
7846 lane,
7847 state,
7848 workInProgress2,
7849 createCapturedValueAtFiber(_instance, workInProgress2)
7850 );
7851 enqueueCapturedUpdate(workInProgress2, lane);
7852 }
7853 prepareToReadContext(workInProgress2);
7854 if (null === workInProgress2.stateNode) {
7855 state = emptyContextObject;
7856 _instance = Component.contextType;
7857 "contextType" in Component && null !== _instance && (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) && !didWarnAboutInvalidateContextType.has(Component) && (didWarnAboutInvalidateContextType.add(Component), lane = void 0 === _instance ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" !== typeof _instance ? " However, it is set to a " + typeof _instance + "." : _instance.$$typeof === REACT_CONSUMER_TYPE ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(_instance).join(", ") + "}.", console.error(
7858 "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
7859 getComponentNameFromType(Component) || "Component",
7860 lane
7861 ));
7862 "object" === typeof _instance && null !== _instance && (state = readContext(_instance));
7863 _instance = new Component(nextProps, state);
7864 if (workInProgress2.mode & StrictLegacyMode) {
7865 setIsStrictModeForDevtools(true);
7866 try {
7867 _instance = new Component(nextProps, state);
7868 } finally {
7869 setIsStrictModeForDevtools(false);
7870 }
7871 }
7872 state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
7873 _instance.updater = classComponentUpdater;
7874 workInProgress2.stateNode = _instance;
7875 _instance._reactInternals = workInProgress2;
7876 _instance._reactInternalInstance = fakeInternalInstance;
7877 "function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
7878 "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
7879 state,
7880 null === _instance.state ? "null" : "undefined",
7881 state
7882 )));
7883 if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
7884 var foundWillUpdateName = lane = state = null;
7885 "function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
7886 "function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
7887 "function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
7888 if (null !== state || null !== lane || null !== foundWillUpdateName) {
7889 _instance = getComponentNameFromType(Component) || "Component";
7890 var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
7891 didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
7892 "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
7893 _instance,
7894 newApiName,
7895 null !== state ? "\n " + state : "",
7896 null !== lane ? "\n " + lane : "",
7897 null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
7898 ));
7899 }
7900 }
7901 _instance = workInProgress2.stateNode;
7902 state = getComponentNameFromType(Component) || "Component";
7903 _instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
7904 "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
7905 state
7906 ) : console.error(
7907 "No `render` method found on the %s instance: you may have forgotten to define `render`.",
7908 state
7909 ));
7910 !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
7911 "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
7912 state
7913 );
7914 _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
7915 "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
7916 state
7917 );
7918 _instance.contextType && console.error(
7919 "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
7920 state
7921 );
7922 Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
7923 "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
7924 state
7925 ));
7926 Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
7927 "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
7928 state
7929 ));
7930 "function" === typeof _instance.componentShouldUpdate && console.error(
7931 "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
7932 state
7933 );
7934 Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
7935 "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
7936 getComponentNameFromType(Component) || "A pure component"
7937 );
7938 "function" === typeof _instance.componentDidUnmount && console.error(
7939 "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
7940 state
7941 );
7942 "function" === typeof _instance.componentDidReceiveProps && console.error(
7943 "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
7944 state
7945 );
7946 "function" === typeof _instance.componentWillRecieveProps && console.error(
7947 "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
7948 state
7949 );
7950 "function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
7951 "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
7952 state
7953 );
7954 lane = _instance.props !== nextProps;
7955 void 0 !== _instance.props && lane && console.error(
7956 "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
7957 state
7958 );
7959 _instance.defaultProps && console.error(
7960 "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
7961 state,
7962 state
7963 );
7964 "function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
7965 "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
7966 getComponentNameFromType(Component)
7967 ));
7968 "function" === typeof _instance.getDerivedStateFromProps && console.error(
7969 "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7970 state
7971 );
7972 "function" === typeof _instance.getDerivedStateFromError && console.error(
7973 "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7974 state
7975 );
7976 "function" === typeof Component.getSnapshotBeforeUpdate && console.error(
7977 "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
7978 state
7979 );
7980 (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
7981 "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
7982 "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
7983 state
7984 );
7985 _instance = workInProgress2.stateNode;
7986 _instance.props = nextProps;
7987 _instance.state = workInProgress2.memoizedState;
7988 _instance.refs = {};
7989 initializeUpdateQueue(workInProgress2);
7990 state = Component.contextType;
7991 _instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
7992 _instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
7993 "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
7994 state
7995 )));
7996 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7997 workInProgress2,
7998 _instance
7999 );
8000 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
8001 workInProgress2,
8002 _instance
8003 );
8004 _instance.state = workInProgress2.memoizedState;
8005 state = Component.getDerivedStateFromProps;
8006 "function" === typeof state && (applyDerivedStateFromProps(
8007 workInProgress2,
8008 Component,
8009 state,
8010 nextProps
8011 ), _instance.state = workInProgress2.memoizedState);
8012 "function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || (state = _instance.state, "function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount(), state !== _instance.state && (console.error(
8013 "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
8014 getComponentNameFromFiber(workInProgress2) || "Component"
8015 ), classComponentUpdater.enqueueReplaceState(
8016 _instance,
8017 _instance.state,
8018 null
8019 )), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
8020 "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
8021 (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728);
8022 _instance = true;
8023 } else if (null === current2) {
8024 _instance = workInProgress2.stateNode;
8025 var unresolvedOldProps = workInProgress2.memoizedProps;
8026 lane = resolveClassComponentProps(Component, unresolvedOldProps);
8027 _instance.props = lane;
8028 var oldContext = _instance.context;
8029 foundWillUpdateName = Component.contextType;
8030 state = emptyContextObject;
8031 "object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
8032 newApiName = Component.getDerivedStateFromProps;
8033 foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
8034 unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
8035 foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
8036 workInProgress2,
8037 _instance,
8038 nextProps,
8039 state
8040 );
8041 hasForceUpdate = false;
8042 var oldState = workInProgress2.memoizedState;
8043 _instance.state = oldState;
8044 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
8045 suspendIfUpdateReadFromEntangledAsyncAction();
8046 oldContext = workInProgress2.memoizedState;
8047 unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
8048 workInProgress2,
8049 Component,
8050 newApiName,
8051 nextProps
8052 ), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
8053 workInProgress2,
8054 Component,
8055 lane,
8056 nextProps,
8057 oldState,
8058 oldContext,
8059 state
8060 )) ? (foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillMount && "function" !== typeof _instance.componentWillMount || ("function" === typeof _instance.componentWillMount && _instance.componentWillMount(), "function" === typeof _instance.UNSAFE_componentWillMount && _instance.UNSAFE_componentWillMount()), "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728)) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = oldContext), _instance.props = nextProps, _instance.state = oldContext, _instance.context = state, _instance = lane) : ("function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308), (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728), _instance = false);
8061 } else {
8062 _instance = workInProgress2.stateNode;
8063 cloneUpdateQueue(current2, workInProgress2);
8064 state = workInProgress2.memoizedProps;
8065 foundWillUpdateName = resolveClassComponentProps(Component, state);
8066 _instance.props = foundWillUpdateName;
8067 newApiName = workInProgress2.pendingProps;
8068 oldState = _instance.context;
8069 oldContext = Component.contextType;
8070 lane = emptyContextObject;
8071 "object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
8072 unresolvedOldProps = Component.getDerivedStateFromProps;
8073 (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
8074 workInProgress2,
8075 _instance,
8076 nextProps,
8077 lane
8078 );
8079 hasForceUpdate = false;
8080 oldState = workInProgress2.memoizedState;
8081 _instance.state = oldState;
8082 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
8083 suspendIfUpdateReadFromEntangledAsyncAction();
8084 var newState = workInProgress2.memoizedState;
8085 state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
8086 workInProgress2,
8087 Component,
8088 unresolvedOldProps,
8089 nextProps
8090 ), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
8091 workInProgress2,
8092 Component,
8093 foundWillUpdateName,
8094 nextProps,
8095 oldState,
8096 newState,
8097 lane
8098 ) || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies)) ? (oldContext || "function" !== typeof _instance.UNSAFE_componentWillUpdate && "function" !== typeof _instance.componentWillUpdate || ("function" === typeof _instance.componentWillUpdate && _instance.componentWillUpdate(nextProps, newState, lane), "function" === typeof _instance.UNSAFE_componentWillUpdate && _instance.UNSAFE_componentWillUpdate(
8099 nextProps,
8100 newState,
8101 lane
8102 )), "function" === typeof _instance.componentDidUpdate && (workInProgress2.flags |= 4), "function" === typeof _instance.getSnapshotBeforeUpdate && (workInProgress2.flags |= 1024)) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), workInProgress2.memoizedProps = nextProps, workInProgress2.memoizedState = newState), _instance.props = nextProps, _instance.state = newState, _instance.context = lane, _instance = foundWillUpdateName) : ("function" !== typeof _instance.componentDidUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 4), "function" !== typeof _instance.getSnapshotBeforeUpdate || state === current2.memoizedProps && oldState === current2.memoizedState || (workInProgress2.flags |= 1024), _instance = false);
8103 }
8104 lane = _instance;
8105 markRef(current2, workInProgress2);
8106 state = 0 !== (workInProgress2.flags & 128);
8107 if (lane || state) {
8108 lane = workInProgress2.stateNode;
8109 setCurrentFiber(workInProgress2);
8110 if (state && "function" !== typeof Component.getDerivedStateFromError)
8111 Component = null, profilerStartTime = -1;
8112 else if (Component = callRenderInDEV(lane), workInProgress2.mode & StrictLegacyMode) {
8113 setIsStrictModeForDevtools(true);
8114 try {
8115 callRenderInDEV(lane);
8116 } finally {
8117 setIsStrictModeForDevtools(false);
8118 }
8119 }
8120 workInProgress2.flags |= 1;
8121 null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
8122 workInProgress2,
8123 current2.child,
8124 null,
8125 renderLanes2
8126 ), workInProgress2.child = reconcileChildFibers(
8127 workInProgress2,
8128 null,
8129 Component,
8130 renderLanes2
8131 )) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
8132 workInProgress2.memoizedState = lane.state;
8133 current2 = workInProgress2.child;
8134 } else
8135 current2 = bailoutOnAlreadyFinishedWork(
8136 current2,
8137 workInProgress2,
8138 renderLanes2
8139 );
8140 renderLanes2 = workInProgress2.stateNode;
8141 _instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
8142 "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
8143 getComponentNameFromFiber(workInProgress2) || "a component"
8144 ), didWarnAboutReassigningProps = true);
8145 return current2;
8146 }
8147 function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
8148 resetHydrationState();
8149 workInProgress2.flags |= 256;
8150 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
8151 return workInProgress2.child;
8152 }
8153 function validateFunctionComponentInDev(workInProgress2, Component) {
8154 Component && Component.childContextTypes && console.error(
8155 "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
8156 Component.displayName || Component.name || "Component"
8157 );
8158 "function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
8159 "%s: Function components do not support getDerivedStateFromProps.",
8160 workInProgress2
8161 ), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
8162 "object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
8163 "%s: Function components do not support contextType.",
8164 Component
8165 ), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
8166 }
8167 function mountSuspenseOffscreenState(renderLanes2) {
8168 return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
8169 }
8170 function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
8171 current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
8172 primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
8173 return current2;
8174 }
8175 function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
8176 var JSCompiler_object_inline_digest_2724;
8177 var JSCompiler_object_inline_stack_2725 = workInProgress2.pendingProps;
8178 shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
8179 var JSCompiler_object_inline_message_2723 = false;
8180 var didSuspend = 0 !== (workInProgress2.flags & 128);
8181 (JSCompiler_object_inline_digest_2724 = didSuspend) || (JSCompiler_object_inline_digest_2724 = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
8182 JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_message_2723 = true, workInProgress2.flags &= -129);
8183 JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress2.flags & 32);
8184 workInProgress2.flags &= -33;
8185 if (null === current2) {
8186 if (isHydrating) {
8187 JSCompiler_object_inline_message_2723 ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
8188 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
8189 current2,
8190 rootOrSingletonContext
8191 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data !== ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (JSCompiler_object_inline_digest_2724 = {
8192 dehydrated: renderLanes2,
8193 treeContext: getSuspendedTreeContext(),
8194 retryLane: 536870912,
8195 hydrationErrors: null
8196 }, workInProgress2.memoizedState = JSCompiler_object_inline_digest_2724, JSCompiler_object_inline_digest_2724 = createFiberFromDehydratedFragment(renderLanes2), JSCompiler_object_inline_digest_2724.return = workInProgress2, workInProgress2.child = JSCompiler_object_inline_digest_2724, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
8197 if (null === renderLanes2)
8198 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
8199 isSuspenseInstanceFallback(renderLanes2) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912;
8200 return null;
8201 }
8202 var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;
8203 JSCompiler_object_inline_stack_2725 = JSCompiler_object_inline_stack_2725.fallback;
8204 if (JSCompiler_object_inline_message_2723) {
8205 reuseSuspenseHandlerOnStack(workInProgress2);
8206 var mode = workInProgress2.mode;
8207 nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
8208 { mode: "hidden", children: nextPrimaryChildren },
8209 mode
8210 );
8211 JSCompiler_object_inline_stack_2725 = createFiberFromFragment(
8212 JSCompiler_object_inline_stack_2725,
8213 mode,
8214 renderLanes2,
8215 null
8216 );
8217 nextPrimaryChildren.return = workInProgress2;
8218 JSCompiler_object_inline_stack_2725.return = workInProgress2;
8219 nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;
8220 workInProgress2.child = nextPrimaryChildren;
8221 JSCompiler_object_inline_stack_2725 = workInProgress2.child;
8222 JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2);
8223 JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8224 current2,
8225 JSCompiler_object_inline_digest_2724,
8226 renderLanes2
8227 );
8228 workInProgress2.memoizedState = SUSPENDED_MARKER;
8229 return bailoutOffscreenComponent(
8230 null,
8231 JSCompiler_object_inline_stack_2725
8232 );
8233 }
8234 pushPrimaryTreeSuspenseHandler(workInProgress2);
8235 return mountSuspensePrimaryChildren(
8236 workInProgress2,
8237 nextPrimaryChildren
8238 );
8239 }
8240 var prevState = current2.memoizedState;
8241 if (null !== prevState) {
8242 var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;
8243 if (null !== JSCompiler_object_inline_componentStack_2726) {
8244 if (didSuspend)
8245 workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
8246 current2,
8247 workInProgress2,
8248 renderLanes2
8249 )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, JSCompiler_object_inline_stack_2725 = mountWorkInProgressOffscreenFiber(
8250 {
8251 mode: "visible",
8252 children: JSCompiler_object_inline_stack_2725.children
8253 },
8254 mode
8255 ), nextPrimaryChildren = createFiberFromFragment(
8256 nextPrimaryChildren,
8257 mode,
8258 renderLanes2,
8259 null
8260 ), nextPrimaryChildren.flags |= 2, JSCompiler_object_inline_stack_2725.return = workInProgress2, nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, reconcileChildFibers(
8261 workInProgress2,
8262 current2.child,
8263 null,
8264 renderLanes2
8265 ), JSCompiler_object_inline_stack_2725 = workInProgress2.child, JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8266 current2,
8267 JSCompiler_object_inline_digest_2724,
8268 renderLanes2
8269 ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = bailoutOffscreenComponent(
8270 null,
8271 JSCompiler_object_inline_stack_2725
8272 ));
8273 else if (pushPrimaryTreeSuspenseHandler(workInProgress2), warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), isSuspenseInstanceFallback(
8274 JSCompiler_object_inline_componentStack_2726
8275 )) {
8276 JSCompiler_object_inline_digest_2724 = JSCompiler_object_inline_componentStack_2726.nextSibling && JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;
8277 if (JSCompiler_object_inline_digest_2724) {
8278 nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;
8279 var message = JSCompiler_object_inline_digest_2724.msg;
8280 mode = JSCompiler_object_inline_digest_2724.stck;
8281 var componentStack = JSCompiler_object_inline_digest_2724.cstck;
8282 }
8283 JSCompiler_object_inline_message_2723 = message;
8284 JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;
8285 JSCompiler_object_inline_stack_2725 = mode;
8286 JSCompiler_object_inline_componentStack_2726 = componentStack;
8287 nextPrimaryChildren = JSCompiler_object_inline_message_2723;
8288 mode = JSCompiler_object_inline_componentStack_2726;
8289 nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error(
8290 "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
8291 );
8292 nextPrimaryChildren.stack = JSCompiler_object_inline_stack_2725 || "";
8293 nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;
8294 JSCompiler_object_inline_digest_2724 = void 0 === mode ? null : mode;
8295 JSCompiler_object_inline_stack_2725 = {
8296 value: nextPrimaryChildren,
8297 source: null,
8298 stack: JSCompiler_object_inline_digest_2724
8299 };
8300 "string" === typeof JSCompiler_object_inline_digest_2724 && CapturedStacks.set(
8301 nextPrimaryChildren,
8302 JSCompiler_object_inline_stack_2725
8303 );
8304 queueHydrationError(JSCompiler_object_inline_stack_2725);
8305 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8306 current2,
8307 workInProgress2,
8308 renderLanes2
8309 );
8310 } else if (didReceiveUpdate || propagateParentContextChanges(
8311 current2,
8312 workInProgress2,
8313 renderLanes2,
8314 false
8315 ), JSCompiler_object_inline_digest_2724 = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_object_inline_digest_2724) {
8316 JSCompiler_object_inline_digest_2724 = workInProgressRoot;
8317 if (null !== JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(
8318 JSCompiler_object_inline_digest_2724,
8319 renderLanes2
8320 ), 0 !== JSCompiler_object_inline_stack_2725 && JSCompiler_object_inline_stack_2725 !== prevState.retryLane))
8321 throw prevState.retryLane = JSCompiler_object_inline_stack_2725, enqueueConcurrentRenderForLane(
8322 current2,
8323 JSCompiler_object_inline_stack_2725
8324 ), scheduleUpdateOnFiber(
8325 JSCompiler_object_inline_digest_2724,
8326 current2,
8327 JSCompiler_object_inline_stack_2725
8328 ), SelectiveHydrationException;
8329 isSuspenseInstancePending(
8330 JSCompiler_object_inline_componentStack_2726
8331 ) || renderDidSuspendDelayIfPossible();
8332 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8333 current2,
8334 workInProgress2,
8335 renderLanes2
8336 );
8337 } else
8338 isSuspenseInstancePending(
8339 JSCompiler_object_inline_componentStack_2726
8340 ) ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
8341 JSCompiler_object_inline_componentStack_2726.nextSibling
8342 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountSuspensePrimaryChildren(
8343 workInProgress2,
8344 JSCompiler_object_inline_stack_2725.children
8345 ), workInProgress2.flags |= 4096);
8346 return workInProgress2;
8347 }
8348 }
8349 if (JSCompiler_object_inline_message_2723)
8350 return reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, componentStack = current2.child, JSCompiler_object_inline_componentStack_2726 = componentStack.sibling, JSCompiler_object_inline_stack_2725 = createWorkInProgress(
8351 componentStack,
8352 {
8353 mode: "hidden",
8354 children: JSCompiler_object_inline_stack_2725.children
8355 }
8356 ), JSCompiler_object_inline_stack_2725.subtreeFlags = componentStack.subtreeFlags & 65011712, null !== JSCompiler_object_inline_componentStack_2726 ? nextPrimaryChildren = createWorkInProgress(
8357 JSCompiler_object_inline_componentStack_2726,
8358 nextPrimaryChildren
8359 ) : (nextPrimaryChildren = createFiberFromFragment(
8360 nextPrimaryChildren,
8361 mode,
8362 renderLanes2,
8363 null
8364 ), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725), JSCompiler_object_inline_stack_2725 = workInProgress2.child, nextPrimaryChildren = current2.child.memoizedState, null === nextPrimaryChildren ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes2) : (mode = nextPrimaryChildren.cachePool, null !== mode ? (componentStack = CacheContext._currentValue, mode = mode.parent !== componentStack ? { parent: componentStack, pool: componentStack } : mode) : mode = getSuspendedCache(), nextPrimaryChildren = {
8365 baseLanes: nextPrimaryChildren.baseLanes | renderLanes2,
8366 cachePool: mode
8367 }), JSCompiler_object_inline_stack_2725.memoizedState = nextPrimaryChildren, JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8368 current2,
8369 JSCompiler_object_inline_digest_2724,
8370 renderLanes2
8371 ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(
8372 current2.child,
8373 JSCompiler_object_inline_stack_2725
8374 );
8375 null !== prevState && (renderLanes2 & 62914560) === renderLanes2 && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
8376 pushPrimaryTreeSuspenseHandler(workInProgress2);
8377 renderLanes2 = current2.child;
8378 current2 = renderLanes2.sibling;
8379 renderLanes2 = createWorkInProgress(renderLanes2, {
8380 mode: "visible",
8381 children: JSCompiler_object_inline_stack_2725.children
8382 });
8383 renderLanes2.return = workInProgress2;
8384 renderLanes2.sibling = null;
8385 null !== current2 && (JSCompiler_object_inline_digest_2724 = workInProgress2.deletions, null === JSCompiler_object_inline_digest_2724 ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_object_inline_digest_2724.push(current2));
8386 workInProgress2.child = renderLanes2;
8387 workInProgress2.memoizedState = null;
8388 return renderLanes2;
8389 }
8390 function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
8391 primaryChildren = mountWorkInProgressOffscreenFiber(
8392 { mode: "visible", children: primaryChildren },
8393 workInProgress2.mode
8394 );
8395 primaryChildren.return = workInProgress2;
8396 return workInProgress2.child = primaryChildren;
8397 }
8398 function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
8399 offscreenProps = createFiber(22, offscreenProps, null, mode);
8400 offscreenProps.lanes = 0;
8401 return offscreenProps;
8402 }
8403 function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
8404 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
8405 current2 = mountSuspensePrimaryChildren(
8406 workInProgress2,
8407 workInProgress2.pendingProps.children
8408 );
8409 current2.flags |= 2;
8410 workInProgress2.memoizedState = null;
8411 return current2;
8412 }
8413 function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
8414 fiber.lanes |= renderLanes2;
8415 var alternate = fiber.alternate;
8416 null !== alternate && (alternate.lanes |= renderLanes2);
8417 scheduleContextWorkOnParentPath(
8418 fiber.return,
8419 renderLanes2,
8420 propagationRoot
8421 );
8422 }
8423 function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode, treeForkCount2) {
8424 var renderState = workInProgress2.memoizedState;
8425 null === renderState ? workInProgress2.memoizedState = {
8426 isBackwards,
8427 rendering: null,
8428 renderingStartTime: 0,
8429 last: lastContentRow,
8430 tail,
8431 tailMode,
8432 treeForkCount: treeForkCount2
8433 } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount2);
8434 }
8435 function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
8436 var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current;
8437 (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? (suspenseContext = suspenseContext & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128) : suspenseContext &= SubtreeSuspenseContextMask;
8438 push(suspenseStackCursor, suspenseContext, workInProgress2);
8439 suspenseContext = null == revealOrder ? "null" : revealOrder;
8440 if ("forwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && "together" !== revealOrder && "independent" !== revealOrder && !didWarnAboutRevealOrder[suspenseContext])
8441 if (didWarnAboutRevealOrder[suspenseContext] = true, null == revealOrder)
8442 console.error(
8443 'The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".'
8444 );
8445 else if ("backwards" === revealOrder)
8446 console.error(
8447 'The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.'
8448 );
8449 else if ("string" === typeof revealOrder)
8450 switch (revealOrder.toLowerCase()) {
8451 case "together":
8452 case "forwards":
8453 case "backwards":
8454 case "independent":
8455 console.error(
8456 '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
8457 revealOrder,
8458 revealOrder.toLowerCase()
8459 );
8460 break;
8461 case "forward":
8462 case "backward":
8463 console.error(
8464 '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
8465 revealOrder,
8466 revealOrder.toLowerCase()
8467 );
8468 break;
8469 default:
8470 console.error(
8471 '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8472 revealOrder
8473 );
8474 }
8475 else
8476 console.error(
8477 '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8478 revealOrder
8479 );
8480 suspenseContext = null == tailMode ? "null" : tailMode;
8481 if (!didWarnAboutTailOptions[suspenseContext])
8482 if (null == tailMode) {
8483 if ("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder)
8484 didWarnAboutTailOptions[suspenseContext] = true, console.error(
8485 'The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".'
8486 );
8487 } else
8488 "visible" !== tailMode && "collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8489 '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',
8490 tailMode
8491 )) : "forwards" !== revealOrder && "backwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8492 '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
8493 tailMode
8494 ));
8495 a: if (("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder) && void 0 !== newChildren && null !== newChildren && false !== newChildren)
8496 if (isArrayImpl(newChildren))
8497 for (suspenseContext = 0; suspenseContext < newChildren.length; suspenseContext++) {
8498 if (!validateSuspenseListNestedChild(
8499 newChildren[suspenseContext],
8500 suspenseContext
8501 ))
8502 break a;
8503 }
8504 else if (suspenseContext = getIteratorFn(newChildren), "function" === typeof suspenseContext) {
8505 if (suspenseContext = suspenseContext.call(newChildren))
8506 for (var step = suspenseContext.next(), _i = 0; !step.done; step = suspenseContext.next()) {
8507 if (!validateSuspenseListNestedChild(step.value, _i)) break a;
8508 _i++;
8509 }
8510 } else
8511 console.error(
8512 'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
8513 revealOrder
8514 );
8515 reconcileChildren(current2, workInProgress2, newChildren, renderLanes2);
8516 isHydrating ? (warnIfNotHydrating(), newChildren = treeForkCount) : newChildren = 0;
8517 if (!nextProps && null !== current2 && 0 !== (current2.flags & 128))
8518 a: for (current2 = workInProgress2.child; null !== current2; ) {
8519 if (13 === current2.tag)
8520 null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8521 else if (19 === current2.tag)
8522 scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8523 else if (null !== current2.child) {
8524 current2.child.return = current2;
8525 current2 = current2.child;
8526 continue;
8527 }
8528 if (current2 === workInProgress2) break a;
8529 for (; null === current2.sibling; ) {
8530 if (null === current2.return || current2.return === workInProgress2)
8531 break a;
8532 current2 = current2.return;
8533 }
8534 current2.sibling.return = current2.return;
8535 current2 = current2.sibling;
8536 }
8537 switch (revealOrder) {
8538 case "forwards":
8539 renderLanes2 = workInProgress2.child;
8540 for (revealOrder = null; null !== renderLanes2; )
8541 current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
8542 renderLanes2 = revealOrder;
8543 null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
8544 initSuspenseListRenderState(
8545 workInProgress2,
8546 false,
8547 revealOrder,
8548 renderLanes2,
8549 tailMode,
8550 newChildren
8551 );
8552 break;
8553 case "backwards":
8554 case "unstable_legacy-backwards":
8555 renderLanes2 = null;
8556 revealOrder = workInProgress2.child;
8557 for (workInProgress2.child = null; null !== revealOrder; ) {
8558 current2 = revealOrder.alternate;
8559 if (null !== current2 && null === findFirstSuspended(current2)) {
8560 workInProgress2.child = revealOrder;
8561 break;
8562 }
8563 current2 = revealOrder.sibling;
8564 revealOrder.sibling = renderLanes2;
8565 renderLanes2 = revealOrder;
8566 revealOrder = current2;
8567 }
8568 initSuspenseListRenderState(
8569 workInProgress2,
8570 true,
8571 renderLanes2,
8572 null,
8573 tailMode,
8574 newChildren
8575 );
8576 break;
8577 case "together":
8578 initSuspenseListRenderState(
8579 workInProgress2,
8580 false,
8581 null,
8582 null,
8583 void 0,
8584 newChildren
8585 );
8586 break;
8587 default:
8588 workInProgress2.memoizedState = null;
8589 }
8590 return workInProgress2.child;
8591 }
8592 function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
8593 null !== current2 && (workInProgress2.dependencies = current2.dependencies);
8594 profilerStartTime = -1;
8595 workInProgressRootSkippedLanes |= workInProgress2.lanes;
8596 if (0 === (renderLanes2 & workInProgress2.childLanes))
8597 if (null !== current2) {
8598 if (propagateParentContextChanges(
8599 current2,
8600 workInProgress2,
8601 renderLanes2,
8602 false
8603 ), 0 === (renderLanes2 & workInProgress2.childLanes))
8604 return null;
8605 } else return null;
8606 if (null !== current2 && workInProgress2.child !== current2.child)
8607 throw Error("Resuming work not yet implemented.");
8608 if (null !== workInProgress2.child) {
8609 current2 = workInProgress2.child;
8610 renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
8611 workInProgress2.child = renderLanes2;
8612 for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
8613 current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
8614 renderLanes2.sibling = null;
8615 }
8616 return workInProgress2.child;
8617 }
8618 function checkScheduledUpdateOrContext(current2, renderLanes2) {
8619 if (0 !== (current2.lanes & renderLanes2)) return true;
8620 current2 = current2.dependencies;
8621 return null !== current2 && checkIfContextChanged(current2) ? true : false;
8622 }
8623 function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
8624 switch (workInProgress2.tag) {
8625 case 3:
8626 pushHostContainer(
8627 workInProgress2,
8628 workInProgress2.stateNode.containerInfo
8629 );
8630 pushProvider(
8631 workInProgress2,
8632 CacheContext,
8633 current2.memoizedState.cache
8634 );
8635 resetHydrationState();
8636 break;
8637 case 27:
8638 case 5:
8639 pushHostContext(workInProgress2);
8640 break;
8641 case 4:
8642 pushHostContainer(
8643 workInProgress2,
8644 workInProgress2.stateNode.containerInfo
8645 );
8646 break;
8647 case 10:
8648 pushProvider(
8649 workInProgress2,
8650 workInProgress2.type,
8651 workInProgress2.memoizedProps.value
8652 );
8653 break;
8654 case 12:
8655 0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
8656 workInProgress2.flags |= 2048;
8657 var stateNode = workInProgress2.stateNode;
8658 stateNode.effectDuration = -0;
8659 stateNode.passiveEffectDuration = -0;
8660 break;
8661 case 31:
8662 if (null !== workInProgress2.memoizedState)
8663 return workInProgress2.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress2), null;
8664 break;
8665 case 13:
8666 stateNode = workInProgress2.memoizedState;
8667 if (null !== stateNode) {
8668 if (null !== stateNode.dehydrated)
8669 return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
8670 if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
8671 return updateSuspenseComponent(
8672 current2,
8673 workInProgress2,
8674 renderLanes2
8675 );
8676 pushPrimaryTreeSuspenseHandler(workInProgress2);
8677 current2 = bailoutOnAlreadyFinishedWork(
8678 current2,
8679 workInProgress2,
8680 renderLanes2
8681 );
8682 return null !== current2 ? current2.sibling : null;
8683 }
8684 pushPrimaryTreeSuspenseHandler(workInProgress2);
8685 break;
8686 case 19:
8687 var didSuspendBefore = 0 !== (current2.flags & 128);
8688 stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
8689 stateNode || (propagateParentContextChanges(
8690 current2,
8691 workInProgress2,
8692 renderLanes2,
8693 false
8694 ), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
8695 if (didSuspendBefore) {
8696 if (stateNode)
8697 return updateSuspenseListComponent(
8698 current2,
8699 workInProgress2,
8700 renderLanes2
8701 );
8702 workInProgress2.flags |= 128;
8703 }
8704 didSuspendBefore = workInProgress2.memoizedState;
8705 null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
8706 push(
8707 suspenseStackCursor,
8708 suspenseStackCursor.current,
8709 workInProgress2
8710 );
8711 if (stateNode) break;
8712 else return null;
8713 case 22:
8714 return workInProgress2.lanes = 0, updateOffscreenComponent(
8715 current2,
8716 workInProgress2,
8717 renderLanes2,
8718 workInProgress2.pendingProps
8719 );
8720 case 24:
8721 pushProvider(
8722 workInProgress2,
8723 CacheContext,
8724 current2.memoizedState.cache
8725 );
8726 }
8727 return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
8728 }
8729 function beginWork(current2, workInProgress2, renderLanes2) {
8730 if (workInProgress2._debugNeedsRemount && null !== current2) {
8731 renderLanes2 = createFiberFromTypeAndProps(
8732 workInProgress2.type,
8733 workInProgress2.key,
8734 workInProgress2.pendingProps,
8735 workInProgress2._debugOwner || null,
8736 workInProgress2.mode,
8737 workInProgress2.lanes
8738 );
8739 renderLanes2._debugStack = workInProgress2._debugStack;
8740 renderLanes2._debugTask = workInProgress2._debugTask;
8741 var returnFiber = workInProgress2.return;
8742 if (null === returnFiber) throw Error("Cannot swap the root fiber.");
8743 current2.alternate = null;
8744 workInProgress2.alternate = null;
8745 renderLanes2.index = workInProgress2.index;
8746 renderLanes2.sibling = workInProgress2.sibling;
8747 renderLanes2.return = workInProgress2.return;
8748 renderLanes2.ref = workInProgress2.ref;
8749 renderLanes2._debugInfo = workInProgress2._debugInfo;
8750 if (workInProgress2 === returnFiber.child)
8751 returnFiber.child = renderLanes2;
8752 else {
8753 var prevSibling = returnFiber.child;
8754 if (null === prevSibling)
8755 throw Error("Expected parent to have a child.");
8756 for (; prevSibling.sibling !== workInProgress2; )
8757 if (prevSibling = prevSibling.sibling, null === prevSibling)
8758 throw Error("Expected to find the previous sibling.");
8759 prevSibling.sibling = renderLanes2;
8760 }
8761 workInProgress2 = returnFiber.deletions;
8762 null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
8763 renderLanes2.flags |= 2;
8764 return renderLanes2;
8765 }
8766 if (null !== current2)
8767 if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
8768 didReceiveUpdate = true;
8769 else {
8770 if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
8771 return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
8772 current2,
8773 workInProgress2,
8774 renderLanes2
8775 );
8776 didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
8777 }
8778 else {
8779 didReceiveUpdate = false;
8780 if (returnFiber = isHydrating)
8781 warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
8782 returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
8783 }
8784 workInProgress2.lanes = 0;
8785 switch (workInProgress2.tag) {
8786 case 16:
8787 a: if (returnFiber = workInProgress2.pendingProps, current2 = resolveLazy(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
8788 shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
8789 current2,
8790 returnFiber
8791 ), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
8792 null,
8793 workInProgress2,
8794 current2,
8795 returnFiber,
8796 renderLanes2
8797 )) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
8798 null,
8799 workInProgress2,
8800 current2,
8801 returnFiber,
8802 renderLanes2
8803 ));
8804 else {
8805 if (void 0 !== current2 && null !== current2) {
8806 if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
8807 workInProgress2.tag = 11;
8808 workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
8809 workInProgress2 = updateForwardRef(
8810 null,
8811 workInProgress2,
8812 current2,
8813 returnFiber,
8814 renderLanes2
8815 );
8816 break a;
8817 } else if (prevSibling === REACT_MEMO_TYPE) {
8818 workInProgress2.tag = 14;
8819 workInProgress2 = updateMemoComponent(
8820 null,
8821 workInProgress2,
8822 current2,
8823 returnFiber,
8824 renderLanes2
8825 );
8826 break a;
8827 }
8828 }
8829 workInProgress2 = "";
8830 null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
8831 renderLanes2 = getComponentNameFromType(current2) || current2;
8832 throw Error(
8833 "Element type is invalid. Received a promise that resolves to: " + renderLanes2 + ". Lazy element type must resolve to a class or function." + workInProgress2
8834 );
8835 }
8836 return workInProgress2;
8837 case 0:
8838 return updateFunctionComponent(
8839 current2,
8840 workInProgress2,
8841 workInProgress2.type,
8842 workInProgress2.pendingProps,
8843 renderLanes2
8844 );
8845 case 1:
8846 return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
8847 returnFiber,
8848 workInProgress2.pendingProps
8849 ), updateClassComponent(
8850 current2,
8851 workInProgress2,
8852 returnFiber,
8853 prevSibling,
8854 renderLanes2
8855 );
8856 case 3:
8857 a: {
8858 pushHostContainer(
8859 workInProgress2,
8860 workInProgress2.stateNode.containerInfo
8861 );
8862 if (null === current2)
8863 throw Error(
8864 "Should have a current fiber. This is a bug in React."
8865 );
8866 returnFiber = workInProgress2.pendingProps;
8867 var prevState = workInProgress2.memoizedState;
8868 prevSibling = prevState.element;
8869 cloneUpdateQueue(current2, workInProgress2);
8870 processUpdateQueue(workInProgress2, returnFiber, null, renderLanes2);
8871 var nextState = workInProgress2.memoizedState;
8872 returnFiber = nextState.cache;
8873 pushProvider(workInProgress2, CacheContext, returnFiber);
8874 returnFiber !== prevState.cache && propagateContextChanges(
8875 workInProgress2,
8876 [CacheContext],
8877 renderLanes2,
8878 true
8879 );
8880 suspendIfUpdateReadFromEntangledAsyncAction();
8881 returnFiber = nextState.element;
8882 if (prevState.isDehydrated)
8883 if (prevState = {
8884 element: returnFiber,
8885 isDehydrated: false,
8886 cache: nextState.cache
8887 }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
8888 workInProgress2 = mountHostRootWithoutHydrating(
8889 current2,
8890 workInProgress2,
8891 returnFiber,
8892 renderLanes2
8893 );
8894 break a;
8895 } else if (returnFiber !== prevSibling) {
8896 prevSibling = createCapturedValueAtFiber(
8897 Error(
8898 "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
8899 ),
8900 workInProgress2
8901 );
8902 queueHydrationError(prevSibling);
8903 workInProgress2 = mountHostRootWithoutHydrating(
8904 current2,
8905 workInProgress2,
8906 returnFiber,
8907 renderLanes2
8908 );
8909 break a;
8910 } else {
8911 current2 = workInProgress2.stateNode.containerInfo;
8912 switch (current2.nodeType) {
8913 case 9:
8914 current2 = current2.body;
8915 break;
8916 default:
8917 current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2;
8918 }
8919 nextHydratableInstance = getNextHydratable(current2.firstChild);
8920 hydrationParentFiber = workInProgress2;
8921 isHydrating = true;
8922 hydrationErrors = null;
8923 didSuspendOrErrorDEV = false;
8924 hydrationDiffRootDEV = null;
8925 rootOrSingletonContext = true;
8926 renderLanes2 = mountChildFibers(
8927 workInProgress2,
8928 null,
8929 returnFiber,
8930 renderLanes2
8931 );
8932 for (workInProgress2.child = renderLanes2; renderLanes2; )
8933 renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
8934 }
8935 else {
8936 resetHydrationState();
8937 if (returnFiber === prevSibling) {
8938 workInProgress2 = bailoutOnAlreadyFinishedWork(
8939 current2,
8940 workInProgress2,
8941 renderLanes2
8942 );
8943 break a;
8944 }
8945 reconcileChildren(
8946 current2,
8947 workInProgress2,
8948 returnFiber,
8949 renderLanes2
8950 );
8951 }
8952 workInProgress2 = workInProgress2.child;
8953 }
8954 return workInProgress2;
8955 case 26:
8956 return markRef(current2, workInProgress2), null === current2 ? (renderLanes2 = getResource(
8957 workInProgress2.type,
8958 null,
8959 workInProgress2.pendingProps,
8960 null
8961 )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current2 = workInProgress2.pendingProps, returnFiber = requiredContext(
8962 rootInstanceStackCursor.current
8963 ), returnFiber = getOwnerDocumentFromRootContainer(
8964 returnFiber
8965 ).createElement(renderLanes2), returnFiber[internalInstanceKey] = workInProgress2, returnFiber[internalPropsKey] = current2, setInitialProperties(returnFiber, renderLanes2, current2), markNodeAsHoistable(returnFiber), workInProgress2.stateNode = returnFiber) : workInProgress2.memoizedState = getResource(
8966 workInProgress2.type,
8967 current2.memoizedProps,
8968 workInProgress2.pendingProps,
8969 current2.memoizedState
8970 ), null;
8971 case 27:
8972 return pushHostContext(workInProgress2), null === current2 && isHydrating && (returnFiber = requiredContext(rootInstanceStackCursor.current), prevSibling = getHostContext(), returnFiber = workInProgress2.stateNode = resolveSingletonInstance(
8973 workInProgress2.type,
8974 workInProgress2.pendingProps,
8975 returnFiber,
8976 prevSibling,
8977 false
8978 ), didSuspendOrErrorDEV || (prevSibling = diffHydratedProperties(
8979 returnFiber,
8980 workInProgress2.type,
8981 workInProgress2.pendingProps,
8982 prevSibling
8983 ), null !== prevSibling && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevSibling)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, prevSibling = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = prevSibling, nextHydratableInstance = getNextHydratable(
8984 returnFiber.firstChild
8985 )) : nextHydratableInstance = prevSibling), reconcileChildren(
8986 current2,
8987 workInProgress2,
8988 workInProgress2.pendingProps.children,
8989 renderLanes2
8990 ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
8991 case 5:
8992 return null === current2 && isHydrating && (prevState = getHostContext(), returnFiber = validateDOMNesting(
8993 workInProgress2.type,
8994 prevState.ancestorInfo
8995 ), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
8996 prevSibling,
8997 workInProgress2.type,
8998 workInProgress2.pendingProps,
8999 rootOrSingletonContext
9000 ), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (prevState = diffHydratedProperties(
9001 nextState,
9002 workInProgress2.type,
9003 workInProgress2.pendingProps,
9004 prevState
9005 ), null !== prevState && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevState)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(
9006 nextState.firstChild
9007 ), rootOrSingletonContext = false, prevState = true) : prevState = false, nextState = !prevState), nextState && (returnFiber && warnNonHydratedInstance(workInProgress2, prevSibling), throwOnHydrationMismatch(workInProgress2))), pushHostContext(workInProgress2), prevSibling = workInProgress2.type, prevState = workInProgress2.pendingProps, nextState = null !== current2 ? current2.memoizedProps : null, returnFiber = prevState.children, shouldSetTextContent(prevSibling, prevState) ? returnFiber = null : null !== nextState && shouldSetTextContent(prevSibling, nextState) && (workInProgress2.flags |= 32), null !== workInProgress2.memoizedState && (prevSibling = renderWithHooks(
9008 current2,
9009 workInProgress2,
9010 TransitionAwareHostComponent,
9011 null,
9012 null,
9013 renderLanes2
9014 ), HostTransitionContext._currentValue = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
9015 current2,
9016 workInProgress2,
9017 returnFiber,
9018 renderLanes2
9019 ), workInProgress2.child;
9020 case 6:
9021 return null === current2 && isHydrating && (renderLanes2 = workInProgress2.pendingProps, current2 = getHostContext(), returnFiber = current2.ancestorInfo.current, renderLanes2 = null != returnFiber ? validateTextNesting(
9022 renderLanes2,
9023 returnFiber.tag,
9024 current2.ancestorInfo.implicitRootScope
9025 ) : true, current2 = nextHydratableInstance, (returnFiber = !current2) || (returnFiber = canHydrateTextInstance(
9026 current2,
9027 workInProgress2.pendingProps,
9028 rootOrSingletonContext
9029 ), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (renderLanes2 && warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2))), null;
9030 case 13:
9031 return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
9032 case 4:
9033 return pushHostContainer(
9034 workInProgress2,
9035 workInProgress2.stateNode.containerInfo
9036 ), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
9037 workInProgress2,
9038 null,
9039 returnFiber,
9040 renderLanes2
9041 ) : reconcileChildren(
9042 current2,
9043 workInProgress2,
9044 returnFiber,
9045 renderLanes2
9046 ), workInProgress2.child;
9047 case 11:
9048 return updateForwardRef(
9049 current2,
9050 workInProgress2,
9051 workInProgress2.type,
9052 workInProgress2.pendingProps,
9053 renderLanes2
9054 );
9055 case 7:
9056 return reconcileChildren(
9057 current2,
9058 workInProgress2,
9059 workInProgress2.pendingProps,
9060 renderLanes2
9061 ), workInProgress2.child;
9062 case 8:
9063 return reconcileChildren(
9064 current2,
9065 workInProgress2,
9066 workInProgress2.pendingProps.children,
9067 renderLanes2
9068 ), workInProgress2.child;
9069 case 12:
9070 return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
9071 current2,
9072 workInProgress2,
9073 workInProgress2.pendingProps.children,
9074 renderLanes2
9075 ), workInProgress2.child;
9076 case 10:
9077 return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, prevState = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
9078 "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
9079 )), pushProvider(workInProgress2, returnFiber, prevState), reconcileChildren(
9080 current2,
9081 workInProgress2,
9082 prevSibling.children,
9083 renderLanes2
9084 ), workInProgress2.child;
9085 case 9:
9086 return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
9087 "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
9088 ), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), returnFiber = callComponentInDEV(
9089 returnFiber,
9090 prevSibling,
9091 void 0
9092 ), workInProgress2.flags |= 1, reconcileChildren(
9093 current2,
9094 workInProgress2,
9095 returnFiber,
9096 renderLanes2
9097 ), workInProgress2.child;
9098 case 14:
9099 return updateMemoComponent(
9100 current2,
9101 workInProgress2,
9102 workInProgress2.type,
9103 workInProgress2.pendingProps,
9104 renderLanes2
9105 );
9106 case 15:
9107 return updateSimpleMemoComponent(
9108 current2,
9109 workInProgress2,
9110 workInProgress2.type,
9111 workInProgress2.pendingProps,
9112 renderLanes2
9113 );
9114 case 19:
9115 return updateSuspenseListComponent(
9116 current2,
9117 workInProgress2,
9118 renderLanes2
9119 );
9120 case 31:
9121 return updateActivityComponent(current2, workInProgress2, renderLanes2);
9122 case 22:
9123 return updateOffscreenComponent(
9124 current2,
9125 workInProgress2,
9126 renderLanes2,
9127 workInProgress2.pendingProps
9128 );
9129 case 24:
9130 return prepareToReadContext(workInProgress2), returnFiber = readContext(CacheContext), null === current2 ? (prevSibling = peekCacheFromPool(), null === prevSibling && (prevSibling = workInProgressRoot, prevState = createCache(), prevSibling.pooledCache = prevState, retainCache(prevState), null !== prevState && (prevSibling.pooledCacheLanes |= renderLanes2), prevSibling = prevState), workInProgress2.memoizedState = {
9131 parent: returnFiber,
9132 cache: prevSibling
9133 }, initializeUpdateQueue(workInProgress2), pushProvider(workInProgress2, CacheContext, prevSibling)) : (0 !== (current2.lanes & renderLanes2) && (cloneUpdateQueue(current2, workInProgress2), processUpdateQueue(workInProgress2, null, null, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction()), prevSibling = current2.memoizedState, prevState = workInProgress2.memoizedState, prevSibling.parent !== returnFiber ? (prevSibling = {
9134 parent: returnFiber,
9135 cache: returnFiber
9136 }, workInProgress2.memoizedState = prevSibling, 0 === workInProgress2.lanes && (workInProgress2.memoizedState = workInProgress2.updateQueue.baseState = prevSibling), pushProvider(workInProgress2, CacheContext, returnFiber)) : (returnFiber = prevState.cache, pushProvider(workInProgress2, CacheContext, returnFiber), returnFiber !== prevSibling.cache && propagateContextChanges(
9137 workInProgress2,
9138 [CacheContext],
9139 renderLanes2,
9140 true
9141 ))), reconcileChildren(
9142 current2,
9143 workInProgress2,
9144 workInProgress2.pendingProps.children,
9145 renderLanes2
9146 ), workInProgress2.child;
9147 case 29:
9148 throw workInProgress2.pendingProps;
9149 }
9150 throw Error(
9151 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9152 );
9153 }
9154 function markUpdate(workInProgress2) {
9155 workInProgress2.flags |= 4;
9156 }
9157 function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, oldProps, newProps, renderLanes2) {
9158 if (type = (workInProgress2.mode & SuspenseyImagesMode) !== NoMode)
9159 type = false;
9160 if (type) {
9161 if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2)
9162 if (workInProgress2.stateNode.complete) workInProgress2.flags |= 8192;
9163 else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9164 else
9165 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9166 } else workInProgress2.flags &= -16777217;
9167 }
9168 function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
9169 if ("stylesheet" !== resource.type || (resource.state.loading & Inserted) !== NotLoaded)
9170 workInProgress2.flags &= -16777217;
9171 else if (workInProgress2.flags |= 16777216, !preloadResource(resource))
9172 if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9173 else
9174 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9175 }
9176 function scheduleRetryEffect(workInProgress2, retryQueue) {
9177 null !== retryQueue && (workInProgress2.flags |= 4);
9178 workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
9179 }
9180 function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
9181 if (!isHydrating)
9182 switch (renderState.tailMode) {
9183 case "hidden":
9184 hasRenderedATailFallback = renderState.tail;
9185 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
9186 null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
9187 null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
9188 break;
9189 case "collapsed":
9190 lastTailNode = renderState.tail;
9191 for (var _lastTailNode = null; null !== lastTailNode; )
9192 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
9193 null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
9194 }
9195 }
9196 function bubbleProperties(completedWork) {
9197 var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
9198 if (didBailout)
9199 if ((completedWork.mode & ProfileMode) !== NoMode) {
9200 for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
9201 newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
9202 completedWork.treeBaseDuration = _treeBaseDuration;
9203 } else
9204 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9205 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9206 else if ((completedWork.mode & ProfileMode) !== NoMode) {
9207 _treeBaseDuration = completedWork.actualDuration;
9208 _child2 = completedWork.selfBaseDuration;
9209 for (var child = completedWork.child; null !== child; )
9210 newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
9211 completedWork.actualDuration = _treeBaseDuration;
9212 completedWork.treeBaseDuration = _child2;
9213 } else
9214 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9215 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9216 completedWork.subtreeFlags |= subtreeFlags;
9217 completedWork.childLanes = newChildLanes;
9218 return didBailout;
9219 }
9220 function completeWork(current2, workInProgress2, renderLanes2) {
9221 var newProps = workInProgress2.pendingProps;
9222 popTreeContext(workInProgress2);
9223 switch (workInProgress2.tag) {
9224 case 16:
9225 case 15:
9226 case 0:
9227 case 11:
9228 case 7:
9229 case 8:
9230 case 12:
9231 case 9:
9232 case 14:
9233 return bubbleProperties(workInProgress2), null;
9234 case 1:
9235 return bubbleProperties(workInProgress2), null;
9236 case 3:
9237 renderLanes2 = workInProgress2.stateNode;
9238 newProps = null;
9239 null !== current2 && (newProps = current2.memoizedState.cache);
9240 workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
9241 popProvider(CacheContext, workInProgress2);
9242 popHostContainer(workInProgress2);
9243 renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
9244 if (null === current2 || null === current2.child)
9245 popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
9246 bubbleProperties(workInProgress2);
9247 return null;
9248 case 26:
9249 var type = workInProgress2.type, nextResource = workInProgress2.memoizedState;
9250 null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9251 workInProgress2,
9252 nextResource
9253 )) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9254 workInProgress2,
9255 type,
9256 null,
9257 newProps,
9258 renderLanes2
9259 ))) : nextResource ? nextResource !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9260 workInProgress2,
9261 nextResource
9262 )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2 = current2.memoizedProps, current2 !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9263 workInProgress2,
9264 type,
9265 current2,
9266 newProps,
9267 renderLanes2
9268 ));
9269 return null;
9270 case 27:
9271 popHostContext(workInProgress2);
9272 renderLanes2 = requiredContext(rootInstanceStackCursor.current);
9273 type = workInProgress2.type;
9274 if (null !== current2 && null != workInProgress2.stateNode)
9275 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9276 else {
9277 if (!newProps) {
9278 if (null === workInProgress2.stateNode)
9279 throw Error(
9280 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9281 );
9282 bubbleProperties(workInProgress2);
9283 return null;
9284 }
9285 current2 = getHostContext();
9286 popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
9287 type,
9288 newProps,
9289 renderLanes2,
9290 current2,
9291 true
9292 ), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
9293 }
9294 bubbleProperties(workInProgress2);
9295 return null;
9296 case 5:
9297 popHostContext(workInProgress2);
9298 type = workInProgress2.type;
9299 if (null !== current2 && null != workInProgress2.stateNode)
9300 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9301 else {
9302 if (!newProps) {
9303 if (null === workInProgress2.stateNode)
9304 throw Error(
9305 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9306 );
9307 bubbleProperties(workInProgress2);
9308 return null;
9309 }
9310 var _currentHostContext = getHostContext();
9311 if (popHydrationState(workInProgress2))
9312 prepareToHydrateHostInstance(workInProgress2, _currentHostContext);
9313 else {
9314 nextResource = requiredContext(rootInstanceStackCursor.current);
9315 validateDOMNesting(type, _currentHostContext.ancestorInfo);
9316 _currentHostContext = _currentHostContext.context;
9317 nextResource = getOwnerDocumentFromRootContainer(nextResource);
9318 switch (_currentHostContext) {
9319 case HostContextNamespaceSvg:
9320 nextResource = nextResource.createElementNS(
9321 SVG_NAMESPACE,
9322 type
9323 );
9324 break;
9325 case HostContextNamespaceMath:
9326 nextResource = nextResource.createElementNS(
9327 MATH_NAMESPACE,
9328 type
9329 );
9330 break;
9331 default:
9332 switch (type) {
9333 case "svg":
9334 nextResource = nextResource.createElementNS(
9335 SVG_NAMESPACE,
9336 type
9337 );
9338 break;
9339 case "math":
9340 nextResource = nextResource.createElementNS(
9341 MATH_NAMESPACE,
9342 type
9343 );
9344 break;
9345 case "script":
9346 nextResource = nextResource.createElement("div");
9347 nextResource.innerHTML = "<script><\/script>";
9348 nextResource = nextResource.removeChild(
9349 nextResource.firstChild
9350 );
9351 break;
9352 case "select":
9353 nextResource = "string" === typeof newProps.is ? nextResource.createElement("select", {
9354 is: newProps.is
9355 }) : nextResource.createElement("select");
9356 newProps.multiple ? nextResource.multiple = true : newProps.size && (nextResource.size = newProps.size);
9357 break;
9358 default:
9359 nextResource = "string" === typeof newProps.is ? nextResource.createElement(type, {
9360 is: newProps.is
9361 }) : nextResource.createElement(type), -1 === type.indexOf("-") && (type !== type.toLowerCase() && console.error(
9362 "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
9363 type
9364 ), "[object HTMLUnknownElement]" !== Object.prototype.toString.call(nextResource) || hasOwnProperty.call(warnedUnknownTags, type) || (warnedUnknownTags[type] = true, console.error(
9365 "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
9366 type
9367 )));
9368 }
9369 }
9370 nextResource[internalInstanceKey] = workInProgress2;
9371 nextResource[internalPropsKey] = newProps;
9372 a: for (_currentHostContext = workInProgress2.child; null !== _currentHostContext; ) {
9373 if (5 === _currentHostContext.tag || 6 === _currentHostContext.tag)
9374 nextResource.appendChild(_currentHostContext.stateNode);
9375 else if (4 !== _currentHostContext.tag && 27 !== _currentHostContext.tag && null !== _currentHostContext.child) {
9376 _currentHostContext.child.return = _currentHostContext;
9377 _currentHostContext = _currentHostContext.child;
9378 continue;
9379 }
9380 if (_currentHostContext === workInProgress2) break a;
9381 for (; null === _currentHostContext.sibling; ) {
9382 if (null === _currentHostContext.return || _currentHostContext.return === workInProgress2)
9383 break a;
9384 _currentHostContext = _currentHostContext.return;
9385 }
9386 _currentHostContext.sibling.return = _currentHostContext.return;
9387 _currentHostContext = _currentHostContext.sibling;
9388 }
9389 workInProgress2.stateNode = nextResource;
9390 a: switch (setInitialProperties(nextResource, type, newProps), type) {
9391 case "button":
9392 case "input":
9393 case "select":
9394 case "textarea":
9395 newProps = !!newProps.autoFocus;
9396 break a;
9397 case "img":
9398 newProps = true;
9399 break a;
9400 default:
9401 newProps = false;
9402 }
9403 newProps && markUpdate(workInProgress2);
9404 }
9405 }
9406 bubbleProperties(workInProgress2);
9407 preloadInstanceAndSuspendIfNeeded(
9408 workInProgress2,
9409 workInProgress2.type,
9410 null === current2 ? null : current2.memoizedProps,
9411 workInProgress2.pendingProps,
9412 renderLanes2
9413 );
9414 return null;
9415 case 6:
9416 if (current2 && null != workInProgress2.stateNode)
9417 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9418 else {
9419 if ("string" !== typeof newProps && null === workInProgress2.stateNode)
9420 throw Error(
9421 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9422 );
9423 current2 = requiredContext(rootInstanceStackCursor.current);
9424 renderLanes2 = getHostContext();
9425 if (popHydrationState(workInProgress2)) {
9426 current2 = workInProgress2.stateNode;
9427 renderLanes2 = workInProgress2.memoizedProps;
9428 type = !didSuspendOrErrorDEV;
9429 newProps = null;
9430 nextResource = hydrationParentFiber;
9431 if (null !== nextResource)
9432 switch (nextResource.tag) {
9433 case 3:
9434 type && (type = diffHydratedTextForDevWarnings(
9435 current2,
9436 renderLanes2,
9437 newProps
9438 ), null !== type && (buildHydrationDiffNode(workInProgress2, 0).serverProps = type));
9439 break;
9440 case 27:
9441 case 5:
9442 newProps = nextResource.memoizedProps, type && (type = diffHydratedTextForDevWarnings(
9443 current2,
9444 renderLanes2,
9445 newProps
9446 ), null !== type && (buildHydrationDiffNode(
9447 workInProgress2,
9448 0
9449 ).serverProps = type));
9450 }
9451 current2[internalInstanceKey] = workInProgress2;
9452 current2 = current2.nodeValue === renderLanes2 || null !== newProps && true === newProps.suppressHydrationWarning || checkForUnmatchedText(current2.nodeValue, renderLanes2) ? true : false;
9453 current2 || throwOnHydrationMismatch(workInProgress2, true);
9454 } else
9455 type = renderLanes2.ancestorInfo.current, null != type && validateTextNesting(
9456 newProps,
9457 type.tag,
9458 renderLanes2.ancestorInfo.implicitRootScope
9459 ), current2 = getOwnerDocumentFromRootContainer(current2).createTextNode(
9460 newProps
9461 ), current2[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current2;
9462 }
9463 bubbleProperties(workInProgress2);
9464 return null;
9465 case 31:
9466 renderLanes2 = workInProgress2.memoizedState;
9467 if (null === current2 || null !== current2.memoizedState) {
9468 newProps = popHydrationState(workInProgress2);
9469 if (null !== renderLanes2) {
9470 if (null === current2) {
9471 if (!newProps)
9472 throw Error(
9473 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9474 );
9475 current2 = workInProgress2.memoizedState;
9476 current2 = null !== current2 ? current2.dehydrated : null;
9477 if (!current2)
9478 throw Error(
9479 "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue."
9480 );
9481 current2[internalInstanceKey] = workInProgress2;
9482 bubbleProperties(workInProgress2);
9483 (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9484 } else
9485 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (renderLanes2 = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9486 current2 = false;
9487 } else
9488 renderLanes2 = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = renderLanes2), current2 = true;
9489 if (!current2) {
9490 if (workInProgress2.flags & 256)
9491 return popSuspenseHandler(workInProgress2), workInProgress2;
9492 popSuspenseHandler(workInProgress2);
9493 return null;
9494 }
9495 if (0 !== (workInProgress2.flags & 128))
9496 throw Error(
9497 "Client rendering an Activity suspended it again. This is a bug in React."
9498 );
9499 }
9500 bubbleProperties(workInProgress2);
9501 return null;
9502 case 13:
9503 newProps = workInProgress2.memoizedState;
9504 if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
9505 type = newProps;
9506 nextResource = popHydrationState(workInProgress2);
9507 if (null !== type && null !== type.dehydrated) {
9508 if (null === current2) {
9509 if (!nextResource)
9510 throw Error(
9511 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9512 );
9513 nextResource = workInProgress2.memoizedState;
9514 nextResource = null !== nextResource ? nextResource.dehydrated : null;
9515 if (!nextResource)
9516 throw Error(
9517 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
9518 );
9519 nextResource[internalInstanceKey] = workInProgress2;
9520 bubbleProperties(workInProgress2);
9521 (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9522 } else
9523 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (type = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9524 type = false;
9525 } else
9526 type = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = type), type = true;
9527 if (!type) {
9528 if (workInProgress2.flags & 256)
9529 return popSuspenseHandler(workInProgress2), workInProgress2;
9530 popSuspenseHandler(workInProgress2);
9531 return null;
9532 }
9533 }
9534 popSuspenseHandler(workInProgress2);
9535 if (0 !== (workInProgress2.flags & 128))
9536 return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
9537 renderLanes2 = null !== newProps;
9538 current2 = null !== current2 && null !== current2.memoizedState;
9539 renderLanes2 && (newProps = workInProgress2.child, type = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048));
9540 renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
9541 scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
9542 bubbleProperties(workInProgress2);
9543 (workInProgress2.mode & ProfileMode) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9544 return null;
9545 case 4:
9546 return popHostContainer(workInProgress2), null === current2 && listenToAllSupportedEvents(
9547 workInProgress2.stateNode.containerInfo
9548 ), bubbleProperties(workInProgress2), null;
9549 case 10:
9550 return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
9551 case 19:
9552 pop(suspenseStackCursor, workInProgress2);
9553 newProps = workInProgress2.memoizedState;
9554 if (null === newProps) return bubbleProperties(workInProgress2), null;
9555 type = 0 !== (workInProgress2.flags & 128);
9556 nextResource = newProps.rendering;
9557 if (null === nextResource)
9558 if (type) cutOffTailIfNeeded(newProps, false);
9559 else {
9560 if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
9561 for (current2 = workInProgress2.child; null !== current2; ) {
9562 nextResource = findFirstSuspended(current2);
9563 if (null !== nextResource) {
9564 workInProgress2.flags |= 128;
9565 cutOffTailIfNeeded(newProps, false);
9566 current2 = nextResource.updateQueue;
9567 workInProgress2.updateQueue = current2;
9568 scheduleRetryEffect(workInProgress2, current2);
9569 workInProgress2.subtreeFlags = 0;
9570 current2 = renderLanes2;
9571 for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
9572 resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
9573 push(
9574 suspenseStackCursor,
9575 suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
9576 workInProgress2
9577 );
9578 isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount);
9579 return workInProgress2.child;
9580 }
9581 current2 = current2.sibling;
9582 }
9583 null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9584 }
9585 else {
9586 if (!type)
9587 if (current2 = findFirstSuspended(nextResource), null !== current2) {
9588 if (workInProgress2.flags |= 128, type = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
9589 return bubbleProperties(workInProgress2), null;
9590 } else
9591 2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9592 newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current2 = newProps.last, null !== current2 ? current2.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
9593 }
9594 if (null !== newProps.tail)
9595 return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = type ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current2;
9596 bubbleProperties(workInProgress2);
9597 return null;
9598 case 22:
9599 case 23:
9600 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), newProps = null !== workInProgress2.memoizedState, null !== current2 ? null !== current2.memoizedState !== newProps && (workInProgress2.flags |= 8192) : newProps && (workInProgress2.flags |= 8192), newProps ? 0 !== (renderLanes2 & 536870912) && 0 === (workInProgress2.flags & 128) && (bubbleProperties(workInProgress2), workInProgress2.subtreeFlags & 6 && (workInProgress2.flags |= 8192)) : bubbleProperties(workInProgress2), renderLanes2 = workInProgress2.updateQueue, null !== renderLanes2 && scheduleRetryEffect(workInProgress2, renderLanes2.retryQueue), renderLanes2 = null, null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (renderLanes2 = current2.memoizedState.cachePool.pool), newProps = null, null !== workInProgress2.memoizedState && null !== workInProgress2.memoizedState.cachePool && (newProps = workInProgress2.memoizedState.cachePool.pool), newProps !== renderLanes2 && (workInProgress2.flags |= 2048), null !== current2 && pop(resumedCache, workInProgress2), null;
9601 case 24:
9602 return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
9603 case 25:
9604 return null;
9605 case 30:
9606 return null;
9607 }
9608 throw Error(
9609 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9610 );
9611 }
9612 function unwindWork(current2, workInProgress2) {
9613 popTreeContext(workInProgress2);
9614 switch (workInProgress2.tag) {
9615 case 1:
9616 return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9617 case 3:
9618 return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
9619 case 26:
9620 case 27:
9621 case 5:
9622 return popHostContext(workInProgress2), null;
9623 case 31:
9624 if (null !== workInProgress2.memoizedState) {
9625 popSuspenseHandler(workInProgress2);
9626 if (null === workInProgress2.alternate)
9627 throw Error(
9628 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9629 );
9630 resetHydrationState();
9631 }
9632 current2 = workInProgress2.flags;
9633 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9634 case 13:
9635 popSuspenseHandler(workInProgress2);
9636 current2 = workInProgress2.memoizedState;
9637 if (null !== current2 && null !== current2.dehydrated) {
9638 if (null === workInProgress2.alternate)
9639 throw Error(
9640 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9641 );
9642 resetHydrationState();
9643 }
9644 current2 = workInProgress2.flags;
9645 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9646 case 19:
9647 return pop(suspenseStackCursor, workInProgress2), null;
9648 case 4:
9649 return popHostContainer(workInProgress2), null;
9650 case 10:
9651 return popProvider(workInProgress2.type, workInProgress2), null;
9652 case 22:
9653 case 23:
9654 return popSuspenseHandler(workInProgress2), popHiddenContext(workInProgress2), null !== current2 && pop(resumedCache, workInProgress2), current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9655 case 24:
9656 return popProvider(CacheContext, workInProgress2), null;
9657 case 25:
9658 return null;
9659 default:
9660 return null;
9661 }
9662 }
9663 function unwindInterruptedWork(current2, interruptedWork) {
9664 popTreeContext(interruptedWork);
9665 switch (interruptedWork.tag) {
9666 case 3:
9667 popProvider(CacheContext, interruptedWork);
9668 popHostContainer(interruptedWork);
9669 break;
9670 case 26:
9671 case 27:
9672 case 5:
9673 popHostContext(interruptedWork);
9674 break;
9675 case 4:
9676 popHostContainer(interruptedWork);
9677 break;
9678 case 31:
9679 null !== interruptedWork.memoizedState && popSuspenseHandler(interruptedWork);
9680 break;
9681 case 13:
9682 popSuspenseHandler(interruptedWork);
9683 break;
9684 case 19:
9685 pop(suspenseStackCursor, interruptedWork);
9686 break;
9687 case 10:
9688 popProvider(interruptedWork.type, interruptedWork);
9689 break;
9690 case 22:
9691 case 23:
9692 popSuspenseHandler(interruptedWork);
9693 popHiddenContext(interruptedWork);
9694 null !== current2 && pop(resumedCache, interruptedWork);
9695 break;
9696 case 24:
9697 popProvider(CacheContext, interruptedWork);
9698 }
9699 }
9700 function shouldProfile(current2) {
9701 return (current2.mode & ProfileMode) !== NoMode;
9702 }
9703 function commitHookLayoutEffects(finishedWork, hookFlags) {
9704 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9705 }
9706 function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9707 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9708 hookFlags,
9709 finishedWork,
9710 nearestMountedAncestor
9711 ), recordEffectDuration()) : commitHookEffectListUnmount(
9712 hookFlags,
9713 finishedWork,
9714 nearestMountedAncestor
9715 );
9716 }
9717 function commitHookEffectListMount(flags, finishedWork) {
9718 try {
9719 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9720 if (null !== lastEffect) {
9721 var firstEffect = lastEffect.next;
9722 updateQueue = firstEffect;
9723 do {
9724 if ((updateQueue.tag & flags) === flags && (lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
9725 finishedWork,
9726 callCreateInDEV,
9727 updateQueue
9728 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
9729 var hookName = void 0;
9730 hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
9731 var addendum = void 0;
9732 addendum = null === lastEffect ? " You returned null. If your effect does not require clean up, return undefined (or nothing)." : "function" === typeof lastEffect.then ? "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching" : " You returned: " + lastEffect;
9733 runWithFiberInDEV(
9734 finishedWork,
9735 function(n, a) {
9736 console.error(
9737 "%s must not return anything besides a function, which is used for clean-up.%s",
9738 n,
9739 a
9740 );
9741 },
9742 hookName,
9743 addendum
9744 );
9745 }
9746 updateQueue = updateQueue.next;
9747 } while (updateQueue !== firstEffect);
9748 }
9749 } catch (error) {
9750 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9751 }
9752 }
9753 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
9754 try {
9755 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9756 if (null !== lastEffect) {
9757 var firstEffect = lastEffect.next;
9758 updateQueue = firstEffect;
9759 do {
9760 if ((updateQueue.tag & flags) === flags) {
9761 var inst = updateQueue.inst, destroy = inst.destroy;
9762 void 0 !== destroy && (inst.destroy = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
9763 lastEffect,
9764 callDestroyInDEV,
9765 lastEffect,
9766 nearestMountedAncestor,
9767 destroy
9768 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false));
9769 }
9770 updateQueue = updateQueue.next;
9771 } while (updateQueue !== firstEffect);
9772 }
9773 } catch (error) {
9774 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9775 }
9776 }
9777 function commitHookPassiveMountEffects(finishedWork, hookFlags) {
9778 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9779 }
9780 function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9781 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9782 hookFlags,
9783 finishedWork,
9784 nearestMountedAncestor
9785 ), recordEffectDuration()) : commitHookEffectListUnmount(
9786 hookFlags,
9787 finishedWork,
9788 nearestMountedAncestor
9789 );
9790 }
9791 function commitClassCallbacks(finishedWork) {
9792 var updateQueue = finishedWork.updateQueue;
9793 if (null !== updateQueue) {
9794 var instance = finishedWork.stateNode;
9795 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && console.error(
9796 "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9797 getComponentNameFromFiber(finishedWork) || "instance"
9798 ), instance.state !== finishedWork.memoizedState && console.error(
9799 "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9800 getComponentNameFromFiber(finishedWork) || "instance"
9801 ));
9802 try {
9803 runWithFiberInDEV(
9804 finishedWork,
9805 commitCallbacks,
9806 updateQueue,
9807 instance
9808 );
9809 } catch (error) {
9810 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9811 }
9812 }
9813 }
9814 function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
9815 return instance.getSnapshotBeforeUpdate(prevProps, prevState);
9816 }
9817 function commitClassSnapshot(finishedWork, current2) {
9818 var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
9819 current2 = finishedWork.stateNode;
9820 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
9821 "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
9822 getComponentNameFromFiber(finishedWork) || "instance"
9823 ), current2.state !== finishedWork.memoizedState && console.error(
9824 "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
9825 getComponentNameFromFiber(finishedWork) || "instance"
9826 ));
9827 try {
9828 var resolvedPrevProps = resolveClassComponentProps(
9829 finishedWork.type,
9830 prevProps
9831 );
9832 var snapshot = runWithFiberInDEV(
9833 finishedWork,
9834 callGetSnapshotBeforeUpdates,
9835 current2,
9836 resolvedPrevProps,
9837 prevState
9838 );
9839 prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
9840 void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
9841 console.error(
9842 "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
9843 getComponentNameFromFiber(finishedWork)
9844 );
9845 }));
9846 current2.__reactInternalSnapshotBeforeUpdate = snapshot;
9847 } catch (error) {
9848 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9849 }
9850 }
9851 function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
9852 instance.props = resolveClassComponentProps(
9853 current2.type,
9854 current2.memoizedProps
9855 );
9856 instance.state = current2.memoizedState;
9857 shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
9858 current2,
9859 callComponentWillUnmountInDEV,
9860 current2,
9861 nearestMountedAncestor,
9862 instance
9863 ), recordEffectDuration()) : runWithFiberInDEV(
9864 current2,
9865 callComponentWillUnmountInDEV,
9866 current2,
9867 nearestMountedAncestor,
9868 instance
9869 );
9870 }
9871 function commitAttachRef(finishedWork) {
9872 var ref = finishedWork.ref;
9873 if (null !== ref) {
9874 switch (finishedWork.tag) {
9875 case 26:
9876 case 27:
9877 case 5:
9878 var instanceToUse = finishedWork.stateNode;
9879 break;
9880 case 30:
9881 instanceToUse = finishedWork.stateNode;
9882 break;
9883 default:
9884 instanceToUse = finishedWork.stateNode;
9885 }
9886 if ("function" === typeof ref)
9887 if (shouldProfile(finishedWork))
9888 try {
9889 startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
9890 } finally {
9891 recordEffectDuration();
9892 }
9893 else finishedWork.refCleanup = ref(instanceToUse);
9894 else
9895 "string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
9896 "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
9897 getComponentNameFromFiber(finishedWork)
9898 ), ref.current = instanceToUse;
9899 }
9900 }
9901 function safelyAttachRef(current2, nearestMountedAncestor) {
9902 try {
9903 runWithFiberInDEV(current2, commitAttachRef, current2);
9904 } catch (error) {
9905 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9906 }
9907 }
9908 function safelyDetachRef(current2, nearestMountedAncestor) {
9909 var ref = current2.ref, refCleanup = current2.refCleanup;
9910 if (null !== ref)
9911 if ("function" === typeof refCleanup)
9912 try {
9913 if (shouldProfile(current2))
9914 try {
9915 startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
9916 } finally {
9917 recordEffectDuration(current2);
9918 }
9919 else runWithFiberInDEV(current2, refCleanup);
9920 } catch (error) {
9921 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9922 } finally {
9923 current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
9924 }
9925 else if ("function" === typeof ref)
9926 try {
9927 if (shouldProfile(current2))
9928 try {
9929 startEffectTimer(), runWithFiberInDEV(current2, ref, null);
9930 } finally {
9931 recordEffectDuration(current2);
9932 }
9933 else runWithFiberInDEV(current2, ref, null);
9934 } catch (error$7) {
9935 captureCommitPhaseError(current2, nearestMountedAncestor, error$7);
9936 }
9937 else ref.current = null;
9938 }
9939 function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
9940 var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
9941 _finishedWork$memoize = _finishedWork$memoize.onRender;
9942 current2 = null === current2 ? "mount" : "update";
9943 currentUpdateIsNested && (current2 = "nested-update");
9944 "function" === typeof _finishedWork$memoize && _finishedWork$memoize(
9945 id,
9946 current2,
9947 finishedWork.actualDuration,
9948 finishedWork.treeBaseDuration,
9949 finishedWork.actualStartTime,
9950 commitStartTime2
9951 );
9952 "function" === typeof onCommit && onCommit(id, current2, effectDuration, commitStartTime2);
9953 }
9954 function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
9955 var _finishedWork$memoize2 = finishedWork.memoizedProps;
9956 finishedWork = _finishedWork$memoize2.id;
9957 _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
9958 current2 = null === current2 ? "mount" : "update";
9959 currentUpdateIsNested && (current2 = "nested-update");
9960 "function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
9961 finishedWork,
9962 current2,
9963 passiveEffectDuration,
9964 commitStartTime2
9965 );
9966 }
9967 function commitHostMount(finishedWork) {
9968 var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
9969 try {
9970 runWithFiberInDEV(
9971 finishedWork,
9972 commitMount,
9973 instance,
9974 type,
9975 props,
9976 finishedWork
9977 );
9978 } catch (error) {
9979 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9980 }
9981 }
9982 function commitHostUpdate(finishedWork, newProps, oldProps) {
9983 try {
9984 runWithFiberInDEV(
9985 finishedWork,
9986 commitUpdate,
9987 finishedWork.stateNode,
9988 finishedWork.type,
9989 oldProps,
9990 newProps,
9991 finishedWork
9992 );
9993 } catch (error) {
9994 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9995 }
9996 }
9997 function isHostParent(fiber) {
9998 return 5 === fiber.tag || 3 === fiber.tag || 26 === fiber.tag || 27 === fiber.tag && isSingletonScope(fiber.type) || 4 === fiber.tag;
9999 }
10000 function getHostSibling(fiber) {
10001 a: for (; ; ) {
10002 for (; null === fiber.sibling; ) {
10003 if (null === fiber.return || isHostParent(fiber.return)) return null;
10004 fiber = fiber.return;
10005 }
10006 fiber.sibling.return = fiber.return;
10007 for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
10008 if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
10009 if (fiber.flags & 2) continue a;
10010 if (null === fiber.child || 4 === fiber.tag) continue a;
10011 else fiber.child.return = fiber, fiber = fiber.child;
10012 }
10013 if (!(fiber.flags & 2)) return fiber.stateNode;
10014 }
10015 }
10016 function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
10017 var tag = node.tag;
10018 if (5 === tag || 6 === tag)
10019 node = node.stateNode, before ? (warnForReactChildrenConflict(parent), (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent).insertBefore(node, before)) : (warnForReactChildrenConflict(parent), before = 9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent, before.appendChild(node), parent = parent._reactRootContainer, null !== parent && void 0 !== parent || null !== before.onclick || (before.onclick = noop$1));
10020 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
10021 for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
10022 insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
10023 }
10024 function insertOrAppendPlacementNode(node, before, parent) {
10025 var tag = node.tag;
10026 if (5 === tag || 6 === tag)
10027 node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
10028 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
10029 for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
10030 insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
10031 }
10032 function commitPlacement(finishedWork) {
10033 for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
10034 if (isHostParent(parentFiber)) {
10035 hostParentFiber = parentFiber;
10036 break;
10037 }
10038 parentFiber = parentFiber.return;
10039 }
10040 if (null == hostParentFiber)
10041 throw Error(
10042 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
10043 );
10044 switch (hostParentFiber.tag) {
10045 case 27:
10046 hostParentFiber = hostParentFiber.stateNode;
10047 parentFiber = getHostSibling(finishedWork);
10048 insertOrAppendPlacementNode(
10049 finishedWork,
10050 parentFiber,
10051 hostParentFiber
10052 );
10053 break;
10054 case 5:
10055 parentFiber = hostParentFiber.stateNode;
10056 hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
10057 hostParentFiber = getHostSibling(finishedWork);
10058 insertOrAppendPlacementNode(
10059 finishedWork,
10060 hostParentFiber,
10061 parentFiber
10062 );
10063 break;
10064 case 3:
10065 case 4:
10066 hostParentFiber = hostParentFiber.stateNode.containerInfo;
10067 parentFiber = getHostSibling(finishedWork);
10068 insertOrAppendPlacementNodeIntoContainer(
10069 finishedWork,
10070 parentFiber,
10071 hostParentFiber
10072 );
10073 break;
10074 default:
10075 throw Error(
10076 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
10077 );
10078 }
10079 }
10080 function commitHostSingletonAcquisition(finishedWork) {
10081 var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
10082 try {
10083 runWithFiberInDEV(
10084 finishedWork,
10085 acquireSingletonInstance,
10086 finishedWork.type,
10087 props,
10088 singleton,
10089 finishedWork
10090 );
10091 } catch (error) {
10092 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10093 }
10094 }
10095 function isHydratingParent(current2, finishedWork) {
10096 return 31 === finishedWork.tag ? (finishedWork = finishedWork.memoizedState, null !== current2.memoizedState && null === finishedWork) : 13 === finishedWork.tag ? (current2 = current2.memoizedState, finishedWork = finishedWork.memoizedState, null !== current2 && null !== current2.dehydrated && (null === finishedWork || null === finishedWork.dehydrated)) : 3 === finishedWork.tag ? current2.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) : false;
10097 }
10098 function commitBeforeMutationEffects(root2, firstChild) {
10099 root2 = root2.containerInfo;
10100 eventsEnabled = _enabled;
10101 root2 = getActiveElementDeep(root2);
10102 if (hasSelectionCapabilities(root2)) {
10103 if ("selectionStart" in root2)
10104 var JSCompiler_temp = {
10105 start: root2.selectionStart,
10106 end: root2.selectionEnd
10107 };
10108 else
10109 a: {
10110 JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
10111 var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
10112 if (selection && 0 !== selection.rangeCount) {
10113 JSCompiler_temp = selection.anchorNode;
10114 var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
10115 selection = selection.focusOffset;
10116 try {
10117 JSCompiler_temp.nodeType, focusNode.nodeType;
10118 } catch (e$2) {
10119 JSCompiler_temp = null;
10120 break a;
10121 }
10122 var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
10123 b: for (; ; ) {
10124 for (var next; ; ) {
10125 node !== JSCompiler_temp || 0 !== anchorOffset && 3 !== node.nodeType || (start = length + anchorOffset);
10126 node !== focusNode || 0 !== selection && 3 !== node.nodeType || (end = length + selection);
10127 3 === node.nodeType && (length += node.nodeValue.length);
10128 if (null === (next = node.firstChild)) break;
10129 parentNode = node;
10130 node = next;
10131 }
10132 for (; ; ) {
10133 if (node === root2) break b;
10134 parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length);
10135 parentNode === focusNode && ++indexWithinFocus === selection && (end = length);
10136 if (null !== (next = node.nextSibling)) break;
10137 node = parentNode;
10138 parentNode = node.parentNode;
10139 }
10140 node = next;
10141 }
10142 JSCompiler_temp = -1 === start || -1 === end ? null : { start, end };
10143 } else JSCompiler_temp = null;
10144 }
10145 JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
10146 } else JSCompiler_temp = null;
10147 selectionInformation = {
10148 focusedElem: root2,
10149 selectionRange: JSCompiler_temp
10150 };
10151 _enabled = false;
10152 for (nextEffect = firstChild; null !== nextEffect; )
10153 if (firstChild = nextEffect, root2 = firstChild.child, 0 !== (firstChild.subtreeFlags & 1028) && null !== root2)
10154 root2.return = firstChild, nextEffect = root2;
10155 else
10156 for (; null !== nextEffect; ) {
10157 root2 = firstChild = nextEffect;
10158 JSCompiler_temp = root2.alternate;
10159 anchorOffset = root2.flags;
10160 switch (root2.tag) {
10161 case 0:
10162 if (0 !== (anchorOffset & 4) && (root2 = root2.updateQueue, root2 = null !== root2 ? root2.events : null, null !== root2))
10163 for (JSCompiler_temp = 0; JSCompiler_temp < root2.length; JSCompiler_temp++)
10164 anchorOffset = root2[JSCompiler_temp], anchorOffset.ref.impl = anchorOffset.nextImpl;
10165 break;
10166 case 11:
10167 case 15:
10168 break;
10169 case 1:
10170 0 !== (anchorOffset & 1024) && null !== JSCompiler_temp && commitClassSnapshot(root2, JSCompiler_temp);
10171 break;
10172 case 3:
10173 if (0 !== (anchorOffset & 1024)) {
10174 if (root2 = root2.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, 9 === JSCompiler_temp)
10175 clearContainerSparingly(root2);
10176 else if (1 === JSCompiler_temp)
10177 switch (root2.nodeName) {
10178 case "HEAD":
10179 case "HTML":
10180 case "BODY":
10181 clearContainerSparingly(root2);
10182 break;
10183 default:
10184 root2.textContent = "";
10185 }
10186 }
10187 break;
10188 case 5:
10189 case 26:
10190 case 27:
10191 case 6:
10192 case 4:
10193 case 17:
10194 break;
10195 default:
10196 if (0 !== (anchorOffset & 1024))
10197 throw Error(
10198 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
10199 );
10200 }
10201 root2 = firstChild.sibling;
10202 if (null !== root2) {
10203 root2.return = firstChild.return;
10204 nextEffect = root2;
10205 break;
10206 }
10207 nextEffect = firstChild.return;
10208 }
10209 }
10210 function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
10211 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
10212 switch (finishedWork.tag) {
10213 case 0:
10214 case 11:
10215 case 15:
10216 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10217 flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
10218 break;
10219 case 1:
10220 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10221 if (flags & 4)
10222 if (finishedRoot = finishedWork.stateNode, null === current2)
10223 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10224 "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
10225 getComponentNameFromFiber(finishedWork) || "instance"
10226 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10227 "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
10228 getComponentNameFromFiber(finishedWork) || "instance"
10229 )), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10230 finishedWork,
10231 callComponentDidMountInDEV,
10232 finishedWork,
10233 finishedRoot
10234 ), recordEffectDuration()) : runWithFiberInDEV(
10235 finishedWork,
10236 callComponentDidMountInDEV,
10237 finishedWork,
10238 finishedRoot
10239 );
10240 else {
10241 var prevProps = resolveClassComponentProps(
10242 finishedWork.type,
10243 current2.memoizedProps
10244 );
10245 current2 = current2.memoizedState;
10246 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10247 "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
10248 getComponentNameFromFiber(finishedWork) || "instance"
10249 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10250 "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
10251 getComponentNameFromFiber(finishedWork) || "instance"
10252 ));
10253 shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10254 finishedWork,
10255 callComponentDidUpdateInDEV,
10256 finishedWork,
10257 finishedRoot,
10258 prevProps,
10259 current2,
10260 finishedRoot.__reactInternalSnapshotBeforeUpdate
10261 ), recordEffectDuration()) : runWithFiberInDEV(
10262 finishedWork,
10263 callComponentDidUpdateInDEV,
10264 finishedWork,
10265 finishedRoot,
10266 prevProps,
10267 current2,
10268 finishedRoot.__reactInternalSnapshotBeforeUpdate
10269 );
10270 }
10271 flags & 64 && commitClassCallbacks(finishedWork);
10272 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10273 break;
10274 case 3:
10275 current2 = pushNestedEffectDurations();
10276 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10277 if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
10278 prevProps = null;
10279 if (null !== finishedWork.child)
10280 switch (finishedWork.child.tag) {
10281 case 27:
10282 case 5:
10283 prevProps = finishedWork.child.stateNode;
10284 break;
10285 case 1:
10286 prevProps = finishedWork.child.stateNode;
10287 }
10288 try {
10289 runWithFiberInDEV(
10290 finishedWork,
10291 commitCallbacks,
10292 flags,
10293 prevProps
10294 );
10295 } catch (error) {
10296 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10297 }
10298 }
10299 finishedRoot.effectDuration += popNestedEffectDurations(current2);
10300 break;
10301 case 27:
10302 null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
10303 case 26:
10304 case 5:
10305 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10306 if (null === current2) {
10307 if (flags & 4) commitHostMount(finishedWork);
10308 else if (flags & 64) {
10309 finishedRoot = finishedWork.type;
10310 current2 = finishedWork.memoizedProps;
10311 prevProps = finishedWork.stateNode;
10312 try {
10313 runWithFiberInDEV(
10314 finishedWork,
10315 commitHydratedInstance,
10316 prevProps,
10317 finishedRoot,
10318 current2,
10319 finishedWork
10320 );
10321 } catch (error) {
10322 captureCommitPhaseError(
10323 finishedWork,
10324 finishedWork.return,
10325 error
10326 );
10327 }
10328 }
10329 }
10330 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10331 break;
10332 case 12:
10333 if (flags & 4) {
10334 flags = pushNestedEffectDurations();
10335 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10336 finishedRoot = finishedWork.stateNode;
10337 finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
10338 try {
10339 runWithFiberInDEV(
10340 finishedWork,
10341 commitProfiler,
10342 finishedWork,
10343 current2,
10344 commitStartTime,
10345 finishedRoot.effectDuration
10346 );
10347 } catch (error) {
10348 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10349 }
10350 } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10351 break;
10352 case 31:
10353 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10354 flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
10355 break;
10356 case 13:
10357 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10358 flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
10359 flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (flags = retryDehydratedSuspenseBoundary.bind(
10360 null,
10361 finishedWork
10362 ), registerSuspenseInstanceRetry(finishedRoot, flags))));
10363 break;
10364 case 22:
10365 flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
10366 if (!flags) {
10367 current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
10368 prevProps = offscreenSubtreeIsHidden;
10369 var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10370 offscreenSubtreeIsHidden = flags;
10371 (offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? (recursivelyTraverseReappearLayoutEffects(
10372 finishedRoot,
10373 finishedWork,
10374 0 !== (finishedWork.subtreeFlags & 8772)
10375 ), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10376 finishedWork,
10377 componentEffectStartTime,
10378 componentEffectEndTime
10379 )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10380 offscreenSubtreeIsHidden = prevProps;
10381 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10382 }
10383 break;
10384 case 30:
10385 break;
10386 default:
10387 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10388 }
10389 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10390 finishedWork,
10391 componentEffectStartTime,
10392 componentEffectEndTime,
10393 componentEffectDuration,
10394 componentEffectErrors
10395 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
10396 finishedWork.return.alternate,
10397 finishedWork.return
10398 ) || logComponentTrigger(
10399 finishedWork,
10400 componentEffectStartTime,
10401 componentEffectEndTime,
10402 "Mount"
10403 )));
10404 popComponentEffectStart(prevEffectStart);
10405 popComponentEffectDuration(prevEffectDuration);
10406 componentEffectErrors = prevEffectErrors;
10407 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10408 }
10409 function detachFiberAfterEffects(fiber) {
10410 var alternate = fiber.alternate;
10411 null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
10412 fiber.child = null;
10413 fiber.deletions = null;
10414 fiber.sibling = null;
10415 5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
10416 fiber.stateNode = null;
10417 fiber._debugOwner = null;
10418 fiber.return = null;
10419 fiber.dependencies = null;
10420 fiber.memoizedProps = null;
10421 fiber.memoizedState = null;
10422 fiber.pendingProps = null;
10423 fiber.stateNode = null;
10424 fiber.updateQueue = null;
10425 }
10426 function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
10427 for (parent = parent.child; null !== parent; )
10428 commitDeletionEffectsOnFiber(
10429 finishedRoot,
10430 nearestMountedAncestor,
10431 parent
10432 ), parent = parent.sibling;
10433 }
10434 function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
10435 if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
10436 try {
10437 injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
10438 } catch (err) {
10439 hasLoggedError || (hasLoggedError = true, console.error(
10440 "React instrumentation encountered an error: %o",
10441 err
10442 ));
10443 }
10444 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
10445 switch (deletedFiber.tag) {
10446 case 26:
10447 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10448 recursivelyTraverseDeletionEffects(
10449 finishedRoot,
10450 nearestMountedAncestor,
10451 deletedFiber
10452 );
10453 deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (finishedRoot = deletedFiber.stateNode, finishedRoot.parentNode.removeChild(finishedRoot));
10454 break;
10455 case 27:
10456 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10457 var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
10458 isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
10459 recursivelyTraverseDeletionEffects(
10460 finishedRoot,
10461 nearestMountedAncestor,
10462 deletedFiber
10463 );
10464 runWithFiberInDEV(
10465 deletedFiber,
10466 releaseSingletonInstance,
10467 deletedFiber.stateNode
10468 );
10469 hostParent = prevHostParent;
10470 hostParentIsContainer = prevHostParentIsContainer;
10471 break;
10472 case 5:
10473 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10474 case 6:
10475 prevHostParent = hostParent;
10476 prevHostParentIsContainer = hostParentIsContainer;
10477 hostParent = null;
10478 recursivelyTraverseDeletionEffects(
10479 finishedRoot,
10480 nearestMountedAncestor,
10481 deletedFiber
10482 );
10483 hostParent = prevHostParent;
10484 hostParentIsContainer = prevHostParentIsContainer;
10485 if (null !== hostParent)
10486 if (hostParentIsContainer)
10487 try {
10488 runWithFiberInDEV(
10489 deletedFiber,
10490 removeChildFromContainer,
10491 hostParent,
10492 deletedFiber.stateNode
10493 );
10494 } catch (error) {
10495 captureCommitPhaseError(
10496 deletedFiber,
10497 nearestMountedAncestor,
10498 error
10499 );
10500 }
10501 else
10502 try {
10503 runWithFiberInDEV(
10504 deletedFiber,
10505 removeChild,
10506 hostParent,
10507 deletedFiber.stateNode
10508 );
10509 } catch (error) {
10510 captureCommitPhaseError(
10511 deletedFiber,
10512 nearestMountedAncestor,
10513 error
10514 );
10515 }
10516 break;
10517 case 18:
10518 null !== hostParent && (hostParentIsContainer ? (finishedRoot = hostParent, clearHydrationBoundary(
10519 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName ? finishedRoot.ownerDocument.body : finishedRoot,
10520 deletedFiber.stateNode
10521 ), retryIfBlockedOn(finishedRoot)) : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
10522 break;
10523 case 4:
10524 prevHostParent = hostParent;
10525 prevHostParentIsContainer = hostParentIsContainer;
10526 hostParent = deletedFiber.stateNode.containerInfo;
10527 hostParentIsContainer = true;
10528 recursivelyTraverseDeletionEffects(
10529 finishedRoot,
10530 nearestMountedAncestor,
10531 deletedFiber
10532 );
10533 hostParent = prevHostParent;
10534 hostParentIsContainer = prevHostParentIsContainer;
10535 break;
10536 case 0:
10537 case 11:
10538 case 14:
10539 case 15:
10540 commitHookEffectListUnmount(
10541 Insertion,
10542 deletedFiber,
10543 nearestMountedAncestor
10544 );
10545 offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
10546 deletedFiber,
10547 nearestMountedAncestor,
10548 Layout
10549 );
10550 recursivelyTraverseDeletionEffects(
10551 finishedRoot,
10552 nearestMountedAncestor,
10553 deletedFiber
10554 );
10555 break;
10556 case 1:
10557 offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
10558 deletedFiber,
10559 nearestMountedAncestor,
10560 prevHostParent
10561 ));
10562 recursivelyTraverseDeletionEffects(
10563 finishedRoot,
10564 nearestMountedAncestor,
10565 deletedFiber
10566 );
10567 break;
10568 case 21:
10569 recursivelyTraverseDeletionEffects(
10570 finishedRoot,
10571 nearestMountedAncestor,
10572 deletedFiber
10573 );
10574 break;
10575 case 22:
10576 offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
10577 recursivelyTraverseDeletionEffects(
10578 finishedRoot,
10579 nearestMountedAncestor,
10580 deletedFiber
10581 );
10582 offscreenSubtreeWasHidden = prevHostParent;
10583 break;
10584 default:
10585 recursivelyTraverseDeletionEffects(
10586 finishedRoot,
10587 nearestMountedAncestor,
10588 deletedFiber
10589 );
10590 }
10591 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10592 deletedFiber,
10593 componentEffectStartTime,
10594 componentEffectEndTime,
10595 componentEffectDuration,
10596 componentEffectErrors
10597 );
10598 popComponentEffectStart(prevEffectStart);
10599 popComponentEffectDuration(prevEffectDuration);
10600 componentEffectErrors = prevEffectErrors;
10601 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10602 }
10603 function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
10604 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot))) {
10605 finishedRoot = finishedRoot.dehydrated;
10606 try {
10607 runWithFiberInDEV(
10608 finishedWork,
10609 commitHydratedActivityInstance,
10610 finishedRoot
10611 );
10612 } catch (error) {
10613 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10614 }
10615 }
10616 }
10617 function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
10618 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
10619 try {
10620 runWithFiberInDEV(
10621 finishedWork,
10622 commitHydratedSuspenseInstance,
10623 finishedRoot
10624 );
10625 } catch (error) {
10626 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10627 }
10628 }
10629 function getRetryCache(finishedWork) {
10630 switch (finishedWork.tag) {
10631 case 31:
10632 case 13:
10633 case 19:
10634 var retryCache = finishedWork.stateNode;
10635 null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
10636 return retryCache;
10637 case 22:
10638 return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
10639 default:
10640 throw Error(
10641 "Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
10642 );
10643 }
10644 }
10645 function attachSuspenseRetryListeners(finishedWork, wakeables) {
10646 var retryCache = getRetryCache(finishedWork);
10647 wakeables.forEach(function(wakeable) {
10648 if (!retryCache.has(wakeable)) {
10649 retryCache.add(wakeable);
10650 if (isDevToolsPresent)
10651 if (null !== inProgressLanes && null !== inProgressRoot)
10652 restorePendingUpdaters(inProgressRoot, inProgressLanes);
10653 else
10654 throw Error(
10655 "Expected finished root and lanes to be set. This is a bug in React."
10656 );
10657 var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
10658 wakeable.then(retry, retry);
10659 }
10660 });
10661 }
10662 function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
10663 var deletions = parentFiber.deletions;
10664 if (null !== deletions)
10665 for (var i = 0; i < deletions.length; i++) {
10666 var root2 = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i], prevEffectStart = pushComponentEffectStart(), parent = returnFiber;
10667 a: for (; null !== parent; ) {
10668 switch (parent.tag) {
10669 case 27:
10670 if (isSingletonScope(parent.type)) {
10671 hostParent = parent.stateNode;
10672 hostParentIsContainer = false;
10673 break a;
10674 }
10675 break;
10676 case 5:
10677 hostParent = parent.stateNode;
10678 hostParentIsContainer = false;
10679 break a;
10680 case 3:
10681 case 4:
10682 hostParent = parent.stateNode.containerInfo;
10683 hostParentIsContainer = true;
10684 break a;
10685 }
10686 parent = parent.return;
10687 }
10688 if (null === hostParent)
10689 throw Error(
10690 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
10691 );
10692 commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
10693 hostParent = null;
10694 hostParentIsContainer = false;
10695 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10696 deletedFiber,
10697 componentEffectStartTime,
10698 componentEffectEndTime,
10699 "Unmount"
10700 );
10701 popComponentEffectStart(prevEffectStart);
10702 root2 = deletedFiber;
10703 returnFiber = root2.alternate;
10704 null !== returnFiber && (returnFiber.return = null);
10705 root2.return = null;
10706 }
10707 if (parentFiber.subtreeFlags & 13886)
10708 for (parentFiber = parentFiber.child; null !== parentFiber; )
10709 commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
10710 }
10711 function commitMutationEffectsOnFiber(finishedWork, root2) {
10712 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), current2 = finishedWork.alternate, flags = finishedWork.flags;
10713 switch (finishedWork.tag) {
10714 case 0:
10715 case 11:
10716 case 14:
10717 case 15:
10718 recursivelyTraverseMutationEffects(root2, finishedWork);
10719 commitReconciliationEffects(finishedWork);
10720 flags & 4 && (commitHookEffectListUnmount(
10721 Insertion | HasEffect,
10722 finishedWork,
10723 finishedWork.return
10724 ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
10725 finishedWork,
10726 finishedWork.return,
10727 Layout | HasEffect
10728 ));
10729 break;
10730 case 1:
10731 recursivelyTraverseMutationEffects(root2, finishedWork);
10732 commitReconciliationEffects(finishedWork);
10733 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10734 if (flags & 64 && offscreenSubtreeIsHidden && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.callbacks, null !== current2))) {
10735 var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
10736 flags.shared.hiddenCallbacks = null === existingHiddenCallbacks ? current2 : existingHiddenCallbacks.concat(current2);
10737 }
10738 break;
10739 case 26:
10740 existingHiddenCallbacks = currentHoistableRoot;
10741 recursivelyTraverseMutationEffects(root2, finishedWork);
10742 commitReconciliationEffects(finishedWork);
10743 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10744 if (flags & 4) {
10745 var currentResource = null !== current2 ? current2.memoizedState : null;
10746 flags = finishedWork.memoizedState;
10747 if (null === current2)
10748 if (null === flags)
10749 if (null === finishedWork.stateNode) {
10750 a: {
10751 flags = finishedWork.type;
10752 current2 = finishedWork.memoizedProps;
10753 existingHiddenCallbacks = existingHiddenCallbacks.ownerDocument || existingHiddenCallbacks;
10754 b: switch (flags) {
10755 case "title":
10756 currentResource = existingHiddenCallbacks.getElementsByTagName(
10757 "title"
10758 )[0];
10759 if (!currentResource || currentResource[internalHoistableMarker] || currentResource[internalInstanceKey] || currentResource.namespaceURI === SVG_NAMESPACE || currentResource.hasAttribute("itemprop"))
10760 currentResource = existingHiddenCallbacks.createElement(flags), existingHiddenCallbacks.head.insertBefore(
10761 currentResource,
10762 existingHiddenCallbacks.querySelector(
10763 "head > title"
10764 )
10765 );
10766 setInitialProperties(currentResource, flags, current2);
10767 currentResource[internalInstanceKey] = finishedWork;
10768 markNodeAsHoistable(currentResource);
10769 flags = currentResource;
10770 break a;
10771 case "link":
10772 var maybeNodes = getHydratableHoistableCache(
10773 "link",
10774 "href",
10775 existingHiddenCallbacks
10776 ).get(flags + (current2.href || ""));
10777 if (maybeNodes) {
10778 for (var i = 0; i < maybeNodes.length; i++)
10779 if (currentResource = maybeNodes[i], currentResource.getAttribute("href") === (null == current2.href || "" === current2.href ? null : current2.href) && currentResource.getAttribute("rel") === (null == current2.rel ? null : current2.rel) && currentResource.getAttribute("title") === (null == current2.title ? null : current2.title) && currentResource.getAttribute("crossorigin") === (null == current2.crossOrigin ? null : current2.crossOrigin)) {
10780 maybeNodes.splice(i, 1);
10781 break b;
10782 }
10783 }
10784 currentResource = existingHiddenCallbacks.createElement(flags);
10785 setInitialProperties(currentResource, flags, current2);
10786 existingHiddenCallbacks.head.appendChild(
10787 currentResource
10788 );
10789 break;
10790 case "meta":
10791 if (maybeNodes = getHydratableHoistableCache(
10792 "meta",
10793 "content",
10794 existingHiddenCallbacks
10795 ).get(flags + (current2.content || ""))) {
10796 for (i = 0; i < maybeNodes.length; i++)
10797 if (currentResource = maybeNodes[i], checkAttributeStringCoercion(
10798 current2.content,
10799 "content"
10800 ), currentResource.getAttribute("content") === (null == current2.content ? null : "" + current2.content) && currentResource.getAttribute("name") === (null == current2.name ? null : current2.name) && currentResource.getAttribute("property") === (null == current2.property ? null : current2.property) && currentResource.getAttribute("http-equiv") === (null == current2.httpEquiv ? null : current2.httpEquiv) && currentResource.getAttribute("charset") === (null == current2.charSet ? null : current2.charSet)) {
10801 maybeNodes.splice(i, 1);
10802 break b;
10803 }
10804 }
10805 currentResource = existingHiddenCallbacks.createElement(flags);
10806 setInitialProperties(currentResource, flags, current2);
10807 existingHiddenCallbacks.head.appendChild(
10808 currentResource
10809 );
10810 break;
10811 default:
10812 throw Error(
10813 'getNodesForType encountered a type it did not expect: "' + flags + '". This is a bug in React.'
10814 );
10815 }
10816 currentResource[internalInstanceKey] = finishedWork;
10817 markNodeAsHoistable(currentResource);
10818 flags = currentResource;
10819 }
10820 finishedWork.stateNode = flags;
10821 } else
10822 mountHoistable(
10823 existingHiddenCallbacks,
10824 finishedWork.type,
10825 finishedWork.stateNode
10826 );
10827 else
10828 finishedWork.stateNode = acquireResource(
10829 existingHiddenCallbacks,
10830 flags,
10831 finishedWork.memoizedProps
10832 );
10833 else
10834 currentResource !== flags ? (null === currentResource ? null !== current2.stateNode && (current2 = current2.stateNode, current2.parentNode.removeChild(current2)) : currentResource.count--, null === flags ? mountHoistable(
10835 existingHiddenCallbacks,
10836 finishedWork.type,
10837 finishedWork.stateNode
10838 ) : acquireResource(
10839 existingHiddenCallbacks,
10840 flags,
10841 finishedWork.memoizedProps
10842 )) : null === flags && null !== finishedWork.stateNode && commitHostUpdate(
10843 finishedWork,
10844 finishedWork.memoizedProps,
10845 current2.memoizedProps
10846 );
10847 }
10848 break;
10849 case 27:
10850 recursivelyTraverseMutationEffects(root2, finishedWork);
10851 commitReconciliationEffects(finishedWork);
10852 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10853 null !== current2 && flags & 4 && commitHostUpdate(
10854 finishedWork,
10855 finishedWork.memoizedProps,
10856 current2.memoizedProps
10857 );
10858 break;
10859 case 5:
10860 recursivelyTraverseMutationEffects(root2, finishedWork);
10861 commitReconciliationEffects(finishedWork);
10862 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10863 if (finishedWork.flags & 32) {
10864 existingHiddenCallbacks = finishedWork.stateNode;
10865 try {
10866 runWithFiberInDEV(
10867 finishedWork,
10868 resetTextContent,
10869 existingHiddenCallbacks
10870 );
10871 } catch (error) {
10872 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10873 }
10874 }
10875 flags & 4 && null != finishedWork.stateNode && (existingHiddenCallbacks = finishedWork.memoizedProps, commitHostUpdate(
10876 finishedWork,
10877 existingHiddenCallbacks,
10878 null !== current2 ? current2.memoizedProps : existingHiddenCallbacks
10879 ));
10880 flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
10881 "Unexpected host component type. Expected a form. This is a bug in React."
10882 ));
10883 break;
10884 case 6:
10885 recursivelyTraverseMutationEffects(root2, finishedWork);
10886 commitReconciliationEffects(finishedWork);
10887 if (flags & 4) {
10888 if (null === finishedWork.stateNode)
10889 throw Error(
10890 "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
10891 );
10892 flags = finishedWork.memoizedProps;
10893 current2 = null !== current2 ? current2.memoizedProps : flags;
10894 existingHiddenCallbacks = finishedWork.stateNode;
10895 try {
10896 runWithFiberInDEV(
10897 finishedWork,
10898 commitTextUpdate,
10899 existingHiddenCallbacks,
10900 current2,
10901 flags
10902 );
10903 } catch (error) {
10904 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10905 }
10906 }
10907 break;
10908 case 3:
10909 existingHiddenCallbacks = pushNestedEffectDurations();
10910 tagCaches = null;
10911 currentResource = currentHoistableRoot;
10912 currentHoistableRoot = getHoistableRoot(root2.containerInfo);
10913 recursivelyTraverseMutationEffects(root2, finishedWork);
10914 currentHoistableRoot = currentResource;
10915 commitReconciliationEffects(finishedWork);
10916 if (flags & 4 && null !== current2 && current2.memoizedState.isDehydrated)
10917 try {
10918 runWithFiberInDEV(
10919 finishedWork,
10920 commitHydratedContainer,
10921 root2.containerInfo
10922 );
10923 } catch (error) {
10924 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10925 }
10926 needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
10927 root2.effectDuration += popNestedEffectDurations(
10928 existingHiddenCallbacks
10929 );
10930 break;
10931 case 4:
10932 flags = currentHoistableRoot;
10933 currentHoistableRoot = getHoistableRoot(
10934 finishedWork.stateNode.containerInfo
10935 );
10936 recursivelyTraverseMutationEffects(root2, finishedWork);
10937 commitReconciliationEffects(finishedWork);
10938 currentHoistableRoot = flags;
10939 break;
10940 case 12:
10941 flags = pushNestedEffectDurations();
10942 recursivelyTraverseMutationEffects(root2, finishedWork);
10943 commitReconciliationEffects(finishedWork);
10944 finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
10945 break;
10946 case 31:
10947 recursivelyTraverseMutationEffects(root2, finishedWork);
10948 commitReconciliationEffects(finishedWork);
10949 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10950 break;
10951 case 13:
10952 recursivelyTraverseMutationEffects(root2, finishedWork);
10953 commitReconciliationEffects(finishedWork);
10954 finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
10955 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10956 break;
10957 case 22:
10958 existingHiddenCallbacks = null !== finishedWork.memoizedState;
10959 var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10960 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
10961 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
10962 recursivelyTraverseMutationEffects(root2, finishedWork);
10963 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10964 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
10965 wasHidden && !existingHiddenCallbacks && !prevOffscreenSubtreeIsHidden && !prevOffscreenSubtreeWasHidden && (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10966 finishedWork,
10967 componentEffectStartTime,
10968 componentEffectEndTime
10969 );
10970 commitReconciliationEffects(finishedWork);
10971 if (flags & 8192)
10972 a: for (root2 = finishedWork.stateNode, root2._visibility = existingHiddenCallbacks ? root2._visibility & ~OffscreenVisible : root2._visibility | OffscreenVisible, !existingHiddenCallbacks || null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || (recursivelyTraverseDisappearLayoutEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10973 finishedWork,
10974 componentEffectStartTime,
10975 componentEffectEndTime,
10976 "Disconnect"
10977 )), current2 = null, root2 = finishedWork; ; ) {
10978 if (5 === root2.tag || 26 === root2.tag) {
10979 if (null === current2) {
10980 wasHidden = current2 = root2;
10981 try {
10982 currentResource = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10983 wasHidden,
10984 hideInstance,
10985 currentResource
10986 ) : runWithFiberInDEV(
10987 wasHidden,
10988 unhideInstance,
10989 wasHidden.stateNode,
10990 wasHidden.memoizedProps
10991 );
10992 } catch (error) {
10993 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10994 }
10995 }
10996 } else if (6 === root2.tag) {
10997 if (null === current2) {
10998 wasHidden = root2;
10999 try {
11000 maybeNodes = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
11001 wasHidden,
11002 hideTextInstance,
11003 maybeNodes
11004 ) : runWithFiberInDEV(
11005 wasHidden,
11006 unhideTextInstance,
11007 maybeNodes,
11008 wasHidden.memoizedProps
11009 );
11010 } catch (error) {
11011 captureCommitPhaseError(wasHidden, wasHidden.return, error);
11012 }
11013 }
11014 } else if (18 === root2.tag) {
11015 if (null === current2) {
11016 wasHidden = root2;
11017 try {
11018 i = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
11019 wasHidden,
11020 hideDehydratedBoundary,
11021 i
11022 ) : runWithFiberInDEV(
11023 wasHidden,
11024 unhideDehydratedBoundary,
11025 wasHidden.stateNode
11026 );
11027 } catch (error) {
11028 captureCommitPhaseError(wasHidden, wasHidden.return, error);
11029 }
11030 }
11031 } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
11032 root2.child.return = root2;
11033 root2 = root2.child;
11034 continue;
11035 }
11036 if (root2 === finishedWork) break a;
11037 for (; null === root2.sibling; ) {
11038 if (null === root2.return || root2.return === finishedWork)
11039 break a;
11040 current2 === root2 && (current2 = null);
11041 root2 = root2.return;
11042 }
11043 current2 === root2 && (current2 = null);
11044 root2.sibling.return = root2.return;
11045 root2 = root2.sibling;
11046 }
11047 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
11048 break;
11049 case 19:
11050 recursivelyTraverseMutationEffects(root2, finishedWork);
11051 commitReconciliationEffects(finishedWork);
11052 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
11053 break;
11054 case 30:
11055 break;
11056 case 21:
11057 break;
11058 default:
11059 recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
11060 }
11061 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11062 finishedWork,
11063 componentEffectStartTime,
11064 componentEffectEndTime,
11065 componentEffectDuration,
11066 componentEffectErrors
11067 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
11068 finishedWork.return.alternate,
11069 finishedWork.return
11070 ) || logComponentTrigger(
11071 finishedWork,
11072 componentEffectStartTime,
11073 componentEffectEndTime,
11074 "Mount"
11075 )));
11076 popComponentEffectStart(prevEffectStart);
11077 popComponentEffectDuration(prevEffectDuration);
11078 componentEffectErrors = prevEffectErrors;
11079 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11080 }
11081 function commitReconciliationEffects(finishedWork) {
11082 var flags = finishedWork.flags;
11083 if (flags & 2) {
11084 try {
11085 runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
11086 } catch (error) {
11087 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11088 }
11089 finishedWork.flags &= -3;
11090 }
11091 flags & 4096 && (finishedWork.flags &= -4097);
11092 }
11093 function recursivelyResetForms(parentFiber) {
11094 if (parentFiber.subtreeFlags & 1024)
11095 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11096 var fiber = parentFiber;
11097 recursivelyResetForms(fiber);
11098 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
11099 parentFiber = parentFiber.sibling;
11100 }
11101 }
11102 function recursivelyTraverseLayoutEffects(root2, parentFiber) {
11103 if (parentFiber.subtreeFlags & 8772)
11104 for (parentFiber = parentFiber.child; null !== parentFiber; )
11105 commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
11106 }
11107 function disappearLayoutEffects(finishedWork) {
11108 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11109 switch (finishedWork.tag) {
11110 case 0:
11111 case 11:
11112 case 14:
11113 case 15:
11114 commitHookLayoutUnmountEffects(
11115 finishedWork,
11116 finishedWork.return,
11117 Layout
11118 );
11119 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11120 break;
11121 case 1:
11122 safelyDetachRef(finishedWork, finishedWork.return);
11123 var instance = finishedWork.stateNode;
11124 "function" === typeof instance.componentWillUnmount && safelyCallComponentWillUnmount(
11125 finishedWork,
11126 finishedWork.return,
11127 instance
11128 );
11129 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11130 break;
11131 case 27:
11132 runWithFiberInDEV(
11133 finishedWork,
11134 releaseSingletonInstance,
11135 finishedWork.stateNode
11136 );
11137 case 26:
11138 case 5:
11139 safelyDetachRef(finishedWork, finishedWork.return);
11140 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11141 break;
11142 case 22:
11143 null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
11144 break;
11145 case 30:
11146 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11147 break;
11148 default:
11149 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11150 }
11151 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11152 finishedWork,
11153 componentEffectStartTime,
11154 componentEffectEndTime,
11155 componentEffectDuration,
11156 componentEffectErrors
11157 );
11158 popComponentEffectStart(prevEffectStart);
11159 popComponentEffectDuration(prevEffectDuration);
11160 componentEffectErrors = prevEffectErrors;
11161 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11162 }
11163 function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
11164 for (parentFiber = parentFiber.child; null !== parentFiber; )
11165 disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
11166 }
11167 function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
11168 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
11169 switch (finishedWork.tag) {
11170 case 0:
11171 case 11:
11172 case 15:
11173 recursivelyTraverseReappearLayoutEffects(
11174 finishedRoot,
11175 finishedWork,
11176 includeWorkInProgressEffects
11177 );
11178 commitHookLayoutEffects(finishedWork, Layout);
11179 break;
11180 case 1:
11181 recursivelyTraverseReappearLayoutEffects(
11182 finishedRoot,
11183 finishedWork,
11184 includeWorkInProgressEffects
11185 );
11186 current2 = finishedWork.stateNode;
11187 "function" === typeof current2.componentDidMount && runWithFiberInDEV(
11188 finishedWork,
11189 callComponentDidMountInDEV,
11190 finishedWork,
11191 current2
11192 );
11193 current2 = finishedWork.updateQueue;
11194 if (null !== current2) {
11195 finishedRoot = finishedWork.stateNode;
11196 try {
11197 runWithFiberInDEV(
11198 finishedWork,
11199 commitHiddenCallbacks,
11200 current2,
11201 finishedRoot
11202 );
11203 } catch (error) {
11204 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11205 }
11206 }
11207 includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
11208 safelyAttachRef(finishedWork, finishedWork.return);
11209 break;
11210 case 27:
11211 commitHostSingletonAcquisition(finishedWork);
11212 case 26:
11213 case 5:
11214 recursivelyTraverseReappearLayoutEffects(
11215 finishedRoot,
11216 finishedWork,
11217 includeWorkInProgressEffects
11218 );
11219 includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
11220 safelyAttachRef(finishedWork, finishedWork.return);
11221 break;
11222 case 12:
11223 if (includeWorkInProgressEffects && flags & 4) {
11224 flags = pushNestedEffectDurations();
11225 recursivelyTraverseReappearLayoutEffects(
11226 finishedRoot,
11227 finishedWork,
11228 includeWorkInProgressEffects
11229 );
11230 includeWorkInProgressEffects = finishedWork.stateNode;
11231 includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
11232 try {
11233 runWithFiberInDEV(
11234 finishedWork,
11235 commitProfiler,
11236 finishedWork,
11237 current2,
11238 commitStartTime,
11239 includeWorkInProgressEffects.effectDuration
11240 );
11241 } catch (error) {
11242 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11243 }
11244 } else
11245 recursivelyTraverseReappearLayoutEffects(
11246 finishedRoot,
11247 finishedWork,
11248 includeWorkInProgressEffects
11249 );
11250 break;
11251 case 31:
11252 recursivelyTraverseReappearLayoutEffects(
11253 finishedRoot,
11254 finishedWork,
11255 includeWorkInProgressEffects
11256 );
11257 includeWorkInProgressEffects && flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
11258 break;
11259 case 13:
11260 recursivelyTraverseReappearLayoutEffects(
11261 finishedRoot,
11262 finishedWork,
11263 includeWorkInProgressEffects
11264 );
11265 includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
11266 break;
11267 case 22:
11268 null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
11269 finishedRoot,
11270 finishedWork,
11271 includeWorkInProgressEffects
11272 );
11273 safelyAttachRef(finishedWork, finishedWork.return);
11274 break;
11275 case 30:
11276 break;
11277 default:
11278 recursivelyTraverseReappearLayoutEffects(
11279 finishedRoot,
11280 finishedWork,
11281 includeWorkInProgressEffects
11282 );
11283 }
11284 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11285 finishedWork,
11286 componentEffectStartTime,
11287 componentEffectEndTime,
11288 componentEffectDuration,
11289 componentEffectErrors
11290 );
11291 popComponentEffectStart(prevEffectStart);
11292 popComponentEffectDuration(prevEffectDuration);
11293 componentEffectErrors = prevEffectErrors;
11294 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11295 }
11296 function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
11297 includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
11298 for (parentFiber = parentFiber.child; null !== parentFiber; )
11299 reappearLayoutEffects(
11300 finishedRoot,
11301 parentFiber.alternate,
11302 parentFiber,
11303 includeWorkInProgressEffects
11304 ), parentFiber = parentFiber.sibling;
11305 }
11306 function commitOffscreenPassiveMountEffects(current2, finishedWork) {
11307 var previousCache = null;
11308 null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
11309 current2 = null;
11310 null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
11311 current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
11312 }
11313 function commitCachePassiveMountEffect(current2, finishedWork) {
11314 current2 = null;
11315 null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
11316 finishedWork = finishedWork.memoizedState.cache;
11317 finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
11318 }
11319 function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions, endTime) {
11320 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11321 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11322 var nextSibling = parentFiber.sibling;
11323 commitPassiveMountOnFiber(
11324 root2,
11325 parentFiber,
11326 committedLanes,
11327 committedTransitions,
11328 null !== nextSibling ? nextSibling.actualStartTime : endTime
11329 );
11330 parentFiber = nextSibling;
11331 }
11332 }
11333 function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions, endTime) {
11334 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality, flags = finishedWork.flags;
11335 switch (finishedWork.tag) {
11336 case 0:
11337 case 11:
11338 case 15:
11339 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11340 finishedWork,
11341 finishedWork.actualStartTime,
11342 endTime,
11343 inHydratedSubtree,
11344 committedLanes
11345 );
11346 recursivelyTraversePassiveMountEffects(
11347 finishedRoot,
11348 finishedWork,
11349 committedLanes,
11350 committedTransitions,
11351 endTime
11352 );
11353 flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
11354 break;
11355 case 1:
11356 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && (0 !== (finishedWork.flags & 128) ? logComponentErrored(
11357 finishedWork,
11358 finishedWork.actualStartTime,
11359 endTime,
11360 []
11361 ) : 0 !== (finishedWork.flags & 1) && logComponentRender(
11362 finishedWork,
11363 finishedWork.actualStartTime,
11364 endTime,
11365 inHydratedSubtree,
11366 committedLanes
11367 ));
11368 recursivelyTraversePassiveMountEffects(
11369 finishedRoot,
11370 finishedWork,
11371 committedLanes,
11372 committedTransitions,
11373 endTime
11374 );
11375 break;
11376 case 3:
11377 var prevProfilerEffectDuration = pushNestedEffectDurations(), wasInHydratedSubtree = inHydratedSubtree;
11378 inHydratedSubtree = null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256);
11379 recursivelyTraversePassiveMountEffects(
11380 finishedRoot,
11381 finishedWork,
11382 committedLanes,
11383 committedTransitions,
11384 endTime
11385 );
11386 inHydratedSubtree = wasInHydratedSubtree;
11387 flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), committedTransitions = finishedWork.memoizedState.cache, committedTransitions !== committedLanes && (retainCache(committedTransitions), null != committedLanes && releaseCache(committedLanes)));
11388 finishedRoot.passiveEffectDuration += popNestedEffectDurations(
11389 prevProfilerEffectDuration
11390 );
11391 break;
11392 case 12:
11393 if (flags & 2048) {
11394 flags = pushNestedEffectDurations();
11395 recursivelyTraversePassiveMountEffects(
11396 finishedRoot,
11397 finishedWork,
11398 committedLanes,
11399 committedTransitions,
11400 endTime
11401 );
11402 finishedRoot = finishedWork.stateNode;
11403 finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
11404 try {
11405 runWithFiberInDEV(
11406 finishedWork,
11407 commitProfilerPostCommitImpl,
11408 finishedWork,
11409 finishedWork.alternate,
11410 commitStartTime,
11411 finishedRoot.passiveEffectDuration
11412 );
11413 } catch (error) {
11414 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11415 }
11416 } else
11417 recursivelyTraversePassiveMountEffects(
11418 finishedRoot,
11419 finishedWork,
11420 committedLanes,
11421 committedTransitions,
11422 endTime
11423 );
11424 break;
11425 case 31:
11426 flags = inHydratedSubtree;
11427 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11428 wasInHydratedSubtree = finishedWork.memoizedState;
11429 null !== prevProfilerEffectDuration && null === wasInHydratedSubtree ? (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11430 finishedWork,
11431 finishedWork.actualStartTime,
11432 endTime,
11433 prevProfilerEffectDuration
11434 )) : inHydratedSubtree = true) : inHydratedSubtree = false;
11435 recursivelyTraversePassiveMountEffects(
11436 finishedRoot,
11437 finishedWork,
11438 committedLanes,
11439 committedTransitions,
11440 endTime
11441 );
11442 inHydratedSubtree = flags;
11443 break;
11444 case 13:
11445 flags = inHydratedSubtree;
11446 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11447 wasInHydratedSubtree = finishedWork.memoizedState;
11448 null === prevProfilerEffectDuration || null === prevProfilerEffectDuration.dehydrated || null !== wasInHydratedSubtree && null !== wasInHydratedSubtree.dehydrated ? inHydratedSubtree = false : (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11449 finishedWork,
11450 finishedWork.actualStartTime,
11451 endTime,
11452 prevProfilerEffectDuration
11453 )) : inHydratedSubtree = true);
11454 recursivelyTraversePassiveMountEffects(
11455 finishedRoot,
11456 finishedWork,
11457 committedLanes,
11458 committedTransitions,
11459 endTime
11460 );
11461 inHydratedSubtree = flags;
11462 break;
11463 case 23:
11464 break;
11465 case 22:
11466 wasInHydratedSubtree = finishedWork.stateNode;
11467 prevProfilerEffectDuration = finishedWork.alternate;
11468 null !== finishedWork.memoizedState ? wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11469 finishedRoot,
11470 finishedWork,
11471 committedLanes,
11472 committedTransitions,
11473 endTime
11474 ) : recursivelyTraverseAtomicPassiveEffects(
11475 finishedRoot,
11476 finishedWork,
11477 committedLanes,
11478 committedTransitions,
11479 endTime
11480 ) : wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11481 finishedRoot,
11482 finishedWork,
11483 committedLanes,
11484 committedTransitions,
11485 endTime
11486 ) : (wasInHydratedSubtree._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11487 finishedRoot,
11488 finishedWork,
11489 committedLanes,
11490 committedTransitions,
11491 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== finishedWork.actualDuration && (null === finishedWork.alternate || finishedWork.alternate.child !== finishedWork.child),
11492 endTime
11493 ), (finishedWork.mode & ProfileMode) === NoMode || inHydratedSubtree || (finishedRoot = finishedWork.actualStartTime, 0 <= finishedRoot && 0.05 < endTime - finishedRoot && logComponentReappeared(finishedWork, finishedRoot, endTime), 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
11494 finishedWork,
11495 componentEffectStartTime,
11496 componentEffectEndTime
11497 )));
11498 flags & 2048 && commitOffscreenPassiveMountEffects(
11499 prevProfilerEffectDuration,
11500 finishedWork
11501 );
11502 break;
11503 case 24:
11504 recursivelyTraversePassiveMountEffects(
11505 finishedRoot,
11506 finishedWork,
11507 committedLanes,
11508 committedTransitions,
11509 endTime
11510 );
11511 flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11512 break;
11513 default:
11514 recursivelyTraversePassiveMountEffects(
11515 finishedRoot,
11516 finishedWork,
11517 committedLanes,
11518 committedTransitions,
11519 endTime
11520 );
11521 }
11522 if ((finishedWork.mode & ProfileMode) !== NoMode) {
11523 if (finishedRoot = !inHydratedSubtree && null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate)
11524 committedLanes = finishedWork.actualStartTime, 0 <= committedLanes && 0.05 < endTime - committedLanes && logComponentTrigger(
11525 finishedWork,
11526 committedLanes,
11527 endTime,
11528 "Mount"
11529 );
11530 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11531 finishedWork,
11532 componentEffectStartTime,
11533 componentEffectEndTime,
11534 componentEffectDuration,
11535 componentEffectErrors
11536 ), finishedRoot && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11537 finishedWork,
11538 componentEffectStartTime,
11539 componentEffectEndTime,
11540 "Mount"
11541 ));
11542 }
11543 popComponentEffectStart(prevEffectStart);
11544 popComponentEffectDuration(prevEffectDuration);
11545 componentEffectErrors = prevEffectErrors;
11546 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11547 alreadyWarnedForDeepEquality = prevDeepEquality;
11548 }
11549 function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11550 includeWorkInProgressEffects = includeWorkInProgressEffects && (0 !== (parentFiber.subtreeFlags & 10256) || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child));
11551 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11552 var nextSibling = parentFiber.sibling;
11553 reconnectPassiveEffects(
11554 finishedRoot,
11555 parentFiber,
11556 committedLanes,
11557 committedTransitions,
11558 includeWorkInProgressEffects,
11559 null !== nextSibling ? nextSibling.actualStartTime : endTime
11560 );
11561 parentFiber = nextSibling;
11562 }
11563 }
11564 function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11565 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality;
11566 includeWorkInProgressEffects && (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11567 finishedWork,
11568 finishedWork.actualStartTime,
11569 endTime,
11570 inHydratedSubtree,
11571 committedLanes
11572 );
11573 var flags = finishedWork.flags;
11574 switch (finishedWork.tag) {
11575 case 0:
11576 case 11:
11577 case 15:
11578 recursivelyTraverseReconnectPassiveEffects(
11579 finishedRoot,
11580 finishedWork,
11581 committedLanes,
11582 committedTransitions,
11583 includeWorkInProgressEffects,
11584 endTime
11585 );
11586 commitHookPassiveMountEffects(finishedWork, Passive);
11587 break;
11588 case 23:
11589 break;
11590 case 22:
11591 var _instance2 = finishedWork.stateNode;
11592 null !== finishedWork.memoizedState ? _instance2._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraverseReconnectPassiveEffects(
11593 finishedRoot,
11594 finishedWork,
11595 committedLanes,
11596 committedTransitions,
11597 includeWorkInProgressEffects,
11598 endTime
11599 ) : recursivelyTraverseAtomicPassiveEffects(
11600 finishedRoot,
11601 finishedWork,
11602 committedLanes,
11603 committedTransitions,
11604 endTime
11605 ) : (_instance2._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11606 finishedRoot,
11607 finishedWork,
11608 committedLanes,
11609 committedTransitions,
11610 includeWorkInProgressEffects,
11611 endTime
11612 ));
11613 includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
11614 finishedWork.alternate,
11615 finishedWork
11616 );
11617 break;
11618 case 24:
11619 recursivelyTraverseReconnectPassiveEffects(
11620 finishedRoot,
11621 finishedWork,
11622 committedLanes,
11623 committedTransitions,
11624 includeWorkInProgressEffects,
11625 endTime
11626 );
11627 includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11628 break;
11629 default:
11630 recursivelyTraverseReconnectPassiveEffects(
11631 finishedRoot,
11632 finishedWork,
11633 committedLanes,
11634 committedTransitions,
11635 includeWorkInProgressEffects,
11636 endTime
11637 );
11638 }
11639 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11640 finishedWork,
11641 componentEffectStartTime,
11642 componentEffectEndTime,
11643 componentEffectDuration,
11644 componentEffectErrors
11645 );
11646 popComponentEffectStart(prevEffectStart);
11647 popComponentEffectDuration(prevEffectDuration);
11648 componentEffectErrors = prevEffectErrors;
11649 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11650 alreadyWarnedForDeepEquality = prevDeepEquality;
11651 }
11652 function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, endTime$jscomp$0) {
11653 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11654 for (var child = parentFiber.child; null !== child; ) {
11655 parentFiber = child.sibling;
11656 var finishedRoot = finishedRoot$jscomp$0, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, endTime = null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0, prevDeepEquality = alreadyWarnedForDeepEquality;
11657 (child.mode & ProfileMode) !== NoMode && 0 < child.actualStartTime && 0 !== (child.flags & 1) && logComponentRender(
11658 child,
11659 child.actualStartTime,
11660 endTime,
11661 inHydratedSubtree,
11662 committedLanes
11663 );
11664 var flags = child.flags;
11665 switch (child.tag) {
11666 case 22:
11667 recursivelyTraverseAtomicPassiveEffects(
11668 finishedRoot,
11669 child,
11670 committedLanes,
11671 committedTransitions,
11672 endTime
11673 );
11674 flags & 2048 && commitOffscreenPassiveMountEffects(child.alternate, child);
11675 break;
11676 case 24:
11677 recursivelyTraverseAtomicPassiveEffects(
11678 finishedRoot,
11679 child,
11680 committedLanes,
11681 committedTransitions,
11682 endTime
11683 );
11684 flags & 2048 && commitCachePassiveMountEffect(child.alternate, child);
11685 break;
11686 default:
11687 recursivelyTraverseAtomicPassiveEffects(
11688 finishedRoot,
11689 child,
11690 committedLanes,
11691 committedTransitions,
11692 endTime
11693 );
11694 }
11695 alreadyWarnedForDeepEquality = prevDeepEquality;
11696 child = parentFiber;
11697 }
11698 }
11699 function recursivelyAccumulateSuspenseyCommit(parentFiber, committedLanes, suspendedState) {
11700 if (parentFiber.subtreeFlags & suspenseyCommitFlag)
11701 for (parentFiber = parentFiber.child; null !== parentFiber; )
11702 accumulateSuspenseyCommitOnFiber(
11703 parentFiber,
11704 committedLanes,
11705 suspendedState
11706 ), parentFiber = parentFiber.sibling;
11707 }
11708 function accumulateSuspenseyCommitOnFiber(fiber, committedLanes, suspendedState) {
11709 switch (fiber.tag) {
11710 case 26:
11711 recursivelyAccumulateSuspenseyCommit(
11712 fiber,
11713 committedLanes,
11714 suspendedState
11715 );
11716 fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState && suspendResource(
11717 suspendedState,
11718 currentHoistableRoot,
11719 fiber.memoizedState,
11720 fiber.memoizedProps
11721 );
11722 break;
11723 case 5:
11724 recursivelyAccumulateSuspenseyCommit(
11725 fiber,
11726 committedLanes,
11727 suspendedState
11728 );
11729 break;
11730 case 3:
11731 case 4:
11732 var previousHoistableRoot = currentHoistableRoot;
11733 currentHoistableRoot = getHoistableRoot(
11734 fiber.stateNode.containerInfo
11735 );
11736 recursivelyAccumulateSuspenseyCommit(
11737 fiber,
11738 committedLanes,
11739 suspendedState
11740 );
11741 currentHoistableRoot = previousHoistableRoot;
11742 break;
11743 case 22:
11744 null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(
11745 fiber,
11746 committedLanes,
11747 suspendedState
11748 ), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(
11749 fiber,
11750 committedLanes,
11751 suspendedState
11752 ));
11753 break;
11754 default:
11755 recursivelyAccumulateSuspenseyCommit(
11756 fiber,
11757 committedLanes,
11758 suspendedState
11759 );
11760 }
11761 }
11762 function detachAlternateSiblings(parentFiber) {
11763 var previousFiber = parentFiber.alternate;
11764 if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
11765 previousFiber.child = null;
11766 do
11767 previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
11768 while (null !== parentFiber);
11769 }
11770 }
11771 function recursivelyTraversePassiveUnmountEffects(parentFiber) {
11772 var deletions = parentFiber.deletions;
11773 if (0 !== (parentFiber.flags & 16)) {
11774 if (null !== deletions)
11775 for (var i = 0; i < deletions.length; i++) {
11776 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11777 nextEffect = childToDelete;
11778 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11779 childToDelete,
11780 parentFiber
11781 );
11782 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11783 childToDelete,
11784 componentEffectStartTime,
11785 componentEffectEndTime,
11786 "Unmount"
11787 );
11788 popComponentEffectStart(prevEffectStart);
11789 }
11790 detachAlternateSiblings(parentFiber);
11791 }
11792 if (parentFiber.subtreeFlags & 10256)
11793 for (parentFiber = parentFiber.child; null !== parentFiber; )
11794 commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
11795 }
11796 function commitPassiveUnmountOnFiber(finishedWork) {
11797 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11798 switch (finishedWork.tag) {
11799 case 0:
11800 case 11:
11801 case 15:
11802 recursivelyTraversePassiveUnmountEffects(finishedWork);
11803 finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
11804 finishedWork,
11805 finishedWork.return,
11806 Passive | HasEffect
11807 );
11808 break;
11809 case 3:
11810 var prevProfilerEffectDuration = pushNestedEffectDurations();
11811 recursivelyTraversePassiveUnmountEffects(finishedWork);
11812 finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevProfilerEffectDuration);
11813 break;
11814 case 12:
11815 prevProfilerEffectDuration = pushNestedEffectDurations();
11816 recursivelyTraversePassiveUnmountEffects(finishedWork);
11817 finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevProfilerEffectDuration);
11818 break;
11819 case 22:
11820 prevProfilerEffectDuration = finishedWork.stateNode;
11821 null !== finishedWork.memoizedState && prevProfilerEffectDuration._visibility & OffscreenPassiveEffectsConnected && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevProfilerEffectDuration._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11822 finishedWork,
11823 componentEffectStartTime,
11824 componentEffectEndTime,
11825 "Disconnect"
11826 )) : recursivelyTraversePassiveUnmountEffects(finishedWork);
11827 break;
11828 default:
11829 recursivelyTraversePassiveUnmountEffects(finishedWork);
11830 }
11831 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11832 finishedWork,
11833 componentEffectStartTime,
11834 componentEffectEndTime,
11835 componentEffectDuration,
11836 componentEffectErrors
11837 );
11838 popComponentEffectStart(prevEffectStart);
11839 popComponentEffectDuration(prevEffectDuration);
11840 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11841 componentEffectErrors = prevEffectErrors;
11842 }
11843 function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
11844 var deletions = parentFiber.deletions;
11845 if (0 !== (parentFiber.flags & 16)) {
11846 if (null !== deletions)
11847 for (var i = 0; i < deletions.length; i++) {
11848 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11849 nextEffect = childToDelete;
11850 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11851 childToDelete,
11852 parentFiber
11853 );
11854 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11855 childToDelete,
11856 componentEffectStartTime,
11857 componentEffectEndTime,
11858 "Unmount"
11859 );
11860 popComponentEffectStart(prevEffectStart);
11861 }
11862 detachAlternateSiblings(parentFiber);
11863 }
11864 for (parentFiber = parentFiber.child; null !== parentFiber; )
11865 disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
11866 }
11867 function disconnectPassiveEffect(finishedWork) {
11868 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11869 switch (finishedWork.tag) {
11870 case 0:
11871 case 11:
11872 case 15:
11873 commitHookPassiveUnmountEffects(
11874 finishedWork,
11875 finishedWork.return,
11876 Passive
11877 );
11878 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11879 break;
11880 case 22:
11881 var instance = finishedWork.stateNode;
11882 instance._visibility & OffscreenPassiveEffectsConnected && (instance._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
11883 break;
11884 default:
11885 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11886 }
11887 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11888 finishedWork,
11889 componentEffectStartTime,
11890 componentEffectEndTime,
11891 componentEffectDuration,
11892 componentEffectErrors
11893 );
11894 popComponentEffectStart(prevEffectStart);
11895 popComponentEffectDuration(prevEffectDuration);
11896 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11897 componentEffectErrors = prevEffectErrors;
11898 }
11899 function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor$jscomp$0) {
11900 for (; null !== nextEffect; ) {
11901 var fiber = nextEffect, current2 = fiber, nearestMountedAncestor = nearestMountedAncestor$jscomp$0, prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11902 switch (current2.tag) {
11903 case 0:
11904 case 11:
11905 case 15:
11906 commitHookPassiveUnmountEffects(
11907 current2,
11908 nearestMountedAncestor,
11909 Passive
11910 );
11911 break;
11912 case 23:
11913 case 22:
11914 null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (nearestMountedAncestor = current2.memoizedState.cachePool.pool, null != nearestMountedAncestor && retainCache(nearestMountedAncestor));
11915 break;
11916 case 24:
11917 releaseCache(current2.memoizedState.cache);
11918 }
11919 (current2.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11920 current2,
11921 componentEffectStartTime,
11922 componentEffectEndTime,
11923 componentEffectDuration,
11924 componentEffectErrors
11925 );
11926 popComponentEffectStart(prevEffectStart);
11927 popComponentEffectDuration(prevEffectDuration);
11928 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11929 componentEffectErrors = prevEffectErrors;
11930 current2 = fiber.child;
11931 if (null !== current2) current2.return = fiber, nextEffect = current2;
11932 else
11933 a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
11934 current2 = nextEffect;
11935 prevEffectStart = current2.sibling;
11936 prevEffectDuration = current2.return;
11937 detachFiberAfterEffects(current2);
11938 if (current2 === fiber) {
11939 nextEffect = null;
11940 break a;
11941 }
11942 if (null !== prevEffectStart) {
11943 prevEffectStart.return = prevEffectDuration;
11944 nextEffect = prevEffectStart;
11945 break a;
11946 }
11947 nextEffect = prevEffectDuration;
11948 }
11949 }
11950 }
11951 function onCommitRoot() {
11952 commitHooks.forEach(function(commitHook) {
11953 return commitHook();
11954 });
11955 }
11956 function isConcurrentActEnvironment() {
11957 var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
11958 isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
11959 "The current testing environment is not configured to support act(...)"
11960 );
11961 return isReactActEnvironmentGlobal;
11962 }
11963 function requestUpdateLane(fiber) {
11964 if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
11965 return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
11966 var transition = ReactSharedInternals.T;
11967 return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), requestTransitionLane()) : resolveUpdatePriority();
11968 }
11969 function requestDeferredLane() {
11970 if (0 === workInProgressDeferredLane)
11971 if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
11972 var lane = nextTransitionDeferredLane;
11973 nextTransitionDeferredLane <<= 1;
11974 0 === (nextTransitionDeferredLane & 3932160) && (nextTransitionDeferredLane = 262144);
11975 workInProgressDeferredLane = lane;
11976 } else workInProgressDeferredLane = 536870912;
11977 lane = suspenseHandlerStackCursor.current;
11978 null !== lane && (lane.flags |= 32);
11979 return workInProgressDeferredLane;
11980 }
11981 function scheduleUpdateOnFiber(root2, fiber, lane) {
11982 isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
11983 isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
11984 if (root2 === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
11985 prepareFreshStack(root2, 0), markRootSuspended(
11986 root2,
11987 workInProgressRootRenderLanes,
11988 workInProgressDeferredLane,
11989 false
11990 );
11991 markRootUpdated$1(root2, lane);
11992 if ((executionContext & RenderContext) !== NoContext && root2 === workInProgressRoot) {
11993 if (isRendering)
11994 switch (fiber.tag) {
11995 case 0:
11996 case 11:
11997 case 15:
11998 root2 = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
11999 didWarnAboutUpdateInRenderForAnotherComponent.has(root2) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root2), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
12000 "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
12001 fiber,
12002 root2,
12003 root2
12004 ));
12005 break;
12006 case 1:
12007 didWarnAboutUpdateInRender || (console.error(
12008 "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
12009 ), didWarnAboutUpdateInRender = true);
12010 }
12011 } else
12012 isDevToolsPresent && addFiberToLanesMap(root2, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root2 === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
12013 root2,
12014 workInProgressRootRenderLanes,
12015 workInProgressDeferredLane,
12016 false
12017 )), ensureRootIsScheduled(root2);
12018 }
12019 function performWorkOnRoot(root2, lanes, forceSync) {
12020 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
12021 throw Error("Should not already be working.");
12022 if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
12023 var yieldedFiber = workInProgress, yieldEndTime = now$1();
12024 switch (yieldReason) {
12025 case SuspendedOnImmediate:
12026 case SuspendedOnData:
12027 var startTime = yieldStartTime;
12028 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
12029 console.timeStamp.bind(
12030 console,
12031 "Suspended",
12032 startTime,
12033 yieldEndTime,
12034 COMPONENTS_TRACK,
12035 void 0,
12036 "primary-light"
12037 )
12038 ) : console.timeStamp(
12039 "Suspended",
12040 startTime,
12041 yieldEndTime,
12042 COMPONENTS_TRACK,
12043 void 0,
12044 "primary-light"
12045 ));
12046 break;
12047 case SuspendedOnAction:
12048 startTime = yieldStartTime;
12049 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
12050 console.timeStamp.bind(
12051 console,
12052 "Action",
12053 startTime,
12054 yieldEndTime,
12055 COMPONENTS_TRACK,
12056 void 0,
12057 "primary-light"
12058 )
12059 ) : console.timeStamp(
12060 "Action",
12061 startTime,
12062 yieldEndTime,
12063 COMPONENTS_TRACK,
12064 void 0,
12065 "primary-light"
12066 ));
12067 break;
12068 default:
12069 supportsUserTiming && (yieldedFiber = yieldEndTime - yieldStartTime, 3 > yieldedFiber || console.timeStamp(
12070 "Blocked",
12071 yieldStartTime,
12072 yieldEndTime,
12073 COMPONENTS_TRACK,
12074 void 0,
12075 5 > yieldedFiber ? "primary-light" : 10 > yieldedFiber ? "primary" : 100 > yieldedFiber ? "primary-dark" : "error"
12076 ));
12077 }
12078 }
12079 startTime = (forceSync = !forceSync && 0 === (lanes & 127) && 0 === (lanes & root2.expiredLanes) || checkIfRootIsPrerendering(root2, lanes)) ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes, true);
12080 var renderWasConcurrent = forceSync;
12081 do {
12082 if (startTime === RootInProgress) {
12083 workInProgressRootIsPrerendering && !forceSync && markRootSuspended(root2, lanes, 0, false);
12084 lanes = workInProgressSuspendedReason;
12085 yieldStartTime = now();
12086 yieldReason = lanes;
12087 break;
12088 } else {
12089 yieldedFiber = now$1();
12090 yieldEndTime = root2.current.alternate;
12091 if (renderWasConcurrent && !isRenderConsistentWithExternalStores(yieldEndTime)) {
12092 setCurrentTrackFromLanes(lanes);
12093 yieldEndTime = renderStartTime;
12094 startTime = yieldedFiber;
12095 !supportsUserTiming || startTime <= yieldEndTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
12096 console.timeStamp.bind(
12097 console,
12098 "Teared Render",
12099 yieldEndTime,
12100 startTime,
12101 currentTrack,
12102 LANES_TRACK_GROUP,
12103 "error"
12104 )
12105 ) : console.timeStamp(
12106 "Teared Render",
12107 yieldEndTime,
12108 startTime,
12109 currentTrack,
12110 LANES_TRACK_GROUP,
12111 "error"
12112 ));
12113 finalizeRender(lanes, yieldedFiber);
12114 startTime = renderRootSync(root2, lanes, false);
12115 renderWasConcurrent = false;
12116 continue;
12117 }
12118 if (startTime === RootErrored) {
12119 renderWasConcurrent = lanes;
12120 if (root2.errorRecoveryDisabledLanes & renderWasConcurrent)
12121 var errorRetryLanes = 0;
12122 else
12123 errorRetryLanes = root2.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
12124 if (0 !== errorRetryLanes) {
12125 setCurrentTrackFromLanes(lanes);
12126 logErroredRenderPhase(
12127 renderStartTime,
12128 yieldedFiber,
12129 lanes,
12130 workInProgressUpdateTask
12131 );
12132 finalizeRender(lanes, yieldedFiber);
12133 lanes = errorRetryLanes;
12134 a: {
12135 yieldedFiber = root2;
12136 startTime = renderWasConcurrent;
12137 renderWasConcurrent = workInProgressRootConcurrentErrors;
12138 var wasRootDehydrated = yieldedFiber.current.memoizedState.isDehydrated;
12139 wasRootDehydrated && (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |= 256);
12140 errorRetryLanes = renderRootSync(
12141 yieldedFiber,
12142 errorRetryLanes,
12143 false
12144 );
12145 if (errorRetryLanes !== RootErrored) {
12146 if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
12147 yieldedFiber.errorRecoveryDisabledLanes |= startTime;
12148 workInProgressRootInterleavedUpdatedLanes |= startTime;
12149 startTime = RootSuspendedWithDelay;
12150 break a;
12151 }
12152 yieldedFiber = workInProgressRootRecoverableErrors;
12153 workInProgressRootRecoverableErrors = renderWasConcurrent;
12154 null !== yieldedFiber && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = yieldedFiber : workInProgressRootRecoverableErrors.push.apply(
12155 workInProgressRootRecoverableErrors,
12156 yieldedFiber
12157 ));
12158 }
12159 startTime = errorRetryLanes;
12160 }
12161 renderWasConcurrent = false;
12162 if (startTime !== RootErrored) continue;
12163 else yieldedFiber = now$1();
12164 }
12165 }
12166 if (startTime === RootFatalErrored) {
12167 setCurrentTrackFromLanes(lanes);
12168 logErroredRenderPhase(
12169 renderStartTime,
12170 yieldedFiber,
12171 lanes,
12172 workInProgressUpdateTask
12173 );
12174 finalizeRender(lanes, yieldedFiber);
12175 prepareFreshStack(root2, 0);
12176 markRootSuspended(root2, lanes, 0, true);
12177 break;
12178 }
12179 a: {
12180 forceSync = root2;
12181 switch (startTime) {
12182 case RootInProgress:
12183 case RootFatalErrored:
12184 throw Error("Root did not complete. This is a bug in React.");
12185 case RootSuspendedWithDelay:
12186 if ((lanes & 4194048) !== lanes) break;
12187 case RootSuspendedAtTheShell:
12188 setCurrentTrackFromLanes(lanes);
12189 logSuspendedRenderPhase(
12190 renderStartTime,
12191 yieldedFiber,
12192 lanes,
12193 workInProgressUpdateTask
12194 );
12195 finalizeRender(lanes, yieldedFiber);
12196 yieldEndTime = lanes;
12197 0 !== (yieldEndTime & 127) ? blockingSuspendedTime = yieldedFiber : 0 !== (yieldEndTime & 4194048) && (transitionSuspendedTime = yieldedFiber);
12198 markRootSuspended(
12199 forceSync,
12200 lanes,
12201 workInProgressDeferredLane,
12202 !workInProgressRootDidSkipSuspendedSiblings
12203 );
12204 break a;
12205 case RootErrored:
12206 workInProgressRootRecoverableErrors = null;
12207 break;
12208 case RootSuspended:
12209 case RootCompleted:
12210 break;
12211 default:
12212 throw Error("Unknown root exit status.");
12213 }
12214 if (null !== ReactSharedInternals.actQueue)
12215 commitRoot(
12216 forceSync,
12217 yieldEndTime,
12218 lanes,
12219 workInProgressRootRecoverableErrors,
12220 workInProgressTransitions,
12221 workInProgressRootDidIncludeRecursiveRenderUpdate,
12222 workInProgressDeferredLane,
12223 workInProgressRootInterleavedUpdatedLanes,
12224 workInProgressSuspendedRetryLanes,
12225 startTime,
12226 null,
12227 null,
12228 renderStartTime,
12229 yieldedFiber
12230 );
12231 else {
12232 if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
12233 markRootSuspended(
12234 forceSync,
12235 lanes,
12236 workInProgressDeferredLane,
12237 !workInProgressRootDidSkipSuspendedSiblings
12238 );
12239 if (0 !== getNextLanes(forceSync, 0, true)) break a;
12240 pendingEffectsLanes = lanes;
12241 forceSync.timeoutHandle = scheduleTimeout(
12242 commitRootWhenReady.bind(
12243 null,
12244 forceSync,
12245 yieldEndTime,
12246 workInProgressRootRecoverableErrors,
12247 workInProgressTransitions,
12248 workInProgressRootDidIncludeRecursiveRenderUpdate,
12249 lanes,
12250 workInProgressDeferredLane,
12251 workInProgressRootInterleavedUpdatedLanes,
12252 workInProgressSuspendedRetryLanes,
12253 workInProgressRootDidSkipSuspendedSiblings,
12254 startTime,
12255 "Throttled",
12256 renderStartTime,
12257 yieldedFiber
12258 ),
12259 renderWasConcurrent
12260 );
12261 break a;
12262 }
12263 commitRootWhenReady(
12264 forceSync,
12265 yieldEndTime,
12266 workInProgressRootRecoverableErrors,
12267 workInProgressTransitions,
12268 workInProgressRootDidIncludeRecursiveRenderUpdate,
12269 lanes,
12270 workInProgressDeferredLane,
12271 workInProgressRootInterleavedUpdatedLanes,
12272 workInProgressSuspendedRetryLanes,
12273 workInProgressRootDidSkipSuspendedSiblings,
12274 startTime,
12275 null,
12276 renderStartTime,
12277 yieldedFiber
12278 );
12279 }
12280 }
12281 }
12282 break;
12283 } while (1);
12284 ensureRootIsScheduled(root2);
12285 }
12286 function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
12287 root2.timeoutHandle = noTimeout;
12288 var subtreeFlags = finishedWork.subtreeFlags, suspendedState = null;
12289 if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) {
12290 if (suspendedState = {
12291 stylesheets: null,
12292 count: 0,
12293 imgCount: 0,
12294 imgBytes: 0,
12295 suspenseyImages: [],
12296 waitingForImages: true,
12297 waitingForViewTransition: false,
12298 unsuspend: noop$1
12299 }, accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState), subtreeFlags = (lanes & 62914560) === lanes ? globalMostRecentFallbackTime - now$1() : (lanes & 4194048) === lanes ? globalMostRecentTransitionTime - now$1() : 0, subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags), null !== subtreeFlags) {
12300 pendingEffectsLanes = lanes;
12301 root2.cancelPendingCommit = subtreeFlags(
12302 commitRoot.bind(
12303 null,
12304 root2,
12305 finishedWork,
12306 lanes,
12307 recoverableErrors,
12308 transitions,
12309 didIncludeRenderPhaseUpdate,
12310 spawnedLane,
12311 updatedLanes,
12312 suspendedRetryLanes,
12313 exitStatus,
12314 suspendedState,
12315 suspendedState.waitingForViewTransition ? "Waiting for the previous Animation" : 0 < suspendedState.count ? 0 < suspendedState.imgCount ? "Suspended on CSS and Images" : "Suspended on CSS" : 1 === suspendedState.imgCount ? "Suspended on an Image" : 0 < suspendedState.imgCount ? "Suspended on Images" : null,
12316 completedRenderStartTime,
12317 completedRenderEndTime
12318 )
12319 );
12320 markRootSuspended(
12321 root2,
12322 lanes,
12323 spawnedLane,
12324 !didSkipSuspendedSiblings
12325 );
12326 return;
12327 }
12328 }
12329 commitRoot(
12330 root2,
12331 finishedWork,
12332 lanes,
12333 recoverableErrors,
12334 transitions,
12335 didIncludeRenderPhaseUpdate,
12336 spawnedLane,
12337 updatedLanes,
12338 suspendedRetryLanes,
12339 exitStatus,
12340 suspendedState,
12341 suspendedCommitReason,
12342 completedRenderStartTime,
12343 completedRenderEndTime
12344 );
12345 }
12346 function isRenderConsistentWithExternalStores(finishedWork) {
12347 for (var node = finishedWork; ; ) {
12348 var tag = node.tag;
12349 if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
12350 for (var i = 0; i < tag.length; i++) {
12351 var check = tag[i], getSnapshot = check.getSnapshot;
12352 check = check.value;
12353 try {
12354 if (!objectIs(getSnapshot(), check)) return false;
12355 } catch (error) {
12356 return false;
12357 }
12358 }
12359 tag = node.child;
12360 if (node.subtreeFlags & 16384 && null !== tag)
12361 tag.return = node, node = tag;
12362 else {
12363 if (node === finishedWork) break;
12364 for (; null === node.sibling; ) {
12365 if (null === node.return || node.return === finishedWork) return true;
12366 node = node.return;
12367 }
12368 node.sibling.return = node.return;
12369 node = node.sibling;
12370 }
12371 }
12372 return true;
12373 }
12374 function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
12375 suspendedLanes &= ~workInProgressRootPingedLanes;
12376 suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
12377 root2.suspendedLanes |= suspendedLanes;
12378 root2.pingedLanes &= ~suspendedLanes;
12379 didAttemptEntireTree && (root2.warmLanes |= suspendedLanes);
12380 didAttemptEntireTree = root2.expirationTimes;
12381 for (var lanes = suspendedLanes; 0 < lanes; ) {
12382 var index = 31 - clz32(lanes), lane = 1 << index;
12383 didAttemptEntireTree[index] = -1;
12384 lanes &= ~lane;
12385 }
12386 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
12387 }
12388 function flushSyncWork$1() {
12389 return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
12390 }
12391 function resetWorkInProgressStack() {
12392 if (null !== workInProgress) {
12393 if (workInProgressSuspendedReason === NotSuspended)
12394 var interruptedWork = workInProgress.return;
12395 else
12396 interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState$1 = null, thenableIndexCounter$1 = 0, interruptedWork = workInProgress;
12397 for (; null !== interruptedWork; )
12398 unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
12399 workInProgress = null;
12400 }
12401 }
12402 function finalizeRender(lanes, finalizationTime) {
12403 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
12404 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
12405 0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);
12406 0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);
12407 }
12408 function prepareFreshStack(root2, lanes) {
12409 supportsUserTiming && (console.timeStamp(
12410 "Blocking Track",
12411 3e-3,
12412 3e-3,
12413 "Blocking",
12414 LANES_TRACK_GROUP,
12415 "primary-light"
12416 ), console.timeStamp(
12417 "Transition Track",
12418 3e-3,
12419 3e-3,
12420 "Transition",
12421 LANES_TRACK_GROUP,
12422 "primary-light"
12423 ), console.timeStamp(
12424 "Suspense Track",
12425 3e-3,
12426 3e-3,
12427 "Suspense",
12428 LANES_TRACK_GROUP,
12429 "primary-light"
12430 ), console.timeStamp(
12431 "Idle Track",
12432 3e-3,
12433 3e-3,
12434 "Idle",
12435 LANES_TRACK_GROUP,
12436 "primary-light"
12437 ));
12438 var previousRenderStartTime = renderStartTime;
12439 renderStartTime = now();
12440 if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
12441 setCurrentTrackFromLanes(workInProgressRootRenderLanes);
12442 if (workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootSuspendedWithDelay)
12443 logSuspendedRenderPhase(
12444 previousRenderStartTime,
12445 renderStartTime,
12446 lanes,
12447 workInProgressUpdateTask
12448 );
12449 else {
12450 var endTime = renderStartTime, debugTask = workInProgressUpdateTask;
12451 if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {
12452 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", label = (lanes & 536870912) === lanes ? "Prewarm" : (lanes & 201326741) === lanes ? "Interrupted Hydration" : "Interrupted Render";
12453 debugTask ? debugTask.run(
12454 console.timeStamp.bind(
12455 console,
12456 label,
12457 previousRenderStartTime,
12458 endTime,
12459 currentTrack,
12460 LANES_TRACK_GROUP,
12461 color
12462 )
12463 ) : console.timeStamp(
12464 label,
12465 previousRenderStartTime,
12466 endTime,
12467 currentTrack,
12468 LANES_TRACK_GROUP,
12469 color
12470 );
12471 }
12472 }
12473 finalizeRender(workInProgressRootRenderLanes, renderStartTime);
12474 }
12475 previousRenderStartTime = workInProgressUpdateTask;
12476 workInProgressUpdateTask = null;
12477 if (0 !== (lanes & 127)) {
12478 workInProgressUpdateTask = blockingUpdateTask;
12479 debugTask = 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime ? blockingClampTime : blockingUpdateTime;
12480 endTime = 0 <= blockingEventTime && blockingEventTime < blockingClampTime ? blockingClampTime : blockingEventTime;
12481 color = 0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;
12482 0 <= blockingSuspendedTime ? (setCurrentTrackFromLanes(2), logSuspendedWithDelayPhase(
12483 blockingSuspendedTime,
12484 color,
12485 lanes,
12486 previousRenderStartTime
12487 )) : 0 !== (animatingLanes & 127) && (setCurrentTrackFromLanes(2), logAnimatingPhase(blockingClampTime, color, animatingTask));
12488 previousRenderStartTime = debugTask;
12489 var eventTime = endTime, eventType = blockingEventType, eventIsRepeat = 0 < blockingEventRepeatTime, isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE, isPingedUpdate = blockingUpdateType === PINGED_UPDATE;
12490 debugTask = renderStartTime;
12491 endTime = blockingUpdateTask;
12492 color = blockingUpdateMethodName;
12493 label = blockingUpdateComponentName;
12494 if (supportsUserTiming) {
12495 currentTrack = "Blocking";
12496 0 < previousRenderStartTime ? previousRenderStartTime > debugTask && (previousRenderStartTime = debugTask) : previousRenderStartTime = debugTask;
12497 0 < eventTime ? eventTime > previousRenderStartTime && (eventTime = previousRenderStartTime) : eventTime = previousRenderStartTime;
12498 if (null !== eventType && previousRenderStartTime > eventTime) {
12499 var color$jscomp$0 = eventIsRepeat ? "secondary-light" : "warning";
12500 endTime ? endTime.run(
12501 console.timeStamp.bind(
12502 console,
12503 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12504 eventTime,
12505 previousRenderStartTime,
12506 currentTrack,
12507 LANES_TRACK_GROUP,
12508 color$jscomp$0
12509 )
12510 ) : console.timeStamp(
12511 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12512 eventTime,
12513 previousRenderStartTime,
12514 currentTrack,
12515 LANES_TRACK_GROUP,
12516 color$jscomp$0
12517 );
12518 }
12519 debugTask > previousRenderStartTime && (eventTime = isSpawnedUpdate ? "error" : (lanes & 738197653) === lanes ? "tertiary-light" : "primary-light", isSpawnedUpdate = isPingedUpdate ? "Promise Resolved" : isSpawnedUpdate ? "Cascading Update" : 5 < debugTask - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != label && isPingedUpdate.push(["Component name", label]), null != color && isPingedUpdate.push(["Method name", color]), previousRenderStartTime = {
12520 start: previousRenderStartTime,
12521 end: debugTask,
12522 detail: {
12523 devtools: {
12524 properties: isPingedUpdate,
12525 track: currentTrack,
12526 trackGroup: LANES_TRACK_GROUP,
12527 color: eventTime
12528 }
12529 }
12530 }, endTime ? endTime.run(
12531 performance.measure.bind(
12532 performance,
12533 isSpawnedUpdate,
12534 previousRenderStartTime
12535 )
12536 ) : performance.measure(isSpawnedUpdate, previousRenderStartTime));
12537 }
12538 blockingUpdateTime = -1.1;
12539 blockingUpdateType = 0;
12540 blockingUpdateComponentName = blockingUpdateMethodName = null;
12541 blockingSuspendedTime = -1.1;
12542 blockingEventRepeatTime = blockingEventTime;
12543 blockingEventTime = -1.1;
12544 blockingClampTime = now();
12545 }
12546 0 !== (lanes & 4194048) && (workInProgressUpdateTask = transitionUpdateTask, debugTask = 0 <= transitionStartTime && transitionStartTime < transitionClampTime ? transitionClampTime : transitionStartTime, previousRenderStartTime = 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime ? transitionClampTime : transitionUpdateTime, endTime = 0 <= transitionEventTime && transitionEventTime < transitionClampTime ? transitionClampTime : transitionEventTime, color = 0 <= endTime ? endTime : 0 <= previousRenderStartTime ? previousRenderStartTime : renderStartTime, 0 <= transitionSuspendedTime ? (setCurrentTrackFromLanes(256), logSuspendedWithDelayPhase(
12547 transitionSuspendedTime,
12548 color,
12549 lanes,
12550 workInProgressUpdateTask
12551 )) : 0 !== (animatingLanes & 4194048) && (setCurrentTrackFromLanes(256), logAnimatingPhase(transitionClampTime, color, animatingTask)), isPingedUpdate = endTime, eventTime = transitionEventType, eventType = 0 < transitionEventRepeatTime, eventIsRepeat = transitionUpdateType === PINGED_UPDATE, color = renderStartTime, endTime = transitionUpdateTask, label = transitionUpdateMethodName, isSpawnedUpdate = transitionUpdateComponentName, supportsUserTiming && (currentTrack = "Transition", 0 < previousRenderStartTime ? previousRenderStartTime > color && (previousRenderStartTime = color) : previousRenderStartTime = color, 0 < debugTask ? debugTask > previousRenderStartTime && (debugTask = previousRenderStartTime) : debugTask = previousRenderStartTime, 0 < isPingedUpdate ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask) : isPingedUpdate = debugTask, debugTask > isPingedUpdate && null !== eventTime && (color$jscomp$0 = eventType ? "secondary-light" : "warning", endTime ? endTime.run(
12552 console.timeStamp.bind(
12553 console,
12554 eventType ? "Consecutive" : "Event: " + eventTime,
12555 isPingedUpdate,
12556 debugTask,
12557 currentTrack,
12558 LANES_TRACK_GROUP,
12559 color$jscomp$0
12560 )
12561 ) : console.timeStamp(
12562 eventType ? "Consecutive" : "Event: " + eventTime,
12563 isPingedUpdate,
12564 debugTask,
12565 currentTrack,
12566 LANES_TRACK_GROUP,
12567 color$jscomp$0
12568 )), previousRenderStartTime > debugTask && (endTime ? endTime.run(
12569 console.timeStamp.bind(
12570 console,
12571 "Action",
12572 debugTask,
12573 previousRenderStartTime,
12574 currentTrack,
12575 LANES_TRACK_GROUP,
12576 "primary-dark"
12577 )
12578 ) : console.timeStamp(
12579 "Action",
12580 debugTask,
12581 previousRenderStartTime,
12582 currentTrack,
12583 LANES_TRACK_GROUP,
12584 "primary-dark"
12585 )), color > previousRenderStartTime && (debugTask = eventIsRepeat ? "Promise Resolved" : 5 < color - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != isSpawnedUpdate && isPingedUpdate.push(["Component name", isSpawnedUpdate]), null != label && isPingedUpdate.push(["Method name", label]), previousRenderStartTime = {
12586 start: previousRenderStartTime,
12587 end: color,
12588 detail: {
12589 devtools: {
12590 properties: isPingedUpdate,
12591 track: currentTrack,
12592 trackGroup: LANES_TRACK_GROUP,
12593 color: "primary-light"
12594 }
12595 }
12596 }, endTime ? endTime.run(
12597 performance.measure.bind(
12598 performance,
12599 debugTask,
12600 previousRenderStartTime
12601 )
12602 ) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now());
12603 0 !== (lanes & 62914560) && 0 !== (animatingLanes & 62914560) && (setCurrentTrackFromLanes(4194304), logAnimatingPhase(retryClampTime, renderStartTime, animatingTask));
12604 0 !== (lanes & 2080374784) && 0 !== (animatingLanes & 2080374784) && (setCurrentTrackFromLanes(268435456), logAnimatingPhase(idleClampTime, renderStartTime, animatingTask));
12605 previousRenderStartTime = root2.timeoutHandle;
12606 previousRenderStartTime !== noTimeout && (root2.timeoutHandle = noTimeout, cancelTimeout(previousRenderStartTime));
12607 previousRenderStartTime = root2.cancelPendingCommit;
12608 null !== previousRenderStartTime && (root2.cancelPendingCommit = null, previousRenderStartTime());
12609 pendingEffectsLanes = 0;
12610 resetWorkInProgressStack();
12611 workInProgressRoot = root2;
12612 workInProgress = previousRenderStartTime = createWorkInProgress(
12613 root2.current,
12614 null
12615 );
12616 workInProgressRootRenderLanes = lanes;
12617 workInProgressSuspendedReason = NotSuspended;
12618 workInProgressThrownValue = null;
12619 workInProgressRootDidSkipSuspendedSiblings = false;
12620 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes);
12621 workInProgressRootDidAttachPingListener = false;
12622 workInProgressRootExitStatus = RootInProgress;
12623 workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
12624 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
12625 workInProgressRootDidIncludeRecursiveRenderUpdate = false;
12626 0 !== (lanes & 8) && (lanes |= lanes & 32);
12627 endTime = root2.entangledLanes;
12628 if (0 !== endTime)
12629 for (root2 = root2.entanglements, endTime &= lanes; 0 < endTime; )
12630 debugTask = 31 - clz32(endTime), color = 1 << debugTask, lanes |= root2[debugTask], endTime &= ~color;
12631 entangledRenderLanes = lanes;
12632 finishQueueingConcurrentUpdates();
12633 root2 = getCurrentTime();
12634 1e3 < root2 - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = root2);
12635 ReactStrictModeWarnings.discardPendingWarnings();
12636 return previousRenderStartTime;
12637 }
12638 function handleThrow(root2, thrownValue) {
12639 currentlyRenderingFiber = null;
12640 ReactSharedInternals.H = ContextOnlyDispatcher;
12641 ReactSharedInternals.getCurrentStack = null;
12642 isRendering = false;
12643 current = null;
12644 thrownValue === SuspenseException || thrownValue === SuspenseActionException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnImmediate) : thrownValue === SuspenseyCommitException ? (thrownValue = getSuspendedThenable(), workInProgressSuspendedReason = SuspendedOnInstance) : workInProgressSuspendedReason = thrownValue === SelectiveHydrationException ? SuspendedOnHydration : null !== thrownValue && "object" === typeof thrownValue && "function" === typeof thrownValue.then ? SuspendedOnDeprecatedThrowPromise : SuspendedOnError;
12645 workInProgressThrownValue = thrownValue;
12646 var erroredWork = workInProgress;
12647 null === erroredWork ? (workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
12648 root2,
12649 createCapturedValueAtFiber(thrownValue, root2.current)
12650 )) : erroredWork.mode & ProfileMode && stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
12651 }
12652 function shouldRemainOnPreviousScreen() {
12653 var handler = suspenseHandlerStackCursor.current;
12654 return null === handler ? true : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null === shellBoundary ? true : false : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || 0 !== (workInProgressRootRenderLanes & 536870912) ? handler === shellBoundary : false;
12655 }
12656 function pushDispatcher() {
12657 var prevDispatcher = ReactSharedInternals.H;
12658 ReactSharedInternals.H = ContextOnlyDispatcher;
12659 return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
12660 }
12661 function pushAsyncDispatcher() {
12662 var prevAsyncDispatcher = ReactSharedInternals.A;
12663 ReactSharedInternals.A = DefaultAsyncDispatcher;
12664 return prevAsyncDispatcher;
12665 }
12666 function markRenderDerivedCause(fiber) {
12667 null === workInProgressUpdateTask && (workInProgressUpdateTask = null == fiber._debugTask ? null : fiber._debugTask);
12668 }
12669 function renderDidSuspendDelayIfPossible() {
12670 workInProgressRootExitStatus = RootSuspendedWithDelay;
12671 workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
12672 0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
12673 workInProgressRoot,
12674 workInProgressRootRenderLanes,
12675 workInProgressDeferredLane,
12676 false
12677 );
12678 }
12679 function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
12680 var prevExecutionContext = executionContext;
12681 executionContext |= RenderContext;
12682 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12683 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12684 if (isDevToolsPresent) {
12685 var memoizedUpdaters = root2.memoizedUpdaters;
12686 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12687 movePendingFibersToMemoized(root2, lanes);
12688 }
12689 workInProgressTransitions = null;
12690 prepareFreshStack(root2, lanes);
12691 }
12692 lanes = false;
12693 memoizedUpdaters = workInProgressRootExitStatus;
12694 a: do
12695 try {
12696 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress) {
12697 var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
12698 switch (workInProgressSuspendedReason) {
12699 case SuspendedOnHydration:
12700 resetWorkInProgressStack();
12701 memoizedUpdaters = RootSuspendedAtTheShell;
12702 break a;
12703 case SuspendedOnImmediate:
12704 case SuspendedOnData:
12705 case SuspendedOnAction:
12706 case SuspendedOnDeprecatedThrowPromise:
12707 null === suspenseHandlerStackCursor.current && (lanes = true);
12708 var reason = workInProgressSuspendedReason;
12709 workInProgressSuspendedReason = NotSuspended;
12710 workInProgressThrownValue = null;
12711 throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12712 if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
12713 memoizedUpdaters = RootInProgress;
12714 break a;
12715 }
12716 break;
12717 default:
12718 reason = workInProgressSuspendedReason, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12719 }
12720 }
12721 workLoopSync();
12722 memoizedUpdaters = workInProgressRootExitStatus;
12723 break;
12724 } catch (thrownValue$8) {
12725 handleThrow(root2, thrownValue$8);
12726 }
12727 while (1);
12728 lanes && root2.shellSuspendCounter++;
12729 resetContextDependencies();
12730 executionContext = prevExecutionContext;
12731 ReactSharedInternals.H = prevDispatcher;
12732 ReactSharedInternals.A = prevAsyncDispatcher;
12733 null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
12734 return memoizedUpdaters;
12735 }
12736 function workLoopSync() {
12737 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
12738 }
12739 function renderRootConcurrent(root2, lanes) {
12740 var prevExecutionContext = executionContext;
12741 executionContext |= RenderContext;
12742 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12743 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12744 if (isDevToolsPresent) {
12745 var memoizedUpdaters = root2.memoizedUpdaters;
12746 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12747 movePendingFibersToMemoized(root2, lanes);
12748 }
12749 workInProgressTransitions = null;
12750 workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
12751 prepareFreshStack(root2, lanes);
12752 } else
12753 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
12754 root2,
12755 lanes
12756 );
12757 a: do
12758 try {
12759 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress)
12760 b: switch (lanes = workInProgress, memoizedUpdaters = workInProgressThrownValue, workInProgressSuspendedReason) {
12761 case SuspendedOnError:
12762 workInProgressSuspendedReason = NotSuspended;
12763 workInProgressThrownValue = null;
12764 throwAndUnwindWorkLoop(
12765 root2,
12766 lanes,
12767 memoizedUpdaters,
12768 SuspendedOnError
12769 );
12770 break;
12771 case SuspendedOnData:
12772 case SuspendedOnAction:
12773 if (isThenableResolved(memoizedUpdaters)) {
12774 workInProgressSuspendedReason = NotSuspended;
12775 workInProgressThrownValue = null;
12776 replaySuspendedUnitOfWork(lanes);
12777 break;
12778 }
12779 lanes = function() {
12780 workInProgressSuspendedReason !== SuspendedOnData && workInProgressSuspendedReason !== SuspendedOnAction || workInProgressRoot !== root2 || (workInProgressSuspendedReason = SuspendedAndReadyToContinue);
12781 ensureRootIsScheduled(root2);
12782 };
12783 memoizedUpdaters.then(lanes, lanes);
12784 break a;
12785 case SuspendedOnImmediate:
12786 workInProgressSuspendedReason = SuspendedAndReadyToContinue;
12787 break a;
12788 case SuspendedOnInstance:
12789 workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;
12790 break a;
12791 case SuspendedAndReadyToContinue:
12792 isThenableResolved(memoizedUpdaters) ? (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(
12793 root2,
12794 lanes,
12795 memoizedUpdaters,
12796 SuspendedAndReadyToContinue
12797 ));
12798 break;
12799 case SuspendedOnInstanceAndReadyToContinue:
12800 var resource = null;
12801 switch (workInProgress.tag) {
12802 case 26:
12803 resource = workInProgress.memoizedState;
12804 case 5:
12805 case 27:
12806 var hostFiber = workInProgress;
12807 if (resource ? preloadResource(resource) : hostFiber.stateNode.complete) {
12808 workInProgressSuspendedReason = NotSuspended;
12809 workInProgressThrownValue = null;
12810 var sibling = hostFiber.sibling;
12811 if (null !== sibling) workInProgress = sibling;
12812 else {
12813 var returnFiber = hostFiber.return;
12814 null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
12815 }
12816 break b;
12817 }
12818 break;
12819 default:
12820 console.error(
12821 "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
12822 );
12823 }
12824 workInProgressSuspendedReason = NotSuspended;
12825 workInProgressThrownValue = null;
12826 throwAndUnwindWorkLoop(
12827 root2,
12828 lanes,
12829 memoizedUpdaters,
12830 SuspendedOnInstanceAndReadyToContinue
12831 );
12832 break;
12833 case SuspendedOnDeprecatedThrowPromise:
12834 workInProgressSuspendedReason = NotSuspended;
12835 workInProgressThrownValue = null;
12836 throwAndUnwindWorkLoop(
12837 root2,
12838 lanes,
12839 memoizedUpdaters,
12840 SuspendedOnDeprecatedThrowPromise
12841 );
12842 break;
12843 case SuspendedOnHydration:
12844 resetWorkInProgressStack();
12845 workInProgressRootExitStatus = RootSuspendedAtTheShell;
12846 break a;
12847 default:
12848 throw Error(
12849 "Unexpected SuspendedReason. This is a bug in React."
12850 );
12851 }
12852 null !== ReactSharedInternals.actQueue ? workLoopSync() : workLoopConcurrentByScheduler();
12853 break;
12854 } catch (thrownValue$9) {
12855 handleThrow(root2, thrownValue$9);
12856 }
12857 while (1);
12858 resetContextDependencies();
12859 ReactSharedInternals.H = prevDispatcher;
12860 ReactSharedInternals.A = prevAsyncDispatcher;
12861 executionContext = prevExecutionContext;
12862 if (null !== workInProgress) return RootInProgress;
12863 workInProgressRoot = null;
12864 workInProgressRootRenderLanes = 0;
12865 finishQueueingConcurrentUpdates();
12866 return workInProgressRootExitStatus;
12867 }
12868 function workLoopConcurrentByScheduler() {
12869 for (; null !== workInProgress && !shouldYield(); )
12870 performUnitOfWork(workInProgress);
12871 }
12872 function performUnitOfWork(unitOfWork) {
12873 var current2 = unitOfWork.alternate;
12874 (unitOfWork.mode & ProfileMode) !== NoMode ? (startProfilerTimer(unitOfWork), current2 = runWithFiberInDEV(
12875 unitOfWork,
12876 beginWork,
12877 current2,
12878 unitOfWork,
12879 entangledRenderLanes
12880 ), stopProfilerTimerIfRunningAndRecordDuration(unitOfWork)) : current2 = runWithFiberInDEV(
12881 unitOfWork,
12882 beginWork,
12883 current2,
12884 unitOfWork,
12885 entangledRenderLanes
12886 );
12887 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12888 null === current2 ? completeUnitOfWork(unitOfWork) : workInProgress = current2;
12889 }
12890 function replaySuspendedUnitOfWork(unitOfWork) {
12891 var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
12892 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12893 null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
12894 }
12895 function replayBeginWork(unitOfWork) {
12896 var current2 = unitOfWork.alternate, isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
12897 isProfilingMode && startProfilerTimer(unitOfWork);
12898 switch (unitOfWork.tag) {
12899 case 15:
12900 case 0:
12901 current2 = replayFunctionComponent(
12902 current2,
12903 unitOfWork,
12904 unitOfWork.pendingProps,
12905 unitOfWork.type,
12906 void 0,
12907 workInProgressRootRenderLanes
12908 );
12909 break;
12910 case 11:
12911 current2 = replayFunctionComponent(
12912 current2,
12913 unitOfWork,
12914 unitOfWork.pendingProps,
12915 unitOfWork.type.render,
12916 unitOfWork.ref,
12917 workInProgressRootRenderLanes
12918 );
12919 break;
12920 case 5:
12921 resetHooksOnUnwind(unitOfWork);
12922 default:
12923 unwindInterruptedWork(current2, unitOfWork), unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes), current2 = beginWork(current2, unitOfWork, entangledRenderLanes);
12924 }
12925 isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
12926 return current2;
12927 }
12928 function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
12929 resetContextDependencies();
12930 resetHooksOnUnwind(unitOfWork);
12931 thenableState$1 = null;
12932 thenableIndexCounter$1 = 0;
12933 var returnFiber = unitOfWork.return;
12934 try {
12935 if (throwException(
12936 root2,
12937 returnFiber,
12938 unitOfWork,
12939 thrownValue,
12940 workInProgressRootRenderLanes
12941 )) {
12942 workInProgressRootExitStatus = RootFatalErrored;
12943 logUncaughtError(
12944 root2,
12945 createCapturedValueAtFiber(thrownValue, root2.current)
12946 );
12947 workInProgress = null;
12948 return;
12949 }
12950 } catch (error) {
12951 if (null !== returnFiber) throw workInProgress = returnFiber, error;
12952 workInProgressRootExitStatus = RootFatalErrored;
12953 logUncaughtError(
12954 root2,
12955 createCapturedValueAtFiber(thrownValue, root2.current)
12956 );
12957 workInProgress = null;
12958 return;
12959 }
12960 if (unitOfWork.flags & 32768) {
12961 if (isHydrating || suspendedReason === SuspendedOnError) root2 = true;
12962 else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
12963 root2 = false;
12964 else if (workInProgressRootDidSkipSuspendedSiblings = root2 = true, suspendedReason === SuspendedOnData || suspendedReason === SuspendedOnAction || suspendedReason === SuspendedOnImmediate || suspendedReason === SuspendedOnDeprecatedThrowPromise)
12965 suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
12966 unwindUnitOfWork(unitOfWork, root2);
12967 } else completeUnitOfWork(unitOfWork);
12968 }
12969 function completeUnitOfWork(unitOfWork) {
12970 var completedWork = unitOfWork;
12971 do {
12972 if (0 !== (completedWork.flags & 32768)) {
12973 unwindUnitOfWork(
12974 completedWork,
12975 workInProgressRootDidSkipSuspendedSiblings
12976 );
12977 return;
12978 }
12979 var current2 = completedWork.alternate;
12980 unitOfWork = completedWork.return;
12981 startProfilerTimer(completedWork);
12982 current2 = runWithFiberInDEV(
12983 completedWork,
12984 completeWork,
12985 current2,
12986 completedWork,
12987 entangledRenderLanes
12988 );
12989 (completedWork.mode & ProfileMode) !== NoMode && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
12990 if (null !== current2) {
12991 workInProgress = current2;
12992 return;
12993 }
12994 completedWork = completedWork.sibling;
12995 if (null !== completedWork) {
12996 workInProgress = completedWork;
12997 return;
12998 }
12999 workInProgress = completedWork = unitOfWork;
13000 } while (null !== completedWork);
13001 workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted);
13002 }
13003 function unwindUnitOfWork(unitOfWork, skipSiblings) {
13004 do {
13005 var next = unwindWork(unitOfWork.alternate, unitOfWork);
13006 if (null !== next) {
13007 next.flags &= 32767;
13008 workInProgress = next;
13009 return;
13010 }
13011 if ((unitOfWork.mode & ProfileMode) !== NoMode) {
13012 stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
13013 next = unitOfWork.actualDuration;
13014 for (var child = unitOfWork.child; null !== child; )
13015 next += child.actualDuration, child = child.sibling;
13016 unitOfWork.actualDuration = next;
13017 }
13018 next = unitOfWork.return;
13019 null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
13020 if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
13021 workInProgress = unitOfWork;
13022 return;
13023 }
13024 workInProgress = unitOfWork = next;
13025 } while (null !== unitOfWork);
13026 workInProgressRootExitStatus = RootSuspendedAtTheShell;
13027 workInProgress = null;
13028 }
13029 function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes, exitStatus, suspendedState, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
13030 root2.cancelPendingCommit = null;
13031 do
13032 flushPendingEffects();
13033 while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
13034 ReactStrictModeWarnings.flushLegacyContextWarning();
13035 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
13036 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
13037 throw Error("Should not already be working.");
13038 setCurrentTrackFromLanes(lanes);
13039 exitStatus === RootErrored ? logErroredRenderPhase(
13040 completedRenderStartTime,
13041 completedRenderEndTime,
13042 lanes,
13043 workInProgressUpdateTask
13044 ) : null !== recoverableErrors ? logRecoveredRenderPhase(
13045 completedRenderStartTime,
13046 completedRenderEndTime,
13047 lanes,
13048 recoverableErrors,
13049 null !== finishedWork && null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 !== (finishedWork.flags & 256),
13050 workInProgressUpdateTask
13051 ) : logRenderPhase(
13052 completedRenderStartTime,
13053 completedRenderEndTime,
13054 lanes,
13055 workInProgressUpdateTask
13056 );
13057 if (null !== finishedWork) {
13058 0 === lanes && console.error(
13059 "finishedLanes should not be empty during a commit. This is a bug in React."
13060 );
13061 if (finishedWork === root2.current)
13062 throw Error(
13063 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
13064 );
13065 didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
13066 didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
13067 markRootFinished(
13068 root2,
13069 lanes,
13070 didIncludeRenderPhaseUpdate,
13071 spawnedLane,
13072 updatedLanes,
13073 suspendedRetryLanes
13074 );
13075 root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
13076 pendingFinishedWork = finishedWork;
13077 pendingEffectsRoot = root2;
13078 pendingEffectsLanes = lanes;
13079 pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
13080 pendingPassiveTransitions = transitions;
13081 pendingRecoverableErrors = recoverableErrors;
13082 pendingEffectsRenderEndTime = completedRenderEndTime;
13083 pendingSuspendedCommitReason = suspendedCommitReason;
13084 pendingDelayedCommitReason = IMMEDIATE_COMMIT;
13085 pendingSuspendedViewTransitionReason = null;
13086 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
13087 schedulerEvent = window.event;
13088 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13089 flushPassiveEffects();
13090 return null;
13091 })) : (root2.callbackNode = null, root2.callbackPriority = 0);
13092 commitErrors = null;
13093 commitStartTime = now();
13094 null !== suspendedCommitReason && logSuspendedCommitPhase(
13095 completedRenderEndTime,
13096 commitStartTime,
13097 suspendedCommitReason,
13098 workInProgressUpdateTask
13099 );
13100 recoverableErrors = 0 !== (finishedWork.flags & 13878);
13101 if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
13102 recoverableErrors = ReactSharedInternals.T;
13103 ReactSharedInternals.T = null;
13104 transitions = ReactDOMSharedInternals.p;
13105 ReactDOMSharedInternals.p = DiscreteEventPriority;
13106 spawnedLane = executionContext;
13107 executionContext |= CommitContext;
13108 try {
13109 commitBeforeMutationEffects(root2, finishedWork, lanes);
13110 } finally {
13111 executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
13112 }
13113 }
13114 pendingEffectsStatus = PENDING_MUTATION_PHASE;
13115 flushMutationEffects();
13116 flushLayoutEffects();
13117 flushSpawnedWork();
13118 }
13119 }
13120 function flushMutationEffects() {
13121 if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
13122 pendingEffectsStatus = NO_PENDING_EFFECTS;
13123 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
13124 if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
13125 rootMutationHasEffect = ReactSharedInternals.T;
13126 ReactSharedInternals.T = null;
13127 var previousPriority = ReactDOMSharedInternals.p;
13128 ReactDOMSharedInternals.p = DiscreteEventPriority;
13129 var prevExecutionContext = executionContext;
13130 executionContext |= CommitContext;
13131 try {
13132 inProgressLanes = lanes;
13133 inProgressRoot = root2;
13134 resetComponentEffectTimers();
13135 commitMutationEffectsOnFiber(finishedWork, root2);
13136 inProgressRoot = inProgressLanes = null;
13137 lanes = selectionInformation;
13138 var curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = lanes.focusedElem, priorSelectionRange = lanes.selectionRange;
13139 if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
13140 priorFocusedElem.ownerDocument.documentElement,
13141 priorFocusedElem
13142 )) {
13143 if (null !== priorSelectionRange && hasSelectionCapabilities(priorFocusedElem)) {
13144 var start = priorSelectionRange.start, end = priorSelectionRange.end;
13145 void 0 === end && (end = start);
13146 if ("selectionStart" in priorFocusedElem)
13147 priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
13148 end,
13149 priorFocusedElem.value.length
13150 );
13151 else {
13152 var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
13153 if (win.getSelection) {
13154 var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(
13155 priorSelectionRange.start,
13156 length
13157 ), end$jscomp$0 = void 0 === priorSelectionRange.end ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
13158 !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
13159 var startMarker = getNodeForCharacterOffset(
13160 priorFocusedElem,
13161 start$jscomp$0
13162 ), endMarker = getNodeForCharacterOffset(
13163 priorFocusedElem,
13164 end$jscomp$0
13165 );
13166 if (startMarker && endMarker && (1 !== selection.rangeCount || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
13167 var range = doc.createRange();
13168 range.setStart(startMarker.node, startMarker.offset);
13169 selection.removeAllRanges();
13170 start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
13171 }
13172 }
13173 }
13174 }
13175 doc = [];
13176 for (selection = priorFocusedElem; selection = selection.parentNode; )
13177 1 === selection.nodeType && doc.push({
13178 element: selection,
13179 left: selection.scrollLeft,
13180 top: selection.scrollTop
13181 });
13182 "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
13183 for (priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
13184 var info = doc[priorFocusedElem];
13185 info.element.scrollLeft = info.left;
13186 info.element.scrollTop = info.top;
13187 }
13188 }
13189 _enabled = !!eventsEnabled;
13190 selectionInformation = eventsEnabled = null;
13191 } finally {
13192 executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
13193 }
13194 }
13195 root2.current = finishedWork;
13196 pendingEffectsStatus = PENDING_LAYOUT_PHASE;
13197 }
13198 }
13199 function flushLayoutEffects() {
13200 if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
13201 pendingEffectsStatus = NO_PENDING_EFFECTS;
13202 var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
13203 if (null !== suspendedViewTransitionReason) {
13204 commitStartTime = now();
13205 var startTime = commitEndTime, endTime = commitStartTime;
13206 !supportsUserTiming || endTime <= startTime || (animatingTask ? animatingTask.run(
13207 console.timeStamp.bind(
13208 console,
13209 suspendedViewTransitionReason,
13210 startTime,
13211 endTime,
13212 currentTrack,
13213 LANES_TRACK_GROUP,
13214 "secondary-light"
13215 )
13216 ) : console.timeStamp(
13217 suspendedViewTransitionReason,
13218 startTime,
13219 endTime,
13220 currentTrack,
13221 LANES_TRACK_GROUP,
13222 "secondary-light"
13223 ));
13224 }
13225 suspendedViewTransitionReason = pendingEffectsRoot;
13226 startTime = pendingFinishedWork;
13227 endTime = pendingEffectsLanes;
13228 var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);
13229 if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {
13230 rootHasLayoutEffect = ReactSharedInternals.T;
13231 ReactSharedInternals.T = null;
13232 var _previousPriority = ReactDOMSharedInternals.p;
13233 ReactDOMSharedInternals.p = DiscreteEventPriority;
13234 var _prevExecutionContext = executionContext;
13235 executionContext |= CommitContext;
13236 try {
13237 inProgressLanes = endTime, inProgressRoot = suspendedViewTransitionReason, resetComponentEffectTimers(), commitLayoutEffectOnFiber(
13238 suspendedViewTransitionReason,
13239 startTime.alternate,
13240 startTime
13241 ), inProgressRoot = inProgressLanes = null;
13242 } finally {
13243 executionContext = _prevExecutionContext, ReactDOMSharedInternals.p = _previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
13244 }
13245 }
13246 suspendedViewTransitionReason = pendingEffectsRenderEndTime;
13247 startTime = pendingSuspendedCommitReason;
13248 commitEndTime = now();
13249 suspendedViewTransitionReason = null === startTime ? suspendedViewTransitionReason : commitStartTime;
13250 startTime = commitEndTime;
13251 endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13252 rootHasLayoutEffect = workInProgressUpdateTask;
13253 null !== commitErrors ? logCommitErrored(
13254 suspendedViewTransitionReason,
13255 startTime,
13256 commitErrors,
13257 false,
13258 rootHasLayoutEffect
13259 ) : !supportsUserTiming || startTime <= suspendedViewTransitionReason || (rootHasLayoutEffect ? rootHasLayoutEffect.run(
13260 console.timeStamp.bind(
13261 console,
13262 endTime ? "Commit Interrupted View Transition" : "Commit",
13263 suspendedViewTransitionReason,
13264 startTime,
13265 currentTrack,
13266 LANES_TRACK_GROUP,
13267 endTime ? "error" : "secondary-dark"
13268 )
13269 ) : console.timeStamp(
13270 endTime ? "Commit Interrupted View Transition" : "Commit",
13271 suspendedViewTransitionReason,
13272 startTime,
13273 currentTrack,
13274 LANES_TRACK_GROUP,
13275 endTime ? "error" : "secondary-dark"
13276 ));
13277 pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
13278 }
13279 }
13280 function flushSpawnedWork() {
13281 if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
13282 if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
13283 var startViewTransitionStartTime = commitEndTime;
13284 commitEndTime = now();
13285 var endTime = commitEndTime, abortedViewTransition = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13286 !supportsUserTiming || endTime <= startViewTransitionStartTime || (animatingTask ? animatingTask.run(
13287 console.timeStamp.bind(
13288 console,
13289 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13290 startViewTransitionStartTime,
13291 endTime,
13292 currentTrack,
13293 LANES_TRACK_GROUP,
13294 abortedViewTransition ? "error" : "secondary-light"
13295 )
13296 ) : console.timeStamp(
13297 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13298 startViewTransitionStartTime,
13299 endTime,
13300 currentTrack,
13301 LANES_TRACK_GROUP,
13302 abortedViewTransition ? " error" : "secondary-light"
13303 ));
13304 pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT && (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
13305 }
13306 pendingEffectsStatus = NO_PENDING_EFFECTS;
13307 requestPaint();
13308 startViewTransitionStartTime = pendingEffectsRoot;
13309 var finishedWork = pendingFinishedWork;
13310 endTime = pendingEffectsLanes;
13311 abortedViewTransition = pendingRecoverableErrors;
13312 var rootDidHavePassiveEffects = 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256);
13313 rootDidHavePassiveEffects ? pendingEffectsStatus = PENDING_PASSIVE_PHASE : (pendingEffectsStatus = NO_PENDING_EFFECTS, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(
13314 startViewTransitionStartTime,
13315 startViewTransitionStartTime.pendingLanes
13316 ), nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null);
13317 var remainingLanes = startViewTransitionStartTime.pendingLanes;
13318 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
13319 rootDidHavePassiveEffects || commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);
13320 remainingLanes = lanesToEventPriority(endTime);
13321 finishedWork = finishedWork.stateNode;
13322 if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
13323 try {
13324 var didError = 128 === (finishedWork.current.flags & 128);
13325 switch (remainingLanes) {
13326 case DiscreteEventPriority:
13327 var schedulerPriority = ImmediatePriority;
13328 break;
13329 case ContinuousEventPriority:
13330 schedulerPriority = UserBlockingPriority;
13331 break;
13332 case DefaultEventPriority:
13333 schedulerPriority = NormalPriority$1;
13334 break;
13335 case IdleEventPriority:
13336 schedulerPriority = IdlePriority;
13337 break;
13338 default:
13339 schedulerPriority = NormalPriority$1;
13340 }
13341 injectedHook.onCommitFiberRoot(
13342 rendererID,
13343 finishedWork,
13344 schedulerPriority,
13345 didError
13346 );
13347 } catch (err) {
13348 hasLoggedError || (hasLoggedError = true, console.error(
13349 "React instrumentation encountered an error: %o",
13350 err
13351 ));
13352 }
13353 isDevToolsPresent && startViewTransitionStartTime.memoizedUpdaters.clear();
13354 onCommitRoot();
13355 if (null !== abortedViewTransition) {
13356 didError = ReactSharedInternals.T;
13357 schedulerPriority = ReactDOMSharedInternals.p;
13358 ReactDOMSharedInternals.p = DiscreteEventPriority;
13359 ReactSharedInternals.T = null;
13360 try {
13361 var onRecoverableError = startViewTransitionStartTime.onRecoverableError;
13362 for (finishedWork = 0; finishedWork < abortedViewTransition.length; finishedWork++) {
13363 var recoverableError = abortedViewTransition[finishedWork], errorInfo = makeErrorInfo(recoverableError.stack);
13364 runWithFiberInDEV(
13365 recoverableError.source,
13366 onRecoverableError,
13367 recoverableError.value,
13368 errorInfo
13369 );
13370 }
13371 } finally {
13372 ReactSharedInternals.T = didError, ReactDOMSharedInternals.p = schedulerPriority;
13373 }
13374 }
13375 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
13376 ensureRootIsScheduled(startViewTransitionStartTime);
13377 remainingLanes = startViewTransitionStartTime.pendingLanes;
13378 0 !== (endTime & 261930) && 0 !== (remainingLanes & 42) ? (nestedUpdateScheduled = true, startViewTransitionStartTime === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = startViewTransitionStartTime)) : nestedUpdateCount = 0;
13379 rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);
13380 flushSyncWorkAcrossRoots_impl(0, false);
13381 }
13382 }
13383 function makeErrorInfo(componentStack) {
13384 componentStack = { componentStack };
13385 Object.defineProperty(componentStack, "digest", {
13386 get: function() {
13387 console.error(
13388 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'
13389 );
13390 }
13391 });
13392 return componentStack;
13393 }
13394 function releaseRootPooledCache(root2, remainingLanes) {
13395 0 === (root2.pooledCacheLanes &= remainingLanes) && (remainingLanes = root2.pooledCache, null != remainingLanes && (root2.pooledCache = null, releaseCache(remainingLanes)));
13396 }
13397 function flushPendingEffects() {
13398 flushMutationEffects();
13399 flushLayoutEffects();
13400 flushSpawnedWork();
13401 return flushPassiveEffects();
13402 }
13403 function flushPassiveEffects() {
13404 if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
13405 var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
13406 pendingEffectsRemainingLanes = 0;
13407 var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 0 === DefaultEventPriority || DefaultEventPriority > renderPriority ? DefaultEventPriority : renderPriority;
13408 renderPriority = ReactSharedInternals.T;
13409 var previousPriority = ReactDOMSharedInternals.p;
13410 try {
13411 ReactDOMSharedInternals.p = priority;
13412 ReactSharedInternals.T = null;
13413 var transitions = pendingPassiveTransitions;
13414 pendingPassiveTransitions = null;
13415 priority = pendingEffectsRoot;
13416 var lanes = pendingEffectsLanes;
13417 pendingEffectsStatus = NO_PENDING_EFFECTS;
13418 pendingFinishedWork = pendingEffectsRoot = null;
13419 pendingEffectsLanes = 0;
13420 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
13421 throw Error("Cannot flush passive effects while already rendering.");
13422 setCurrentTrackFromLanes(lanes);
13423 isFlushingPassiveEffects = true;
13424 didScheduleUpdateDuringPassiveEffects = false;
13425 var passiveEffectStartTime = 0;
13426 commitErrors = null;
13427 passiveEffectStartTime = now$1();
13428 if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)
13429 logAnimatingPhase(
13430 commitEndTime,
13431 passiveEffectStartTime,
13432 animatingTask
13433 );
13434 else {
13435 var startTime = commitEndTime, endTime = passiveEffectStartTime, delayedUntilPaint = pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;
13436 !supportsUserTiming || endTime <= startTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
13437 console.timeStamp.bind(
13438 console,
13439 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13440 startTime,
13441 endTime,
13442 currentTrack,
13443 LANES_TRACK_GROUP,
13444 "secondary-light"
13445 )
13446 ) : console.timeStamp(
13447 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13448 startTime,
13449 endTime,
13450 currentTrack,
13451 LANES_TRACK_GROUP,
13452 "secondary-light"
13453 ));
13454 }
13455 startTime = executionContext;
13456 executionContext |= CommitContext;
13457 var finishedWork = priority.current;
13458 resetComponentEffectTimers();
13459 commitPassiveUnmountOnFiber(finishedWork);
13460 var finishedWork$jscomp$0 = priority.current;
13461 finishedWork = pendingEffectsRenderEndTime;
13462 resetComponentEffectTimers();
13463 commitPassiveMountOnFiber(
13464 priority,
13465 finishedWork$jscomp$0,
13466 lanes,
13467 transitions,
13468 finishedWork
13469 );
13470 commitDoubleInvokeEffectsInDEV(priority);
13471 executionContext = startTime;
13472 var passiveEffectsEndTime = now$1();
13473 finishedWork$jscomp$0 = passiveEffectStartTime;
13474 finishedWork = workInProgressUpdateTask;
13475 null !== commitErrors ? logCommitErrored(
13476 finishedWork$jscomp$0,
13477 passiveEffectsEndTime,
13478 commitErrors,
13479 true,
13480 finishedWork
13481 ) : !supportsUserTiming || passiveEffectsEndTime <= finishedWork$jscomp$0 || (finishedWork ? finishedWork.run(
13482 console.timeStamp.bind(
13483 console,
13484 "Remaining Effects",
13485 finishedWork$jscomp$0,
13486 passiveEffectsEndTime,
13487 currentTrack,
13488 LANES_TRACK_GROUP,
13489 "secondary-dark"
13490 )
13491 ) : console.timeStamp(
13492 "Remaining Effects",
13493 finishedWork$jscomp$0,
13494 passiveEffectsEndTime,
13495 currentTrack,
13496 LANES_TRACK_GROUP,
13497 "secondary-dark"
13498 ));
13499 finalizeRender(lanes, passiveEffectsEndTime);
13500 flushSyncWorkAcrossRoots_impl(0, false);
13501 didScheduleUpdateDuringPassiveEffects ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = priority) : nestedPassiveUpdateCount = 0;
13502 didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = false;
13503 if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
13504 try {
13505 injectedHook.onPostCommitFiberRoot(rendererID, priority);
13506 } catch (err) {
13507 hasLoggedError || (hasLoggedError = true, console.error(
13508 "React instrumentation encountered an error: %o",
13509 err
13510 ));
13511 }
13512 var stateNode = priority.current.stateNode;
13513 stateNode.effectDuration = 0;
13514 stateNode.passiveEffectDuration = 0;
13515 return true;
13516 } finally {
13517 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
13518 }
13519 }
13520 function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
13521 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13522 recordEffectError(sourceFiber);
13523 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
13524 rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
13525 null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
13526 }
13527 function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
13528 isRunningInsertionEffect = false;
13529 if (3 === sourceFiber.tag)
13530 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
13531 else {
13532 for (; null !== nearestMountedAncestor; ) {
13533 if (3 === nearestMountedAncestor.tag) {
13534 captureCommitPhaseErrorOnRoot(
13535 nearestMountedAncestor,
13536 sourceFiber,
13537 error
13538 );
13539 return;
13540 }
13541 if (1 === nearestMountedAncestor.tag) {
13542 var instance = nearestMountedAncestor.stateNode;
13543 if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
13544 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13545 recordEffectError(sourceFiber);
13546 error = createClassErrorUpdate(2);
13547 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
13548 null !== instance && (initializeClassErrorUpdate(
13549 error,
13550 instance,
13551 nearestMountedAncestor,
13552 sourceFiber
13553 ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
13554 return;
13555 }
13556 }
13557 nearestMountedAncestor = nearestMountedAncestor.return;
13558 }
13559 console.error(
13560 "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
13561 error
13562 );
13563 }
13564 }
13565 function attachPingListener(root2, wakeable, lanes) {
13566 var pingCache = root2.pingCache;
13567 if (null === pingCache) {
13568 pingCache = root2.pingCache = new PossiblyWeakMap();
13569 var threadIDs = /* @__PURE__ */ new Set();
13570 pingCache.set(wakeable, threadIDs);
13571 } else
13572 threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
13573 threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), pingCache = pingSuspendedRoot.bind(null, root2, wakeable, lanes), isDevToolsPresent && restorePendingUpdaters(root2, lanes), wakeable.then(pingCache, pingCache));
13574 }
13575 function pingSuspendedRoot(root2, wakeable, pingedLanes) {
13576 var pingCache = root2.pingCache;
13577 null !== pingCache && pingCache.delete(wakeable);
13578 root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
13579 root2.warmLanes &= ~pingedLanes;
13580 0 !== (pingedLanes & 127) ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now(), blockingUpdateTask = createTask("Promise Resolved"), blockingUpdateType = PINGED_UPDATE) : 0 !== (pingedLanes & 4194048) && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now(), transitionUpdateTask = createTask("Promise Resolved"), transitionUpdateType = PINGED_UPDATE);
13581 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && console.error(
13582 "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act"
13583 );
13584 workInProgressRoot === root2 && (workInProgressRootRenderLanes & pingedLanes) === pingedLanes && (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes && now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS ? (executionContext & RenderContext) === NoContext && prepareFreshStack(root2, 0) : workInProgressRootPingedLanes |= pingedLanes, workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes && (workInProgressSuspendedRetryLanes = 0));
13585 ensureRootIsScheduled(root2);
13586 }
13587 function retryTimedOutBoundary(boundaryFiber, retryLane) {
13588 0 === retryLane && (retryLane = claimNextRetryLane());
13589 boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
13590 null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
13591 }
13592 function retryDehydratedSuspenseBoundary(boundaryFiber) {
13593 var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
13594 null !== suspenseState && (retryLane = suspenseState.retryLane);
13595 retryTimedOutBoundary(boundaryFiber, retryLane);
13596 }
13597 function resolveRetryWakeable(boundaryFiber, wakeable) {
13598 var retryLane = 0;
13599 switch (boundaryFiber.tag) {
13600 case 31:
13601 case 13:
13602 var retryCache = boundaryFiber.stateNode;
13603 var suspenseState = boundaryFiber.memoizedState;
13604 null !== suspenseState && (retryLane = suspenseState.retryLane);
13605 break;
13606 case 19:
13607 retryCache = boundaryFiber.stateNode;
13608 break;
13609 case 22:
13610 retryCache = boundaryFiber.stateNode._retryCache;
13611 break;
13612 default:
13613 throw Error(
13614 "Pinged unknown suspense boundary type. This is probably a bug in React."
13615 );
13616 }
13617 null !== retryCache && retryCache.delete(wakeable);
13618 retryTimedOutBoundary(boundaryFiber, retryLane);
13619 }
13620 function recursivelyTraverseAndDoubleInvokeEffectsInDEV(root$jscomp$0, parentFiber, isInStrictMode) {
13621 if (0 !== (parentFiber.subtreeFlags & 67117056))
13622 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
13623 var root2 = root$jscomp$0, fiber = parentFiber, isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
13624 isStrictModeFiber = isInStrictMode || isStrictModeFiber;
13625 22 !== fiber.tag ? fiber.flags & 67108864 ? isStrictModeFiber && runWithFiberInDEV(
13626 fiber,
13627 doubleInvokeEffectsOnFiber,
13628 root2,
13629 fiber
13630 ) : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13631 root2,
13632 fiber,
13633 isStrictModeFiber
13634 ) : null === fiber.memoizedState && (isStrictModeFiber && fiber.flags & 8192 ? runWithFiberInDEV(
13635 fiber,
13636 doubleInvokeEffectsOnFiber,
13637 root2,
13638 fiber
13639 ) : fiber.subtreeFlags & 67108864 && runWithFiberInDEV(
13640 fiber,
13641 recursivelyTraverseAndDoubleInvokeEffectsInDEV,
13642 root2,
13643 fiber,
13644 isStrictModeFiber
13645 ));
13646 parentFiber = parentFiber.sibling;
13647 }
13648 }
13649 function doubleInvokeEffectsOnFiber(root2, fiber) {
13650 setIsStrictModeForDevtools(true);
13651 try {
13652 disappearLayoutEffects(fiber), disconnectPassiveEffect(fiber), reappearLayoutEffects(root2, fiber.alternate, fiber, false), reconnectPassiveEffects(root2, fiber, 0, null, false, 0);
13653 } finally {
13654 setIsStrictModeForDevtools(false);
13655 }
13656 }
13657 function commitDoubleInvokeEffectsInDEV(root2) {
13658 var doubleInvokeEffects = true;
13659 root2.current.mode & (StrictLegacyMode | StrictEffectsMode) || (doubleInvokeEffects = false);
13660 recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13661 root2,
13662 root2.current,
13663 doubleInvokeEffects
13664 );
13665 }
13666 function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
13667 if ((executionContext & RenderContext) === NoContext) {
13668 var tag = fiber.tag;
13669 if (3 === tag || 1 === tag || 0 === tag || 11 === tag || 14 === tag || 15 === tag) {
13670 tag = getComponentNameFromFiber(fiber) || "ReactComponent";
13671 if (null !== didWarnStateUpdateForNotYetMountedComponent) {
13672 if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
13673 didWarnStateUpdateForNotYetMountedComponent.add(tag);
13674 } else didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([tag]);
13675 runWithFiberInDEV(fiber, function() {
13676 console.error(
13677 "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead."
13678 );
13679 });
13680 }
13681 }
13682 }
13683 function restorePendingUpdaters(root2, lanes) {
13684 isDevToolsPresent && root2.memoizedUpdaters.forEach(function(schedulingFiber) {
13685 addFiberToLanesMap(root2, schedulingFiber, lanes);
13686 });
13687 }
13688 function scheduleCallback$1(priorityLevel, callback) {
13689 var actQueue = ReactSharedInternals.actQueue;
13690 return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode$1) : scheduleCallback$3(priorityLevel, callback);
13691 }
13692 function warnIfUpdatesNotWrappedWithActDEV(fiber) {
13693 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function() {
13694 console.error(
13695 "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
13696 getComponentNameFromFiber(fiber)
13697 );
13698 });
13699 }
13700 function ensureRootIsScheduled(root2) {
13701 root2 !== lastScheduledRoot && null === root2.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2);
13702 mightHavePendingSyncWork = true;
13703 null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
13704 }
13705 function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
13706 if (!isFlushingWork && mightHavePendingSyncWork) {
13707 isFlushingWork = true;
13708 do {
13709 var didPerformSomeWork = false;
13710 for (var root2 = firstScheduledRoot; null !== root2; ) {
13711 if (!onlyLegacy)
13712 if (0 !== syncTransitionLanes) {
13713 var pendingLanes = root2.pendingLanes;
13714 if (0 === pendingLanes) var nextLanes = 0;
13715 else {
13716 var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
13717 nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
13718 nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
13719 nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
13720 }
13721 0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13722 } else
13723 nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
13724 root2,
13725 root2 === workInProgressRoot ? nextLanes : 0,
13726 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13727 ), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root2, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13728 root2 = root2.next;
13729 }
13730 } while (didPerformSomeWork);
13731 isFlushingWork = false;
13732 }
13733 }
13734 function processRootScheduleInImmediateTask() {
13735 schedulerEvent = window.event;
13736 processRootScheduleInMicrotask();
13737 }
13738 function processRootScheduleInMicrotask() {
13739 mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
13740 var syncTransitionLanes = 0;
13741 0 !== currentEventTransitionLane && shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane);
13742 for (var currentTime = now$1(), prev = null, root2 = firstScheduledRoot; null !== root2; ) {
13743 var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
13744 if (0 === nextLanes)
13745 root2.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
13746 else if (prev = root2, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
13747 mightHavePendingSyncWork = true;
13748 root2 = next;
13749 }
13750 pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE || flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
13751 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
13752 }
13753 function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
13754 for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
13755 var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
13756 if (-1 === expirationTime) {
13757 if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
13758 expirationTimes[index] = computeExpirationTime(lane, currentTime);
13759 } else expirationTime <= currentTime && (root2.expiredLanes |= lane);
13760 lanes &= ~lane;
13761 }
13762 currentTime = workInProgressRoot;
13763 suspendedLanes = workInProgressRootRenderLanes;
13764 suspendedLanes = getNextLanes(
13765 root2,
13766 root2 === currentTime ? suspendedLanes : 0,
13767 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13768 );
13769 pingedLanes = root2.callbackNode;
13770 if (0 === suspendedLanes || root2 === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
13771 return null !== pingedLanes && cancelCallback(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
13772 if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root2, suspendedLanes)) {
13773 currentTime = suspendedLanes & -suspendedLanes;
13774 if (currentTime !== root2.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode)
13775 cancelCallback(pingedLanes);
13776 else return currentTime;
13777 switch (lanesToEventPriority(suspendedLanes)) {
13778 case DiscreteEventPriority:
13779 case ContinuousEventPriority:
13780 suspendedLanes = UserBlockingPriority;
13781 break;
13782 case DefaultEventPriority:
13783 suspendedLanes = NormalPriority$1;
13784 break;
13785 case IdleEventPriority:
13786 suspendedLanes = IdlePriority;
13787 break;
13788 default:
13789 suspendedLanes = NormalPriority$1;
13790 }
13791 pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2);
13792 null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
13793 root2.callbackPriority = currentTime;
13794 root2.callbackNode = suspendedLanes;
13795 return currentTime;
13796 }
13797 null !== pingedLanes && cancelCallback(pingedLanes);
13798 root2.callbackPriority = 2;
13799 root2.callbackNode = null;
13800 return 2;
13801 }
13802 function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
13803 nestedUpdateScheduled = currentUpdateIsNested = false;
13804 schedulerEvent = window.event;
13805 if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
13806 return root2.callbackNode = null, root2.callbackPriority = 0, null;
13807 var originalCallbackNode = root2.callbackNode;
13808 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13809 if (flushPendingEffects() && root2.callbackNode !== originalCallbackNode)
13810 return null;
13811 var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
13812 workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
13813 root2,
13814 root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
13815 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13816 );
13817 if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
13818 performWorkOnRoot(
13819 root2,
13820 workInProgressRootRenderLanes$jscomp$0,
13821 didTimeout
13822 );
13823 scheduleTaskForRootDuringMicrotask(root2, now$1());
13824 return null != root2.callbackNode && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null;
13825 }
13826 function performSyncWorkOnRoot(root2, lanes) {
13827 if (flushPendingEffects()) return null;
13828 currentUpdateIsNested = nestedUpdateScheduled;
13829 nestedUpdateScheduled = false;
13830 performWorkOnRoot(root2, lanes, true);
13831 }
13832 function cancelCallback(callbackNode) {
13833 callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode);
13834 }
13835 function scheduleImmediateRootScheduleTask() {
13836 null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
13837 processRootScheduleInMicrotask();
13838 return null;
13839 });
13840 scheduleMicrotask(function() {
13841 (executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
13842 ImmediatePriority,
13843 processRootScheduleInImmediateTask
13844 ) : processRootScheduleInMicrotask();
13845 });
13846 }
13847 function requestTransitionLane() {
13848 if (0 === currentEventTransitionLane) {
13849 var actionScopeLane = currentEntangledLane;
13850 0 === actionScopeLane && (actionScopeLane = nextTransitionUpdateLane, nextTransitionUpdateLane <<= 1, 0 === (nextTransitionUpdateLane & 261888) && (nextTransitionUpdateLane = 256));
13851 currentEventTransitionLane = actionScopeLane;
13852 }
13853 return currentEventTransitionLane;
13854 }
13855 function coerceFormActionProp(actionProp) {
13856 if (null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp)
13857 return null;
13858 if ("function" === typeof actionProp) return actionProp;
13859 checkAttributeStringCoercion(actionProp, "action");
13860 return sanitizeURL("" + actionProp);
13861 }
13862 function createFormDataWithSubmitter(form, submitter) {
13863 var temp = submitter.ownerDocument.createElement("input");
13864 temp.name = submitter.name;
13865 temp.value = submitter.value;
13866 form.id && temp.setAttribute("form", form.id);
13867 submitter.parentNode.insertBefore(temp, submitter);
13868 form = new FormData(form);
13869 temp.parentNode.removeChild(temp);
13870 return form;
13871 }
13872 function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
13873 if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
13874 var action = coerceFormActionProp(
13875 (nativeEventTarget[internalPropsKey] || null).action
13876 ), submitter = nativeEvent.submitter;
13877 submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), null !== domEventName && (action = domEventName, submitter = null));
13878 var event = new SyntheticEvent(
13879 "action",
13880 "action",
13881 null,
13882 nativeEvent,
13883 nativeEventTarget
13884 );
13885 dispatchQueue.push({
13886 event,
13887 listeners: [
13888 {
13889 instance: null,
13890 listener: function() {
13891 if (nativeEvent.defaultPrevented) {
13892 if (0 !== currentEventTransitionLane) {
13893 var formData = submitter ? createFormDataWithSubmitter(
13894 nativeEventTarget,
13895 submitter
13896 ) : new FormData(nativeEventTarget), pendingState = {
13897 pending: true,
13898 data: formData,
13899 method: nativeEventTarget.method,
13900 action
13901 };
13902 Object.freeze(pendingState);
13903 startHostTransition(
13904 maybeTargetInst,
13905 pendingState,
13906 null,
13907 formData
13908 );
13909 }
13910 } else
13911 "function" === typeof action && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(
13912 nativeEventTarget,
13913 submitter
13914 ) : new FormData(nativeEventTarget), pendingState = {
13915 pending: true,
13916 data: formData,
13917 method: nativeEventTarget.method,
13918 action
13919 }, Object.freeze(pendingState), startHostTransition(
13920 maybeTargetInst,
13921 pendingState,
13922 action,
13923 formData
13924 ));
13925 },
13926 currentTarget: nativeEventTarget
13927 }
13928 ]
13929 });
13930 }
13931 }
13932 function executeDispatch(event, listener, currentTarget) {
13933 event.currentTarget = currentTarget;
13934 try {
13935 listener(event);
13936 } catch (error) {
13937 reportGlobalError(error);
13938 }
13939 event.currentTarget = null;
13940 }
13941 function processDispatchQueue(dispatchQueue, eventSystemFlags) {
13942 eventSystemFlags = 0 !== (eventSystemFlags & 4);
13943 for (var i = 0; i < dispatchQueue.length; i++) {
13944 var _dispatchQueue$i = dispatchQueue[i];
13945 a: {
13946 var previousInstance = void 0, event = _dispatchQueue$i.event;
13947 _dispatchQueue$i = _dispatchQueue$i.listeners;
13948 if (eventSystemFlags)
13949 for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
13950 var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
13951 _dispatchListeners$i = _dispatchListeners$i.listener;
13952 if (instance !== previousInstance && event.isPropagationStopped())
13953 break a;
13954 null !== instance ? runWithFiberInDEV(
13955 instance,
13956 executeDispatch,
13957 event,
13958 _dispatchListeners$i,
13959 currentTarget
13960 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13961 previousInstance = instance;
13962 }
13963 else
13964 for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
13965 _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
13966 instance = _dispatchListeners$i.instance;
13967 currentTarget = _dispatchListeners$i.currentTarget;
13968 _dispatchListeners$i = _dispatchListeners$i.listener;
13969 if (instance !== previousInstance && event.isPropagationStopped())
13970 break a;
13971 null !== instance ? runWithFiberInDEV(
13972 instance,
13973 executeDispatch,
13974 event,
13975 _dispatchListeners$i,
13976 currentTarget
13977 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13978 previousInstance = instance;
13979 }
13980 }
13981 }
13982 }
13983 function listenToNonDelegatedEvent(domEventName, targetElement) {
13984 nonDelegatedEvents.has(domEventName) || console.error(
13985 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
13986 domEventName
13987 );
13988 var listenerSet = targetElement[internalEventHandlersKey];
13989 void 0 === listenerSet && (listenerSet = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
13990 var listenerSetKey = domEventName + "__bubble";
13991 listenerSet.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, false), listenerSet.add(listenerSetKey));
13992 }
13993 function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
13994 nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener && console.error(
13995 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
13996 domEventName
13997 );
13998 var eventSystemFlags = 0;
13999 isCapturePhaseListener && (eventSystemFlags |= 4);
14000 addTrappedEventListener(
14001 target,
14002 domEventName,
14003 eventSystemFlags,
14004 isCapturePhaseListener
14005 );
14006 }
14007 function listenToAllSupportedEvents(rootContainerElement) {
14008 if (!rootContainerElement[listeningMarker]) {
14009 rootContainerElement[listeningMarker] = true;
14010 allNativeEvents.forEach(function(domEventName) {
14011 "selectionchange" !== domEventName && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, false, rootContainerElement), listenToNativeEvent(domEventName, true, rootContainerElement));
14012 });
14013 var ownerDocument = 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
14014 null === ownerDocument || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = true, listenToNativeEvent("selectionchange", false, ownerDocument));
14015 }
14016 }
14017 function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
14018 switch (getEventPriority(domEventName)) {
14019 case DiscreteEventPriority:
14020 var listenerWrapper = dispatchDiscreteEvent;
14021 break;
14022 case ContinuousEventPriority:
14023 listenerWrapper = dispatchContinuousEvent;
14024 break;
14025 default:
14026 listenerWrapper = dispatchEvent;
14027 }
14028 eventSystemFlags = listenerWrapper.bind(
14029 null,
14030 domEventName,
14031 eventSystemFlags,
14032 targetContainer
14033 );
14034 listenerWrapper = void 0;
14035 !passiveBrowserEventsSupported || "touchstart" !== domEventName && "touchmove" !== domEventName && "wheel" !== domEventName || (listenerWrapper = true);
14036 isCapturePhaseListener ? void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
14037 capture: true,
14038 passive: listenerWrapper
14039 }) : targetContainer.addEventListener(domEventName, eventSystemFlags, true) : void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
14040 passive: listenerWrapper
14041 }) : targetContainer.addEventListener(
14042 domEventName,
14043 eventSystemFlags,
14044 false
14045 );
14046 }
14047 function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
14048 var ancestorInst = targetInst$jscomp$0;
14049 if (0 === (eventSystemFlags & 1) && 0 === (eventSystemFlags & 2) && null !== targetInst$jscomp$0)
14050 a: for (; ; ) {
14051 if (null === targetInst$jscomp$0) return;
14052 var nodeTag = targetInst$jscomp$0.tag;
14053 if (3 === nodeTag || 4 === nodeTag) {
14054 var container = targetInst$jscomp$0.stateNode.containerInfo;
14055 if (container === targetContainer) break;
14056 if (4 === nodeTag)
14057 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
14058 var grandTag = nodeTag.tag;
14059 if ((3 === grandTag || 4 === grandTag) && nodeTag.stateNode.containerInfo === targetContainer)
14060 return;
14061 nodeTag = nodeTag.return;
14062 }
14063 for (; null !== container; ) {
14064 nodeTag = getClosestInstanceFromNode(container);
14065 if (null === nodeTag) return;
14066 grandTag = nodeTag.tag;
14067 if (5 === grandTag || 6 === grandTag || 26 === grandTag || 27 === grandTag) {
14068 targetInst$jscomp$0 = ancestorInst = nodeTag;
14069 continue a;
14070 }
14071 container = container.parentNode;
14072 }
14073 }
14074 targetInst$jscomp$0 = targetInst$jscomp$0.return;
14075 }
14076 batchedUpdates$1(function() {
14077 var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
14078 a: {
14079 var reactName = topLevelEventsToReactNames.get(domEventName);
14080 if (void 0 !== reactName) {
14081 var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
14082 switch (domEventName) {
14083 case "keypress":
14084 if (0 === getEventCharCode(nativeEvent)) break a;
14085 case "keydown":
14086 case "keyup":
14087 SyntheticEventCtor = SyntheticKeyboardEvent;
14088 break;
14089 case "focusin":
14090 reactEventType = "focus";
14091 SyntheticEventCtor = SyntheticFocusEvent;
14092 break;
14093 case "focusout":
14094 reactEventType = "blur";
14095 SyntheticEventCtor = SyntheticFocusEvent;
14096 break;
14097 case "beforeblur":
14098 case "afterblur":
14099 SyntheticEventCtor = SyntheticFocusEvent;
14100 break;
14101 case "click":
14102 if (2 === nativeEvent.button) break a;
14103 case "auxclick":
14104 case "dblclick":
14105 case "mousedown":
14106 case "mousemove":
14107 case "mouseup":
14108 case "mouseout":
14109 case "mouseover":
14110 case "contextmenu":
14111 SyntheticEventCtor = SyntheticMouseEvent;
14112 break;
14113 case "drag":
14114 case "dragend":
14115 case "dragenter":
14116 case "dragexit":
14117 case "dragleave":
14118 case "dragover":
14119 case "dragstart":
14120 case "drop":
14121 SyntheticEventCtor = SyntheticDragEvent;
14122 break;
14123 case "touchcancel":
14124 case "touchend":
14125 case "touchmove":
14126 case "touchstart":
14127 SyntheticEventCtor = SyntheticTouchEvent;
14128 break;
14129 case ANIMATION_END:
14130 case ANIMATION_ITERATION:
14131 case ANIMATION_START:
14132 SyntheticEventCtor = SyntheticAnimationEvent;
14133 break;
14134 case TRANSITION_END:
14135 SyntheticEventCtor = SyntheticTransitionEvent;
14136 break;
14137 case "scroll":
14138 case "scrollend":
14139 SyntheticEventCtor = SyntheticUIEvent;
14140 break;
14141 case "wheel":
14142 SyntheticEventCtor = SyntheticWheelEvent;
14143 break;
14144 case "copy":
14145 case "cut":
14146 case "paste":
14147 SyntheticEventCtor = SyntheticClipboardEvent;
14148 break;
14149 case "gotpointercapture":
14150 case "lostpointercapture":
14151 case "pointercancel":
14152 case "pointerdown":
14153 case "pointermove":
14154 case "pointerout":
14155 case "pointerover":
14156 case "pointerup":
14157 SyntheticEventCtor = SyntheticPointerEvent;
14158 break;
14159 case "toggle":
14160 case "beforetoggle":
14161 SyntheticEventCtor = SyntheticToggleEvent;
14162 }
14163 var inCapturePhase = 0 !== (eventSystemFlags & 4), accumulateTargetOnly = !inCapturePhase && ("scroll" === domEventName || "scrollend" === domEventName), reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName;
14164 inCapturePhase = [];
14165 for (var instance = targetInst, lastHostComponent; null !== instance; ) {
14166 var _instance2 = instance;
14167 lastHostComponent = _instance2.stateNode;
14168 _instance2 = _instance2.tag;
14169 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === lastHostComponent || null === reactEventName || (_instance2 = getListener(instance, reactEventName), null != _instance2 && inCapturePhase.push(
14170 createDispatchListener(
14171 instance,
14172 _instance2,
14173 lastHostComponent
14174 )
14175 ));
14176 if (accumulateTargetOnly) break;
14177 instance = instance.return;
14178 }
14179 0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
14180 reactName,
14181 reactEventType,
14182 null,
14183 nativeEvent,
14184 nativeEventTarget
14185 ), dispatchQueue.push({
14186 event: reactName,
14187 listeners: inCapturePhase
14188 }));
14189 }
14190 }
14191 if (0 === (eventSystemFlags & 7)) {
14192 a: {
14193 reactName = "mouseover" === domEventName || "pointerover" === domEventName;
14194 SyntheticEventCtor = "mouseout" === domEventName || "pointerout" === domEventName;
14195 if (reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
14196 break a;
14197 if (SyntheticEventCtor || reactName) {
14198 reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window;
14199 if (SyntheticEventCtor) {
14200 if (reactEventType = nativeEvent.relatedTarget || nativeEvent.toElement, SyntheticEventCtor = targetInst, reactEventType = reactEventType ? getClosestInstanceFromNode(reactEventType) : null, null !== reactEventType && (accumulateTargetOnly = getNearestMountedFiber(reactEventType), inCapturePhase = reactEventType.tag, reactEventType !== accumulateTargetOnly || 5 !== inCapturePhase && 27 !== inCapturePhase && 6 !== inCapturePhase))
14201 reactEventType = null;
14202 } else SyntheticEventCtor = null, reactEventType = targetInst;
14203 if (SyntheticEventCtor !== reactEventType) {
14204 inCapturePhase = SyntheticMouseEvent;
14205 _instance2 = "onMouseLeave";
14206 reactEventName = "onMouseEnter";
14207 instance = "mouse";
14208 if ("pointerout" === domEventName || "pointerover" === domEventName)
14209 inCapturePhase = SyntheticPointerEvent, _instance2 = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
14210 accumulateTargetOnly = null == SyntheticEventCtor ? reactName : getNodeFromInstance(SyntheticEventCtor);
14211 lastHostComponent = null == reactEventType ? reactName : getNodeFromInstance(reactEventType);
14212 reactName = new inCapturePhase(
14213 _instance2,
14214 instance + "leave",
14215 SyntheticEventCtor,
14216 nativeEvent,
14217 nativeEventTarget
14218 );
14219 reactName.target = accumulateTargetOnly;
14220 reactName.relatedTarget = lastHostComponent;
14221 _instance2 = null;
14222 getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
14223 reactEventName,
14224 instance + "enter",
14225 reactEventType,
14226 nativeEvent,
14227 nativeEventTarget
14228 ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance2 = inCapturePhase);
14229 accumulateTargetOnly = _instance2;
14230 if (SyntheticEventCtor && reactEventType)
14231 b: {
14232 inCapturePhase = getParent;
14233 reactEventName = SyntheticEventCtor;
14234 instance = reactEventType;
14235 lastHostComponent = 0;
14236 for (_instance2 = reactEventName; _instance2; _instance2 = inCapturePhase(_instance2))
14237 lastHostComponent++;
14238 _instance2 = 0;
14239 for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
14240 _instance2++;
14241 for (; 0 < lastHostComponent - _instance2; )
14242 reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
14243 for (; 0 < _instance2 - lastHostComponent; )
14244 instance = inCapturePhase(instance), _instance2--;
14245 for (; lastHostComponent--; ) {
14246 if (reactEventName === instance || null !== instance && reactEventName === instance.alternate) {
14247 inCapturePhase = reactEventName;
14248 break b;
14249 }
14250 reactEventName = inCapturePhase(reactEventName);
14251 instance = inCapturePhase(instance);
14252 }
14253 inCapturePhase = null;
14254 }
14255 else inCapturePhase = null;
14256 null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
14257 dispatchQueue,
14258 reactName,
14259 SyntheticEventCtor,
14260 inCapturePhase,
14261 false
14262 );
14263 null !== reactEventType && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
14264 dispatchQueue,
14265 accumulateTargetOnly,
14266 reactEventType,
14267 inCapturePhase,
14268 true
14269 );
14270 }
14271 }
14272 }
14273 a: {
14274 reactName = targetInst ? getNodeFromInstance(targetInst) : window;
14275 SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase();
14276 if ("select" === SyntheticEventCtor || "input" === SyntheticEventCtor && "file" === reactName.type)
14277 var getTargetInstFunc = getTargetInstForChangeEvent;
14278 else if (isTextInputElement(reactName))
14279 if (isInputEventSupported)
14280 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
14281 else {
14282 getTargetInstFunc = getTargetInstForInputEventPolyfill;
14283 var handleEventFunc = handleEventsForInputEventPolyfill;
14284 }
14285 else
14286 SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || "input" !== SyntheticEventCtor.toLowerCase() || "checkbox" !== reactName.type && "radio" !== reactName.type ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
14287 if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
14288 createAndAccumulateChangeEvent(
14289 dispatchQueue,
14290 getTargetInstFunc,
14291 nativeEvent,
14292 nativeEventTarget
14293 );
14294 break a;
14295 }
14296 handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
14297 "focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
14298 }
14299 handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
14300 switch (domEventName) {
14301 case "focusin":
14302 if (isTextInputElement(handleEventFunc) || "true" === handleEventFunc.contentEditable)
14303 activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null;
14304 break;
14305 case "focusout":
14306 lastSelection = activeElementInst = activeElement = null;
14307 break;
14308 case "mousedown":
14309 mouseDown = true;
14310 break;
14311 case "contextmenu":
14312 case "mouseup":
14313 case "dragend":
14314 mouseDown = false;
14315 constructSelectEvent(
14316 dispatchQueue,
14317 nativeEvent,
14318 nativeEventTarget
14319 );
14320 break;
14321 case "selectionchange":
14322 if (skipSelectionChangeEvent) break;
14323 case "keydown":
14324 case "keyup":
14325 constructSelectEvent(
14326 dispatchQueue,
14327 nativeEvent,
14328 nativeEventTarget
14329 );
14330 }
14331 var fallbackData;
14332 if (canUseCompositionEvent)
14333 b: {
14334 switch (domEventName) {
14335 case "compositionstart":
14336 var eventType = "onCompositionStart";
14337 break b;
14338 case "compositionend":
14339 eventType = "onCompositionEnd";
14340 break b;
14341 case "compositionupdate":
14342 eventType = "onCompositionUpdate";
14343 break b;
14344 }
14345 eventType = void 0;
14346 }
14347 else
14348 isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && nativeEvent.keyCode === START_KEYCODE && (eventType = "onCompositionStart");
14349 eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing && (fallbackData = getData()) : (root = nativeEventTarget, startText = "value" in root ? root.value : root.textContent, isComposing = true)), handleEventFunc = accumulateTwoPhaseListeners(
14350 targetInst,
14351 eventType
14352 ), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
14353 eventType,
14354 domEventName,
14355 null,
14356 nativeEvent,
14357 nativeEventTarget
14358 ), dispatchQueue.push({
14359 event: eventType,
14360 listeners: handleEventFunc
14361 }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), null !== fallbackData && (eventType.data = fallbackData))));
14362 if (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent))
14363 eventType = accumulateTwoPhaseListeners(
14364 targetInst,
14365 "onBeforeInput"
14366 ), 0 < eventType.length && (handleEventFunc = new SyntheticInputEvent(
14367 "onBeforeInput",
14368 "beforeinput",
14369 null,
14370 nativeEvent,
14371 nativeEventTarget
14372 ), dispatchQueue.push({
14373 event: handleEventFunc,
14374 listeners: eventType
14375 }), handleEventFunc.data = fallbackData);
14376 extractEvents$1(
14377 dispatchQueue,
14378 domEventName,
14379 targetInst,
14380 nativeEvent,
14381 nativeEventTarget
14382 );
14383 }
14384 processDispatchQueue(dispatchQueue, eventSystemFlags);
14385 });
14386 }
14387 function createDispatchListener(instance, listener, currentTarget) {
14388 return {
14389 instance,
14390 listener,
14391 currentTarget
14392 };
14393 }
14394 function accumulateTwoPhaseListeners(targetFiber, reactName) {
14395 for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
14396 var _instance3 = targetFiber, stateNode = _instance3.stateNode;
14397 _instance3 = _instance3.tag;
14398 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (_instance3 = getListener(targetFiber, captureName), null != _instance3 && listeners.unshift(
14399 createDispatchListener(targetFiber, _instance3, stateNode)
14400 ), _instance3 = getListener(targetFiber, reactName), null != _instance3 && listeners.push(
14401 createDispatchListener(targetFiber, _instance3, stateNode)
14402 ));
14403 if (3 === targetFiber.tag) return listeners;
14404 targetFiber = targetFiber.return;
14405 }
14406 return [];
14407 }
14408 function getParent(inst) {
14409 if (null === inst) return null;
14410 do
14411 inst = inst.return;
14412 while (inst && 5 !== inst.tag && 27 !== inst.tag);
14413 return inst ? inst : null;
14414 }
14415 function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
14416 for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
14417 var _instance4 = target, alternate = _instance4.alternate, stateNode = _instance4.stateNode;
14418 _instance4 = _instance4.tag;
14419 if (null !== alternate && alternate === common) break;
14420 5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
14421 createDispatchListener(target, stateNode, alternate)
14422 )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
14423 createDispatchListener(target, stateNode, alternate)
14424 )));
14425 target = target.return;
14426 }
14427 0 !== listeners.length && dispatchQueue.push({ event, listeners });
14428 }
14429 function validatePropertiesInDevelopment(type, props) {
14430 validateProperties$2(type, props);
14431 "input" !== type && "textarea" !== type && "select" !== type || null == props || null !== props.value || didWarnValueNull || (didWarnValueNull = true, "select" === type && props.multiple ? console.error(
14432 "`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
14433 type
14434 ) : console.error(
14435 "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
14436 type
14437 ));
14438 var eventRegistry = {
14439 registrationNameDependencies,
14440 possibleRegistrationNames
14441 };
14442 isCustomElement(type) || "string" === typeof props.is || warnUnknownProperties(type, props, eventRegistry);
14443 props.contentEditable && !props.suppressContentEditableWarning && null != props.children && console.error(
14444 "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
14445 );
14446 }
14447 function warnForPropDifference(propName, serverValue, clientValue, serverDifferences) {
14448 serverValue !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(serverValue) !== clientValue && (serverDifferences[propName] = serverValue));
14449 }
14450 function warnForExtraAttributes(domElement, attributeNames, serverDifferences) {
14451 attributeNames.forEach(function(attributeName) {
14452 serverDifferences[getPropNameFromAttributeName(attributeName)] = "style" === attributeName ? getStylesObjectFromElement(domElement) : domElement.getAttribute(attributeName);
14453 });
14454 }
14455 function warnForInvalidEventListener(registrationName, listener) {
14456 false === listener ? console.error(
14457 "Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",
14458 registrationName,
14459 registrationName,
14460 registrationName
14461 ) : console.error(
14462 "Expected `%s` listener to be a function, instead got a value of `%s` type.",
14463 registrationName,
14464 typeof listener
14465 );
14466 }
14467 function normalizeHTML(parent, html) {
14468 parent = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(
14469 parent.namespaceURI,
14470 parent.tagName
14471 ) : parent.ownerDocument.createElement(parent.tagName);
14472 parent.innerHTML = html;
14473 return parent.innerHTML;
14474 }
14475 function normalizeMarkupForTextOrAttribute(markup) {
14476 willCoercionThrow(markup) && (console.error(
14477 "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
14478 typeName(markup)
14479 ), testStringCoercion(markup));
14480 return ("string" === typeof markup ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
14481 }
14482 function checkForUnmatchedText(serverText, clientText) {
14483 clientText = normalizeMarkupForTextOrAttribute(clientText);
14484 return normalizeMarkupForTextOrAttribute(serverText) === clientText ? true : false;
14485 }
14486 function setProp(domElement, tag, key, value, props, prevValue) {
14487 switch (key) {
14488 case "children":
14489 if ("string" === typeof value)
14490 validateTextNesting(value, tag, false), "body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
14491 else if ("number" === typeof value || "bigint" === typeof value)
14492 validateTextNesting("" + value, tag, false), "body" !== tag && setTextContent(domElement, "" + value);
14493 break;
14494 case "className":
14495 setValueForKnownAttribute(domElement, "class", value);
14496 break;
14497 case "tabIndex":
14498 setValueForKnownAttribute(domElement, "tabindex", value);
14499 break;
14500 case "dir":
14501 case "role":
14502 case "viewBox":
14503 case "width":
14504 case "height":
14505 setValueForKnownAttribute(domElement, key, value);
14506 break;
14507 case "style":
14508 setValueForStyles(domElement, value, prevValue);
14509 break;
14510 case "data":
14511 if ("object" !== tag) {
14512 setValueForKnownAttribute(domElement, "data", value);
14513 break;
14514 }
14515 case "src":
14516 case "href":
14517 if ("" === value && ("a" !== tag || "href" !== key)) {
14518 "src" === key ? console.error(
14519 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
14520 key,
14521 key
14522 ) : console.error(
14523 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
14524 key,
14525 key
14526 );
14527 domElement.removeAttribute(key);
14528 break;
14529 }
14530 if (null == value || "function" === typeof value || "symbol" === typeof value || "boolean" === typeof value) {
14531 domElement.removeAttribute(key);
14532 break;
14533 }
14534 checkAttributeStringCoercion(value, key);
14535 value = sanitizeURL("" + value);
14536 domElement.setAttribute(key, value);
14537 break;
14538 case "action":
14539 case "formAction":
14540 null != value && ("form" === tag ? "formAction" === key ? console.error(
14541 "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
14542 ) : "function" === typeof value && (null == props.encType && null == props.method || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14543 "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
14544 )), null == props.target || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14545 "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
14546 ))) : "input" === tag || "button" === tag ? "action" === key ? console.error(
14547 "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
14548 ) : "input" !== tag || "submit" === props.type || "image" === props.type || didWarnFormActionType ? "button" !== tag || null == props.type || "submit" === props.type || didWarnFormActionType ? "function" === typeof value && (null == props.name || didWarnFormActionName || (didWarnFormActionName = true, console.error(
14549 'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
14550 )), null == props.formEncType && null == props.formMethod || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14551 "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
14552 )), null == props.formTarget || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14553 "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
14554 ))) : (didWarnFormActionType = true, console.error(
14555 'A button can only specify a formAction along with type="submit" or no type.'
14556 )) : (didWarnFormActionType = true, console.error(
14557 'An input can only specify a formAction along with type="submit" or type="image".'
14558 )) : "action" === key ? console.error(
14559 "You can only pass the action prop to <form>."
14560 ) : console.error(
14561 "You can only pass the formAction prop to <input> or <button>."
14562 ));
14563 if ("function" === typeof value) {
14564 domElement.setAttribute(
14565 key,
14566 "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().')"
14567 );
14568 break;
14569 } else
14570 "function" === typeof prevValue && ("formAction" === key ? ("input" !== tag && setProp(domElement, tag, "name", props.name, props, null), setProp(
14571 domElement,
14572 tag,
14573 "formEncType",
14574 props.formEncType,
14575 props,
14576 null
14577 ), setProp(
14578 domElement,
14579 tag,
14580 "formMethod",
14581 props.formMethod,
14582 props,
14583 null
14584 ), setProp(
14585 domElement,
14586 tag,
14587 "formTarget",
14588 props.formTarget,
14589 props,
14590 null
14591 )) : (setProp(
14592 domElement,
14593 tag,
14594 "encType",
14595 props.encType,
14596 props,
14597 null
14598 ), setProp(domElement, tag, "method", props.method, props, null), setProp(
14599 domElement,
14600 tag,
14601 "target",
14602 props.target,
14603 props,
14604 null
14605 )));
14606 if (null == value || "symbol" === typeof value || "boolean" === typeof value) {
14607 domElement.removeAttribute(key);
14608 break;
14609 }
14610 checkAttributeStringCoercion(value, key);
14611 value = sanitizeURL("" + value);
14612 domElement.setAttribute(key, value);
14613 break;
14614 case "onClick":
14615 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14616 break;
14617 case "onScroll":
14618 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14619 break;
14620 case "onScrollEnd":
14621 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14622 break;
14623 case "dangerouslySetInnerHTML":
14624 if (null != value) {
14625 if ("object" !== typeof value || !("__html" in value))
14626 throw Error(
14627 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14628 );
14629 key = value.__html;
14630 if (null != key) {
14631 if (null != props.children)
14632 throw Error(
14633 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14634 );
14635 domElement.innerHTML = key;
14636 }
14637 }
14638 break;
14639 case "multiple":
14640 domElement.multiple = value && "function" !== typeof value && "symbol" !== typeof value;
14641 break;
14642 case "muted":
14643 domElement.muted = value && "function" !== typeof value && "symbol" !== typeof value;
14644 break;
14645 case "suppressContentEditableWarning":
14646 case "suppressHydrationWarning":
14647 case "defaultValue":
14648 case "defaultChecked":
14649 case "innerHTML":
14650 case "ref":
14651 break;
14652 case "autoFocus":
14653 break;
14654 case "xlinkHref":
14655 if (null == value || "function" === typeof value || "boolean" === typeof value || "symbol" === typeof value) {
14656 domElement.removeAttribute("xlink:href");
14657 break;
14658 }
14659 checkAttributeStringCoercion(value, key);
14660 key = sanitizeURL("" + value);
14661 domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
14662 break;
14663 case "contentEditable":
14664 case "spellCheck":
14665 case "draggable":
14666 case "value":
14667 case "autoReverse":
14668 case "externalResourcesRequired":
14669 case "focusable":
14670 case "preserveAlpha":
14671 null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, "" + value)) : domElement.removeAttribute(key);
14672 break;
14673 case "inert":
14674 "" !== value || didWarnForNewBooleanPropsWithEmptyValue[key] || (didWarnForNewBooleanPropsWithEmptyValue[key] = true, console.error(
14675 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
14676 key
14677 )); if ( "" === value ) __wpWarnCompat("inert"); if ( "string" === typeof value ) value = true;
14678 case "allowFullScreen":
14679 case "async":
14680 case "autoPlay":
14681 case "controls":
14682 case "default":
14683 case "defer":
14684 case "disabled":
14685 case "disablePictureInPicture":
14686 case "disableRemotePlayback":
14687 case "formNoValidate":
14688 case "hidden":
14689 case "loop":
14690 case "noModule":
14691 case "noValidate":
14692 case "open":
14693 case "playsInline":
14694 case "readOnly":
14695 case "required":
14696 case "reversed":
14697 case "scoped":
14698 case "seamless":
14699 case "itemScope":
14700 value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
14701 break;
14702 case "capture":
14703 case "download":
14704 true === value ? domElement.setAttribute(key, "") : false !== value && null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
14705 break;
14706 case "cols":
14707 case "rows":
14708 case "size":
14709 case "span":
14710 null != value && "function" !== typeof value && "symbol" !== typeof value && !isNaN(value) && 1 <= value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
14711 break;
14712 case "rowSpan":
14713 case "start":
14714 null == value || "function" === typeof value || "symbol" === typeof value || isNaN(value) ? domElement.removeAttribute(key) : (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value));
14715 break;
14716 case "popover":
14717 listenToNonDelegatedEvent("beforetoggle", domElement);
14718 listenToNonDelegatedEvent("toggle", domElement);
14719 setValueForAttribute(domElement, "popover", value);
14720 break;
14721 case "xlinkActuate":
14722 setValueForNamespacedAttribute(
14723 domElement,
14724 xlinkNamespace,
14725 "xlink:actuate",
14726 value
14727 );
14728 break;
14729 case "xlinkArcrole":
14730 setValueForNamespacedAttribute(
14731 domElement,
14732 xlinkNamespace,
14733 "xlink:arcrole",
14734 value
14735 );
14736 break;
14737 case "xlinkRole":
14738 setValueForNamespacedAttribute(
14739 domElement,
14740 xlinkNamespace,
14741 "xlink:role",
14742 value
14743 );
14744 break;
14745 case "xlinkShow":
14746 setValueForNamespacedAttribute(
14747 domElement,
14748 xlinkNamespace,
14749 "xlink:show",
14750 value
14751 );
14752 break;
14753 case "xlinkTitle":
14754 setValueForNamespacedAttribute(
14755 domElement,
14756 xlinkNamespace,
14757 "xlink:title",
14758 value
14759 );
14760 break;
14761 case "xlinkType":
14762 setValueForNamespacedAttribute(
14763 domElement,
14764 xlinkNamespace,
14765 "xlink:type",
14766 value
14767 );
14768 break;
14769 case "xmlBase":
14770 setValueForNamespacedAttribute(
14771 domElement,
14772 xmlNamespace,
14773 "xml:base",
14774 value
14775 );
14776 break;
14777 case "xmlLang":
14778 setValueForNamespacedAttribute(
14779 domElement,
14780 xmlNamespace,
14781 "xml:lang",
14782 value
14783 );
14784 break;
14785 case "xmlSpace":
14786 setValueForNamespacedAttribute(
14787 domElement,
14788 xmlNamespace,
14789 "xml:space",
14790 value
14791 );
14792 break;
14793 case "is":
14794 null != prevValue && console.error(
14795 'Cannot update the "is" prop after it has been initialized.'
14796 );
14797 setValueForAttribute(domElement, "is", value);
14798 break;
14799 case "innerText":
14800 case "textContent":
14801 break;
14802 case "popoverTarget":
14803 didWarnPopoverTargetObject || null == value || "object" !== typeof value || (didWarnPopoverTargetObject = true, console.error(
14804 "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
14805 value
14806 ));
14807 default:
14808 !(2 < key.length) || "o" !== key[0] && "O" !== key[0] || "n" !== key[1] && "N" !== key[1] ? (key = getAttributeAlias(key), setValueForAttribute(domElement, key, value)) : registrationNameDependencies.hasOwnProperty(key) && null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
14809 }
14810 }
14811 function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
14812 switch (key) {
14813 case "style":
14814 setValueForStyles(domElement, value, prevValue);
14815 break;
14816 case "dangerouslySetInnerHTML":
14817 if (null != value) {
14818 if ("object" !== typeof value || !("__html" in value))
14819 throw Error(
14820 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14821 );
14822 key = value.__html;
14823 if (null != key) {
14824 if (null != props.children)
14825 throw Error(
14826 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14827 );
14828 domElement.innerHTML = key;
14829 }
14830 }
14831 break;
14832 case "children":
14833 "string" === typeof value ? setTextContent(domElement, value) : ("number" === typeof value || "bigint" === typeof value) && setTextContent(domElement, "" + value);
14834 break;
14835 case "onScroll":
14836 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14837 break;
14838 case "onScrollEnd":
14839 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14840 break;
14841 case "onClick":
14842 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14843 break;
14844 case "suppressContentEditableWarning":
14845 case "suppressHydrationWarning":
14846 case "innerHTML":
14847 case "ref":
14848 break;
14849 case "innerText":
14850 case "textContent":
14851 break;
14852 default:
14853 if (registrationNameDependencies.hasOwnProperty(key))
14854 null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
14855 else
14856 a: {
14857 if ("o" === key[0] && "n" === key[1] && (props = key.endsWith("Capture"), tag = key.slice(2, props ? key.length - 7 : void 0), prevValue = domElement[internalPropsKey] || null, prevValue = null != prevValue ? prevValue[key] : null, "function" === typeof prevValue && domElement.removeEventListener(tag, prevValue, props), "function" === typeof value)) {
14858 "function" !== typeof prevValue && null !== prevValue && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
14859 domElement.addEventListener(tag, value, props);
14860 break a;
14861 }
14862 key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
14863 }
14864 }
14865 }
14866 function setInitialProperties(domElement, tag, props) {
14867 validatePropertiesInDevelopment(tag, props);
14868 switch (tag) {
14869 case "div":
14870 case "span":
14871 case "svg":
14872 case "path":
14873 case "a":
14874 case "g":
14875 case "p":
14876 case "li":
14877 break;
14878 case "img":
14879 listenToNonDelegatedEvent("error", domElement);
14880 listenToNonDelegatedEvent("load", domElement);
14881 var hasSrc = false, hasSrcSet = false, propKey;
14882 for (propKey in props)
14883 if (props.hasOwnProperty(propKey)) {
14884 var propValue = props[propKey];
14885 if (null != propValue)
14886 switch (propKey) {
14887 case "src":
14888 hasSrc = true;
14889 break;
14890 case "srcSet":
14891 hasSrcSet = true;
14892 break;
14893 case "children":
14894 case "dangerouslySetInnerHTML":
14895 throw Error(
14896 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14897 );
14898 default:
14899 setProp(domElement, tag, propKey, propValue, props, null);
14900 }
14901 }
14902 hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null);
14903 hasSrc && setProp(domElement, tag, "src", props.src, props, null);
14904 return;
14905 case "input":
14906 checkControlledValueProps("input", props);
14907 listenToNonDelegatedEvent("invalid", domElement);
14908 var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
14909 for (hasSrc in props)
14910 if (props.hasOwnProperty(hasSrc)) {
14911 var _propValue = props[hasSrc];
14912 if (null != _propValue)
14913 switch (hasSrc) {
14914 case "name":
14915 hasSrcSet = _propValue;
14916 break;
14917 case "type":
14918 propValue = _propValue;
14919 break;
14920 case "checked":
14921 checked = _propValue;
14922 break;
14923 case "defaultChecked":
14924 defaultChecked = _propValue;
14925 break;
14926 case "value":
14927 propKey = _propValue;
14928 break;
14929 case "defaultValue":
14930 defaultValue = _propValue;
14931 break;
14932 case "children":
14933 case "dangerouslySetInnerHTML":
14934 if (null != _propValue)
14935 throw Error(
14936 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14937 );
14938 break;
14939 default:
14940 setProp(domElement, tag, hasSrc, _propValue, props, null);
14941 }
14942 }
14943 validateInputProps(domElement, props);
14944 initInput(
14945 domElement,
14946 propKey,
14947 defaultValue,
14948 checked,
14949 defaultChecked,
14950 propValue,
14951 hasSrcSet,
14952 false
14953 );
14954 return;
14955 case "select":
14956 checkControlledValueProps("select", props);
14957 listenToNonDelegatedEvent("invalid", domElement);
14958 hasSrc = propValue = propKey = null;
14959 for (hasSrcSet in props)
14960 if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], null != defaultValue))
14961 switch (hasSrcSet) {
14962 case "value":
14963 propKey = defaultValue;
14964 break;
14965 case "defaultValue":
14966 propValue = defaultValue;
14967 break;
14968 case "multiple":
14969 hasSrc = defaultValue;
14970 default:
14971 setProp(
14972 domElement,
14973 tag,
14974 hasSrcSet,
14975 defaultValue,
14976 props,
14977 null
14978 );
14979 }
14980 validateSelectProps(domElement, props);
14981 tag = propKey;
14982 props = propValue;
14983 domElement.multiple = !!hasSrc;
14984 null != tag ? updateOptions(domElement, !!hasSrc, tag, false) : null != props && updateOptions(domElement, !!hasSrc, props, true);
14985 return;
14986 case "textarea":
14987 checkControlledValueProps("textarea", props);
14988 listenToNonDelegatedEvent("invalid", domElement);
14989 propKey = hasSrcSet = hasSrc = null;
14990 for (propValue in props)
14991 if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], null != defaultValue))
14992 switch (propValue) {
14993 case "value":
14994 hasSrc = defaultValue;
14995 break;
14996 case "defaultValue":
14997 hasSrcSet = defaultValue;
14998 break;
14999 case "children":
15000 propKey = defaultValue;
15001 break;
15002 case "dangerouslySetInnerHTML":
15003 if (null != defaultValue)
15004 throw Error(
15005 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
15006 );
15007 break;
15008 default:
15009 setProp(
15010 domElement,
15011 tag,
15012 propValue,
15013 defaultValue,
15014 props,
15015 null
15016 );
15017 }
15018 validateTextareaProps(domElement, props);
15019 initTextarea(domElement, hasSrc, hasSrcSet, propKey);
15020 return;
15021 case "option":
15022 validateOptionProps(domElement, props);
15023 for (checked in props)
15024 if (props.hasOwnProperty(checked) && (hasSrc = props[checked], null != hasSrc))
15025 switch (checked) {
15026 case "selected":
15027 domElement.selected = hasSrc && "function" !== typeof hasSrc && "symbol" !== typeof hasSrc;
15028 break;
15029 default:
15030 setProp(domElement, tag, checked, hasSrc, props, null);
15031 }
15032 return;
15033 case "dialog":
15034 listenToNonDelegatedEvent("beforetoggle", domElement);
15035 listenToNonDelegatedEvent("toggle", domElement);
15036 listenToNonDelegatedEvent("cancel", domElement);
15037 listenToNonDelegatedEvent("close", domElement);
15038 break;
15039 case "iframe":
15040 case "object":
15041 listenToNonDelegatedEvent("load", domElement);
15042 break;
15043 case "video":
15044 case "audio":
15045 for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
15046 listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
15047 break;
15048 case "image":
15049 listenToNonDelegatedEvent("error", domElement);
15050 listenToNonDelegatedEvent("load", domElement);
15051 break;
15052 case "details":
15053 listenToNonDelegatedEvent("toggle", domElement);
15054 break;
15055 case "embed":
15056 case "source":
15057 case "link":
15058 listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
15059 case "area":
15060 case "base":
15061 case "br":
15062 case "col":
15063 case "hr":
15064 case "keygen":
15065 case "meta":
15066 case "param":
15067 case "track":
15068 case "wbr":
15069 case "menuitem":
15070 for (defaultChecked in props)
15071 if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], null != hasSrc))
15072 switch (defaultChecked) {
15073 case "children":
15074 case "dangerouslySetInnerHTML":
15075 throw Error(
15076 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15077 );
15078 default:
15079 setProp(domElement, tag, defaultChecked, hasSrc, props, null);
15080 }
15081 return;
15082 default:
15083 if (isCustomElement(tag)) {
15084 for (_propValue in props)
15085 props.hasOwnProperty(_propValue) && (hasSrc = props[_propValue], void 0 !== hasSrc && setPropOnCustomElement(
15086 domElement,
15087 tag,
15088 _propValue,
15089 hasSrc,
15090 props,
15091 void 0
15092 ));
15093 return;
15094 }
15095 }
15096 for (defaultValue in props)
15097 props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
15098 }
15099 function updateProperties(domElement, tag, lastProps, nextProps) {
15100 validatePropertiesInDevelopment(tag, nextProps);
15101 switch (tag) {
15102 case "div":
15103 case "span":
15104 case "svg":
15105 case "path":
15106 case "a":
15107 case "g":
15108 case "p":
15109 case "li":
15110 break;
15111 case "input":
15112 var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
15113 for (propKey in lastProps) {
15114 var lastProp = lastProps[propKey];
15115 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
15116 switch (propKey) {
15117 case "checked":
15118 break;
15119 case "value":
15120 break;
15121 case "defaultValue":
15122 lastDefaultValue = lastProp;
15123 default:
15124 nextProps.hasOwnProperty(propKey) || setProp(
15125 domElement,
15126 tag,
15127 propKey,
15128 null,
15129 nextProps,
15130 lastProp
15131 );
15132 }
15133 }
15134 for (var _propKey8 in nextProps) {
15135 var propKey = nextProps[_propKey8];
15136 lastProp = lastProps[_propKey8];
15137 if (nextProps.hasOwnProperty(_propKey8) && (null != propKey || null != lastProp))
15138 switch (_propKey8) {
15139 case "type":
15140 type = propKey;
15141 break;
15142 case "name":
15143 name = propKey;
15144 break;
15145 case "checked":
15146 checked = propKey;
15147 break;
15148 case "defaultChecked":
15149 defaultChecked = propKey;
15150 break;
15151 case "value":
15152 value = propKey;
15153 break;
15154 case "defaultValue":
15155 defaultValue = propKey;
15156 break;
15157 case "children":
15158 case "dangerouslySetInnerHTML":
15159 if (null != propKey)
15160 throw Error(
15161 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15162 );
15163 break;
15164 default:
15165 propKey !== lastProp && setProp(
15166 domElement,
15167 tag,
15168 _propKey8,
15169 propKey,
15170 nextProps,
15171 lastProp
15172 );
15173 }
15174 }
15175 tag = "checkbox" === lastProps.type || "radio" === lastProps.type ? null != lastProps.checked : null != lastProps.value;
15176 nextProps = "checkbox" === nextProps.type || "radio" === nextProps.type ? null != nextProps.checked : null != nextProps.value;
15177 tag || !nextProps || didWarnUncontrolledToControlled || (console.error(
15178 "A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
15179 ), didWarnUncontrolledToControlled = true);
15180 !tag || nextProps || didWarnControlledToUncontrolled || (console.error(
15181 "A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
15182 ), didWarnControlledToUncontrolled = true);
15183 updateInput(
15184 domElement,
15185 value,
15186 defaultValue,
15187 lastDefaultValue,
15188 checked,
15189 defaultChecked,
15190 type,
15191 name
15192 );
15193 return;
15194 case "select":
15195 propKey = value = defaultValue = _propKey8 = null;
15196 for (type in lastProps)
15197 if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
15198 switch (type) {
15199 case "value":
15200 break;
15201 case "multiple":
15202 propKey = lastDefaultValue;
15203 default:
15204 nextProps.hasOwnProperty(type) || setProp(
15205 domElement,
15206 tag,
15207 type,
15208 null,
15209 nextProps,
15210 lastDefaultValue
15211 );
15212 }
15213 for (name in nextProps)
15214 if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
15215 switch (name) {
15216 case "value":
15217 _propKey8 = type;
15218 break;
15219 case "defaultValue":
15220 defaultValue = type;
15221 break;
15222 case "multiple":
15223 value = type;
15224 default:
15225 type !== lastDefaultValue && setProp(
15226 domElement,
15227 tag,
15228 name,
15229 type,
15230 nextProps,
15231 lastDefaultValue
15232 );
15233 }
15234 nextProps = defaultValue;
15235 tag = value;
15236 lastProps = propKey;
15237 null != _propKey8 ? updateOptions(domElement, !!tag, _propKey8, false) : !!lastProps !== !!tag && (null != nextProps ? updateOptions(domElement, !!tag, nextProps, true) : updateOptions(domElement, !!tag, tag ? [] : "", false));
15238 return;
15239 case "textarea":
15240 propKey = _propKey8 = null;
15241 for (defaultValue in lastProps)
15242 if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
15243 switch (defaultValue) {
15244 case "value":
15245 break;
15246 case "children":
15247 break;
15248 default:
15249 setProp(domElement, tag, defaultValue, null, nextProps, name);
15250 }
15251 for (value in nextProps)
15252 if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
15253 switch (value) {
15254 case "value":
15255 _propKey8 = name;
15256 break;
15257 case "defaultValue":
15258 propKey = name;
15259 break;
15260 case "children":
15261 break;
15262 case "dangerouslySetInnerHTML":
15263 if (null != name)
15264 throw Error(
15265 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
15266 );
15267 break;
15268 default:
15269 name !== type && setProp(domElement, tag, value, name, nextProps, type);
15270 }
15271 updateTextarea(domElement, _propKey8, propKey);
15272 return;
15273 case "option":
15274 for (var _propKey13 in lastProps)
15275 if (_propKey8 = lastProps[_propKey13], lastProps.hasOwnProperty(_propKey13) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey13))
15276 switch (_propKey13) {
15277 case "selected":
15278 domElement.selected = false;
15279 break;
15280 default:
15281 setProp(
15282 domElement,
15283 tag,
15284 _propKey13,
15285 null,
15286 nextProps,
15287 _propKey8
15288 );
15289 }
15290 for (lastDefaultValue in nextProps)
15291 if (_propKey8 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15292 switch (lastDefaultValue) {
15293 case "selected":
15294 domElement.selected = _propKey8 && "function" !== typeof _propKey8 && "symbol" !== typeof _propKey8;
15295 break;
15296 default:
15297 setProp(
15298 domElement,
15299 tag,
15300 lastDefaultValue,
15301 _propKey8,
15302 nextProps,
15303 propKey
15304 );
15305 }
15306 return;
15307 case "img":
15308 case "link":
15309 case "area":
15310 case "base":
15311 case "br":
15312 case "col":
15313 case "embed":
15314 case "hr":
15315 case "keygen":
15316 case "meta":
15317 case "param":
15318 case "source":
15319 case "track":
15320 case "wbr":
15321 case "menuitem":
15322 for (var _propKey15 in lastProps)
15323 _propKey8 = lastProps[_propKey15], lastProps.hasOwnProperty(_propKey15) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey15) && setProp(
15324 domElement,
15325 tag,
15326 _propKey15,
15327 null,
15328 nextProps,
15329 _propKey8
15330 );
15331 for (checked in nextProps)
15332 if (_propKey8 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15333 switch (checked) {
15334 case "children":
15335 case "dangerouslySetInnerHTML":
15336 if (null != _propKey8)
15337 throw Error(
15338 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15339 );
15340 break;
15341 default:
15342 setProp(
15343 domElement,
15344 tag,
15345 checked,
15346 _propKey8,
15347 nextProps,
15348 propKey
15349 );
15350 }
15351 return;
15352 default:
15353 if (isCustomElement(tag)) {
15354 for (var _propKey17 in lastProps)
15355 _propKey8 = lastProps[_propKey17], lastProps.hasOwnProperty(_propKey17) && void 0 !== _propKey8 && !nextProps.hasOwnProperty(_propKey17) && setPropOnCustomElement(
15356 domElement,
15357 tag,
15358 _propKey17,
15359 void 0,
15360 nextProps,
15361 _propKey8
15362 );
15363 for (defaultChecked in nextProps)
15364 _propKey8 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || _propKey8 === propKey || void 0 === _propKey8 && void 0 === propKey || setPropOnCustomElement(
15365 domElement,
15366 tag,
15367 defaultChecked,
15368 _propKey8,
15369 nextProps,
15370 propKey
15371 );
15372 return;
15373 }
15374 }
15375 for (var _propKey19 in lastProps)
15376 _propKey8 = lastProps[_propKey19], lastProps.hasOwnProperty(_propKey19) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey19) && setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
15377 for (lastProp in nextProps)
15378 _propKey8 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || _propKey8 === propKey || null == _propKey8 && null == propKey || setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
15379 }
15380 function getPropNameFromAttributeName(attrName) {
15381 switch (attrName) {
15382 case "class":
15383 return "className";
15384 case "for":
15385 return "htmlFor";
15386 default:
15387 return attrName;
15388 }
15389 }
15390 function getStylesObjectFromElement(domElement) {
15391 var serverValueInObjectForm = {};
15392 domElement = domElement.style;
15393 for (var i = 0; i < domElement.length; i++) {
15394 var styleName = domElement[i];
15395 serverValueInObjectForm[styleName] = domElement.getPropertyValue(styleName);
15396 }
15397 return serverValueInObjectForm;
15398 }
15399 function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
15400 if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
15401 console.error(
15402 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
15403 );
15404 else {
15405 var clientValue;
15406 var delimiter = clientValue = "", styleName;
15407 for (styleName in value$jscomp$0)
15408 if (value$jscomp$0.hasOwnProperty(styleName)) {
15409 var value = value$jscomp$0[styleName];
15410 null != value && "boolean" !== typeof value && "" !== value && (0 === styleName.indexOf("--") ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName + ":" + ("" + value).trim()) : "number" !== typeof value || 0 === value || unitlessNumbers.has(styleName) ? (checkCSSPropertyStringCoercion(value, styleName), clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + ("" + value).trim()) : clientValue += delimiter + styleName.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern$1, "-ms-") + ":" + value + "px", delimiter = ";");
15411 }
15412 clientValue = clientValue || null;
15413 value$jscomp$0 = domElement.getAttribute("style");
15414 value$jscomp$0 !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue && (serverDifferences.style = getStylesObjectFromElement(domElement)));
15415 }
15416 }
15417 function hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15418 extraAttributes.delete(attributeName);
15419 domElement = domElement.getAttribute(attributeName);
15420 if (null === domElement)
15421 switch (typeof value) {
15422 case "undefined":
15423 case "function":
15424 case "symbol":
15425 case "boolean":
15426 return;
15427 }
15428 else if (null != value)
15429 switch (typeof value) {
15430 case "function":
15431 case "symbol":
15432 case "boolean":
15433 break;
15434 default:
15435 if (checkAttributeStringCoercion(value, propKey), domElement === "" + value)
15436 return;
15437 }
15438 warnForPropDifference(propKey, domElement, value, serverDifferences);
15439 }
15440 function hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15441 extraAttributes.delete(attributeName);
15442 domElement = domElement.getAttribute(attributeName);
15443 if (null === domElement) {
15444 switch (typeof value) {
15445 case "function":
15446 case "symbol":
15447 return;
15448 }
15449 if (!value) return;
15450 } else
15451 switch (typeof value) {
15452 case "function":
15453 case "symbol":
15454 break;
15455 default:
15456 if (value) return;
15457 }
15458 warnForPropDifference(propKey, domElement, value, serverDifferences);
15459 }
15460 function hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15461 extraAttributes.delete(attributeName);
15462 domElement = domElement.getAttribute(attributeName);
15463 if (null === domElement)
15464 switch (typeof value) {
15465 case "undefined":
15466 case "function":
15467 case "symbol":
15468 return;
15469 }
15470 else if (null != value)
15471 switch (typeof value) {
15472 case "function":
15473 case "symbol":
15474 break;
15475 default:
15476 if (checkAttributeStringCoercion(value, attributeName), domElement === "" + value)
15477 return;
15478 }
15479 warnForPropDifference(propKey, domElement, value, serverDifferences);
15480 }
15481 function hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15482 extraAttributes.delete(attributeName);
15483 domElement = domElement.getAttribute(attributeName);
15484 if (null === domElement)
15485 switch (typeof value) {
15486 case "undefined":
15487 case "function":
15488 case "symbol":
15489 case "boolean":
15490 return;
15491 default:
15492 if (isNaN(value)) return;
15493 }
15494 else if (null != value)
15495 switch (typeof value) {
15496 case "function":
15497 case "symbol":
15498 case "boolean":
15499 break;
15500 default:
15501 if (!isNaN(value) && (checkAttributeStringCoercion(value, propKey), domElement === "" + value))
15502 return;
15503 }
15504 warnForPropDifference(propKey, domElement, value, serverDifferences);
15505 }
15506 function hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15507 extraAttributes.delete(attributeName);
15508 domElement = domElement.getAttribute(attributeName);
15509 if (null === domElement)
15510 switch (typeof value) {
15511 case "undefined":
15512 case "function":
15513 case "symbol":
15514 case "boolean":
15515 return;
15516 }
15517 else if (null != value)
15518 switch (typeof value) {
15519 case "function":
15520 case "symbol":
15521 case "boolean":
15522 break;
15523 default:
15524 if (checkAttributeStringCoercion(value, propKey), attributeName = sanitizeURL("" + value), domElement === attributeName)
15525 return;
15526 }
15527 warnForPropDifference(propKey, domElement, value, serverDifferences);
15528 }
15529 function diffHydratedProperties(domElement, tag, props, hostContext) {
15530 for (var serverDifferences = {}, extraAttributes = /* @__PURE__ */ new Set(), attributes = domElement.attributes, i = 0; i < attributes.length; i++)
15531 switch (attributes[i].name.toLowerCase()) {
15532 case "value":
15533 break;
15534 case "checked":
15535 break;
15536 case "selected":
15537 break;
15538 default:
15539 extraAttributes.add(attributes[i].name);
15540 }
15541 if (isCustomElement(tag))
15542 for (var propKey in props) {
15543 if (props.hasOwnProperty(propKey)) {
15544 var value = props[propKey];
15545 if (null != value) {
15546 if (registrationNameDependencies.hasOwnProperty(propKey))
15547 "function" !== typeof value && warnForInvalidEventListener(propKey, value);
15548 else if (true !== props.suppressHydrationWarning)
15549 switch (propKey) {
15550 case "children":
15551 "string" !== typeof value && "number" !== typeof value || warnForPropDifference(
15552 "children",
15553 domElement.textContent,
15554 value,
15555 serverDifferences
15556 );
15557 continue;
15558 case "suppressContentEditableWarning":
15559 case "suppressHydrationWarning":
15560 case "defaultValue":
15561 case "defaultChecked":
15562 case "innerHTML":
15563 case "ref":
15564 continue;
15565 case "dangerouslySetInnerHTML":
15566 attributes = domElement.innerHTML;
15567 value = value ? value.__html : void 0;
15568 null != value && (value = normalizeHTML(domElement, value), warnForPropDifference(
15569 propKey,
15570 attributes,
15571 value,
15572 serverDifferences
15573 ));
15574 continue;
15575 case "style":
15576 extraAttributes.delete(propKey);
15577 diffHydratedStyles(domElement, value, serverDifferences);
15578 continue;
15579 case "offsetParent":
15580 case "offsetTop":
15581 case "offsetLeft":
15582 case "offsetWidth":
15583 case "offsetHeight":
15584 case "isContentEditable":
15585 case "outerText":
15586 case "outerHTML":
15587 extraAttributes.delete(propKey.toLowerCase());
15588 console.error(
15589 "Assignment to read-only property will result in a no-op: `%s`",
15590 propKey
15591 );
15592 continue;
15593 case "className":
15594 extraAttributes.delete("class");
15595 attributes = getValueForAttributeOnCustomComponent(
15596 domElement,
15597 "class",
15598 value
15599 );
15600 warnForPropDifference(
15601 "className",
15602 attributes,
15603 value,
15604 serverDifferences
15605 );
15606 continue;
15607 default:
15608 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(propKey.toLowerCase()) : extraAttributes.delete(propKey), attributes = getValueForAttributeOnCustomComponent(
15609 domElement,
15610 propKey,
15611 value
15612 ), warnForPropDifference(
15613 propKey,
15614 attributes,
15615 value,
15616 serverDifferences
15617 );
15618 }
15619 }
15620 }
15621 }
15622 else
15623 for (value in props)
15624 if (props.hasOwnProperty(value) && (propKey = props[value], null != propKey)) {
15625 if (registrationNameDependencies.hasOwnProperty(value))
15626 "function" !== typeof propKey && warnForInvalidEventListener(value, propKey);
15627 else if (true !== props.suppressHydrationWarning)
15628 switch (value) {
15629 case "children":
15630 "string" !== typeof propKey && "number" !== typeof propKey || warnForPropDifference(
15631 "children",
15632 domElement.textContent,
15633 propKey,
15634 serverDifferences
15635 );
15636 continue;
15637 case "suppressContentEditableWarning":
15638 case "suppressHydrationWarning":
15639 case "value":
15640 case "checked":
15641 case "selected":
15642 case "defaultValue":
15643 case "defaultChecked":
15644 case "innerHTML":
15645 case "ref":
15646 continue;
15647 case "dangerouslySetInnerHTML":
15648 attributes = domElement.innerHTML;
15649 propKey = propKey ? propKey.__html : void 0;
15650 null != propKey && (propKey = normalizeHTML(domElement, propKey), attributes !== propKey && (serverDifferences[value] = { __html: attributes }));
15651 continue;
15652 case "className":
15653 hydrateAttribute(
15654 domElement,
15655 value,
15656 "class",
15657 propKey,
15658 extraAttributes,
15659 serverDifferences
15660 );
15661 continue;
15662 case "tabIndex":
15663 hydrateAttribute(
15664 domElement,
15665 value,
15666 "tabindex",
15667 propKey,
15668 extraAttributes,
15669 serverDifferences
15670 );
15671 continue;
15672 case "style":
15673 extraAttributes.delete(value);
15674 diffHydratedStyles(domElement, propKey, serverDifferences);
15675 continue;
15676 case "multiple":
15677 extraAttributes.delete(value);
15678 warnForPropDifference(
15679 value,
15680 domElement.multiple,
15681 propKey,
15682 serverDifferences
15683 );
15684 continue;
15685 case "muted":
15686 extraAttributes.delete(value);
15687 warnForPropDifference(
15688 value,
15689 domElement.muted,
15690 propKey,
15691 serverDifferences
15692 );
15693 continue;
15694 case "autoFocus":
15695 extraAttributes.delete("autofocus");
15696 warnForPropDifference(
15697 value,
15698 domElement.autofocus,
15699 propKey,
15700 serverDifferences
15701 );
15702 continue;
15703 case "data":
15704 if ("object" !== tag) {
15705 extraAttributes.delete(value);
15706 attributes = domElement.getAttribute("data");
15707 warnForPropDifference(
15708 value,
15709 attributes,
15710 propKey,
15711 serverDifferences
15712 );
15713 continue;
15714 }
15715 case "src":
15716 case "href":
15717 if (!("" !== propKey || "a" === tag && "href" === value || "object" === tag && "data" === value)) {
15718 "src" === value ? console.error(
15719 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
15720 value,
15721 value
15722 ) : console.error(
15723 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
15724 value,
15725 value
15726 );
15727 continue;
15728 }
15729 hydrateSanitizedAttribute(
15730 domElement,
15731 value,
15732 value,
15733 propKey,
15734 extraAttributes,
15735 serverDifferences
15736 );
15737 continue;
15738 case "action":
15739 case "formAction":
15740 attributes = domElement.getAttribute(value);
15741 if ("function" === typeof propKey) {
15742 extraAttributes.delete(value.toLowerCase());
15743 "formAction" === value ? (extraAttributes.delete("name"), extraAttributes.delete("formenctype"), extraAttributes.delete("formmethod"), extraAttributes.delete("formtarget")) : (extraAttributes.delete("enctype"), extraAttributes.delete("method"), extraAttributes.delete("target"));
15744 continue;
15745 } else if (attributes === EXPECTED_FORM_ACTION_URL) {
15746 extraAttributes.delete(value.toLowerCase());
15747 warnForPropDifference(
15748 value,
15749 "function",
15750 propKey,
15751 serverDifferences
15752 );
15753 continue;
15754 }
15755 hydrateSanitizedAttribute(
15756 domElement,
15757 value,
15758 value.toLowerCase(),
15759 propKey,
15760 extraAttributes,
15761 serverDifferences
15762 );
15763 continue;
15764 case "xlinkHref":
15765 hydrateSanitizedAttribute(
15766 domElement,
15767 value,
15768 "xlink:href",
15769 propKey,
15770 extraAttributes,
15771 serverDifferences
15772 );
15773 continue;
15774 case "contentEditable":
15775 hydrateBooleanishAttribute(
15776 domElement,
15777 value,
15778 "contenteditable",
15779 propKey,
15780 extraAttributes,
15781 serverDifferences
15782 );
15783 continue;
15784 case "spellCheck":
15785 hydrateBooleanishAttribute(
15786 domElement,
15787 value,
15788 "spellcheck",
15789 propKey,
15790 extraAttributes,
15791 serverDifferences
15792 );
15793 continue;
15794 case "draggable":
15795 case "autoReverse":
15796 case "externalResourcesRequired":
15797 case "focusable":
15798 case "preserveAlpha":
15799 hydrateBooleanishAttribute(
15800 domElement,
15801 value,
15802 value,
15803 propKey,
15804 extraAttributes,
15805 serverDifferences
15806 );
15807 continue;
15808 case "allowFullScreen":
15809 case "async":
15810 case "autoPlay":
15811 case "controls":
15812 case "default":
15813 case "defer":
15814 case "disabled":
15815 case "disablePictureInPicture":
15816 case "disableRemotePlayback":
15817 case "formNoValidate":
15818 case "hidden":
15819 case "loop":
15820 case "noModule":
15821 case "noValidate":
15822 case "open":
15823 case "playsInline":
15824 case "readOnly":
15825 case "required":
15826 case "reversed":
15827 case "scoped":
15828 case "seamless":
15829 case "itemScope":
15830 hydrateBooleanAttribute(
15831 domElement,
15832 value,
15833 value.toLowerCase(),
15834 propKey,
15835 extraAttributes,
15836 serverDifferences
15837 );
15838 continue;
15839 case "capture":
15840 case "download":
15841 a: {
15842 i = domElement;
15843 var attributeName = attributes = value, serverDifferences$jscomp$0 = serverDifferences;
15844 extraAttributes.delete(attributeName);
15845 i = i.getAttribute(attributeName);
15846 if (null === i)
15847 switch (typeof propKey) {
15848 case "undefined":
15849 case "function":
15850 case "symbol":
15851 break a;
15852 default:
15853 if (false === propKey) break a;
15854 }
15855 else if (null != propKey)
15856 switch (typeof propKey) {
15857 case "function":
15858 case "symbol":
15859 break;
15860 case "boolean":
15861 if (true === propKey && "" === i) break a;
15862 break;
15863 default:
15864 if (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey)
15865 break a;
15866 }
15867 warnForPropDifference(
15868 attributes,
15869 i,
15870 propKey,
15871 serverDifferences$jscomp$0
15872 );
15873 }
15874 continue;
15875 case "cols":
15876 case "rows":
15877 case "size":
15878 case "span":
15879 a: {
15880 i = domElement;
15881 attributeName = attributes = value;
15882 serverDifferences$jscomp$0 = serverDifferences;
15883 extraAttributes.delete(attributeName);
15884 i = i.getAttribute(attributeName);
15885 if (null === i)
15886 switch (typeof propKey) {
15887 case "undefined":
15888 case "function":
15889 case "symbol":
15890 case "boolean":
15891 break a;
15892 default:
15893 if (isNaN(propKey) || 1 > propKey) break a;
15894 }
15895 else if (null != propKey)
15896 switch (typeof propKey) {
15897 case "function":
15898 case "symbol":
15899 case "boolean":
15900 break;
15901 default:
15902 if (!(isNaN(propKey) || 1 > propKey) && (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey))
15903 break a;
15904 }
15905 warnForPropDifference(
15906 attributes,
15907 i,
15908 propKey,
15909 serverDifferences$jscomp$0
15910 );
15911 }
15912 continue;
15913 case "rowSpan":
15914 hydrateNumericAttribute(
15915 domElement,
15916 value,
15917 "rowspan",
15918 propKey,
15919 extraAttributes,
15920 serverDifferences
15921 );
15922 continue;
15923 case "start":
15924 hydrateNumericAttribute(
15925 domElement,
15926 value,
15927 value,
15928 propKey,
15929 extraAttributes,
15930 serverDifferences
15931 );
15932 continue;
15933 case "xHeight":
15934 hydrateAttribute(
15935 domElement,
15936 value,
15937 "x-height",
15938 propKey,
15939 extraAttributes,
15940 serverDifferences
15941 );
15942 continue;
15943 case "xlinkActuate":
15944 hydrateAttribute(
15945 domElement,
15946 value,
15947 "xlink:actuate",
15948 propKey,
15949 extraAttributes,
15950 serverDifferences
15951 );
15952 continue;
15953 case "xlinkArcrole":
15954 hydrateAttribute(
15955 domElement,
15956 value,
15957 "xlink:arcrole",
15958 propKey,
15959 extraAttributes,
15960 serverDifferences
15961 );
15962 continue;
15963 case "xlinkRole":
15964 hydrateAttribute(
15965 domElement,
15966 value,
15967 "xlink:role",
15968 propKey,
15969 extraAttributes,
15970 serverDifferences
15971 );
15972 continue;
15973 case "xlinkShow":
15974 hydrateAttribute(
15975 domElement,
15976 value,
15977 "xlink:show",
15978 propKey,
15979 extraAttributes,
15980 serverDifferences
15981 );
15982 continue;
15983 case "xlinkTitle":
15984 hydrateAttribute(
15985 domElement,
15986 value,
15987 "xlink:title",
15988 propKey,
15989 extraAttributes,
15990 serverDifferences
15991 );
15992 continue;
15993 case "xlinkType":
15994 hydrateAttribute(
15995 domElement,
15996 value,
15997 "xlink:type",
15998 propKey,
15999 extraAttributes,
16000 serverDifferences
16001 );
16002 continue;
16003 case "xmlBase":
16004 hydrateAttribute(
16005 domElement,
16006 value,
16007 "xml:base",
16008 propKey,
16009 extraAttributes,
16010 serverDifferences
16011 );
16012 continue;
16013 case "xmlLang":
16014 hydrateAttribute(
16015 domElement,
16016 value,
16017 "xml:lang",
16018 propKey,
16019 extraAttributes,
16020 serverDifferences
16021 );
16022 continue;
16023 case "xmlSpace":
16024 hydrateAttribute(
16025 domElement,
16026 value,
16027 "xml:space",
16028 propKey,
16029 extraAttributes,
16030 serverDifferences
16031 );
16032 continue;
16033 case "inert":
16034 "" !== propKey || didWarnForNewBooleanPropsWithEmptyValue[value] || (didWarnForNewBooleanPropsWithEmptyValue[value] = true, console.error(
16035 "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
16036 value
16037 ));
16038 hydrateBooleanAttribute(
16039 domElement,
16040 value,
16041 value,
16042 propKey,
16043 extraAttributes,
16044 serverDifferences
16045 );
16046 continue;
16047 default:
16048 if (!(2 < value.length) || "o" !== value[0] && "O" !== value[0] || "n" !== value[1] && "N" !== value[1]) {
16049 i = getAttributeAlias(value);
16050 attributes = false;
16051 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(i.toLowerCase()) : (attributeName = value.toLowerCase(), attributeName = possibleStandardNames.hasOwnProperty(
16052 attributeName
16053 ) ? possibleStandardNames[attributeName] || null : null, null !== attributeName && attributeName !== value && (attributes = true, extraAttributes.delete(attributeName)), extraAttributes.delete(i));
16054 a: if (attributeName = domElement, serverDifferences$jscomp$0 = i, i = propKey, isAttributeNameSafe(serverDifferences$jscomp$0))
16055 if (attributeName.hasAttribute(serverDifferences$jscomp$0))
16056 attributeName = attributeName.getAttribute(
16057 serverDifferences$jscomp$0
16058 ), checkAttributeStringCoercion(
16059 i,
16060 serverDifferences$jscomp$0
16061 ), i = attributeName === "" + i ? i : attributeName;
16062 else {
16063 switch (typeof i) {
16064 case "function":
16065 case "symbol":
16066 break a;
16067 case "boolean":
16068 if (attributeName = serverDifferences$jscomp$0.toLowerCase().slice(0, 5), "data-" !== attributeName && "aria-" !== attributeName)
16069 break a;
16070 }
16071 i = void 0 === i ? void 0 : null;
16072 }
16073 else i = void 0;
16074 attributes || warnForPropDifference(
16075 value,
16076 i,
16077 propKey,
16078 serverDifferences
16079 );
16080 }
16081 }
16082 }
16083 0 < extraAttributes.size && true !== props.suppressHydrationWarning && warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
16084 return 0 === Object.keys(serverDifferences).length ? null : serverDifferences;
16085 }
16086 function propNamesListJoin(list, combinator) {
16087 switch (list.length) {
16088 case 0:
16089 return "";
16090 case 1:
16091 return list[0];
16092 case 2:
16093 return list[0] + " " + combinator + " " + list[1];
16094 default:
16095 return list.slice(0, -1).join(", ") + ", " + combinator + " " + list[list.length - 1];
16096 }
16097 }
16098 function isLikelyStaticResource(initiatorType) {
16099 switch (initiatorType) {
16100 case "css":
16101 case "script":
16102 case "font":
16103 case "img":
16104 case "image":
16105 case "input":
16106 case "link":
16107 return true;
16108 default:
16109 return false;
16110 }
16111 }
16112 function estimateBandwidth() {
16113 if ("function" === typeof performance.getEntriesByType) {
16114 for (var count = 0, bits = 0, resourceEntries = performance.getEntriesByType("resource"), i = 0; i < resourceEntries.length; i++) {
16115 var entry = resourceEntries[i], transferSize = entry.transferSize, initiatorType = entry.initiatorType, duration = entry.duration;
16116 if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
16117 initiatorType = 0;
16118 duration = entry.responseEnd;
16119 for (i += 1; i < resourceEntries.length; i++) {
16120 var overlapEntry = resourceEntries[i], overlapStartTime = overlapEntry.startTime;
16121 if (overlapStartTime > duration) break;
16122 var overlapTransferSize = overlapEntry.transferSize, overlapInitiatorType = overlapEntry.initiatorType;
16123 overlapTransferSize && isLikelyStaticResource(overlapInitiatorType) && (overlapEntry = overlapEntry.responseEnd, initiatorType += overlapTransferSize * (overlapEntry < duration ? 1 : (duration - overlapStartTime) / (overlapEntry - overlapStartTime)));
16124 }
16125 --i;
16126 bits += 8 * (transferSize + initiatorType) / (entry.duration / 1e3);
16127 count++;
16128 if (10 < count) break;
16129 }
16130 }
16131 if (0 < count) return bits / count / 1e6;
16132 }
16133 return navigator.connection && (count = navigator.connection.downlink, "number" === typeof count) ? count : 5;
16134 }
16135 function getOwnerDocumentFromRootContainer(rootContainerElement) {
16136 return 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
16137 }
16138 function getOwnHostContext(namespaceURI) {
16139 switch (namespaceURI) {
16140 case SVG_NAMESPACE:
16141 return HostContextNamespaceSvg;
16142 case MATH_NAMESPACE:
16143 return HostContextNamespaceMath;
16144 default:
16145 return HostContextNamespaceNone;
16146 }
16147 }
16148 function getChildHostContextProd(parentNamespace, type) {
16149 if (parentNamespace === HostContextNamespaceNone)
16150 switch (type) {
16151 case "svg":
16152 return HostContextNamespaceSvg;
16153 case "math":
16154 return HostContextNamespaceMath;
16155 default:
16156 return HostContextNamespaceNone;
16157 }
16158 return parentNamespace === HostContextNamespaceSvg && "foreignObject" === type ? HostContextNamespaceNone : parentNamespace;
16159 }
16160 function shouldSetTextContent(type, props) {
16161 return "textarea" === type || "noscript" === type || "string" === typeof props.children || "number" === typeof props.children || "bigint" === typeof props.children || "object" === typeof props.dangerouslySetInnerHTML && null !== props.dangerouslySetInnerHTML && null != props.dangerouslySetInnerHTML.__html;
16162 }
16163 function shouldAttemptEagerTransition() {
16164 var event = window.event;
16165 if (event && "popstate" === event.type) {
16166 if (event === currentPopstateTransitionEvent) return false;
16167 currentPopstateTransitionEvent = event;
16168 return true;
16169 }
16170 currentPopstateTransitionEvent = null;
16171 return false;
16172 }
16173 function resolveEventType() {
16174 var event = window.event;
16175 return event && event !== schedulerEvent ? event.type : null;
16176 }
16177 function resolveEventTimeStamp() {
16178 var event = window.event;
16179 return event && event !== schedulerEvent ? event.timeStamp : -1.1;
16180 }
16181 function handleErrorInNextTick(error) {
16182 setTimeout(function() {
16183 throw error;
16184 });
16185 }
16186 function commitMount(domElement, type, newProps) {
16187 switch (type) {
16188 case "button":
16189 case "input":
16190 case "select":
16191 case "textarea":
16192 newProps.autoFocus && domElement.focus();
16193 break;
16194 case "img":
16195 newProps.src ? domElement.src = newProps.src : newProps.srcSet && (domElement.srcset = newProps.srcSet);
16196 }
16197 }
16198 function commitHydratedInstance() {
16199 }
16200 function commitUpdate(domElement, type, oldProps, newProps) {
16201 updateProperties(domElement, type, oldProps, newProps);
16202 domElement[internalPropsKey] = newProps;
16203 }
16204 function resetTextContent(domElement) {
16205 setTextContent(domElement, "");
16206 }
16207 function commitTextUpdate(textInstance, oldText, newText) {
16208 textInstance.nodeValue = newText;
16209 }
16210 function warnForReactChildrenConflict(container) {
16211 if (!container.__reactWarnedAboutChildrenConflict) {
16212 var props = container[internalPropsKey] || null;
16213 if (null !== props) {
16214 var fiber = getInstanceFromNode(container);
16215 null !== fiber && ("string" === typeof props.children || "number" === typeof props.children ? (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16216 console.error(
16217 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16218 );
16219 })) : null != props.dangerouslySetInnerHTML && (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16220 console.error(
16221 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16222 );
16223 })));
16224 }
16225 }
16226 }
16227 function isSingletonScope(type) {
16228 return "head" === type;
16229 }
16230 function removeChild(parentInstance, child) {
16231 parentInstance.removeChild(child);
16232 }
16233 function removeChildFromContainer(container, child) {
16234 (9 === container.nodeType ? container.body : "HTML" === container.nodeName ? container.ownerDocument.body : container).removeChild(child);
16235 }
16236 function clearHydrationBoundary(parentInstance, hydrationInstance) {
16237 var node = hydrationInstance, depth = 0;
16238 do {
16239 var nextNode = node.nextSibling;
16240 parentInstance.removeChild(node);
16241 if (nextNode && 8 === nextNode.nodeType)
16242 if (node = nextNode.data, node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) {
16243 if (0 === depth) {
16244 parentInstance.removeChild(nextNode);
16245 retryIfBlockedOn(hydrationInstance);
16246 return;
16247 }
16248 depth--;
16249 } else if (node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || node === SUSPENSE_QUEUED_START_DATA || node === SUSPENSE_FALLBACK_START_DATA || node === ACTIVITY_START_DATA)
16250 depth++;
16251 else if (node === PREAMBLE_CONTRIBUTION_HTML)
16252 releaseSingletonInstance(
16253 parentInstance.ownerDocument.documentElement
16254 );
16255 else if (node === PREAMBLE_CONTRIBUTION_HEAD) {
16256 node = parentInstance.ownerDocument.head;
16257 releaseSingletonInstance(node);
16258 for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
16259 var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
16260 node$jscomp$0[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === node$jscomp$0.rel.toLowerCase() || node.removeChild(node$jscomp$0);
16261 node$jscomp$0 = nextNode$jscomp$0;
16262 }
16263 } else
16264 node === PREAMBLE_CONTRIBUTION_BODY && releaseSingletonInstance(parentInstance.ownerDocument.body);
16265 node = nextNode;
16266 } while (node);
16267 retryIfBlockedOn(hydrationInstance);
16268 }
16269 function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
16270 var node = suspenseInstance;
16271 suspenseInstance = 0;
16272 do {
16273 var nextNode = node.nextSibling;
16274 1 === node.nodeType ? isHidden ? (node._stashedDisplay = node.style.display, node.style.display = "none") : (node.style.display = node._stashedDisplay || "", "" === node.getAttribute("style") && node.removeAttribute("style")) : 3 === node.nodeType && (isHidden ? (node._stashedText = node.nodeValue, node.nodeValue = "") : node.nodeValue = node._stashedText || "");
16275 if (nextNode && 8 === nextNode.nodeType)
16276 if (node = nextNode.data, node === SUSPENSE_END_DATA)
16277 if (0 === suspenseInstance) break;
16278 else suspenseInstance--;
16279 else
16280 node !== SUSPENSE_START_DATA && node !== SUSPENSE_PENDING_START_DATA && node !== SUSPENSE_QUEUED_START_DATA && node !== SUSPENSE_FALLBACK_START_DATA || suspenseInstance++;
16281 node = nextNode;
16282 } while (node);
16283 }
16284 function hideDehydratedBoundary(suspenseInstance) {
16285 hideOrUnhideDehydratedBoundary(suspenseInstance, true);
16286 }
16287 function hideInstance(instance) {
16288 instance = instance.style;
16289 "function" === typeof instance.setProperty ? instance.setProperty("display", "none", "important") : instance.display = "none";
16290 }
16291 function hideTextInstance(textInstance) {
16292 textInstance.nodeValue = "";
16293 }
16294 function unhideDehydratedBoundary(dehydratedInstance) {
16295 hideOrUnhideDehydratedBoundary(dehydratedInstance, false);
16296 }
16297 function unhideInstance(instance, props) {
16298 props = props[STYLE];
16299 props = void 0 !== props && null !== props && props.hasOwnProperty("display") ? props.display : null;
16300 instance.style.display = null == props || "boolean" === typeof props ? "" : ("" + props).trim();
16301 }
16302 function unhideTextInstance(textInstance, text) {
16303 textInstance.nodeValue = text;
16304 }
16305 function clearContainerSparingly(container) {
16306 var nextNode = container.firstChild;
16307 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
16308 for (; nextNode; ) {
16309 var node = nextNode;
16310 nextNode = nextNode.nextSibling;
16311 switch (node.nodeName) {
16312 case "HTML":
16313 case "HEAD":
16314 case "BODY":
16315 clearContainerSparingly(node);
16316 detachDeletedInstance(node);
16317 continue;
16318 case "SCRIPT":
16319 case "STYLE":
16320 continue;
16321 case "LINK":
16322 if ("stylesheet" === node.rel.toLowerCase()) continue;
16323 }
16324 container.removeChild(node);
16325 }
16326 }
16327 function canHydrateInstance(instance, type, props, inRootOrSingleton) {
16328 for (; 1 === instance.nodeType; ) {
16329 var anyProps = props;
16330 if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
16331 if (!inRootOrSingleton && ("INPUT" !== instance.nodeName || "hidden" !== instance.type))
16332 break;
16333 } else if (!inRootOrSingleton)
16334 if ("input" === type && "hidden" === instance.type) {
16335 checkAttributeStringCoercion(anyProps.name, "name");
16336 var name = null == anyProps.name ? null : "" + anyProps.name;
16337 if ("hidden" === anyProps.type && instance.getAttribute("name") === name)
16338 return instance;
16339 } else return instance;
16340 else if (!instance[internalHoistableMarker])
16341 switch (type) {
16342 case "meta":
16343 if (!instance.hasAttribute("itemprop")) break;
16344 return instance;
16345 case "link":
16346 name = instance.getAttribute("rel");
16347 if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
16348 break;
16349 else if (name !== anyProps.rel || instance.getAttribute("href") !== (null == anyProps.href || "" === anyProps.href ? null : anyProps.href) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) || instance.getAttribute("title") !== (null == anyProps.title ? null : anyProps.title))
16350 break;
16351 return instance;
16352 case "style":
16353 if (instance.hasAttribute("data-precedence")) break;
16354 return instance;
16355 case "script":
16356 name = instance.getAttribute("src");
16357 if ((name !== (null == anyProps.src ? null : anyProps.src) || instance.getAttribute("type") !== (null == anyProps.type ? null : anyProps.type) || instance.getAttribute("crossorigin") !== (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) && name && instance.hasAttribute("async") && !instance.hasAttribute("itemprop"))
16358 break;
16359 return instance;
16360 default:
16361 return instance;
16362 }
16363 instance = getNextHydratable(instance.nextSibling);
16364 if (null === instance) break;
16365 }
16366 return null;
16367 }
16368 function canHydrateTextInstance(instance, text, inRootOrSingleton) {
16369 if ("" === text) return null;
16370 for (; 3 !== instance.nodeType; ) {
16371 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16372 return null;
16373 instance = getNextHydratable(instance.nextSibling);
16374 if (null === instance) return null;
16375 }
16376 return instance;
16377 }
16378 function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
16379 for (; 8 !== instance.nodeType; ) {
16380 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16381 return null;
16382 instance = getNextHydratable(instance.nextSibling);
16383 if (null === instance) return null;
16384 }
16385 return instance;
16386 }
16387 function isSuspenseInstancePending(instance) {
16388 return instance.data === SUSPENSE_PENDING_START_DATA || instance.data === SUSPENSE_QUEUED_START_DATA;
16389 }
16390 function isSuspenseInstanceFallback(instance) {
16391 return instance.data === SUSPENSE_FALLBACK_START_DATA || instance.data === SUSPENSE_PENDING_START_DATA && instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING;
16392 }
16393 function registerSuspenseInstanceRetry(instance, callback) {
16394 var ownerDocument = instance.ownerDocument;
16395 if (instance.data === SUSPENSE_QUEUED_START_DATA)
16396 instance._reactRetry = callback;
16397 else if (instance.data !== SUSPENSE_PENDING_START_DATA || ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
16398 callback();
16399 else {
16400 var listener = function() {
16401 callback();
16402 ownerDocument.removeEventListener("DOMContentLoaded", listener);
16403 };
16404 ownerDocument.addEventListener("DOMContentLoaded", listener);
16405 instance._reactRetry = listener;
16406 }
16407 }
16408 function getNextHydratable(node) {
16409 for (; null != node; node = node.nextSibling) {
16410 var nodeType = node.nodeType;
16411 if (1 === nodeType || 3 === nodeType) break;
16412 if (8 === nodeType) {
16413 nodeType = node.data;
16414 if (nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || nodeType === SUSPENSE_QUEUED_START_DATA || nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING)
16415 break;
16416 if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)
16417 return null;
16418 }
16419 }
16420 return node;
16421 }
16422 function describeHydratableInstanceForDevWarnings(instance) {
16423 if (1 === instance.nodeType) {
16424 for (var JSCompiler_temp_const = instance.nodeName.toLowerCase(), serverDifferences = {}, attributes = instance.attributes, i = 0; i < attributes.length; i++) {
16425 var attr = attributes[i];
16426 serverDifferences[getPropNameFromAttributeName(attr.name)] = "style" === attr.name.toLowerCase() ? getStylesObjectFromElement(instance) : attr.value;
16427 }
16428 return { type: JSCompiler_temp_const, props: serverDifferences };
16429 }
16430 return 8 === instance.nodeType ? instance.data === ACTIVITY_START_DATA ? { type: "Activity", props: {} } : { type: "Suspense", props: {} } : instance.nodeValue;
16431 }
16432 function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
16433 return null === parentProps || true !== parentProps[SUPPRESS_HYDRATION_WARNING] ? (textInstance.nodeValue === text ? textInstance = null : (text = normalizeMarkupForTextOrAttribute(text), textInstance = normalizeMarkupForTextOrAttribute(textInstance.nodeValue) === text ? null : textInstance.nodeValue), textInstance) : null;
16434 }
16435 function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
16436 hydrationInstance = hydrationInstance.nextSibling;
16437 for (var depth = 0; hydrationInstance; ) {
16438 if (8 === hydrationInstance.nodeType) {
16439 var data = hydrationInstance.data;
16440 if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {
16441 if (0 === depth)
16442 return getNextHydratable(hydrationInstance.nextSibling);
16443 depth--;
16444 } else
16445 data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && data !== SUSPENSE_PENDING_START_DATA && data !== SUSPENSE_QUEUED_START_DATA && data !== ACTIVITY_START_DATA || depth++;
16446 }
16447 hydrationInstance = hydrationInstance.nextSibling;
16448 }
16449 return null;
16450 }
16451 function getParentHydrationBoundary(targetInstance) {
16452 targetInstance = targetInstance.previousSibling;
16453 for (var depth = 0; targetInstance; ) {
16454 if (8 === targetInstance.nodeType) {
16455 var data = targetInstance.data;
16456 if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_QUEUED_START_DATA || data === ACTIVITY_START_DATA) {
16457 if (0 === depth) return targetInstance;
16458 depth--;
16459 } else
16460 data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA || depth++;
16461 }
16462 targetInstance = targetInstance.previousSibling;
16463 }
16464 return null;
16465 }
16466 function commitHydratedContainer(container) {
16467 retryIfBlockedOn(container);
16468 }
16469 function commitHydratedActivityInstance(activityInstance) {
16470 retryIfBlockedOn(activityInstance);
16471 }
16472 function commitHydratedSuspenseInstance(suspenseInstance) {
16473 retryIfBlockedOn(suspenseInstance);
16474 }
16475 function resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {
16476 validateDOMNestingDev && validateDOMNesting(type, hostContext.ancestorInfo);
16477 props = getOwnerDocumentFromRootContainer(rootContainerInstance);
16478 switch (type) {
16479 case "html":
16480 type = props.documentElement;
16481 if (!type)
16482 throw Error(
16483 "React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page."
16484 );
16485 return type;
16486 case "head":
16487 type = props.head;
16488 if (!type)
16489 throw Error(
16490 "React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page."
16491 );
16492 return type;
16493 case "body":
16494 type = props.body;
16495 if (!type)
16496 throw Error(
16497 "React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page."
16498 );
16499 return type;
16500 default:
16501 throw Error(
16502 "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
16503 );
16504 }
16505 }
16506 function acquireSingletonInstance(type, props, instance, internalInstanceHandle) {
16507 if (!instance[internalContainerInstanceKey] && getInstanceFromNode(instance)) {
16508 var tagName = instance.tagName.toLowerCase();
16509 console.error(
16510 "You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",
16511 tagName,
16512 tagName,
16513 tagName
16514 );
16515 }
16516 switch (type) {
16517 case "html":
16518 case "head":
16519 case "body":
16520 break;
16521 default:
16522 console.error(
16523 "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
16524 );
16525 }
16526 for (tagName = instance.attributes; tagName.length; )
16527 instance.removeAttributeNode(tagName[0]);
16528 setInitialProperties(instance, type, props);
16529 instance[internalInstanceKey] = internalInstanceHandle;
16530 instance[internalPropsKey] = props;
16531 }
16532 function releaseSingletonInstance(instance) {
16533 for (var attributes = instance.attributes; attributes.length; )
16534 instance.removeAttributeNode(attributes[0]);
16535 detachDeletedInstance(instance);
16536 }
16537 function getHoistableRoot(container) {
16538 return "function" === typeof container.getRootNode ? container.getRootNode() : 9 === container.nodeType ? container : container.ownerDocument;
16539 }
16540 function preconnectAs(rel, href, crossOrigin) {
16541 var ownerDocument = globalDocument;
16542 if (ownerDocument && "string" === typeof href && href) {
16543 var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
16544 limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
16545 "string" === typeof crossOrigin && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
16546 preconnectsSet.has(limitedEscapedHref) || (preconnectsSet.add(limitedEscapedHref), rel = { rel, crossOrigin, href }, null === ownerDocument.querySelector(limitedEscapedHref) && (href = ownerDocument.createElement("link"), setInitialProperties(href, "link", rel), markNodeAsHoistable(href), ownerDocument.head.appendChild(href)));
16547 }
16548 }
16549 function getResource(type, currentProps, pendingProps, currentResource) {
16550 var resourceRoot = (resourceRoot = rootInstanceStackCursor.current) ? getHoistableRoot(resourceRoot) : null;
16551 if (!resourceRoot)
16552 throw Error(
16553 '"resourceRoot" was expected to exist. This is a bug in React.'
16554 );
16555 switch (type) {
16556 case "meta":
16557 case "title":
16558 return null;
16559 case "style":
16560 return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(resourceRoot).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
16561 type: "style",
16562 instance: null,
16563 count: 0,
16564 state: null
16565 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16566 case "link":
16567 if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
16568 type = getStyleKey(pendingProps.href);
16569 var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles, _resource = _styles.get(type);
16570 if (!_resource && (resourceRoot = resourceRoot.ownerDocument || resourceRoot, _resource = {
16571 type: "stylesheet",
16572 instance: null,
16573 count: 0,
16574 state: { loading: NotLoaded, preload: null }
16575 }, _styles.set(type, _resource), (_styles = resourceRoot.querySelector(
16576 getStylesheetSelectorFromKey(type)
16577 )) && !_styles._p && (_resource.instance = _styles, _resource.state.loading = Loaded | Inserted), !preloadPropsMap.has(type))) {
16578 var preloadProps = {
16579 rel: "preload",
16580 as: "style",
16581 href: pendingProps.href,
16582 crossOrigin: pendingProps.crossOrigin,
16583 integrity: pendingProps.integrity,
16584 media: pendingProps.media,
16585 hrefLang: pendingProps.hrefLang,
16586 referrerPolicy: pendingProps.referrerPolicy
16587 };
16588 preloadPropsMap.set(type, preloadProps);
16589 _styles || preloadStylesheet(
16590 resourceRoot,
16591 type,
16592 preloadProps,
16593 _resource.state
16594 );
16595 }
16596 if (currentProps && null === currentResource)
16597 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16598 "Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
16599 );
16600 return _resource;
16601 }
16602 if (currentProps && null !== currentResource)
16603 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16604 "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + pendingProps
16605 );
16606 return null;
16607 case "script":
16608 return currentProps = pendingProps.async, pendingProps = pendingProps.src, "string" === typeof pendingProps && currentProps && "function" !== typeof currentProps && "symbol" !== typeof currentProps ? (pendingProps = getScriptKey(pendingProps), currentProps = getResourcesFromRoot(resourceRoot).hoistableScripts, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
16609 type: "script",
16610 instance: null,
16611 count: 0,
16612 state: null
16613 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16614 default:
16615 throw Error(
16616 'getResource encountered a type it did not expect: "' + type + '". this is a bug in React.'
16617 );
16618 }
16619 }
16620 function describeLinkForResourceErrorDEV(props) {
16621 var describedProps = 0, description = "<link";
16622 "string" === typeof props.rel ? (describedProps++, description += ' rel="' + props.rel + '"') : hasOwnProperty.call(props, "rel") && (describedProps++, description += ' rel="' + (null === props.rel ? "null" : "invalid type " + typeof props.rel) + '"');
16623 "string" === typeof props.href ? (describedProps++, description += ' href="' + props.href + '"') : hasOwnProperty.call(props, "href") && (describedProps++, description += ' href="' + (null === props.href ? "null" : "invalid type " + typeof props.href) + '"');
16624 "string" === typeof props.precedence ? (describedProps++, description += ' precedence="' + props.precedence + '"') : hasOwnProperty.call(props, "precedence") && (describedProps++, description += " precedence={" + (null === props.precedence ? "null" : "invalid type " + typeof props.precedence) + "}");
16625 Object.getOwnPropertyNames(props).length > describedProps && (description += " ...");
16626 return description + " />";
16627 }
16628 function getStyleKey(href) {
16629 return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
16630 }
16631 function getStylesheetSelectorFromKey(key) {
16632 return 'link[rel="stylesheet"][' + key + "]";
16633 }
16634 function stylesheetPropsFromRawProps(rawProps) {
16635 return assign({}, rawProps, {
16636 "data-precedence": rawProps.precedence,
16637 precedence: null
16638 });
16639 }
16640 function preloadStylesheet(ownerDocument, key, preloadProps, state) {
16641 ownerDocument.querySelector(
16642 'link[rel="preload"][as="style"][' + key + "]"
16643 ) ? state.loading = Loaded : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
16644 return state.loading |= Loaded;
16645 }), key.addEventListener("error", function() {
16646 return state.loading |= Errored;
16647 }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
16648 }
16649 function getScriptKey(src) {
16650 return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
16651 }
16652 function getScriptSelectorFromKey(key) {
16653 return "script[async]" + key;
16654 }
16655 function acquireResource(hoistableRoot, resource, props) {
16656 resource.count++;
16657 if (null === resource.instance)
16658 switch (resource.type) {
16659 case "style":
16660 var instance = hoistableRoot.querySelector(
16661 'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
16662 );
16663 if (instance)
16664 return resource.instance = instance, markNodeAsHoistable(instance), instance;
16665 var styleProps = assign({}, props, {
16666 "data-href": props.href,
16667 "data-precedence": props.precedence,
16668 href: null,
16669 precedence: null
16670 });
16671 instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("style");
16672 markNodeAsHoistable(instance);
16673 setInitialProperties(instance, "style", styleProps);
16674 insertStylesheet(instance, props.precedence, hoistableRoot);
16675 return resource.instance = instance;
16676 case "stylesheet":
16677 styleProps = getStyleKey(props.href);
16678 var _instance = hoistableRoot.querySelector(
16679 getStylesheetSelectorFromKey(styleProps)
16680 );
16681 if (_instance)
16682 return resource.state.loading |= Inserted, resource.instance = _instance, markNodeAsHoistable(_instance), _instance;
16683 instance = stylesheetPropsFromRawProps(props);
16684 (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
16685 _instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
16686 markNodeAsHoistable(_instance);
16687 var linkInstance = _instance;
16688 linkInstance._p = new Promise(function(resolve, reject) {
16689 linkInstance.onload = resolve;
16690 linkInstance.onerror = reject;
16691 });
16692 setInitialProperties(_instance, "link", instance);
16693 resource.state.loading |= Inserted;
16694 insertStylesheet(_instance, props.precedence, hoistableRoot);
16695 return resource.instance = _instance;
16696 case "script":
16697 _instance = getScriptKey(props.src);
16698 if (styleProps = hoistableRoot.querySelector(
16699 getScriptSelectorFromKey(_instance)
16700 ))
16701 return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
16702 instance = props;
16703 if (styleProps = preloadPropsMap.get(_instance))
16704 instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
16705 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16706 styleProps = hoistableRoot.createElement("script");
16707 markNodeAsHoistable(styleProps);
16708 setInitialProperties(styleProps, "link", instance);
16709 hoistableRoot.head.appendChild(styleProps);
16710 return resource.instance = styleProps;
16711 case "void":
16712 return null;
16713 default:
16714 throw Error(
16715 'acquireResource encountered a resource type it did not expect: "' + resource.type + '". this is a bug in React.'
16716 );
16717 }
16718 else
16719 "stylesheet" === resource.type && (resource.state.loading & Inserted) === NotLoaded && (instance = resource.instance, resource.state.loading |= Inserted, insertStylesheet(instance, props.precedence, hoistableRoot));
16720 return resource.instance;
16721 }
16722 function insertStylesheet(instance, precedence, root2) {
16723 for (var nodes = root2.querySelectorAll(
16724 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
16725 ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
16726 var node = nodes[i];
16727 if (node.dataset.precedence === precedence) prior = node;
16728 else if (prior !== last) break;
16729 }
16730 prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = 9 === root2.nodeType ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
16731 }
16732 function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
16733 null == stylesheetProps.crossOrigin && (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
16734 null == stylesheetProps.referrerPolicy && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
16735 null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
16736 }
16737 function adoptPreloadPropsForScript(scriptProps, preloadProps) {
16738 null == scriptProps.crossOrigin && (scriptProps.crossOrigin = preloadProps.crossOrigin);
16739 null == scriptProps.referrerPolicy && (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
16740 null == scriptProps.integrity && (scriptProps.integrity = preloadProps.integrity);
16741 }
16742 function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
16743 if (null === tagCaches) {
16744 var cache = /* @__PURE__ */ new Map();
16745 var caches = tagCaches = /* @__PURE__ */ new Map();
16746 caches.set(ownerDocument, cache);
16747 } else
16748 caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
16749 if (cache.has(type)) return cache;
16750 cache.set(type, null);
16751 ownerDocument = ownerDocument.getElementsByTagName(type);
16752 for (caches = 0; caches < ownerDocument.length; caches++) {
16753 var node = ownerDocument[caches];
16754 if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && node.namespaceURI !== SVG_NAMESPACE) {
16755 var nodeKey = node.getAttribute(keyAttribute) || "";
16756 nodeKey = type + nodeKey;
16757 var existing = cache.get(nodeKey);
16758 existing ? existing.push(node) : cache.set(nodeKey, [node]);
16759 }
16760 }
16761 return cache;
16762 }
16763 function mountHoistable(hoistableRoot, type, instance) {
16764 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16765 hoistableRoot.head.insertBefore(
16766 instance,
16767 "title" === type ? hoistableRoot.querySelector("head > title") : null
16768 );
16769 }
16770 function isHostHoistableType(type, props, hostContext) {
16771 var outsideHostContainerContext = !hostContext.ancestorInfo.containerTagInScope;
16772 if (hostContext.context === HostContextNamespaceSvg || null != props.itemProp)
16773 return !outsideHostContainerContext || null == props.itemProp || "meta" !== type && "title" !== type && "style" !== type && "link" !== type && "script" !== type || console.error(
16774 "Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",
16775 type,
16776 type
16777 ), false;
16778 switch (type) {
16779 case "meta":
16780 case "title":
16781 return true;
16782 case "style":
16783 if ("string" !== typeof props.precedence || "string" !== typeof props.href || "" === props.href) {
16784 outsideHostContainerContext && console.error(
16785 'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.'
16786 );
16787 break;
16788 }
16789 return true;
16790 case "link":
16791 if ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href || props.onLoad || props.onError) {
16792 if ("stylesheet" === props.rel && "string" === typeof props.precedence) {
16793 type = props.href;
16794 var onError = props.onError, disabled = props.disabled;
16795 hostContext = [];
16796 props.onLoad && hostContext.push("`onLoad`");
16797 onError && hostContext.push("`onError`");
16798 null != disabled && hostContext.push("`disabled`");
16799 onError = propNamesListJoin(hostContext, "and");
16800 onError += 1 === hostContext.length ? " prop" : " props";
16801 disabled = 1 === hostContext.length ? "an " + onError : "the " + onError;
16802 hostContext.length && console.error(
16803 'React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',
16804 type,
16805 disabled,
16806 onError
16807 );
16808 }
16809 outsideHostContainerContext && ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href ? console.error(
16810 "Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"
16811 ) : (props.onError || props.onLoad) && console.error(
16812 "Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
16813 ));
16814 break;
16815 }
16816 switch (props.rel) {
16817 case "stylesheet":
16818 return type = props.precedence, props = props.disabled, "string" !== typeof type && outsideHostContainerContext && console.error(
16819 'Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'
16820 ), "string" === typeof type && null == props;
16821 default:
16822 return true;
16823 }
16824 case "script":
16825 type = props.async && "function" !== typeof props.async && "symbol" !== typeof props.async;
16826 if (!type || props.onLoad || props.onError || !props.src || "string" !== typeof props.src) {
16827 outsideHostContainerContext && (type ? props.onLoad || props.onError ? console.error(
16828 "Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
16829 ) : console.error(
16830 "Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."
16831 ) : console.error(
16832 'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'
16833 ));
16834 break;
16835 }
16836 return true;
16837 case "noscript":
16838 case "template":
16839 outsideHostContainerContext && console.error(
16840 "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
16841 type
16842 );
16843 }
16844 return false;
16845 }
16846 function preloadResource(resource) {
16847 return "stylesheet" === resource.type && (resource.state.loading & Settled) === NotLoaded ? false : true;
16848 }
16849 function suspendResource(state, hoistableRoot, resource, props) {
16850 if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && (resource.state.loading & Inserted) === NotLoaded) {
16851 if (null === resource.instance) {
16852 var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
16853 getStylesheetSelectorFromKey(key)
16854 );
16855 if (instance) {
16856 hoistableRoot = instance._p;
16857 null !== hoistableRoot && "object" === typeof hoistableRoot && "function" === typeof hoistableRoot.then && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state));
16858 resource.state.loading |= Inserted;
16859 resource.instance = instance;
16860 markNodeAsHoistable(instance);
16861 return;
16862 }
16863 instance = hoistableRoot.ownerDocument || hoistableRoot;
16864 props = stylesheetPropsFromRawProps(props);
16865 (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key);
16866 instance = instance.createElement("link");
16867 markNodeAsHoistable(instance);
16868 var linkInstance = instance;
16869 linkInstance._p = new Promise(function(resolve, reject) {
16870 linkInstance.onload = resolve;
16871 linkInstance.onerror = reject;
16872 });
16873 setInitialProperties(instance, "link", props);
16874 resource.instance = instance;
16875 }
16876 null === state.stylesheets && (state.stylesheets = /* @__PURE__ */ new Map());
16877 state.stylesheets.set(resource, hoistableRoot);
16878 (hoistableRoot = resource.state.preload) && (resource.state.loading & Settled) === NotLoaded && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
16879 }
16880 }
16881 function waitForCommitToBeReady(state, timeoutOffset) {
16882 state.stylesheets && 0 === state.count && insertSuspendedStylesheets(state, state.stylesheets);
16883 return 0 < state.count || 0 < state.imgCount ? function(commit) {
16884 var stylesheetTimer = setTimeout(function() {
16885 state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
16886 if (state.unsuspend) {
16887 var unsuspend = state.unsuspend;
16888 state.unsuspend = null;
16889 unsuspend();
16890 }
16891 }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);
16892 0 < state.imgBytes && 0 === estimatedBytesWithinLimit && (estimatedBytesWithinLimit = 125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);
16893 var imgTimer = setTimeout(
16894 function() {
16895 state.waitingForImages = false;
16896 if (0 === state.count && (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend)) {
16897 var unsuspend = state.unsuspend;
16898 state.unsuspend = null;
16899 unsuspend();
16900 }
16901 },
16902 (state.imgBytes > estimatedBytesWithinLimit ? 50 : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset
16903 );
16904 state.unsuspend = commit;
16905 return function() {
16906 state.unsuspend = null;
16907 clearTimeout(stylesheetTimer);
16908 clearTimeout(imgTimer);
16909 };
16910 } : null;
16911 }
16912 function onUnsuspend() {
16913 this.count--;
16914 if (0 === this.count && (0 === this.imgCount || !this.waitingForImages)) {
16915 if (this.stylesheets)
16916 insertSuspendedStylesheets(this, this.stylesheets);
16917 else if (this.unsuspend) {
16918 var unsuspend = this.unsuspend;
16919 this.unsuspend = null;
16920 unsuspend();
16921 }
16922 }
16923 }
16924 function insertSuspendedStylesheets(state, resources) {
16925 state.stylesheets = null;
16926 null !== state.unsuspend && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
16927 }
16928 function insertStylesheetIntoRoot(root2, resource) {
16929 if (!(resource.state.loading & Inserted)) {
16930 var precedences = precedencesByRoot.get(root2);
16931 if (precedences) var last = precedences.get(LAST_PRECEDENCE);
16932 else {
16933 precedences = /* @__PURE__ */ new Map();
16934 precedencesByRoot.set(root2, precedences);
16935 for (var nodes = root2.querySelectorAll(
16936 "link[data-precedence],style[data-precedence]"
16937 ), i = 0; i < nodes.length; i++) {
16938 var node = nodes[i];
16939 if ("LINK" === node.nodeName || "not all" !== node.getAttribute("media"))
16940 precedences.set(node.dataset.precedence, node), last = node;
16941 }
16942 last && precedences.set(LAST_PRECEDENCE, last);
16943 }
16944 nodes = resource.instance;
16945 node = nodes.getAttribute("data-precedence");
16946 i = precedences.get(node) || last;
16947 i === last && precedences.set(LAST_PRECEDENCE, nodes);
16948 precedences.set(node, nodes);
16949 this.count++;
16950 last = onUnsuspend.bind(this);
16951 nodes.addEventListener("load", last);
16952 nodes.addEventListener("error", last);
16953 i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = 9 === root2.nodeType ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild));
16954 resource.state.loading |= Inserted;
16955 }
16956 }
16957 function FiberRootNode(containerInfo, tag, hydrate2, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, formState) {
16958 this.tag = 1;
16959 this.containerInfo = containerInfo;
16960 this.pingCache = this.current = this.pendingChildren = null;
16961 this.timeoutHandle = noTimeout;
16962 this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
16963 this.callbackPriority = 0;
16964 this.expirationTimes = createLaneMap(-1);
16965 this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
16966 this.entanglements = createLaneMap(0);
16967 this.hiddenUpdates = createLaneMap(null);
16968 this.identifierPrefix = identifierPrefix;
16969 this.onUncaughtError = onUncaughtError;
16970 this.onCaughtError = onCaughtError;
16971 this.onRecoverableError = onRecoverableError;
16972 this.pooledCache = null;
16973 this.pooledCacheLanes = 0;
16974 this.formState = formState;
16975 this.incompleteTransitions = /* @__PURE__ */ new Map();
16976 this.passiveEffectDuration = this.effectDuration = -0;
16977 this.memoizedUpdaters = /* @__PURE__ */ new Set();
16978 containerInfo = this.pendingUpdatersLaneMap = [];
16979 for (tag = 0; 31 > tag; tag++) containerInfo.push(/* @__PURE__ */ new Set());
16980 this._debugRootType = hydrate2 ? "hydrateRoot()" : "createRoot()";
16981 }
16982 function createFiberRoot(containerInfo, tag, hydrate2, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator) {
16983 containerInfo = new FiberRootNode(
16984 containerInfo,
16985 tag,
16986 hydrate2,
16987 identifierPrefix,
16988 onUncaughtError,
16989 onCaughtError,
16990 onRecoverableError,
16991 onDefaultTransitionIndicator,
16992 formState
16993 );
16994 tag = ConcurrentMode;
16995 true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
16996 tag |= ProfileMode;
16997 isStrictMode = createFiber(3, null, null, tag);
16998 containerInfo.current = isStrictMode;
16999 isStrictMode.stateNode = containerInfo;
17000 tag = createCache();
17001 retainCache(tag);
17002 containerInfo.pooledCache = tag;
17003 retainCache(tag);
17004 isStrictMode.memoizedState = {
17005 element: initialChildren,
17006 isDehydrated: hydrate2,
17007 cache: tag
17008 };
17009 initializeUpdateQueue(isStrictMode);
17010 return containerInfo;
17011 }
17012 function getContextForSubtree(parentComponent) {
17013 if (!parentComponent) return emptyContextObject;
17014 parentComponent = emptyContextObject;
17015 return parentComponent;
17016 }
17017 function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
17018 if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot)
17019 try {
17020 injectedHook.onScheduleFiberRoot(rendererID, container, element);
17021 } catch (err) {
17022 hasLoggedError || (hasLoggedError = true, console.error(
17023 "React instrumentation encountered an error: %o",
17024 err
17025 ));
17026 }
17027 parentComponent = getContextForSubtree(parentComponent);
17028 null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
17029 isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = true, console.error(
17030 "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
17031 getComponentNameFromFiber(current) || "Unknown"
17032 ));
17033 container = createUpdate(lane);
17034 container.payload = { element };
17035 callback = void 0 === callback ? null : callback;
17036 null !== callback && ("function" !== typeof callback && console.error(
17037 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
17038 callback
17039 ), container.callback = callback);
17040 element = enqueueUpdate(rootFiber, container, lane);
17041 null !== element && (startUpdateTimerByLane(lane, "root.render()", null), scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
17042 }
17043 function markRetryLaneImpl(fiber, retryLane) {
17044 fiber = fiber.memoizedState;
17045 if (null !== fiber && null !== fiber.dehydrated) {
17046 var a = fiber.retryLane;
17047 fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
17048 }
17049 }
17050 function markRetryLaneIfNotHydrated(fiber, retryLane) {
17051 markRetryLaneImpl(fiber, retryLane);
17052 (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
17053 }
17054 function attemptContinuousHydration(fiber) {
17055 if (13 === fiber.tag || 31 === fiber.tag) {
17056 var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
17057 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 67108864);
17058 markRetryLaneIfNotHydrated(fiber, 67108864);
17059 }
17060 }
17061 function attemptHydrationAtCurrentPriority(fiber) {
17062 if (13 === fiber.tag || 31 === fiber.tag) {
17063 var lane = requestUpdateLane(fiber);
17064 lane = getBumpedLaneForHydrationByLane(lane);
17065 var root2 = enqueueConcurrentRenderForLane(fiber, lane);
17066 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
17067 markRetryLaneIfNotHydrated(fiber, lane);
17068 }
17069 }
17070 function getCurrentFiberForDevTools() {
17071 return current;
17072 }
17073 function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17074 var prevTransition = ReactSharedInternals.T;
17075 ReactSharedInternals.T = null;
17076 var previousPriority = ReactDOMSharedInternals.p;
17077 try {
17078 ReactDOMSharedInternals.p = DiscreteEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17079 } finally {
17080 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17081 }
17082 }
17083 function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17084 var prevTransition = ReactSharedInternals.T;
17085 ReactSharedInternals.T = null;
17086 var previousPriority = ReactDOMSharedInternals.p;
17087 try {
17088 ReactDOMSharedInternals.p = ContinuousEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17089 } finally {
17090 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17091 }
17092 }
17093 function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17094 if (_enabled) {
17095 var blockedOn = findInstanceBlockingEvent(nativeEvent);
17096 if (null === blockedOn)
17097 dispatchEventForPluginEventSystem(
17098 domEventName,
17099 eventSystemFlags,
17100 nativeEvent,
17101 return_targetInst,
17102 targetContainer
17103 ), clearIfContinuousEvent(domEventName, nativeEvent);
17104 else if (queueIfContinuousEvent(
17105 blockedOn,
17106 domEventName,
17107 eventSystemFlags,
17108 targetContainer,
17109 nativeEvent
17110 ))
17111 nativeEvent.stopPropagation();
17112 else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
17113 for (; null !== blockedOn; ) {
17114 var fiber = getInstanceFromNode(blockedOn);
17115 if (null !== fiber)
17116 switch (fiber.tag) {
17117 case 3:
17118 fiber = fiber.stateNode;
17119 if (fiber.current.memoizedState.isDehydrated) {
17120 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
17121 if (0 !== lanes) {
17122 var root2 = fiber;
17123 root2.pendingLanes |= 2;
17124 for (root2.entangledLanes |= 2; lanes; ) {
17125 var lane = 1 << 31 - clz32(lanes);
17126 root2.entanglements[1] |= lane;
17127 lanes &= ~lane;
17128 }
17129 ensureRootIsScheduled(fiber);
17130 (executionContext & (RenderContext | CommitContext)) === NoContext && (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS, flushSyncWorkAcrossRoots_impl(0, false));
17131 }
17132 }
17133 break;
17134 case 31:
17135 case 13:
17136 root2 = enqueueConcurrentRenderForLane(fiber, 2), null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
17137 }
17138 fiber = findInstanceBlockingEvent(nativeEvent);
17139 null === fiber && dispatchEventForPluginEventSystem(
17140 domEventName,
17141 eventSystemFlags,
17142 nativeEvent,
17143 return_targetInst,
17144 targetContainer
17145 );
17146 if (fiber === blockedOn) break;
17147 blockedOn = fiber;
17148 }
17149 null !== blockedOn && nativeEvent.stopPropagation();
17150 } else
17151 dispatchEventForPluginEventSystem(
17152 domEventName,
17153 eventSystemFlags,
17154 nativeEvent,
17155 null,
17156 targetContainer
17157 );
17158 }
17159 }
17160 function findInstanceBlockingEvent(nativeEvent) {
17161 nativeEvent = getEventTarget(nativeEvent);
17162 return findInstanceBlockingTarget(nativeEvent);
17163 }
17164 function findInstanceBlockingTarget(targetNode) {
17165 return_targetInst = null;
17166 targetNode = getClosestInstanceFromNode(targetNode);
17167 if (null !== targetNode) {
17168 var nearestMounted = getNearestMountedFiber(targetNode);
17169 if (null === nearestMounted) targetNode = null;
17170 else {
17171 var tag = nearestMounted.tag;
17172 if (13 === tag) {
17173 targetNode = getSuspenseInstanceFromFiber(nearestMounted);
17174 if (null !== targetNode) return targetNode;
17175 targetNode = null;
17176 } else if (31 === tag) {
17177 targetNode = getActivityInstanceFromFiber(nearestMounted);
17178 if (null !== targetNode) return targetNode;
17179 targetNode = null;
17180 } else if (3 === tag) {
17181 if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
17182 return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17183 targetNode = null;
17184 } else nearestMounted !== targetNode && (targetNode = null);
17185 }
17186 }
17187 return_targetInst = targetNode;
17188 return null;
17189 }
17190 function getEventPriority(domEventName) {
17191 switch (domEventName) {
17192 case "beforetoggle":
17193 case "cancel":
17194 case "click":
17195 case "close":
17196 case "contextmenu":
17197 case "copy":
17198 case "cut":
17199 case "auxclick":
17200 case "dblclick":
17201 case "dragend":
17202 case "dragstart":
17203 case "drop":
17204 case "focusin":
17205 case "focusout":
17206 case "input":
17207 case "invalid":
17208 case "keydown":
17209 case "keypress":
17210 case "keyup":
17211 case "mousedown":
17212 case "mouseup":
17213 case "paste":
17214 case "pause":
17215 case "play":
17216 case "pointercancel":
17217 case "pointerdown":
17218 case "pointerup":
17219 case "ratechange":
17220 case "reset":
17221 case "resize":
17222 case "seeked":
17223 case "submit":
17224 case "toggle":
17225 case "touchcancel":
17226 case "touchend":
17227 case "touchstart":
17228 case "volumechange":
17229 case "change":
17230 case "selectionchange":
17231 case "textInput":
17232 case "compositionstart":
17233 case "compositionend":
17234 case "compositionupdate":
17235 case "beforeblur":
17236 case "afterblur":
17237 case "beforeinput":
17238 case "blur":
17239 case "fullscreenchange":
17240 case "focus":
17241 case "hashchange":
17242 case "popstate":
17243 case "select":
17244 case "selectstart":
17245 return DiscreteEventPriority;
17246 case "drag":
17247 case "dragenter":
17248 case "dragexit":
17249 case "dragleave":
17250 case "dragover":
17251 case "mousemove":
17252 case "mouseout":
17253 case "mouseover":
17254 case "pointermove":
17255 case "pointerout":
17256 case "pointerover":
17257 case "scroll":
17258 case "touchmove":
17259 case "wheel":
17260 case "mouseenter":
17261 case "mouseleave":
17262 case "pointerenter":
17263 case "pointerleave":
17264 return ContinuousEventPriority;
17265 case "message":
17266 switch (getCurrentPriorityLevel()) {
17267 case ImmediatePriority:
17268 return DiscreteEventPriority;
17269 case UserBlockingPriority:
17270 return ContinuousEventPriority;
17271 case NormalPriority$1:
17272 case LowPriority:
17273 return DefaultEventPriority;
17274 case IdlePriority:
17275 return IdleEventPriority;
17276 default:
17277 return DefaultEventPriority;
17278 }
17279 default:
17280 return DefaultEventPriority;
17281 }
17282 }
17283 function clearIfContinuousEvent(domEventName, nativeEvent) {
17284 switch (domEventName) {
17285 case "focusin":
17286 case "focusout":
17287 queuedFocus = null;
17288 break;
17289 case "dragenter":
17290 case "dragleave":
17291 queuedDrag = null;
17292 break;
17293 case "mouseover":
17294 case "mouseout":
17295 queuedMouse = null;
17296 break;
17297 case "pointerover":
17298 case "pointerout":
17299 queuedPointers.delete(nativeEvent.pointerId);
17300 break;
17301 case "gotpointercapture":
17302 case "lostpointercapture":
17303 queuedPointerCaptures.delete(nativeEvent.pointerId);
17304 }
17305 }
17306 function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17307 if (null === existingQueuedEvent || existingQueuedEvent.nativeEvent !== nativeEvent)
17308 return existingQueuedEvent = {
17309 blockedOn,
17310 domEventName,
17311 eventSystemFlags,
17312 nativeEvent,
17313 targetContainers: [targetContainer]
17314 }, null !== blockedOn && (blockedOn = getInstanceFromNode(blockedOn), null !== blockedOn && attemptContinuousHydration(blockedOn)), existingQueuedEvent;
17315 existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
17316 blockedOn = existingQueuedEvent.targetContainers;
17317 null !== targetContainer && -1 === blockedOn.indexOf(targetContainer) && blockedOn.push(targetContainer);
17318 return existingQueuedEvent;
17319 }
17320 function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17321 switch (domEventName) {
17322 case "focusin":
17323 return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
17324 queuedFocus,
17325 blockedOn,
17326 domEventName,
17327 eventSystemFlags,
17328 targetContainer,
17329 nativeEvent
17330 ), true;
17331 case "dragenter":
17332 return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
17333 queuedDrag,
17334 blockedOn,
17335 domEventName,
17336 eventSystemFlags,
17337 targetContainer,
17338 nativeEvent
17339 ), true;
17340 case "mouseover":
17341 return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
17342 queuedMouse,
17343 blockedOn,
17344 domEventName,
17345 eventSystemFlags,
17346 targetContainer,
17347 nativeEvent
17348 ), true;
17349 case "pointerover":
17350 var pointerId = nativeEvent.pointerId;
17351 queuedPointers.set(
17352 pointerId,
17353 accumulateOrCreateContinuousQueuedReplayableEvent(
17354 queuedPointers.get(pointerId) || null,
17355 blockedOn,
17356 domEventName,
17357 eventSystemFlags,
17358 targetContainer,
17359 nativeEvent
17360 )
17361 );
17362 return true;
17363 case "gotpointercapture":
17364 return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
17365 pointerId,
17366 accumulateOrCreateContinuousQueuedReplayableEvent(
17367 queuedPointerCaptures.get(pointerId) || null,
17368 blockedOn,
17369 domEventName,
17370 eventSystemFlags,
17371 targetContainer,
17372 nativeEvent
17373 )
17374 ), true;
17375 }
17376 return false;
17377 }
17378 function attemptExplicitHydrationTarget(queuedTarget) {
17379 var targetInst = getClosestInstanceFromNode(queuedTarget.target);
17380 if (null !== targetInst) {
17381 var nearestMounted = getNearestMountedFiber(targetInst);
17382 if (null !== nearestMounted) {
17383 if (targetInst = nearestMounted.tag, 13 === targetInst) {
17384 if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), null !== targetInst) {
17385 queuedTarget.blockedOn = targetInst;
17386 runWithPriority(queuedTarget.priority, function() {
17387 attemptHydrationAtCurrentPriority(nearestMounted);
17388 });
17389 return;
17390 }
17391 } else if (31 === targetInst) {
17392 if (targetInst = getActivityInstanceFromFiber(nearestMounted), null !== targetInst) {
17393 queuedTarget.blockedOn = targetInst;
17394 runWithPriority(queuedTarget.priority, function() {
17395 attemptHydrationAtCurrentPriority(nearestMounted);
17396 });
17397 return;
17398 }
17399 } else if (3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
17400 queuedTarget.blockedOn = 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17401 return;
17402 }
17403 }
17404 }
17405 queuedTarget.blockedOn = null;
17406 }
17407 function attemptReplayContinuousQueuedEvent(queuedEvent) {
17408 if (null !== queuedEvent.blockedOn) return false;
17409 for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
17410 var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
17411 if (null === nextBlockedOn) {
17412 nextBlockedOn = queuedEvent.nativeEvent;
17413 var nativeEventClone = new nextBlockedOn.constructor(
17414 nextBlockedOn.type,
17415 nextBlockedOn
17416 ), event = nativeEventClone;
17417 null !== currentReplayingEvent && console.error(
17418 "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
17419 );
17420 currentReplayingEvent = event;
17421 nextBlockedOn.target.dispatchEvent(nativeEventClone);
17422 null === currentReplayingEvent && console.error(
17423 "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
17424 );
17425 currentReplayingEvent = null;
17426 } else
17427 return targetContainers = getInstanceFromNode(nextBlockedOn), null !== targetContainers && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, false;
17428 targetContainers.shift();
17429 }
17430 return true;
17431 }
17432 function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
17433 attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
17434 }
17435 function replayUnblockedEvents() {
17436 hasScheduledReplayAttempt = false;
17437 null !== queuedFocus && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null);
17438 null !== queuedDrag && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null);
17439 null !== queuedMouse && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null);
17440 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
17441 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
17442 }
17443 function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
17444 queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = true, Scheduler.unstable_scheduleCallback(
17445 Scheduler.unstable_NormalPriority,
17446 replayUnblockedEvents
17447 )));
17448 }
17449 function scheduleReplayQueueIfNeeded(formReplayingQueue) {
17450 lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
17451 Scheduler.unstable_NormalPriority,
17452 function() {
17453 lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
17454 for (var i = 0; i < formReplayingQueue.length; i += 3) {
17455 var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
17456 if ("function" !== typeof submitterOrAction)
17457 if (null === findInstanceBlockingTarget(submitterOrAction || form))
17458 continue;
17459 else break;
17460 var formInst = getInstanceFromNode(form);
17461 null !== formInst && (formReplayingQueue.splice(i, 3), i -= 3, form = {
17462 pending: true,
17463 data: formData,
17464 method: form.method,
17465 action: submitterOrAction
17466 }, Object.freeze(form), startHostTransition(
17467 formInst,
17468 form,
17469 submitterOrAction,
17470 formData
17471 ));
17472 }
17473 }
17474 ));
17475 }
17476 function retryIfBlockedOn(unblocked) {
17477 function unblock(queuedEvent) {
17478 return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
17479 }
17480 null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
17481 null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
17482 null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
17483 queuedPointers.forEach(unblock);
17484 queuedPointerCaptures.forEach(unblock);
17485 for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
17486 var queuedTarget = queuedExplicitHydrationTargets[i];
17487 queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
17488 }
17489 for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], null === i.blockedOn); )
17490 attemptExplicitHydrationTarget(i), null === i.blockedOn && queuedExplicitHydrationTargets.shift();
17491 i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
17492 if (null != i)
17493 for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
17494 var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
17495 if ("function" === typeof submitterOrAction)
17496 formProps || scheduleReplayQueueIfNeeded(i);
17497 else if (formProps) {
17498 var action = null;
17499 if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
17500 if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
17501 action = formProps.formAction;
17502 else {
17503 if (null !== findInstanceBlockingTarget(form)) continue;
17504 }
17505 else action = formProps.action;
17506 "function" === typeof action ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3);
17507 scheduleReplayQueueIfNeeded(i);
17508 }
17509 }
17510 }
17511 function defaultOnDefaultTransitionIndicator() {
17512 function handleNavigate(event) {
17513 event.canIntercept && "react-transition" === event.info && event.intercept({
17514 handler: function() {
17515 return new Promise(function(resolve) {
17516 return pendingResolve = resolve;
17517 });
17518 },
17519 focusReset: "manual",
17520 scroll: "manual"
17521 });
17522 }
17523 function handleNavigateComplete() {
17524 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17525 isCancelled || setTimeout(startFakeNavigation, 20);
17526 }
17527 function startFakeNavigation() {
17528 if (!isCancelled && !navigation.transition) {
17529 var currentEntry = navigation.currentEntry;
17530 currentEntry && null != currentEntry.url && navigation.navigate(currentEntry.url, {
17531 state: currentEntry.getState(),
17532 info: "react-transition",
17533 history: "replace"
17534 });
17535 }
17536 }
17537 if ("object" === typeof navigation) {
17538 var isCancelled = false, pendingResolve = null;
17539 navigation.addEventListener("navigate", handleNavigate);
17540 navigation.addEventListener("navigatesuccess", handleNavigateComplete);
17541 navigation.addEventListener("navigateerror", handleNavigateComplete);
17542 setTimeout(startFakeNavigation, 100);
17543 return function() {
17544 isCancelled = true;
17545 navigation.removeEventListener("navigate", handleNavigate);
17546 navigation.removeEventListener(
17547 "navigatesuccess",
17548 handleNavigateComplete
17549 );
17550 navigation.removeEventListener(
17551 "navigateerror",
17552 handleNavigateComplete
17553 );
17554 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17555 };
17556 }
17557 }
17558 function ReactDOMRoot(internalRoot) {
17559 this._internalRoot = internalRoot;
17560 }
17561 function ReactDOMHydrationRoot(internalRoot) {
17562 this._internalRoot = internalRoot;
17563 }
17564 function warnIfReactDOMContainerInDEV(container) {
17565 container[internalContainerInstanceKey] && (container._reactRootContainer ? console.error(
17566 "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
17567 ) : console.error(
17568 "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
17569 ));
17570 }
17571 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
17572 var Scheduler = require_scheduler(), React = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
17573 /* @__PURE__ */ Symbol.for("react.scope");
17574 var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
17575 /* @__PURE__ */ Symbol.for("react.legacy_hidden");
17576 /* @__PURE__ */ Symbol.for("react.tracing_marker");
17577 var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
17578 /* @__PURE__ */ Symbol.for("react.view_transition");
17579 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
17580 pending: false,
17581 data: null,
17582 method: null,
17583 action: null
17584 }), valueStack = [];
17585 var fiberStack = [];
17586 var index$jscomp$0 = -1, contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
17587 disabledLog.__reactDisabledLog = true;
17588 var prefix, suffix, reentry = false;
17589 var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
17590 var current = null, isRendering = false, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, requestPaint = Scheduler.unstable_requestPaint, now$1 = Scheduler.unstable_now, getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel, ImmediatePriority = Scheduler.unstable_ImmediatePriority, UserBlockingPriority = Scheduler.unstable_UserBlockingPriority, NormalPriority$1 = Scheduler.unstable_NormalPriority, LowPriority = Scheduler.unstable_LowPriority, IdlePriority = Scheduler.unstable_IdlePriority, log$1 = Scheduler.log, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null, hasLoggedError = false, isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2, nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, nextRetryLane = 4194304, DiscreteEventPriority = 2, ContinuousEventPriority = 8, DefaultEventPriority = 32, IdleEventPriority = 268435456, randomKey = Math.random().toString(36).slice(2), internalInstanceKey = "__reactFiber$" + randomKey, internalPropsKey = "__reactProps$" + randomKey, internalContainerInstanceKey = "__reactContainer$" + randomKey, internalEventHandlersKey = "__reactEvents$" + randomKey, internalEventHandlerListenersKey = "__reactListeners$" + randomKey, internalEventHandlesSetKey = "__reactHandles$" + randomKey, internalRootNodeResourcesKey = "__reactResources$" + randomKey, internalHoistableMarker = "__reactMarker$" + randomKey, allNativeEvents = /* @__PURE__ */ new Set(), registrationNameDependencies = {}, possibleRegistrationNames = {}, hasReadOnlyValue = {
17591 button: true,
17592 checkbox: true,
17593 image: true,
17594 hidden: true,
17595 radio: true,
17596 reset: true,
17597 submit: true
17598 }, VALID_ATTRIBUTE_NAME_REGEX = RegExp(
17599 "^[: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]*$"
17600 ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = false, didWarnCheckedDefaultChecked = false, didWarnSelectedSetOnOption = false, didWarnInvalidChild = false, didWarnInvalidInnerHTML = false;
17601 var didWarnValueDefaultValue = false;
17602 var valuePropNames = ["value", "defaultValue"], didWarnValDefaultVal = false, needsEscaping = /["'&<>\n\t]|^\s|\s$/, specialTags = "address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(
17603 " "
17604 ), inScopeTags = "applet caption html table td th marquee object template foreignObject desc title".split(
17605 " "
17606 ), buttonScopeTags = inScopeTags.concat(["button"]), impliedEndTags = "dd dt li option optgroup p rp rt".split(" "), emptyAncestorInfoDev = {
17607 current: null,
17608 formTag: null,
17609 aTagInScope: null,
17610 buttonTagInScope: null,
17611 nobrTagInScope: null,
17612 pTagInButtonScope: null,
17613 listItemTagAutoclosing: null,
17614 dlItemTagAutoclosing: null,
17615 containerTagInScope: null,
17616 implicitRootScope: false
17617 }, didWarn = {}, shorthandToLonghand = {
17618 animation: "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
17619 " "
17620 ),
17621 background: "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
17622 " "
17623 ),
17624 backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
17625 border: "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
17626 " "
17627 ),
17628 borderBlockEnd: [
17629 "borderBlockEndColor",
17630 "borderBlockEndStyle",
17631 "borderBlockEndWidth"
17632 ],
17633 borderBlockStart: [
17634 "borderBlockStartColor",
17635 "borderBlockStartStyle",
17636 "borderBlockStartWidth"
17637 ],
17638 borderBottom: [
17639 "borderBottomColor",
17640 "borderBottomStyle",
17641 "borderBottomWidth"
17642 ],
17643 borderColor: [
17644 "borderBottomColor",
17645 "borderLeftColor",
17646 "borderRightColor",
17647 "borderTopColor"
17648 ],
17649 borderImage: [
17650 "borderImageOutset",
17651 "borderImageRepeat",
17652 "borderImageSlice",
17653 "borderImageSource",
17654 "borderImageWidth"
17655 ],
17656 borderInlineEnd: [
17657 "borderInlineEndColor",
17658 "borderInlineEndStyle",
17659 "borderInlineEndWidth"
17660 ],
17661 borderInlineStart: [
17662 "borderInlineStartColor",
17663 "borderInlineStartStyle",
17664 "borderInlineStartWidth"
17665 ],
17666 borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
17667 borderRadius: [
17668 "borderBottomLeftRadius",
17669 "borderBottomRightRadius",
17670 "borderTopLeftRadius",
17671 "borderTopRightRadius"
17672 ],
17673 borderRight: [
17674 "borderRightColor",
17675 "borderRightStyle",
17676 "borderRightWidth"
17677 ],
17678 borderStyle: [
17679 "borderBottomStyle",
17680 "borderLeftStyle",
17681 "borderRightStyle",
17682 "borderTopStyle"
17683 ],
17684 borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
17685 borderWidth: [
17686 "borderBottomWidth",
17687 "borderLeftWidth",
17688 "borderRightWidth",
17689 "borderTopWidth"
17690 ],
17691 columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
17692 columns: ["columnCount", "columnWidth"],
17693 flex: ["flexBasis", "flexGrow", "flexShrink"],
17694 flexFlow: ["flexDirection", "flexWrap"],
17695 font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
17696 " "
17697 ),
17698 fontVariant: "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
17699 " "
17700 ),
17701 gap: ["columnGap", "rowGap"],
17702 grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
17703 " "
17704 ),
17705 gridArea: [
17706 "gridColumnEnd",
17707 "gridColumnStart",
17708 "gridRowEnd",
17709 "gridRowStart"
17710 ],
17711 gridColumn: ["gridColumnEnd", "gridColumnStart"],
17712 gridColumnGap: ["columnGap"],
17713 gridGap: ["columnGap", "rowGap"],
17714 gridRow: ["gridRowEnd", "gridRowStart"],
17715 gridRowGap: ["rowGap"],
17716 gridTemplate: [
17717 "gridTemplateAreas",
17718 "gridTemplateColumns",
17719 "gridTemplateRows"
17720 ],
17721 listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
17722 margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
17723 marker: ["markerEnd", "markerMid", "markerStart"],
17724 mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
17725 " "
17726 ),
17727 maskPosition: ["maskPositionX", "maskPositionY"],
17728 outline: ["outlineColor", "outlineStyle", "outlineWidth"],
17729 overflow: ["overflowX", "overflowY"],
17730 padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
17731 placeContent: ["alignContent", "justifyContent"],
17732 placeItems: ["alignItems", "justifyItems"],
17733 placeSelf: ["alignSelf", "justifySelf"],
17734 textDecoration: [
17735 "textDecorationColor",
17736 "textDecorationLine",
17737 "textDecorationStyle"
17738 ],
17739 textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
17740 transition: [
17741 "transitionDelay",
17742 "transitionDuration",
17743 "transitionProperty",
17744 "transitionTimingFunction"
17745 ],
17746 wordWrap: ["overflowWrap"]
17747 }, uppercasePattern = /([A-Z])/g, msPattern$1 = /^ms-/, badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/, msPattern = /^-ms-/, hyphenPattern = /-(.)/g, badStyleValueWithSemicolonPattern = /;\s*$/, warnedStyleNames = {}, warnedStyleValues = {}, warnedForNaNValue = false, warnedForInfinityValue = false, unitlessNumbers = new Set(
17748 "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(
17749 " "
17750 )
17751 ), MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", aliases = /* @__PURE__ */ new Map([
17752 ["acceptCharset", "accept-charset"],
17753 ["htmlFor", "for"],
17754 ["httpEquiv", "http-equiv"],
17755 ["crossOrigin", "crossorigin"],
17756 ["accentHeight", "accent-height"],
17757 ["alignmentBaseline", "alignment-baseline"],
17758 ["arabicForm", "arabic-form"],
17759 ["baselineShift", "baseline-shift"],
17760 ["capHeight", "cap-height"],
17761 ["clipPath", "clip-path"],
17762 ["clipRule", "clip-rule"],
17763 ["colorInterpolation", "color-interpolation"],
17764 ["colorInterpolationFilters", "color-interpolation-filters"],
17765 ["colorProfile", "color-profile"],
17766 ["colorRendering", "color-rendering"],
17767 ["dominantBaseline", "dominant-baseline"],
17768 ["enableBackground", "enable-background"],
17769 ["fillOpacity", "fill-opacity"],
17770 ["fillRule", "fill-rule"],
17771 ["floodColor", "flood-color"],
17772 ["floodOpacity", "flood-opacity"],
17773 ["fontFamily", "font-family"],
17774 ["fontSize", "font-size"],
17775 ["fontSizeAdjust", "font-size-adjust"],
17776 ["fontStretch", "font-stretch"],
17777 ["fontStyle", "font-style"],
17778 ["fontVariant", "font-variant"],
17779 ["fontWeight", "font-weight"],
17780 ["glyphName", "glyph-name"],
17781 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
17782 ["glyphOrientationVertical", "glyph-orientation-vertical"],
17783 ["horizAdvX", "horiz-adv-x"],
17784 ["horizOriginX", "horiz-origin-x"],
17785 ["imageRendering", "image-rendering"],
17786 ["letterSpacing", "letter-spacing"],
17787 ["lightingColor", "lighting-color"],
17788 ["markerEnd", "marker-end"],
17789 ["markerMid", "marker-mid"],
17790 ["markerStart", "marker-start"],
17791 ["overlinePosition", "overline-position"],
17792 ["overlineThickness", "overline-thickness"],
17793 ["paintOrder", "paint-order"],
17794 ["panose-1", "panose-1"],
17795 ["pointerEvents", "pointer-events"],
17796 ["renderingIntent", "rendering-intent"],
17797 ["shapeRendering", "shape-rendering"],
17798 ["stopColor", "stop-color"],
17799 ["stopOpacity", "stop-opacity"],
17800 ["strikethroughPosition", "strikethrough-position"],
17801 ["strikethroughThickness", "strikethrough-thickness"],
17802 ["strokeDasharray", "stroke-dasharray"],
17803 ["strokeDashoffset", "stroke-dashoffset"],
17804 ["strokeLinecap", "stroke-linecap"],
17805 ["strokeLinejoin", "stroke-linejoin"],
17806 ["strokeMiterlimit", "stroke-miterlimit"],
17807 ["strokeOpacity", "stroke-opacity"],
17808 ["strokeWidth", "stroke-width"],
17809 ["textAnchor", "text-anchor"],
17810 ["textDecoration", "text-decoration"],
17811 ["textRendering", "text-rendering"],
17812 ["transformOrigin", "transform-origin"],
17813 ["underlinePosition", "underline-position"],
17814 ["underlineThickness", "underline-thickness"],
17815 ["unicodeBidi", "unicode-bidi"],
17816 ["unicodeRange", "unicode-range"],
17817 ["unitsPerEm", "units-per-em"],
17818 ["vAlphabetic", "v-alphabetic"],
17819 ["vHanging", "v-hanging"],
17820 ["vIdeographic", "v-ideographic"],
17821 ["vMathematical", "v-mathematical"],
17822 ["vectorEffect", "vector-effect"],
17823 ["vertAdvY", "vert-adv-y"],
17824 ["vertOriginX", "vert-origin-x"],
17825 ["vertOriginY", "vert-origin-y"],
17826 ["wordSpacing", "word-spacing"],
17827 ["writingMode", "writing-mode"],
17828 ["xmlnsXlink", "xmlns:xlink"],
17829 ["xHeight", "x-height"]
17830 ]), possibleStandardNames = {
17831 accept: "accept",
17832 acceptcharset: "acceptCharset",
17833 "accept-charset": "acceptCharset",
17834 accesskey: "accessKey",
17835 action: "action",
17836 allowfullscreen: "allowFullScreen",
17837 alt: "alt",
17838 as: "as",
17839 async: "async",
17840 autocapitalize: "autoCapitalize",
17841 autocomplete: "autoComplete",
17842 autocorrect: "autoCorrect",
17843 autofocus: "autoFocus",
17844 autoplay: "autoPlay",
17845 autosave: "autoSave",
17846 capture: "capture",
17847 cellpadding: "cellPadding",
17848 cellspacing: "cellSpacing",
17849 challenge: "challenge",
17850 charset: "charSet",
17851 checked: "checked",
17852 children: "children",
17853 cite: "cite",
17854 class: "className",
17855 classid: "classID",
17856 classname: "className",
17857 cols: "cols",
17858 colspan: "colSpan",
17859 content: "content",
17860 contenteditable: "contentEditable",
17861 contextmenu: "contextMenu",
17862 controls: "controls",
17863 controlslist: "controlsList",
17864 coords: "coords",
17865 crossorigin: "crossOrigin",
17866 dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
17867 data: "data",
17868 datetime: "dateTime",
17869 default: "default",
17870 defaultchecked: "defaultChecked",
17871 defaultvalue: "defaultValue",
17872 defer: "defer",
17873 dir: "dir",
17874 disabled: "disabled",
17875 disablepictureinpicture: "disablePictureInPicture",
17876 disableremoteplayback: "disableRemotePlayback",
17877 download: "download",
17878 draggable: "draggable",
17879 enctype: "encType",
17880 enterkeyhint: "enterKeyHint",
17881 fetchpriority: "fetchPriority",
17882 for: "htmlFor",
17883 form: "form",
17884 formmethod: "formMethod",
17885 formaction: "formAction",
17886 formenctype: "formEncType",
17887 formnovalidate: "formNoValidate",
17888 formtarget: "formTarget",
17889 frameborder: "frameBorder",
17890 headers: "headers",
17891 height: "height",
17892 hidden: "hidden",
17893 high: "high",
17894 href: "href",
17895 hreflang: "hrefLang",
17896 htmlfor: "htmlFor",
17897 httpequiv: "httpEquiv",
17898 "http-equiv": "httpEquiv",
17899 icon: "icon",
17900 id: "id",
17901 imagesizes: "imageSizes",
17902 imagesrcset: "imageSrcSet",
17903 inert: "inert",
17904 innerhtml: "innerHTML",
17905 inputmode: "inputMode",
17906 integrity: "integrity",
17907 is: "is",
17908 itemid: "itemID",
17909 itemprop: "itemProp",
17910 itemref: "itemRef",
17911 itemscope: "itemScope",
17912 itemtype: "itemType",
17913 keyparams: "keyParams",
17914 keytype: "keyType",
17915 kind: "kind",
17916 label: "label",
17917 lang: "lang",
17918 list: "list",
17919 loop: "loop",
17920 low: "low",
17921 manifest: "manifest",
17922 marginwidth: "marginWidth",
17923 marginheight: "marginHeight",
17924 max: "max",
17925 maxlength: "maxLength",
17926 media: "media",
17927 mediagroup: "mediaGroup",
17928 method: "method",
17929 min: "min",
17930 minlength: "minLength",
17931 multiple: "multiple",
17932 muted: "muted",
17933 name: "name",
17934 nomodule: "noModule",
17935 nonce: "nonce",
17936 novalidate: "noValidate",
17937 open: "open",
17938 optimum: "optimum",
17939 pattern: "pattern",
17940 placeholder: "placeholder",
17941 playsinline: "playsInline",
17942 poster: "poster",
17943 preload: "preload",
17944 profile: "profile",
17945 radiogroup: "radioGroup",
17946 readonly: "readOnly",
17947 referrerpolicy: "referrerPolicy",
17948 rel: "rel",
17949 required: "required",
17950 reversed: "reversed",
17951 role: "role",
17952 rows: "rows",
17953 rowspan: "rowSpan",
17954 sandbox: "sandbox",
17955 scope: "scope",
17956 scoped: "scoped",
17957 scrolling: "scrolling",
17958 seamless: "seamless",
17959 selected: "selected",
17960 shape: "shape",
17961 size: "size",
17962 sizes: "sizes",
17963 span: "span",
17964 spellcheck: "spellCheck",
17965 src: "src",
17966 srcdoc: "srcDoc",
17967 srclang: "srcLang",
17968 srcset: "srcSet",
17969 start: "start",
17970 step: "step",
17971 style: "style",
17972 summary: "summary",
17973 tabindex: "tabIndex",
17974 target: "target",
17975 title: "title",
17976 type: "type",
17977 usemap: "useMap",
17978 value: "value",
17979 width: "width",
17980 wmode: "wmode",
17981 wrap: "wrap",
17982 about: "about",
17983 accentheight: "accentHeight",
17984 "accent-height": "accentHeight",
17985 accumulate: "accumulate",
17986 additive: "additive",
17987 alignmentbaseline: "alignmentBaseline",
17988 "alignment-baseline": "alignmentBaseline",
17989 allowreorder: "allowReorder",
17990 alphabetic: "alphabetic",
17991 amplitude: "amplitude",
17992 arabicform: "arabicForm",
17993 "arabic-form": "arabicForm",
17994 ascent: "ascent",
17995 attributename: "attributeName",
17996 attributetype: "attributeType",
17997 autoreverse: "autoReverse",
17998 azimuth: "azimuth",
17999 basefrequency: "baseFrequency",
18000 baselineshift: "baselineShift",
18001 "baseline-shift": "baselineShift",
18002 baseprofile: "baseProfile",
18003 bbox: "bbox",
18004 begin: "begin",
18005 bias: "bias",
18006 by: "by",
18007 calcmode: "calcMode",
18008 capheight: "capHeight",
18009 "cap-height": "capHeight",
18010 clip: "clip",
18011 clippath: "clipPath",
18012 "clip-path": "clipPath",
18013 clippathunits: "clipPathUnits",
18014 cliprule: "clipRule",
18015 "clip-rule": "clipRule",
18016 color: "color",
18017 colorinterpolation: "colorInterpolation",
18018 "color-interpolation": "colorInterpolation",
18019 colorinterpolationfilters: "colorInterpolationFilters",
18020 "color-interpolation-filters": "colorInterpolationFilters",
18021 colorprofile: "colorProfile",
18022 "color-profile": "colorProfile",
18023 colorrendering: "colorRendering",
18024 "color-rendering": "colorRendering",
18025 contentscripttype: "contentScriptType",
18026 contentstyletype: "contentStyleType",
18027 cursor: "cursor",
18028 cx: "cx",
18029 cy: "cy",
18030 d: "d",
18031 datatype: "datatype",
18032 decelerate: "decelerate",
18033 descent: "descent",
18034 diffuseconstant: "diffuseConstant",
18035 direction: "direction",
18036 display: "display",
18037 divisor: "divisor",
18038 dominantbaseline: "dominantBaseline",
18039 "dominant-baseline": "dominantBaseline",
18040 dur: "dur",
18041 dx: "dx",
18042 dy: "dy",
18043 edgemode: "edgeMode",
18044 elevation: "elevation",
18045 enablebackground: "enableBackground",
18046 "enable-background": "enableBackground",
18047 end: "end",
18048 exponent: "exponent",
18049 externalresourcesrequired: "externalResourcesRequired",
18050 fill: "fill",
18051 fillopacity: "fillOpacity",
18052 "fill-opacity": "fillOpacity",
18053 fillrule: "fillRule",
18054 "fill-rule": "fillRule",
18055 filter: "filter",
18056 filterres: "filterRes",
18057 filterunits: "filterUnits",
18058 floodopacity: "floodOpacity",
18059 "flood-opacity": "floodOpacity",
18060 floodcolor: "floodColor",
18061 "flood-color": "floodColor",
18062 focusable: "focusable",
18063 fontfamily: "fontFamily",
18064 "font-family": "fontFamily",
18065 fontsize: "fontSize",
18066 "font-size": "fontSize",
18067 fontsizeadjust: "fontSizeAdjust",
18068 "font-size-adjust": "fontSizeAdjust",
18069 fontstretch: "fontStretch",
18070 "font-stretch": "fontStretch",
18071 fontstyle: "fontStyle",
18072 "font-style": "fontStyle",
18073 fontvariant: "fontVariant",
18074 "font-variant": "fontVariant",
18075 fontweight: "fontWeight",
18076 "font-weight": "fontWeight",
18077 format: "format",
18078 from: "from",
18079 fx: "fx",
18080 fy: "fy",
18081 g1: "g1",
18082 g2: "g2",
18083 glyphname: "glyphName",
18084 "glyph-name": "glyphName",
18085 glyphorientationhorizontal: "glyphOrientationHorizontal",
18086 "glyph-orientation-horizontal": "glyphOrientationHorizontal",
18087 glyphorientationvertical: "glyphOrientationVertical",
18088 "glyph-orientation-vertical": "glyphOrientationVertical",
18089 glyphref: "glyphRef",
18090 gradienttransform: "gradientTransform",
18091 gradientunits: "gradientUnits",
18092 hanging: "hanging",
18093 horizadvx: "horizAdvX",
18094 "horiz-adv-x": "horizAdvX",
18095 horizoriginx: "horizOriginX",
18096 "horiz-origin-x": "horizOriginX",
18097 ideographic: "ideographic",
18098 imagerendering: "imageRendering",
18099 "image-rendering": "imageRendering",
18100 in2: "in2",
18101 in: "in",
18102 inlist: "inlist",
18103 intercept: "intercept",
18104 k1: "k1",
18105 k2: "k2",
18106 k3: "k3",
18107 k4: "k4",
18108 k: "k",
18109 kernelmatrix: "kernelMatrix",
18110 kernelunitlength: "kernelUnitLength",
18111 kerning: "kerning",
18112 keypoints: "keyPoints",
18113 keysplines: "keySplines",
18114 keytimes: "keyTimes",
18115 lengthadjust: "lengthAdjust",
18116 letterspacing: "letterSpacing",
18117 "letter-spacing": "letterSpacing",
18118 lightingcolor: "lightingColor",
18119 "lighting-color": "lightingColor",
18120 limitingconeangle: "limitingConeAngle",
18121 local: "local",
18122 markerend: "markerEnd",
18123 "marker-end": "markerEnd",
18124 markerheight: "markerHeight",
18125 markermid: "markerMid",
18126 "marker-mid": "markerMid",
18127 markerstart: "markerStart",
18128 "marker-start": "markerStart",
18129 markerunits: "markerUnits",
18130 markerwidth: "markerWidth",
18131 mask: "mask",
18132 maskcontentunits: "maskContentUnits",
18133 maskunits: "maskUnits",
18134 mathematical: "mathematical",
18135 mode: "mode",
18136 numoctaves: "numOctaves",
18137 offset: "offset",
18138 opacity: "opacity",
18139 operator: "operator",
18140 order: "order",
18141 orient: "orient",
18142 orientation: "orientation",
18143 origin: "origin",
18144 overflow: "overflow",
18145 overlineposition: "overlinePosition",
18146 "overline-position": "overlinePosition",
18147 overlinethickness: "overlineThickness",
18148 "overline-thickness": "overlineThickness",
18149 paintorder: "paintOrder",
18150 "paint-order": "paintOrder",
18151 panose1: "panose1",
18152 "panose-1": "panose1",
18153 pathlength: "pathLength",
18154 patterncontentunits: "patternContentUnits",
18155 patterntransform: "patternTransform",
18156 patternunits: "patternUnits",
18157 pointerevents: "pointerEvents",
18158 "pointer-events": "pointerEvents",
18159 points: "points",
18160 pointsatx: "pointsAtX",
18161 pointsaty: "pointsAtY",
18162 pointsatz: "pointsAtZ",
18163 popover: "popover",
18164 popovertarget: "popoverTarget",
18165 popovertargetaction: "popoverTargetAction",
18166 prefix: "prefix",
18167 preservealpha: "preserveAlpha",
18168 preserveaspectratio: "preserveAspectRatio",
18169 primitiveunits: "primitiveUnits",
18170 property: "property",
18171 r: "r",
18172 radius: "radius",
18173 refx: "refX",
18174 refy: "refY",
18175 renderingintent: "renderingIntent",
18176 "rendering-intent": "renderingIntent",
18177 repeatcount: "repeatCount",
18178 repeatdur: "repeatDur",
18179 requiredextensions: "requiredExtensions",
18180 requiredfeatures: "requiredFeatures",
18181 resource: "resource",
18182 restart: "restart",
18183 result: "result",
18184 results: "results",
18185 rotate: "rotate",
18186 rx: "rx",
18187 ry: "ry",
18188 scale: "scale",
18189 security: "security",
18190 seed: "seed",
18191 shaperendering: "shapeRendering",
18192 "shape-rendering": "shapeRendering",
18193 slope: "slope",
18194 spacing: "spacing",
18195 specularconstant: "specularConstant",
18196 specularexponent: "specularExponent",
18197 speed: "speed",
18198 spreadmethod: "spreadMethod",
18199 startoffset: "startOffset",
18200 stddeviation: "stdDeviation",
18201 stemh: "stemh",
18202 stemv: "stemv",
18203 stitchtiles: "stitchTiles",
18204 stopcolor: "stopColor",
18205 "stop-color": "stopColor",
18206 stopopacity: "stopOpacity",
18207 "stop-opacity": "stopOpacity",
18208 strikethroughposition: "strikethroughPosition",
18209 "strikethrough-position": "strikethroughPosition",
18210 strikethroughthickness: "strikethroughThickness",
18211 "strikethrough-thickness": "strikethroughThickness",
18212 string: "string",
18213 stroke: "stroke",
18214 strokedasharray: "strokeDasharray",
18215 "stroke-dasharray": "strokeDasharray",
18216 strokedashoffset: "strokeDashoffset",
18217 "stroke-dashoffset": "strokeDashoffset",
18218 strokelinecap: "strokeLinecap",
18219 "stroke-linecap": "strokeLinecap",
18220 strokelinejoin: "strokeLinejoin",
18221 "stroke-linejoin": "strokeLinejoin",
18222 strokemiterlimit: "strokeMiterlimit",
18223 "stroke-miterlimit": "strokeMiterlimit",
18224 strokewidth: "strokeWidth",
18225 "stroke-width": "strokeWidth",
18226 strokeopacity: "strokeOpacity",
18227 "stroke-opacity": "strokeOpacity",
18228 suppresscontenteditablewarning: "suppressContentEditableWarning",
18229 suppresshydrationwarning: "suppressHydrationWarning",
18230 surfacescale: "surfaceScale",
18231 systemlanguage: "systemLanguage",
18232 tablevalues: "tableValues",
18233 targetx: "targetX",
18234 targety: "targetY",
18235 textanchor: "textAnchor",
18236 "text-anchor": "textAnchor",
18237 textdecoration: "textDecoration",
18238 "text-decoration": "textDecoration",
18239 textlength: "textLength",
18240 textrendering: "textRendering",
18241 "text-rendering": "textRendering",
18242 to: "to",
18243 transform: "transform",
18244 transformorigin: "transformOrigin",
18245 "transform-origin": "transformOrigin",
18246 typeof: "typeof",
18247 u1: "u1",
18248 u2: "u2",
18249 underlineposition: "underlinePosition",
18250 "underline-position": "underlinePosition",
18251 underlinethickness: "underlineThickness",
18252 "underline-thickness": "underlineThickness",
18253 unicode: "unicode",
18254 unicodebidi: "unicodeBidi",
18255 "unicode-bidi": "unicodeBidi",
18256 unicoderange: "unicodeRange",
18257 "unicode-range": "unicodeRange",
18258 unitsperem: "unitsPerEm",
18259 "units-per-em": "unitsPerEm",
18260 unselectable: "unselectable",
18261 valphabetic: "vAlphabetic",
18262 "v-alphabetic": "vAlphabetic",
18263 values: "values",
18264 vectoreffect: "vectorEffect",
18265 "vector-effect": "vectorEffect",
18266 version: "version",
18267 vertadvy: "vertAdvY",
18268 "vert-adv-y": "vertAdvY",
18269 vertoriginx: "vertOriginX",
18270 "vert-origin-x": "vertOriginX",
18271 vertoriginy: "vertOriginY",
18272 "vert-origin-y": "vertOriginY",
18273 vhanging: "vHanging",
18274 "v-hanging": "vHanging",
18275 videographic: "vIdeographic",
18276 "v-ideographic": "vIdeographic",
18277 viewbox: "viewBox",
18278 viewtarget: "viewTarget",
18279 visibility: "visibility",
18280 vmathematical: "vMathematical",
18281 "v-mathematical": "vMathematical",
18282 vocab: "vocab",
18283 widths: "widths",
18284 wordspacing: "wordSpacing",
18285 "word-spacing": "wordSpacing",
18286 writingmode: "writingMode",
18287 "writing-mode": "writingMode",
18288 x1: "x1",
18289 x2: "x2",
18290 x: "x",
18291 xchannelselector: "xChannelSelector",
18292 xheight: "xHeight",
18293 "x-height": "xHeight",
18294 xlinkactuate: "xlinkActuate",
18295 "xlink:actuate": "xlinkActuate",
18296 xlinkarcrole: "xlinkArcrole",
18297 "xlink:arcrole": "xlinkArcrole",
18298 xlinkhref: "xlinkHref",
18299 "xlink:href": "xlinkHref",
18300 xlinkrole: "xlinkRole",
18301 "xlink:role": "xlinkRole",
18302 xlinkshow: "xlinkShow",
18303 "xlink:show": "xlinkShow",
18304 xlinktitle: "xlinkTitle",
18305 "xlink:title": "xlinkTitle",
18306 xlinktype: "xlinkType",
18307 "xlink:type": "xlinkType",
18308 xmlbase: "xmlBase",
18309 "xml:base": "xmlBase",
18310 xmllang: "xmlLang",
18311 "xml:lang": "xmlLang",
18312 xmlns: "xmlns",
18313 "xml:space": "xmlSpace",
18314 xmlnsxlink: "xmlnsXlink",
18315 "xmlns:xlink": "xmlnsXlink",
18316 xmlspace: "xmlSpace",
18317 y1: "y1",
18318 y2: "y2",
18319 y: "y",
18320 ychannelselector: "yChannelSelector",
18321 z: "z",
18322 zoomandpan: "zoomAndPan"
18323 }, ariaProperties = {
18324 "aria-current": 0,
18325 "aria-description": 0,
18326 "aria-details": 0,
18327 "aria-disabled": 0,
18328 "aria-hidden": 0,
18329 "aria-invalid": 0,
18330 "aria-keyshortcuts": 0,
18331 "aria-label": 0,
18332 "aria-roledescription": 0,
18333 "aria-autocomplete": 0,
18334 "aria-checked": 0,
18335 "aria-expanded": 0,
18336 "aria-haspopup": 0,
18337 "aria-level": 0,
18338 "aria-modal": 0,
18339 "aria-multiline": 0,
18340 "aria-multiselectable": 0,
18341 "aria-orientation": 0,
18342 "aria-placeholder": 0,
18343 "aria-pressed": 0,
18344 "aria-readonly": 0,
18345 "aria-required": 0,
18346 "aria-selected": 0,
18347 "aria-sort": 0,
18348 "aria-valuemax": 0,
18349 "aria-valuemin": 0,
18350 "aria-valuenow": 0,
18351 "aria-valuetext": 0,
18352 "aria-atomic": 0,
18353 "aria-busy": 0,
18354 "aria-live": 0,
18355 "aria-relevant": 0,
18356 "aria-dropeffect": 0,
18357 "aria-grabbed": 0,
18358 "aria-activedescendant": 0,
18359 "aria-colcount": 0,
18360 "aria-colindex": 0,
18361 "aria-colspan": 0,
18362 "aria-controls": 0,
18363 "aria-describedby": 0,
18364 "aria-errormessage": 0,
18365 "aria-flowto": 0,
18366 "aria-labelledby": 0,
18367 "aria-owns": 0,
18368 "aria-posinset": 0,
18369 "aria-rowcount": 0,
18370 "aria-rowindex": 0,
18371 "aria-rowspan": 0,
18372 "aria-setsize": 0,
18373 "aria-braillelabel": 0,
18374 "aria-brailleroledescription": 0,
18375 "aria-colindextext": 0,
18376 "aria-rowindextext": 0
18377 }, warnedProperties$1 = {}, rARIA$1 = RegExp(
18378 "^(aria)-[: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]*$"
18379 ), rARIACamel$1 = RegExp(
18380 "^(aria)[A-Z][: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]*$"
18381 ), didWarnValueNull = false, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp(
18382 "^(aria)-[: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]*$"
18383 ), rARIACamel = RegExp(
18384 "^(aria)[A-Z][: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]*$"
18385 ), isJavaScriptProtocol = /^[\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, currentReplayingEvent = null, restoreTarget = null, restoreQueue = null, isInsideEventHandler = false, canUseDOM = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), passiveBrowserEventsSupported = false;
18386 if (canUseDOM)
18387 try {
18388 var options$jscomp$0 = {};
18389 Object.defineProperty(options$jscomp$0, "passive", {
18390 get: function() {
18391 passiveBrowserEventsSupported = true;
18392 }
18393 });
18394 window.addEventListener("test", options$jscomp$0, options$jscomp$0);
18395 window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
18396 } catch (e) {
18397 passiveBrowserEventsSupported = false;
18398 }
18399 var root = null, startText = null, fallbackText = null, EventInterface = {
18400 eventPhase: 0,
18401 bubbles: 0,
18402 cancelable: 0,
18403 timeStamp: function(event) {
18404 return event.timeStamp || Date.now();
18405 },
18406 defaultPrevented: 0,
18407 isTrusted: 0
18408 }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
18409 screenX: 0,
18410 screenY: 0,
18411 clientX: 0,
18412 clientY: 0,
18413 pageX: 0,
18414 pageY: 0,
18415 ctrlKey: 0,
18416 shiftKey: 0,
18417 altKey: 0,
18418 metaKey: 0,
18419 getModifierState: getEventModifierState,
18420 button: 0,
18421 buttons: 0,
18422 relatedTarget: function(event) {
18423 return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
18424 },
18425 movementX: function(event) {
18426 if ("movementX" in event) return event.movementX;
18427 event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event);
18428 return lastMovementX;
18429 },
18430 movementY: function(event) {
18431 return "movementY" in event ? event.movementY : lastMovementY;
18432 }
18433 }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
18434 animationName: 0,
18435 elapsedTime: 0,
18436 pseudoElement: 0
18437 }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
18438 clipboardData: function(event) {
18439 return "clipboardData" in event ? event.clipboardData : window.clipboardData;
18440 }
18441 }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(
18442 CompositionEventInterface
18443 ), SyntheticInputEvent = SyntheticCompositionEvent, normalizeKey = {
18444 Esc: "Escape",
18445 Spacebar: " ",
18446 Left: "ArrowLeft",
18447 Up: "ArrowUp",
18448 Right: "ArrowRight",
18449 Down: "ArrowDown",
18450 Del: "Delete",
18451 Win: "OS",
18452 Menu: "ContextMenu",
18453 Apps: "ContextMenu",
18454 Scroll: "ScrollLock",
18455 MozPrintableKey: "Unidentified"
18456 }, translateToKey = {
18457 8: "Backspace",
18458 9: "Tab",
18459 12: "Clear",
18460 13: "Enter",
18461 16: "Shift",
18462 17: "Control",
18463 18: "Alt",
18464 19: "Pause",
18465 20: "CapsLock",
18466 27: "Escape",
18467 32: " ",
18468 33: "PageUp",
18469 34: "PageDown",
18470 35: "End",
18471 36: "Home",
18472 37: "ArrowLeft",
18473 38: "ArrowUp",
18474 39: "ArrowRight",
18475 40: "ArrowDown",
18476 45: "Insert",
18477 46: "Delete",
18478 112: "F1",
18479 113: "F2",
18480 114: "F3",
18481 115: "F4",
18482 116: "F5",
18483 117: "F6",
18484 118: "F7",
18485 119: "F8",
18486 120: "F9",
18487 121: "F10",
18488 122: "F11",
18489 123: "F12",
18490 144: "NumLock",
18491 145: "ScrollLock",
18492 224: "Meta"
18493 }, modifierKeyToProp = {
18494 Alt: "altKey",
18495 Control: "ctrlKey",
18496 Meta: "metaKey",
18497 Shift: "shiftKey"
18498 }, KeyboardEventInterface = assign({}, UIEventInterface, {
18499 key: function(nativeEvent) {
18500 if (nativeEvent.key) {
18501 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
18502 if ("Unidentified" !== key) return key;
18503 }
18504 return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
18505 },
18506 code: 0,
18507 location: 0,
18508 ctrlKey: 0,
18509 shiftKey: 0,
18510 altKey: 0,
18511 metaKey: 0,
18512 repeat: 0,
18513 locale: 0,
18514 getModifierState: getEventModifierState,
18515 charCode: function(event) {
18516 return "keypress" === event.type ? getEventCharCode(event) : 0;
18517 },
18518 keyCode: function(event) {
18519 return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18520 },
18521 which: function(event) {
18522 return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18523 }
18524 }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
18525 pointerId: 0,
18526 width: 0,
18527 height: 0,
18528 pressure: 0,
18529 tangentialPressure: 0,
18530 tiltX: 0,
18531 tiltY: 0,
18532 twist: 0,
18533 pointerType: 0,
18534 isPrimary: 0
18535 }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
18536 touches: 0,
18537 targetTouches: 0,
18538 changedTouches: 0,
18539 altKey: 0,
18540 metaKey: 0,
18541 ctrlKey: 0,
18542 shiftKey: 0,
18543 getModifierState: getEventModifierState
18544 }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
18545 propertyName: 0,
18546 elapsedTime: 0,
18547 pseudoElement: 0
18548 }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
18549 deltaX: function(event) {
18550 return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
18551 },
18552 deltaY: function(event) {
18553 return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
18554 },
18555 deltaZ: 0,
18556 deltaMode: 0
18557 }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
18558 newState: 0,
18559 oldState: 0
18560 }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], START_KEYCODE = 229, canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
18561 canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
18562 var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode, useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && 8 < documentMode && 11 >= documentMode), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), hasSpaceKeypress = false, isComposing = false, supportedInputTypes = {
18563 color: true,
18564 date: true,
18565 datetime: true,
18566 "datetime-local": true,
18567 email: true,
18568 month: true,
18569 number: true,
18570 password: true,
18571 range: true,
18572 search: true,
18573 tel: true,
18574 text: true,
18575 time: true,
18576 url: true,
18577 week: true
18578 }, activeElement$1 = null, activeElementInst$1 = null, isInputEventSupported = false;
18579 canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || 9 < document.documentMode));
18580 var objectIs = "function" === typeof Object.is ? Object.is : is, skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = false, vendorPrefixes = {
18581 animationend: makePrefixMap("Animation", "AnimationEnd"),
18582 animationiteration: makePrefixMap("Animation", "AnimationIteration"),
18583 animationstart: makePrefixMap("Animation", "AnimationStart"),
18584 transitionrun: makePrefixMap("Transition", "TransitionRun"),
18585 transitionstart: makePrefixMap("Transition", "TransitionStart"),
18586 transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
18587 transitionend: makePrefixMap("Transition", "TransitionEnd")
18588 }, prefixedEventNames = {}, style = {};
18589 canUseDOM && (style = document.createElement("div").style, "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition);
18590 var ANIMATION_END = getVendorPrefixedEventName("animationend"), ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"), ANIMATION_START = getVendorPrefixedEventName("animationstart"), TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"), TRANSITION_START = getVendorPrefixedEventName("transitionstart"), TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"), TRANSITION_END = getVendorPrefixedEventName("transitionend"), topLevelEventsToReactNames = /* @__PURE__ */ new Map(), simpleEventPluginEvents = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
18591 " "
18592 );
18593 simpleEventPluginEvents.push("scrollEnd");
18594 var lastResetTime = 0;
18595 if ("object" === typeof performance && "function" === typeof performance.now) {
18596 var localPerformance = performance;
18597 var getCurrentTime = function() {
18598 return localPerformance.now();
18599 };
18600 } else {
18601 var localDate = Date;
18602 getCurrentTime = function() {
18603 return localDate.now();
18604 };
18605 }
18606 var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
18607 if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
18608 var event = new window.ErrorEvent("error", {
18609 bubbles: true,
18610 cancelable: true,
18611 message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
18612 error
18613 });
18614 if (!window.dispatchEvent(event)) return;
18615 } else if ("object" === typeof process && "function" === typeof process.emit) {
18616 process.emit("uncaughtException", error);
18617 return;
18618 }
18619 console.error(error);
18620 }, OMITTED_PROP_ERROR = "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.", EMPTY_ARRAY = 0, COMPLEX_ARRAY = 1, PRIMITIVE_ARRAY = 2, ENTRIES_ARRAY = 3, REMOVED = "\u2013\xA0", ADDED = "+\xA0", UNCHANGED = "\u2007\xA0", supportsUserTiming = "undefined" !== typeof console && "function" === typeof console.timeStamp && "undefined" !== typeof performance && "function" === typeof performance.measure, COMPONENTS_TRACK = "Components \u269B", LANES_TRACK_GROUP = "Scheduler \u269B", currentTrack = "Blocking", alreadyWarnedForDeepEquality = false, reusableComponentDevToolDetails = {
18621 color: "primary",
18622 properties: null,
18623 tooltipText: "",
18624 track: COMPONENTS_TRACK
18625 }, reusableComponentOptions = {
18626 start: -0,
18627 end: -0,
18628 detail: { devtools: reusableComponentDevToolDetails }
18629 }, resuableChangedPropsEntry = ["Changed Props", ""], DEEP_EQUALITY_WARNING = "This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.", reusableDeeplyEqualPropsEntry = ["Changed Props", DEEP_EQUALITY_WARNING], OffscreenVisible = 1, OffscreenPassiveEffectsConnected = 2, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, emptyContextObject = {};
18630 Object.freeze(emptyContextObject);
18631 var resolveFamily = null, failedBoundaries = null, NoMode = 0, ConcurrentMode = 1, ProfileMode = 2, StrictLegacyMode = 8, StrictEffectsMode = 16, SuspenseyImagesMode = 32;
18632 var hasBadMapPolyfill = false;
18633 try {
18634 var nonExtensibleObject = Object.preventExtensions({});
18635 /* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
18636 /* @__PURE__ */ new Set([nonExtensibleObject]);
18637 } catch (e$3) {
18638 hasBadMapPolyfill = true;
18639 }
18640 var CapturedStacks = /* @__PURE__ */ new WeakMap(), forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(
18641 "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
18642 ), valueCursor = createCursor(null);
18643 var rendererCursorDEV = createCursor(null);
18644 var rendererSigil = {};
18645 var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
18646 var listeners = [], signal = this.signal = {
18647 aborted: false,
18648 addEventListener: function(type, listener) {
18649 listeners.push(listener);
18650 }
18651 };
18652 this.abort = function() {
18653 signal.aborted = true;
18654 listeners.forEach(function(listener) {
18655 return listener();
18656 });
18657 };
18658 }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
18659 $$typeof: REACT_CONTEXT_TYPE,
18660 Consumer: null,
18661 Provider: null,
18662 _currentValue: null,
18663 _currentValue2: null,
18664 _threadCount: 0,
18665 _currentRenderer: null,
18666 _currentRenderer2: null
18667 }, now = Scheduler.unstable_now, createTask = console.createTask ? console.createTask : function() {
18668 return null;
18669 }, SPAWNED_UPDATE = 1, PINGED_UPDATE = 2, renderStartTime = -0, commitStartTime = -0, commitEndTime = -0, commitErrors = null, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, componentEffectStartTime = -1.1, componentEffectEndTime = -1.1, componentEffectErrors = null, componentEffectSpawnedUpdate = false, blockingClampTime = -0, blockingUpdateTime = -1.1, blockingUpdateTask = null, blockingUpdateType = 0, blockingUpdateMethodName = null, blockingUpdateComponentName = null, blockingEventTime = -1.1, blockingEventType = null, blockingEventRepeatTime = -1.1, blockingSuspendedTime = -1.1, transitionClampTime = -0, transitionStartTime = -1.1, transitionUpdateTime = -1.1, transitionUpdateType = 0, transitionUpdateTask = null, transitionUpdateMethodName = null, transitionUpdateComponentName = null, transitionEventTime = -1.1, transitionEventType = null, transitionEventRepeatTime = -1.1, transitionSuspendedTime = -1.1, retryClampTime = -0, idleClampTime = -0, animatingLanes = 0, animatingTask = null, yieldReason = 0, yieldStartTime = -1.1, currentUpdateIsNested = false, nestedUpdateScheduled = false, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
18670 ReactSharedInternals.S = function(transition, returnValue) {
18671 globalMostRecentTransitionTime = now$1();
18672 if ("object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then) {
18673 if (0 > transitionStartTime && 0 > transitionUpdateTime) {
18674 transitionStartTime = now();
18675 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
18676 if (newEventTime !== transitionEventRepeatTime || newEventType !== transitionEventType)
18677 transitionEventRepeatTime = -1.1;
18678 transitionEventTime = newEventTime;
18679 transitionEventType = newEventType;
18680 }
18681 entangleAsyncAction(transition, returnValue);
18682 }
18683 null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
18684 };
18685 var resumedCache = createCursor(null), ReactStrictModeWarnings = {
18686 recordUnsafeLifecycleWarnings: function() {
18687 },
18688 flushPendingUnsafeLifecycleWarnings: function() {
18689 },
18690 recordLegacyContextWarning: function() {
18691 },
18692 flushLegacyContextWarning: function() {
18693 },
18694 discardPendingWarnings: function() {
18695 }
18696 }, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
18697 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
18698 didWarnAboutUnsafeLifecycles.has(fiber.type) || ("function" === typeof instance.componentWillMount && true !== instance.componentWillMount.__suppressDeprecationWarning && pendingComponentWillMountWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillMount && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), "function" === typeof instance.componentWillReceiveProps && true !== instance.componentWillReceiveProps.__suppressDeprecationWarning && pendingComponentWillReceivePropsWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillReceiveProps && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), "function" === typeof instance.componentWillUpdate && true !== instance.componentWillUpdate.__suppressDeprecationWarning && pendingComponentWillUpdateWarnings.push(fiber), fiber.mode & StrictLegacyMode && "function" === typeof instance.UNSAFE_componentWillUpdate && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
18699 };
18700 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
18701 var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18702 0 < pendingComponentWillMountWarnings.length && (pendingComponentWillMountWarnings.forEach(function(fiber) {
18703 componentWillMountUniqueNames.add(
18704 getComponentNameFromFiber(fiber) || "Component"
18705 );
18706 didWarnAboutUnsafeLifecycles.add(fiber.type);
18707 }), pendingComponentWillMountWarnings = []);
18708 var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18709 0 < pendingUNSAFE_ComponentWillMountWarnings.length && (pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
18710 UNSAFE_componentWillMountUniqueNames.add(
18711 getComponentNameFromFiber(fiber) || "Component"
18712 );
18713 didWarnAboutUnsafeLifecycles.add(fiber.type);
18714 }), pendingUNSAFE_ComponentWillMountWarnings = []);
18715 var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18716 0 < pendingComponentWillReceivePropsWarnings.length && (pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
18717 componentWillReceivePropsUniqueNames.add(
18718 getComponentNameFromFiber(fiber) || "Component"
18719 );
18720 didWarnAboutUnsafeLifecycles.add(fiber.type);
18721 }), pendingComponentWillReceivePropsWarnings = []);
18722 var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18723 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length && (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
18724 function(fiber) {
18725 UNSAFE_componentWillReceivePropsUniqueNames.add(
18726 getComponentNameFromFiber(fiber) || "Component"
18727 );
18728 didWarnAboutUnsafeLifecycles.add(fiber.type);
18729 }
18730 ), pendingUNSAFE_ComponentWillReceivePropsWarnings = []);
18731 var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18732 0 < pendingComponentWillUpdateWarnings.length && (pendingComponentWillUpdateWarnings.forEach(function(fiber) {
18733 componentWillUpdateUniqueNames.add(
18734 getComponentNameFromFiber(fiber) || "Component"
18735 );
18736 didWarnAboutUnsafeLifecycles.add(fiber.type);
18737 }), pendingComponentWillUpdateWarnings = []);
18738 var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18739 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
18740 UNSAFE_componentWillUpdateUniqueNames.add(
18741 getComponentNameFromFiber(fiber) || "Component"
18742 );
18743 didWarnAboutUnsafeLifecycles.add(fiber.type);
18744 }), pendingUNSAFE_ComponentWillUpdateWarnings = []);
18745 if (0 < UNSAFE_componentWillMountUniqueNames.size) {
18746 var sortedNames = setToSortedString(
18747 UNSAFE_componentWillMountUniqueNames
18748 );
18749 console.error(
18750 "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",
18751 sortedNames
18752 );
18753 }
18754 0 < UNSAFE_componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18755 UNSAFE_componentWillReceivePropsUniqueNames
18756 ), console.error(
18757 "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s",
18758 sortedNames
18759 ));
18760 0 < UNSAFE_componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(
18761 UNSAFE_componentWillUpdateUniqueNames
18762 ), console.error(
18763 "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",
18764 sortedNames
18765 ));
18766 0 < componentWillMountUniqueNames.size && (sortedNames = setToSortedString(componentWillMountUniqueNames), console.warn(
18767 "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18768 sortedNames
18769 ));
18770 0 < componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18771 componentWillReceivePropsUniqueNames
18772 ), console.warn(
18773 "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18774 sortedNames
18775 ));
18776 0 < componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(componentWillUpdateUniqueNames), console.warn(
18777 "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
18778 sortedNames
18779 ));
18780 };
18781 var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
18782 ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
18783 var strictRoot = null;
18784 for (var node = fiber; null !== node; )
18785 node.mode & StrictLegacyMode && (strictRoot = node), node = node.return;
18786 null === strictRoot ? console.error(
18787 "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."
18788 ) : !didWarnAboutLegacyContext.has(fiber.type) && (node = pendingLegacyContextWarning.get(strictRoot), null != fiber.type.contextTypes || null != fiber.type.childContextTypes || null !== instance && "function" === typeof instance.getChildContext) && (void 0 === node && (node = [], pendingLegacyContextWarning.set(strictRoot, node)), node.push(fiber));
18789 };
18790 ReactStrictModeWarnings.flushLegacyContextWarning = function() {
18791 pendingLegacyContextWarning.forEach(function(fiberArray) {
18792 if (0 !== fiberArray.length) {
18793 var firstFiber = fiberArray[0], uniqueNames = /* @__PURE__ */ new Set();
18794 fiberArray.forEach(function(fiber) {
18795 uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
18796 didWarnAboutLegacyContext.add(fiber.type);
18797 });
18798 var sortedNames = setToSortedString(uniqueNames);
18799 runWithFiberInDEV(firstFiber, function() {
18800 console.error(
18801 "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
18802 sortedNames
18803 );
18804 });
18805 }
18806 });
18807 };
18808 ReactStrictModeWarnings.discardPendingWarnings = function() {
18809 pendingComponentWillMountWarnings = [];
18810 pendingUNSAFE_ComponentWillMountWarnings = [];
18811 pendingComponentWillReceivePropsWarnings = [];
18812 pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
18813 pendingComponentWillUpdateWarnings = [];
18814 pendingUNSAFE_ComponentWillUpdateWarnings = [];
18815 pendingLegacyContextWarning = /* @__PURE__ */ new Map();
18816 };
18817 var callComponent = {
18818 react_stack_bottom_frame: function(Component, props, secondArg) {
18819 var wasRendering = isRendering;
18820 isRendering = true;
18821 try {
18822 return Component(props, secondArg);
18823 } finally {
18824 isRendering = wasRendering;
18825 }
18826 }
18827 }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
18828 react_stack_bottom_frame: function(instance) {
18829 var wasRendering = isRendering;
18830 isRendering = true;
18831 try {
18832 return instance.render();
18833 } finally {
18834 isRendering = wasRendering;
18835 }
18836 }
18837 }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callComponentDidMount = {
18838 react_stack_bottom_frame: function(finishedWork, instance) {
18839 try {
18840 instance.componentDidMount();
18841 } catch (error) {
18842 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18843 }
18844 }
18845 }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
18846 callComponentDidMount
18847 ), callComponentDidUpdate = {
18848 react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
18849 try {
18850 instance.componentDidUpdate(prevProps, prevState, snapshot);
18851 } catch (error) {
18852 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18853 }
18854 }
18855 }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
18856 callComponentDidUpdate
18857 ), callComponentDidCatch = {
18858 react_stack_bottom_frame: function(instance, errorInfo) {
18859 var stack = errorInfo.stack;
18860 instance.componentDidCatch(errorInfo.value, {
18861 componentStack: null !== stack ? stack : ""
18862 });
18863 }
18864 }, callComponentDidCatchInDEV = callComponentDidCatch.react_stack_bottom_frame.bind(
18865 callComponentDidCatch
18866 ), callComponentWillUnmount = {
18867 react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
18868 try {
18869 instance.componentWillUnmount();
18870 } catch (error) {
18871 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18872 }
18873 }
18874 }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
18875 callComponentWillUnmount
18876 ), callCreate = {
18877 react_stack_bottom_frame: function(effect) {
18878 var create = effect.create;
18879 effect = effect.inst;
18880 create = create();
18881 return effect.destroy = create;
18882 }
18883 }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
18884 react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
18885 try {
18886 destroy();
18887 } catch (error) {
18888 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18889 }
18890 }
18891 }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
18892 react_stack_bottom_frame: function(lazy) {
18893 var init = lazy._init;
18894 return init(lazy._payload);
18895 }
18896 }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), SuspenseException = Error(
18897 "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
18898 ), SuspenseyCommitException = Error(
18899 "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
18900 ), SuspenseActionException = Error(
18901 "Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."
18902 ), noopSuspenseyCommitThenable = {
18903 then: function() {
18904 console.error(
18905 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
18906 );
18907 }
18908 }, suspendedThenable = null, needsToResetSuspendedThenableDEV = false, thenableState$1 = null, thenableIndexCounter$1 = 0, currentDebugInfo = null, didWarnAboutMaps;
18909 var didWarnAboutGenerators = didWarnAboutMaps = false;
18910 var ownerHasKeyUseWarning = {};
18911 var ownerHasFunctionTypeWarning = {};
18912 var ownerHasSymbolTypeWarning = {};
18913 warnForMissingKey = function(returnFiber, workInProgress2, child) {
18914 if (null !== child && "object" === typeof child && child._store && (!child._store.validated && null == child.key || 2 === child._store.validated)) {
18915 if ("object" !== typeof child._store)
18916 throw Error(
18917 "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
18918 );
18919 child._store.validated = 1;
18920 var componentName2 = getComponentNameFromFiber(returnFiber), componentKey = componentName2 || "null";
18921 if (!ownerHasKeyUseWarning[componentKey]) {
18922 ownerHasKeyUseWarning[componentKey] = true;
18923 child = child._owner;
18924 returnFiber = returnFiber._debugOwner;
18925 var currentComponentErrorInfo = "";
18926 returnFiber && "number" === typeof returnFiber.tag && (componentKey = getComponentNameFromFiber(returnFiber)) && (currentComponentErrorInfo = "\n\nCheck the render method of `" + componentKey + "`.");
18927 currentComponentErrorInfo || componentName2 && (currentComponentErrorInfo = "\n\nCheck the top-level render call using <" + componentName2 + ">.");
18928 var childOwnerAppendix = "";
18929 null != child && returnFiber !== child && (componentName2 = null, "number" === typeof child.tag ? componentName2 = getComponentNameFromFiber(child) : "string" === typeof child.name && (componentName2 = child.name), componentName2 && (childOwnerAppendix = " It was passed a child from " + componentName2 + "."));
18930 runWithFiberInDEV(workInProgress2, function() {
18931 console.error(
18932 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
18933 currentComponentErrorInfo,
18934 childOwnerAppendix
18935 );
18936 });
18937 }
18938 }
18939 };
18940 var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), UpdateState = 0, ReplaceState = 1, ForceUpdate = 2, CaptureUpdate = 3, hasForceUpdate = false;
18941 var didWarnUpdateInsideUpdate = false;
18942 var currentlyProcessingQueue = null;
18943 var didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, SubtreeSuspenseContextMask = 1, ForceSuspenseFallback = 2, suspenseStackCursor = createCursor(0), NoFlags = 0, HasEffect = 1, Insertion = 2, Layout = 4, Passive = 8, didWarnUncachedGetSnapshot;
18944 var didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
18945 var didWarnAboutUseWrappedInTryCatch = /* @__PURE__ */ new Set();
18946 var didWarnAboutAsyncClientComponent = /* @__PURE__ */ new Set();
18947 var didWarnAboutUseFormState = /* @__PURE__ */ new Set();
18948 var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0, RE_RENDER_LIMIT = 25, currentHookNameInDev = null, hookTypesDev = null, hookTypesUpdateIndexDev = -1, ignorePreviousDependencies = false, ContextOnlyDispatcher = {
18949 readContext,
18950 use,
18951 useCallback: throwInvalidHookError,
18952 useContext: throwInvalidHookError,
18953 useEffect: throwInvalidHookError,
18954 useImperativeHandle: throwInvalidHookError,
18955 useLayoutEffect: throwInvalidHookError,
18956 useInsertionEffect: throwInvalidHookError,
18957 useMemo: throwInvalidHookError,
18958 useReducer: throwInvalidHookError,
18959 useRef: throwInvalidHookError,
18960 useState: throwInvalidHookError,
18961 useDebugValue: throwInvalidHookError,
18962 useDeferredValue: throwInvalidHookError,
18963 useTransition: throwInvalidHookError,
18964 useSyncExternalStore: throwInvalidHookError,
18965 useId: throwInvalidHookError,
18966 useHostTransitionStatus: throwInvalidHookError,
18967 useFormState: throwInvalidHookError,
18968 useActionState: throwInvalidHookError,
18969 useOptimistic: throwInvalidHookError,
18970 useMemoCache: throwInvalidHookError,
18971 useCacheRefresh: throwInvalidHookError
18972 };
18973 ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
18974 var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, HooksDispatcherOnRerenderInDEV = null, InvalidNestedHooksDispatcherOnMountInDEV = null, InvalidNestedHooksDispatcherOnUpdateInDEV = null, InvalidNestedHooksDispatcherOnRerenderInDEV = null;
18975 HooksDispatcherOnMountInDEV = {
18976 readContext: function(context) {
18977 return readContext(context);
18978 },
18979 use,
18980 useCallback: function(callback, deps) {
18981 currentHookNameInDev = "useCallback";
18982 mountHookTypesDev();
18983 checkDepsAreArrayDev(deps);
18984 return mountCallback(callback, deps);
18985 },
18986 useContext: function(context) {
18987 currentHookNameInDev = "useContext";
18988 mountHookTypesDev();
18989 return readContext(context);
18990 },
18991 useEffect: function(create, deps) {
18992 currentHookNameInDev = "useEffect";
18993 mountHookTypesDev();
18994 checkDepsAreArrayDev(deps);
18995 return mountEffect(create, deps);
18996 },
18997 useImperativeHandle: function(ref, create, deps) {
18998 currentHookNameInDev = "useImperativeHandle";
18999 mountHookTypesDev();
19000 checkDepsAreArrayDev(deps);
19001 return mountImperativeHandle(ref, create, deps);
19002 },
19003 useInsertionEffect: function(create, deps) {
19004 currentHookNameInDev = "useInsertionEffect";
19005 mountHookTypesDev();
19006 checkDepsAreArrayDev(deps);
19007 mountEffectImpl(4, Insertion, create, deps);
19008 },
19009 useLayoutEffect: function(create, deps) {
19010 currentHookNameInDev = "useLayoutEffect";
19011 mountHookTypesDev();
19012 checkDepsAreArrayDev(deps);
19013 return mountLayoutEffect(create, deps);
19014 },
19015 useMemo: function(create, deps) {
19016 currentHookNameInDev = "useMemo";
19017 mountHookTypesDev();
19018 checkDepsAreArrayDev(deps);
19019 var prevDispatcher = ReactSharedInternals.H;
19020 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19021 try {
19022 return mountMemo(create, deps);
19023 } finally {
19024 ReactSharedInternals.H = prevDispatcher;
19025 }
19026 },
19027 useReducer: function(reducer, initialArg, init) {
19028 currentHookNameInDev = "useReducer";
19029 mountHookTypesDev();
19030 var prevDispatcher = ReactSharedInternals.H;
19031 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19032 try {
19033 return mountReducer(reducer, initialArg, init);
19034 } finally {
19035 ReactSharedInternals.H = prevDispatcher;
19036 }
19037 },
19038 useRef: function(initialValue) {
19039 currentHookNameInDev = "useRef";
19040 mountHookTypesDev();
19041 return mountRef(initialValue);
19042 },
19043 useState: function(initialState) {
19044 currentHookNameInDev = "useState";
19045 mountHookTypesDev();
19046 var prevDispatcher = ReactSharedInternals.H;
19047 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19048 try {
19049 return mountState(initialState);
19050 } finally {
19051 ReactSharedInternals.H = prevDispatcher;
19052 }
19053 },
19054 useDebugValue: function() {
19055 currentHookNameInDev = "useDebugValue";
19056 mountHookTypesDev();
19057 },
19058 useDeferredValue: function(value, initialValue) {
19059 currentHookNameInDev = "useDeferredValue";
19060 mountHookTypesDev();
19061 return mountDeferredValue(value, initialValue);
19062 },
19063 useTransition: function() {
19064 currentHookNameInDev = "useTransition";
19065 mountHookTypesDev();
19066 return mountTransition();
19067 },
19068 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19069 currentHookNameInDev = "useSyncExternalStore";
19070 mountHookTypesDev();
19071 return mountSyncExternalStore(
19072 subscribe,
19073 getSnapshot,
19074 getServerSnapshot
19075 );
19076 },
19077 useId: function() {
19078 currentHookNameInDev = "useId";
19079 mountHookTypesDev();
19080 return mountId();
19081 },
19082 useFormState: function(action, initialState) {
19083 currentHookNameInDev = "useFormState";
19084 mountHookTypesDev();
19085 warnOnUseFormStateInDev();
19086 return mountActionState(action, initialState);
19087 },
19088 useActionState: function(action, initialState) {
19089 currentHookNameInDev = "useActionState";
19090 mountHookTypesDev();
19091 return mountActionState(action, initialState);
19092 },
19093 useOptimistic: function(passthrough) {
19094 currentHookNameInDev = "useOptimistic";
19095 mountHookTypesDev();
19096 return mountOptimistic(passthrough);
19097 },
19098 useHostTransitionStatus,
19099 useMemoCache,
19100 useCacheRefresh: function() {
19101 currentHookNameInDev = "useCacheRefresh";
19102 mountHookTypesDev();
19103 return mountRefresh();
19104 },
19105 useEffectEvent: function(callback) {
19106 currentHookNameInDev = "useEffectEvent";
19107 mountHookTypesDev();
19108 return mountEvent(callback);
19109 }
19110 };
19111 HooksDispatcherOnMountWithHookTypesInDEV = {
19112 readContext: function(context) {
19113 return readContext(context);
19114 },
19115 use,
19116 useCallback: function(callback, deps) {
19117 currentHookNameInDev = "useCallback";
19118 updateHookTypesDev();
19119 return mountCallback(callback, deps);
19120 },
19121 useContext: function(context) {
19122 currentHookNameInDev = "useContext";
19123 updateHookTypesDev();
19124 return readContext(context);
19125 },
19126 useEffect: function(create, deps) {
19127 currentHookNameInDev = "useEffect";
19128 updateHookTypesDev();
19129 return mountEffect(create, deps);
19130 },
19131 useImperativeHandle: function(ref, create, deps) {
19132 currentHookNameInDev = "useImperativeHandle";
19133 updateHookTypesDev();
19134 return mountImperativeHandle(ref, create, deps);
19135 },
19136 useInsertionEffect: function(create, deps) {
19137 currentHookNameInDev = "useInsertionEffect";
19138 updateHookTypesDev();
19139 mountEffectImpl(4, Insertion, create, deps);
19140 },
19141 useLayoutEffect: function(create, deps) {
19142 currentHookNameInDev = "useLayoutEffect";
19143 updateHookTypesDev();
19144 return mountLayoutEffect(create, deps);
19145 },
19146 useMemo: function(create, deps) {
19147 currentHookNameInDev = "useMemo";
19148 updateHookTypesDev();
19149 var prevDispatcher = ReactSharedInternals.H;
19150 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19151 try {
19152 return mountMemo(create, deps);
19153 } finally {
19154 ReactSharedInternals.H = prevDispatcher;
19155 }
19156 },
19157 useReducer: function(reducer, initialArg, init) {
19158 currentHookNameInDev = "useReducer";
19159 updateHookTypesDev();
19160 var prevDispatcher = ReactSharedInternals.H;
19161 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19162 try {
19163 return mountReducer(reducer, initialArg, init);
19164 } finally {
19165 ReactSharedInternals.H = prevDispatcher;
19166 }
19167 },
19168 useRef: function(initialValue) {
19169 currentHookNameInDev = "useRef";
19170 updateHookTypesDev();
19171 return mountRef(initialValue);
19172 },
19173 useState: function(initialState) {
19174 currentHookNameInDev = "useState";
19175 updateHookTypesDev();
19176 var prevDispatcher = ReactSharedInternals.H;
19177 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19178 try {
19179 return mountState(initialState);
19180 } finally {
19181 ReactSharedInternals.H = prevDispatcher;
19182 }
19183 },
19184 useDebugValue: function() {
19185 currentHookNameInDev = "useDebugValue";
19186 updateHookTypesDev();
19187 },
19188 useDeferredValue: function(value, initialValue) {
19189 currentHookNameInDev = "useDeferredValue";
19190 updateHookTypesDev();
19191 return mountDeferredValue(value, initialValue);
19192 },
19193 useTransition: function() {
19194 currentHookNameInDev = "useTransition";
19195 updateHookTypesDev();
19196 return mountTransition();
19197 },
19198 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19199 currentHookNameInDev = "useSyncExternalStore";
19200 updateHookTypesDev();
19201 return mountSyncExternalStore(
19202 subscribe,
19203 getSnapshot,
19204 getServerSnapshot
19205 );
19206 },
19207 useId: function() {
19208 currentHookNameInDev = "useId";
19209 updateHookTypesDev();
19210 return mountId();
19211 },
19212 useActionState: function(action, initialState) {
19213 currentHookNameInDev = "useActionState";
19214 updateHookTypesDev();
19215 return mountActionState(action, initialState);
19216 },
19217 useFormState: function(action, initialState) {
19218 currentHookNameInDev = "useFormState";
19219 updateHookTypesDev();
19220 warnOnUseFormStateInDev();
19221 return mountActionState(action, initialState);
19222 },
19223 useOptimistic: function(passthrough) {
19224 currentHookNameInDev = "useOptimistic";
19225 updateHookTypesDev();
19226 return mountOptimistic(passthrough);
19227 },
19228 useHostTransitionStatus,
19229 useMemoCache,
19230 useCacheRefresh: function() {
19231 currentHookNameInDev = "useCacheRefresh";
19232 updateHookTypesDev();
19233 return mountRefresh();
19234 },
19235 useEffectEvent: function(callback) {
19236 currentHookNameInDev = "useEffectEvent";
19237 updateHookTypesDev();
19238 return mountEvent(callback);
19239 }
19240 };
19241 HooksDispatcherOnUpdateInDEV = {
19242 readContext: function(context) {
19243 return readContext(context);
19244 },
19245 use,
19246 useCallback: function(callback, deps) {
19247 currentHookNameInDev = "useCallback";
19248 updateHookTypesDev();
19249 return updateCallback(callback, deps);
19250 },
19251 useContext: function(context) {
19252 currentHookNameInDev = "useContext";
19253 updateHookTypesDev();
19254 return readContext(context);
19255 },
19256 useEffect: function(create, deps) {
19257 currentHookNameInDev = "useEffect";
19258 updateHookTypesDev();
19259 updateEffectImpl(2048, Passive, create, deps);
19260 },
19261 useImperativeHandle: function(ref, create, deps) {
19262 currentHookNameInDev = "useImperativeHandle";
19263 updateHookTypesDev();
19264 return updateImperativeHandle(ref, create, deps);
19265 },
19266 useInsertionEffect: function(create, deps) {
19267 currentHookNameInDev = "useInsertionEffect";
19268 updateHookTypesDev();
19269 return updateEffectImpl(4, Insertion, create, deps);
19270 },
19271 useLayoutEffect: function(create, deps) {
19272 currentHookNameInDev = "useLayoutEffect";
19273 updateHookTypesDev();
19274 return updateEffectImpl(4, Layout, create, deps);
19275 },
19276 useMemo: function(create, deps) {
19277 currentHookNameInDev = "useMemo";
19278 updateHookTypesDev();
19279 var prevDispatcher = ReactSharedInternals.H;
19280 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19281 try {
19282 return updateMemo(create, deps);
19283 } finally {
19284 ReactSharedInternals.H = prevDispatcher;
19285 }
19286 },
19287 useReducer: function(reducer, initialArg, init) {
19288 currentHookNameInDev = "useReducer";
19289 updateHookTypesDev();
19290 var prevDispatcher = ReactSharedInternals.H;
19291 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19292 try {
19293 return updateReducer(reducer, initialArg, init);
19294 } finally {
19295 ReactSharedInternals.H = prevDispatcher;
19296 }
19297 },
19298 useRef: function() {
19299 currentHookNameInDev = "useRef";
19300 updateHookTypesDev();
19301 return updateWorkInProgressHook().memoizedState;
19302 },
19303 useState: function() {
19304 currentHookNameInDev = "useState";
19305 updateHookTypesDev();
19306 var prevDispatcher = ReactSharedInternals.H;
19307 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19308 try {
19309 return updateReducer(basicStateReducer);
19310 } finally {
19311 ReactSharedInternals.H = prevDispatcher;
19312 }
19313 },
19314 useDebugValue: function() {
19315 currentHookNameInDev = "useDebugValue";
19316 updateHookTypesDev();
19317 },
19318 useDeferredValue: function(value, initialValue) {
19319 currentHookNameInDev = "useDeferredValue";
19320 updateHookTypesDev();
19321 return updateDeferredValue(value, initialValue);
19322 },
19323 useTransition: function() {
19324 currentHookNameInDev = "useTransition";
19325 updateHookTypesDev();
19326 return updateTransition();
19327 },
19328 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19329 currentHookNameInDev = "useSyncExternalStore";
19330 updateHookTypesDev();
19331 return updateSyncExternalStore(
19332 subscribe,
19333 getSnapshot,
19334 getServerSnapshot
19335 );
19336 },
19337 useId: function() {
19338 currentHookNameInDev = "useId";
19339 updateHookTypesDev();
19340 return updateWorkInProgressHook().memoizedState;
19341 },
19342 useFormState: function(action) {
19343 currentHookNameInDev = "useFormState";
19344 updateHookTypesDev();
19345 warnOnUseFormStateInDev();
19346 return updateActionState(action);
19347 },
19348 useActionState: function(action) {
19349 currentHookNameInDev = "useActionState";
19350 updateHookTypesDev();
19351 return updateActionState(action);
19352 },
19353 useOptimistic: function(passthrough, reducer) {
19354 currentHookNameInDev = "useOptimistic";
19355 updateHookTypesDev();
19356 return updateOptimistic(passthrough, reducer);
19357 },
19358 useHostTransitionStatus,
19359 useMemoCache,
19360 useCacheRefresh: function() {
19361 currentHookNameInDev = "useCacheRefresh";
19362 updateHookTypesDev();
19363 return updateWorkInProgressHook().memoizedState;
19364 },
19365 useEffectEvent: function(callback) {
19366 currentHookNameInDev = "useEffectEvent";
19367 updateHookTypesDev();
19368 return updateEvent(callback);
19369 }
19370 };
19371 HooksDispatcherOnRerenderInDEV = {
19372 readContext: function(context) {
19373 return readContext(context);
19374 },
19375 use,
19376 useCallback: function(callback, deps) {
19377 currentHookNameInDev = "useCallback";
19378 updateHookTypesDev();
19379 return updateCallback(callback, deps);
19380 },
19381 useContext: function(context) {
19382 currentHookNameInDev = "useContext";
19383 updateHookTypesDev();
19384 return readContext(context);
19385 },
19386 useEffect: function(create, deps) {
19387 currentHookNameInDev = "useEffect";
19388 updateHookTypesDev();
19389 updateEffectImpl(2048, Passive, create, deps);
19390 },
19391 useImperativeHandle: function(ref, create, deps) {
19392 currentHookNameInDev = "useImperativeHandle";
19393 updateHookTypesDev();
19394 return updateImperativeHandle(ref, create, deps);
19395 },
19396 useInsertionEffect: function(create, deps) {
19397 currentHookNameInDev = "useInsertionEffect";
19398 updateHookTypesDev();
19399 return updateEffectImpl(4, Insertion, create, deps);
19400 },
19401 useLayoutEffect: function(create, deps) {
19402 currentHookNameInDev = "useLayoutEffect";
19403 updateHookTypesDev();
19404 return updateEffectImpl(4, Layout, create, deps);
19405 },
19406 useMemo: function(create, deps) {
19407 currentHookNameInDev = "useMemo";
19408 updateHookTypesDev();
19409 var prevDispatcher = ReactSharedInternals.H;
19410 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19411 try {
19412 return updateMemo(create, deps);
19413 } finally {
19414 ReactSharedInternals.H = prevDispatcher;
19415 }
19416 },
19417 useReducer: function(reducer, initialArg, init) {
19418 currentHookNameInDev = "useReducer";
19419 updateHookTypesDev();
19420 var prevDispatcher = ReactSharedInternals.H;
19421 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19422 try {
19423 return rerenderReducer(reducer, initialArg, init);
19424 } finally {
19425 ReactSharedInternals.H = prevDispatcher;
19426 }
19427 },
19428 useRef: function() {
19429 currentHookNameInDev = "useRef";
19430 updateHookTypesDev();
19431 return updateWorkInProgressHook().memoizedState;
19432 },
19433 useState: function() {
19434 currentHookNameInDev = "useState";
19435 updateHookTypesDev();
19436 var prevDispatcher = ReactSharedInternals.H;
19437 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19438 try {
19439 return rerenderReducer(basicStateReducer);
19440 } finally {
19441 ReactSharedInternals.H = prevDispatcher;
19442 }
19443 },
19444 useDebugValue: function() {
19445 currentHookNameInDev = "useDebugValue";
19446 updateHookTypesDev();
19447 },
19448 useDeferredValue: function(value, initialValue) {
19449 currentHookNameInDev = "useDeferredValue";
19450 updateHookTypesDev();
19451 return rerenderDeferredValue(value, initialValue);
19452 },
19453 useTransition: function() {
19454 currentHookNameInDev = "useTransition";
19455 updateHookTypesDev();
19456 return rerenderTransition();
19457 },
19458 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19459 currentHookNameInDev = "useSyncExternalStore";
19460 updateHookTypesDev();
19461 return updateSyncExternalStore(
19462 subscribe,
19463 getSnapshot,
19464 getServerSnapshot
19465 );
19466 },
19467 useId: function() {
19468 currentHookNameInDev = "useId";
19469 updateHookTypesDev();
19470 return updateWorkInProgressHook().memoizedState;
19471 },
19472 useFormState: function(action) {
19473 currentHookNameInDev = "useFormState";
19474 updateHookTypesDev();
19475 warnOnUseFormStateInDev();
19476 return rerenderActionState(action);
19477 },
19478 useActionState: function(action) {
19479 currentHookNameInDev = "useActionState";
19480 updateHookTypesDev();
19481 return rerenderActionState(action);
19482 },
19483 useOptimistic: function(passthrough, reducer) {
19484 currentHookNameInDev = "useOptimistic";
19485 updateHookTypesDev();
19486 return rerenderOptimistic(passthrough, reducer);
19487 },
19488 useHostTransitionStatus,
19489 useMemoCache,
19490 useCacheRefresh: function() {
19491 currentHookNameInDev = "useCacheRefresh";
19492 updateHookTypesDev();
19493 return updateWorkInProgressHook().memoizedState;
19494 },
19495 useEffectEvent: function(callback) {
19496 currentHookNameInDev = "useEffectEvent";
19497 updateHookTypesDev();
19498 return updateEvent(callback);
19499 }
19500 };
19501 InvalidNestedHooksDispatcherOnMountInDEV = {
19502 readContext: function(context) {
19503 warnInvalidContextAccess();
19504 return readContext(context);
19505 },
19506 use: function(usable) {
19507 warnInvalidHookAccess();
19508 return use(usable);
19509 },
19510 useCallback: function(callback, deps) {
19511 currentHookNameInDev = "useCallback";
19512 warnInvalidHookAccess();
19513 mountHookTypesDev();
19514 return mountCallback(callback, deps);
19515 },
19516 useContext: function(context) {
19517 currentHookNameInDev = "useContext";
19518 warnInvalidHookAccess();
19519 mountHookTypesDev();
19520 return readContext(context);
19521 },
19522 useEffect: function(create, deps) {
19523 currentHookNameInDev = "useEffect";
19524 warnInvalidHookAccess();
19525 mountHookTypesDev();
19526 return mountEffect(create, deps);
19527 },
19528 useImperativeHandle: function(ref, create, deps) {
19529 currentHookNameInDev = "useImperativeHandle";
19530 warnInvalidHookAccess();
19531 mountHookTypesDev();
19532 return mountImperativeHandle(ref, create, deps);
19533 },
19534 useInsertionEffect: function(create, deps) {
19535 currentHookNameInDev = "useInsertionEffect";
19536 warnInvalidHookAccess();
19537 mountHookTypesDev();
19538 mountEffectImpl(4, Insertion, create, deps);
19539 },
19540 useLayoutEffect: function(create, deps) {
19541 currentHookNameInDev = "useLayoutEffect";
19542 warnInvalidHookAccess();
19543 mountHookTypesDev();
19544 return mountLayoutEffect(create, deps);
19545 },
19546 useMemo: function(create, deps) {
19547 currentHookNameInDev = "useMemo";
19548 warnInvalidHookAccess();
19549 mountHookTypesDev();
19550 var prevDispatcher = ReactSharedInternals.H;
19551 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19552 try {
19553 return mountMemo(create, deps);
19554 } finally {
19555 ReactSharedInternals.H = prevDispatcher;
19556 }
19557 },
19558 useReducer: function(reducer, initialArg, init) {
19559 currentHookNameInDev = "useReducer";
19560 warnInvalidHookAccess();
19561 mountHookTypesDev();
19562 var prevDispatcher = ReactSharedInternals.H;
19563 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19564 try {
19565 return mountReducer(reducer, initialArg, init);
19566 } finally {
19567 ReactSharedInternals.H = prevDispatcher;
19568 }
19569 },
19570 useRef: function(initialValue) {
19571 currentHookNameInDev = "useRef";
19572 warnInvalidHookAccess();
19573 mountHookTypesDev();
19574 return mountRef(initialValue);
19575 },
19576 useState: function(initialState) {
19577 currentHookNameInDev = "useState";
19578 warnInvalidHookAccess();
19579 mountHookTypesDev();
19580 var prevDispatcher = ReactSharedInternals.H;
19581 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19582 try {
19583 return mountState(initialState);
19584 } finally {
19585 ReactSharedInternals.H = prevDispatcher;
19586 }
19587 },
19588 useDebugValue: function() {
19589 currentHookNameInDev = "useDebugValue";
19590 warnInvalidHookAccess();
19591 mountHookTypesDev();
19592 },
19593 useDeferredValue: function(value, initialValue) {
19594 currentHookNameInDev = "useDeferredValue";
19595 warnInvalidHookAccess();
19596 mountHookTypesDev();
19597 return mountDeferredValue(value, initialValue);
19598 },
19599 useTransition: function() {
19600 currentHookNameInDev = "useTransition";
19601 warnInvalidHookAccess();
19602 mountHookTypesDev();
19603 return mountTransition();
19604 },
19605 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19606 currentHookNameInDev = "useSyncExternalStore";
19607 warnInvalidHookAccess();
19608 mountHookTypesDev();
19609 return mountSyncExternalStore(
19610 subscribe,
19611 getSnapshot,
19612 getServerSnapshot
19613 );
19614 },
19615 useId: function() {
19616 currentHookNameInDev = "useId";
19617 warnInvalidHookAccess();
19618 mountHookTypesDev();
19619 return mountId();
19620 },
19621 useFormState: function(action, initialState) {
19622 currentHookNameInDev = "useFormState";
19623 warnInvalidHookAccess();
19624 mountHookTypesDev();
19625 return mountActionState(action, initialState);
19626 },
19627 useActionState: function(action, initialState) {
19628 currentHookNameInDev = "useActionState";
19629 warnInvalidHookAccess();
19630 mountHookTypesDev();
19631 return mountActionState(action, initialState);
19632 },
19633 useOptimistic: function(passthrough) {
19634 currentHookNameInDev = "useOptimistic";
19635 warnInvalidHookAccess();
19636 mountHookTypesDev();
19637 return mountOptimistic(passthrough);
19638 },
19639 useMemoCache: function(size) {
19640 warnInvalidHookAccess();
19641 return useMemoCache(size);
19642 },
19643 useHostTransitionStatus,
19644 useCacheRefresh: function() {
19645 currentHookNameInDev = "useCacheRefresh";
19646 mountHookTypesDev();
19647 return mountRefresh();
19648 },
19649 useEffectEvent: function(callback) {
19650 currentHookNameInDev = "useEffectEvent";
19651 warnInvalidHookAccess();
19652 mountHookTypesDev();
19653 return mountEvent(callback);
19654 }
19655 };
19656 InvalidNestedHooksDispatcherOnUpdateInDEV = {
19657 readContext: function(context) {
19658 warnInvalidContextAccess();
19659 return readContext(context);
19660 },
19661 use: function(usable) {
19662 warnInvalidHookAccess();
19663 return use(usable);
19664 },
19665 useCallback: function(callback, deps) {
19666 currentHookNameInDev = "useCallback";
19667 warnInvalidHookAccess();
19668 updateHookTypesDev();
19669 return updateCallback(callback, deps);
19670 },
19671 useContext: function(context) {
19672 currentHookNameInDev = "useContext";
19673 warnInvalidHookAccess();
19674 updateHookTypesDev();
19675 return readContext(context);
19676 },
19677 useEffect: function(create, deps) {
19678 currentHookNameInDev = "useEffect";
19679 warnInvalidHookAccess();
19680 updateHookTypesDev();
19681 updateEffectImpl(2048, Passive, create, deps);
19682 },
19683 useImperativeHandle: function(ref, create, deps) {
19684 currentHookNameInDev = "useImperativeHandle";
19685 warnInvalidHookAccess();
19686 updateHookTypesDev();
19687 return updateImperativeHandle(ref, create, deps);
19688 },
19689 useInsertionEffect: function(create, deps) {
19690 currentHookNameInDev = "useInsertionEffect";
19691 warnInvalidHookAccess();
19692 updateHookTypesDev();
19693 return updateEffectImpl(4, Insertion, create, deps);
19694 },
19695 useLayoutEffect: function(create, deps) {
19696 currentHookNameInDev = "useLayoutEffect";
19697 warnInvalidHookAccess();
19698 updateHookTypesDev();
19699 return updateEffectImpl(4, Layout, create, deps);
19700 },
19701 useMemo: function(create, deps) {
19702 currentHookNameInDev = "useMemo";
19703 warnInvalidHookAccess();
19704 updateHookTypesDev();
19705 var prevDispatcher = ReactSharedInternals.H;
19706 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19707 try {
19708 return updateMemo(create, deps);
19709 } finally {
19710 ReactSharedInternals.H = prevDispatcher;
19711 }
19712 },
19713 useReducer: function(reducer, initialArg, init) {
19714 currentHookNameInDev = "useReducer";
19715 warnInvalidHookAccess();
19716 updateHookTypesDev();
19717 var prevDispatcher = ReactSharedInternals.H;
19718 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19719 try {
19720 return updateReducer(reducer, initialArg, init);
19721 } finally {
19722 ReactSharedInternals.H = prevDispatcher;
19723 }
19724 },
19725 useRef: function() {
19726 currentHookNameInDev = "useRef";
19727 warnInvalidHookAccess();
19728 updateHookTypesDev();
19729 return updateWorkInProgressHook().memoizedState;
19730 },
19731 useState: function() {
19732 currentHookNameInDev = "useState";
19733 warnInvalidHookAccess();
19734 updateHookTypesDev();
19735 var prevDispatcher = ReactSharedInternals.H;
19736 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19737 try {
19738 return updateReducer(basicStateReducer);
19739 } finally {
19740 ReactSharedInternals.H = prevDispatcher;
19741 }
19742 },
19743 useDebugValue: function() {
19744 currentHookNameInDev = "useDebugValue";
19745 warnInvalidHookAccess();
19746 updateHookTypesDev();
19747 },
19748 useDeferredValue: function(value, initialValue) {
19749 currentHookNameInDev = "useDeferredValue";
19750 warnInvalidHookAccess();
19751 updateHookTypesDev();
19752 return updateDeferredValue(value, initialValue);
19753 },
19754 useTransition: function() {
19755 currentHookNameInDev = "useTransition";
19756 warnInvalidHookAccess();
19757 updateHookTypesDev();
19758 return updateTransition();
19759 },
19760 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19761 currentHookNameInDev = "useSyncExternalStore";
19762 warnInvalidHookAccess();
19763 updateHookTypesDev();
19764 return updateSyncExternalStore(
19765 subscribe,
19766 getSnapshot,
19767 getServerSnapshot
19768 );
19769 },
19770 useId: function() {
19771 currentHookNameInDev = "useId";
19772 warnInvalidHookAccess();
19773 updateHookTypesDev();
19774 return updateWorkInProgressHook().memoizedState;
19775 },
19776 useFormState: function(action) {
19777 currentHookNameInDev = "useFormState";
19778 warnInvalidHookAccess();
19779 updateHookTypesDev();
19780 return updateActionState(action);
19781 },
19782 useActionState: function(action) {
19783 currentHookNameInDev = "useActionState";
19784 warnInvalidHookAccess();
19785 updateHookTypesDev();
19786 return updateActionState(action);
19787 },
19788 useOptimistic: function(passthrough, reducer) {
19789 currentHookNameInDev = "useOptimistic";
19790 warnInvalidHookAccess();
19791 updateHookTypesDev();
19792 return updateOptimistic(passthrough, reducer);
19793 },
19794 useMemoCache: function(size) {
19795 warnInvalidHookAccess();
19796 return useMemoCache(size);
19797 },
19798 useHostTransitionStatus,
19799 useCacheRefresh: function() {
19800 currentHookNameInDev = "useCacheRefresh";
19801 updateHookTypesDev();
19802 return updateWorkInProgressHook().memoizedState;
19803 },
19804 useEffectEvent: function(callback) {
19805 currentHookNameInDev = "useEffectEvent";
19806 warnInvalidHookAccess();
19807 updateHookTypesDev();
19808 return updateEvent(callback);
19809 }
19810 };
19811 InvalidNestedHooksDispatcherOnRerenderInDEV = {
19812 readContext: function(context) {
19813 warnInvalidContextAccess();
19814 return readContext(context);
19815 },
19816 use: function(usable) {
19817 warnInvalidHookAccess();
19818 return use(usable);
19819 },
19820 useCallback: function(callback, deps) {
19821 currentHookNameInDev = "useCallback";
19822 warnInvalidHookAccess();
19823 updateHookTypesDev();
19824 return updateCallback(callback, deps);
19825 },
19826 useContext: function(context) {
19827 currentHookNameInDev = "useContext";
19828 warnInvalidHookAccess();
19829 updateHookTypesDev();
19830 return readContext(context);
19831 },
19832 useEffect: function(create, deps) {
19833 currentHookNameInDev = "useEffect";
19834 warnInvalidHookAccess();
19835 updateHookTypesDev();
19836 updateEffectImpl(2048, Passive, create, deps);
19837 },
19838 useImperativeHandle: function(ref, create, deps) {
19839 currentHookNameInDev = "useImperativeHandle";
19840 warnInvalidHookAccess();
19841 updateHookTypesDev();
19842 return updateImperativeHandle(ref, create, deps);
19843 },
19844 useInsertionEffect: function(create, deps) {
19845 currentHookNameInDev = "useInsertionEffect";
19846 warnInvalidHookAccess();
19847 updateHookTypesDev();
19848 return updateEffectImpl(4, Insertion, create, deps);
19849 },
19850 useLayoutEffect: function(create, deps) {
19851 currentHookNameInDev = "useLayoutEffect";
19852 warnInvalidHookAccess();
19853 updateHookTypesDev();
19854 return updateEffectImpl(4, Layout, create, deps);
19855 },
19856 useMemo: function(create, deps) {
19857 currentHookNameInDev = "useMemo";
19858 warnInvalidHookAccess();
19859 updateHookTypesDev();
19860 var prevDispatcher = ReactSharedInternals.H;
19861 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19862 try {
19863 return updateMemo(create, deps);
19864 } finally {
19865 ReactSharedInternals.H = prevDispatcher;
19866 }
19867 },
19868 useReducer: function(reducer, initialArg, init) {
19869 currentHookNameInDev = "useReducer";
19870 warnInvalidHookAccess();
19871 updateHookTypesDev();
19872 var prevDispatcher = ReactSharedInternals.H;
19873 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19874 try {
19875 return rerenderReducer(reducer, initialArg, init);
19876 } finally {
19877 ReactSharedInternals.H = prevDispatcher;
19878 }
19879 },
19880 useRef: function() {
19881 currentHookNameInDev = "useRef";
19882 warnInvalidHookAccess();
19883 updateHookTypesDev();
19884 return updateWorkInProgressHook().memoizedState;
19885 },
19886 useState: function() {
19887 currentHookNameInDev = "useState";
19888 warnInvalidHookAccess();
19889 updateHookTypesDev();
19890 var prevDispatcher = ReactSharedInternals.H;
19891 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19892 try {
19893 return rerenderReducer(basicStateReducer);
19894 } finally {
19895 ReactSharedInternals.H = prevDispatcher;
19896 }
19897 },
19898 useDebugValue: function() {
19899 currentHookNameInDev = "useDebugValue";
19900 warnInvalidHookAccess();
19901 updateHookTypesDev();
19902 },
19903 useDeferredValue: function(value, initialValue) {
19904 currentHookNameInDev = "useDeferredValue";
19905 warnInvalidHookAccess();
19906 updateHookTypesDev();
19907 return rerenderDeferredValue(value, initialValue);
19908 },
19909 useTransition: function() {
19910 currentHookNameInDev = "useTransition";
19911 warnInvalidHookAccess();
19912 updateHookTypesDev();
19913 return rerenderTransition();
19914 },
19915 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19916 currentHookNameInDev = "useSyncExternalStore";
19917 warnInvalidHookAccess();
19918 updateHookTypesDev();
19919 return updateSyncExternalStore(
19920 subscribe,
19921 getSnapshot,
19922 getServerSnapshot
19923 );
19924 },
19925 useId: function() {
19926 currentHookNameInDev = "useId";
19927 warnInvalidHookAccess();
19928 updateHookTypesDev();
19929 return updateWorkInProgressHook().memoizedState;
19930 },
19931 useFormState: function(action) {
19932 currentHookNameInDev = "useFormState";
19933 warnInvalidHookAccess();
19934 updateHookTypesDev();
19935 return rerenderActionState(action);
19936 },
19937 useActionState: function(action) {
19938 currentHookNameInDev = "useActionState";
19939 warnInvalidHookAccess();
19940 updateHookTypesDev();
19941 return rerenderActionState(action);
19942 },
19943 useOptimistic: function(passthrough, reducer) {
19944 currentHookNameInDev = "useOptimistic";
19945 warnInvalidHookAccess();
19946 updateHookTypesDev();
19947 return rerenderOptimistic(passthrough, reducer);
19948 },
19949 useMemoCache: function(size) {
19950 warnInvalidHookAccess();
19951 return useMemoCache(size);
19952 },
19953 useHostTransitionStatus,
19954 useCacheRefresh: function() {
19955 currentHookNameInDev = "useCacheRefresh";
19956 updateHookTypesDev();
19957 return updateWorkInProgressHook().memoizedState;
19958 },
19959 useEffectEvent: function(callback) {
19960 currentHookNameInDev = "useEffectEvent";
19961 warnInvalidHookAccess();
19962 updateHookTypesDev();
19963 return updateEvent(callback);
19964 }
19965 };
19966 var fakeInternalInstance = {};
19967 var didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
19968 var didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
19969 var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
19970 var didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
19971 var didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
19972 var didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
19973 var didWarnAboutContextTypes$1 = /* @__PURE__ */ new Set();
19974 var didWarnAboutChildContextTypes = /* @__PURE__ */ new Set();
19975 var didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
19976 var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
19977 Object.freeze(fakeInternalInstance);
19978 var classComponentUpdater = {
19979 enqueueSetState: function(inst, payload, callback) {
19980 inst = inst._reactInternals;
19981 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19982 update.payload = payload;
19983 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19984 payload = enqueueUpdate(inst, update, lane);
19985 null !== payload && (startUpdateTimerByLane(lane, "this.setState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19986 },
19987 enqueueReplaceState: function(inst, payload, callback) {
19988 inst = inst._reactInternals;
19989 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19990 update.tag = ReplaceState;
19991 update.payload = payload;
19992 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19993 payload = enqueueUpdate(inst, update, lane);
19994 null !== payload && (startUpdateTimerByLane(lane, "this.replaceState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19995 },
19996 enqueueForceUpdate: function(inst, callback) {
19997 inst = inst._reactInternals;
19998 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19999 update.tag = ForceUpdate;
20000 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
20001 callback = enqueueUpdate(inst, update, lane);
20002 null !== callback && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
20003 }
20004 }, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error(
20005 "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
20006 ), didReceiveUpdate = false;
20007 var didWarnAboutBadClass = {};
20008 var didWarnAboutContextTypeOnFunctionComponent = {};
20009 var didWarnAboutContextTypes = {};
20010 var didWarnAboutGetDerivedStateOnFunctionComponent = {};
20011 var didWarnAboutReassigningProps = false;
20012 var didWarnAboutRevealOrder = {};
20013 var didWarnAboutTailOptions = {};
20014 var SUSPENDED_MARKER = {
20015 dehydrated: null,
20016 treeContext: null,
20017 retryLane: 0,
20018 hydrationErrors: null
20019 }, hasWarnedAboutUsingNoValuePropOnContextProvider = false, didWarnAboutUndefinedSnapshotBeforeUpdate = null;
20020 didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
20021 var offscreenSubtreeIsHidden = false, offscreenSubtreeWasHidden = false, needsFormReset = false, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, inProgressLanes = null, inProgressRoot = null, hostParent = null, hostParentIsContainer = false, currentHoistableRoot = null, inHydratedSubtree = false, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
20022 getCacheForType: function(resourceType) {
20023 var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
20024 void 0 === cacheForType && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType));
20025 return cacheForType;
20026 },
20027 cacheSignal: function() {
20028 return readContext(CacheContext).controller.signal;
20029 },
20030 getOwner: function() {
20031 return current;
20032 }
20033 };
20034 if ("function" === typeof Symbol && Symbol.for) {
20035 var symbolFor = Symbol.for;
20036 symbolFor("selector.component");
20037 symbolFor("selector.has_pseudo_class");
20038 symbolFor("selector.role");
20039 symbolFor("selector.test_id");
20040 symbolFor("selector.text");
20041 }
20042 var commitHooks = [], PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, NoContext = 0, RenderContext = 2, CommitContext = 4, RootInProgress = 0, RootFatalErrored = 1, RootErrored = 2, RootSuspended = 3, RootSuspendedWithDelay = 4, RootSuspendedAtTheShell = 6, RootCompleted = 5, executionContext = NoContext, workInProgressRoot = null, workInProgress = null, workInProgressRootRenderLanes = 0, NotSuspended = 0, SuspendedOnError = 1, SuspendedOnData = 2, SuspendedOnImmediate = 3, SuspendedOnInstance = 4, SuspendedOnInstanceAndReadyToContinue = 5, SuspendedOnDeprecatedThrowPromise = 6, SuspendedAndReadyToContinue = 7, SuspendedOnHydration = 8, SuspendedOnAction = 9, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, workInProgressRootDidSkipSuspendedSiblings = false, workInProgressRootIsPrerendering = false, workInProgressRootDidAttachPingListener = false, entangledRenderLanes = 0, workInProgressRootExitStatus = RootInProgress, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, workInProgressRootPingedLanes = 0, workInProgressDeferredLane = 0, workInProgressSuspendedRetryLanes = 0, workInProgressRootConcurrentErrors = null, workInProgressRootRecoverableErrors = null, workInProgressRootDidIncludeRecursiveRenderUpdate = false, globalMostRecentFallbackTime = 0, globalMostRecentTransitionTime = 0, FALLBACK_THROTTLE_MS = 300, workInProgressRootRenderTargetTime = Infinity, RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, workInProgressUpdateTask = null, legacyErrorBoundariesThatAlreadyFailed = null, IMMEDIATE_COMMIT = 0, ABORTED_VIEW_TRANSITION_COMMIT = 1, DELAYED_PASSIVE_COMMIT = 2, ANIMATION_STARTED_COMMIT = 3, NO_PENDING_EFFECTS = 0, PENDING_MUTATION_PHASE = 1, PENDING_LAYOUT_PHASE = 2, PENDING_AFTER_MUTATION_PHASE = 3, PENDING_SPAWNED_WORK = 4, PENDING_PASSIVE_PHASE = 5, pendingEffectsStatus = 0, pendingEffectsRoot = null, pendingFinishedWork = null, pendingEffectsLanes = 0, pendingEffectsRemainingLanes = 0, pendingEffectsRenderEndTime = -0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, pendingSuspendedCommitReason = null, pendingDelayedCommitReason = IMMEDIATE_COMMIT, pendingSuspendedViewTransitionReason = null, NESTED_UPDATE_LIMIT = 50, nestedUpdateCount = 0, rootWithNestedUpdates = null, isFlushingPassiveEffects = false, didScheduleUpdateDuringPassiveEffects = false, NESTED_PASSIVE_UPDATE_LIMIT = 50, nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, isRunningInsertionEffect = false, didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = false;
20043 var didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
20044 var fakeActCallbackNode$1 = {}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode = {};
20045 (function() {
20046 for (var i = 0; i < simpleEventPluginEvents.length; i++) {
20047 var eventName = simpleEventPluginEvents[i], domEventName = eventName.toLowerCase();
20048 eventName = eventName[0].toUpperCase() + eventName.slice(1);
20049 registerSimpleEvent(domEventName, "on" + eventName);
20050 }
20051 registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
20052 registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
20053 registerSimpleEvent(ANIMATION_START, "onAnimationStart");
20054 registerSimpleEvent("dblclick", "onDoubleClick");
20055 registerSimpleEvent("focusin", "onFocus");
20056 registerSimpleEvent("focusout", "onBlur");
20057 registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
20058 registerSimpleEvent(TRANSITION_START, "onTransitionStart");
20059 registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
20060 registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
20061 })();
20062 registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
20063 registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
20064 registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
20065 registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
20066 registerTwoPhaseEvent(
20067 "onChange",
20068 "change click focusin focusout input keydown keyup selectionchange".split(
20069 " "
20070 )
20071 );
20072 registerTwoPhaseEvent(
20073 "onSelect",
20074 "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
20075 " "
20076 )
20077 );
20078 registerTwoPhaseEvent("onBeforeInput", [
20079 "compositionend",
20080 "keypress",
20081 "textInput",
20082 "paste"
20083 ]);
20084 registerTwoPhaseEvent(
20085 "onCompositionEnd",
20086 "compositionend focusout keydown keypress keyup mousedown".split(" ")
20087 );
20088 registerTwoPhaseEvent(
20089 "onCompositionStart",
20090 "compositionstart focusout keydown keypress keyup mousedown".split(" ")
20091 );
20092 registerTwoPhaseEvent(
20093 "onCompositionUpdate",
20094 "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
20095 );
20096 var mediaEventTypes = "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(
20097 " "
20098 ), nonDelegatedEvents = new Set(
20099 "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
20100 ), listeningMarker = "_reactListening" + Math.random().toString(36).slice(2), didWarnControlledToUncontrolled = false, didWarnUncontrolledToControlled = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, didWarnPopoverTargetObject = false;
20101 var didWarnForNewBooleanPropsWithEmptyValue = {};
20102 var NORMALIZE_NEWLINES_REGEX = /\r\n?/g, NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g, xlinkNamespace = "http://www.w3.org/1999/xlink", xmlNamespace = "http://www.w3.org/XML/1998/namespace", EXPECTED_FORM_ACTION_URL = "javascript:throw new Error('React form unexpectedly submitted.')", SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning", ACTIVITY_START_DATA = "&", ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", SUSPENSE_QUEUED_START_DATA = "$~", SUSPENSE_FALLBACK_START_DATA = "$!", PREAMBLE_CONTRIBUTION_HTML = "html", PREAMBLE_CONTRIBUTION_BODY = "body", PREAMBLE_CONTRIBUTION_HEAD = "head", FORM_STATE_IS_MATCHING = "F!", FORM_STATE_IS_NOT_MATCHING = "F", DOCUMENT_READY_STATE_LOADING = "loading", STYLE = "style", HostContextNamespaceNone = 0, HostContextNamespaceSvg = 1, HostContextNamespaceMath = 2, eventsEnabled = null, selectionInformation = null, warnedUnknownTags = { dialog: true, webview: true }, currentPopstateTransitionEvent = null, schedulerEvent = void 0, scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0, cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0, noTimeout = -1, localPromise = "function" === typeof Promise ? Promise : void 0, scheduleMicrotask = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof localPromise ? function(callback) {
20103 return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
20104 } : scheduleTimeout, previousHydratableOnEnteringScopedSingleton = null, NotLoaded = 0, Loaded = 1, Errored = 2, Settled = 3, Inserted = 4, preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set(), previousDispatcher = ReactDOMSharedInternals.d;
20105 ReactDOMSharedInternals.d = {
20106 f: function() {
20107 var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
20108 return previousWasRendering || wasRendering;
20109 },
20110 r: function(form) {
20111 var formInst = getInstanceFromNode(form);
20112 null !== formInst && 5 === formInst.tag && "form" === formInst.type ? requestFormReset$1(formInst) : previousDispatcher.r(form);
20113 },
20114 D: function(href) {
20115 previousDispatcher.D(href);
20116 preconnectAs("dns-prefetch", href, null);
20117 },
20118 C: function(href, crossOrigin) {
20119 previousDispatcher.C(href, crossOrigin);
20120 preconnectAs("preconnect", href, crossOrigin);
20121 },
20122 L: function(href, as, options) {
20123 previousDispatcher.L(href, as, options);
20124 var ownerDocument = globalDocument;
20125 if (ownerDocument && href && as) {
20126 var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
20127 "image" === as ? options && options.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20128 options.imageSrcSet
20129 ) + '"]', "string" === typeof options.imageSizes && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20130 options.imageSizes
20131 ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]' : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
20132 var key = preloadSelector;
20133 switch (as) {
20134 case "style":
20135 key = getStyleKey(href);
20136 break;
20137 case "script":
20138 key = getScriptKey(href);
20139 }
20140 preloadPropsMap.has(key) || (href = assign(
20141 {
20142 rel: "preload",
20143 href: "image" === as && options && options.imageSrcSet ? void 0 : href,
20144 as
20145 },
20146 options
20147 ), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(
20148 getStylesheetSelectorFromKey(key)
20149 ) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
20150 }
20151 },
20152 m: function(href, options) {
20153 previousDispatcher.m(href, options);
20154 var ownerDocument = globalDocument;
20155 if (ownerDocument && href) {
20156 var as = options && "string" === typeof options.as ? options.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
20157 switch (as) {
20158 case "audioworklet":
20159 case "paintworklet":
20160 case "serviceworker":
20161 case "sharedworker":
20162 case "worker":
20163 case "script":
20164 key = getScriptKey(href);
20165 }
20166 if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options), preloadPropsMap.set(key, href), null === ownerDocument.querySelector(preloadSelector))) {
20167 switch (as) {
20168 case "audioworklet":
20169 case "paintworklet":
20170 case "serviceworker":
20171 case "sharedworker":
20172 case "worker":
20173 case "script":
20174 if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
20175 return;
20176 }
20177 as = ownerDocument.createElement("link");
20178 setInitialProperties(as, "link", href);
20179 markNodeAsHoistable(as);
20180 ownerDocument.head.appendChild(as);
20181 }
20182 }
20183 },
20184 X: function(src, options) {
20185 previousDispatcher.X(src, options);
20186 var ownerDocument = globalDocument;
20187 if (ownerDocument && src) {
20188 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20189 resource || (resource = ownerDocument.querySelector(
20190 getScriptSelectorFromKey(key)
20191 ), resource || (src = assign({ src, async: true }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
20192 type: "script",
20193 instance: resource,
20194 count: 1,
20195 state: null
20196 }, scripts.set(key, resource));
20197 }
20198 },
20199 S: function(href, precedence, options) {
20200 previousDispatcher.S(href, precedence, options);
20201 var ownerDocument = globalDocument;
20202 if (ownerDocument && href) {
20203 var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
20204 precedence = precedence || "default";
20205 var resource = styles.get(key);
20206 if (!resource) {
20207 var state = { loading: NotLoaded, preload: null };
20208 if (resource = ownerDocument.querySelector(
20209 getStylesheetSelectorFromKey(key)
20210 ))
20211 state.loading = Loaded | Inserted;
20212 else {
20213 href = assign(
20214 {
20215 rel: "stylesheet",
20216 href,
20217 "data-precedence": precedence
20218 },
20219 options
20220 );
20221 (options = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options);
20222 var link = resource = ownerDocument.createElement("link");
20223 markNodeAsHoistable(link);
20224 setInitialProperties(link, "link", href);
20225 link._p = new Promise(function(resolve, reject) {
20226 link.onload = resolve;
20227 link.onerror = reject;
20228 });
20229 link.addEventListener("load", function() {
20230 state.loading |= Loaded;
20231 });
20232 link.addEventListener("error", function() {
20233 state.loading |= Errored;
20234 });
20235 state.loading |= Inserted;
20236 insertStylesheet(resource, precedence, ownerDocument);
20237 }
20238 resource = {
20239 type: "stylesheet",
20240 instance: resource,
20241 count: 1,
20242 state
20243 };
20244 styles.set(key, resource);
20245 }
20246 }
20247 },
20248 M: function(src, options) {
20249 previousDispatcher.M(src, options);
20250 var ownerDocument = globalDocument;
20251 if (ownerDocument && src) {
20252 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20253 resource || (resource = ownerDocument.querySelector(
20254 getScriptSelectorFromKey(key)
20255 ), resource || (src = assign({ src, async: true, type: "module" }, options), (options = preloadPropsMap.get(key)) && adoptPreloadPropsForScript(src, options), resource = ownerDocument.createElement("script"), markNodeAsHoistable(resource), setInitialProperties(resource, "link", src), ownerDocument.head.appendChild(resource)), resource = {
20256 type: "script",
20257 instance: resource,
20258 count: 1,
20259 state: null
20260 }, scripts.set(key, resource));
20261 }
20262 }
20263 };
20264 var globalDocument = "undefined" === typeof document ? null : document, tagCaches = null, SUSPENSEY_STYLESHEET_TIMEOUT = 6e4, SUSPENSEY_IMAGE_TIMEOUT = 800, SUSPENSEY_IMAGE_TIME_ESTIMATE = 500, estimatedBytesWithinLimit = 0, LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, HostTransitionContext = {
20265 $$typeof: REACT_CONTEXT_TYPE,
20266 Provider: null,
20267 Consumer: null,
20268 _currentValue: NotPendingTransition,
20269 _currentValue2: NotPendingTransition,
20270 _threadCount: 0
20271 }, badgeFormat = "%c%s%c", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", resetStyle = "", pad = " ", bind = Function.prototype.bind;
20272 var didWarnAboutNestedUpdates = false;
20273 var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
20274 overrideHookState = function(fiber, id, path, value) {
20275 id = findHook(fiber, id);
20276 null !== id && (path = copyWithSetImpl(id.memoizedState, path, 0, value), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
20277 };
20278 overrideHookStateDeletePath = function(fiber, id, path) {
20279 id = findHook(fiber, id);
20280 null !== id && (path = copyWithDeleteImpl(id.memoizedState, path, 0), id.memoizedState = path, id.baseState = path, fiber.memoizedProps = assign({}, fiber.memoizedProps), path = enqueueConcurrentRenderForLane(fiber, 2), null !== path && scheduleUpdateOnFiber(path, fiber, 2));
20281 };
20282 overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
20283 id = findHook(fiber, id);
20284 null !== id && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
20285 };
20286 overrideProps = function(fiber, path, value) {
20287 fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
20288 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20289 path = enqueueConcurrentRenderForLane(fiber, 2);
20290 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20291 };
20292 overridePropsDeletePath = function(fiber, path) {
20293 fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
20294 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20295 path = enqueueConcurrentRenderForLane(fiber, 2);
20296 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20297 };
20298 overridePropsRenamePath = function(fiber, oldPath, newPath) {
20299 fiber.pendingProps = copyWithRename(
20300 fiber.memoizedProps,
20301 oldPath,
20302 newPath
20303 );
20304 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20305 oldPath = enqueueConcurrentRenderForLane(fiber, 2);
20306 null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
20307 };
20308 scheduleUpdate = function(fiber) {
20309 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
20310 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
20311 };
20312 scheduleRetry = function(fiber) {
20313 var lane = claimNextRetryLane(), root2 = enqueueConcurrentRenderForLane(fiber, lane);
20314 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
20315 };
20316 setErrorHandler = function(newShouldErrorImpl) {
20317 shouldErrorImpl = newShouldErrorImpl;
20318 };
20319 setSuspenseHandler = function(newShouldSuspendImpl) {
20320 shouldSuspendImpl = newShouldSuspendImpl;
20321 };
20322 var _enabled = true, return_targetInst = null, hasScheduledReplayAttempt = false, queuedFocus = null, queuedDrag = null, queuedMouse = null, queuedPointers = /* @__PURE__ */ new Map(), queuedPointerCaptures = /* @__PURE__ */ new Map(), queuedExplicitHydrationTargets = [], discreteReplayableEvents = "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(
20323 " "
20324 ), lastScheduledReplayQueue = null;
20325 ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
20326 var root2 = this._internalRoot;
20327 if (null === root2) throw Error("Cannot update an unmounted root.");
20328 var args = arguments;
20329 "function" === typeof args[1] ? console.error(
20330 "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20331 ) : isValidContainer(args[1]) ? console.error(
20332 "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
20333 ) : "undefined" !== typeof args[1] && console.error(
20334 "You passed a second argument to root.render(...) but it only accepts one argument."
20335 );
20336 args = children;
20337 var current2 = root2.current, lane = requestUpdateLane(current2);
20338 updateContainerImpl(current2, lane, args, root2, null, null);
20339 };
20340 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
20341 var args = arguments;
20342 "function" === typeof args[0] && console.error(
20343 "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20344 );
20345 args = this._internalRoot;
20346 if (null !== args) {
20347 this._internalRoot = null;
20348 var container = args.containerInfo;
20349 (executionContext & (RenderContext | CommitContext)) !== NoContext && console.error(
20350 "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
20351 );
20352 updateContainerImpl(args.current, 2, null, args, null, null);
20353 flushSyncWork$1();
20354 container[internalContainerInstanceKey] = null;
20355 }
20356 };
20357 ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
20358 if (target) {
20359 var updatePriority = resolveUpdatePriority();
20360 target = { blockedOn: null, target, priority: updatePriority };
20361 for (var i = 0; i < queuedExplicitHydrationTargets.length && 0 !== updatePriority && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
20362 queuedExplicitHydrationTargets.splice(i, 0, target);
20363 0 === i && attemptExplicitHydrationTarget(target);
20364 }
20365 };
20366 (function() {
20367 var isomorphicReactPackageVersion = React.version;
20368 if ("19.2.7" !== isomorphicReactPackageVersion)
20369 throw Error(
20370 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.7\nLearn more: https://react.dev/warnings/version-mismatch")
20371 );
20372 })();
20373 "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
20374 "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"
20375 );
20376 ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
20377 var fiber = componentOrElement._reactInternals;
20378 if (void 0 === fiber) {
20379 if ("function" === typeof componentOrElement.render)
20380 throw Error("Unable to find node on an unmounted component.");
20381 componentOrElement = Object.keys(componentOrElement).join(",");
20382 throw Error(
20383 "Argument appears to not be a ReactComponent. Keys: " + componentOrElement
20384 );
20385 }
20386 componentOrElement = findCurrentFiberUsingSlowPath(fiber);
20387 componentOrElement = null !== componentOrElement ? findCurrentHostFiberImpl(componentOrElement) : null;
20388 componentOrElement = null === componentOrElement ? null : componentOrElement.stateNode;
20389 return componentOrElement;
20390 };
20391 if (!(function() {
20392 var internals = {
20393 bundleType: 1,
20394 version: "19.2.7",
20395 rendererPackageName: "react-dom",
20396 currentDispatcherRef: ReactSharedInternals,
20397 reconcilerVersion: "19.2.7"
20398 };
20399 internals.overrideHookState = overrideHookState;
20400 internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
20401 internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
20402 internals.overrideProps = overrideProps;
20403 internals.overridePropsDeletePath = overridePropsDeletePath;
20404 internals.overridePropsRenamePath = overridePropsRenamePath;
20405 internals.scheduleUpdate = scheduleUpdate;
20406 internals.scheduleRetry = scheduleRetry;
20407 internals.setErrorHandler = setErrorHandler;
20408 internals.setSuspenseHandler = setSuspenseHandler;
20409 internals.scheduleRefresh = scheduleRefresh;
20410 internals.scheduleRoot = scheduleRoot;
20411 internals.setRefreshHandler = setRefreshHandler;
20412 internals.getCurrentFiber = getCurrentFiberForDevTools;
20413 return injectInternals(internals);
20414 })() && canUseDOM && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Edge") || -1 < navigator.userAgent.indexOf("Firefox"))) {
20415 var protocol = window.location.protocol;
20416 /^(https?|file):$/.test(protocol) && console.info(
20417 "%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" + ("file:" === protocol ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq" : ""),
20418 "font-weight:bold"
20419 );
20420 }
20421 exports.createRoot = function(container, options) {
20422 if (!isValidContainer(container))
20423 throw Error("Target container is not a DOM element.");
20424 warnIfReactDOMContainerInDEV(container);
20425 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError;
20426 null !== options && void 0 !== options && (options.hydrate ? console.warn(
20427 "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
20428 ) : "object" === typeof options && null !== options && (options.$$typeof === REACT_ELEMENT_TYPE || (options.$$typeof === REACT_LEGACY_ELEMENT_TYPE && (__wpWarnCompat("legacy-element"), true))) && console.error(
20429 "You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
20430 ), true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError));
20431 options = createFiberRoot(
20432 container,
20433 1,
20434 false,
20435 null,
20436 null,
20437 isStrictMode,
20438 identifierPrefix,
20439 null,
20440 onUncaughtError,
20441 onCaughtError,
20442 onRecoverableError,
20443 defaultOnDefaultTransitionIndicator
20444 );
20445 container[internalContainerInstanceKey] = options.current;
20446 listenToAllSupportedEvents(container);
20447 return new ReactDOMRoot(options);
20448 };
20449 exports.hydrateRoot = function(container, initialChildren, options) {
20450 if (!isValidContainer(container))
20451 throw Error("Target container is not a DOM element.");
20452 warnIfReactDOMContainerInDEV(container);
20453 void 0 === initialChildren && console.error(
20454 "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
20455 );
20456 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, formState = null;
20457 null !== options && void 0 !== options && (true === options.unstable_strictMode && (isStrictMode = true), void 0 !== options.identifierPrefix && (identifierPrefix = options.identifierPrefix), void 0 !== options.onUncaughtError && (onUncaughtError = options.onUncaughtError), void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError), void 0 !== options.onRecoverableError && (onRecoverableError = options.onRecoverableError), void 0 !== options.formState && (formState = options.formState));
20458 initialChildren = createFiberRoot(
20459 container,
20460 1,
20461 true,
20462 initialChildren,
20463 null != options ? options : null,
20464 isStrictMode,
20465 identifierPrefix,
20466 formState,
20467 onUncaughtError,
20468 onCaughtError,
20469 onRecoverableError,
20470 defaultOnDefaultTransitionIndicator
20471 );
20472 initialChildren.context = getContextForSubtree(null);
20473 options = initialChildren.current;
20474 isStrictMode = requestUpdateLane(options);
20475 isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
20476 identifierPrefix = createUpdate(isStrictMode);
20477 identifierPrefix.callback = null;
20478 enqueueUpdate(options, identifierPrefix, isStrictMode);
20479 startUpdateTimerByLane(isStrictMode, "hydrateRoot()", null);
20480 options = isStrictMode;
20481 initialChildren.current.lanes = options;
20482 markRootUpdated$1(initialChildren, options);
20483 ensureRootIsScheduled(initialChildren);
20484 container[internalContainerInstanceKey] = initialChildren.current;
20485 listenToAllSupportedEvents(container);
20486 return new ReactDOMHydrationRoot(initialChildren);
20487 };
20488 exports.version = "19.2.7";
20489 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
20490 })();
20491 }
20492 });
20493
20494 // ../react-19/node_modules/react-dom/client.js
20495 var require_client = __commonJS({
20496 "../react-19/node_modules/react-dom/client.js"(exports, module) {
20497 "use strict";
20498 if (false) {
20499 checkDCE();
20500 module.exports = null;
20501 } else {
20502 module.exports = require_react_dom_client_development();
20503 }
20504 }
20505 });
20506
20507 // ../react-19/react-polyfill.js
20508 var react_polyfill_exports = {};
20509 __export(react_polyfill_exports, {
20510 findDOMNode: () => findDOMNode,
20511 hydrate: () => hydrate,
20512 render: () => render,
20513 unmountComponentAtNode: () => unmountComponentAtNode
20514 });
20515 function findCurrentFiber(fiber) {
20516 if (!fiber.alternate) {
20517 return fiber;
20518 }
20519 let node = fiber;
20520 while (node.return) {
20521 node = node.return;
20522 }
20523 if (node.stateNode.current === node) {
20524 return fiber;
20525 }
20526 return fiber.alternate;
20527 }
20528 function findHostFiber(fiber) {
20529 const current = findCurrentFiber(fiber);
20530 if (!current) {
20531 return null;
20532 }
20533 return findHostFiberImpl(current);
20534 }
20535 function findHostFiberImpl(fiber) {
20536 if (fiber.tag === HostComponent || fiber.tag === HostText) {
20537 return fiber;
20538 }
20539 let child = fiber.child;
20540 while (child) {
20541 const hostFiber = findHostFiberImpl(child);
20542 if (hostFiber) {
20543 return hostFiber;
20544 }
20545 child = child.sibling;
20546 }
20547 return null;
20548 }
20549 function findDOMNode(instance) {
20550 warnCompat(
20551 "findDOMNode",
20552 "`ReactDOM.findDOMNode` was removed in React 19 and is emulated by a compatibility polyfill. Use refs instead."
20553 );
20554 if (instance === null || instance === void 0) {
20555 return null;
20556 }
20557 if (instance.nodeType !== void 0) {
20558 return instance;
20559 }
20560 const fiber = instance[internalsKey];
20561 if (fiber === void 0) {
20562 if (typeof instance.render === "function") {
20563 throw new Error("Unable to find node on an unmounted component.");
20564 }
20565 const keys = Object.keys(instance).join(",");
20566 throw new Error(
20567 `Argument appears to not be a ReactComponent. Keys: ${keys}`
20568 );
20569 }
20570 const hostFiber = findHostFiber(fiber);
20571 return hostFiber?.stateNode ?? null;
20572 }
20573 function render(element, container, callback) {
20574 warnCompat(
20575 "render",
20576 "`ReactDOM.render` was removed in React 19 and is emulated by a compatibility polyfill. Use `createRoot` instead."
20577 );
20578 let root = roots.get(container);
20579 if (!root) {
20580 root = (0, import_client.createRoot)(container);
20581 roots.set(container, root);
20582 }
20583 (0, import_react_dom.flushSync)(() => {
20584 root.render(element);
20585 });
20586 if (typeof callback === "function") {
20587 callback();
20588 }
20589 }
20590 function hydrate(element, container, callback) {
20591 warnCompat(
20592 "hydrate",
20593 "`ReactDOM.hydrate` was removed in React 19 and is emulated by a compatibility polyfill. Use `hydrateRoot` instead."
20594 );
20595 let root = roots.get(container);
20596 if (!root) {
20597 root = (0, import_client.hydrateRoot)(container, element);
20598 roots.set(container, root);
20599 } else {
20600 root.render(element);
20601 }
20602 if (typeof callback === "function") {
20603 callback();
20604 }
20605 }
20606 function unmountComponentAtNode(container) {
20607 warnCompat(
20608 "unmountComponentAtNode",
20609 "`ReactDOM.unmountComponentAtNode` was removed in React 19 and is emulated by a compatibility polyfill. Use `root.unmount` instead."
20610 );
20611 const root = roots.get(container);
20612 if (!root) {
20613 return false;
20614 }
20615 (0, import_react_dom.flushSync)(() => {
20616 root.unmount();
20617 });
20618 roots.delete(container);
20619 return true;
20620 }
20621 var import_react_dom, import_client, internalsKey, HostComponent, HostText, roots;
20622 var init_react_polyfill = __esm({
20623 "../react-19/react-polyfill.js"() {
20624 import_react_dom = __toESM(require_react_dom());
20625 import_client = __toESM(require_client());
20626 init_warn_compat();
20627 internalsKey = "_reactInternals";
20628 HostComponent = 5;
20629 HostText = 6;
20630 roots = /* @__PURE__ */ new WeakMap();
20631 }
20632 });
20633
20634 // ../react-19/react-dom.js
20635 var require_react_dom2 = __commonJS({
20636 "../react-19/react-dom.js"(exports, module) {
20637 var { warnCompat: warnCompat2 } = (init_warn_compat(), __toCommonJS(warn_compat_exports));
20638 var SECRET_INTERNALS_KEY = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
20639 var secretInternals = {};
20640 var reactDOM = {
20641 ...require_react_dom(),
20642 ...require_client(),
20643 ...(init_react_polyfill(), __toCommonJS(react_polyfill_exports))
20644 };
20645 Object.defineProperty(reactDOM, SECRET_INTERNALS_KEY, {
20646 enumerable: true,
20647 configurable: true,
20648 get() {
20649 warnCompat2(
20650 "react-dom-secret-internals",
20651 `Accessing \`${SECRET_INTERNALS_KEY}\` was removed in React 19 and is provided by a compatibility shim.`
20652 );
20653 return secretInternals;
20654 }
20655 });
20656 module.exports = reactDOM;
20657 }
20658 });
20659 return require_react_dom2();
20660 })();
20661 /*! Bundled license information:
20662
20663 react-dom/cjs/react-dom.development.js:
20664 (**
20665 * @license React
20666 * react-dom.development.js
20667 *
20668 * Copyright (c) Meta Platforms, Inc. and affiliates.
20669 *
20670 * This source code is licensed under the MIT license found in the
20671 * LICENSE file in the root directory of this source tree.
20672 *)
20673
20674 scheduler/cjs/scheduler.development.js:
20675 (**
20676 * @license React
20677 * scheduler.development.js
20678 *
20679 * Copyright (c) Meta Platforms, Inc. and affiliates.
20680 *
20681 * This source code is licensed under the MIT license found in the
20682 * LICENSE file in the root directory of this source tree.
20683 *)
20684
20685 react-dom/cjs/react-dom-client.development.js:
20686 (**
20687 * @license React
20688 * react-dom-client.development.js
20689 *
20690 * Copyright (c) Meta Platforms, Inc. and affiliates.
20691 *
20692 * This source code is licensed under the MIT license found in the
20693 * LICENSE file in the root directory of this source tree.
20694 *)
20695 */
20696