@edux-design/buttons 0.0.6 → 0.1.1

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.js CHANGED
@@ -102,6 +102,8 @@ var import_jsx_runtime2 = require("react/jsx-runtime");
102
102
  var Button = (0, import_react2.forwardRef)(
103
103
  ({
104
104
  children,
105
+ startIcon,
106
+ endIcon,
105
107
  size = "medium",
106
108
  isSecondary,
107
109
  isDanger,
@@ -112,19 +114,27 @@ var Button = (0, import_react2.forwardRef)(
112
114
  ...props
113
115
  }, ref) => {
114
116
  let variant = "primary";
115
- if (isBare) variant = "bare";
116
- if (isSecondary) variant = "secondary";
117
- if (isDanger) variant = "danger";
118
- if (disabled) variant = "disabled";
117
+ if (disabled) {
118
+ variant = "disabled";
119
+ } else if (isDanger && isBare) {
120
+ variant = "dangerBare";
121
+ } else if (isDanger) {
122
+ variant = "danger";
123
+ } else if (isSecondary) {
124
+ variant = "secondary";
125
+ } else if (isBare) {
126
+ variant = "bare";
127
+ }
119
128
  if (process.env.NODE_ENV !== "production") {
120
129
  const count = [isSecondary, isDanger, isBare].filter(Boolean).length;
121
- if (count > 1) {
130
+ const hasAllowedCombo = isDanger && isBare && count === 2;
131
+ if (count > 1 && !hasAllowedCombo) {
122
132
  console.warn(
123
133
  "[Button]: Multiple variant props passed. Using the highest priority only."
124
134
  );
125
135
  }
126
136
  }
127
- const defaults = "flex justify-center items-center focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out cursor-pointer";
137
+ const defaults = "flex justify-center items-center gap-8 focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out cursor-pointer";
128
138
  const fonts = "text-bold tracking-normal hover:underline hover:underline-offset-(--underline-offset-btn) active:underline active:underline-offset-(--underline-offset-btn)";
129
139
  const sizes = {
130
140
  small: "h-[36px] py-8 px-16 rounded-lg text-sm",
@@ -136,11 +146,12 @@ var Button = (0, import_react2.forwardRef)(
136
146
  primary: "border-2 border-border-primary-emphasis bg-bg-primary-base text-white hover:bg-border-focus hover:text-fg-base hover:border-border-emphasis hover:shadow-md active:bg-border-focus active:bg-bg-focus-overlay active:text-fg-base",
137
147
  secondary: "border-2 border-border-primary-base bg-bg-base text-fg-primary-emphasis hover:shadow-md hover:bg-bg-primary-subtle active:bg-bg-primary-subtle-90",
138
148
  bare: "bg-bg-base text-fg-primary-emphasis hover:bg-bg-minimal active:bg-bg-minimal-5",
149
+ dangerBare: "bg-bg-base text-fg-danger-emphasis hover:bg-bg-danger-subtle active:bg-bg-danger-subtle",
139
150
  danger: "bg-bg-danger-base border-2 border-border-danger-emphasis text-white hover:bg-bg-danger-base-5 active:bg-bg-danger-base-10",
140
151
  disabled: "border-2 border-border-subtle bg-bg-inactive text-fg-inactive hover:no-underline"
141
152
  };
142
153
  const STYLES = (0, import_utils2.cx)(defaults, sizes[size], width, fonts, variants[variant]);
143
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
154
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
144
155
  "button",
145
156
  {
146
157
  role: "button",
@@ -150,7 +161,11 @@ var Button = (0, import_react2.forwardRef)(
150
161
  className: STYLES,
151
162
  ref,
152
163
  ...props,
153
- children
164
+ children: [
165
+ startIcon,
166
+ children ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children }) : null,
167
+ endIcon
168
+ ]
154
169
  }
155
170
  );
156
171
  }
@@ -167,1723 +182,8 @@ var MenuButtonContext = (0, import_react3.createContext)();
167
182
  var import_utils3 = require("@edux-design/utils");
168
183
 
169
184
  // ../icons/dist/index.mjs
170
- var __create2 = Object.create;
171
- var __defProp2 = Object.defineProperty;
172
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
173
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
174
- var __getProtoOf2 = Object.getPrototypeOf;
175
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
176
- var __commonJS = (cb, mod) => function __require() {
177
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
178
- };
179
- var __copyProps2 = (to, from, except, desc) => {
180
- if (from && typeof from === "object" || typeof from === "function") {
181
- for (let key of __getOwnPropNames2(from))
182
- if (!__hasOwnProp2.call(to, key) && key !== except)
183
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
184
- }
185
- return to;
186
- };
187
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
188
- // If the importer is in node compatibility mode or this is not an ESM
189
- // file that has been converted to a CommonJS file using a Babel-
190
- // compatible transform (i.e. "__esModule" has not been set), then set
191
- // "default" to the CommonJS "module.exports" for node compatibility.
192
- !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
193
- mod
194
- ));
195
- var require_react_jsx_runtime_production = __commonJS({
196
- "../../node_modules/react/cjs/react-jsx-runtime.production.js"(exports2) {
197
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
198
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
199
- function jsxProd(type, config, maybeKey) {
200
- var key = null;
201
- void 0 !== maybeKey && (key = "" + maybeKey);
202
- void 0 !== config.key && (key = "" + config.key);
203
- if ("key" in config) {
204
- maybeKey = {};
205
- for (var propName in config)
206
- "key" !== propName && (maybeKey[propName] = config[propName]);
207
- } else maybeKey = config;
208
- config = maybeKey.ref;
209
- return {
210
- $$typeof: REACT_ELEMENT_TYPE,
211
- type,
212
- key,
213
- ref: void 0 !== config ? config : null,
214
- props: maybeKey
215
- };
216
- }
217
- exports2.Fragment = REACT_FRAGMENT_TYPE;
218
- exports2.jsx = jsxProd;
219
- exports2.jsxs = jsxProd;
220
- }
221
- });
222
- var require_react_production = __commonJS({
223
- "../../node_modules/react/cjs/react.production.js"(exports2) {
224
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
225
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
226
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
227
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
228
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
229
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
230
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
231
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
232
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
233
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
234
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
235
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
236
- function getIteratorFn(maybeIterable) {
237
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
238
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
239
- return "function" === typeof maybeIterable ? maybeIterable : null;
240
- }
241
- var ReactNoopUpdateQueue = {
242
- isMounted: function() {
243
- return false;
244
- },
245
- enqueueForceUpdate: function() {
246
- },
247
- enqueueReplaceState: function() {
248
- },
249
- enqueueSetState: function() {
250
- }
251
- };
252
- var assign = Object.assign;
253
- var emptyObject = {};
254
- function Component(props, context, updater) {
255
- this.props = props;
256
- this.context = context;
257
- this.refs = emptyObject;
258
- this.updater = updater || ReactNoopUpdateQueue;
259
- }
260
- Component.prototype.isReactComponent = {};
261
- Component.prototype.setState = function(partialState, callback) {
262
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
263
- throw Error(
264
- "takes an object of state variables to update or a function which returns an object of state variables."
265
- );
266
- this.updater.enqueueSetState(this, partialState, callback, "setState");
267
- };
268
- Component.prototype.forceUpdate = function(callback) {
269
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
270
- };
271
- function ComponentDummy() {
272
- }
273
- ComponentDummy.prototype = Component.prototype;
274
- function PureComponent(props, context, updater) {
275
- this.props = props;
276
- this.context = context;
277
- this.refs = emptyObject;
278
- this.updater = updater || ReactNoopUpdateQueue;
279
- }
280
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
281
- pureComponentPrototype.constructor = PureComponent;
282
- assign(pureComponentPrototype, Component.prototype);
283
- pureComponentPrototype.isPureReactComponent = true;
284
- var isArrayImpl = Array.isArray;
285
- var ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null };
286
- var hasOwnProperty = Object.prototype.hasOwnProperty;
287
- function ReactElement(type, key, self, source, owner, props) {
288
- self = props.ref;
289
- return {
290
- $$typeof: REACT_ELEMENT_TYPE,
291
- type,
292
- key,
293
- ref: void 0 !== self ? self : null,
294
- props
295
- };
296
- }
297
- function cloneAndReplaceKey(oldElement, newKey) {
298
- return ReactElement(
299
- oldElement.type,
300
- newKey,
301
- void 0,
302
- void 0,
303
- void 0,
304
- oldElement.props
305
- );
306
- }
307
- function isValidElement(object) {
308
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
309
- }
310
- function escape(key) {
311
- var escaperLookup = { "=": "=0", ":": "=2" };
312
- return "$" + key.replace(/[=:]/g, function(match) {
313
- return escaperLookup[match];
314
- });
315
- }
316
- var userProvidedKeyEscapeRegex = /\/+/g;
317
- function getElementKey(element, index) {
318
- return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
319
- }
320
- function noop$1() {
321
- }
322
- function resolveThenable(thenable) {
323
- switch (thenable.status) {
324
- case "fulfilled":
325
- return thenable.value;
326
- case "rejected":
327
- throw thenable.reason;
328
- default:
329
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
330
- function(fulfilledValue) {
331
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
332
- },
333
- function(error) {
334
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
335
- }
336
- )), thenable.status) {
337
- case "fulfilled":
338
- return thenable.value;
339
- case "rejected":
340
- throw thenable.reason;
341
- }
342
- }
343
- throw thenable;
344
- }
345
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
346
- var type = typeof children;
347
- if ("undefined" === type || "boolean" === type) children = null;
348
- var invokeCallback = false;
349
- if (null === children) invokeCallback = true;
350
- else
351
- switch (type) {
352
- case "bigint":
353
- case "string":
354
- case "number":
355
- invokeCallback = true;
356
- break;
357
- case "object":
358
- switch (children.$$typeof) {
359
- case REACT_ELEMENT_TYPE:
360
- case REACT_PORTAL_TYPE:
361
- invokeCallback = true;
362
- break;
363
- case REACT_LAZY_TYPE:
364
- return invokeCallback = children._init, mapIntoArray(
365
- invokeCallback(children._payload),
366
- array,
367
- escapedPrefix,
368
- nameSoFar,
369
- callback
370
- );
371
- }
372
- }
373
- if (invokeCallback)
374
- return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
375
- return c;
376
- })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
377
- callback,
378
- escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
379
- userProvidedKeyEscapeRegex,
380
- "$&/"
381
- ) + "/") + invokeCallback
382
- )), array.push(callback)), 1;
383
- invokeCallback = 0;
384
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
385
- if (isArrayImpl(children))
386
- for (var i = 0; i < children.length; i++)
387
- nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
388
- nameSoFar,
389
- array,
390
- escapedPrefix,
391
- type,
392
- callback
393
- );
394
- else if (i = getIteratorFn(children), "function" === typeof i)
395
- for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
396
- nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
397
- nameSoFar,
398
- array,
399
- escapedPrefix,
400
- type,
401
- callback
402
- );
403
- else if ("object" === type) {
404
- if ("function" === typeof children.then)
405
- return mapIntoArray(
406
- resolveThenable(children),
407
- array,
408
- escapedPrefix,
409
- nameSoFar,
410
- callback
411
- );
412
- array = String(children);
413
- throw Error(
414
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
415
- );
416
- }
417
- return invokeCallback;
418
- }
419
- function mapChildren(children, func, context) {
420
- if (null == children) return children;
421
- var result = [], count = 0;
422
- mapIntoArray(children, result, "", "", function(child) {
423
- return func.call(context, child, count++);
424
- });
425
- return result;
426
- }
427
- function lazyInitializer(payload) {
428
- if (-1 === payload._status) {
429
- var ctor = payload._result;
430
- ctor = ctor();
431
- ctor.then(
432
- function(moduleObject) {
433
- if (0 === payload._status || -1 === payload._status)
434
- payload._status = 1, payload._result = moduleObject;
435
- },
436
- function(error) {
437
- if (0 === payload._status || -1 === payload._status)
438
- payload._status = 2, payload._result = error;
439
- }
440
- );
441
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
442
- }
443
- if (1 === payload._status) return payload._result.default;
444
- throw payload._result;
445
- }
446
- var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
447
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
448
- var event = new window.ErrorEvent("error", {
449
- bubbles: true,
450
- cancelable: true,
451
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
452
- error
453
- });
454
- if (!window.dispatchEvent(event)) return;
455
- } else if ("object" === typeof process && "function" === typeof process.emit) {
456
- process.emit("uncaughtException", error);
457
- return;
458
- }
459
- console.error(error);
460
- };
461
- function noop() {
462
- }
463
- exports2.Children = {
464
- map: mapChildren,
465
- forEach: function(children, forEachFunc, forEachContext) {
466
- mapChildren(
467
- children,
468
- function() {
469
- forEachFunc.apply(this, arguments);
470
- },
471
- forEachContext
472
- );
473
- },
474
- count: function(children) {
475
- var n = 0;
476
- mapChildren(children, function() {
477
- n++;
478
- });
479
- return n;
480
- },
481
- toArray: function(children) {
482
- return mapChildren(children, function(child) {
483
- return child;
484
- }) || [];
485
- },
486
- only: function(children) {
487
- if (!isValidElement(children))
488
- throw Error(
489
- "React.Children.only expected to receive a single React element child."
490
- );
491
- return children;
492
- }
493
- };
494
- exports2.Component = Component;
495
- exports2.Fragment = REACT_FRAGMENT_TYPE;
496
- exports2.Profiler = REACT_PROFILER_TYPE;
497
- exports2.PureComponent = PureComponent;
498
- exports2.StrictMode = REACT_STRICT_MODE_TYPE;
499
- exports2.Suspense = REACT_SUSPENSE_TYPE;
500
- exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
501
- exports2.__COMPILER_RUNTIME = {
502
- __proto__: null,
503
- c: function(size) {
504
- return ReactSharedInternals.H.useMemoCache(size);
505
- }
506
- };
507
- exports2.cache = function(fn) {
508
- return function() {
509
- return fn.apply(null, arguments);
510
- };
511
- };
512
- exports2.cloneElement = function(element, config, children) {
513
- if (null === element || void 0 === element)
514
- throw Error(
515
- "The argument must be a React element, but you passed " + element + "."
516
- );
517
- var props = assign({}, element.props), key = element.key, owner = void 0;
518
- if (null != config)
519
- for (propName in void 0 !== config.ref && (owner = void 0), void 0 !== config.key && (key = "" + config.key), config)
520
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
521
- var propName = arguments.length - 2;
522
- if (1 === propName) props.children = children;
523
- else if (1 < propName) {
524
- for (var childArray = Array(propName), i = 0; i < propName; i++)
525
- childArray[i] = arguments[i + 2];
526
- props.children = childArray;
527
- }
528
- return ReactElement(element.type, key, void 0, void 0, owner, props);
529
- };
530
- exports2.createContext = function(defaultValue) {
531
- defaultValue = {
532
- $$typeof: REACT_CONTEXT_TYPE,
533
- _currentValue: defaultValue,
534
- _currentValue2: defaultValue,
535
- _threadCount: 0,
536
- Provider: null,
537
- Consumer: null
538
- };
539
- defaultValue.Provider = defaultValue;
540
- defaultValue.Consumer = {
541
- $$typeof: REACT_CONSUMER_TYPE,
542
- _context: defaultValue
543
- };
544
- return defaultValue;
545
- };
546
- exports2.createElement = function(type, config, children) {
547
- var propName, props = {}, key = null;
548
- if (null != config)
549
- for (propName in void 0 !== config.key && (key = "" + config.key), config)
550
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
551
- var childrenLength = arguments.length - 2;
552
- if (1 === childrenLength) props.children = children;
553
- else if (1 < childrenLength) {
554
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
555
- childArray[i] = arguments[i + 2];
556
- props.children = childArray;
557
- }
558
- if (type && type.defaultProps)
559
- for (propName in childrenLength = type.defaultProps, childrenLength)
560
- void 0 === props[propName] && (props[propName] = childrenLength[propName]);
561
- return ReactElement(type, key, void 0, void 0, null, props);
562
- };
563
- exports2.createRef = function() {
564
- return { current: null };
565
- };
566
- exports2.forwardRef = function(render) {
567
- return { $$typeof: REACT_FORWARD_REF_TYPE, render };
568
- };
569
- exports2.isValidElement = isValidElement;
570
- exports2.lazy = function(ctor) {
571
- return {
572
- $$typeof: REACT_LAZY_TYPE,
573
- _payload: { _status: -1, _result: ctor },
574
- _init: lazyInitializer
575
- };
576
- };
577
- exports2.memo = function(type, compare) {
578
- return {
579
- $$typeof: REACT_MEMO_TYPE,
580
- type,
581
- compare: void 0 === compare ? null : compare
582
- };
583
- };
584
- exports2.startTransition = function(scope) {
585
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
586
- ReactSharedInternals.T = currentTransition;
587
- try {
588
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
589
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
590
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
591
- } catch (error) {
592
- reportGlobalError(error);
593
- } finally {
594
- ReactSharedInternals.T = prevTransition;
595
- }
596
- };
597
- exports2.unstable_useCacheRefresh = function() {
598
- return ReactSharedInternals.H.useCacheRefresh();
599
- };
600
- exports2.use = function(usable) {
601
- return ReactSharedInternals.H.use(usable);
602
- };
603
- exports2.useActionState = function(action, initialState, permalink) {
604
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
605
- };
606
- exports2.useCallback = function(callback, deps) {
607
- return ReactSharedInternals.H.useCallback(callback, deps);
608
- };
609
- exports2.useContext = function(Context) {
610
- return ReactSharedInternals.H.useContext(Context);
611
- };
612
- exports2.useDebugValue = function() {
613
- };
614
- exports2.useDeferredValue = function(value, initialValue) {
615
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
616
- };
617
- exports2.useEffect = function(create, createDeps, update) {
618
- var dispatcher = ReactSharedInternals.H;
619
- if ("function" === typeof update)
620
- throw Error(
621
- "useEffect CRUD overload is not enabled in this build of React."
622
- );
623
- return dispatcher.useEffect(create, createDeps);
624
- };
625
- exports2.useId = function() {
626
- return ReactSharedInternals.H.useId();
627
- };
628
- exports2.useImperativeHandle = function(ref, create, deps) {
629
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
630
- };
631
- exports2.useInsertionEffect = function(create, deps) {
632
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
633
- };
634
- exports2.useLayoutEffect = function(create, deps) {
635
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
636
- };
637
- exports2.useMemo = function(create, deps) {
638
- return ReactSharedInternals.H.useMemo(create, deps);
639
- };
640
- exports2.useOptimistic = function(passthrough, reducer) {
641
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
642
- };
643
- exports2.useReducer = function(reducer, initialArg, init) {
644
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
645
- };
646
- exports2.useRef = function(initialValue) {
647
- return ReactSharedInternals.H.useRef(initialValue);
648
- };
649
- exports2.useState = function(initialState) {
650
- return ReactSharedInternals.H.useState(initialState);
651
- };
652
- exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
653
- return ReactSharedInternals.H.useSyncExternalStore(
654
- subscribe,
655
- getSnapshot,
656
- getServerSnapshot
657
- );
658
- };
659
- exports2.useTransition = function() {
660
- return ReactSharedInternals.H.useTransition();
661
- };
662
- exports2.version = "19.1.1";
663
- }
664
- });
665
- var require_react_development = __commonJS({
666
- "../../node_modules/react/cjs/react.development.js"(exports2, module2) {
667
- "production" !== process.env.NODE_ENV && (function() {
668
- function defineDeprecationWarning(methodName, info) {
669
- Object.defineProperty(Component.prototype, methodName, {
670
- get: function() {
671
- console.warn(
672
- "%s(...) is deprecated in plain JavaScript React classes. %s",
673
- info[0],
674
- info[1]
675
- );
676
- }
677
- });
678
- }
679
- function getIteratorFn(maybeIterable) {
680
- if (null === maybeIterable || "object" !== typeof maybeIterable)
681
- return null;
682
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
683
- return "function" === typeof maybeIterable ? maybeIterable : null;
684
- }
685
- function warnNoop(publicInstance, callerName) {
686
- publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
687
- var warningKey = publicInstance + "." + callerName;
688
- didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
689
- "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.",
690
- callerName,
691
- publicInstance
692
- ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
693
- }
694
- function Component(props, context, updater) {
695
- this.props = props;
696
- this.context = context;
697
- this.refs = emptyObject;
698
- this.updater = updater || ReactNoopUpdateQueue;
699
- }
700
- function ComponentDummy() {
701
- }
702
- function PureComponent(props, context, updater) {
703
- this.props = props;
704
- this.context = context;
705
- this.refs = emptyObject;
706
- this.updater = updater || ReactNoopUpdateQueue;
707
- }
708
- function testStringCoercion(value) {
709
- return "" + value;
710
- }
711
- function checkKeyStringCoercion(value) {
712
- try {
713
- testStringCoercion(value);
714
- var JSCompiler_inline_result = false;
715
- } catch (e) {
716
- JSCompiler_inline_result = true;
717
- }
718
- if (JSCompiler_inline_result) {
719
- JSCompiler_inline_result = console;
720
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
721
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
722
- JSCompiler_temp_const.call(
723
- JSCompiler_inline_result,
724
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
725
- JSCompiler_inline_result$jscomp$0
726
- );
727
- return testStringCoercion(value);
728
- }
729
- }
730
- function getComponentNameFromType(type) {
731
- if (null == type) return null;
732
- if ("function" === typeof type)
733
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
734
- if ("string" === typeof type) return type;
735
- switch (type) {
736
- case REACT_FRAGMENT_TYPE:
737
- return "Fragment";
738
- case REACT_PROFILER_TYPE:
739
- return "Profiler";
740
- case REACT_STRICT_MODE_TYPE:
741
- return "StrictMode";
742
- case REACT_SUSPENSE_TYPE:
743
- return "Suspense";
744
- case REACT_SUSPENSE_LIST_TYPE:
745
- return "SuspenseList";
746
- case REACT_ACTIVITY_TYPE:
747
- return "Activity";
748
- }
749
- if ("object" === typeof type)
750
- switch ("number" === typeof type.tag && console.error(
751
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
752
- ), type.$$typeof) {
753
- case REACT_PORTAL_TYPE:
754
- return "Portal";
755
- case REACT_CONTEXT_TYPE:
756
- return (type.displayName || "Context") + ".Provider";
757
- case REACT_CONSUMER_TYPE:
758
- return (type._context.displayName || "Context") + ".Consumer";
759
- case REACT_FORWARD_REF_TYPE:
760
- var innerType = type.render;
761
- type = type.displayName;
762
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
763
- return type;
764
- case REACT_MEMO_TYPE:
765
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
766
- case REACT_LAZY_TYPE:
767
- innerType = type._payload;
768
- type = type._init;
769
- try {
770
- return getComponentNameFromType(type(innerType));
771
- } catch (x) {
772
- }
773
- }
774
- return null;
775
- }
776
- function getTaskName(type) {
777
- if (type === REACT_FRAGMENT_TYPE) return "<>";
778
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
779
- return "<...>";
780
- try {
781
- var name = getComponentNameFromType(type);
782
- return name ? "<" + name + ">" : "<...>";
783
- } catch (x) {
784
- return "<...>";
785
- }
786
- }
787
- function getOwner() {
788
- var dispatcher = ReactSharedInternals.A;
789
- return null === dispatcher ? null : dispatcher.getOwner();
790
- }
791
- function UnknownOwner() {
792
- return Error("react-stack-top-frame");
793
- }
794
- function hasValidKey(config) {
795
- if (hasOwnProperty.call(config, "key")) {
796
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
797
- if (getter && getter.isReactWarning) return false;
798
- }
799
- return void 0 !== config.key;
800
- }
801
- function defineKeyPropWarningGetter(props, displayName) {
802
- function warnAboutAccessingKey() {
803
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
804
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
805
- displayName
806
- ));
807
- }
808
- warnAboutAccessingKey.isReactWarning = true;
809
- Object.defineProperty(props, "key", {
810
- get: warnAboutAccessingKey,
811
- configurable: true
812
- });
813
- }
814
- function elementRefGetterWithDeprecationWarning() {
815
- var componentName = getComponentNameFromType(this.type);
816
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
817
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
818
- ));
819
- componentName = this.props.ref;
820
- return void 0 !== componentName ? componentName : null;
821
- }
822
- function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
823
- self = props.ref;
824
- type = {
825
- $$typeof: REACT_ELEMENT_TYPE,
826
- type,
827
- key,
828
- props,
829
- _owner: owner
830
- };
831
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
832
- enumerable: false,
833
- get: elementRefGetterWithDeprecationWarning
834
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
835
- type._store = {};
836
- Object.defineProperty(type._store, "validated", {
837
- configurable: false,
838
- enumerable: false,
839
- writable: true,
840
- value: 0
841
- });
842
- Object.defineProperty(type, "_debugInfo", {
843
- configurable: false,
844
- enumerable: false,
845
- writable: true,
846
- value: null
847
- });
848
- Object.defineProperty(type, "_debugStack", {
849
- configurable: false,
850
- enumerable: false,
851
- writable: true,
852
- value: debugStack
853
- });
854
- Object.defineProperty(type, "_debugTask", {
855
- configurable: false,
856
- enumerable: false,
857
- writable: true,
858
- value: debugTask
859
- });
860
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
861
- return type;
862
- }
863
- function cloneAndReplaceKey(oldElement, newKey) {
864
- newKey = ReactElement(
865
- oldElement.type,
866
- newKey,
867
- void 0,
868
- void 0,
869
- oldElement._owner,
870
- oldElement.props,
871
- oldElement._debugStack,
872
- oldElement._debugTask
873
- );
874
- oldElement._store && (newKey._store.validated = oldElement._store.validated);
875
- return newKey;
876
- }
877
- function isValidElement(object) {
878
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
879
- }
880
- function escape(key) {
881
- var escaperLookup = { "=": "=0", ":": "=2" };
882
- return "$" + key.replace(/[=:]/g, function(match) {
883
- return escaperLookup[match];
884
- });
885
- }
886
- function getElementKey(element, index) {
887
- return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
888
- }
889
- function noop$1() {
890
- }
891
- function resolveThenable(thenable) {
892
- switch (thenable.status) {
893
- case "fulfilled":
894
- return thenable.value;
895
- case "rejected":
896
- throw thenable.reason;
897
- default:
898
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
899
- function(fulfilledValue) {
900
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
901
- },
902
- function(error) {
903
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
904
- }
905
- )), thenable.status) {
906
- case "fulfilled":
907
- return thenable.value;
908
- case "rejected":
909
- throw thenable.reason;
910
- }
911
- }
912
- throw thenable;
913
- }
914
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
915
- var type = typeof children;
916
- if ("undefined" === type || "boolean" === type) children = null;
917
- var invokeCallback = false;
918
- if (null === children) invokeCallback = true;
919
- else
920
- switch (type) {
921
- case "bigint":
922
- case "string":
923
- case "number":
924
- invokeCallback = true;
925
- break;
926
- case "object":
927
- switch (children.$$typeof) {
928
- case REACT_ELEMENT_TYPE:
929
- case REACT_PORTAL_TYPE:
930
- invokeCallback = true;
931
- break;
932
- case REACT_LAZY_TYPE:
933
- return invokeCallback = children._init, mapIntoArray(
934
- invokeCallback(children._payload),
935
- array,
936
- escapedPrefix,
937
- nameSoFar,
938
- callback
939
- );
940
- }
941
- }
942
- if (invokeCallback) {
943
- invokeCallback = children;
944
- callback = callback(invokeCallback);
945
- var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
946
- isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
947
- return c;
948
- })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
949
- callback,
950
- escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
951
- userProvidedKeyEscapeRegex,
952
- "$&/"
953
- ) + "/") + childKey
954
- ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
955
- return 1;
956
- }
957
- invokeCallback = 0;
958
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
959
- if (isArrayImpl(children))
960
- for (var i = 0; i < children.length; i++)
961
- nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
962
- nameSoFar,
963
- array,
964
- escapedPrefix,
965
- type,
966
- callback
967
- );
968
- else if (i = getIteratorFn(children), "function" === typeof i)
969
- for (i === children.entries && (didWarnAboutMaps || console.warn(
970
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
971
- ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
972
- nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
973
- nameSoFar,
974
- array,
975
- escapedPrefix,
976
- type,
977
- callback
978
- );
979
- else if ("object" === type) {
980
- if ("function" === typeof children.then)
981
- return mapIntoArray(
982
- resolveThenable(children),
983
- array,
984
- escapedPrefix,
985
- nameSoFar,
986
- callback
987
- );
988
- array = String(children);
989
- throw Error(
990
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
991
- );
992
- }
993
- return invokeCallback;
994
- }
995
- function mapChildren(children, func, context) {
996
- if (null == children) return children;
997
- var result = [], count = 0;
998
- mapIntoArray(children, result, "", "", function(child) {
999
- return func.call(context, child, count++);
1000
- });
1001
- return result;
1002
- }
1003
- function lazyInitializer(payload) {
1004
- if (-1 === payload._status) {
1005
- var ctor = payload._result;
1006
- ctor = ctor();
1007
- ctor.then(
1008
- function(moduleObject) {
1009
- if (0 === payload._status || -1 === payload._status)
1010
- payload._status = 1, payload._result = moduleObject;
1011
- },
1012
- function(error) {
1013
- if (0 === payload._status || -1 === payload._status)
1014
- payload._status = 2, payload._result = error;
1015
- }
1016
- );
1017
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
1018
- }
1019
- if (1 === payload._status)
1020
- return ctor = payload._result, void 0 === ctor && console.error(
1021
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
1022
- ctor
1023
- ), "default" in ctor || console.error(
1024
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
1025
- ctor
1026
- ), ctor.default;
1027
- throw payload._result;
1028
- }
1029
- function resolveDispatcher() {
1030
- var dispatcher = ReactSharedInternals.H;
1031
- null === dispatcher && console.error(
1032
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
1033
- );
1034
- return dispatcher;
1035
- }
1036
- function noop() {
1037
- }
1038
- function enqueueTask(task) {
1039
- if (null === enqueueTaskImpl)
1040
- try {
1041
- var requireString = ("require" + Math.random()).slice(0, 7);
1042
- enqueueTaskImpl = (module2 && module2[requireString]).call(
1043
- module2,
1044
- "timers"
1045
- ).setImmediate;
1046
- } catch (_err) {
1047
- enqueueTaskImpl = function(callback) {
1048
- false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
1049
- "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."
1050
- ));
1051
- var channel = new MessageChannel();
1052
- channel.port1.onmessage = callback;
1053
- channel.port2.postMessage(void 0);
1054
- };
1055
- }
1056
- return enqueueTaskImpl(task);
1057
- }
1058
- function aggregateErrors(errors) {
1059
- return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
1060
- }
1061
- function popActScope(prevActQueue, prevActScopeDepth) {
1062
- prevActScopeDepth !== actScopeDepth - 1 && console.error(
1063
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
1064
- );
1065
- actScopeDepth = prevActScopeDepth;
1066
- }
1067
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1068
- var queue = ReactSharedInternals.actQueue;
1069
- if (null !== queue)
1070
- if (0 !== queue.length)
1071
- try {
1072
- flushActQueue(queue);
1073
- enqueueTask(function() {
1074
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1075
- });
1076
- return;
1077
- } catch (error) {
1078
- ReactSharedInternals.thrownErrors.push(error);
1079
- }
1080
- else ReactSharedInternals.actQueue = null;
1081
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
1082
- }
1083
- function flushActQueue(queue) {
1084
- if (!isFlushing) {
1085
- isFlushing = true;
1086
- var i = 0;
1087
- try {
1088
- for (; i < queue.length; i++) {
1089
- var callback = queue[i];
1090
- do {
1091
- ReactSharedInternals.didUsePromise = false;
1092
- var continuation = callback(false);
1093
- if (null !== continuation) {
1094
- if (ReactSharedInternals.didUsePromise) {
1095
- queue[i] = callback;
1096
- queue.splice(0, i);
1097
- return;
1098
- }
1099
- callback = continuation;
1100
- } else break;
1101
- } while (1);
1102
- }
1103
- queue.length = 0;
1104
- } catch (error) {
1105
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
1106
- } finally {
1107
- isFlushing = false;
1108
- }
1109
- }
1110
- }
1111
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1112
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1113
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
1114
- isMounted: function() {
1115
- return false;
1116
- },
1117
- enqueueForceUpdate: function(publicInstance) {
1118
- warnNoop(publicInstance, "forceUpdate");
1119
- },
1120
- enqueueReplaceState: function(publicInstance) {
1121
- warnNoop(publicInstance, "replaceState");
1122
- },
1123
- enqueueSetState: function(publicInstance) {
1124
- warnNoop(publicInstance, "setState");
1125
- }
1126
- }, assign = Object.assign, emptyObject = {};
1127
- Object.freeze(emptyObject);
1128
- Component.prototype.isReactComponent = {};
1129
- Component.prototype.setState = function(partialState, callback) {
1130
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
1131
- throw Error(
1132
- "takes an object of state variables to update or a function which returns an object of state variables."
1133
- );
1134
- this.updater.enqueueSetState(this, partialState, callback, "setState");
1135
- };
1136
- Component.prototype.forceUpdate = function(callback) {
1137
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
1138
- };
1139
- var deprecatedAPIs = {
1140
- isMounted: [
1141
- "isMounted",
1142
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
1143
- ],
1144
- replaceState: [
1145
- "replaceState",
1146
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1147
- ]
1148
- }, fnName;
1149
- for (fnName in deprecatedAPIs)
1150
- deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1151
- ComponentDummy.prototype = Component.prototype;
1152
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
1153
- deprecatedAPIs.constructor = PureComponent;
1154
- assign(deprecatedAPIs, Component.prototype);
1155
- deprecatedAPIs.isPureReactComponent = true;
1156
- var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
1157
- H: null,
1158
- A: null,
1159
- T: null,
1160
- S: null,
1161
- V: null,
1162
- actQueue: null,
1163
- isBatchingLegacy: false,
1164
- didScheduleLegacyUpdate: false,
1165
- didUsePromise: false,
1166
- thrownErrors: [],
1167
- getCurrentStack: null,
1168
- recentlyCreatedOwnerStacks: 0
1169
- }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
1170
- return null;
1171
- };
1172
- deprecatedAPIs = {
1173
- react_stack_bottom_frame: function(callStackForError) {
1174
- return callStackForError();
1175
- }
1176
- };
1177
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1178
- var didWarnAboutElementRef = {};
1179
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
1180
- deprecatedAPIs,
1181
- UnknownOwner
1182
- )();
1183
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1184
- var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
1185
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
1186
- var event = new window.ErrorEvent("error", {
1187
- bubbles: true,
1188
- cancelable: true,
1189
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
1190
- error
1191
- });
1192
- if (!window.dispatchEvent(event)) return;
1193
- } else if ("object" === typeof process && "function" === typeof process.emit) {
1194
- process.emit("uncaughtException", error);
1195
- return;
1196
- }
1197
- console.error(error);
1198
- }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
1199
- queueMicrotask(function() {
1200
- return queueMicrotask(callback);
1201
- });
1202
- } : enqueueTask;
1203
- deprecatedAPIs = Object.freeze({
1204
- __proto__: null,
1205
- c: function(size) {
1206
- return resolveDispatcher().useMemoCache(size);
1207
- }
1208
- });
1209
- exports2.Children = {
1210
- map: mapChildren,
1211
- forEach: function(children, forEachFunc, forEachContext) {
1212
- mapChildren(
1213
- children,
1214
- function() {
1215
- forEachFunc.apply(this, arguments);
1216
- },
1217
- forEachContext
1218
- );
1219
- },
1220
- count: function(children) {
1221
- var n = 0;
1222
- mapChildren(children, function() {
1223
- n++;
1224
- });
1225
- return n;
1226
- },
1227
- toArray: function(children) {
1228
- return mapChildren(children, function(child) {
1229
- return child;
1230
- }) || [];
1231
- },
1232
- only: function(children) {
1233
- if (!isValidElement(children))
1234
- throw Error(
1235
- "React.Children.only expected to receive a single React element child."
1236
- );
1237
- return children;
1238
- }
1239
- };
1240
- exports2.Component = Component;
1241
- exports2.Fragment = REACT_FRAGMENT_TYPE;
1242
- exports2.Profiler = REACT_PROFILER_TYPE;
1243
- exports2.PureComponent = PureComponent;
1244
- exports2.StrictMode = REACT_STRICT_MODE_TYPE;
1245
- exports2.Suspense = REACT_SUSPENSE_TYPE;
1246
- exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
1247
- exports2.__COMPILER_RUNTIME = deprecatedAPIs;
1248
- exports2.act = function(callback) {
1249
- var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
1250
- actScopeDepth++;
1251
- var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
1252
- try {
1253
- var result = callback();
1254
- } catch (error) {
1255
- ReactSharedInternals.thrownErrors.push(error);
1256
- }
1257
- if (0 < ReactSharedInternals.thrownErrors.length)
1258
- throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1259
- if (null !== result && "object" === typeof result && "function" === typeof result.then) {
1260
- var thenable = result;
1261
- queueSeveralMicrotasks(function() {
1262
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1263
- "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 () => ...);"
1264
- ));
1265
- });
1266
- return {
1267
- then: function(resolve, reject) {
1268
- didAwaitActCall = true;
1269
- thenable.then(
1270
- function(returnValue) {
1271
- popActScope(prevActQueue, prevActScopeDepth);
1272
- if (0 === prevActScopeDepth) {
1273
- try {
1274
- flushActQueue(queue), enqueueTask(function() {
1275
- return recursivelyFlushAsyncActWork(
1276
- returnValue,
1277
- resolve,
1278
- reject
1279
- );
1280
- });
1281
- } catch (error$0) {
1282
- ReactSharedInternals.thrownErrors.push(error$0);
1283
- }
1284
- if (0 < ReactSharedInternals.thrownErrors.length) {
1285
- var _thrownError = aggregateErrors(
1286
- ReactSharedInternals.thrownErrors
1287
- );
1288
- ReactSharedInternals.thrownErrors.length = 0;
1289
- reject(_thrownError);
1290
- }
1291
- } else resolve(returnValue);
1292
- },
1293
- function(error) {
1294
- popActScope(prevActQueue, prevActScopeDepth);
1295
- 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
1296
- ReactSharedInternals.thrownErrors
1297
- ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
1298
- }
1299
- );
1300
- }
1301
- };
1302
- }
1303
- var returnValue$jscomp$0 = result;
1304
- popActScope(prevActQueue, prevActScopeDepth);
1305
- 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
1306
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1307
- "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
1308
- ));
1309
- }), ReactSharedInternals.actQueue = null);
1310
- if (0 < ReactSharedInternals.thrownErrors.length)
1311
- throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1312
- return {
1313
- then: function(resolve, reject) {
1314
- didAwaitActCall = true;
1315
- 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
1316
- return recursivelyFlushAsyncActWork(
1317
- returnValue$jscomp$0,
1318
- resolve,
1319
- reject
1320
- );
1321
- })) : resolve(returnValue$jscomp$0);
1322
- }
1323
- };
1324
- };
1325
- exports2.cache = function(fn) {
1326
- return function() {
1327
- return fn.apply(null, arguments);
1328
- };
1329
- };
1330
- exports2.captureOwnerStack = function() {
1331
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
1332
- return null === getCurrentStack ? null : getCurrentStack();
1333
- };
1334
- exports2.cloneElement = function(element, config, children) {
1335
- if (null === element || void 0 === element)
1336
- throw Error(
1337
- "The argument must be a React element, but you passed " + element + "."
1338
- );
1339
- var props = assign({}, element.props), key = element.key, owner = element._owner;
1340
- if (null != config) {
1341
- var JSCompiler_inline_result;
1342
- a: {
1343
- if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1344
- config,
1345
- "ref"
1346
- ).get) && JSCompiler_inline_result.isReactWarning) {
1347
- JSCompiler_inline_result = false;
1348
- break a;
1349
- }
1350
- JSCompiler_inline_result = void 0 !== config.ref;
1351
- }
1352
- JSCompiler_inline_result && (owner = getOwner());
1353
- hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
1354
- for (propName in config)
1355
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
1356
- }
1357
- var propName = arguments.length - 2;
1358
- if (1 === propName) props.children = children;
1359
- else if (1 < propName) {
1360
- JSCompiler_inline_result = Array(propName);
1361
- for (var i = 0; i < propName; i++)
1362
- JSCompiler_inline_result[i] = arguments[i + 2];
1363
- props.children = JSCompiler_inline_result;
1364
- }
1365
- props = ReactElement(
1366
- element.type,
1367
- key,
1368
- void 0,
1369
- void 0,
1370
- owner,
1371
- props,
1372
- element._debugStack,
1373
- element._debugTask
1374
- );
1375
- for (key = 2; key < arguments.length; key++)
1376
- owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1);
1377
- return props;
1378
- };
1379
- exports2.createContext = function(defaultValue) {
1380
- defaultValue = {
1381
- $$typeof: REACT_CONTEXT_TYPE,
1382
- _currentValue: defaultValue,
1383
- _currentValue2: defaultValue,
1384
- _threadCount: 0,
1385
- Provider: null,
1386
- Consumer: null
1387
- };
1388
- defaultValue.Provider = defaultValue;
1389
- defaultValue.Consumer = {
1390
- $$typeof: REACT_CONSUMER_TYPE,
1391
- _context: defaultValue
1392
- };
1393
- defaultValue._currentRenderer = null;
1394
- defaultValue._currentRenderer2 = null;
1395
- return defaultValue;
1396
- };
1397
- exports2.createElement = function(type, config, children) {
1398
- for (var i = 2; i < arguments.length; i++) {
1399
- var node = arguments[i];
1400
- isValidElement(node) && node._store && (node._store.validated = 1);
1401
- }
1402
- i = {};
1403
- node = null;
1404
- if (null != config)
1405
- for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
1406
- "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1407
- )), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config)
1408
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
1409
- var childrenLength = arguments.length - 2;
1410
- if (1 === childrenLength) i.children = children;
1411
- else if (1 < childrenLength) {
1412
- for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
1413
- childArray[_i] = arguments[_i + 2];
1414
- Object.freeze && Object.freeze(childArray);
1415
- i.children = childArray;
1416
- }
1417
- if (type && type.defaultProps)
1418
- for (propName in childrenLength = type.defaultProps, childrenLength)
1419
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1420
- node && defineKeyPropWarningGetter(
1421
- i,
1422
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1423
- );
1424
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1425
- return ReactElement(
1426
- type,
1427
- node,
1428
- void 0,
1429
- void 0,
1430
- getOwner(),
1431
- i,
1432
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1433
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1434
- );
1435
- };
1436
- exports2.createRef = function() {
1437
- var refObject = { current: null };
1438
- Object.seal(refObject);
1439
- return refObject;
1440
- };
1441
- exports2.forwardRef = function(render) {
1442
- null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
1443
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1444
- ) : "function" !== typeof render ? console.error(
1445
- "forwardRef requires a render function but was given %s.",
1446
- null === render ? "null" : typeof render
1447
- ) : 0 !== render.length && 2 !== render.length && console.error(
1448
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1449
- 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1450
- );
1451
- null != render && null != render.defaultProps && console.error(
1452
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1453
- );
1454
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
1455
- Object.defineProperty(elementType, "displayName", {
1456
- enumerable: false,
1457
- configurable: true,
1458
- get: function() {
1459
- return ownName;
1460
- },
1461
- set: function(name) {
1462
- ownName = name;
1463
- render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1464
- }
1465
- });
1466
- return elementType;
1467
- };
1468
- exports2.isValidElement = isValidElement;
1469
- exports2.lazy = function(ctor) {
1470
- return {
1471
- $$typeof: REACT_LAZY_TYPE,
1472
- _payload: { _status: -1, _result: ctor },
1473
- _init: lazyInitializer
1474
- };
1475
- };
1476
- exports2.memo = function(type, compare) {
1477
- null == type && console.error(
1478
- "memo: The first argument must be a component. Instead received: %s",
1479
- null === type ? "null" : typeof type
1480
- );
1481
- compare = {
1482
- $$typeof: REACT_MEMO_TYPE,
1483
- type,
1484
- compare: void 0 === compare ? null : compare
1485
- };
1486
- var ownName;
1487
- Object.defineProperty(compare, "displayName", {
1488
- enumerable: false,
1489
- configurable: true,
1490
- get: function() {
1491
- return ownName;
1492
- },
1493
- set: function(name) {
1494
- ownName = name;
1495
- type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1496
- }
1497
- });
1498
- return compare;
1499
- };
1500
- exports2.startTransition = function(scope) {
1501
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
1502
- ReactSharedInternals.T = currentTransition;
1503
- currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1504
- try {
1505
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1506
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1507
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
1508
- } catch (error) {
1509
- reportGlobalError(error);
1510
- } finally {
1511
- null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
1512
- "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."
1513
- )), ReactSharedInternals.T = prevTransition;
1514
- }
1515
- };
1516
- exports2.unstable_useCacheRefresh = function() {
1517
- return resolveDispatcher().useCacheRefresh();
1518
- };
1519
- exports2.use = function(usable) {
1520
- return resolveDispatcher().use(usable);
1521
- };
1522
- exports2.useActionState = function(action, initialState, permalink) {
1523
- return resolveDispatcher().useActionState(
1524
- action,
1525
- initialState,
1526
- permalink
1527
- );
1528
- };
1529
- exports2.useCallback = function(callback, deps) {
1530
- return resolveDispatcher().useCallback(callback, deps);
1531
- };
1532
- exports2.useContext = function(Context) {
1533
- var dispatcher = resolveDispatcher();
1534
- Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
1535
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1536
- );
1537
- return dispatcher.useContext(Context);
1538
- };
1539
- exports2.useDebugValue = function(value, formatterFn) {
1540
- return resolveDispatcher().useDebugValue(value, formatterFn);
1541
- };
1542
- exports2.useDeferredValue = function(value, initialValue) {
1543
- return resolveDispatcher().useDeferredValue(value, initialValue);
1544
- };
1545
- exports2.useEffect = function(create, createDeps, update) {
1546
- null == create && console.warn(
1547
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1548
- );
1549
- var dispatcher = resolveDispatcher();
1550
- if ("function" === typeof update)
1551
- throw Error(
1552
- "useEffect CRUD overload is not enabled in this build of React."
1553
- );
1554
- return dispatcher.useEffect(create, createDeps);
1555
- };
1556
- exports2.useId = function() {
1557
- return resolveDispatcher().useId();
1558
- };
1559
- exports2.useImperativeHandle = function(ref, create, deps) {
1560
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1561
- };
1562
- exports2.useInsertionEffect = function(create, deps) {
1563
- null == create && console.warn(
1564
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1565
- );
1566
- return resolveDispatcher().useInsertionEffect(create, deps);
1567
- };
1568
- exports2.useLayoutEffect = function(create, deps) {
1569
- null == create && console.warn(
1570
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1571
- );
1572
- return resolveDispatcher().useLayoutEffect(create, deps);
1573
- };
1574
- exports2.useMemo = function(create, deps) {
1575
- return resolveDispatcher().useMemo(create, deps);
1576
- };
1577
- exports2.useOptimistic = function(passthrough, reducer) {
1578
- return resolveDispatcher().useOptimistic(passthrough, reducer);
1579
- };
1580
- exports2.useReducer = function(reducer, initialArg, init) {
1581
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1582
- };
1583
- exports2.useRef = function(initialValue) {
1584
- return resolveDispatcher().useRef(initialValue);
1585
- };
1586
- exports2.useState = function(initialState) {
1587
- return resolveDispatcher().useState(initialState);
1588
- };
1589
- exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1590
- return resolveDispatcher().useSyncExternalStore(
1591
- subscribe,
1592
- getSnapshot,
1593
- getServerSnapshot
1594
- );
1595
- };
1596
- exports2.useTransition = function() {
1597
- return resolveDispatcher().useTransition();
1598
- };
1599
- exports2.version = "19.1.1";
1600
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1601
- })();
1602
- }
1603
- });
1604
- var require_react = __commonJS({
1605
- "../../node_modules/react/index.js"(exports2, module2) {
1606
- if (process.env.NODE_ENV === "production") {
1607
- module2.exports = require_react_production();
1608
- } else {
1609
- module2.exports = require_react_development();
1610
- }
1611
- }
1612
- });
1613
- var require_react_jsx_runtime_development = __commonJS({
1614
- "../../node_modules/react/cjs/react-jsx-runtime.development.js"(exports2) {
1615
- "production" !== process.env.NODE_ENV && (function() {
1616
- function getComponentNameFromType(type) {
1617
- if (null == type) return null;
1618
- if ("function" === typeof type)
1619
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
1620
- if ("string" === typeof type) return type;
1621
- switch (type) {
1622
- case REACT_FRAGMENT_TYPE:
1623
- return "Fragment";
1624
- case REACT_PROFILER_TYPE:
1625
- return "Profiler";
1626
- case REACT_STRICT_MODE_TYPE:
1627
- return "StrictMode";
1628
- case REACT_SUSPENSE_TYPE:
1629
- return "Suspense";
1630
- case REACT_SUSPENSE_LIST_TYPE:
1631
- return "SuspenseList";
1632
- case REACT_ACTIVITY_TYPE:
1633
- return "Activity";
1634
- }
1635
- if ("object" === typeof type)
1636
- switch ("number" === typeof type.tag && console.error(
1637
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1638
- ), type.$$typeof) {
1639
- case REACT_PORTAL_TYPE:
1640
- return "Portal";
1641
- case REACT_CONTEXT_TYPE:
1642
- return (type.displayName || "Context") + ".Provider";
1643
- case REACT_CONSUMER_TYPE:
1644
- return (type._context.displayName || "Context") + ".Consumer";
1645
- case REACT_FORWARD_REF_TYPE:
1646
- var innerType = type.render;
1647
- type = type.displayName;
1648
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
1649
- return type;
1650
- case REACT_MEMO_TYPE:
1651
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
1652
- case REACT_LAZY_TYPE:
1653
- innerType = type._payload;
1654
- type = type._init;
1655
- try {
1656
- return getComponentNameFromType(type(innerType));
1657
- } catch (x) {
1658
- }
1659
- }
1660
- return null;
1661
- }
1662
- function testStringCoercion(value) {
1663
- return "" + value;
1664
- }
1665
- function checkKeyStringCoercion(value) {
1666
- try {
1667
- testStringCoercion(value);
1668
- var JSCompiler_inline_result = false;
1669
- } catch (e) {
1670
- JSCompiler_inline_result = true;
1671
- }
1672
- if (JSCompiler_inline_result) {
1673
- JSCompiler_inline_result = console;
1674
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
1675
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1676
- JSCompiler_temp_const.call(
1677
- JSCompiler_inline_result,
1678
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1679
- JSCompiler_inline_result$jscomp$0
1680
- );
1681
- return testStringCoercion(value);
1682
- }
1683
- }
1684
- function getTaskName(type) {
1685
- if (type === REACT_FRAGMENT_TYPE) return "<>";
1686
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
1687
- return "<...>";
1688
- try {
1689
- var name = getComponentNameFromType(type);
1690
- return name ? "<" + name + ">" : "<...>";
1691
- } catch (x) {
1692
- return "<...>";
1693
- }
1694
- }
1695
- function getOwner() {
1696
- var dispatcher = ReactSharedInternals.A;
1697
- return null === dispatcher ? null : dispatcher.getOwner();
1698
- }
1699
- function UnknownOwner() {
1700
- return Error("react-stack-top-frame");
1701
- }
1702
- function hasValidKey(config) {
1703
- if (hasOwnProperty.call(config, "key")) {
1704
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1705
- if (getter && getter.isReactWarning) return false;
1706
- }
1707
- return void 0 !== config.key;
1708
- }
1709
- function defineKeyPropWarningGetter(props, displayName) {
1710
- function warnAboutAccessingKey() {
1711
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
1712
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
1713
- displayName
1714
- ));
1715
- }
1716
- warnAboutAccessingKey.isReactWarning = true;
1717
- Object.defineProperty(props, "key", {
1718
- get: warnAboutAccessingKey,
1719
- configurable: true
1720
- });
1721
- }
1722
- function elementRefGetterWithDeprecationWarning() {
1723
- var componentName = getComponentNameFromType(this.type);
1724
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
1725
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
1726
- ));
1727
- componentName = this.props.ref;
1728
- return void 0 !== componentName ? componentName : null;
1729
- }
1730
- function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
1731
- self = props.ref;
1732
- type = {
1733
- $$typeof: REACT_ELEMENT_TYPE,
1734
- type,
1735
- key,
1736
- props,
1737
- _owner: owner
1738
- };
1739
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
1740
- enumerable: false,
1741
- get: elementRefGetterWithDeprecationWarning
1742
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
1743
- type._store = {};
1744
- Object.defineProperty(type._store, "validated", {
1745
- configurable: false,
1746
- enumerable: false,
1747
- writable: true,
1748
- value: 0
1749
- });
1750
- Object.defineProperty(type, "_debugInfo", {
1751
- configurable: false,
1752
- enumerable: false,
1753
- writable: true,
1754
- value: null
1755
- });
1756
- Object.defineProperty(type, "_debugStack", {
1757
- configurable: false,
1758
- enumerable: false,
1759
- writable: true,
1760
- value: debugStack
1761
- });
1762
- Object.defineProperty(type, "_debugTask", {
1763
- configurable: false,
1764
- enumerable: false,
1765
- writable: true,
1766
- value: debugTask
1767
- });
1768
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1769
- return type;
1770
- }
1771
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
1772
- var children = config.children;
1773
- if (void 0 !== children)
1774
- if (isStaticChildren)
1775
- if (isArrayImpl(children)) {
1776
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
1777
- validateChildKeys(children[isStaticChildren]);
1778
- Object.freeze && Object.freeze(children);
1779
- } else
1780
- console.error(
1781
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1782
- );
1783
- else validateChildKeys(children);
1784
- if (hasOwnProperty.call(config, "key")) {
1785
- children = getComponentNameFromType(type);
1786
- var keys = Object.keys(config).filter(function(k) {
1787
- return "key" !== k;
1788
- });
1789
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
1790
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
1791
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
1792
- isStaticChildren,
1793
- children,
1794
- keys,
1795
- children
1796
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
1797
- }
1798
- children = null;
1799
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
1800
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
1801
- if ("key" in config) {
1802
- maybeKey = {};
1803
- for (var propName in config)
1804
- "key" !== propName && (maybeKey[propName] = config[propName]);
1805
- } else maybeKey = config;
1806
- children && defineKeyPropWarningGetter(
1807
- maybeKey,
1808
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1809
- );
1810
- return ReactElement(
1811
- type,
1812
- children,
1813
- self,
1814
- source,
1815
- getOwner(),
1816
- maybeKey,
1817
- debugStack,
1818
- debugTask
1819
- );
1820
- }
1821
- function validateChildKeys(node) {
1822
- "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
1823
- }
1824
- var React7 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1825
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React7.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1826
- return null;
1827
- };
1828
- React7 = {
1829
- react_stack_bottom_frame: function(callStackForError) {
1830
- return callStackForError();
1831
- }
1832
- };
1833
- var specialPropKeyWarningShown;
1834
- var didWarnAboutElementRef = {};
1835
- var unknownOwnerDebugStack = React7.react_stack_bottom_frame.bind(
1836
- React7,
1837
- UnknownOwner
1838
- )();
1839
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1840
- var didWarnAboutKeySpread = {};
1841
- exports2.Fragment = REACT_FRAGMENT_TYPE;
1842
- exports2.jsx = function(type, config, maybeKey, source, self) {
1843
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1844
- return jsxDEVImpl(
1845
- type,
1846
- config,
1847
- maybeKey,
1848
- false,
1849
- source,
1850
- self,
1851
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1852
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1853
- );
1854
- };
1855
- exports2.jsxs = function(type, config, maybeKey, source, self) {
1856
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1857
- return jsxDEVImpl(
1858
- type,
1859
- config,
1860
- maybeKey,
1861
- true,
1862
- source,
1863
- self,
1864
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1865
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1866
- );
1867
- };
1868
- })();
1869
- }
1870
- });
1871
- var require_jsx_runtime = __commonJS({
1872
- "../../node_modules/react/jsx-runtime.js"(exports2, module2) {
1873
- if (process.env.NODE_ENV === "production") {
1874
- module2.exports = require_react_jsx_runtime_production();
1875
- } else {
1876
- module2.exports = require_react_jsx_runtime_development();
1877
- }
1878
- }
1879
- });
1880
- var import_jsx_runtime3 = __toESM2(require_jsx_runtime());
1881
- var import_jsx_runtime22 = __toESM2(require_jsx_runtime());
1882
- var import_jsx_runtime32 = __toESM2(require_jsx_runtime());
1883
- var import_jsx_runtime4 = __toESM2(require_jsx_runtime());
1884
- var import_jsx_runtime5 = __toESM2(require_jsx_runtime());
1885
- var import_jsx_runtime6 = __toESM2(require_jsx_runtime());
1886
- var SvgChevron = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
185
+ var import_jsx_runtime3 = require("react/jsx-runtime");
186
+ var SvgChevron = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1887
187
  "svg",
