react-nodejs 19.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,878 @@
1
+ /**
2
+ * @license React
3
+ * react.react-server.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 noop() {}
15
+ function getIteratorFn(maybeIterable) {
16
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
17
+ return null;
18
+ maybeIterable =
19
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
20
+ maybeIterable["@@iterator"];
21
+ return "function" === typeof maybeIterable ? maybeIterable : null;
22
+ }
23
+ function testStringCoercion(value) {
24
+ return "" + value;
25
+ }
26
+ function checkKeyStringCoercion(value) {
27
+ try {
28
+ testStringCoercion(value);
29
+ var JSCompiler_inline_result = !1;
30
+ } catch (e) {
31
+ JSCompiler_inline_result = !0;
32
+ }
33
+ if (JSCompiler_inline_result) {
34
+ JSCompiler_inline_result = console;
35
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
36
+ var JSCompiler_inline_result$jscomp$0 =
37
+ ("function" === typeof Symbol &&
38
+ Symbol.toStringTag &&
39
+ value[Symbol.toStringTag]) ||
40
+ value.constructor.name ||
41
+ "Object";
42
+ JSCompiler_temp_const.call(
43
+ JSCompiler_inline_result,
44
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
45
+ JSCompiler_inline_result$jscomp$0
46
+ );
47
+ return testStringCoercion(value);
48
+ }
49
+ }
50
+ function getComponentNameFromType(type) {
51
+ if (null == type) return null;
52
+ if ("function" === typeof type)
53
+ return type.$$typeof === REACT_CLIENT_REFERENCE
54
+ ? null
55
+ : type.displayName || type.name || null;
56
+ if ("string" === typeof type) return type;
57
+ switch (type) {
58
+ case REACT_FRAGMENT_TYPE:
59
+ return "Fragment";
60
+ case REACT_PROFILER_TYPE:
61
+ return "Profiler";
62
+ case REACT_STRICT_MODE_TYPE:
63
+ return "StrictMode";
64
+ case REACT_SUSPENSE_TYPE:
65
+ return "Suspense";
66
+ case REACT_SUSPENSE_LIST_TYPE:
67
+ return "SuspenseList";
68
+ case REACT_ACTIVITY_TYPE:
69
+ return "Activity";
70
+ case REACT_VIEW_TRANSITION_TYPE:
71
+ return "ViewTransition";
72
+ }
73
+ if ("object" === typeof type)
74
+ switch (
75
+ ("number" === typeof type.tag &&
76
+ console.error(
77
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
78
+ ),
79
+ type.$$typeof)
80
+ ) {
81
+ case REACT_PORTAL_TYPE:
82
+ return "Portal";
83
+ case REACT_CONTEXT_TYPE:
84
+ return type.displayName || "Context";
85
+ case REACT_CONSUMER_TYPE:
86
+ return (type._context.displayName || "Context") + ".Consumer";
87
+ case REACT_FORWARD_REF_TYPE:
88
+ var innerType = type.render;
89
+ type = type.displayName;
90
+ type ||
91
+ ((type = innerType.displayName || innerType.name || ""),
92
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
93
+ return type;
94
+ case REACT_MEMO_TYPE:
95
+ return (
96
+ (innerType = type.displayName || null),
97
+ null !== innerType
98
+ ? innerType
99
+ : getComponentNameFromType(type.type) || "Memo"
100
+ );
101
+ case REACT_LAZY_TYPE:
102
+ innerType = type._payload;
103
+ type = type._init;
104
+ try {
105
+ return getComponentNameFromType(type(innerType));
106
+ } catch (x) {}
107
+ }
108
+ return null;
109
+ }
110
+ function getTaskName(type) {
111
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
112
+ if (
113
+ "object" === typeof type &&
114
+ null !== type &&
115
+ type.$$typeof === REACT_LAZY_TYPE
116
+ )
117
+ return "<...>";
118
+ try {
119
+ var name = getComponentNameFromType(type);
120
+ return name ? "<" + name + ">" : "<...>";
121
+ } catch (x) {
122
+ return "<...>";
123
+ }
124
+ }
125
+ function getOwner() {
126
+ var dispatcher = ReactSharedInternals.A;
127
+ return null === dispatcher ? null : dispatcher.getOwner();
128
+ }
129
+ function UnknownOwner() {
130
+ return Error("react-stack-top-frame");
131
+ }
132
+ function hasValidKey(config) {
133
+ if (hasOwnProperty.call(config, "key")) {
134
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
135
+ if (getter && getter.isReactWarning) return !1;
136
+ }
137
+ return void 0 !== config.key;
138
+ }
139
+ function defineKeyPropWarningGetter(props, displayName) {
140
+ function warnAboutAccessingKey() {
141
+ specialPropKeyWarningShown ||
142
+ ((specialPropKeyWarningShown = !0),
143
+ console.error(
144
+ "%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)",
145
+ displayName
146
+ ));
147
+ }
148
+ warnAboutAccessingKey.isReactWarning = !0;
149
+ Object.defineProperty(props, "key", {
150
+ get: warnAboutAccessingKey,
151
+ configurable: !0
152
+ });
153
+ }
154
+ function elementRefGetterWithDeprecationWarning() {
155
+ var componentName = getComponentNameFromType(this.type);
156
+ didWarnAboutElementRef[componentName] ||
157
+ ((didWarnAboutElementRef[componentName] = !0),
158
+ console.error(
159
+ "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."
160
+ ));
161
+ componentName = this.props.ref;
162
+ return void 0 !== componentName ? componentName : null;
163
+ }
164
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
165
+ var refProp = props.ref;
166
+ type = {
167
+ $$typeof: REACT_ELEMENT_TYPE,
168
+ type: type,
169
+ key: key,
170
+ props: props,
171
+ _owner: owner
172
+ };
173
+ null !== (void 0 !== refProp ? refProp : null)
174
+ ? Object.defineProperty(type, "ref", {
175
+ enumerable: !1,
176
+ get: elementRefGetterWithDeprecationWarning
177
+ })
178
+ : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
179
+ type._store = {};
180
+ Object.defineProperty(type._store, "validated", {
181
+ configurable: !1,
182
+ enumerable: !1,
183
+ writable: !0,
184
+ value: 0
185
+ });
186
+ Object.defineProperty(type, "_debugInfo", {
187
+ configurable: !1,
188
+ enumerable: !1,
189
+ writable: !0,
190
+ value: null
191
+ });
192
+ Object.defineProperty(type, "_debugStack", {
193
+ configurable: !1,
194
+ enumerable: !1,
195
+ writable: !0,
196
+ value: debugStack
197
+ });
198
+ Object.defineProperty(type, "_debugTask", {
199
+ configurable: !1,
200
+ enumerable: !1,
201
+ writable: !0,
202
+ value: debugTask
203
+ });
204
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
205
+ return type;
206
+ }
207
+ function cloneAndReplaceKey(oldElement, newKey) {
208
+ newKey = ReactElement(
209
+ oldElement.type,
210
+ newKey,
211
+ oldElement.props,
212
+ oldElement._owner,
213
+ oldElement._debugStack,
214
+ oldElement._debugTask
215
+ );
216
+ oldElement._store &&
217
+ (newKey._store.validated = oldElement._store.validated);
218
+ return newKey;
219
+ }
220
+ function validateChildKeys(node) {
221
+ isValidElement(node)
222
+ ? node._store && (node._store.validated = 1)
223
+ : "object" === typeof node &&
224
+ null !== node &&
225
+ node.$$typeof === REACT_LAZY_TYPE &&
226
+ ("fulfilled" === node._payload.status
227
+ ? isValidElement(node._payload.value) &&
228
+ node._payload.value._store &&
229
+ (node._payload.value._store.validated = 1)
230
+ : node._store && (node._store.validated = 1));
231
+ }
232
+ function isValidElement(object) {
233
+ return (
234
+ "object" === typeof object &&
235
+ null !== object &&
236
+ object.$$typeof === REACT_ELEMENT_TYPE
237
+ );
238
+ }
239
+ function escape(key) {
240
+ var escaperLookup = { "=": "=0", ":": "=2" };
241
+ return (
242
+ "$" +
243
+ key.replace(/[=:]/g, function (match) {
244
+ return escaperLookup[match];
245
+ })
246
+ );
247
+ }
248
+ function getElementKey(element, index) {
249
+ return "object" === typeof element &&
250
+ null !== element &&
251
+ null != element.key
252
+ ? (checkKeyStringCoercion(element.key), escape("" + element.key))
253
+ : index.toString(36);
254
+ }
255
+ function resolveThenable(thenable) {
256
+ switch (thenable.status) {
257
+ case "fulfilled":
258
+ return thenable.value;
259
+ case "rejected":
260
+ throw thenable.reason;
261
+ default:
262
+ switch (
263
+ ("string" === typeof thenable.status
264
+ ? thenable.then(noop, noop)
265
+ : ((thenable.status = "pending"),
266
+ thenable.then(
267
+ function (fulfilledValue) {
268
+ "pending" === thenable.status &&
269
+ ((thenable.status = "fulfilled"),
270
+ (thenable.value = fulfilledValue));
271
+ },
272
+ function (error) {
273
+ "pending" === thenable.status &&
274
+ ((thenable.status = "rejected"),
275
+ (thenable.reason = error));
276
+ }
277
+ )),
278
+ thenable.status)
279
+ ) {
280
+ case "fulfilled":
281
+ return thenable.value;
282
+ case "rejected":
283
+ throw thenable.reason;
284
+ }
285
+ }
286
+ throw thenable;
287
+ }
288
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
289
+ var type = typeof children;
290
+ if ("undefined" === type || "boolean" === type) children = null;
291
+ var invokeCallback = !1;
292
+ if (null === children) invokeCallback = !0;
293
+ else
294
+ switch (type) {
295
+ case "bigint":
296
+ case "string":
297
+ case "number":
298
+ invokeCallback = !0;
299
+ break;
300
+ case "object":
301
+ switch (children.$$typeof) {
302
+ case REACT_ELEMENT_TYPE:
303
+ case REACT_PORTAL_TYPE:
304
+ invokeCallback = !0;
305
+ break;
306
+ case REACT_LAZY_TYPE:
307
+ return (
308
+ (invokeCallback = children._init),
309
+ mapIntoArray(
310
+ invokeCallback(children._payload),
311
+ array,
312
+ escapedPrefix,
313
+ nameSoFar,
314
+ callback
315
+ )
316
+ );
317
+ }
318
+ }
319
+ if (invokeCallback) {
320
+ invokeCallback = children;
321
+ callback = callback(invokeCallback);
322
+ var childKey =
323
+ "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
324
+ isArrayImpl(callback)
325
+ ? ((escapedPrefix = ""),
326
+ null != childKey &&
327
+ (escapedPrefix =
328
+ childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
329
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
330
+ return c;
331
+ }))
332
+ : null != callback &&
333
+ (isValidElement(callback) &&
334
+ (null != callback.key &&
335
+ ((invokeCallback && invokeCallback.key === callback.key) ||
336
+ checkKeyStringCoercion(callback.key)),
337
+ (escapedPrefix = cloneAndReplaceKey(
338
+ callback,
339
+ escapedPrefix +
340
+ (null == callback.key ||
341
+ (invokeCallback && invokeCallback.key === callback.key)
342
+ ? ""
343
+ : ("" + callback.key).replace(
344
+ userProvidedKeyEscapeRegex,
345
+ "$&/"
346
+ ) + "/") +
347
+ childKey
348
+ )),
349
+ "" !== nameSoFar &&
350
+ null != invokeCallback &&
351
+ isValidElement(invokeCallback) &&
352
+ null == invokeCallback.key &&
353
+ invokeCallback._store &&
354
+ !invokeCallback._store.validated &&
355
+ (escapedPrefix._store.validated = 2),
356
+ (callback = escapedPrefix)),
357
+ array.push(callback));
358
+ return 1;
359
+ }
360
+ invokeCallback = 0;
361
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
362
+ if (isArrayImpl(children))
363
+ for (var i = 0; i < children.length; i++)
364
+ (nameSoFar = children[i]),
365
+ (type = childKey + getElementKey(nameSoFar, i)),
366
+ (invokeCallback += mapIntoArray(
367
+ nameSoFar,
368
+ array,
369
+ escapedPrefix,
370
+ type,
371
+ callback
372
+ ));
373
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
374
+ for (
375
+ i === children.entries &&
376
+ (didWarnAboutMaps ||
377
+ console.warn(
378
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
379
+ ),
380
+ (didWarnAboutMaps = !0)),
381
+ children = i.call(children),
382
+ i = 0;
383
+ !(nameSoFar = children.next()).done;
384
+
385
+ )
386
+ (nameSoFar = nameSoFar.value),
387
+ (type = childKey + getElementKey(nameSoFar, i++)),
388
+ (invokeCallback += mapIntoArray(
389
+ nameSoFar,
390
+ array,
391
+ escapedPrefix,
392
+ type,
393
+ callback
394
+ ));
395
+ else if ("object" === type) {
396
+ if ("function" === typeof children.then)
397
+ return mapIntoArray(
398
+ resolveThenable(children),
399
+ array,
400
+ escapedPrefix,
401
+ nameSoFar,
402
+ callback
403
+ );
404
+ array = String(children);
405
+ throw Error(
406
+ "Objects are not valid as a React child (found: " +
407
+ ("[object Object]" === array
408
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
409
+ : array) +
410
+ "). If you meant to render a collection of children, use an array instead."
411
+ );
412
+ }
413
+ return invokeCallback;
414
+ }
415
+ function mapChildren(children, func, context) {
416
+ if (null == children) return children;
417
+ var result = [],
418
+ count = 0;
419
+ mapIntoArray(children, result, "", "", function (child) {
420
+ return func.call(context, child, count++);
421
+ });
422
+ return result;
423
+ }
424
+ function resolveDispatcher() {
425
+ var dispatcher = ReactSharedInternals.H;
426
+ null === dispatcher &&
427
+ console.error(
428
+ "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."
429
+ );
430
+ return dispatcher;
431
+ }
432
+ function lazyInitializer(payload) {
433
+ if (-1 === payload._status) {
434
+ var resolveDebugValue = null,
435
+ rejectDebugValue = null,
436
+ ioInfo = payload._ioInfo;
437
+ null != ioInfo &&
438
+ ((ioInfo.start = ioInfo.end = performance.now()),
439
+ (ioInfo.value = new Promise(function (resolve, reject) {
440
+ resolveDebugValue = resolve;
441
+ rejectDebugValue = reject;
442
+ })));
443
+ ioInfo = payload._result;
444
+ var thenable = ioInfo();
445
+ thenable.then(
446
+ function (moduleObject) {
447
+ if (0 === payload._status || -1 === payload._status) {
448
+ payload._status = 1;
449
+ payload._result = moduleObject;
450
+ var _ioInfo = payload._ioInfo;
451
+ if (null != _ioInfo) {
452
+ _ioInfo.end = performance.now();
453
+ var debugValue =
454
+ null == moduleObject ? void 0 : moduleObject.default;
455
+ resolveDebugValue(debugValue);
456
+ _ioInfo.value.status = "fulfilled";
457
+ _ioInfo.value.value = debugValue;
458
+ }
459
+ void 0 === thenable.status &&
460
+ ((thenable.status = "fulfilled"),
461
+ (thenable.value = moduleObject));
462
+ }
463
+ },
464
+ function (error) {
465
+ if (0 === payload._status || -1 === payload._status) {
466
+ payload._status = 2;
467
+ payload._result = error;
468
+ var _ioInfo2 = payload._ioInfo;
469
+ null != _ioInfo2 &&
470
+ ((_ioInfo2.end = performance.now()),
471
+ _ioInfo2.value.then(noop, noop),
472
+ rejectDebugValue(error),
473
+ (_ioInfo2.value.status = "rejected"),
474
+ (_ioInfo2.value.reason = error));
475
+ void 0 === thenable.status &&
476
+ ((thenable.status = "rejected"), (thenable.reason = error));
477
+ }
478
+ }
479
+ );
480
+ ioInfo = payload._ioInfo;
481
+ if (null != ioInfo) {
482
+ var displayName = thenable.displayName;
483
+ "string" === typeof displayName && (ioInfo.name = displayName);
484
+ }
485
+ -1 === payload._status &&
486
+ ((payload._status = 0), (payload._result = thenable));
487
+ }
488
+ if (1 === payload._status)
489
+ return (
490
+ (ioInfo = payload._result),
491
+ void 0 === ioInfo &&
492
+ console.error(
493
+ "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?",
494
+ ioInfo
495
+ ),
496
+ "default" in ioInfo ||
497
+ console.error(
498
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
499
+ ioInfo
500
+ ),
501
+ ioInfo.default
502
+ );
503
+ throw payload._result;
504
+ }
505
+ function createCacheRoot() {
506
+ return new WeakMap();
507
+ }
508
+ function createCacheNode() {
509
+ return { s: 0, v: void 0, o: null, p: null };
510
+ }
511
+ var ReactSharedInternals = {
512
+ H: null,
513
+ A: null,
514
+ getCurrentStack: null,
515
+ recentlyCreatedOwnerStacks: 0
516
+ },
517
+ isArrayImpl = Array.isArray,
518
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
519
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
520
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
521
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
522
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
523
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
524
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
525
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
526
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
527
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
528
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
529
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
530
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
531
+ REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
532
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
533
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
534
+ hasOwnProperty = Object.prototype.hasOwnProperty,
535
+ assign = Object.assign,
536
+ createTask = console.createTask
537
+ ? console.createTask
538
+ : function () {
539
+ return null;
540
+ },
541
+ createFakeCallStack = {
542
+ react_stack_bottom_frame: function (callStackForError) {
543
+ return callStackForError();
544
+ }
545
+ },
546
+ specialPropKeyWarningShown,
547
+ didWarnAboutOldJSXRuntime;
548
+ var didWarnAboutElementRef = {};
549
+ var unknownOwnerDebugStack =
550
+ createFakeCallStack.react_stack_bottom_frame.bind(
551
+ createFakeCallStack,
552
+ UnknownOwner
553
+ )();
554
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
555
+ var didWarnAboutMaps = !1,
556
+ userProvidedKeyEscapeRegex = /\/+/g;
557
+ createFakeCallStack = {
558
+ map: mapChildren,
559
+ forEach: function (children, forEachFunc, forEachContext) {
560
+ mapChildren(
561
+ children,
562
+ function () {
563
+ forEachFunc.apply(this, arguments);
564
+ },
565
+ forEachContext
566
+ );
567
+ },
568
+ count: function (children) {
569
+ var n = 0;
570
+ mapChildren(children, function () {
571
+ n++;
572
+ });
573
+ return n;
574
+ },
575
+ toArray: function (children) {
576
+ return (
577
+ mapChildren(children, function (child) {
578
+ return child;
579
+ }) || []
580
+ );
581
+ },
582
+ only: function (children) {
583
+ if (!isValidElement(children))
584
+ throw Error(
585
+ "React.Children.only expected to receive a single React element child."
586
+ );
587
+ return children;
588
+ }
589
+ };
590
+ exports.Activity = REACT_ACTIVITY_TYPE;
591
+ exports.Children = createFakeCallStack;
592
+ exports.Fragment = REACT_FRAGMENT_TYPE;
593
+ exports.Profiler = REACT_PROFILER_TYPE;
594
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
595
+ exports.Suspense = REACT_SUSPENSE_TYPE;
596
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
597
+ exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
598
+ ReactSharedInternals;
599
+ exports.cache = function (fn) {
600
+ return function () {
601
+ var dispatcher = ReactSharedInternals.A;
602
+ if (!dispatcher) return fn.apply(null, arguments);
603
+ var fnMap = dispatcher.getCacheForType(createCacheRoot);
604
+ dispatcher = fnMap.get(fn);
605
+ void 0 === dispatcher &&
606
+ ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
607
+ fnMap = 0;
608
+ for (var l = arguments.length; fnMap < l; fnMap++) {
609
+ var arg = arguments[fnMap];
610
+ if (
611
+ "function" === typeof arg ||
612
+ ("object" === typeof arg && null !== arg)
613
+ ) {
614
+ var objectCache = dispatcher.o;
615
+ null === objectCache &&
616
+ (dispatcher.o = objectCache = new WeakMap());
617
+ dispatcher = objectCache.get(arg);
618
+ void 0 === dispatcher &&
619
+ ((dispatcher = createCacheNode()),
620
+ objectCache.set(arg, dispatcher));
621
+ } else
622
+ (objectCache = dispatcher.p),
623
+ null === objectCache && (dispatcher.p = objectCache = new Map()),
624
+ (dispatcher = objectCache.get(arg)),
625
+ void 0 === dispatcher &&
626
+ ((dispatcher = createCacheNode()),
627
+ objectCache.set(arg, dispatcher));
628
+ }
629
+ if (1 === dispatcher.s) return dispatcher.v;
630
+ if (2 === dispatcher.s) throw dispatcher.v;
631
+ try {
632
+ var result = fn.apply(null, arguments);
633
+ fnMap = dispatcher;
634
+ fnMap.s = 1;
635
+ return (fnMap.v = result);
636
+ } catch (error) {
637
+ throw (
638
+ ((result = dispatcher), (result.s = 2), (result.v = error), error)
639
+ );
640
+ }
641
+ };
642
+ };
643
+ exports.cacheSignal = function () {
644
+ var dispatcher = ReactSharedInternals.A;
645
+ return dispatcher ? dispatcher.cacheSignal() : null;
646
+ };
647
+ exports.captureOwnerStack = function () {
648
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
649
+ return null === getCurrentStack ? null : getCurrentStack();
650
+ };
651
+ exports.cloneElement = function (element, config, children) {
652
+ if (null === element || void 0 === element)
653
+ throw Error(
654
+ "The argument must be a React element, but you passed " +
655
+ element +
656
+ "."
657
+ );
658
+ var props = assign({}, element.props),
659
+ key = element.key,
660
+ owner = element._owner;
661
+ if (null != config) {
662
+ var JSCompiler_inline_result;
663
+ a: {
664
+ if (
665
+ hasOwnProperty.call(config, "ref") &&
666
+ (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
667
+ config,
668
+ "ref"
669
+ ).get) &&
670
+ JSCompiler_inline_result.isReactWarning
671
+ ) {
672
+ JSCompiler_inline_result = !1;
673
+ break a;
674
+ }
675
+ JSCompiler_inline_result = void 0 !== config.ref;
676
+ }
677
+ JSCompiler_inline_result && (owner = getOwner());
678
+ hasValidKey(config) &&
679
+ (checkKeyStringCoercion(config.key), (key = "" + config.key));
680
+ for (propName in config)
681
+ !hasOwnProperty.call(config, propName) ||
682
+ "key" === propName ||
683
+ "__self" === propName ||
684
+ "__source" === propName ||
685
+ ("ref" === propName && void 0 === config.ref) ||
686
+ (props[propName] = config[propName]);
687
+ }
688
+ var propName = arguments.length - 2;
689
+ if (1 === propName) props.children = children;
690
+ else if (1 < propName) {
691
+ JSCompiler_inline_result = Array(propName);
692
+ for (var i = 0; i < propName; i++)
693
+ JSCompiler_inline_result[i] = arguments[i + 2];
694
+ props.children = JSCompiler_inline_result;
695
+ }
696
+ props = ReactElement(
697
+ element.type,
698
+ key,
699
+ props,
700
+ owner,
701
+ element._debugStack,
702
+ element._debugTask
703
+ );
704
+ for (key = 2; key < arguments.length; key++)
705
+ validateChildKeys(arguments[key]);
706
+ return props;
707
+ };
708
+ exports.createElement = function (type, config, children) {
709
+ for (var i = 2; i < arguments.length; i++)
710
+ validateChildKeys(arguments[i]);
711
+ var propName;
712
+ i = {};
713
+ var key = null;
714
+ if (null != config)
715
+ for (propName in (didWarnAboutOldJSXRuntime ||
716
+ !("__self" in config) ||
717
+ "key" in config ||
718
+ ((didWarnAboutOldJSXRuntime = !0),
719
+ console.warn(
720
+ "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"
721
+ )),
722
+ hasValidKey(config) &&
723
+ (checkKeyStringCoercion(config.key), (key = "" + config.key)),
724
+ config))
725
+ hasOwnProperty.call(config, propName) &&
726
+ "key" !== propName &&
727
+ "__self" !== propName &&
728
+ "__source" !== propName &&
729
+ (i[propName] = config[propName]);
730
+ var childrenLength = arguments.length - 2;
731
+ if (1 === childrenLength) i.children = children;
732
+ else if (1 < childrenLength) {
733
+ for (
734
+ var childArray = Array(childrenLength), _i = 0;
735
+ _i < childrenLength;
736
+ _i++
737
+ )
738
+ childArray[_i] = arguments[_i + 2];
739
+ Object.freeze && Object.freeze(childArray);
740
+ i.children = childArray;
741
+ }
742
+ if (type && type.defaultProps)
743
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
744
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
745
+ key &&
746
+ defineKeyPropWarningGetter(
747
+ i,
748
+ "function" === typeof type
749
+ ? type.displayName || type.name || "Unknown"
750
+ : type
751
+ );
752
+ (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
753
+ ? ((childArray = Error.stackTraceLimit),
754
+ (Error.stackTraceLimit = 10),
755
+ (childrenLength = Error("react-stack-top-frame")),
756
+ (Error.stackTraceLimit = childArray))
757
+ : (childrenLength = unknownOwnerDebugStack);
758
+ return ReactElement(
759
+ type,
760
+ key,
761
+ i,
762
+ getOwner(),
763
+ childrenLength,
764
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
765
+ );
766
+ };
767
+ exports.createRef = function () {
768
+ var refObject = { current: null };
769
+ Object.seal(refObject);
770
+ return refObject;
771
+ };
772
+ exports.forwardRef = function (render) {
773
+ null != render && render.$$typeof === REACT_MEMO_TYPE
774
+ ? console.error(
775
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
776
+ )
777
+ : "function" !== typeof render
778
+ ? console.error(
779
+ "forwardRef requires a render function but was given %s.",
780
+ null === render ? "null" : typeof render
781
+ )
782
+ : 0 !== render.length &&
783
+ 2 !== render.length &&
784
+ console.error(
785
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
786
+ 1 === render.length
787
+ ? "Did you forget to use the ref parameter?"
788
+ : "Any additional parameter will be undefined."
789
+ );
790
+ null != render &&
791
+ null != render.defaultProps &&
792
+ console.error(
793
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
794
+ );
795
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
796
+ ownName;
797
+ Object.defineProperty(elementType, "displayName", {
798
+ enumerable: !1,
799
+ configurable: !0,
800
+ get: function () {
801
+ return ownName;
802
+ },
803
+ set: function (name) {
804
+ ownName = name;
805
+ render.name ||
806
+ render.displayName ||
807
+ (Object.defineProperty(render, "name", { value: name }),
808
+ (render.displayName = name));
809
+ }
810
+ });
811
+ return elementType;
812
+ };
813
+ exports.isValidElement = isValidElement;
814
+ exports.lazy = function (ctor) {
815
+ ctor = { _status: -1, _result: ctor };
816
+ var lazyType = {
817
+ $$typeof: REACT_LAZY_TYPE,
818
+ _payload: ctor,
819
+ _init: lazyInitializer
820
+ },
821
+ ioInfo = {
822
+ name: "lazy",
823
+ start: -1,
824
+ end: -1,
825
+ value: null,
826
+ owner: null,
827
+ debugStack: Error("react-stack-top-frame"),
828
+ debugTask: console.createTask ? console.createTask("lazy()") : null
829
+ };
830
+ ctor._ioInfo = ioInfo;
831
+ lazyType._debugInfo = [{ awaited: ioInfo }];
832
+ return lazyType;
833
+ };
834
+ exports.memo = function (type, compare) {
835
+ null == type &&
836
+ console.error(
837
+ "memo: The first argument must be a component. Instead received: %s",
838
+ null === type ? "null" : typeof type
839
+ );
840
+ compare = {
841
+ $$typeof: REACT_MEMO_TYPE,
842
+ type: type,
843
+ compare: void 0 === compare ? null : compare
844
+ };
845
+ var ownName;
846
+ Object.defineProperty(compare, "displayName", {
847
+ enumerable: !1,
848
+ configurable: !0,
849
+ get: function () {
850
+ return ownName;
851
+ },
852
+ set: function (name) {
853
+ ownName = name;
854
+ type.name ||
855
+ type.displayName ||
856
+ (Object.defineProperty(type, "name", { value: name }),
857
+ (type.displayName = name));
858
+ }
859
+ });
860
+ return compare;
861
+ };
862
+ exports.use = function (usable) {
863
+ return resolveDispatcher().use(usable);
864
+ };
865
+ exports.useCallback = function (callback, deps) {
866
+ return resolveDispatcher().useCallback(callback, deps);
867
+ };
868
+ exports.useDebugValue = function (value, formatterFn) {
869
+ return resolveDispatcher().useDebugValue(value, formatterFn);
870
+ };
871
+ exports.useId = function () {
872
+ return resolveDispatcher().useId();
873
+ };
874
+ exports.useMemo = function (create, deps) {
875
+ return resolveDispatcher().useMemo(create, deps);
876
+ };
877
+ exports.version = "19.3.0";
878
+ })();