UNPKG

49.2 kBJavaScriptView Raw
1/**
2 * @license React
3 * react.development.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11"use strict";
12"production" !== process.env.NODE_ENV &&
13 (function () {
14 function defineDeprecationWarning(methodName, info) {
15 Object.defineProperty(Component.prototype, methodName, {
16 get: function () {
17 console.warn(
18 "%s(...) is deprecated in plain JavaScript React classes. %s",
19 info[0],
20 info[1]
21 );
22 }
23 });
24 }
25 function getIteratorFn(maybeIterable) {
26 if (null === maybeIterable || "object" !== typeof maybeIterable)
27 return null;
28 maybeIterable =
29 (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
30 maybeIterable["@@iterator"];
31 return "function" === typeof maybeIterable ? maybeIterable : null;
32 }
33 function warnNoop(publicInstance, callerName) {
34 publicInstance =
35 ((publicInstance = publicInstance.constructor) &&
36 (publicInstance.displayName || publicInstance.name)) ||
37 "ReactClass";
38 var warningKey = publicInstance + "." + callerName;
39 didWarnStateUpdateForUnmountedComponent[warningKey] ||
40 (console.error(
41 "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
42 callerName,
43 publicInstance
44 ),
45 (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
46 }
47 function Component(props, context, updater) {
48 this.props = props;
49 this.context = context;
50 this.refs = emptyObject;
51 this.updater = updater || ReactNoopUpdateQueue;
52 }
53 function ComponentDummy() {}
54 function PureComponent(props, context, updater) {
55 this.props = props;
56 this.context = context;
57 this.refs = emptyObject;
58 this.updater = updater || ReactNoopUpdateQueue;
59 }
60 function noop() {}
61 function testStringCoercion(value) {
62 return "" + value;
63 }
64 function checkKeyStringCoercion(value) {
65 try {
66 testStringCoercion(value);
67 var JSCompiler_inline_result = !1;
68 } catch (e) {
69 JSCompiler_inline_result = !0;
70 }
71 if (JSCompiler_inline_result) {
72 JSCompiler_inline_result = console;
73 var JSCompiler_temp_const = JSCompiler_inline_result.error;
74 var JSCompiler_inline_result$jscomp$0 =
75 ("function" === typeof Symbol &&
76 Symbol.toStringTag &&
77 value[Symbol.toStringTag]) ||
78 value.constructor.name ||
79 "Object";
80 JSCompiler_temp_const.call(
81 JSCompiler_inline_result,
82 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
83 JSCompiler_inline_result$jscomp$0
84 );
85 return testStringCoercion(value);
86 }
87 }
88 function getComponentNameFromType(type) {
89 if (null == type) return null;
90 if ("function" === typeof type)
91 return type.$$typeof === REACT_CLIENT_REFERENCE
92 ? null
93 : type.displayName || type.name || null;
94 if ("string" === typeof type) return type;
95 switch (type) {
96 case REACT_FRAGMENT_TYPE:
97 return "Fragment";
98 case REACT_PROFILER_TYPE:
99 return "Profiler";
100 case REACT_STRICT_MODE_TYPE:
101 return "StrictMode";
102 case REACT_SUSPENSE_TYPE:
103 return "Suspense";
104 case REACT_SUSPENSE_LIST_TYPE:
105 return "SuspenseList";
106 case REACT_ACTIVITY_TYPE:
107 return "Activity";
108 case REACT_VIEW_TRANSITION_TYPE:
109 return "ViewTransition";
110 }
111 if ("object" === typeof type)
112 switch (
113 ("number" === typeof type.tag &&
114 console.error(
115 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
116 ),
117 type.$$typeof)
118 ) {
119 case REACT_PORTAL_TYPE:
120 return "Portal";
121 case REACT_CONTEXT_TYPE:
122 return type.displayName || "Context";
123 case REACT_CONSUMER_TYPE:
124 return (type._context.displayName || "Context") + ".Consumer";
125 case REACT_FORWARD_REF_TYPE:
126 var innerType = type.render;
127 type = type.displayName;
128 type ||
129 ((type = innerType.displayName || innerType.name || ""),
130 (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
131 return type;
132 case REACT_MEMO_TYPE:
133 return (
134 (innerType = type.displayName || null),
135 null !== innerType
136 ? innerType
137 : getComponentNameFromType(type.type) || "Memo"
138 );
139 case REACT_LAZY_TYPE:
140 innerType = type._payload;
141 type = type._init;
142 try {
143 return getComponentNameFromType(type(innerType));
144 } catch (x) {}
145 }
146 return null;
147 }
148 function getTaskName(type) {
149 if (type === REACT_FRAGMENT_TYPE) return "<>";
150 if (
151 "object" === typeof type &&
152 null !== type &&
153 type.$$typeof === REACT_LAZY_TYPE
154 )
155 return "<...>";
156 try {
157 var name = getComponentNameFromType(type);
158 return name ? "<" + name + ">" : "<...>";
159 } catch (x) {
160 return "<...>";
161 }
162 }
163 function getOwner() {
164 var dispatcher = ReactSharedInternals.A;
165 return null === dispatcher ? null : dispatcher.getOwner();
166 }
167 function UnknownOwner() {
168 return Error("react-stack-top-frame");
169 }
170 function hasValidKey(config) {
171 if (hasOwnProperty.call(config, "key")) {
172 var getter = Object.getOwnPropertyDescriptor(config, "key").get;
173 if (getter && getter.isReactWarning) return !1;
174 }
175 return void 0 !== config.key;
176 }
177 function defineKeyPropWarningGetter(props, displayName) {
178 function warnAboutAccessingKey() {
179 specialPropKeyWarningShown ||
180 ((specialPropKeyWarningShown = !0),
181 console.error(
182 "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
183 displayName
184 ));
185 }
186 warnAboutAccessingKey.isReactWarning = !0;
187 Object.defineProperty(props, "key", {
188 get: warnAboutAccessingKey,
189 configurable: !0
190 });
191 }
192 function elementRefGetterWithDeprecationWarning() {
193 var componentName = getComponentNameFromType(this.type);
194 didWarnAboutElementRef[componentName] ||
195 ((didWarnAboutElementRef[componentName] = !0),
196 console.error(
197 "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
198 ));
199 componentName = this.props.ref;
200 return void 0 !== componentName ? componentName : null;
201 }
202 function ReactElement(type, key, props, owner, debugStack, debugTask) {
203 var refProp = props.ref;
204 type = {
205 $$typeof: REACT_ELEMENT_TYPE,
206 type: type,
207 key: key,
208 props: props,
209 _owner: owner
210 };
211 null !== (void 0 !== refProp ? refProp : null)
212 ? Object.defineProperty(type, "ref", {
213 enumerable: !1,
214 get: elementRefGetterWithDeprecationWarning
215 })
216 : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
217 type._store = {};
218 Object.defineProperty(type._store, "validated", {
219 configurable: !1,
220 enumerable: !1,
221 writable: !0,
222 value: 0
223 });
224 Object.defineProperty(type, "_debugInfo", {
225 configurable: !1,
226 enumerable: !1,
227 writable: !0,
228 value: null
229 });
230 Object.defineProperty(type, "_debugStack", {
231 configurable: !1,
232 enumerable: !1,
233 writable: !0,
234 value: debugStack
235 });
236 Object.defineProperty(type, "_debugTask", {
237 configurable: !1,
238 enumerable: !1,
239 writable: !0,
240 value: debugTask
241 });
242 Object.freeze && (Object.freeze(type.props), Object.freeze(type));
243 return type;
244 }
245 function cloneAndReplaceKey(oldElement, newKey) {
246 newKey = ReactElement(
247 oldElement.type,
248 newKey,
249 oldElement.props,
250 oldElement._owner,
251 oldElement._debugStack,
252 oldElement._debugTask
253 );
254 oldElement._store &&
255 (newKey._store.validated = oldElement._store.validated);
256 return newKey;
257 }
258 function validateChildKeys(node) {
259 isValidElement(node)
260 ? node._store && (node._store.validated = 1)
261 : "object" === typeof node &&
262 null !== node &&
263 node.$$typeof === REACT_LAZY_TYPE &&
264 ("fulfilled" === node._payload.status
265 ? isValidElement(node._payload.value) &&
266 node._payload.value._store &&
267 (node._payload.value._store.validated = 1)
268 : node._store && (node._store.validated = 1));
269 }
270 function isValidElement(object) {
271 return (
272 "object" === typeof object &&
273 null !== object &&
274 object.$$typeof === REACT_ELEMENT_TYPE
275 );
276 }
277 function escape(key) {
278 var escaperLookup = { "=": "=0", ":": "=2" };
279 return (
280 "$" +
281 key.replace(/[=:]/g, function (match) {
282 return escaperLookup[match];
283 })
284 );
285 }
286 function getElementKey(element, index) {
287 return "object" === typeof element &&
288 null !== element &&
289 null != element.key
290 ? (checkKeyStringCoercion(element.key), escape("" + element.key))
291 : index.toString(36);
292 }
293 function resolveThenable(thenable) {
294 switch (thenable.status) {
295 case "fulfilled":
296 return thenable.value;
297 case "rejected":
298 throw thenable.reason;
299 default:
300 switch (
301 ("string" === typeof thenable.status
302 ? thenable.then(noop, noop)
303 : ((thenable.status = "pending"),
304 thenable.then(
305 function (fulfilledValue) {
306 "pending" === thenable.status &&
307 ((thenable.status = "fulfilled"),
308 (thenable.value = fulfilledValue));
309 },
310 function (error) {
311 "pending" === thenable.status &&
312 ((thenable.status = "rejected"),
313 (thenable.reason = error));
314 }
315 )),
316 thenable.status)
317 ) {
318 case "fulfilled":
319 return thenable.value;
320 case "rejected":
321 throw thenable.reason;
322 }
323 }
324 throw thenable;
325 }
326 function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
327 var type = typeof children;
328 if ("undefined" === type || "boolean" === type) children = null;
329 var invokeCallback = !1;
330 if (null === children) invokeCallback = !0;
331 else
332 switch (type) {
333 case "bigint":
334 case "string":
335 case "number":
336 invokeCallback = !0;
337 break;
338 case "object":
339 switch (children.$$typeof) {
340 case REACT_ELEMENT_TYPE:
341 case REACT_PORTAL_TYPE:
342 invokeCallback = !0;
343 break;
344 case REACT_LAZY_TYPE:
345 return (
346 (invokeCallback = children._init),
347 mapIntoArray(
348 invokeCallback(children._payload),
349 array,
350 escapedPrefix,
351 nameSoFar,
352 callback
353 )
354 );
355 }
356 }
357 if (invokeCallback) {
358 invokeCallback = children;
359 callback = callback(invokeCallback);
360 var childKey =
361 "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
362 isArrayImpl(callback)
363 ? ((escapedPrefix = ""),
364 null != childKey &&
365 (escapedPrefix =
366 childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
367 mapIntoArray(callback, array, escapedPrefix, "", function (c) {
368 return c;
369 }))
370 : null != callback &&
371 (isValidElement(callback) &&
372 (null != callback.key &&
373 ((invokeCallback && invokeCallback.key === callback.key) ||
374 checkKeyStringCoercion(callback.key)),
375 (escapedPrefix = cloneAndReplaceKey(
376 callback,
377 escapedPrefix +
378 (null == callback.key ||
379 (invokeCallback && invokeCallback.key === callback.key)
380 ? ""
381 : ("" + callback.key).replace(
382 userProvidedKeyEscapeRegex,
383 "$&/"
384 ) + "/") +
385 childKey
386 )),
387 "" !== nameSoFar &&
388 null != invokeCallback &&
389 isValidElement(invokeCallback) &&
390 null == invokeCallback.key &&
391 invokeCallback._store &&
392 !invokeCallback._store.validated &&
393 (escapedPrefix._store.validated = 2),
394 (callback = escapedPrefix)),
395 array.push(callback));
396 return 1;
397 }
398 invokeCallback = 0;
399 childKey = "" === nameSoFar ? "." : nameSoFar + ":";
400 if (isArrayImpl(children))
401 for (var i = 0; i < children.length; i++)
402 (nameSoFar = children[i]),
403 (type = childKey + getElementKey(nameSoFar, i)),
404 (invokeCallback += mapIntoArray(
405 nameSoFar,
406 array,
407 escapedPrefix,
408 type,
409 callback
410 ));
411 else if (((i = getIteratorFn(children)), "function" === typeof i))
412 for (
413 i === children.entries &&
414 (didWarnAboutMaps ||
415 console.warn(
416 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
417 ),
418 (didWarnAboutMaps = !0)),
419 children = i.call(children),
420 i = 0;
421 !(nameSoFar = children.next()).done;
422
423 )
424 (nameSoFar = nameSoFar.value),
425 (type = childKey + getElementKey(nameSoFar, i++)),
426 (invokeCallback += mapIntoArray(
427 nameSoFar,
428 array,
429 escapedPrefix,
430 type,
431 callback
432 ));
433 else if ("object" === type) {
434 if ("function" === typeof children.then)
435 return mapIntoArray(
436 resolveThenable(children),
437 array,
438 escapedPrefix,
439 nameSoFar,
440 callback
441 );
442 array = String(children);
443 throw Error(
444 "Objects are not valid as a React child (found: " +
445 ("[object Object]" === array
446 ? "object with keys {" + Object.keys(children).join(", ") + "}"
447 : array) +
448 "). If you meant to render a collection of children, use an array instead."
449 );
450 }
451 return invokeCallback;
452 }
453 function mapChildren(children, func, context) {
454 if (null == children) return children;
455 var result = [],
456 count = 0;
457 mapIntoArray(children, result, "", "", function (child) {
458 return func.call(context, child, count++);
459 });
460 return result;
461 }
462 function lazyInitializer(payload) {
463 if (-1 === payload._status) {
464 var resolveDebugValue = null,
465 rejectDebugValue = null,
466 ioInfo = payload._ioInfo;
467 null != ioInfo &&
468 ((ioInfo.start = ioInfo.end = performance.now()),
469 (ioInfo.value = new Promise(function (resolve, reject) {
470 resolveDebugValue = resolve;
471 rejectDebugValue = reject;
472 })));
473 ioInfo = payload._result;
474 var thenable = ioInfo();
475 thenable.then(
476 function (moduleObject) {
477 if (0 === payload._status || -1 === payload._status) {
478 payload._status = 1;
479 payload._result = moduleObject;
480 var _ioInfo = payload._ioInfo;
481 if (null != _ioInfo) {
482 _ioInfo.end = performance.now();
483 var debugValue =
484 null == moduleObject ? void 0 : moduleObject.default;
485 resolveDebugValue(debugValue);
486 _ioInfo.value.status = "fulfilled";
487 _ioInfo.value.value = debugValue;
488 }
489 void 0 === thenable.status &&
490 ((thenable.status = "fulfilled"),
491 (thenable.value = moduleObject));
492 }
493 },
494 function (error) {
495 if (0 === payload._status || -1 === payload._status) {
496 payload._status = 2;
497 payload._result = error;
498 var _ioInfo2 = payload._ioInfo;
499 null != _ioInfo2 &&
500 ((_ioInfo2.end = performance.now()),
501 _ioInfo2.value.then(noop, noop),
502 rejectDebugValue(error),
503 (_ioInfo2.value.status = "rejected"),
504 (_ioInfo2.value.reason = error));
505 void 0 === thenable.status &&
506 ((thenable.status = "rejected"), (thenable.reason = error));
507 }
508 }
509 );
510 ioInfo = payload._ioInfo;
511 if (null != ioInfo) {
512 var displayName = thenable.displayName;
513 "string" === typeof displayName && (ioInfo.name = displayName);
514 }
515 -1 === payload._status &&
516 ((payload._status = 0), (payload._result = thenable));
517 }
518 if (1 === payload._status)
519 return (
520 (ioInfo = payload._result),
521 void 0 === ioInfo &&
522 console.error(
523 "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
524 ioInfo
525 ),
526 "default" in ioInfo ||
527 console.error(
528 "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
529 ioInfo
530 ),
531 ioInfo.default
532 );
533 throw payload._result;
534 }
535 function resolveDispatcher() {
536 var dispatcher = ReactSharedInternals.H;
537 null === dispatcher &&
538 console.error(
539 "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."
540 );
541 return dispatcher;
542 }
543 function releaseAsyncTransition() {
544 ReactSharedInternals.asyncTransitions--;
545 }
546 function startTransition(scope) {
547 var prevTransition = ReactSharedInternals.T,
548 currentTransition = {};
549 currentTransition.types =
550 null !== prevTransition ? prevTransition.types : null;
551 currentTransition._updatedFibers = new Set();
552 ReactSharedInternals.T = currentTransition;
553 try {
554 var returnValue = scope(),
555 onStartTransitionFinish = ReactSharedInternals.S;
556 null !== onStartTransitionFinish &&
557 onStartTransitionFinish(currentTransition, returnValue);
558 "object" === typeof returnValue &&
559 null !== returnValue &&
560 "function" === typeof returnValue.then &&
561 (ReactSharedInternals.asyncTransitions++,
562 returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
563 returnValue.then(noop, reportGlobalError));
564 } catch (error) {
565 reportGlobalError(error);
566 } finally {
567 null === prevTransition &&
568 currentTransition._updatedFibers &&
569 ((scope = currentTransition._updatedFibers.size),
570 currentTransition._updatedFibers.clear(),
571 10 < scope &&
572 console.warn(
573 "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."
574 )),
575 null !== prevTransition &&
576 null !== currentTransition.types &&
577 (null !== prevTransition.types &&
578 prevTransition.types !== currentTransition.types &&
579 console.error(
580 "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."
581 ),
582 (prevTransition.types = currentTransition.types)),
583 (ReactSharedInternals.T = prevTransition);
584 }
585 }
586 function addTransitionType(type) {
587 var transition = ReactSharedInternals.T;
588 if (null !== transition) {
589 var transitionTypes = transition.types;
590 null === transitionTypes
591 ? (transition.types = [type])
592 : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
593 } else
594 0 === ReactSharedInternals.asyncTransitions &&
595 console.error(
596 "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
597 ),
598 startTransition(addTransitionType.bind(null, type));
599 }
600 function enqueueTask(task) {
601 if (null === enqueueTaskImpl)
602 try {
603 var requireString = ("require" + Math.random()).slice(0, 7);
604 enqueueTaskImpl = (module && module[requireString]).call(
605 module,
606 "timers"
607 ).setImmediate;
608 } catch (_err) {
609 enqueueTaskImpl = function (callback) {
610 !1 === didWarnAboutMessageChannel &&
611 ((didWarnAboutMessageChannel = !0),
612 "undefined" === typeof MessageChannel &&
613 console.error(
614 "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
615 ));
616 var channel = new MessageChannel();
617 channel.port1.onmessage = callback;
618 channel.port2.postMessage(void 0);
619 };
620 }
621 return enqueueTaskImpl(task);
622 }
623 function aggregateErrors(errors) {
624 return 1 < errors.length && "function" === typeof AggregateError
625 ? new AggregateError(errors)
626 : errors[0];
627 }
628 function popActScope(prevActQueue, prevActScopeDepth) {
629 prevActScopeDepth !== actScopeDepth - 1 &&
630 console.error(
631 "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
632 );
633 actScopeDepth = prevActScopeDepth;
634 }
635 function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
636 var queue = ReactSharedInternals.actQueue;
637 if (null !== queue)
638 if (0 !== queue.length)
639 try {
640 flushActQueue(queue);
641 enqueueTask(function () {
642 return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
643 });
644 return;
645 } catch (error) {
646 ReactSharedInternals.thrownErrors.push(error);
647 }
648 else ReactSharedInternals.actQueue = null;
649 0 < ReactSharedInternals.thrownErrors.length
650 ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
651 (ReactSharedInternals.thrownErrors.length = 0),
652 reject(queue))
653 : resolve(returnValue);
654 }
655 function flushActQueue(queue) {
656 if (!isFlushing) {
657 isFlushing = !0;
658 var i = 0;
659 try {
660 for (; i < queue.length; i++) {
661 var callback = queue[i];
662 do {
663 ReactSharedInternals.didUsePromise = !1;
664 var continuation = callback(!1);
665 if (null !== continuation) {
666 if (ReactSharedInternals.didUsePromise) {
667 queue[i] = callback;
668 queue.splice(0, i);
669 return;
670 }
671 callback = continuation;
672 } else break;
673 } while (1);
674 }
675 queue.length = 0;
676 } catch (error) {
677 queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
678 } finally {
679 isFlushing = !1;
680 }
681 }
682 }
683 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
684 "function" ===
685 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
686 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
687 var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
688 REACT_PORTAL_TYPE = Symbol.for("react.portal"),
689 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
690 REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
691 REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
692 REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
693 REACT_CONTEXT_TYPE = Symbol.for("react.context"),
694 REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
695 REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
696 REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
697 REACT_MEMO_TYPE = Symbol.for("react.memo"),
698 REACT_LAZY_TYPE = Symbol.for("react.lazy"),
699 REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
700 REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
701 MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
702 didWarnStateUpdateForUnmountedComponent = {},
703 ReactNoopUpdateQueue = {
704 isMounted: function () {
705 return !1;
706 },
707 enqueueForceUpdate: function (publicInstance) {
708 warnNoop(publicInstance, "forceUpdate");
709 },
710 enqueueReplaceState: function (publicInstance) {
711 warnNoop(publicInstance, "replaceState");
712 },
713 enqueueSetState: function (publicInstance) {
714 warnNoop(publicInstance, "setState");
715 }
716 },
717 assign = Object.assign,
718 emptyObject = {};
719 Object.freeze(emptyObject);
720 Component.prototype.isReactComponent = {};
721 Component.prototype.setState = function (partialState, callback) {
722 if (
723 "object" !== typeof partialState &&
724 "function" !== typeof partialState &&
725 null != partialState
726 )
727 throw Error(
728 "takes an object of state variables to update or a function which returns an object of state variables."
729 );
730 this.updater.enqueueSetState(this, partialState, callback, "setState");
731 };
732 Component.prototype.forceUpdate = function (callback) {
733 this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
734 };
735 var deprecatedAPIs = {
736 isMounted: [
737 "isMounted",
738 "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
739 ],
740 replaceState: [
741 "replaceState",
742 "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
743 ]
744 };
745 for (fnName in deprecatedAPIs)
746 deprecatedAPIs.hasOwnProperty(fnName) &&
747 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
748 ComponentDummy.prototype = Component.prototype;
749 deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
750 deprecatedAPIs.constructor = PureComponent;
751 assign(deprecatedAPIs, Component.prototype);
752 deprecatedAPIs.isPureReactComponent = !0;
753 var isArrayImpl = Array.isArray,
754 REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
755 ReactSharedInternals = {
756 H: null,
757 A: null,
758 T: null,
759 S: null,
760 actQueue: null,
761 asyncTransitions: 0,
762 isBatchingLegacy: !1,
763 didScheduleLegacyUpdate: !1,
764 didUsePromise: !1,
765 thrownErrors: [],
766 getCurrentStack: null,
767 recentlyCreatedOwnerStacks: 0
768 },
769 hasOwnProperty = Object.prototype.hasOwnProperty,
770 createTask = console.createTask
771 ? console.createTask
772 : function () {
773 return null;
774 };
775 deprecatedAPIs = {
776 react_stack_bottom_frame: function (callStackForError) {
777 return callStackForError();
778 }
779 };
780 var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
781 var didWarnAboutElementRef = {};
782 var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
783 deprecatedAPIs,
784 UnknownOwner
785 )();
786 var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
787 var didWarnAboutMaps = !1,
788 userProvidedKeyEscapeRegex = /\/+/g,
789 reportGlobalError =
790 "function" === typeof reportError
791 ? reportError
792 : function (error) {
793 if (
794 "object" === typeof window &&
795 "function" === typeof window.ErrorEvent
796 ) {
797 var event = new window.ErrorEvent("error", {
798 bubbles: !0,
799 cancelable: !0,
800 message:
801 "object" === typeof error &&
802 null !== error &&
803 "string" === typeof error.message
804 ? String(error.message)
805 : String(error),
806 error: error
807 });
808 if (!window.dispatchEvent(event)) return;
809 } else if (
810 "object" === typeof process &&
811 "function" === typeof process.emit
812 ) {
813 process.emit("uncaughtException", error);
814 return;
815 }
816 console.error(error);
817 },
818 didWarnAboutMessageChannel = !1,
819 enqueueTaskImpl = null,
820 actScopeDepth = 0,
821 didWarnNoAwaitAct = !1,
822 isFlushing = !1,
823 queueSeveralMicrotasks =
824 "function" === typeof queueMicrotask
825 ? function (callback) {
826 queueMicrotask(function () {
827 return queueMicrotask(callback);
828 });
829 }
830 : enqueueTask;
831 deprecatedAPIs = Object.freeze({
832 __proto__: null,
833 c: function (size) {
834 return resolveDispatcher().useMemoCache(size);
835 }
836 });
837 var fnName = {
838 map: mapChildren,
839 forEach: function (children, forEachFunc, forEachContext) {
840 mapChildren(
841 children,
842 function () {
843 forEachFunc.apply(this, arguments);
844 },
845 forEachContext
846 );
847 },
848 count: function (children) {
849 var n = 0;
850 mapChildren(children, function () {
851 n++;
852 });
853 return n;
854 },
855 toArray: function (children) {
856 return (
857 mapChildren(children, function (child) {
858 return child;
859 }) || []
860 );
861 },
862 only: function (children) {
863 if (!isValidElement(children))
864 throw Error(
865 "React.Children.only expected to receive a single React element child."
866 );
867 return children;
868 }
869 };
870 exports.Activity = REACT_ACTIVITY_TYPE;
871 exports.Children = fnName;
872 exports.Component = Component;
873 exports.Fragment = REACT_FRAGMENT_TYPE;
874 exports.Profiler = REACT_PROFILER_TYPE;
875 exports.PureComponent = PureComponent;
876 exports.StrictMode = REACT_STRICT_MODE_TYPE;
877 exports.Suspense = REACT_SUSPENSE_TYPE;
878 exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
879 exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
880 ReactSharedInternals;
881 exports.__COMPILER_RUNTIME = deprecatedAPIs;
882 exports.act = function (callback) {
883 var prevActQueue = ReactSharedInternals.actQueue,
884 prevActScopeDepth = actScopeDepth;
885 actScopeDepth++;
886 var queue = (ReactSharedInternals.actQueue =
887 null !== prevActQueue ? prevActQueue : []),
888 didAwaitActCall = !1;
889 try {
890 var result = callback();
891 } catch (error) {
892 ReactSharedInternals.thrownErrors.push(error);
893 }
894 if (0 < ReactSharedInternals.thrownErrors.length)
895 throw (
896 (popActScope(prevActQueue, prevActScopeDepth),
897 (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
898 (ReactSharedInternals.thrownErrors.length = 0),
899 callback)
900 );
901 if (
902 null !== result &&
903 "object" === typeof result &&
904 "function" === typeof result.then
905 ) {
906 var thenable = result;
907 queueSeveralMicrotasks(function () {
908 didAwaitActCall ||
909 didWarnNoAwaitAct ||
910 ((didWarnNoAwaitAct = !0),
911 console.error(
912 "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
913 ));
914 });
915 return {
916 then: function (resolve, reject) {
917 didAwaitActCall = !0;
918 thenable.then(
919 function (returnValue) {
920 popActScope(prevActQueue, prevActScopeDepth);
921 if (0 === prevActScopeDepth) {
922 try {
923 flushActQueue(queue),
924 enqueueTask(function () {
925 return recursivelyFlushAsyncActWork(
926 returnValue,
927 resolve,
928 reject
929 );
930 });
931 } catch (error$0) {
932 ReactSharedInternals.thrownErrors.push(error$0);
933 }
934 if (0 < ReactSharedInternals.thrownErrors.length) {
935 var _thrownError = aggregateErrors(
936 ReactSharedInternals.thrownErrors
937 );
938 ReactSharedInternals.thrownErrors.length = 0;
939 reject(_thrownError);
940 }
941 } else resolve(returnValue);
942 },
943 function (error) {
944 popActScope(prevActQueue, prevActScopeDepth);
945 0 < ReactSharedInternals.thrownErrors.length
946 ? ((error = aggregateErrors(
947 ReactSharedInternals.thrownErrors
948 )),
949 (ReactSharedInternals.thrownErrors.length = 0),
950 reject(error))
951 : reject(error);
952 }
953 );
954 }
955 };
956 }
957 var returnValue$jscomp$0 = result;
958 popActScope(prevActQueue, prevActScopeDepth);
959 0 === prevActScopeDepth &&
960 (flushActQueue(queue),
961 0 !== queue.length &&
962 queueSeveralMicrotasks(function () {
963 didAwaitActCall ||
964 didWarnNoAwaitAct ||
965 ((didWarnNoAwaitAct = !0),
966 console.error(
967 "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
968 ));
969 }),
970 (ReactSharedInternals.actQueue = null));
971 if (0 < ReactSharedInternals.thrownErrors.length)
972 throw (
973 ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
974 (ReactSharedInternals.thrownErrors.length = 0),
975 callback)
976 );
977 return {
978 then: function (resolve, reject) {
979 didAwaitActCall = !0;
980 0 === prevActScopeDepth
981 ? ((ReactSharedInternals.actQueue = queue),
982 enqueueTask(function () {
983 return recursivelyFlushAsyncActWork(
984 returnValue$jscomp$0,
985 resolve,
986 reject
987 );
988 }))
989 : resolve(returnValue$jscomp$0);
990 }
991 };
992 };
993 exports.addTransitionType = addTransitionType;
994 exports.cache = function (fn) {
995 return function () {
996 return fn.apply(null, arguments);
997 };
998 };
999 exports.cacheSignal = function () {
1000 return null;
1001 };
1002 exports.captureOwnerStack = function () {
1003 var getCurrentStack = ReactSharedInternals.getCurrentStack;
1004 return null === getCurrentStack ? null : getCurrentStack();
1005 };
1006 exports.cloneElement = function (element, config, children) {
1007 if (null === element || void 0 === element)
1008 throw Error(
1009 "The argument must be a React element, but you passed " +
1010 element +
1011 "."
1012 );
1013 var props = assign({}, element.props),
1014 key = element.key,
1015 owner = element._owner;
1016 if (null != config) {
1017 var JSCompiler_inline_result;
1018 a: {
1019 if (
1020 hasOwnProperty.call(config, "ref") &&
1021 (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1022 config,
1023 "ref"
1024 ).get) &&
1025 JSCompiler_inline_result.isReactWarning
1026 ) {
1027 JSCompiler_inline_result = !1;
1028 break a;
1029 }
1030 JSCompiler_inline_result = void 0 !== config.ref;
1031 }
1032 JSCompiler_inline_result && (owner = getOwner());
1033 hasValidKey(config) &&
1034 (checkKeyStringCoercion(config.key), (key = "" + config.key));
1035 for (propName in config)
1036 !hasOwnProperty.call(config, propName) ||
1037 "key" === propName ||
1038 "__self" === propName ||
1039 "__source" === propName ||
1040 ("ref" === propName && void 0 === config.ref) ||
1041 (props[propName] = config[propName]);
1042 }
1043 var propName = arguments.length - 2;
1044 if (1 === propName) props.children = children;
1045 else if (1 < propName) {
1046 JSCompiler_inline_result = Array(propName);
1047 for (var i = 0; i < propName; i++)
1048 JSCompiler_inline_result[i] = arguments[i + 2];
1049 props.children = JSCompiler_inline_result;
1050 }
1051 props = ReactElement(
1052 element.type,
1053 key,
1054 props,
1055 owner,
1056 element._debugStack,
1057 element._debugTask
1058 );
1059 for (key = 2; key < arguments.length; key++)
1060 validateChildKeys(arguments[key]);
1061 return props;
1062 };
1063 exports.createContext = function (defaultValue) {
1064 defaultValue = {
1065 $$typeof: REACT_CONTEXT_TYPE,
1066 _currentValue: defaultValue,
1067 _currentValue2: defaultValue,
1068 _threadCount: 0,
1069 Provider: null,
1070 Consumer: null
1071 };
1072 defaultValue.Provider = defaultValue;
1073 defaultValue.Consumer = {
1074 $$typeof: REACT_CONSUMER_TYPE,
1075 _context: defaultValue
1076 };
1077 defaultValue._currentRenderer = null;
1078 defaultValue._currentRenderer2 = null;
1079 return defaultValue;
1080 };
1081 exports.createElement = function (type, config, children) {
1082 for (var i = 2; i < arguments.length; i++)
1083 validateChildKeys(arguments[i]);
1084 var propName;
1085 i = {};
1086 var key = null;
1087 if (null != config)
1088 for (propName in (didWarnAboutOldJSXRuntime ||
1089 !("__self" in config) ||
1090 "key" in config ||
1091 ((didWarnAboutOldJSXRuntime = !0),
1092 console.warn(
1093 "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1094 )),
1095 hasValidKey(config) &&
1096 (checkKeyStringCoercion(config.key), (key = "" + config.key)),
1097 config))
1098 hasOwnProperty.call(config, propName) &&
1099 "key" !== propName &&
1100 "__self" !== propName &&
1101 "__source" !== propName &&
1102 (i[propName] = config[propName]);
1103 var childrenLength = arguments.length - 2;
1104 if (1 === childrenLength) i.children = children;
1105 else if (1 < childrenLength) {
1106 for (
1107 var childArray = Array(childrenLength), _i = 0;
1108 _i < childrenLength;
1109 _i++
1110 )
1111 childArray[_i] = arguments[_i + 2];
1112 Object.freeze && Object.freeze(childArray);
1113 i.children = childArray;
1114 }
1115 if (type && type.defaultProps)
1116 for (propName in ((childrenLength = type.defaultProps), childrenLength))
1117 void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1118 key &&
1119 defineKeyPropWarningGetter(
1120 i,
1121 "function" === typeof type
1122 ? type.displayName || type.name || "Unknown"
1123 : type
1124 );
1125 (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
1126 ? ((childArray = Error.stackTraceLimit),
1127 (Error.stackTraceLimit = 10),
1128 (childrenLength = Error("react-stack-top-frame")),
1129 (Error.stackTraceLimit = childArray))
1130 : (childrenLength = unknownOwnerDebugStack);
1131 return ReactElement(
1132 type,
1133 key,
1134 i,
1135 getOwner(),
1136 childrenLength,
1137 propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1138 );
1139 };
1140 exports.createRef = function () {
1141 var refObject = { current: null };
1142 Object.seal(refObject);
1143 return refObject;
1144 };
1145 exports.forwardRef = function (render) {
1146 null != render && render.$$typeof === REACT_MEMO_TYPE
1147 ? console.error(
1148 "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1149 )
1150 : "function" !== typeof render
1151 ? console.error(
1152 "forwardRef requires a render function but was given %s.",
1153 null === render ? "null" : typeof render
1154 )
1155 : 0 !== render.length &&
1156 2 !== render.length &&
1157 console.error(
1158 "forwardRef render functions accept exactly two parameters: props and ref. %s",
1159 1 === render.length
1160 ? "Did you forget to use the ref parameter?"
1161 : "Any additional parameter will be undefined."
1162 );
1163 null != render &&
1164 null != render.defaultProps &&
1165 console.error(
1166 "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1167 );
1168 var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
1169 ownName;
1170 Object.defineProperty(elementType, "displayName", {
1171 enumerable: !1,
1172 configurable: !0,
1173 get: function () {
1174 return ownName;
1175 },
1176 set: function (name) {
1177 ownName = name;
1178 render.name ||
1179 render.displayName ||
1180 (Object.defineProperty(render, "name", { value: name }),
1181 (render.displayName = name));
1182 }
1183 });
1184 return elementType;
1185 };
1186 exports.isValidElement = isValidElement;
1187 exports.lazy = function (ctor) {
1188 ctor = { _status: -1, _result: ctor };
1189 var lazyType = {
1190 $$typeof: REACT_LAZY_TYPE,
1191 _payload: ctor,
1192 _init: lazyInitializer
1193 },
1194 ioInfo = {
1195 name: "lazy",
1196 start: -1,
1197 end: -1,
1198 value: null,
1199 owner: null,
1200 debugStack: Error("react-stack-top-frame"),
1201 debugTask: console.createTask ? console.createTask("lazy()") : null
1202 };
1203 ctor._ioInfo = ioInfo;
1204 lazyType._debugInfo = [{ awaited: ioInfo }];
1205 return lazyType;
1206 };
1207 exports.memo = function (type, compare) {
1208 null == type &&
1209 console.error(
1210 "memo: The first argument must be a component. Instead received: %s",
1211 null === type ? "null" : typeof type
1212 );
1213 compare = {
1214 $$typeof: REACT_MEMO_TYPE,
1215 type: type,
1216 compare: void 0 === compare ? null : compare
1217 };
1218 var ownName;
1219 Object.defineProperty(compare, "displayName", {
1220 enumerable: !1,
1221 configurable: !0,
1222 get: function () {
1223 return ownName;
1224 },
1225 set: function (name) {
1226 ownName = name;
1227 type.name ||
1228 type.displayName ||
1229 (Object.defineProperty(type, "name", { value: name }),
1230 (type.displayName = name));
1231 }
1232 });
1233 return compare;
1234 };
1235 exports.startTransition = startTransition;
1236 exports.unstable_useCacheRefresh = function () {
1237 return resolveDispatcher().useCacheRefresh();
1238 };
1239 exports.use = function (usable) {
1240 return resolveDispatcher().use(usable);
1241 };
1242 exports.useActionState = function (action, initialState, permalink) {
1243 return resolveDispatcher().useActionState(
1244 action,
1245 initialState,
1246 permalink
1247 );
1248 };
1249 exports.useCallback = function (callback, deps) {
1250 return resolveDispatcher().useCallback(callback, deps);
1251 };
1252 exports.useContext = function (Context) {
1253 var dispatcher = resolveDispatcher();
1254 Context.$$typeof === REACT_CONSUMER_TYPE &&
1255 console.error(
1256 "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1257 );
1258 return dispatcher.useContext(Context);
1259 };
1260 exports.useDebugValue = function (value, formatterFn) {
1261 return resolveDispatcher().useDebugValue(value, formatterFn);
1262 };
1263 exports.useDeferredValue = function (value, initialValue) {
1264 return resolveDispatcher().useDeferredValue(value, initialValue);
1265 };
1266 exports.useEffect = function (create, deps) {
1267 null == create &&
1268 console.warn(
1269 "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1270 );
1271 return resolveDispatcher().useEffect(create, deps);
1272 };
1273 exports.useEffectEvent = function (callback) {
1274 return resolveDispatcher().useEffectEvent(callback);
1275 };
1276 exports.useId = function () {
1277 return resolveDispatcher().useId();
1278 };
1279 exports.useImperativeHandle = function (ref, create, deps) {
1280 return resolveDispatcher().useImperativeHandle(ref, create, deps);
1281 };
1282 exports.useInsertionEffect = function (create, deps) {
1283 null == create &&
1284 console.warn(
1285 "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1286 );
1287 return resolveDispatcher().useInsertionEffect(create, deps);
1288 };
1289 exports.useLayoutEffect = function (create, deps) {
1290 null == create &&
1291 console.warn(
1292 "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1293 );
1294 return resolveDispatcher().useLayoutEffect(create, deps);
1295 };
1296 exports.useMemo = function (create, deps) {
1297 return resolveDispatcher().useMemo(create, deps);
1298 };
1299 exports.useOptimistic = function (passthrough, reducer) {
1300 return resolveDispatcher().useOptimistic(passthrough, reducer);
1301 };
1302 exports.useReducer = function (reducer, initialArg, init) {
1303 return resolveDispatcher().useReducer(reducer, initialArg, init);
1304 };
1305 exports.useRef = function (initialValue) {
1306 return resolveDispatcher().useRef(initialValue);
1307 };
1308 exports.useState = function (initialState) {
1309 return resolveDispatcher().useState(initialState);
1310 };
1311 exports.useSyncExternalStore = function (
1312 subscribe,
1313 getSnapshot,
1314 getServerSnapshot
1315 ) {
1316 return resolveDispatcher().useSyncExternalStore(
1317 subscribe,
1318 getSnapshot,
1319 getServerSnapshot
1320 );
1321 };
1322 exports.useTransition = function () {
1323 return resolveDispatcher().useTransition();
1324 };
1325 exports.version = "19.3.0";
1326 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1327 "function" ===
1328 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
1329 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1330 })();