1888
188
  {
1889
189
  xmlns: "http://www.w3.org/2000/svg",
@@ -1892,7 +192,7 @@ var SvgChevron = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1892
192
  fill: "none",
1893
193
  viewBox: "0 0 24 24",
1894
194
  ...props,
1895
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
195
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1896
196
  "path",
1897
197
  {
1898
198
  fill: "currentColor",
@@ -1904,60 +204,9 @@ var SvgChevron = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1904
204
  }
1905
205
  );
1906
206
  var Chevron_default = SvgChevron;
1907
- var import_jsx_runtime7 = __toESM2(require_jsx_runtime());
1908
- var import_jsx_runtime8 = __toESM2(require_jsx_runtime());
1909
- var import_jsx_runtime9 = __toESM2(require_jsx_runtime());
1910
- var import_jsx_runtime10 = __toESM2(require_jsx_runtime());
1911
- var import_jsx_runtime11 = __toESM2(require_jsx_runtime());
1912
- var import_jsx_runtime12 = __toESM2(require_jsx_runtime());
1913
- var import_jsx_runtime13 = __toESM2(require_jsx_runtime());
1914
- var import_jsx_runtime14 = __toESM2(require_jsx_runtime());
1915
- var import_jsx_runtime15 = __toESM2(require_jsx_runtime());
1916
- var import_jsx_runtime16 = __toESM2(require_jsx_runtime());
1917
- var import_jsx_runtime17 = __toESM2(require_jsx_runtime());
1918
- var import_jsx_runtime18 = __toESM2(require_jsx_runtime());
1919
- var import_jsx_runtime19 = __toESM2(require_jsx_runtime());
1920
- var import_jsx_runtime20 = __toESM2(require_jsx_runtime());
1921
- var import_jsx_runtime21 = __toESM2(require_jsx_runtime());
1922
- var import_jsx_runtime222 = __toESM2(require_jsx_runtime());
1923
- var import_jsx_runtime23 = __toESM2(require_jsx_runtime());
1924
- var import_jsx_runtime24 = __toESM2(require_jsx_runtime());
1925
- var import_jsx_runtime25 = __toESM2(require_jsx_runtime());
1926
- var import_jsx_runtime26 = __toESM2(require_jsx_runtime());
1927
- var import_jsx_runtime27 = __toESM2(require_jsx_runtime());
1928
- var import_jsx_runtime28 = __toESM2(require_jsx_runtime());
1929
- var import_jsx_runtime29 = __toESM2(require_jsx_runtime());
1930
- var import_jsx_runtime30 = __toESM2(require_jsx_runtime());
1931
- var import_jsx_runtime31 = __toESM2(require_jsx_runtime());
1932
- var import_jsx_runtime322 = __toESM2(require_jsx_runtime());
1933
- var import_jsx_runtime33 = __toESM2(require_jsx_runtime());
1934
- var import_jsx_runtime34 = __toESM2(require_jsx_runtime());
1935
- var import_jsx_runtime35 = __toESM2(require_jsx_runtime());
1936
- var import_jsx_runtime36 = __toESM2(require_jsx_runtime());
1937
- var import_jsx_runtime37 = __toESM2(require_jsx_runtime());
1938
- var import_jsx_runtime38 = __toESM2(require_jsx_runtime());
1939
- var import_jsx_runtime39 = __toESM2(require_jsx_runtime());
1940
- var import_jsx_runtime40 = __toESM2(require_jsx_runtime());
1941
- var import_jsx_runtime41 = __toESM2(require_jsx_runtime());
1942
- var import_jsx_runtime42 = __toESM2(require_jsx_runtime());
1943
- var import_jsx_runtime43 = __toESM2(require_jsx_runtime());
1944
- var import_jsx_runtime44 = __toESM2(require_jsx_runtime());
1945
- var import_jsx_runtime45 = __toESM2(require_jsx_runtime());
1946
- var import_jsx_runtime46 = __toESM2(require_jsx_runtime());
1947
- var import_jsx_runtime47 = __toESM2(require_jsx_runtime());
1948
- var import_jsx_runtime48 = __toESM2(require_jsx_runtime());
1949
- var import_jsx_runtime49 = __toESM2(require_jsx_runtime());
1950
- var import_jsx_runtime50 = __toESM2(require_jsx_runtime());
1951
- var import_jsx_runtime51 = __toESM2(require_jsx_runtime());
1952
- var import_jsx_runtime52 = __toESM2(require_jsx_runtime());
1953
- var import_jsx_runtime53 = __toESM2(require_jsx_runtime());
1954
- var import_jsx_runtime54 = __toESM2(require_jsx_runtime());
1955
- var import_jsx_runtime55 = __toESM2(require_jsx_runtime());
1956
- var import_jsx_runtime56 = __toESM2(require_jsx_runtime());
1957
- var import_jsx_runtime57 = __toESM2(require_jsx_runtime());
1958
207
 
