jbx 2.3.0 → 2.5.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.
package/dist/index.cjs ADDED
@@ -0,0 +1,3001 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ function getDefaultExportFromCjs (x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
+ }
6
+
7
+ var react = {exports: {}};
8
+
9
+ var react_production_min = {};
10
+
11
+ /**
12
+ * @license React
13
+ * react.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */ var _typeof$1 = function(obj) {
20
+ "@swc/helpers - typeof";
21
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
22
+ };
23
+ var hasRequiredReact_production_min;
24
+ function requireReact_production_min() {
25
+ var A = function A(a) {
26
+ if (null === a || "object" !== typeof a) return null;
27
+ a = z && a[z] || a["@@iterator"];
28
+ return "function" === typeof a ? a : null;
29
+ };
30
+ var E = function E(a, b, e) {
31
+ this.props = a;
32
+ this.context = b;
33
+ this.refs = D;
34
+ this.updater = e || B;
35
+ };
36
+ var F = function F() {};
37
+ var G = function G(a, b, e) {
38
+ this.props = a;
39
+ this.context = b;
40
+ this.refs = D;
41
+ this.updater = e || B;
42
+ };
43
+ var M = function M(a, b, e) {
44
+ var d, c = {}, k = null, h = null;
45
+ if (null != b) for(d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = "" + b.key), b)J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
46
+ var g = arguments.length - 2;
47
+ if (1 === g) c.children = e;
48
+ else if (1 < g) {
49
+ for(var f = Array(g), m = 0; m < g; m++)f[m] = arguments[m + 2];
50
+ c.children = f;
51
+ }
52
+ if (a && a.defaultProps) for(d in g = a.defaultProps, g)void 0 === c[d] && (c[d] = g[d]);
53
+ return {
54
+ $$typeof: l,
55
+ type: a,
56
+ key: k,
57
+ ref: h,
58
+ props: c,
59
+ _owner: K.current
60
+ };
61
+ };
62
+ var N = function N(a, b) {
63
+ return {
64
+ $$typeof: l,
65
+ type: a.type,
66
+ key: b,
67
+ ref: a.ref,
68
+ props: a.props,
69
+ _owner: a._owner
70
+ };
71
+ };
72
+ var O = function O(a) {
73
+ return "object" === typeof a && null !== a && a.$$typeof === l;
74
+ };
75
+ var escape = function escape(a) {
76
+ var b = {
77
+ "=": "=0",
78
+ ":": "=2"
79
+ };
80
+ return "$" + a.replace(/[=:]/g, function(a) {
81
+ return b[a];
82
+ });
83
+ };
84
+ var Q = function Q(a, b) {
85
+ return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
86
+ };
87
+ var S = function S(a, b, e) {
88
+ if (null == a) return a;
89
+ var d = [], c = 0;
90
+ R(a, d, "", "", function(a) {
91
+ return b.call(e, a, c++);
92
+ });
93
+ return d;
94
+ };
95
+ var T = function T(a) {
96
+ if (-1 === a._status) {
97
+ var b = a._result;
98
+ b = b();
99
+ b.then(function(b) {
100
+ if (0 === a._status || -1 === a._status) a._status = 1, a._result = b;
101
+ }, function(b) {
102
+ if (0 === a._status || -1 === a._status) a._status = 2, a._result = b;
103
+ });
104
+ -1 === a._status && (a._status = 0, a._result = b);
105
+ }
106
+ if (1 === a._status) return a._result.default;
107
+ throw a._result;
108
+ };
109
+ if (hasRequiredReact_production_min) return react_production_min;
110
+ hasRequiredReact_production_min = 1;
111
+ var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
112
+ var B = {
113
+ isMounted: function isMounted() {
114
+ return !1;
115
+ },
116
+ enqueueForceUpdate: function enqueueForceUpdate() {},
117
+ enqueueReplaceState: function enqueueReplaceState() {},
118
+ enqueueSetState: function enqueueSetState() {}
119
+ }, C = Object.assign, D = {};
120
+ E.prototype.isReactComponent = {};
121
+ E.prototype.setState = function(a, b) {
122
+ if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
123
+ this.updater.enqueueSetState(this, a, b, "setState");
124
+ };
125
+ E.prototype.forceUpdate = function(a) {
126
+ this.updater.enqueueForceUpdate(this, a, "forceUpdate");
127
+ };
128
+ F.prototype = E.prototype;
129
+ var H = G.prototype = new F;
130
+ H.constructor = G;
131
+ C(H, E.prototype);
132
+ H.isPureReactComponent = !0;
133
+ var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = {
134
+ current: null
135
+ }, L = {
136
+ key: !0,
137
+ ref: !0,
138
+ __self: !0,
139
+ __source: !0
140
+ };
141
+ var P = /\/+/g;
142
+ function R(a, b, e, d, c) {
143
+ var k = typeof a === "undefined" ? "undefined" : _typeof$1(a);
144
+ if ("undefined" === k || "boolean" === k) a = null;
145
+ var h = !1;
146
+ if (null === a) h = !0;
147
+ else switch(k){
148
+ case "string":
149
+ case "number":
150
+ h = !0;
151
+ break;
152
+ case "object":
153
+ switch(a.$$typeof){
154
+ case l:
155
+ case n:
156
+ h = !0;
157
+ }
158
+ }
159
+ if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a) {
160
+ return a;
161
+ })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
162
+ h = 0;
163
+ d = "" === d ? "." : d + ":";
164
+ if (I(a)) for(var g = 0; g < a.length; g++){
165
+ k = a[g];
166
+ var f = d + Q(k, g);
167
+ h += R(k, b, e, f, c);
168
+ }
169
+ else if (f = A(a), "function" === typeof f) for(a = f.call(a), g = 0; !(k = a.next()).done;)k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);
170
+ else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
171
+ return h;
172
+ }
173
+ var U = {
174
+ current: null
175
+ }, V = {
176
+ transition: null
177
+ }, W = {
178
+ ReactCurrentDispatcher: U,
179
+ ReactCurrentBatchConfig: V,
180
+ ReactCurrentOwner: K
181
+ };
182
+ react_production_min.Children = {
183
+ map: S,
184
+ forEach: function forEach(a, b, e) {
185
+ S(a, function() {
186
+ b.apply(this, arguments);
187
+ }, e);
188
+ },
189
+ count: function count(a) {
190
+ var b = 0;
191
+ S(a, function() {
192
+ b++;
193
+ });
194
+ return b;
195
+ },
196
+ toArray: function toArray(a) {
197
+ return S(a, function(a) {
198
+ return a;
199
+ }) || [];
200
+ },
201
+ only: function only(a) {
202
+ if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
203
+ return a;
204
+ }
205
+ };
206
+ react_production_min.Component = E;
207
+ react_production_min.Fragment = p;
208
+ react_production_min.Profiler = r;
209
+ react_production_min.PureComponent = G;
210
+ react_production_min.StrictMode = q;
211
+ react_production_min.Suspense = w;
212
+ react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
213
+ react_production_min.cloneElement = function(a, b, e) {
214
+ if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
215
+ var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
216
+ if (null != b) {
217
+ void 0 !== b.ref && (k = b.ref, h = K.current);
218
+ void 0 !== b.key && (c = "" + b.key);
219
+ if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
220
+ for(f in b)J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
221
+ }
222
+ var f = arguments.length - 2;
223
+ if (1 === f) d.children = e;
224
+ else if (1 < f) {
225
+ g = Array(f);
226
+ for(var m = 0; m < f; m++)g[m] = arguments[m + 2];
227
+ d.children = g;
228
+ }
229
+ return {
230
+ $$typeof: l,
231
+ type: a.type,
232
+ key: c,
233
+ ref: k,
234
+ props: d,
235
+ _owner: h
236
+ };
237
+ };
238
+ react_production_min.createContext = function(a) {
239
+ a = {
240
+ $$typeof: u,
241
+ _currentValue: a,
242
+ _currentValue2: a,
243
+ _threadCount: 0,
244
+ Provider: null,
245
+ Consumer: null,
246
+ _defaultValue: null,
247
+ _globalName: null
248
+ };
249
+ a.Provider = {
250
+ $$typeof: t,
251
+ _context: a
252
+ };
253
+ return a.Consumer = a;
254
+ };
255
+ react_production_min.createElement = M;
256
+ react_production_min.createFactory = function(a) {
257
+ var b = M.bind(null, a);
258
+ b.type = a;
259
+ return b;
260
+ };
261
+ react_production_min.createRef = function() {
262
+ return {
263
+ current: null
264
+ };
265
+ };
266
+ react_production_min.forwardRef = function(a) {
267
+ return {
268
+ $$typeof: v,
269
+ render: a
270
+ };
271
+ };
272
+ react_production_min.isValidElement = O;
273
+ react_production_min.lazy = function(a) {
274
+ return {
275
+ $$typeof: y,
276
+ _payload: {
277
+ _status: -1,
278
+ _result: a
279
+ },
280
+ _init: T
281
+ };
282
+ };
283
+ react_production_min.memo = function(a, b) {
284
+ return {
285
+ $$typeof: x,
286
+ type: a,
287
+ compare: void 0 === b ? null : b
288
+ };
289
+ };
290
+ react_production_min.startTransition = function(a) {
291
+ var b = V.transition;
292
+ V.transition = {};
293
+ try {
294
+ a();
295
+ } finally{
296
+ V.transition = b;
297
+ }
298
+ };
299
+ react_production_min.unstable_act = function() {
300
+ throw Error("act(...) is not supported in production builds of React.");
301
+ };
302
+ react_production_min.useCallback = function(a, b) {
303
+ return U.current.useCallback(a, b);
304
+ };
305
+ react_production_min.useContext = function(a) {
306
+ return U.current.useContext(a);
307
+ };
308
+ react_production_min.useDebugValue = function() {};
309
+ react_production_min.useDeferredValue = function(a) {
310
+ return U.current.useDeferredValue(a);
311
+ };
312
+ react_production_min.useEffect = function(a, b) {
313
+ return U.current.useEffect(a, b);
314
+ };
315
+ react_production_min.useId = function() {
316
+ return U.current.useId();
317
+ };
318
+ react_production_min.useImperativeHandle = function(a, b, e) {
319
+ return U.current.useImperativeHandle(a, b, e);
320
+ };
321
+ react_production_min.useInsertionEffect = function(a, b) {
322
+ return U.current.useInsertionEffect(a, b);
323
+ };
324
+ react_production_min.useLayoutEffect = function(a, b) {
325
+ return U.current.useLayoutEffect(a, b);
326
+ };
327
+ react_production_min.useMemo = function(a, b) {
328
+ return U.current.useMemo(a, b);
329
+ };
330
+ react_production_min.useReducer = function(a, b, e) {
331
+ return U.current.useReducer(a, b, e);
332
+ };
333
+ react_production_min.useRef = function(a) {
334
+ return U.current.useRef(a);
335
+ };
336
+ react_production_min.useState = function(a) {
337
+ return U.current.useState(a);
338
+ };
339
+ react_production_min.useSyncExternalStore = function(a, b, e) {
340
+ return U.current.useSyncExternalStore(a, b, e);
341
+ };
342
+ react_production_min.useTransition = function() {
343
+ return U.current.useTransition();
344
+ };
345
+ react_production_min.version = "18.2.0";
346
+ return react_production_min;
347
+ }
348
+
349
+ var react_development = {exports: {}};
350
+
351
+ /**
352
+ * @license React
353
+ * react.development.js
354
+ *
355
+ * Copyright (c) Facebook, Inc. and its affiliates.
356
+ *
357
+ * This source code is licensed under the MIT license found in the
358
+ * LICENSE file in the root directory of this source tree.
359
+ */ function _instanceof(left, right) {
360
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
361
+ return !!right[Symbol.hasInstance](left);
362
+ } else {
363
+ return left instanceof right;
364
+ }
365
+ }
366
+ var _typeof = function(obj) {
367
+ "@swc/helpers - typeof";
368
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
369
+ };
370
+ var hasRequiredReact_development;
371
+ function requireReact_development() {
372
+ if (hasRequiredReact_development) return react_development.exports;
373
+ hasRequiredReact_development = 1;
374
+ (function(module, exports) {
375
+ if (process.env.NODE_ENV !== "production") {
376
+ (function() {
377
+ var getIteratorFn = function getIteratorFn(maybeIterable) {
378
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
379
+ return null;
380
+ }
381
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
382
+ if (typeof maybeIterator === "function") {
383
+ return maybeIterator;
384
+ }
385
+ return null;
386
+ };
387
+ var setExtraStackFrame = function setExtraStackFrame(stack) {
388
+ {
389
+ currentExtraStackFrame = stack;
390
+ }
391
+ };
392
+ var warn = // by calls to these methods by a Babel plugin.
393
+ //
394
+ // In PROD (or in packages without access to React internals),
395
+ // they are left as they are instead.
396
+ function warn(format) {
397
+ {
398
+ {
399
+ for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
400
+ args[_key - 1] = arguments[_key];
401
+ }
402
+ printWarning("warn", format, args);
403
+ }
404
+ }
405
+ };
406
+ var error = function error(format) {
407
+ {
408
+ {
409
+ for(var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++){
410
+ args[_key2 - 1] = arguments[_key2];
411
+ }
412
+ printWarning("error", format, args);
413
+ }
414
+ }
415
+ };
416
+ var printWarning = function printWarning(level, format, args) {
417
+ // When changing this logic, you might want to also
418
+ // update consoleWithStackDev.www.js as well.
419
+ {
420
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
421
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
422
+ if (stack !== "") {
423
+ format += "%s";
424
+ args = args.concat([
425
+ stack
426
+ ]);
427
+ } // eslint-disable-next-line react-internal/safe-string-coercion
428
+ var argsWithFormat = args.map(function(item) {
429
+ return String(item);
430
+ }); // Careful: RN currently depends on this prefix
431
+ argsWithFormat.unshift("Warning: " + format); // We intentionally don't use spread (or .apply) directly because it
432
+ // breaks IE9: https://github.com/facebook/react/issues/13610
433
+ // eslint-disable-next-line react-internal/no-production-logging
434
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
435
+ }
436
+ };
437
+ var warnNoop = function warnNoop(publicInstance, callerName) {
438
+ {
439
+ var _constructor = publicInstance.constructor;
440
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
441
+ var warningKey = componentName + "." + callerName;
442
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
443
+ return;
444
+ }
445
+ error("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.", callerName, componentName);
446
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
447
+ }
448
+ };
449
+ var Component = /**
450
+ * Base class helpers for the updating state of a component.
451
+ */ function Component(props, context, updater) {
452
+ this.props = props;
453
+ this.context = context; // If a component has string refs, we will assign a different object later.
454
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
455
+ // renderer.
456
+ this.updater = updater || ReactNoopUpdateQueue;
457
+ };
458
+ var ComponentDummy = function ComponentDummy() {};
459
+ var PureComponent = /**
460
+ * Convenience component with default shallow equality check for sCU.
461
+ */ function PureComponent(props, context, updater) {
462
+ this.props = props;
463
+ this.context = context; // If a component has string refs, we will assign a different object later.
464
+ this.refs = emptyObject;
465
+ this.updater = updater || ReactNoopUpdateQueue;
466
+ };
467
+ var createRef = // an immutable object with a single mutable value
468
+ function createRef() {
469
+ var refObject = {
470
+ current: null
471
+ };
472
+ {
473
+ Object.seal(refObject);
474
+ }
475
+ return refObject;
476
+ };
477
+ var isArray = function isArray(a) {
478
+ return isArrayImpl(a);
479
+ };
480
+ var typeName = /*
481
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
482
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
483
+ *
484
+ * The functions in this module will throw an easier-to-understand,
485
+ * easier-to-debug exception with a clear errors message message explaining the
486
+ * problem. (Instead of a confusing exception thrown inside the implementation
487
+ * of the `value` object).
488
+ */ // $FlowFixMe only called in DEV, so void return is not possible.
489
+ function typeName(value) {
490
+ {
491
+ // toStringTag is needed for namespaced types like Temporal.Instant
492
+ var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
493
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
494
+ return type;
495
+ }
496
+ } // $FlowFixMe only called in DEV, so void return is not possible.
497
+ ;
498
+ var willCoercionThrow = function willCoercionThrow(value) {
499
+ {
500
+ try {
501
+ testStringCoercion(value);
502
+ return false;
503
+ } catch (e) {
504
+ return true;
505
+ }
506
+ }
507
+ };
508
+ var testStringCoercion = function testStringCoercion(value) {
509
+ // If you ended up here by following an exception call stack, here's what's
510
+ // happened: you supplied an object or symbol value to React (as a prop, key,
511
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
512
+ // coerce it to a string using `'' + value`, an exception was thrown.
513
+ //
514
+ // The most common types that will cause this exception are `Symbol` instances
515
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
516
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
517
+ // exception. (Library authors do this to prevent users from using built-in
518
+ // numeric operators like `+` or comparison operators like `>=` because custom
519
+ // methods are needed to perform accurate arithmetic or comparison.)
520
+ //
521
+ // To fix the problem, coerce this object or symbol value to a string before
522
+ // passing it to React. The most reliable way is usually `String(value)`.
523
+ //
524
+ // To find which value is throwing, check the browser or debugger console.
525
+ // Before this exception was thrown, there should be `console.error` output
526
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
527
+ // problem and how that type was used: key, atrribute, input value prop, etc.
528
+ // In most cases, this console output also shows the component and its
529
+ // ancestor components where the exception happened.
530
+ //
531
+ // eslint-disable-next-line react-internal/safe-string-coercion
532
+ return "" + value;
533
+ };
534
+ var checkKeyStringCoercion = function checkKeyStringCoercion(value) {
535
+ {
536
+ if (willCoercionThrow(value)) {
537
+ error("The provided key is an unsupported type %s." + " This value must be coerced to a string before before using it here.", typeName(value));
538
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
539
+ }
540
+ }
541
+ };
542
+ var getWrappedName = function getWrappedName(outerType, innerType, wrapperName) {
543
+ var displayName = outerType.displayName;
544
+ if (displayName) {
545
+ return displayName;
546
+ }
547
+ var functionName = innerType.displayName || innerType.name || "";
548
+ return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
549
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
550
+ ;
551
+ var getContextName = function getContextName(type) {
552
+ return type.displayName || "Context";
553
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
554
+ ;
555
+ var hasValidRef = function hasValidRef(config) {
556
+ {
557
+ if (hasOwnProperty.call(config, "ref")) {
558
+ var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
559
+ if (getter && getter.isReactWarning) {
560
+ return false;
561
+ }
562
+ }
563
+ }
564
+ return config.ref !== undefined;
565
+ };
566
+ var hasValidKey = function hasValidKey(config) {
567
+ {
568
+ if (hasOwnProperty.call(config, "key")) {
569
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
570
+ if (getter && getter.isReactWarning) {
571
+ return false;
572
+ }
573
+ }
574
+ }
575
+ return config.key !== undefined;
576
+ };
577
+ var defineKeyPropWarningGetter = function defineKeyPropWarningGetter(props, displayName) {
578
+ var warnAboutAccessingKey = function warnAboutAccessingKey() {
579
+ {
580
+ if (!specialPropKeyWarningShown) {
581
+ specialPropKeyWarningShown = true;
582
+ error("%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://reactjs.org/link/special-props)", displayName);
583
+ }
584
+ }
585
+ };
586
+ warnAboutAccessingKey.isReactWarning = true;
587
+ Object.defineProperty(props, "key", {
588
+ get: warnAboutAccessingKey,
589
+ configurable: true
590
+ });
591
+ };
592
+ var defineRefPropWarningGetter = function defineRefPropWarningGetter(props, displayName) {
593
+ var warnAboutAccessingRef = function warnAboutAccessingRef() {
594
+ {
595
+ if (!specialPropRefWarningShown) {
596
+ specialPropRefWarningShown = true;
597
+ error("%s: `ref` 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://reactjs.org/link/special-props)", displayName);
598
+ }
599
+ }
600
+ };
601
+ warnAboutAccessingRef.isReactWarning = true;
602
+ Object.defineProperty(props, "ref", {
603
+ get: warnAboutAccessingRef,
604
+ configurable: true
605
+ });
606
+ };
607
+ var warnIfStringRefCannotBeAutoConverted = function warnIfStringRefCannotBeAutoConverted(config) {
608
+ {
609
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
610
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
611
+ if (!didWarnAboutStringRefs[componentName]) {
612
+ error('Component "%s" contains the string ref "%s". ' + "Support for string refs will be removed in a future major release. " + "This case cannot be automatically converted to an arrow function. " + "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://reactjs.org/link/strict-mode-string-ref", componentName, config.ref);
613
+ didWarnAboutStringRefs[componentName] = true;
614
+ }
615
+ }
616
+ }
617
+ };
618
+ var createElement = /**
619
+ * Create and return a new ReactElement of the given type.
620
+ * See https://reactjs.org/docs/react-api.html#createelement
621
+ */ function createElement(type, config, children) {
622
+ var propName; // Reserved names are extracted
623
+ var props = {};
624
+ var key = null;
625
+ var ref = null;
626
+ var self = null;
627
+ var source = null;
628
+ if (config != null) {
629
+ if (hasValidRef(config)) {
630
+ ref = config.ref;
631
+ {
632
+ warnIfStringRefCannotBeAutoConverted(config);
633
+ }
634
+ }
635
+ if (hasValidKey(config)) {
636
+ {
637
+ checkKeyStringCoercion(config.key);
638
+ }
639
+ key = "" + config.key;
640
+ }
641
+ self = config.__self === undefined ? null : config.__self;
642
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
643
+ for(propName in config){
644
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
645
+ props[propName] = config[propName];
646
+ }
647
+ }
648
+ } // Children can be more than one argument, and those are transferred onto
649
+ // the newly allocated props object.
650
+ var childrenLength = arguments.length - 2;
651
+ if (childrenLength === 1) {
652
+ props.children = children;
653
+ } else if (childrenLength > 1) {
654
+ var childArray = Array(childrenLength);
655
+ for(var i = 0; i < childrenLength; i++){
656
+ childArray[i] = arguments[i + 2];
657
+ }
658
+ {
659
+ if (Object.freeze) {
660
+ Object.freeze(childArray);
661
+ }
662
+ }
663
+ props.children = childArray;
664
+ } // Resolve default props
665
+ if (type && type.defaultProps) {
666
+ var defaultProps = type.defaultProps;
667
+ for(propName in defaultProps){
668
+ if (props[propName] === undefined) {
669
+ props[propName] = defaultProps[propName];
670
+ }
671
+ }
672
+ }
673
+ {
674
+ if (key || ref) {
675
+ var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
676
+ if (key) {
677
+ defineKeyPropWarningGetter(props, displayName);
678
+ }
679
+ if (ref) {
680
+ defineRefPropWarningGetter(props, displayName);
681
+ }
682
+ }
683
+ }
684
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
685
+ };
686
+ var cloneAndReplaceKey = function cloneAndReplaceKey(oldElement, newKey) {
687
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
688
+ return newElement;
689
+ };
690
+ var cloneElement = /**
691
+ * Clone and return a new ReactElement using element as the starting point.
692
+ * See https://reactjs.org/docs/react-api.html#cloneelement
693
+ */ function cloneElement(element, config, children) {
694
+ if (element === null || element === undefined) {
695
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
696
+ }
697
+ var propName; // Original props are copied
698
+ var props = assign({}, element.props); // Reserved names are extracted
699
+ var key = element.key;
700
+ var ref = element.ref; // Self is preserved since the owner is preserved.
701
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
702
+ // transpiler, and the original source is probably a better indicator of the
703
+ // true owner.
704
+ var source = element._source; // Owner will be preserved, unless ref is overridden
705
+ var owner = element._owner;
706
+ if (config != null) {
707
+ if (hasValidRef(config)) {
708
+ // Silently steal the ref from the parent.
709
+ ref = config.ref;
710
+ owner = ReactCurrentOwner.current;
711
+ }
712
+ if (hasValidKey(config)) {
713
+ {
714
+ checkKeyStringCoercion(config.key);
715
+ }
716
+ key = "" + config.key;
717
+ } // Remaining properties override existing props
718
+ var defaultProps;
719
+ if (element.type && element.type.defaultProps) {
720
+ defaultProps = element.type.defaultProps;
721
+ }
722
+ for(propName in config){
723
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
724
+ if (config[propName] === undefined && defaultProps !== undefined) {
725
+ // Resolve default props
726
+ props[propName] = defaultProps[propName];
727
+ } else {
728
+ props[propName] = config[propName];
729
+ }
730
+ }
731
+ }
732
+ } // Children can be more than one argument, and those are transferred onto
733
+ // the newly allocated props object.
734
+ var childrenLength = arguments.length - 2;
735
+ if (childrenLength === 1) {
736
+ props.children = children;
737
+ } else if (childrenLength > 1) {
738
+ var childArray = Array(childrenLength);
739
+ for(var i = 0; i < childrenLength; i++){
740
+ childArray[i] = arguments[i + 2];
741
+ }
742
+ props.children = childArray;
743
+ }
744
+ return ReactElement(element.type, key, ref, self, source, owner, props);
745
+ };
746
+ var isValidElement = /**
747
+ * Verifies the object is a ReactElement.
748
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
749
+ * @param {?object} object
750
+ * @return {boolean} True if `object` is a ReactElement.
751
+ * @final
752
+ */ function isValidElement(object) {
753
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
754
+ };
755
+ var escape = /**
756
+ * Escape and wrap key so it is safe to use as a reactid
757
+ *
758
+ * @param {string} key to be escaped.
759
+ * @return {string} the escaped key.
760
+ */ function escape(key) {
761
+ var escapeRegex = /[=:]/g;
762
+ var escaperLookup = {
763
+ "=": "=0",
764
+ ":": "=2"
765
+ };
766
+ var escapedString = key.replace(escapeRegex, function(match) {
767
+ return escaperLookup[match];
768
+ });
769
+ return "$" + escapedString;
770
+ };
771
+ var escapeUserProvidedKey = function escapeUserProvidedKey(text) {
772
+ return text.replace(userProvidedKeyEscapeRegex, "$&/");
773
+ };
774
+ var getElementKey = /**
775
+ * Generate a key string that identifies a element within a set.
776
+ *
777
+ * @param {*} element A element that could contain a manual key.
778
+ * @param {number} index Index that is used if a manual key is not provided.
779
+ * @return {string}
780
+ */ function getElementKey(element, index) {
781
+ // Do some typechecking here since we call this blindly. We want to ensure
782
+ // that we don't block potential future ES APIs.
783
+ if (typeof element === "object" && element !== null && element.key != null) {
784
+ // Explicit key
785
+ {
786
+ checkKeyStringCoercion(element.key);
787
+ }
788
+ return escape("" + element.key);
789
+ } // Implicit key determined by the index in the set
790
+ return index.toString(36);
791
+ };
792
+ var mapChildren = /**
793
+ * Maps children that are typically specified as `props.children`.
794
+ *
795
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
796
+ *
797
+ * The provided mapFunction(child, index) will be called for each
798
+ * leaf child.
799
+ *
800
+ * @param {?*} children Children tree container.
801
+ * @param {function(*, int)} func The map function.
802
+ * @param {*} context Context for mapFunction.
803
+ * @return {object} Object containing the ordered map of results.
804
+ */ function mapChildren(children, func, context) {
805
+ if (children == null) {
806
+ return children;
807
+ }
808
+ var result = [];
809
+ var count = 0;
810
+ mapIntoArray(children, result, "", "", function(child) {
811
+ return func.call(context, child, count++);
812
+ });
813
+ return result;
814
+ };
815
+ var countChildren = /**
816
+ * Count the number of children that are typically specified as
817
+ * `props.children`.
818
+ *
819
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
820
+ *
821
+ * @param {?*} children Children tree container.
822
+ * @return {number} The number of children.
823
+ */ function countChildren(children) {
824
+ var n = 0;
825
+ mapChildren(children, function() {
826
+ n++; // Don't return anything
827
+ });
828
+ return n;
829
+ };
830
+ var forEachChildren = /**
831
+ * Iterates through children that are typically specified as `props.children`.
832
+ *
833
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
834
+ *
835
+ * The provided forEachFunc(child, index) will be called for each
836
+ * leaf child.
837
+ *
838
+ * @param {?*} children Children tree container.
839
+ * @param {function(*, int)} forEachFunc
840
+ * @param {*} forEachContext Context for forEachContext.
841
+ */ function forEachChildren(children, forEachFunc, forEachContext) {
842
+ mapChildren(children, function() {
843
+ forEachFunc.apply(this, arguments); // Don't return anything.
844
+ }, forEachContext);
845
+ };
846
+ var toArray = /**
847
+ * Flatten a children object (typically specified as `props.children`) and
848
+ * return an array with appropriately re-keyed children.
849
+ *
850
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
851
+ */ function toArray(children) {
852
+ return mapChildren(children, function(child) {
853
+ return child;
854
+ }) || [];
855
+ };
856
+ var onlyChild = /**
857
+ * Returns the first child in a collection of children and verifies that there
858
+ * is only one child in the collection.
859
+ *
860
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
861
+ *
862
+ * The current implementation of this function assumes that a single child gets
863
+ * passed without a wrapper, but the purpose of this helper function is to
864
+ * abstract away the particular structure of children.
865
+ *
866
+ * @param {?object} children Child collection structure.
867
+ * @return {ReactElement} The first and only `ReactElement` contained in the
868
+ * structure.
869
+ */ function onlyChild(children) {
870
+ if (!isValidElement(children)) {
871
+ throw new Error("React.Children.only expected to receive a single React element child.");
872
+ }
873
+ return children;
874
+ };
875
+ var createContext = function createContext(defaultValue) {
876
+ // TODO: Second argument used to be an optional `calculateChangedBits`
877
+ // function. Warn to reserve for future use?
878
+ var context = {
879
+ $$typeof: REACT_CONTEXT_TYPE,
880
+ // As a workaround to support multiple concurrent renderers, we categorize
881
+ // some renderers as primary and others as secondary. We only expect
882
+ // there to be two concurrent renderers at most: React Native (primary) and
883
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
884
+ // Secondary renderers store their context values on separate fields.
885
+ _currentValue: defaultValue,
886
+ _currentValue2: defaultValue,
887
+ // Used to track how many concurrent renderers this context currently
888
+ // supports within in a single renderer. Such as parallel server rendering.
889
+ _threadCount: 0,
890
+ // These are circular
891
+ Provider: null,
892
+ Consumer: null,
893
+ // Add these to use same hidden class in VM as ServerContext
894
+ _defaultValue: null,
895
+ _globalName: null
896
+ };
897
+ context.Provider = {
898
+ $$typeof: REACT_PROVIDER_TYPE,
899
+ _context: context
900
+ };
901
+ var hasWarnedAboutUsingNestedContextConsumers = false;
902
+ var hasWarnedAboutUsingConsumerProvider = false;
903
+ var hasWarnedAboutDisplayNameOnConsumer = false;
904
+ {
905
+ // A separate object, but proxies back to the original context object for
906
+ // backwards compatibility. It has a different $$typeof, so we can properly
907
+ // warn for the incorrect usage of Context as a Consumer.
908
+ var Consumer = {
909
+ $$typeof: REACT_CONTEXT_TYPE,
910
+ _context: context
911
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
912
+ Object.defineProperties(Consumer, {
913
+ Provider: {
914
+ get: function get() {
915
+ if (!hasWarnedAboutUsingConsumerProvider) {
916
+ hasWarnedAboutUsingConsumerProvider = true;
917
+ error("Rendering <Context.Consumer.Provider> is not supported and will be removed in " + "a future major release. Did you mean to render <Context.Provider> instead?");
918
+ }
919
+ return context.Provider;
920
+ },
921
+ set: function set(_Provider) {
922
+ context.Provider = _Provider;
923
+ }
924
+ },
925
+ _currentValue: {
926
+ get: function get() {
927
+ return context._currentValue;
928
+ },
929
+ set: function set(_currentValue) {
930
+ context._currentValue = _currentValue;
931
+ }
932
+ },
933
+ _currentValue2: {
934
+ get: function get() {
935
+ return context._currentValue2;
936
+ },
937
+ set: function set(_currentValue2) {
938
+ context._currentValue2 = _currentValue2;
939
+ }
940
+ },
941
+ _threadCount: {
942
+ get: function get() {
943
+ return context._threadCount;
944
+ },
945
+ set: function set(_threadCount) {
946
+ context._threadCount = _threadCount;
947
+ }
948
+ },
949
+ Consumer: {
950
+ get: function get() {
951
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
952
+ hasWarnedAboutUsingNestedContextConsumers = true;
953
+ error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in " + "a future major release. Did you mean to render <Context.Consumer> instead?");
954
+ }
955
+ return context.Consumer;
956
+ }
957
+ },
958
+ displayName: {
959
+ get: function get() {
960
+ return context.displayName;
961
+ },
962
+ set: function set(displayName) {
963
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
964
+ warn("Setting `displayName` on Context.Consumer has no effect. " + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
965
+ hasWarnedAboutDisplayNameOnConsumer = true;
966
+ }
967
+ }
968
+ }
969
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
970
+ context.Consumer = Consumer;
971
+ }
972
+ {
973
+ context._currentRenderer = null;
974
+ context._currentRenderer2 = null;
975
+ }
976
+ return context;
977
+ };
978
+ var lazyInitializer = function lazyInitializer(payload) {
979
+ if (payload._status === Uninitialized) {
980
+ var ctor = payload._result;
981
+ var thenable = ctor(); // Transition to the next state.
982
+ // This might throw either because it's missing or throws. If so, we treat it
983
+ // as still uninitialized and try again next time. Which is the same as what
984
+ // happens if the ctor or any wrappers processing the ctor throws. This might
985
+ // end up fixing it if the resolution was a concurrency bug.
986
+ thenable.then(function(moduleObject) {
987
+ if (payload._status === Pending || payload._status === Uninitialized) {
988
+ // Transition to the next state.
989
+ var resolved = payload;
990
+ resolved._status = Resolved;
991
+ resolved._result = moduleObject;
992
+ }
993
+ }, function(error) {
994
+ if (payload._status === Pending || payload._status === Uninitialized) {
995
+ // Transition to the next state.
996
+ var rejected = payload;
997
+ rejected._status = Rejected;
998
+ rejected._result = error;
999
+ }
1000
+ });
1001
+ if (payload._status === Uninitialized) {
1002
+ // In case, we're still uninitialized, then we're waiting for the thenable
1003
+ // to resolve. Set it as pending in the meantime.
1004
+ var pending = payload;
1005
+ pending._status = Pending;
1006
+ pending._result = thenable;
1007
+ }
1008
+ }
1009
+ if (payload._status === Resolved) {
1010
+ var moduleObject = payload._result;
1011
+ {
1012
+ if (moduleObject === undefined) {
1013
+ error("lazy: Expected the result of a dynamic imp" + "ort() call. " + "Instead received: %s\n\nYour code should look like: \n " + // Break up imports to avoid accidentally parsing them as dependencies.
1014
+ "const MyComponent = lazy(() => imp" + "ort('./MyComponent'))\n\n" + "Did you accidentally put curly braces around the import?", moduleObject);
1015
+ }
1016
+ }
1017
+ {
1018
+ if (!("default" in moduleObject)) {
1019
+ error("lazy: Expected the result of a dynamic imp" + "ort() call. " + "Instead received: %s\n\nYour code should look like: \n " + // Break up imports to avoid accidentally parsing them as dependencies.
1020
+ "const MyComponent = lazy(() => imp" + "ort('./MyComponent'))", moduleObject);
1021
+ }
1022
+ }
1023
+ return moduleObject.default;
1024
+ } else {
1025
+ throw payload._result;
1026
+ }
1027
+ };
1028
+ var lazy = function lazy(ctor) {
1029
+ var payload = {
1030
+ // We use these fields to store the result.
1031
+ _status: Uninitialized,
1032
+ _result: ctor
1033
+ };
1034
+ var lazyType = {
1035
+ $$typeof: REACT_LAZY_TYPE,
1036
+ _payload: payload,
1037
+ _init: lazyInitializer
1038
+ };
1039
+ {
1040
+ // In production, this would just set it on the object.
1041
+ var defaultProps;
1042
+ var propTypes; // $FlowFixMe
1043
+ Object.defineProperties(lazyType, {
1044
+ defaultProps: {
1045
+ configurable: true,
1046
+ get: function get() {
1047
+ return defaultProps;
1048
+ },
1049
+ set: function set(newDefaultProps) {
1050
+ error("React.lazy(...): It is not supported to assign `defaultProps` to " + "a lazy component import. Either specify them where the component " + "is defined, or create a wrapping component around it.");
1051
+ defaultProps = newDefaultProps; // Match production behavior more closely:
1052
+ // $FlowFixMe
1053
+ Object.defineProperty(lazyType, "defaultProps", {
1054
+ enumerable: true
1055
+ });
1056
+ }
1057
+ },
1058
+ propTypes: {
1059
+ configurable: true,
1060
+ get: function get() {
1061
+ return propTypes;
1062
+ },
1063
+ set: function set(newPropTypes) {
1064
+ error("React.lazy(...): It is not supported to assign `propTypes` to " + "a lazy component import. Either specify them where the component " + "is defined, or create a wrapping component around it.");
1065
+ propTypes = newPropTypes; // Match production behavior more closely:
1066
+ // $FlowFixMe
1067
+ Object.defineProperty(lazyType, "propTypes", {
1068
+ enumerable: true
1069
+ });
1070
+ }
1071
+ }
1072
+ });
1073
+ }
1074
+ return lazyType;
1075
+ };
1076
+ var forwardRef = function forwardRef(render) {
1077
+ {
1078
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1079
+ error("forwardRef requires a render function but received a `memo` " + "component. Instead of forwardRef(memo(...)), use " + "memo(forwardRef(...)).");
1080
+ } else if (typeof render !== "function") {
1081
+ error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render === "undefined" ? "undefined" : _typeof(render));
1082
+ } else {
1083
+ if (render.length !== 0 && render.length !== 2) {
1084
+ error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
1085
+ }
1086
+ }
1087
+ if (render != null) {
1088
+ if (render.defaultProps != null || render.propTypes != null) {
1089
+ error("forwardRef render functions do not support propTypes or defaultProps. " + "Did you accidentally pass a React component?");
1090
+ }
1091
+ }
1092
+ }
1093
+ var elementType = {
1094
+ $$typeof: REACT_FORWARD_REF_TYPE,
1095
+ render: render
1096
+ };
1097
+ {
1098
+ var ownName;
1099
+ Object.defineProperty(elementType, "displayName", {
1100
+ enumerable: false,
1101
+ configurable: true,
1102
+ get: function get() {
1103
+ return ownName;
1104
+ },
1105
+ set: function set(name) {
1106
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1107
+ // because the component may be used elsewhere.
1108
+ // But it's nice for anonymous functions to inherit the name,
1109
+ // so that our component-stack generation logic will display their frames.
1110
+ // An anonymous function generally suggests a pattern like:
1111
+ // React.forwardRef((props, ref) => {...});
1112
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1113
+ if (!render.name && !render.displayName) {
1114
+ render.displayName = name;
1115
+ }
1116
+ }
1117
+ });
1118
+ }
1119
+ return elementType;
1120
+ };
1121
+ var isValidElementType = function isValidElementType(type) {
1122
+ if (typeof type === "string" || typeof type === "function") {
1123
+ return true;
1124
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1125
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
1126
+ return true;
1127
+ }
1128
+ if (typeof type === "object" && type !== null) {
1129
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1130
+ // types supported by any Flight configuration anywhere since
1131
+ // we don't know which Flight build this will end up being used
1132
+ // with.
1133
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1134
+ return true;
1135
+ }
1136
+ }
1137
+ return false;
1138
+ };
1139
+ var memo = function memo(type, compare) {
1140
+ {
1141
+ if (!isValidElementType(type)) {
1142
+ error("memo: The first argument must be a component. Instead " + "received: %s", type === null ? "null" : typeof type === "undefined" ? "undefined" : _typeof(type));
1143
+ }
1144
+ }
1145
+ var elementType = {
1146
+ $$typeof: REACT_MEMO_TYPE,
1147
+ type: type,
1148
+ compare: compare === undefined ? null : compare
1149
+ };
1150
+ {
1151
+ var ownName;
1152
+ Object.defineProperty(elementType, "displayName", {
1153
+ enumerable: false,
1154
+ configurable: true,
1155
+ get: function get() {
1156
+ return ownName;
1157
+ },
1158
+ set: function set(name) {
1159
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1160
+ // because the component may be used elsewhere.
1161
+ // But it's nice for anonymous functions to inherit the name,
1162
+ // so that our component-stack generation logic will display their frames.
1163
+ // An anonymous function generally suggests a pattern like:
1164
+ // React.memo((props) => {...});
1165
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1166
+ if (!type.name && !type.displayName) {
1167
+ type.displayName = name;
1168
+ }
1169
+ }
1170
+ });
1171
+ }
1172
+ return elementType;
1173
+ };
1174
+ var resolveDispatcher = function resolveDispatcher() {
1175
+ var dispatcher = ReactCurrentDispatcher.current;
1176
+ {
1177
+ if (dispatcher === null) {
1178
+ error("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:\n" + "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + "2. You might be breaking the Rules of Hooks\n" + "3. You might have more than one copy of React in the same app\n" + "See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1179
+ }
1180
+ }
1181
+ // intentionally don't throw our own error because this is in a hot path.
1182
+ // Also helps ensure this is inlined.
1183
+ return dispatcher;
1184
+ };
1185
+ var useContext = function useContext(Context) {
1186
+ var dispatcher = resolveDispatcher();
1187
+ {
1188
+ // TODO: add a more generic warning for invalid values.
1189
+ if (Context._context !== undefined) {
1190
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
1191
+ // and nobody should be using this in existing code.
1192
+ if (realContext.Consumer === Context) {
1193
+ error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be " + "removed in a future major release. Did you mean to call useContext(Context) instead?");
1194
+ } else if (realContext.Provider === Context) {
1195
+ error("Calling useContext(Context.Provider) is not supported. " + "Did you mean to call useContext(Context) instead?");
1196
+ }
1197
+ }
1198
+ }
1199
+ return dispatcher.useContext(Context);
1200
+ };
1201
+ var useState = function useState(initialState) {
1202
+ var dispatcher = resolveDispatcher();
1203
+ return dispatcher.useState(initialState);
1204
+ };
1205
+ var useReducer = function useReducer(reducer, initialArg, init) {
1206
+ var dispatcher = resolveDispatcher();
1207
+ return dispatcher.useReducer(reducer, initialArg, init);
1208
+ };
1209
+ var useRef = function useRef(initialValue) {
1210
+ var dispatcher = resolveDispatcher();
1211
+ return dispatcher.useRef(initialValue);
1212
+ };
1213
+ var useEffect = function useEffect(create, deps) {
1214
+ var dispatcher = resolveDispatcher();
1215
+ return dispatcher.useEffect(create, deps);
1216
+ };
1217
+ var useInsertionEffect = function useInsertionEffect(create, deps) {
1218
+ var dispatcher = resolveDispatcher();
1219
+ return dispatcher.useInsertionEffect(create, deps);
1220
+ };
1221
+ var useLayoutEffect = function useLayoutEffect(create, deps) {
1222
+ var dispatcher = resolveDispatcher();
1223
+ return dispatcher.useLayoutEffect(create, deps);
1224
+ };
1225
+ var useCallback = function useCallback(callback, deps) {
1226
+ var dispatcher = resolveDispatcher();
1227
+ return dispatcher.useCallback(callback, deps);
1228
+ };
1229
+ var useMemo = function useMemo(create, deps) {
1230
+ var dispatcher = resolveDispatcher();
1231
+ return dispatcher.useMemo(create, deps);
1232
+ };
1233
+ var useImperativeHandle = function useImperativeHandle(ref, create, deps) {
1234
+ var dispatcher = resolveDispatcher();
1235
+ return dispatcher.useImperativeHandle(ref, create, deps);
1236
+ };
1237
+ var useDebugValue = function useDebugValue(value, formatterFn) {
1238
+ {
1239
+ var dispatcher = resolveDispatcher();
1240
+ return dispatcher.useDebugValue(value, formatterFn);
1241
+ }
1242
+ };
1243
+ var useTransition = function useTransition() {
1244
+ var dispatcher = resolveDispatcher();
1245
+ return dispatcher.useTransition();
1246
+ };
1247
+ var useDeferredValue = function useDeferredValue(value) {
1248
+ var dispatcher = resolveDispatcher();
1249
+ return dispatcher.useDeferredValue(value);
1250
+ };
1251
+ var useId = function useId() {
1252
+ var dispatcher = resolveDispatcher();
1253
+ return dispatcher.useId();
1254
+ };
1255
+ var useSyncExternalStore = function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1256
+ var dispatcher = resolveDispatcher();
1257
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1258
+ };
1259
+ var disabledLog = function disabledLog() {};
1260
+ var disableLogs = function disableLogs() {
1261
+ {
1262
+ if (disabledDepth === 0) {
1263
+ /* eslint-disable react-internal/no-production-logging */ prevLog = console.log;
1264
+ prevInfo = console.info;
1265
+ prevWarn = console.warn;
1266
+ prevError = console.error;
1267
+ prevGroup = console.group;
1268
+ prevGroupCollapsed = console.groupCollapsed;
1269
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
1270
+ var props = {
1271
+ configurable: true,
1272
+ enumerable: true,
1273
+ value: disabledLog,
1274
+ writable: true
1275
+ }; // $FlowFixMe Flow thinks console is immutable.
1276
+ Object.defineProperties(console, {
1277
+ info: props,
1278
+ log: props,
1279
+ warn: props,
1280
+ error: props,
1281
+ group: props,
1282
+ groupCollapsed: props,
1283
+ groupEnd: props
1284
+ });
1285
+ /* eslint-enable react-internal/no-production-logging */ }
1286
+ disabledDepth++;
1287
+ }
1288
+ };
1289
+ var reenableLogs = function reenableLogs() {
1290
+ {
1291
+ disabledDepth--;
1292
+ if (disabledDepth === 0) {
1293
+ /* eslint-disable react-internal/no-production-logging */ var props = {
1294
+ configurable: true,
1295
+ enumerable: true,
1296
+ writable: true
1297
+ }; // $FlowFixMe Flow thinks console is immutable.
1298
+ Object.defineProperties(console, {
1299
+ log: assign({}, props, {
1300
+ value: prevLog
1301
+ }),
1302
+ info: assign({}, props, {
1303
+ value: prevInfo
1304
+ }),
1305
+ warn: assign({}, props, {
1306
+ value: prevWarn
1307
+ }),
1308
+ error: assign({}, props, {
1309
+ value: prevError
1310
+ }),
1311
+ group: assign({}, props, {
1312
+ value: prevGroup
1313
+ }),
1314
+ groupCollapsed: assign({}, props, {
1315
+ value: prevGroupCollapsed
1316
+ }),
1317
+ groupEnd: assign({}, props, {
1318
+ value: prevGroupEnd
1319
+ })
1320
+ });
1321
+ /* eslint-enable react-internal/no-production-logging */ }
1322
+ if (disabledDepth < 0) {
1323
+ error("disabledDepth fell below zero. " + "This is a bug in React. Please file an issue.");
1324
+ }
1325
+ }
1326
+ };
1327
+ var describeBuiltInComponentFrame = function describeBuiltInComponentFrame(name, source, ownerFn) {
1328
+ {
1329
+ if (prefix === undefined) {
1330
+ // Extract the VM specific prefix used by each line.
1331
+ try {
1332
+ throw Error();
1333
+ } catch (x) {
1334
+ var match = x.stack.trim().match(/\n( *(at )?)/);
1335
+ prefix = match && match[1] || "";
1336
+ }
1337
+ } // We use the prefix to ensure our stacks line up with native stack frames.
1338
+ return "\n" + prefix + name;
1339
+ }
1340
+ };
1341
+ var describeNativeComponentFrame = function describeNativeComponentFrame(fn, construct) {
1342
+ // If something asked for a stack inside a fake render, it should get ignored.
1343
+ if (!fn || reentry) {
1344
+ return "";
1345
+ }
1346
+ {
1347
+ var frame = componentFrameCache.get(fn);
1348
+ if (frame !== undefined) {
1349
+ return frame;
1350
+ }
1351
+ }
1352
+ var control;
1353
+ reentry = true;
1354
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
1355
+ Error.prepareStackTrace = undefined;
1356
+ var previousDispatcher;
1357
+ {
1358
+ previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
1359
+ // for warnings.
1360
+ ReactCurrentDispatcher$1.current = null;
1361
+ disableLogs();
1362
+ }
1363
+ try {
1364
+ // This should throw.
1365
+ if (construct) {
1366
+ // Something should be setting the props in the constructor.
1367
+ var Fake = function Fake() {
1368
+ throw Error();
1369
+ }; // $FlowFixMe
1370
+ Object.defineProperty(Fake.prototype, "props", {
1371
+ set: function set() {
1372
+ // We use a throwing setter instead of frozen or non-writable props
1373
+ // because that won't throw in a non-strict mode function.
1374
+ throw Error();
1375
+ }
1376
+ });
1377
+ if (typeof Reflect === "object" && Reflect.construct) {
1378
+ // We construct a different control for this case to include any extra
1379
+ // frames added by the construct call.
1380
+ try {
1381
+ Reflect.construct(Fake, []);
1382
+ } catch (x) {
1383
+ control = x;
1384
+ }
1385
+ Reflect.construct(fn, [], Fake);
1386
+ } else {
1387
+ try {
1388
+ Fake.call();
1389
+ } catch (x1) {
1390
+ control = x1;
1391
+ }
1392
+ fn.call(Fake.prototype);
1393
+ }
1394
+ } else {
1395
+ try {
1396
+ throw Error();
1397
+ } catch (x2) {
1398
+ control = x2;
1399
+ }
1400
+ fn();
1401
+ }
1402
+ } catch (sample) {
1403
+ // This is inlined manually because closure doesn't do it for us.
1404
+ if (sample && control && typeof sample.stack === "string") {
1405
+ // This extracts the first frame from the sample that isn't also in the control.
1406
+ // Skipping one frame that we assume is the frame that calls the two.
1407
+ var sampleLines = sample.stack.split("\n");
1408
+ var controlLines = control.stack.split("\n");
1409
+ var s = sampleLines.length - 1;
1410
+ var c = controlLines.length - 1;
1411
+ while(s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]){
1412
+ // We expect at least one stack frame to be shared.
1413
+ // Typically this will be the root most one. However, stack frames may be
1414
+ // cut off due to maximum stack limits. In this case, one maybe cut off
1415
+ // earlier than the other. We assume that the sample is longer or the same
1416
+ // and there for cut off earlier. So we should find the root most frame in
1417
+ // the sample somewhere in the control.
1418
+ c--;
1419
+ }
1420
+ for(; s >= 1 && c >= 0; s--, c--){
1421
+ // Next we find the first one that isn't the same which should be the
1422
+ // frame that called our sample function and the control.
1423
+ if (sampleLines[s] !== controlLines[c]) {
1424
+ // In V8, the first line is describing the message but other VMs don't.
1425
+ // If we're about to return the first line, and the control is also on the same
1426
+ // line, that's a pretty good indicator that our sample threw at same line as
1427
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
1428
+ // This can happen if you passed a class to function component, or non-function.
1429
+ if (s !== 1 || c !== 1) {
1430
+ do {
1431
+ s--;
1432
+ c--; // We may still have similar intermediate frames from the construct call.
1433
+ // The next one that isn't the same should be our match though.
1434
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
1435
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
1436
+ var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); // If our component frame is labeled "<anonymous>"
1437
+ // but we have a user-provided "displayName"
1438
+ // splice it in to make the stack more readable.
1439
+ if (fn.displayName && _frame.includes("<anonymous>")) {
1440
+ _frame = _frame.replace("<anonymous>", fn.displayName);
1441
+ }
1442
+ {
1443
+ if (typeof fn === "function") {
1444
+ componentFrameCache.set(fn, _frame);
1445
+ }
1446
+ }
1447
+ return _frame;
1448
+ }
1449
+ }while (s >= 1 && c >= 0);
1450
+ }
1451
+ break;
1452
+ }
1453
+ }
1454
+ }
1455
+ } finally{
1456
+ reentry = false;
1457
+ {
1458
+ ReactCurrentDispatcher$1.current = previousDispatcher;
1459
+ reenableLogs();
1460
+ }
1461
+ Error.prepareStackTrace = previousPrepareStackTrace;
1462
+ } // Fallback to just using the name if we couldn't make it throw.
1463
+ var name = fn ? fn.displayName || fn.name : "";
1464
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1465
+ {
1466
+ if (typeof fn === "function") {
1467
+ componentFrameCache.set(fn, syntheticFrame);
1468
+ }
1469
+ }
1470
+ return syntheticFrame;
1471
+ };
1472
+ var describeFunctionComponentFrame = function describeFunctionComponentFrame(fn, source, ownerFn) {
1473
+ {
1474
+ return describeNativeComponentFrame(fn, false);
1475
+ }
1476
+ };
1477
+ var shouldConstruct = function shouldConstruct(Component) {
1478
+ var prototype = Component.prototype;
1479
+ return !!(prototype && prototype.isReactComponent);
1480
+ };
1481
+ var setCurrentlyValidatingElement = function setCurrentlyValidatingElement(element) {
1482
+ {
1483
+ if (element) {
1484
+ var owner = element._owner;
1485
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1486
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1487
+ } else {
1488
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1489
+ }
1490
+ }
1491
+ };
1492
+ var checkPropTypes = function checkPropTypes(typeSpecs, values, location, componentName, element) {
1493
+ {
1494
+ // $FlowFixMe This is okay but Flow doesn't know it.
1495
+ var has = Function.call.bind(hasOwnProperty);
1496
+ for(var typeSpecName in typeSpecs){
1497
+ if (has(typeSpecs, typeSpecName)) {
1498
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
1499
+ // fail the render phase where it didn't fail before. So we log it.
1500
+ // After these have been cleaned up, we'll let them throw.
1501
+ try {
1502
+ // This is intentionally an invariant that gets caught. It's the same
1503
+ // behavior as without this statement except with a better message.
1504
+ if (typeof typeSpecs[typeSpecName] !== "function") {
1505
+ // eslint-disable-next-line react-internal/prod-error-codes
1506
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; " + "it must be a function, usually from the `prop-types` package, but received `" + _typeof(typeSpecs[typeSpecName]) + "`." + "This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1507
+ err.name = "Invariant Violation";
1508
+ throw err;
1509
+ }
1510
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1511
+ } catch (ex) {
1512
+ error$1 = ex;
1513
+ }
1514
+ if (error$1 && !_instanceof(error$1, Error)) {
1515
+ setCurrentlyValidatingElement(element);
1516
+ error("%s: type specification of %s" + " `%s` is invalid; the type checker " + "function must return `null` or an `Error` but returned a %s. " + "You may have forgotten to pass an argument to the type checker " + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + "shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1 === "undefined" ? "undefined" : _typeof(error$1));
1517
+ setCurrentlyValidatingElement(null);
1518
+ }
1519
+ if (_instanceof(error$1, Error) && !(error$1.message in loggedTypeFailures)) {
1520
+ // Only monitor this failure once because there tends to be a lot of the
1521
+ // same error.
1522
+ loggedTypeFailures[error$1.message] = true;
1523
+ setCurrentlyValidatingElement(element);
1524
+ error("Failed %s type: %s", location, error$1.message);
1525
+ setCurrentlyValidatingElement(null);
1526
+ }
1527
+ }
1528
+ }
1529
+ }
1530
+ };
1531
+ var setCurrentlyValidatingElement$1 = function setCurrentlyValidatingElement$1(element) {
1532
+ {
1533
+ if (element) {
1534
+ var owner = element._owner;
1535
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1536
+ setExtraStackFrame(stack);
1537
+ } else {
1538
+ setExtraStackFrame(null);
1539
+ }
1540
+ }
1541
+ };
1542
+ var getDeclarationErrorAddendum = function getDeclarationErrorAddendum() {
1543
+ if (ReactCurrentOwner.current) {
1544
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1545
+ if (name) {
1546
+ return "\n\nCheck the render method of `" + name + "`.";
1547
+ }
1548
+ }
1549
+ return "";
1550
+ };
1551
+ var getSourceInfoErrorAddendum = function getSourceInfoErrorAddendum(source) {
1552
+ if (source !== undefined) {
1553
+ var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1554
+ var lineNumber = source.lineNumber;
1555
+ return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1556
+ }
1557
+ return "";
1558
+ };
1559
+ var getSourceInfoErrorAddendumForProps = function getSourceInfoErrorAddendumForProps(elementProps) {
1560
+ if (elementProps !== null && elementProps !== undefined) {
1561
+ return getSourceInfoErrorAddendum(elementProps.__source);
1562
+ }
1563
+ return "";
1564
+ };
1565
+ var getCurrentComponentErrorInfo = function getCurrentComponentErrorInfo(parentType) {
1566
+ var info = getDeclarationErrorAddendum();
1567
+ if (!info) {
1568
+ var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1569
+ if (parentName) {
1570
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1571
+ }
1572
+ }
1573
+ return info;
1574
+ };
1575
+ var validateExplicitKey = /**
1576
+ * Warn if the element doesn't have an explicit key assigned to it.
1577
+ * This element is in an array. The array could grow and shrink or be
1578
+ * reordered. All children that haven't already been validated are required to
1579
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1580
+ * will only be shown once.
1581
+ *
1582
+ * @internal
1583
+ * @param {ReactElement} element Element that requires a key.
1584
+ * @param {*} parentType element's parent's type.
1585
+ */ function validateExplicitKey(element, parentType) {
1586
+ if (!element._store || element._store.validated || element.key != null) {
1587
+ return;
1588
+ }
1589
+ element._store.validated = true;
1590
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1591
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1592
+ return;
1593
+ }
1594
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1595
+ // property, it may be the creator of the child that's responsible for
1596
+ // assigning it a key.
1597
+ var childOwner = "";
1598
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1599
+ // Give the component that originally created this child.
1600
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1601
+ }
1602
+ {
1603
+ setCurrentlyValidatingElement$1(element);
1604
+ error('Each child in a list should have a unique "key" prop.' + "%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
1605
+ setCurrentlyValidatingElement$1(null);
1606
+ }
1607
+ };
1608
+ var validateChildKeys = /**
1609
+ * Ensure that every element either is passed in a static location, in an
1610
+ * array with an explicit keys property defined, or in an object literal
1611
+ * with valid key property.
1612
+ *
1613
+ * @internal
1614
+ * @param {ReactNode} node Statically passed child of any type.
1615
+ * @param {*} parentType node's parent's type.
1616
+ */ function validateChildKeys(node, parentType) {
1617
+ if (typeof node !== "object") {
1618
+ return;
1619
+ }
1620
+ if (isArray(node)) {
1621
+ for(var i = 0; i < node.length; i++){
1622
+ var child = node[i];
1623
+ if (isValidElement(child)) {
1624
+ validateExplicitKey(child, parentType);
1625
+ }
1626
+ }
1627
+ } else if (isValidElement(node)) {
1628
+ // This element was passed in a valid location.
1629
+ if (node._store) {
1630
+ node._store.validated = true;
1631
+ }
1632
+ } else if (node) {
1633
+ var iteratorFn = getIteratorFn(node);
1634
+ if (typeof iteratorFn === "function") {
1635
+ // Entry iterators used to provide implicit keys,
1636
+ // but now we print a separate warning for them later.
1637
+ if (iteratorFn !== node.entries) {
1638
+ var iterator = iteratorFn.call(node);
1639
+ var step;
1640
+ while(!(step = iterator.next()).done){
1641
+ if (isValidElement(step.value)) {
1642
+ validateExplicitKey(step.value, parentType);
1643
+ }
1644
+ }
1645
+ }
1646
+ }
1647
+ }
1648
+ };
1649
+ var validatePropTypes = /**
1650
+ * Given an element, validate that its props follow the propTypes definition,
1651
+ * provided by the type.
1652
+ *
1653
+ * @param {ReactElement} element
1654
+ */ function validatePropTypes(element) {
1655
+ {
1656
+ var type = element.type;
1657
+ if (type === null || type === undefined || typeof type === "string") {
1658
+ return;
1659
+ }
1660
+ var propTypes;
1661
+ if (typeof type === "function") {
1662
+ propTypes = type.propTypes;
1663
+ } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1664
+ // Inner props are checked in the reconciler.
1665
+ type.$$typeof === REACT_MEMO_TYPE)) {
1666
+ propTypes = type.propTypes;
1667
+ } else {
1668
+ return;
1669
+ }
1670
+ if (propTypes) {
1671
+ // Intentionally inside to avoid triggering lazy initializers:
1672
+ var name = getComponentNameFromType(type);
1673
+ checkPropTypes(propTypes, element.props, "prop", name, element);
1674
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1675
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
1676
+ var _name = getComponentNameFromType(type);
1677
+ error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1678
+ }
1679
+ if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1680
+ error("getDefaultProps is only used on classic React.createClass " + "definitions. Use a static property named `defaultProps` instead.");
1681
+ }
1682
+ }
1683
+ };
1684
+ var validateFragmentProps = /**
1685
+ * Given a fragment, validate that it can only be provided with fragment props
1686
+ * @param {ReactElement} fragment
1687
+ */ function validateFragmentProps(fragment) {
1688
+ {
1689
+ var keys = Object.keys(fragment.props);
1690
+ for(var i = 0; i < keys.length; i++){
1691
+ var key = keys[i];
1692
+ if (key !== "children" && key !== "key") {
1693
+ setCurrentlyValidatingElement$1(fragment);
1694
+ error("Invalid prop `%s` supplied to `React.Fragment`. " + "React.Fragment can only have `key` and `children` props.", key);
1695
+ setCurrentlyValidatingElement$1(null);
1696
+ break;
1697
+ }
1698
+ }
1699
+ if (fragment.ref !== null) {
1700
+ setCurrentlyValidatingElement$1(fragment);
1701
+ error("Invalid attribute `ref` supplied to `React.Fragment`.");
1702
+ setCurrentlyValidatingElement$1(null);
1703
+ }
1704
+ }
1705
+ };
1706
+ var createElementWithValidation = function createElementWithValidation(type, props, children) {
1707
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1708
+ // succeed and there will likely be errors in render.
1709
+ if (!validType) {
1710
+ var info = "";
1711
+ if (type === undefined || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1712
+ info += " You likely forgot to export your component from the file " + "it's defined in, or you might have mixed up default and named imports.";
1713
+ }
1714
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1715
+ if (sourceInfo) {
1716
+ info += sourceInfo;
1717
+ } else {
1718
+ info += getDeclarationErrorAddendum();
1719
+ }
1720
+ var typeString;
1721
+ if (type === null) {
1722
+ typeString = "null";
1723
+ } else if (isArray(type)) {
1724
+ typeString = "array";
1725
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1726
+ typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1727
+ info = " Did you accidentally export a JSX literal instead of a component?";
1728
+ } else {
1729
+ typeString = typeof type === "undefined" ? "undefined" : _typeof(type);
1730
+ }
1731
+ {
1732
+ error("React.createElement: type is invalid -- expected a string (for " + "built-in components) or a class/function (for composite " + "components) but got: %s.%s", typeString, info);
1733
+ }
1734
+ }
1735
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
1736
+ // TODO: Drop this when these are no longer allowed as the type argument.
1737
+ if (element == null) {
1738
+ return element;
1739
+ } // Skip key warning if the type isn't valid since our key validation logic
1740
+ // doesn't expect a non-string/function type and can throw confusing errors.
1741
+ // We don't want exception behavior to differ between dev and prod.
1742
+ // (Rendering will throw with a helpful message and as soon as the type is
1743
+ // fixed, the key warnings will appear.)
1744
+ if (validType) {
1745
+ for(var i = 2; i < arguments.length; i++){
1746
+ validateChildKeys(arguments[i], type);
1747
+ }
1748
+ }
1749
+ if (type === REACT_FRAGMENT_TYPE) {
1750
+ validateFragmentProps(element);
1751
+ } else {
1752
+ validatePropTypes(element);
1753
+ }
1754
+ return element;
1755
+ };
1756
+ var createFactoryWithValidation = function createFactoryWithValidation(type) {
1757
+ var validatedFactory = createElementWithValidation.bind(null, type);
1758
+ validatedFactory.type = type;
1759
+ {
1760
+ if (!didWarnAboutDeprecatedCreateFactory) {
1761
+ didWarnAboutDeprecatedCreateFactory = true;
1762
+ warn("React.createFactory() is deprecated and will be removed in " + "a future major release. Consider using JSX " + "or use React.createElement() directly instead.");
1763
+ } // Legacy hook: remove it
1764
+ Object.defineProperty(validatedFactory, "type", {
1765
+ enumerable: false,
1766
+ get: function get() {
1767
+ warn("Factory.type is deprecated. Access the class directly " + "before passing it to createFactory.");
1768
+ Object.defineProperty(this, "type", {
1769
+ value: type
1770
+ });
1771
+ return type;
1772
+ }
1773
+ });
1774
+ }
1775
+ return validatedFactory;
1776
+ };
1777
+ var cloneElementWithValidation = function cloneElementWithValidation(element, props, children) {
1778
+ var newElement = cloneElement.apply(this, arguments);
1779
+ for(var i = 2; i < arguments.length; i++){
1780
+ validateChildKeys(arguments[i], newElement.type);
1781
+ }
1782
+ validatePropTypes(newElement);
1783
+ return newElement;
1784
+ };
1785
+ var startTransition = function startTransition(scope, options) {
1786
+ var prevTransition = ReactCurrentBatchConfig.transition;
1787
+ ReactCurrentBatchConfig.transition = {};
1788
+ var currentTransition = ReactCurrentBatchConfig.transition;
1789
+ {
1790
+ ReactCurrentBatchConfig.transition._updatedFibers = new Set();
1791
+ }
1792
+ try {
1793
+ scope();
1794
+ } finally{
1795
+ ReactCurrentBatchConfig.transition = prevTransition;
1796
+ {
1797
+ if (prevTransition === null && currentTransition._updatedFibers) {
1798
+ var updatedFibersCount = currentTransition._updatedFibers.size;
1799
+ if (updatedFibersCount > 10) {
1800
+ warn("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.");
1801
+ }
1802
+ currentTransition._updatedFibers.clear();
1803
+ }
1804
+ }
1805
+ }
1806
+ };
1807
+ var enqueueTask = function enqueueTask(task) {
1808
+ if (enqueueTaskImpl === null) {
1809
+ try {
1810
+ // read require off the module object to get around the bundlers.
1811
+ // we don't want them to detect a require and bundle a Node polyfill.
1812
+ var requireString = ("require" + Math.random()).slice(0, 7);
1813
+ var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
1814
+ // version of setImmediate, bypassing fake timers if any.
1815
+ enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1816
+ } catch (_err) {
1817
+ // we're in a browser
1818
+ // we can't use regular timers because they may still be faked
1819
+ // so we try MessageChannel+postMessage instead
1820
+ enqueueTaskImpl = function enqueueTaskImpl(callback) {
1821
+ {
1822
+ if (didWarnAboutMessageChannel === false) {
1823
+ didWarnAboutMessageChannel = true;
1824
+ if (typeof MessageChannel === "undefined") {
1825
+ error("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.");
1826
+ }
1827
+ }
1828
+ }
1829
+ var channel = new MessageChannel();
1830
+ channel.port1.onmessage = callback;
1831
+ channel.port2.postMessage(undefined);
1832
+ };
1833
+ }
1834
+ }
1835
+ return enqueueTaskImpl(task);
1836
+ };
1837
+ var act = function act(callback) {
1838
+ {
1839
+ // `act` calls can be nested, so we track the depth. This represents the
1840
+ // number of `act` scopes on the stack.
1841
+ var prevActScopeDepth = actScopeDepth;
1842
+ actScopeDepth++;
1843
+ if (ReactCurrentActQueue.current === null) {
1844
+ // This is the outermost `act` scope. Initialize the queue. The reconciler
1845
+ // will detect the queue and use it instead of Scheduler.
1846
+ ReactCurrentActQueue.current = [];
1847
+ }
1848
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1849
+ var result;
1850
+ try {
1851
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
1852
+ // set to `true` while the given callback is executed, not for updates
1853
+ // triggered during an async event, because this is how the legacy
1854
+ // implementation of `act` behaved.
1855
+ ReactCurrentActQueue.isBatchingLegacy = true;
1856
+ result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
1857
+ // which flushed updates immediately after the scope function exits, even
1858
+ // if it's an async function.
1859
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1860
+ var queue = ReactCurrentActQueue.current;
1861
+ if (queue !== null) {
1862
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1863
+ flushActQueue(queue);
1864
+ }
1865
+ }
1866
+ } catch (error1) {
1867
+ popActScope(prevActScopeDepth);
1868
+ throw error1;
1869
+ } finally{
1870
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1871
+ }
1872
+ if (result !== null && typeof result === "object" && typeof result.then === "function") {
1873
+ var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
1874
+ // for it to resolve before exiting the current scope.
1875
+ var wasAwaited = false;
1876
+ var thenable = {
1877
+ then: function then(resolve, reject) {
1878
+ wasAwaited = true;
1879
+ thenableResult.then(function(returnValue) {
1880
+ popActScope(prevActScopeDepth);
1881
+ if (actScopeDepth === 0) {
1882
+ // We've exited the outermost act scope. Recursively flush the
1883
+ // queue until there's no remaining work.
1884
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1885
+ } else {
1886
+ resolve(returnValue);
1887
+ }
1888
+ }, function(error) {
1889
+ // The callback threw an error.
1890
+ popActScope(prevActScopeDepth);
1891
+ reject(error);
1892
+ });
1893
+ }
1894
+ };
1895
+ {
1896
+ if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
1897
+ // eslint-disable-next-line no-undef
1898
+ Promise.resolve().then(function() {}).then(function() {
1899
+ if (!wasAwaited) {
1900
+ didWarnNoAwaitAct = true;
1901
+ error("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 () => ...);");
1902
+ }
1903
+ });
1904
+ }
1905
+ }
1906
+ return thenable;
1907
+ } else {
1908
+ var returnValue = result; // The callback is not an async function. Exit the current scope
1909
+ // immediately, without awaiting.
1910
+ popActScope(prevActScopeDepth);
1911
+ if (actScopeDepth === 0) {
1912
+ // Exiting the outermost act scope. Flush the queue.
1913
+ var _queue = ReactCurrentActQueue.current;
1914
+ if (_queue !== null) {
1915
+ flushActQueue(_queue);
1916
+ ReactCurrentActQueue.current = null;
1917
+ } // Return a thenable. If the user awaits it, we'll flush again in
1918
+ // case additional work was scheduled by a microtask.
1919
+ var _thenable = {
1920
+ then: function then(resolve, reject) {
1921
+ // Confirm we haven't re-entered another `act` scope, in case
1922
+ // the user does something weird like await the thenable
1923
+ // multiple times.
1924
+ if (ReactCurrentActQueue.current === null) {
1925
+ // Recursively flush the queue until there's no remaining work.
1926
+ ReactCurrentActQueue.current = [];
1927
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1928
+ } else {
1929
+ resolve(returnValue);
1930
+ }
1931
+ }
1932
+ };
1933
+ return _thenable;
1934
+ } else {
1935
+ // Since we're inside a nested `act` scope, the returned thenable
1936
+ // immediately resolves. The outer scope will flush the queue.
1937
+ var _thenable2 = {
1938
+ then: function then(resolve, reject) {
1939
+ resolve(returnValue);
1940
+ }
1941
+ };
1942
+ return _thenable2;
1943
+ }
1944
+ }
1945
+ }
1946
+ };
1947
+ var popActScope = function popActScope(prevActScopeDepth) {
1948
+ {
1949
+ if (prevActScopeDepth !== actScopeDepth - 1) {
1950
+ error("You seem to have overlapping act() calls, this is not supported. " + "Be sure to await previous act() calls before making a new one. ");
1951
+ }
1952
+ actScopeDepth = prevActScopeDepth;
1953
+ }
1954
+ };
1955
+ var flushActQueue = function flushActQueue(queue) {
1956
+ {
1957
+ if (!isFlushing) {
1958
+ // Prevent re-entrance.
1959
+ isFlushing = true;
1960
+ var i = 0;
1961
+ try {
1962
+ for(; i < queue.length; i++){
1963
+ var callback = queue[i];
1964
+ do {
1965
+ callback = callback(true);
1966
+ }while (callback !== null);
1967
+ }
1968
+ queue.length = 0;
1969
+ } catch (error) {
1970
+ // If something throws, leave the remaining callbacks on the queue.
1971
+ queue = queue.slice(i + 1);
1972
+ throw error;
1973
+ } finally{
1974
+ isFlushing = false;
1975
+ }
1976
+ }
1977
+ }
1978
+ };
1979
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
1980
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
1981
+ }
1982
+ var ReactVersion = "18.2.0";
1983
+ // ATTENTION
1984
+ // When adding new symbols to this file,
1985
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1986
+ // The Symbol used to tag the ReactElement-like types.
1987
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
1988
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
1989
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1990
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
1991
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1992
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
1993
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
1994
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
1995
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
1996
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
1997
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
1998
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1999
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
2000
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2001
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
2002
+ /**
2003
+ * Keeps track of the current dispatcher.
2004
+ */ var ReactCurrentDispatcher = {
2005
+ /**
2006
+ * @internal
2007
+ * @type {ReactComponent}
2008
+ */ current: null
2009
+ };
2010
+ /**
2011
+ * Keeps track of the current batch's configuration such as how long an update
2012
+ * should suspend for if it needs to.
2013
+ */ var ReactCurrentBatchConfig = {
2014
+ transition: null
2015
+ };
2016
+ var ReactCurrentActQueue = {
2017
+ current: null,
2018
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
2019
+ isBatchingLegacy: false,
2020
+ didScheduleLegacyUpdate: false
2021
+ };
2022
+ /**
2023
+ * Keeps track of the current owner.
2024
+ *
2025
+ * The current owner is the component who should own any components that are
2026
+ * currently being constructed.
2027
+ */ var ReactCurrentOwner = {
2028
+ /**
2029
+ * @internal
2030
+ * @type {ReactComponent}
2031
+ */ current: null
2032
+ };
2033
+ var ReactDebugCurrentFrame = {};
2034
+ var currentExtraStackFrame = null;
2035
+ {
2036
+ ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
2037
+ {
2038
+ currentExtraStackFrame = stack;
2039
+ }
2040
+ }; // Stack implementation injected by the current renderer.
2041
+ ReactDebugCurrentFrame.getCurrentStack = null;
2042
+ ReactDebugCurrentFrame.getStackAddendum = function() {
2043
+ var stack = ""; // Add an extra top frame while an element is being validated
2044
+ if (currentExtraStackFrame) {
2045
+ stack += currentExtraStackFrame;
2046
+ } // Delegate to the injected renderer-specific implementation
2047
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
2048
+ if (impl) {
2049
+ stack += impl() || "";
2050
+ }
2051
+ return stack;
2052
+ };
2053
+ }
2054
+ // -----------------------------------------------------------------------------
2055
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
2056
+ var enableCacheElement = false;
2057
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
2058
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
2059
+ // stuff. Intended to enable React core members to more easily debug scheduling
2060
+ // issues in DEV builds.
2061
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
2062
+ var ReactSharedInternals = {
2063
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
2064
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
2065
+ ReactCurrentOwner: ReactCurrentOwner
2066
+ };
2067
+ {
2068
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
2069
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
2070
+ }
2071
+ var didWarnStateUpdateForUnmountedComponent = {};
2072
+ /**
2073
+ * This is the abstract API for an update queue.
2074
+ */ var ReactNoopUpdateQueue = {
2075
+ /**
2076
+ * Checks whether or not this composite component is mounted.
2077
+ * @param {ReactClass} publicInstance The instance we want to test.
2078
+ * @return {boolean} True if mounted, false otherwise.
2079
+ * @protected
2080
+ * @final
2081
+ */ isMounted: function isMounted(publicInstance) {
2082
+ return false;
2083
+ },
2084
+ /**
2085
+ * Forces an update. This should only be invoked when it is known with
2086
+ * certainty that we are **not** in a DOM transaction.
2087
+ *
2088
+ * You may want to call this when you know that some deeper aspect of the
2089
+ * component's state has changed but `setState` was not called.
2090
+ *
2091
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
2092
+ * `componentWillUpdate` and `componentDidUpdate`.
2093
+ *
2094
+ * @param {ReactClass} publicInstance The instance that should rerender.
2095
+ * @param {?function} callback Called after component is updated.
2096
+ * @param {?string} callerName name of the calling function in the public API.
2097
+ * @internal
2098
+ */ enqueueForceUpdate: function enqueueForceUpdate(publicInstance, callback, callerName) {
2099
+ warnNoop(publicInstance, "forceUpdate");
2100
+ },
2101
+ /**
2102
+ * Replaces all of the state. Always use this or `setState` to mutate state.
2103
+ * You should treat `this.state` as immutable.
2104
+ *
2105
+ * There is no guarantee that `this.state` will be immediately updated, so
2106
+ * accessing `this.state` after calling this method may return the old value.
2107
+ *
2108
+ * @param {ReactClass} publicInstance The instance that should rerender.
2109
+ * @param {object} completeState Next state.
2110
+ * @param {?function} callback Called after component is updated.
2111
+ * @param {?string} callerName name of the calling function in the public API.
2112
+ * @internal
2113
+ */ enqueueReplaceState: function enqueueReplaceState(publicInstance, completeState, callback, callerName) {
2114
+ warnNoop(publicInstance, "replaceState");
2115
+ },
2116
+ /**
2117
+ * Sets a subset of the state. This only exists because _pendingState is
2118
+ * internal. This provides a merging strategy that is not available to deep
2119
+ * properties which is confusing. TODO: Expose pendingState or don't use it
2120
+ * during the merge.
2121
+ *
2122
+ * @param {ReactClass} publicInstance The instance that should rerender.
2123
+ * @param {object} partialState Next partial state to be merged with state.
2124
+ * @param {?function} callback Called after component is updated.
2125
+ * @param {?string} Name of the calling function in the public API.
2126
+ * @internal
2127
+ */ enqueueSetState: function enqueueSetState(publicInstance, partialState, callback, callerName) {
2128
+ warnNoop(publicInstance, "setState");
2129
+ }
2130
+ };
2131
+ var assign = Object.assign;
2132
+ var emptyObject = {};
2133
+ {
2134
+ Object.freeze(emptyObject);
2135
+ }
2136
+ Component.prototype.isReactComponent = {};
2137
+ /**
2138
+ * Sets a subset of the state. Always use this to mutate
2139
+ * state. You should treat `this.state` as immutable.
2140
+ *
2141
+ * There is no guarantee that `this.state` will be immediately updated, so
2142
+ * accessing `this.state` after calling this method may return the old value.
2143
+ *
2144
+ * There is no guarantee that calls to `setState` will run synchronously,
2145
+ * as they may eventually be batched together. You can provide an optional
2146
+ * callback that will be executed when the call to setState is actually
2147
+ * completed.
2148
+ *
2149
+ * When a function is provided to setState, it will be called at some point in
2150
+ * the future (not synchronously). It will be called with the up to date
2151
+ * component arguments (state, props, context). These values can be different
2152
+ * from this.* because your function may be called after receiveProps but before
2153
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
2154
+ * assigned to this.
2155
+ *
2156
+ * @param {object|function} partialState Next partial state or function to
2157
+ * produce next partial state to be merged with current state.
2158
+ * @param {?function} callback Called after state is updated.
2159
+ * @final
2160
+ * @protected
2161
+ */ Component.prototype.setState = function(partialState, callback) {
2162
+ if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
2163
+ throw new Error("setState(...): takes an object of state variables to update or a " + "function which returns an object of state variables.");
2164
+ }
2165
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
2166
+ };
2167
+ /**
2168
+ * Forces an update. This should only be invoked when it is known with
2169
+ * certainty that we are **not** in a DOM transaction.
2170
+ *
2171
+ * You may want to call this when you know that some deeper aspect of the
2172
+ * component's state has changed but `setState` was not called.
2173
+ *
2174
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
2175
+ * `componentWillUpdate` and `componentDidUpdate`.
2176
+ *
2177
+ * @param {?function} callback Called after update is complete.
2178
+ * @final
2179
+ * @protected
2180
+ */ Component.prototype.forceUpdate = function(callback) {
2181
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
2182
+ };
2183
+ /**
2184
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
2185
+ * we would like to deprecate them, we're not going to move them over to this
2186
+ * modern base class. Instead, we define a getter that warns if it's accessed.
2187
+ */ {
2188
+ var deprecatedAPIs = {
2189
+ isMounted: [
2190
+ "isMounted",
2191
+ "Instead, make sure to clean up subscriptions and pending requests in " + "componentWillUnmount to prevent memory leaks."
2192
+ ],
2193
+ replaceState: [
2194
+ "replaceState",
2195
+ "Refactor your code to use setState instead (see " + "https://github.com/facebook/react/issues/3236)."
2196
+ ]
2197
+ };
2198
+ var defineDeprecationWarning = function defineDeprecationWarning(methodName, info) {
2199
+ Object.defineProperty(Component.prototype, methodName, {
2200
+ get: function get() {
2201
+ warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
2202
+ return undefined;
2203
+ }
2204
+ });
2205
+ };
2206
+ for(var fnName in deprecatedAPIs){
2207
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
2208
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
2209
+ }
2210
+ }
2211
+ }
2212
+ ComponentDummy.prototype = Component.prototype;
2213
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
2214
+ pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
2215
+ assign(pureComponentPrototype, Component.prototype);
2216
+ pureComponentPrototype.isPureReactComponent = true;
2217
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
2218
+ function getComponentNameFromType(type) {
2219
+ if (type == null) {
2220
+ // Host root, text node or just invalid type.
2221
+ return null;
2222
+ }
2223
+ {
2224
+ if (typeof type.tag === "number") {
2225
+ error("Received an unexpected object in getComponentNameFromType(). " + "This is likely a bug in React. Please file an issue.");
2226
+ }
2227
+ }
2228
+ if (typeof type === "function") {
2229
+ return type.displayName || type.name || null;
2230
+ }
2231
+ if (typeof type === "string") {
2232
+ return type;
2233
+ }
2234
+ switch(type){
2235
+ case REACT_FRAGMENT_TYPE:
2236
+ return "Fragment";
2237
+ case REACT_PORTAL_TYPE:
2238
+ return "Portal";
2239
+ case REACT_PROFILER_TYPE:
2240
+ return "Profiler";
2241
+ case REACT_STRICT_MODE_TYPE:
2242
+ return "StrictMode";
2243
+ case REACT_SUSPENSE_TYPE:
2244
+ return "Suspense";
2245
+ case REACT_SUSPENSE_LIST_TYPE:
2246
+ return "SuspenseList";
2247
+ }
2248
+ if (typeof type === "object") {
2249
+ switch(type.$$typeof){
2250
+ case REACT_CONTEXT_TYPE:
2251
+ var context = type;
2252
+ return getContextName(context) + ".Consumer";
2253
+ case REACT_PROVIDER_TYPE:
2254
+ var provider = type;
2255
+ return getContextName(provider._context) + ".Provider";
2256
+ case REACT_FORWARD_REF_TYPE:
2257
+ return getWrappedName(type, type.render, "ForwardRef");
2258
+ case REACT_MEMO_TYPE:
2259
+ var outerName = type.displayName || null;
2260
+ if (outerName !== null) {
2261
+ return outerName;
2262
+ }
2263
+ return getComponentNameFromType(type.type) || "Memo";
2264
+ case REACT_LAZY_TYPE:
2265
+ {
2266
+ var lazyComponent = type;
2267
+ var payload = lazyComponent._payload;
2268
+ var init = lazyComponent._init;
2269
+ try {
2270
+ return getComponentNameFromType(init(payload));
2271
+ } catch (x) {
2272
+ return null;
2273
+ }
2274
+ }
2275
+ }
2276
+ }
2277
+ return null;
2278
+ }
2279
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2280
+ var RESERVED_PROPS = {
2281
+ key: true,
2282
+ ref: true,
2283
+ __self: true,
2284
+ __source: true
2285
+ };
2286
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
2287
+ {
2288
+ didWarnAboutStringRefs = {};
2289
+ }
2290
+ /**
2291
+ * Factory method to create a new React element. This no longer adheres to
2292
+ * the class pattern, so do not use new to call it. Also, instanceof check
2293
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2294
+ * if something is a React Element.
2295
+ *
2296
+ * @param {*} type
2297
+ * @param {*} props
2298
+ * @param {*} key
2299
+ * @param {string|object} ref
2300
+ * @param {*} owner
2301
+ * @param {*} self A *temporary* helper to detect places where `this` is
2302
+ * different from the `owner` when React.createElement is called, so that we
2303
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
2304
+ * functions, and as long as `this` and owner are the same, there will be no
2305
+ * change in behavior.
2306
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
2307
+ * indicating filename, line number, and/or other information.
2308
+ * @internal
2309
+ */ var ReactElement = function ReactElement(type, key, ref, self, source, owner, props) {
2310
+ var element = {
2311
+ // This tag allows us to uniquely identify this as a React Element
2312
+ $$typeof: REACT_ELEMENT_TYPE,
2313
+ // Built-in properties that belong on the element
2314
+ type: type,
2315
+ key: key,
2316
+ ref: ref,
2317
+ props: props,
2318
+ // Record the component responsible for creating this element.
2319
+ _owner: owner
2320
+ };
2321
+ {
2322
+ // The validation flag is currently mutative. We put it on
2323
+ // an external backing store so that we can freeze the whole object.
2324
+ // This can be replaced with a WeakMap once they are implemented in
2325
+ // commonly used development environments.
2326
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
2327
+ // the validation flag non-enumerable (where possible, which should
2328
+ // include every environment we run tests in), so the test framework
2329
+ // ignores it.
2330
+ Object.defineProperty(element._store, "validated", {
2331
+ configurable: false,
2332
+ enumerable: false,
2333
+ writable: true,
2334
+ value: false
2335
+ }); // self and source are DEV only properties.
2336
+ Object.defineProperty(element, "_self", {
2337
+ configurable: false,
2338
+ enumerable: false,
2339
+ writable: false,
2340
+ value: self
2341
+ }); // Two elements created in two different places should be considered
2342
+ // equal for testing purposes and therefore we hide it from enumeration.
2343
+ Object.defineProperty(element, "_source", {
2344
+ configurable: false,
2345
+ enumerable: false,
2346
+ writable: false,
2347
+ value: source
2348
+ });
2349
+ if (Object.freeze) {
2350
+ Object.freeze(element.props);
2351
+ Object.freeze(element);
2352
+ }
2353
+ }
2354
+ return element;
2355
+ };
2356
+ var SEPARATOR = ".";
2357
+ var SUBSEPARATOR = ":";
2358
+ /**
2359
+ * TODO: Test that a single child and an array with one item have the same key
2360
+ * pattern.
2361
+ */ var didWarnAboutMaps = false;
2362
+ var userProvidedKeyEscapeRegex = /\/+/g;
2363
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
2364
+ var type = typeof children === "undefined" ? "undefined" : _typeof(children);
2365
+ if (type === "undefined" || type === "boolean") {
2366
+ // All of the above are perceived as null.
2367
+ children = null;
2368
+ }
2369
+ var invokeCallback = false;
2370
+ if (children === null) {
2371
+ invokeCallback = true;
2372
+ } else {
2373
+ switch(type){
2374
+ case "string":
2375
+ case "number":
2376
+ invokeCallback = true;
2377
+ break;
2378
+ case "object":
2379
+ switch(children.$$typeof){
2380
+ case REACT_ELEMENT_TYPE:
2381
+ case REACT_PORTAL_TYPE:
2382
+ invokeCallback = true;
2383
+ }
2384
+ }
2385
+ }
2386
+ if (invokeCallback) {
2387
+ var _child = children;
2388
+ var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
2389
+ // so that it's consistent if the number of children grows:
2390
+ var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
2391
+ if (isArray(mappedChild)) {
2392
+ var escapedChildKey = "";
2393
+ if (childKey != null) {
2394
+ escapedChildKey = escapeUserProvidedKey(childKey) + "/";
2395
+ }
2396
+ mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
2397
+ return c;
2398
+ });
2399
+ } else if (mappedChild != null) {
2400
+ if (isValidElement(mappedChild)) {
2401
+ {
2402
+ // The `if` statement here prevents auto-disabling of the safe
2403
+ // coercion ESLint rule, so we must manually disable it below.
2404
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
2405
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
2406
+ checkKeyStringCoercion(mappedChild.key);
2407
+ }
2408
+ }
2409
+ mappedChild = cloneAndReplaceKey(mappedChild, // traverseAllChildren used to do for objects as children
2410
+ escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // eslint-disable-next-line react-internal/safe-string-coercion
2411
+ escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey);
2412
+ }
2413
+ array.push(mappedChild);
2414
+ }
2415
+ return 1;
2416
+ }
2417
+ var child;
2418
+ var nextName;
2419
+ var subtreeCount = 0; // Count of children found in the current subtree.
2420
+ var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
2421
+ if (isArray(children)) {
2422
+ for(var i = 0; i < children.length; i++){
2423
+ child = children[i];
2424
+ nextName = nextNamePrefix + getElementKey(child, i);
2425
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
2426
+ }
2427
+ } else {
2428
+ var iteratorFn = getIteratorFn(children);
2429
+ if (typeof iteratorFn === "function") {
2430
+ var iterableChildren = children;
2431
+ {
2432
+ // Warn about using Maps as children
2433
+ if (iteratorFn === iterableChildren.entries) {
2434
+ if (!didWarnAboutMaps) {
2435
+ warn("Using Maps as children is not supported. " + "Use an array of keyed ReactElements instead.");
2436
+ }
2437
+ didWarnAboutMaps = true;
2438
+ }
2439
+ }
2440
+ var iterator = iteratorFn.call(iterableChildren);
2441
+ var step;
2442
+ var ii = 0;
2443
+ while(!(step = iterator.next()).done){
2444
+ child = step.value;
2445
+ nextName = nextNamePrefix + getElementKey(child, ii++);
2446
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
2447
+ }
2448
+ } else if (type === "object") {
2449
+ // eslint-disable-next-line react-internal/safe-string-coercion
2450
+ var childrenString = String(children);
2451
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). " + "If you meant to render a collection of children, use an array " + "instead.");
2452
+ }
2453
+ }
2454
+ return subtreeCount;
2455
+ }
2456
+ var Uninitialized = -1;
2457
+ var Pending = 0;
2458
+ var Resolved = 1;
2459
+ var Rejected = 2;
2460
+ var REACT_MODULE_REFERENCE;
2461
+ {
2462
+ REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
2463
+ }
2464
+ // Helpers to patch console.logs to avoid logging during side-effect free
2465
+ // replaying on render function. This currently only patches the object
2466
+ // lazily which won't cover if the log function was extracted eagerly.
2467
+ // We could also eagerly patch the method.
2468
+ var disabledDepth = 0;
2469
+ var prevLog;
2470
+ var prevInfo;
2471
+ var prevWarn;
2472
+ var prevError;
2473
+ var prevGroup;
2474
+ var prevGroupCollapsed;
2475
+ var prevGroupEnd;
2476
+ disabledLog.__reactDisabledLog = true;
2477
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
2478
+ var prefix;
2479
+ var reentry = false;
2480
+ var componentFrameCache;
2481
+ {
2482
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
2483
+ componentFrameCache = new PossiblyWeakMap();
2484
+ }
2485
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2486
+ if (type == null) {
2487
+ return "";
2488
+ }
2489
+ if (typeof type === "function") {
2490
+ {
2491
+ return describeNativeComponentFrame(type, shouldConstruct(type));
2492
+ }
2493
+ }
2494
+ if (typeof type === "string") {
2495
+ return describeBuiltInComponentFrame(type);
2496
+ }
2497
+ switch(type){
2498
+ case REACT_SUSPENSE_TYPE:
2499
+ return describeBuiltInComponentFrame("Suspense");
2500
+ case REACT_SUSPENSE_LIST_TYPE:
2501
+ return describeBuiltInComponentFrame("SuspenseList");
2502
+ }
2503
+ if (typeof type === "object") {
2504
+ switch(type.$$typeof){
2505
+ case REACT_FORWARD_REF_TYPE:
2506
+ return describeFunctionComponentFrame(type.render);
2507
+ case REACT_MEMO_TYPE:
2508
+ // Memo may contain any component type so we recursively resolve it.
2509
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2510
+ case REACT_LAZY_TYPE:
2511
+ {
2512
+ var lazyComponent = type;
2513
+ var payload = lazyComponent._payload;
2514
+ var init = lazyComponent._init;
2515
+ try {
2516
+ // Lazy may contain any component type so we recursively resolve it.
2517
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2518
+ } catch (x) {}
2519
+ }
2520
+ }
2521
+ }
2522
+ return "";
2523
+ }
2524
+ var loggedTypeFailures = {};
2525
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2526
+ var propTypesMisspellWarningShown;
2527
+ {
2528
+ propTypesMisspellWarningShown = false;
2529
+ }
2530
+ /**
2531
+ * Warn if there's no key explicitly set on dynamic arrays of children or
2532
+ * object keys are not valid. This allows us to keep track of children between
2533
+ * updates.
2534
+ */ var ownerHasKeyUseWarning = {};
2535
+ var didWarnAboutDeprecatedCreateFactory = false;
2536
+ var didWarnAboutMessageChannel = false;
2537
+ var enqueueTaskImpl = null;
2538
+ var actScopeDepth = 0;
2539
+ var didWarnNoAwaitAct = false;
2540
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
2541
+ {
2542
+ var queue = ReactCurrentActQueue.current;
2543
+ if (queue !== null) {
2544
+ try {
2545
+ flushActQueue(queue);
2546
+ enqueueTask(function() {
2547
+ if (queue.length === 0) {
2548
+ // No additional work was scheduled. Finish.
2549
+ ReactCurrentActQueue.current = null;
2550
+ resolve(returnValue);
2551
+ } else {
2552
+ // Keep flushing work until there's none left.
2553
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2554
+ }
2555
+ });
2556
+ } catch (error) {
2557
+ reject(error);
2558
+ }
2559
+ } else {
2560
+ resolve(returnValue);
2561
+ }
2562
+ }
2563
+ }
2564
+ var isFlushing = false;
2565
+ var createElement$1 = createElementWithValidation;
2566
+ var cloneElement$1 = cloneElementWithValidation;
2567
+ var createFactory = createFactoryWithValidation;
2568
+ var Children = {
2569
+ map: mapChildren,
2570
+ forEach: forEachChildren,
2571
+ count: countChildren,
2572
+ toArray: toArray,
2573
+ only: onlyChild
2574
+ };
2575
+ exports.Children = Children;
2576
+ exports.Component = Component;
2577
+ exports.Fragment = REACT_FRAGMENT_TYPE;
2578
+ exports.Profiler = REACT_PROFILER_TYPE;
2579
+ exports.PureComponent = PureComponent;
2580
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
2581
+ exports.Suspense = REACT_SUSPENSE_TYPE;
2582
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2583
+ exports.cloneElement = cloneElement$1;
2584
+ exports.createContext = createContext;
2585
+ exports.createElement = createElement$1;
2586
+ exports.createFactory = createFactory;
2587
+ exports.createRef = createRef;
2588
+ exports.forwardRef = forwardRef;
2589
+ exports.isValidElement = isValidElement;
2590
+ exports.lazy = lazy;
2591
+ exports.memo = memo;
2592
+ exports.startTransition = startTransition;
2593
+ exports.unstable_act = act;
2594
+ exports.useCallback = useCallback;
2595
+ exports.useContext = useContext;
2596
+ exports.useDebugValue = useDebugValue;
2597
+ exports.useDeferredValue = useDeferredValue;
2598
+ exports.useEffect = useEffect;
2599
+ exports.useId = useId;
2600
+ exports.useImperativeHandle = useImperativeHandle;
2601
+ exports.useInsertionEffect = useInsertionEffect;
2602
+ exports.useLayoutEffect = useLayoutEffect;
2603
+ exports.useMemo = useMemo;
2604
+ exports.useReducer = useReducer;
2605
+ exports.useRef = useRef;
2606
+ exports.useState = useState;
2607
+ exports.useSyncExternalStore = useSyncExternalStore;
2608
+ exports.useTransition = useTransition;
2609
+ exports.version = ReactVersion;
2610
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
2611
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2612
+ }
2613
+ })();
2614
+ }
2615
+ })(react_development, react_development.exports);
2616
+ return react_development.exports;
2617
+ }
2618
+
2619
+ (function(module) {
2620
+ if (process.env.NODE_ENV === "production") {
2621
+ module.exports = requireReact_production_min();
2622
+ } else {
2623
+ module.exports = requireReact_development();
2624
+ }
2625
+ })(react);
2626
+ var React = /*@__PURE__*/ getDefaultExportFromCjs(react.exports);
2627
+
2628
+ function _extends$1() {
2629
+ _extends$1 = Object.assign || function(target) {
2630
+ for(var i = 1; i < arguments.length; i++){
2631
+ var source = arguments[i];
2632
+ for(var key in source){
2633
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
2634
+ target[key] = source[key];
2635
+ }
2636
+ }
2637
+ }
2638
+ return target;
2639
+ };
2640
+ return _extends$1.apply(this, arguments);
2641
+ }
2642
+ function Box(param) {
2643
+ var children = param.children, smallText = param.smallText, padding = param.padding, flex = param.flex, style = param.style;
2644
+ var styles = _extends$1({
2645
+ flex: flex
2646
+ }, layoutPropsToStyles({
2647
+ padding: padding
2648
+ }), style);
2649
+ var className = classList({
2650
+ "jb-box": true,
2651
+ "jbx-small-text": smallText
2652
+ });
2653
+ return /*#__PURE__*/ React.createElement("div", {
2654
+ className: className,
2655
+ style: styles
2656
+ }, children);
2657
+ }
2658
+
2659
+ // @ts-nocheck
2660
+ var PROJECT_DATA = [
2661
+ {
2662
+ name: "PINTR",
2663
+ description: "Tool that turns your images into plotter-like line drawings",
2664
+ url: "https://javier.xyz/pintr/"
2665
+ },
2666
+ {
2667
+ name: "Visual Center",
2668
+ description: "Tool that help you visually center objects in a container",
2669
+ url: "https://javier.xyz/visual-center/"
2670
+ },
2671
+ {
2672
+ name: "Brutalita",
2673
+ description: "Grid based font editor and font. Create fonts in the browser and export OpenType files",
2674
+ url: "https://brutalita.com/"
2675
+ },
2676
+ {
2677
+ name: "Morphin",
2678
+ description: "Create animated CSS transitions. Add sprites and get the code ready to paste in your site",
2679
+ url: "https://javier.xyz/morphin/"
2680
+ },
2681
+ {
2682
+ name: "Droste Creator",
2683
+ description: "Create recursive images with the droste effect",
2684
+ url: "https://javier.xyz/droste-creator/"
2685
+ },
2686
+ {
2687
+ name: "Sombras.app",
2688
+ description: "Create art with shadows. Draw shadows and get 3D objects that project them.",
2689
+ url: "https://sombras.app/"
2690
+ },
2691
+ {
2692
+ name: "Cohesive Colors",
2693
+ description: "Tool that can help you to create cohesive color palettes",
2694
+ url: "https://javier.xyz/cohesive-colors/"
2695
+ }
2696
+ ];
2697
+ var projects = PROJECT_DATA.filter(function(project) {
2698
+ return !project.url.includes(document.location.pathname);
2699
+ });
2700
+ var projectIndex = PROJECT_DATA.findIndex(function(project) {
2701
+ return !project.url.includes(document.location.pathname);
2702
+ });
2703
+ var seed = Math.floor(new Date().getTime() / (60 * 60 * 1000)) + projectIndex;
2704
+ function MoreExperiments() {
2705
+ var items = new Array(4).fill("").map(function(_0, idx) {
2706
+ var project = projects[(seed + idx) % projects.length];
2707
+ return /*#__PURE__*/ React.createElement(Li, {
2708
+ key: project.url
2709
+ }, /*#__PURE__*/ React.createElement(A, {
2710
+ href: project.url
2711
+ }, project.name), ", ", project.description, ".");
2712
+ });
2713
+ return /*#__PURE__*/ React.createElement(react.exports.Fragment, null, /*#__PURE__*/ React.createElement(Text, null, "More experiments"), /*#__PURE__*/ React.createElement(Space, {
2714
+ h: 1
2715
+ }), /*#__PURE__*/ React.createElement(Ul, null, items));
2716
+ }
2717
+
2718
+ // @ts-nocheck
2719
+ function _extends() {
2720
+ _extends = Object.assign || function(target) {
2721
+ for(var i = 1; i < arguments.length; i++){
2722
+ var source = arguments[i];
2723
+ for(var key in source){
2724
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
2725
+ target[key] = source[key];
2726
+ }
2727
+ }
2728
+ }
2729
+ return target;
2730
+ };
2731
+ return _extends.apply(this, arguments);
2732
+ }
2733
+ function _objectWithoutPropertiesLoose(source, excluded) {
2734
+ if (source == null) return {};
2735
+ var target = {};
2736
+ var sourceKeys = Object.keys(source);
2737
+ var key, i;
2738
+ for(i = 0; i < sourceKeys.length; i++){
2739
+ key = sourceKeys[i];
2740
+ if (excluded.indexOf(key) >= 0) continue;
2741
+ target[key] = source[key];
2742
+ }
2743
+ return target;
2744
+ }
2745
+ var SIZE = getSettings().size;
2746
+ var BASE_RADIUS = SIZE / 3;
2747
+ var BASE_FONT_SIZE = SIZE;
2748
+ function getSettings() {
2749
+ var sizeSrc = getComputedStyle(document.documentElement).getPropertyValue("--size");
2750
+ return {
2751
+ size: parseInt(sizeSrc)
2752
+ };
2753
+ }
2754
+ function classList(classes) {
2755
+ if (Array.isArray(classes)) {
2756
+ return classes.filter(function(e) {
2757
+ return e;
2758
+ }).join(" ");
2759
+ } else {
2760
+ return Object.keys(classes).filter(function(e) {
2761
+ return classes[e];
2762
+ }).join(" ");
2763
+ }
2764
+ }
2765
+ function layoutPropsToStyles(param) {
2766
+ var padding = param.padding;
2767
+ var newStyles = {};
2768
+ if (padding) {
2769
+ newStyles.padding = "" + getSettings().size * padding + "px";
2770
+ }
2771
+ return newStyles;
2772
+ }
2773
+ function Component(className, styleSrc, config) {
2774
+ if (styleSrc === void 0) styleSrc = {};
2775
+ if (config === void 0) config = {};
2776
+ var _element = config.element, element = _element === void 0 ? "div" : _element, styleProps = config.styleProps;
2777
+ return function MakeComponent(_param) {
2778
+ var children = _param.children, _style = _param.style, style = _style === void 0 ? {} : _style, props = _objectWithoutPropertiesLoose(_param, [
2779
+ "children",
2780
+ "style"
2781
+ ]);
2782
+ var passProps = styleProps ? Object.keys(props).filter(function(e) {
2783
+ return !styleProps.includes(e);
2784
+ }).reduce(function(acc, p) {
2785
+ acc[p] = props[p];
2786
+ return acc;
2787
+ }, {}) : props;
2788
+ var calculatedStyle = typeof styleSrc === "function" ? styleSrc(props) : styleSrc;
2789
+ return /*#__PURE__*/ React.createElement(element, _extends({
2790
+ className: className,
2791
+ style: _extends({}, style, calculatedStyle)
2792
+ }, passProps), children);
2793
+ };
2794
+ }
2795
+ var Container = Component("jbx-container");
2796
+ var Text = Component("jbx-text");
2797
+ var SmallText = Component("jbx-small-text");
2798
+ var Button = Component("jbx-button", {}, {
2799
+ element: "button"
2800
+ });
2801
+ var Input = Component("jbx-input", null, {
2802
+ element: "input"
2803
+ });
2804
+ var Range = Component("jbx-range", null, {
2805
+ element: "input"
2806
+ });
2807
+ var HeaderH1 = Component("jbx-h" + 1, null, {
2808
+ element: "h1"
2809
+ });
2810
+ var HeaderH2 = Component("jbx-h" + 2, null, {
2811
+ element: "h2"
2812
+ });
2813
+ var HeaderH3 = Component("jbx-h" + 3, null, {
2814
+ element: "h3"
2815
+ });
2816
+ var HeaderH4 = Component("jbx-h" + 4, null, {
2817
+ element: "h4"
2818
+ });
2819
+ var HR = Component("jbx-hr", null, {
2820
+ element: "hr"
2821
+ });
2822
+ var MainHeader = function MainHeader(param) {
2823
+ var children = param.children, style = param.style;
2824
+ var content = String(children).split(" ");
2825
+ return /*#__PURE__*/ React.createElement(react.exports.Fragment, {}, content.map(function(word) {
2826
+ return /*#__PURE__*/ React.createElement(HeaderH1, {
2827
+ key: word,
2828
+ style: _extends({
2829
+ display: "inline-block",
2830
+ width: "auto",
2831
+ padding: "6px",
2832
+ margin: 0,
2833
+ backgroundColor: "var(--accent-color)"
2834
+ }, style)
2835
+ }, word);
2836
+ }));
2837
+ };
2838
+ var A = Component("jbx-a", null, {
2839
+ element: "a"
2840
+ });
2841
+ var Space = Component("jbx-space", function(props) {
2842
+ return {
2843
+ display: props.inline ? "inline-block" : "block",
2844
+ height: "" + SIZE * props.h + "px",
2845
+ width: "" + SIZE * props.w + "px"
2846
+ };
2847
+ });
2848
+ var Inline = Component("jbx-inline", function(param) {
2849
+ var v = param.v, h = param.h, gap = param.gap, _wrap = param.wrap, wrap = _wrap === void 0 ? false : _wrap;
2850
+ return {
2851
+ marginLeft: "" + h * SIZE + "px",
2852
+ marginRight: "" + h * SIZE + "px",
2853
+ marginTop: "" + v * SIZE + "px",
2854
+ marginBottom: "" + v * SIZE + "px",
2855
+ gap: "" + gap * SIZE + "px",
2856
+ flexWrap: wrap ? "wrap" : "no-wrap"
2857
+ };
2858
+ });
2859
+ var Stack = Component("jbx-stack", function(param) {
2860
+ var v = param.v, h = param.h, gap = param.gap;
2861
+ return {
2862
+ marginLeft: "" + h * SIZE + "px",
2863
+ marginRight: "" + h * SIZE + "px",
2864
+ marginTop: "" + v * SIZE + "px",
2865
+ marginBottom: "" + v * SIZE + "px",
2866
+ gap: "" + gap * SIZE + "px"
2867
+ };
2868
+ });
2869
+ var Dropzone = Component("jbx-dropzone");
2870
+ var Ul = Component("jbx-ul", {
2871
+ margin: 0,
2872
+ padding: "0 0 0 " + BASE_FONT_SIZE / 4 + "px"
2873
+ }, {
2874
+ element: "ul"
2875
+ });
2876
+ var Li = Component("jbx-li", {
2877
+ margin: "0 0 0 " + SIZE + "px",
2878
+ padding: "" + SIZE / 4 + "px 0"
2879
+ }, {
2880
+ element: "li"
2881
+ });
2882
+ var Tabs = Component("jbx-tabs");
2883
+ var Tab = Component("jbx-tabs--tab", function(param) {
2884
+ var info = param.info, active = param.active;
2885
+ return {
2886
+ userSelect: "none",
2887
+ cursor: "pointer",
2888
+ backgroundColor: active ? "#000" : info ? "#fff" : "#ecf0f1",
2889
+ color: active ? "#fff" : "#000",
2890
+ padding: SIZE / 2,
2891
+ paddingLeft: info ? 0 : SIZE / 2
2892
+ };
2893
+ }, {
2894
+ styleProps: [
2895
+ "info",
2896
+ "active"
2897
+ ]
2898
+ });
2899
+ var CodeSnippet = Component("jbx-code-snippet", null, {
2900
+ element: "pre"
2901
+ });
2902
+ var CodeTextarea = Component("jbx-code-area", null, {
2903
+ element: "textarea"
2904
+ });
2905
+ var CheckboxHidden = Component("jbx-checkbox-hidden", function(param) {
2906
+ var checked = param.checked;
2907
+ return {
2908
+ height: SIZE * 2 - 4,
2909
+ width: SIZE * 2 - 4,
2910
+ paddingTop: 2,
2911
+ paddingLeft: 2,
2912
+ backgroundColor: checked ? "var(--accent-color)" : "white",
2913
+ borderRadius: BASE_RADIUS,
2914
+ boxShadow: checked ? "inset rgba(0, 0, 0, 0.07) 0 0 0 1px" : "inset rgba(0, 0, 0, 0.33) 0 0 0 1.5px",
2915
+ cursor: "pointer"
2916
+ };
2917
+ });
2918
+ var Checkbox = function Checkbox(param) {
2919
+ var label = param.label, checked = param.checked, onChange = param.onChange;
2920
+ return /*#__PURE__*/ React.createElement(Inline, {
2921
+ onClick: function() {
2922
+ if (onChange) {
2923
+ onChange(!checked);
2924
+ }
2925
+ },
2926
+ style: {
2927
+ alignItems: "center",
2928
+ cursor: "pointer"
2929
+ }
2930
+ }, [
2931
+ /*#__PURE__*/ React.createElement(CheckboxHidden, {
2932
+ key: 0,
2933
+ checked: checked
2934
+ }, /*#__PURE__*/ React.createElement("svg", {
2935
+ xmlns: "http://www.w3.org/2000/svg",
2936
+ width: SIZE * 2 - 8,
2937
+ height: SIZE * 2 - 8,
2938
+ fill: "none",
2939
+ stroke: "currentColor",
2940
+ strokeLinecap: "round",
2941
+ strokeLinejoin: "round",
2942
+ strokeWidth: "2",
2943
+ className: "feather feather-check",
2944
+ viewBox: "0 0 24 24",
2945
+ color: checked ? "white" : "#ddd"
2946
+ }, /*#__PURE__*/ React.createElement("path", {
2947
+ d: "M20 6L9 17 4 12"
2948
+ }))),
2949
+ /*#__PURE__*/ React.createElement(Space, {
2950
+ key: 1,
2951
+ w: 0.5
2952
+ }),
2953
+ /*#__PURE__*/ React.createElement(Text, {
2954
+ key: 2,
2955
+ style: {
2956
+ userSelect: "none"
2957
+ }
2958
+ }, label)
2959
+ ]);
2960
+ };
2961
+ function Bullet(param) {
2962
+ var value = param.value;
2963
+ return /*#__PURE__*/ React.createElement("div", {
2964
+ className: "jbx-bullet-container"
2965
+ }, /*#__PURE__*/ React.createElement("div", {
2966
+ className: "jbx-bullet"
2967
+ }, value));
2968
+ }
2969
+
2970
+ exports.A = A;
2971
+ exports.Box = Box;
2972
+ exports.Bullet = Bullet;
2973
+ exports.Button = Button;
2974
+ exports.Checkbox = Checkbox;
2975
+ exports.CheckboxHidden = CheckboxHidden;
2976
+ exports.CodeSnippet = CodeSnippet;
2977
+ exports.CodeTextarea = CodeTextarea;
2978
+ exports.Component = Component;
2979
+ exports.Container = Container;
2980
+ exports.Dropzone = Dropzone;
2981
+ exports.HR = HR;
2982
+ exports.HeaderH1 = HeaderH1;
2983
+ exports.HeaderH2 = HeaderH2;
2984
+ exports.HeaderH3 = HeaderH3;
2985
+ exports.HeaderH4 = HeaderH4;
2986
+ exports.Inline = Inline;
2987
+ exports.Input = Input;
2988
+ exports.Li = Li;
2989
+ exports.MainHeader = MainHeader;
2990
+ exports.MoreExperiments = MoreExperiments;
2991
+ exports.Range = Range;
2992
+ exports.SmallText = SmallText;
2993
+ exports.Space = Space;
2994
+ exports.Stack = Stack;
2995
+ exports.Tab = Tab;
2996
+ exports.Tabs = Tabs;
2997
+ exports.Text = Text;
2998
+ exports.Ul = Ul;
2999
+ exports.classList = classList;
3000
+ exports.getSettings = getSettings;
3001
+ exports.layoutPropsToStyles = layoutPropsToStyles;