1959
208
  // src/elements/MenuButton.jsx
1960
- var import_jsx_runtime58 = require("react/jsx-runtime");
209
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1961
210
  function MenuButton({ children, size }) {
1962
211
  const SPLIT_BUTTON_STYLES = (0, import_utils3.cx)(
1963
212
  "w-[36px] border-l-[1px] border-l-black flex flex-row justify-center items-center",
@@ -1966,16 +215,16 @@ function MenuButton({ children, size }) {
1966
215
  "h-[40px] py-2": size === "medium" || size === void 0
1967
216
  }
1968
217
  );
1969
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(MenuButtonContext.Provider, { value: true, children: [
1970
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: SPLIT_BUTTON_STYLES, children }),
1971
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Chevron_default, {})
218
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(MenuButtonContext.Provider, { value: true, children: [
219
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: SPLIT_BUTTON_STYLES, children }),
220
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Chevron_default, {})
1972
221
  ] });
1973
222
  }
1974
223
 
1975
224
  // src/elements/ButtonGroup.jsx
1976
225
  var import_react5 = __toESM(require("react"));
1977
226
  var import_utils4 = require("@edux-design/utils");
1978
- var import_jsx_runtime59 = require("react/jsx-runtime");
227
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1979
228
  var SIZE_STYLES = {
1980
229
  small: {
1981
230
  button: "text-xs px-12 py-6 rounded-md "
@@ -2161,15 +410,15 @@ var ButtonGroup = (0, import_react5.forwardRef)(function ButtonGroup2({
2161
410
  sizeStyles.button,
2162
411
  isStretched ? "flex-1" : "w-auto"
2163
412
  );
2164
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
413
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2165
414
  "div",
2166
415
  {
2167
416
  ...rest,
2168
417
  ref: setContainerRef,
2169
418
  role: "radiogroup",
2170
419
  className: rootClasses,
2171
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: trackClasses, children: [
2172
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
420
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: trackClasses, children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2173
422
  "span",
2174
423
  {
2175
424
  "aria-hidden": "true",
@@ -2231,7 +480,7 @@ var ButtonGroup = (0, import_react5.forwardRef)(function ButtonGroup2({
2231
480
  const hasStartAdornment = option.startAdornment !== void 0 && option.startAdornment !== null;
2232
481
  const endAdornment = option.endAdornment ?? option.endIcon;
2233
482
  const hasEndAdornment = endAdornment !== void 0 && endAdornment !== null;
2234
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
483
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2235
484
  "button",
2236
485
  {
2237
486
  ref: registerButtonRef(option.value),
@@ -2244,7 +493,7 @@ var ButtonGroup = (0, import_react5.forwardRef)(function ButtonGroup2({
2244
493
  onKeyDown: handleKeyDown,
2245
494
  "data-state": isActive ? "active" : "inactive",
2246
495
  children: [
2247
- hasStartAdornment && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
496
+ hasStartAdornment && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2248
497
  "span",
2249
498
  {
2250
499
  "aria-hidden": "true",
@@ -2252,8 +501,8 @@ var ButtonGroup = (0, import_react5.forwardRef)(function ButtonGroup2({
2252
501
  children: option.startAdornment
2253
502
  }
2254
503
  ),
2255
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "flex items-center gap-1 leading-none text-current", children: option.label ?? `Option ${index + 1}` }),
2256
- hasEndAdornment && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
504
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex items-center gap-1 leading-none text-current", children: option.label ?? `Option ${index + 1}` }),
505
+ hasEndAdornment && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2257
506
  "span",
2258
507
  {
2259
508
  "aria-hidden": "true",
@@ -2285,49 +534,3 @@ ButtonGroupItem.displayName = "ButtonGroupItem";
2285
534
  IconButton,
2286
535
  MenuButton
2287
536
  });
2288
- /*! Bundled license information:
2289
-
2290
- react/cjs/react-jsx-runtime.production.js:
2291
- (**
2292
- * @license React
2293
- * react-jsx-runtime.production.js
2294
- *
2295
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2296
- *
2297
- * This source code is licensed under the MIT license found in the
2298
- * LICENSE file in the root directory of this source tree.
2299
- *)
2300
-
2301
- react/cjs/react.production.js:
2302
- (**
2303
- * @license React
2304
- * react.production.js
2305
- *
2306
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2307
- *
2308
- * This source code is licensed under the MIT license found in the
2309
- * LICENSE file in the root directory of this source tree.
2310
- *)
2311
-
2312
- react/cjs/react.development.js:
2313
- (**
2314
- * @license React
2315
- * react.development.js
2316
- *
2317
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2318
- *
2319
- * This source code is licensed under the MIT license found in the
2320
- * LICENSE file in the root directory of this source tree.
2321
- *)
2322
-
2323
- react/cjs/react-jsx-runtime.development.js:
2324
- (**
2325
- * @license React
2326
- * react-jsx-runtime.development.js
2327
- *
2328
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2329
- *
2330
- * This source code is licensed under the MIT license found in the
2331
- * LICENSE file in the root directory of this source tree.
2332
- *)
2333
- */