visits-style 2.1.3 → 2.2.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.es.js CHANGED
@@ -1,1623 +1,150 @@
1
- import W from "clsx";
2
- import { default as hr } from "clsx";
3
- import { twMerge as _t } from "tailwind-merge";
4
- import { useId as je, useFloating as ye, autoUpdate as st, shift as it, flip as ut, offset as at, useTransitionStyles as he, useInteractions as Me, useClick as Et, FloatingOverlay as Pe, useHover as wt, useClientPoint as Rt, useDismiss as Tt } from "@floating-ui/react";
5
- function J(o, r) {
6
- return r ? _t(o, r) : o;
7
- }
8
- var Oe = { exports: {} }, pe = {};
9
- /**
10
- * @license React
11
- * react-jsx-runtime.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */
18
- var Xe;
19
- function Ot() {
20
- if (Xe) return pe;
21
- Xe = 1;
22
- var o = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
23
- function l(a, m, f) {
24
- var v = null;
25
- if (f !== void 0 && (v = "" + f), m.key !== void 0 && (v = "" + m.key), "key" in m) {
26
- f = {};
27
- for (var O in m)
28
- O !== "key" && (f[O] = m[O]);
29
- } else f = m;
30
- return m = f.ref, {
31
- $$typeof: o,
32
- type: a,
33
- key: v,
34
- ref: m !== void 0 ? m : null,
35
- props: f
36
- };
37
- }
38
- return pe.Fragment = r, pe.jsx = l, pe.jsxs = l, pe;
39
- }
40
- var me = {}, xe = { exports: {} }, j = {};
41
- /**
42
- * @license React
43
- * react.production.js
44
- *
45
- * Copyright (c) Meta Platforms, Inc. and affiliates.
46
- *
47
- * This source code is licensed under the MIT license found in the
48
- * LICENSE file in the root directory of this source tree.
49
- */
50
- var Ke;
51
- function xt() {
52
- if (Ke) return j;
53
- Ke = 1;
54
- var o = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), f = Symbol.for("react.consumer"), v = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), i = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), c = Symbol.iterator;
55
- function s(t) {
56
- return t === null || typeof t != "object" ? null : (t = c && t[c] || t["@@iterator"], typeof t == "function" ? t : null);
57
- }
58
- var b = {
59
- isMounted: function() {
60
- return !1;
61
- },
62
- enqueueForceUpdate: function() {
63
- },
64
- enqueueReplaceState: function() {
65
- },
66
- enqueueSetState: function() {
67
- }
68
- }, x = Object.assign, R = {};
69
- function $(t, u, E) {
70
- this.props = t, this.context = u, this.refs = R, this.updater = E || b;
71
- }
72
- $.prototype.isReactComponent = {}, $.prototype.setState = function(t, u) {
73
- if (typeof t != "object" && typeof t != "function" && t != null)
74
- throw Error(
75
- "takes an object of state variables to update or a function which returns an object of state variables."
76
- );
77
- this.updater.enqueueSetState(this, t, u, "setState");
78
- }, $.prototype.forceUpdate = function(t) {
79
- this.updater.enqueueForceUpdate(this, t, "forceUpdate");
80
- };
81
- function U() {
82
- }
83
- U.prototype = $.prototype;
84
- function F(t, u, E) {
85
- this.props = t, this.context = u, this.refs = R, this.updater = E || b;
86
- }
87
- var Y = F.prototype = new U();
88
- Y.constructor = F, x(Y, $.prototype), Y.isPureReactComponent = !0;
89
- var ee = Array.isArray, P = { H: null, A: null, T: null, S: null, V: null }, re = Object.prototype.hasOwnProperty;
90
- function se(t, u, E, w, S, H) {
91
- return E = H.ref, {
92
- $$typeof: o,
93
- type: t,
94
- key: u,
95
- ref: E !== void 0 ? E : null,
96
- props: H
97
- };
98
- }
99
- function V(t, u) {
100
- return se(
101
- t.type,
102
- u,
103
- void 0,
104
- void 0,
105
- void 0,
106
- t.props
107
- );
108
- }
109
- function X(t) {
110
- return typeof t == "object" && t !== null && t.$$typeof === o;
111
- }
112
- function ue(t) {
113
- var u = { "=": "=0", ":": "=2" };
114
- return "$" + t.replace(/[=:]/g, function(E) {
115
- return u[E];
116
- });
117
- }
118
- var N = /\/+/g;
119
- function G(t, u) {
120
- return typeof t == "object" && t !== null && t.key != null ? ue("" + t.key) : u.toString(36);
121
- }
122
- function ae() {
123
- }
124
- function ne(t) {
125
- switch (t.status) {
126
- case "fulfilled":
127
- return t.value;
128
- case "rejected":
129
- throw t.reason;
130
- default:
131
- switch (typeof t.status == "string" ? t.then(ae, ae) : (t.status = "pending", t.then(
132
- function(u) {
133
- t.status === "pending" && (t.status = "fulfilled", t.value = u);
134
- },
135
- function(u) {
136
- t.status === "pending" && (t.status = "rejected", t.reason = u);
137
- }
138
- )), t.status) {
139
- case "fulfilled":
140
- return t.value;
141
- case "rejected":
142
- throw t.reason;
143
- }
144
- }
145
- throw t;
146
- }
147
- function K(t, u, E, w, S) {
148
- var H = typeof t;
149
- (H === "undefined" || H === "boolean") && (t = null);
150
- var C = !1;
151
- if (t === null) C = !0;
152
- else
153
- switch (H) {
154
- case "bigint":
155
- case "string":
156
- case "number":
157
- C = !0;
158
- break;
159
- case "object":
160
- switch (t.$$typeof) {
161
- case o:
162
- case r:
163
- C = !0;
164
- break;
165
- case _:
166
- return C = t._init, K(
167
- C(t._payload),
168
- u,
169
- E,
170
- w,
171
- S
172
- );
173
- }
174
- }
175
- if (C)
176
- return S = S(t), C = w === "" ? "." + G(t, 0) : w, ee(S) ? (E = "", C != null && (E = C.replace(N, "$&/") + "/"), K(S, u, E, "", function(oe) {
177
- return oe;
178
- })) : S != null && (X(S) && (S = V(
179
- S,
180
- E + (S.key == null || t && t.key === S.key ? "" : ("" + S.key).replace(
181
- N,
182
- "$&/"
183
- ) + "/") + C
184
- )), u.push(S)), 1;
185
- C = 0;
186
- var te = w === "" ? "." : w + ":";
187
- if (ee(t))
188
- for (var A = 0; A < t.length; A++)
189
- w = t[A], H = te + G(w, A), C += K(
190
- w,
191
- u,
192
- E,
193
- H,
194
- S
195
- );
196
- else if (A = s(t), typeof A == "function")
197
- for (t = A.call(t), A = 0; !(w = t.next()).done; )
198
- w = w.value, H = te + G(w, A++), C += K(
199
- w,
200
- u,
201
- E,
202
- H,
203
- S
204
- );
205
- else if (H === "object") {
206
- if (typeof t.then == "function")
207
- return K(
208
- ne(t),
209
- u,
210
- E,
211
- w,
212
- S
213
- );
214
- throw u = String(t), Error(
215
- "Objects are not valid as a React child (found: " + (u === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : u) + "). If you meant to render a collection of children, use an array instead."
216
- );
217
- }
218
- return C;
219
- }
220
- function k(t, u, E) {
221
- if (t == null) return t;
222
- var w = [], S = 0;
223
- return K(t, w, "", "", function(H) {
224
- return u.call(E, H, S++);
225
- }), w;
226
- }
227
- function B(t) {
228
- if (t._status === -1) {
229
- var u = t._result;
230
- u = u(), u.then(
231
- function(E) {
232
- (t._status === 0 || t._status === -1) && (t._status = 1, t._result = E);
233
- },
234
- function(E) {
235
- (t._status === 0 || t._status === -1) && (t._status = 2, t._result = E);
236
- }
237
- ), t._status === -1 && (t._status = 0, t._result = u);
238
- }
239
- if (t._status === 1) return t._result.default;
240
- throw t._result;
241
- }
242
- var z = typeof reportError == "function" ? reportError : function(t) {
243
- if (typeof window == "object" && typeof window.ErrorEvent == "function") {
244
- var u = new window.ErrorEvent("error", {
245
- bubbles: !0,
246
- cancelable: !0,
247
- message: typeof t == "object" && t !== null && typeof t.message == "string" ? String(t.message) : String(t),
248
- error: t
249
- });
250
- if (!window.dispatchEvent(u)) return;
251
- } else if (typeof process == "object" && typeof process.emit == "function") {
252
- process.emit("uncaughtException", t);
253
- return;
254
- }
255
- console.error(t);
256
- };
257
- function ce() {
258
- }
259
- return j.Children = {
260
- map: k,
261
- forEach: function(t, u, E) {
262
- k(
263
- t,
264
- function() {
265
- u.apply(this, arguments);
266
- },
267
- E
268
- );
269
- },
270
- count: function(t) {
271
- var u = 0;
272
- return k(t, function() {
273
- u++;
274
- }), u;
275
- },
276
- toArray: function(t) {
277
- return k(t, function(u) {
278
- return u;
279
- }) || [];
280
- },
281
- only: function(t) {
282
- if (!X(t))
283
- throw Error(
284
- "React.Children.only expected to receive a single React element child."
285
- );
286
- return t;
287
- }
288
- }, j.Component = $, j.Fragment = l, j.Profiler = m, j.PureComponent = F, j.StrictMode = a, j.Suspense = p, j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = P, j.__COMPILER_RUNTIME = {
289
- __proto__: null,
290
- c: function(t) {
291
- return P.H.useMemoCache(t);
292
- }
293
- }, j.cache = function(t) {
294
- return function() {
295
- return t.apply(null, arguments);
296
- };
297
- }, j.cloneElement = function(t, u, E) {
298
- if (t == null)
299
- throw Error(
300
- "The argument must be a React element, but you passed " + t + "."
301
- );
302
- var w = x({}, t.props), S = t.key, H = void 0;
303
- if (u != null)
304
- for (C in u.ref !== void 0 && (H = void 0), u.key !== void 0 && (S = "" + u.key), u)
305
- !re.call(u, C) || C === "key" || C === "__self" || C === "__source" || C === "ref" && u.ref === void 0 || (w[C] = u[C]);
306
- var C = arguments.length - 2;
307
- if (C === 1) w.children = E;
308
- else if (1 < C) {
309
- for (var te = Array(C), A = 0; A < C; A++)
310
- te[A] = arguments[A + 2];
311
- w.children = te;
312
- }
313
- return se(t.type, S, void 0, void 0, H, w);
314
- }, j.createContext = function(t) {
315
- return t = {
316
- $$typeof: v,
317
- _currentValue: t,
318
- _currentValue2: t,
319
- _threadCount: 0,
320
- Provider: null,
321
- Consumer: null
322
- }, t.Provider = t, t.Consumer = {
323
- $$typeof: f,
324
- _context: t
325
- }, t;
326
- }, j.createElement = function(t, u, E) {
327
- var w, S = {}, H = null;
328
- if (u != null)
329
- for (w in u.key !== void 0 && (H = "" + u.key), u)
330
- re.call(u, w) && w !== "key" && w !== "__self" && w !== "__source" && (S[w] = u[w]);
331
- var C = arguments.length - 2;
332
- if (C === 1) S.children = E;
333
- else if (1 < C) {
334
- for (var te = Array(C), A = 0; A < C; A++)
335
- te[A] = arguments[A + 2];
336
- S.children = te;
337
- }
338
- if (t && t.defaultProps)
339
- for (w in C = t.defaultProps, C)
340
- S[w] === void 0 && (S[w] = C[w]);
341
- return se(t, H, void 0, void 0, null, S);
342
- }, j.createRef = function() {
343
- return { current: null };
344
- }, j.forwardRef = function(t) {
345
- return { $$typeof: O, render: t };
346
- }, j.isValidElement = X, j.lazy = function(t) {
347
- return {
348
- $$typeof: _,
349
- _payload: { _status: -1, _result: t },
350
- _init: B
351
- };
352
- }, j.memo = function(t, u) {
353
- return {
354
- $$typeof: i,
355
- type: t,
356
- compare: u === void 0 ? null : u
357
- };
358
- }, j.startTransition = function(t) {
359
- var u = P.T, E = {};
360
- P.T = E;
361
- try {
362
- var w = t(), S = P.S;
363
- S !== null && S(E, w), typeof w == "object" && w !== null && typeof w.then == "function" && w.then(ce, z);
364
- } catch (H) {
365
- z(H);
366
- } finally {
367
- P.T = u;
368
- }
369
- }, j.unstable_useCacheRefresh = function() {
370
- return P.H.useCacheRefresh();
371
- }, j.use = function(t) {
372
- return P.H.use(t);
373
- }, j.useActionState = function(t, u, E) {
374
- return P.H.useActionState(t, u, E);
375
- }, j.useCallback = function(t, u) {
376
- return P.H.useCallback(t, u);
377
- }, j.useContext = function(t) {
378
- return P.H.useContext(t);
379
- }, j.useDebugValue = function() {
380
- }, j.useDeferredValue = function(t, u) {
381
- return P.H.useDeferredValue(t, u);
382
- }, j.useEffect = function(t, u, E) {
383
- var w = P.H;
384
- if (typeof E == "function")
385
- throw Error(
386
- "useEffect CRUD overload is not enabled in this build of React."
387
- );
388
- return w.useEffect(t, u);
389
- }, j.useId = function() {
390
- return P.H.useId();
391
- }, j.useImperativeHandle = function(t, u, E) {
392
- return P.H.useImperativeHandle(t, u, E);
393
- }, j.useInsertionEffect = function(t, u) {
394
- return P.H.useInsertionEffect(t, u);
395
- }, j.useLayoutEffect = function(t, u) {
396
- return P.H.useLayoutEffect(t, u);
397
- }, j.useMemo = function(t, u) {
398
- return P.H.useMemo(t, u);
399
- }, j.useOptimistic = function(t, u) {
400
- return P.H.useOptimistic(t, u);
401
- }, j.useReducer = function(t, u, E) {
402
- return P.H.useReducer(t, u, E);
403
- }, j.useRef = function(t) {
404
- return P.H.useRef(t);
405
- }, j.useState = function(t) {
406
- return P.H.useState(t);
407
- }, j.useSyncExternalStore = function(t, u, E) {
408
- return P.H.useSyncExternalStore(
409
- t,
410
- u,
411
- E
412
- );
413
- }, j.useTransition = function() {
414
- return P.H.useTransition();
415
- }, j.version = "19.1.1", j;
416
- }
417
- var ge = { exports: {} };
418
- /**
419
- * @license React
420
- * react.development.js
421
- *
422
- * Copyright (c) Meta Platforms, Inc. and affiliates.
423
- *
424
- * This source code is licensed under the MIT license found in the
425
- * LICENSE file in the root directory of this source tree.
426
- */
427
- ge.exports;
428
- var Qe;
429
- function St() {
430
- return Qe || (Qe = 1, function(o, r) {
431
- process.env.NODE_ENV !== "production" && function() {
432
- function l(e, n) {
433
- Object.defineProperty(f.prototype, e, {
434
- get: function() {
435
- console.warn(
436
- "%s(...) is deprecated in plain JavaScript React classes. %s",
437
- n[0],
438
- n[1]
439
- );
440
- }
441
- });
442
- }
443
- function a(e) {
444
- return e === null || typeof e != "object" ? null : (e = be && e[be] || e["@@iterator"], typeof e == "function" ? e : null);
445
- }
446
- function m(e, n) {
447
- e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
448
- var g = e + "." + n;
449
- Ie[g] || (console.error(
450
- "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.",
451
- n,
452
- e
453
- ), Ie[g] = !0);
454
- }
455
- function f(e, n, g) {
456
- this.props = e, this.context = n, this.refs = Ae, this.updater = g || Le;
457
- }
458
- function v() {
459
- }
460
- function O(e, n, g) {
461
- this.props = e, this.context = n, this.refs = Ae, this.updater = g || Le;
462
- }
463
- function p(e) {
464
- return "" + e;
465
- }
466
- function i(e) {
467
- try {
468
- p(e);
469
- var n = !1;
470
- } catch {
471
- n = !0;
472
- }
473
- if (n) {
474
- n = console;
475
- var g = n.error, h = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
476
- return g.call(
477
- n,
478
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
479
- h
480
- ), p(e);
481
- }
482
- }
483
- function _(e) {
484
- if (e == null) return null;
485
- if (typeof e == "function")
486
- return e.$$typeof === gt ? null : e.displayName || e.name || null;
487
- if (typeof e == "string") return e;
488
- switch (e) {
489
- case t:
490
- return "Fragment";
491
- case E:
492
- return "Profiler";
493
- case u:
494
- return "StrictMode";
495
- case C:
496
- return "Suspense";
497
- case te:
498
- return "SuspenseList";
499
- case de:
500
- return "Activity";
501
- }
502
- if (typeof e == "object")
503
- switch (typeof e.tag == "number" && console.error(
504
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
505
- ), e.$$typeof) {
506
- case ce:
507
- return "Portal";
508
- case S:
509
- return (e.displayName || "Context") + ".Provider";
510
- case w:
511
- return (e._context.displayName || "Context") + ".Consumer";
512
- case H:
513
- var n = e.render;
514
- return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
515
- case A:
516
- return n = e.displayName || null, n !== null ? n : _(e.type) || "Memo";
517
- case oe:
518
- n = e._payload, e = e._init;
519
- try {
520
- return _(e(n));
521
- } catch {
522
- }
523
- }
524
- return null;
525
- }
526
- function c(e) {
527
- if (e === t) return "<>";
528
- if (typeof e == "object" && e !== null && e.$$typeof === oe)
529
- return "<...>";
530
- try {
531
- var n = _(e);
532
- return n ? "<" + n + ">" : "<...>";
533
- } catch {
534
- return "<...>";
535
- }
536
- }
537
- function s() {
538
- var e = I.A;
539
- return e === null ? null : e.getOwner();
540
- }
541
- function b() {
542
- return Error("react-stack-top-frame");
543
- }
544
- function x(e) {
545
- if (Ee.call(e, "key")) {
546
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
547
- if (n && n.isReactWarning) return !1;
548
- }
549
- return e.key !== void 0;
550
- }
551
- function R(e, n) {
552
- function g() {
553
- Ue || (Ue = !0, console.error(
554
- "%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)",
555
- n
556
- ));
557
- }
558
- g.isReactWarning = !0, Object.defineProperty(e, "key", {
559
- get: g,
560
- configurable: !0
561
- });
562
- }
563
- function $() {
564
- var e = _(this.type);
565
- return qe[e] || (qe[e] = !0, console.error(
566
- "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."
567
- )), e = this.props.ref, e !== void 0 ? e : null;
568
- }
569
- function U(e, n, g, h, T, L, M, q) {
570
- return g = L.ref, e = {
571
- $$typeof: z,
572
- type: e,
573
- key: n,
574
- props: L,
575
- _owner: T
576
- }, (g !== void 0 ? g : null) !== null ? Object.defineProperty(e, "ref", {
577
- enumerable: !1,
578
- get: $
579
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
580
- configurable: !1,
581
- enumerable: !1,
582
- writable: !0,
583
- value: 0
584
- }), Object.defineProperty(e, "_debugInfo", {
585
- configurable: !1,
586
- enumerable: !1,
587
- writable: !0,
588
- value: null
589
- }), Object.defineProperty(e, "_debugStack", {
590
- configurable: !1,
591
- enumerable: !1,
592
- writable: !0,
593
- value: M
594
- }), Object.defineProperty(e, "_debugTask", {
595
- configurable: !1,
596
- enumerable: !1,
597
- writable: !0,
598
- value: q
599
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
600
- }
601
- function F(e, n) {
602
- return n = U(
603
- e.type,
604
- n,
605
- void 0,
606
- void 0,
607
- e._owner,
608
- e.props,
609
- e._debugStack,
610
- e._debugTask
611
- ), e._store && (n._store.validated = e._store.validated), n;
612
- }
613
- function Y(e) {
614
- return typeof e == "object" && e !== null && e.$$typeof === z;
615
- }
616
- function ee(e) {
617
- var n = { "=": "=0", ":": "=2" };
618
- return "$" + e.replace(/[=:]/g, function(g) {
619
- return n[g];
620
- });
621
- }
622
- function P(e, n) {
623
- return typeof e == "object" && e !== null && e.key != null ? (i(e.key), ee("" + e.key)) : n.toString(36);
624
- }
625
- function re() {
626
- }
627
- function se(e) {
628
- switch (e.status) {
629
- case "fulfilled":
630
- return e.value;
631
- case "rejected":
632
- throw e.reason;
633
- default:
634
- switch (typeof e.status == "string" ? e.then(re, re) : (e.status = "pending", e.then(
635
- function(n) {
636
- e.status === "pending" && (e.status = "fulfilled", e.value = n);
637
- },
638
- function(n) {
639
- e.status === "pending" && (e.status = "rejected", e.reason = n);
640
- }
641
- )), e.status) {
642
- case "fulfilled":
643
- return e.value;
644
- case "rejected":
645
- throw e.reason;
646
- }
647
- }
648
- throw e;
649
- }
650
- function V(e, n, g, h, T) {
651
- var L = typeof e;
652
- (L === "undefined" || L === "boolean") && (e = null);
653
- var M = !1;
654
- if (e === null) M = !0;
655
- else
656
- switch (L) {
657
- case "bigint":
658
- case "string":
659
- case "number":
660
- M = !0;
661
- break;
662
- case "object":
663
- switch (e.$$typeof) {
664
- case z:
665
- case ce:
666
- M = !0;
667
- break;
668
- case oe:
669
- return M = e._init, V(
670
- M(e._payload),
671
- n,
672
- g,
673
- h,
674
- T
675
- );
676
- }
677
- }
678
- if (M) {
679
- M = e, T = T(M);
680
- var q = h === "" ? "." + P(M, 0) : h;
681
- return Ye(T) ? (g = "", q != null && (g = q.replace(ze, "$&/") + "/"), V(T, n, g, "", function(le) {
682
- return le;
683
- })) : T != null && (Y(T) && (T.key != null && (M && M.key === T.key || i(T.key)), g = F(
684
- T,
685
- g + (T.key == null || M && M.key === T.key ? "" : ("" + T.key).replace(
686
- ze,
687
- "$&/"
688
- ) + "/") + q
689
- ), h !== "" && M != null && Y(M) && M.key == null && M._store && !M._store.validated && (g._store.validated = 2), T = g), n.push(T)), 1;
690
- }
691
- if (M = 0, q = h === "" ? "." : h + ":", Ye(e))
692
- for (var D = 0; D < e.length; D++)
693
- h = e[D], L = q + P(h, D), M += V(
694
- h,
695
- n,
696
- g,
697
- L,
698
- T
699
- );
700
- else if (D = a(e), typeof D == "function")
701
- for (D === e.entries && (We || console.warn(
702
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
703
- ), We = !0), e = D.call(e), D = 0; !(h = e.next()).done; )
704
- h = h.value, L = q + P(h, D++), M += V(
705
- h,
706
- n,
707
- g,
708
- L,
709
- T
710
- );
711
- else if (L === "object") {
712
- if (typeof e.then == "function")
713
- return V(
714
- se(e),
715
- n,
716
- g,
717
- h,
718
- T
719
- );
720
- throw n = String(e), Error(
721
- "Objects are not valid as a React child (found: " + (n === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : n) + "). If you meant to render a collection of children, use an array instead."
722
- );
723
- }
724
- return M;
725
- }
726
- function X(e, n, g) {
727
- if (e == null) return e;
728
- var h = [], T = 0;
729
- return V(e, h, "", "", function(L) {
730
- return n.call(g, L, T++);
731
- }), h;
732
- }
733
- function ue(e) {
734
- if (e._status === -1) {
735
- var n = e._result;
736
- n = n(), n.then(
737
- function(g) {
738
- (e._status === 0 || e._status === -1) && (e._status = 1, e._result = g);
739
- },
740
- function(g) {
741
- (e._status === 0 || e._status === -1) && (e._status = 2, e._result = g);
742
- }
743
- ), e._status === -1 && (e._status = 0, e._result = n);
744
- }
745
- if (e._status === 1)
746
- return n = e._result, n === void 0 && console.error(
747
- `lazy: Expected the result of a dynamic import() call. Instead received: %s
748
-
749
- Your code should look like:
750
- const MyComponent = lazy(() => import('./MyComponent'))
751
-
752
- Did you accidentally put curly braces around the import?`,
753
- n
754
- ), "default" in n || console.error(
755
- `lazy: Expected the result of a dynamic import() call. Instead received: %s
756
-
757
- Your code should look like:
758
- const MyComponent = lazy(() => import('./MyComponent'))`,
759
- n
760
- ), n.default;
761
- throw e._result;
762
- }
763
- function N() {
764
- var e = I.H;
765
- return e === null && console.error(
766
- `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:
767
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
768
- 2. You might be breaking the Rules of Hooks
769
- 3. You might have more than one copy of React in the same app
770
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
771
- ), e;
772
- }
773
- function G() {
774
- }
775
- function ae(e) {
776
- if (we === null)
777
- try {
778
- var n = ("require" + Math.random()).slice(0, 7);
779
- we = (o && o[n]).call(
780
- o,
781
- "timers"
782
- ).setImmediate;
783
- } catch {
784
- we = function(h) {
785
- Be === !1 && (Be = !0, typeof MessageChannel > "u" && console.error(
786
- "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."
787
- ));
788
- var T = new MessageChannel();
789
- T.port1.onmessage = h, T.port2.postMessage(void 0);
790
- };
791
- }
792
- return we(e);
793
- }
794
- function ne(e) {
795
- return 1 < e.length && typeof AggregateError == "function" ? new AggregateError(e) : e[0];
796
- }
797
- function K(e, n) {
798
- n !== Re - 1 && console.error(
799
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
800
- ), Re = n;
801
- }
802
- function k(e, n, g) {
803
- var h = I.actQueue;
804
- if (h !== null)
805
- if (h.length !== 0)
806
- try {
807
- B(h), ae(function() {
808
- return k(e, n, g);
809
- });
810
- return;
811
- } catch (T) {
812
- I.thrownErrors.push(T);
813
- }
814
- else I.actQueue = null;
815
- 0 < I.thrownErrors.length ? (h = ne(I.thrownErrors), I.thrownErrors.length = 0, g(h)) : n(e);
816
- }
817
- function B(e) {
818
- if (!Ne) {
819
- Ne = !0;
820
- var n = 0;
821
- try {
822
- for (; n < e.length; n++) {
823
- var g = e[n];
824
- do {
825
- I.didUsePromise = !1;
826
- var h = g(!1);
827
- if (h !== null) {
828
- if (I.didUsePromise) {
829
- e[n] = g, e.splice(0, n);
830
- return;
831
- }
832
- g = h;
833
- } else break;
834
- } while (!0);
835
- }
836
- e.length = 0;
837
- } catch (T) {
838
- e.splice(0, n + 1), I.thrownErrors.push(T);
839
- } finally {
840
- Ne = !1;
841
- }
842
- }
843
- }
844
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
845
- var z = Symbol.for("react.transitional.element"), ce = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), S = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), te = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), oe = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), be = Symbol.iterator, Ie = {}, Le = {
846
- isMounted: function() {
847
- return !1;
848
- },
849
- enqueueForceUpdate: function(e) {
850
- m(e, "forceUpdate");
851
- },
852
- enqueueReplaceState: function(e) {
853
- m(e, "replaceState");
854
- },
855
- enqueueSetState: function(e) {
856
- m(e, "setState");
857
- }
858
- }, $e = Object.assign, Ae = {};
859
- Object.freeze(Ae), f.prototype.isReactComponent = {}, f.prototype.setState = function(e, n) {
860
- if (typeof e != "object" && typeof e != "function" && e != null)
861
- throw Error(
862
- "takes an object of state variables to update or a function which returns an object of state variables."
863
- );
864
- this.updater.enqueueSetState(this, e, n, "setState");
865
- }, f.prototype.forceUpdate = function(e) {
866
- this.updater.enqueueForceUpdate(this, e, "forceUpdate");
867
- };
868
- var ie = {
869
- isMounted: [
870
- "isMounted",
871
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
872
- ],
873
- replaceState: [
874
- "replaceState",
875
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
876
- ]
877
- }, _e;
878
- for (_e in ie)
879
- ie.hasOwnProperty(_e) && l(_e, ie[_e]);
880
- v.prototype = f.prototype, ie = O.prototype = new v(), ie.constructor = O, $e(ie, f.prototype), ie.isPureReactComponent = !0;
881
- var Ye = Array.isArray, gt = Symbol.for("react.client.reference"), I = {
882
- H: null,
883
- A: null,
884
- T: null,
885
- S: null,
886
- V: null,
887
- actQueue: null,
888
- isBatchingLegacy: !1,
889
- didScheduleLegacyUpdate: !1,
890
- didUsePromise: !1,
891
- thrownErrors: [],
892
- getCurrentStack: null,
893
- recentlyCreatedOwnerStacks: 0
894
- }, Ee = Object.prototype.hasOwnProperty, He = console.createTask ? console.createTask : function() {
895
- return null;
896
- };
897
- ie = {
898
- react_stack_bottom_frame: function(e) {
899
- return e();
900
- }
901
- };
902
- var Ue, Fe, qe = {}, yt = ie.react_stack_bottom_frame.bind(
903
- ie,
904
- b
905
- )(), ht = He(c(b)), We = !1, ze = /\/+/g, Ge = typeof reportError == "function" ? reportError : function(e) {
906
- if (typeof window == "object" && typeof window.ErrorEvent == "function") {
907
- var n = new window.ErrorEvent("error", {
908
- bubbles: !0,
909
- cancelable: !0,
910
- message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
911
- error: e
912
- });
913
- if (!window.dispatchEvent(n)) return;
914
- } else if (typeof process == "object" && typeof process.emit == "function") {
915
- process.emit("uncaughtException", e);
916
- return;
917
- }
918
- console.error(e);
919
- }, Be = !1, we = null, Re = 0, Te = !1, Ne = !1, Ve = typeof queueMicrotask == "function" ? function(e) {
920
- queueMicrotask(function() {
921
- return queueMicrotask(e);
922
- });
923
- } : ae;
924
- ie = Object.freeze({
925
- __proto__: null,
926
- c: function(e) {
927
- return N().useMemoCache(e);
928
- }
929
- }), r.Children = {
930
- map: X,
931
- forEach: function(e, n, g) {
932
- X(
933
- e,
934
- function() {
935
- n.apply(this, arguments);
936
- },
937
- g
938
- );
939
- },
940
- count: function(e) {
941
- var n = 0;
942
- return X(e, function() {
943
- n++;
944
- }), n;
945
- },
946
- toArray: function(e) {
947
- return X(e, function(n) {
948
- return n;
949
- }) || [];
950
- },
951
- only: function(e) {
952
- if (!Y(e))
953
- throw Error(
954
- "React.Children.only expected to receive a single React element child."
955
- );
956
- return e;
957
- }
958
- }, r.Component = f, r.Fragment = t, r.Profiler = E, r.PureComponent = O, r.StrictMode = u, r.Suspense = C, r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = I, r.__COMPILER_RUNTIME = ie, r.act = function(e) {
959
- var n = I.actQueue, g = Re;
960
- Re++;
961
- var h = I.actQueue = n !== null ? n : [], T = !1;
962
- try {
963
- var L = e();
964
- } catch (D) {
965
- I.thrownErrors.push(D);
966
- }
967
- if (0 < I.thrownErrors.length)
968
- throw K(n, g), e = ne(I.thrownErrors), I.thrownErrors.length = 0, e;
969
- if (L !== null && typeof L == "object" && typeof L.then == "function") {
970
- var M = L;
971
- return Ve(function() {
972
- T || Te || (Te = !0, console.error(
973
- "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 () => ...);"
974
- ));
975
- }), {
976
- then: function(D, le) {
977
- T = !0, M.then(
978
- function(fe) {
979
- if (K(n, g), g === 0) {
980
- try {
981
- B(h), ae(function() {
982
- return k(
983
- fe,
984
- D,
985
- le
986
- );
987
- });
988
- } catch (bt) {
989
- I.thrownErrors.push(bt);
990
- }
991
- if (0 < I.thrownErrors.length) {
992
- var vt = ne(
993
- I.thrownErrors
994
- );
995
- I.thrownErrors.length = 0, le(vt);
996
- }
997
- } else D(fe);
998
- },
999
- function(fe) {
1000
- K(n, g), 0 < I.thrownErrors.length && (fe = ne(
1001
- I.thrownErrors
1002
- ), I.thrownErrors.length = 0), le(fe);
1003
- }
1004
- );
1005
- }
1006
- };
1007
- }
1008
- var q = L;
1009
- if (K(n, g), g === 0 && (B(h), h.length !== 0 && Ve(function() {
1010
- T || Te || (Te = !0, console.error(
1011
- "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(() => ...)"
1012
- ));
1013
- }), I.actQueue = null), 0 < I.thrownErrors.length)
1014
- throw e = ne(I.thrownErrors), I.thrownErrors.length = 0, e;
1015
- return {
1016
- then: function(D, le) {
1017
- T = !0, g === 0 ? (I.actQueue = h, ae(function() {
1018
- return k(
1019
- q,
1020
- D,
1021
- le
1022
- );
1023
- })) : D(q);
1024
- }
1025
- };
1026
- }, r.cache = function(e) {
1027
- return function() {
1028
- return e.apply(null, arguments);
1029
- };
1030
- }, r.captureOwnerStack = function() {
1031
- var e = I.getCurrentStack;
1032
- return e === null ? null : e();
1033
- }, r.cloneElement = function(e, n, g) {
1034
- if (e == null)
1035
- throw Error(
1036
- "The argument must be a React element, but you passed " + e + "."
1037
- );
1038
- var h = $e({}, e.props), T = e.key, L = e._owner;
1039
- if (n != null) {
1040
- var M;
1041
- e: {
1042
- if (Ee.call(n, "ref") && (M = Object.getOwnPropertyDescriptor(
1043
- n,
1044
- "ref"
1045
- ).get) && M.isReactWarning) {
1046
- M = !1;
1047
- break e;
1048
- }
1049
- M = n.ref !== void 0;
1050
- }
1051
- M && (L = s()), x(n) && (i(n.key), T = "" + n.key);
1052
- for (q in n)
1053
- !Ee.call(n, q) || q === "key" || q === "__self" || q === "__source" || q === "ref" && n.ref === void 0 || (h[q] = n[q]);
1054
- }
1055
- var q = arguments.length - 2;
1056
- if (q === 1) h.children = g;
1057
- else if (1 < q) {
1058
- M = Array(q);
1059
- for (var D = 0; D < q; D++)
1060
- M[D] = arguments[D + 2];
1061
- h.children = M;
1062
- }
1063
- for (h = U(
1064
- e.type,
1065
- T,
1066
- void 0,
1067
- void 0,
1068
- L,
1069
- h,
1070
- e._debugStack,
1071
- e._debugTask
1072
- ), T = 2; T < arguments.length; T++)
1073
- L = arguments[T], Y(L) && L._store && (L._store.validated = 1);
1074
- return h;
1075
- }, r.createContext = function(e) {
1076
- return e = {
1077
- $$typeof: S,
1078
- _currentValue: e,
1079
- _currentValue2: e,
1080
- _threadCount: 0,
1081
- Provider: null,
1082
- Consumer: null
1083
- }, e.Provider = e, e.Consumer = {
1084
- $$typeof: w,
1085
- _context: e
1086
- }, e._currentRenderer = null, e._currentRenderer2 = null, e;
1087
- }, r.createElement = function(e, n, g) {
1088
- for (var h = 2; h < arguments.length; h++) {
1089
- var T = arguments[h];
1090
- Y(T) && T._store && (T._store.validated = 1);
1091
- }
1092
- if (h = {}, T = null, n != null)
1093
- for (D in Fe || !("__self" in n) || "key" in n || (Fe = !0, console.warn(
1094
- "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"
1095
- )), x(n) && (i(n.key), T = "" + n.key), n)
1096
- Ee.call(n, D) && D !== "key" && D !== "__self" && D !== "__source" && (h[D] = n[D]);
1097
- var L = arguments.length - 2;
1098
- if (L === 1) h.children = g;
1099
- else if (1 < L) {
1100
- for (var M = Array(L), q = 0; q < L; q++)
1101
- M[q] = arguments[q + 2];
1102
- Object.freeze && Object.freeze(M), h.children = M;
1103
- }
1104
- if (e && e.defaultProps)
1105
- for (D in L = e.defaultProps, L)
1106
- h[D] === void 0 && (h[D] = L[D]);
1107
- T && R(
1108
- h,
1109
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
1110
- );
1111
- var D = 1e4 > I.recentlyCreatedOwnerStacks++;
1112
- return U(
1113
- e,
1114
- T,
1115
- void 0,
1116
- void 0,
1117
- s(),
1118
- h,
1119
- D ? Error("react-stack-top-frame") : yt,
1120
- D ? He(c(e)) : ht
1121
- );
1122
- }, r.createRef = function() {
1123
- var e = { current: null };
1124
- return Object.seal(e), e;
1125
- }, r.forwardRef = function(e) {
1126
- e != null && e.$$typeof === A ? console.error(
1127
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1128
- ) : typeof e != "function" ? console.error(
1129
- "forwardRef requires a render function but was given %s.",
1130
- e === null ? "null" : typeof e
1131
- ) : e.length !== 0 && e.length !== 2 && console.error(
1132
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1133
- e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1134
- ), e != null && e.defaultProps != null && console.error(
1135
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1136
- );
1137
- var n = { $$typeof: H, render: e }, g;
1138
- return Object.defineProperty(n, "displayName", {
1139
- enumerable: !1,
1140
- configurable: !0,
1141
- get: function() {
1142
- return g;
1143
- },
1144
- set: function(h) {
1145
- g = h, e.name || e.displayName || (Object.defineProperty(e, "name", { value: h }), e.displayName = h);
1146
- }
1147
- }), n;
1148
- }, r.isValidElement = Y, r.lazy = function(e) {
1149
- return {
1150
- $$typeof: oe,
1151
- _payload: { _status: -1, _result: e },
1152
- _init: ue
1153
- };
1154
- }, r.memo = function(e, n) {
1155
- e == null && console.error(
1156
- "memo: The first argument must be a component. Instead received: %s",
1157
- e === null ? "null" : typeof e
1158
- ), n = {
1159
- $$typeof: A,
1160
- type: e,
1161
- compare: n === void 0 ? null : n
1162
- };
1163
- var g;
1164
- return Object.defineProperty(n, "displayName", {
1165
- enumerable: !1,
1166
- configurable: !0,
1167
- get: function() {
1168
- return g;
1169
- },
1170
- set: function(h) {
1171
- g = h, e.name || e.displayName || (Object.defineProperty(e, "name", { value: h }), e.displayName = h);
1172
- }
1173
- }), n;
1174
- }, r.startTransition = function(e) {
1175
- var n = I.T, g = {};
1176
- I.T = g, g._updatedFibers = /* @__PURE__ */ new Set();
1177
- try {
1178
- var h = e(), T = I.S;
1179
- T !== null && T(g, h), typeof h == "object" && h !== null && typeof h.then == "function" && h.then(G, Ge);
1180
- } catch (L) {
1181
- Ge(L);
1182
- } finally {
1183
- n === null && g._updatedFibers && (e = g._updatedFibers.size, g._updatedFibers.clear(), 10 < e && console.warn(
1184
- "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."
1185
- )), I.T = n;
1186
- }
1187
- }, r.unstable_useCacheRefresh = function() {
1188
- return N().useCacheRefresh();
1189
- }, r.use = function(e) {
1190
- return N().use(e);
1191
- }, r.useActionState = function(e, n, g) {
1192
- return N().useActionState(
1193
- e,
1194
- n,
1195
- g
1196
- );
1197
- }, r.useCallback = function(e, n) {
1198
- return N().useCallback(e, n);
1199
- }, r.useContext = function(e) {
1200
- var n = N();
1201
- return e.$$typeof === w && console.error(
1202
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1203
- ), n.useContext(e);
1204
- }, r.useDebugValue = function(e, n) {
1205
- return N().useDebugValue(e, n);
1206
- }, r.useDeferredValue = function(e, n) {
1207
- return N().useDeferredValue(e, n);
1208
- }, r.useEffect = function(e, n, g) {
1209
- e == null && console.warn(
1210
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1211
- );
1212
- var h = N();
1213
- if (typeof g == "function")
1214
- throw Error(
1215
- "useEffect CRUD overload is not enabled in this build of React."
1216
- );
1217
- return h.useEffect(e, n);
1218
- }, r.useId = function() {
1219
- return N().useId();
1220
- }, r.useImperativeHandle = function(e, n, g) {
1221
- return N().useImperativeHandle(e, n, g);
1222
- }, r.useInsertionEffect = function(e, n) {
1223
- return e == null && console.warn(
1224
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1225
- ), N().useInsertionEffect(e, n);
1226
- }, r.useLayoutEffect = function(e, n) {
1227
- return e == null && console.warn(
1228
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1229
- ), N().useLayoutEffect(e, n);
1230
- }, r.useMemo = function(e, n) {
1231
- return N().useMemo(e, n);
1232
- }, r.useOptimistic = function(e, n) {
1233
- return N().useOptimistic(e, n);
1234
- }, r.useReducer = function(e, n, g) {
1235
- return N().useReducer(e, n, g);
1236
- }, r.useRef = function(e) {
1237
- return N().useRef(e);
1238
- }, r.useState = function(e) {
1239
- return N().useState(e);
1240
- }, r.useSyncExternalStore = function(e, n, g) {
1241
- return N().useSyncExternalStore(
1242
- e,
1243
- n,
1244
- g
1245
- );
1246
- }, r.useTransition = function() {
1247
- return N().useTransition();
1248
- }, r.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1249
- }();
1250
- }(ge, ge.exports)), ge.exports;
1251
- }
1252
- var Ze;
1253
- function ke() {
1254
- return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? xe.exports = xt() : xe.exports = St()), xe.exports;
1255
- }
1256
- /**
1257
- * @license React
1258
- * react-jsx-runtime.development.js
1259
- *
1260
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1261
- *
1262
- * This source code is licensed under the MIT license found in the
1263
- * LICENSE file in the root directory of this source tree.
1264
- */
1265
- var Je;
1266
- function Ct() {
1267
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
1268
- function o(t) {
1269
- if (t == null) return null;
1270
- if (typeof t == "function")
1271
- return t.$$typeof === ue ? null : t.displayName || t.name || null;
1272
- if (typeof t == "string") return t;
1273
- switch (t) {
1274
- case R:
1275
- return "Fragment";
1276
- case U:
1277
- return "Profiler";
1278
- case $:
1279
- return "StrictMode";
1280
- case P:
1281
- return "Suspense";
1282
- case re:
1283
- return "SuspenseList";
1284
- case X:
1285
- return "Activity";
1286
- }
1287
- if (typeof t == "object")
1288
- switch (typeof t.tag == "number" && console.error(
1289
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1290
- ), t.$$typeof) {
1291
- case x:
1292
- return "Portal";
1293
- case Y:
1294
- return (t.displayName || "Context") + ".Provider";
1295
- case F:
1296
- return (t._context.displayName || "Context") + ".Consumer";
1297
- case ee:
1298
- var u = t.render;
1299
- return t = t.displayName, t || (t = u.displayName || u.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
1300
- case se:
1301
- return u = t.displayName || null, u !== null ? u : o(t.type) || "Memo";
1302
- case V:
1303
- u = t._payload, t = t._init;
1304
- try {
1305
- return o(t(u));
1306
- } catch {
1307
- }
1308
- }
1309
- return null;
1310
- }
1311
- function r(t) {
1312
- return "" + t;
1313
- }
1314
- function l(t) {
1315
- try {
1316
- r(t);
1317
- var u = !1;
1318
- } catch {
1319
- u = !0;
1320
- }
1321
- if (u) {
1322
- u = console;
1323
- var E = u.error, w = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
1324
- return E.call(
1325
- u,
1326
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1327
- w
1328
- ), r(t);
1329
- }
1330
- }
1331
- function a(t) {
1332
- if (t === R) return "<>";
1333
- if (typeof t == "object" && t !== null && t.$$typeof === V)
1334
- return "<...>";
1335
- try {
1336
- var u = o(t);
1337
- return u ? "<" + u + ">" : "<...>";
1338
- } catch {
1339
- return "<...>";
1340
- }
1341
- }
1342
- function m() {
1343
- var t = N.A;
1344
- return t === null ? null : t.getOwner();
1345
- }
1346
- function f() {
1347
- return Error("react-stack-top-frame");
1348
- }
1349
- function v(t) {
1350
- if (G.call(t, "key")) {
1351
- var u = Object.getOwnPropertyDescriptor(t, "key").get;
1352
- if (u && u.isReactWarning) return !1;
1353
- }
1354
- return t.key !== void 0;
1355
- }
1356
- function O(t, u) {
1357
- function E() {
1358
- K || (K = !0, console.error(
1359
- "%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)",
1360
- u
1361
- ));
1362
- }
1363
- E.isReactWarning = !0, Object.defineProperty(t, "key", {
1364
- get: E,
1365
- configurable: !0
1366
- });
1367
- }
1368
- function p() {
1369
- var t = o(this.type);
1370
- return k[t] || (k[t] = !0, console.error(
1371
- "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."
1372
- )), t = this.props.ref, t !== void 0 ? t : null;
1373
- }
1374
- function i(t, u, E, w, S, H, C, te) {
1375
- return E = H.ref, t = {
1376
- $$typeof: b,
1377
- type: t,
1378
- key: u,
1379
- props: H,
1380
- _owner: S
1381
- }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(t, "ref", {
1382
- enumerable: !1,
1383
- get: p
1384
- }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
1385
- configurable: !1,
1386
- enumerable: !1,
1387
- writable: !0,
1388
- value: 0
1389
- }), Object.defineProperty(t, "_debugInfo", {
1390
- configurable: !1,
1391
- enumerable: !1,
1392
- writable: !0,
1393
- value: null
1394
- }), Object.defineProperty(t, "_debugStack", {
1395
- configurable: !1,
1396
- enumerable: !1,
1397
- writable: !0,
1398
- value: C
1399
- }), Object.defineProperty(t, "_debugTask", {
1400
- configurable: !1,
1401
- enumerable: !1,
1402
- writable: !0,
1403
- value: te
1404
- }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
1405
- }
1406
- function _(t, u, E, w, S, H, C, te) {
1407
- var A = u.children;
1408
- if (A !== void 0)
1409
- if (w)
1410
- if (ae(A)) {
1411
- for (w = 0; w < A.length; w++)
1412
- c(A[w]);
1413
- Object.freeze && Object.freeze(A);
1414
- } else
1415
- console.error(
1416
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1417
- );
1418
- else c(A);
1419
- if (G.call(u, "key")) {
1420
- A = o(t);
1421
- var oe = Object.keys(u).filter(function(be) {
1422
- return be !== "key";
1423
- });
1424
- w = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", ce[A + w] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
1425
- `A props object containing a "key" prop is being spread into JSX:
1426
- let props = %s;
1427
- <%s {...props} />
1428
- React keys must be passed directly to JSX without using spread:
1429
- let props = %s;
1430
- <%s key={someKey} {...props} />`,
1431
- w,
1432
- A,
1433
- oe,
1434
- A
1435
- ), ce[A + w] = !0);
1436
- }
1437
- if (A = null, E !== void 0 && (l(E), A = "" + E), v(u) && (l(u.key), A = "" + u.key), "key" in u) {
1438
- E = {};
1439
- for (var de in u)
1440
- de !== "key" && (E[de] = u[de]);
1441
- } else E = u;
1442
- return A && O(
1443
- E,
1444
- typeof t == "function" ? t.displayName || t.name || "Unknown" : t
1445
- ), i(
1446
- t,
1447
- A,
1448
- H,
1449
- S,
1450
- m(),
1451
- E,
1452
- C,
1453
- te
1454
- );
1455
- }
1456
- function c(t) {
1457
- typeof t == "object" && t !== null && t.$$typeof === b && t._store && (t._store.validated = 1);
1458
- }
1459
- var s = ke(), b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), Y = Symbol.for("react.context"), ee = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), re = Symbol.for("react.suspense_list"), se = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), X = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), N = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, ae = Array.isArray, ne = console.createTask ? console.createTask : function() {
1460
- return null;
1461
- };
1462
- s = {
1463
- react_stack_bottom_frame: function(t) {
1464
- return t();
1465
- }
1466
- };
1467
- var K, k = {}, B = s.react_stack_bottom_frame.bind(
1468
- s,
1469
- f
1470
- )(), z = ne(a(f)), ce = {};
1471
- me.Fragment = R, me.jsx = function(t, u, E, w, S) {
1472
- var H = 1e4 > N.recentlyCreatedOwnerStacks++;
1473
- return _(
1474
- t,
1475
- u,
1476
- E,
1477
- !1,
1478
- w,
1479
- S,
1480
- H ? Error("react-stack-top-frame") : B,
1481
- H ? ne(a(t)) : z
1482
- );
1483
- }, me.jsxs = function(t, u, E, w, S) {
1484
- var H = 1e4 > N.recentlyCreatedOwnerStacks++;
1485
- return _(
1486
- t,
1487
- u,
1488
- E,
1489
- !0,
1490
- w,
1491
- S,
1492
- H ? Error("react-stack-top-frame") : B,
1493
- H ? ne(a(t)) : z
1494
- );
1495
- };
1496
- }()), me;
1497
- }
1498
- var et;
1499
- function jt() {
1500
- return et || (et = 1, process.env.NODE_ENV === "production" ? Oe.exports = Ot() : Oe.exports = Ct()), Oe.exports;
1501
- }
1502
- var y = jt(), d = ke();
1503
- function kt({ className: o, ...r }) {
1504
- const l = d.useMemo(() => W("leading-none peer-disabled:opacity-70", o), [o]);
1505
- return /* @__PURE__ */ y.jsx("label", { className: l, ...r });
1506
- }
1507
- function tr({
1508
- label: o,
1509
- children: r,
1510
- required: l,
1511
- htmlFor: a,
1512
- error: m,
1513
- help: f,
1514
- helpBefore: v,
1515
- className: O,
1516
- innerClass: p,
1517
- ...i
1
+ import U from "clsx";
2
+ import { twMerge as be } from "tailwind-merge";
3
+ import { jsx as i, jsxs as N, Fragment as ne } from "react/jsx-runtime";
4
+ import { useMemo as k, createElement as re, Children as z, cloneElement as W, useLayoutEffect as oe, useEffect as L, useState as E, useRef as F, useCallback as B, useImperativeHandle as ie, forwardRef as se, startTransition as ge, createContext as me, useContext as he } from "react";
5
+ import { useId as Z, useFloating as _, autoUpdate as le, shift as ae, flip as ue, offset as ce, useTransitionStyles as X, useInteractions as J, useClick as ye, FloatingOverlay as Q, useHover as xe, useClientPoint as we, useDismiss as ve } from "@floating-ui/react";
6
+ import { createPortal as Ce } from "react-dom";
7
+ function M(...e) {
8
+ return e.length ? U(...e) : "";
9
+ }
10
+ function O(e, t) {
11
+ return t ? be(e, t) : e;
12
+ }
13
+ function w({
14
+ as: e,
15
+ classList: t = [],
16
+ className: r,
17
+ ...n
1518
18
  }) {
1519
- const _ = d.useMemo(() => W(
19
+ const s = k(() => Array.isArray(t) ? t.length ? O(M(...t), r) : r : O(M(t), r), [t, r]);
20
+ return re(e || "div", { className: s, ...n });
21
+ }
22
+ function ke(e) {
23
+ return /* @__PURE__ */ i(w, { as: "label", classList: ["leading-none peer-disabled:opacity-70"], ...e });
24
+ }
25
+ function Ke({
26
+ label: e,
27
+ children: t,
28
+ required: r,
29
+ htmlFor: n,
30
+ error: s,
31
+ help: o,
32
+ helpBefore: l,
33
+ innerClass: u,
34
+ ...c
35
+ }) {
36
+ const d = k(() => M(
1520
37
  "font-medium",
1521
- l ? 'after:content-["*"] after:text-danger after:text-sm after:pl-0.5' : ""
1522
- ), [l]), c = d.useMemo(() => J("flex flex-col space-y-2", O), [O]);
1523
- return /* @__PURE__ */ y.jsxs("div", { className: c, ...i, children: [
1524
- o ? /* @__PURE__ */ y.jsx(kt, { className: _, htmlFor: a, children: o }) : null,
1525
- f && v ? /* @__PURE__ */ y.jsx("p", { className: "text-xs text-muted pb-2", children: f }) : null,
1526
- /* @__PURE__ */ y.jsx("div", { className: p, children: At(r, !!m) }),
1527
- f && !v && !m ? /* @__PURE__ */ y.jsx("p", { className: "text-xs text-muted", children: f }) : null,
1528
- m ? /* @__PURE__ */ y.jsx("p", { className: "text-xs text-danger", children: m }) : null
38
+ r ? 'after:content-["*"] after:text-danger after:text-sm after:pl-0.5' : ""
39
+ ), [r]);
40
+ return /* @__PURE__ */ N(w, { classList: "flex flex-col space-y-2", ...c, children: [
41
+ e ? /* @__PURE__ */ i(ke, { className: d, htmlFor: n, children: e }) : null,
42
+ o && l ? /* @__PURE__ */ i("p", { className: "text-xs text-muted pb-2", children: o }) : null,
43
+ /* @__PURE__ */ i("div", { className: u, children: Ne(t, !!s) }),
44
+ o && !l && !s ? /* @__PURE__ */ i("p", { className: "text-xs text-muted", children: o }) : null,
45
+ s ? /* @__PURE__ */ i("p", { className: "text-xs text-danger", children: s }) : null
1529
46
  ] });
1530
47
  }
1531
- function At(o, r) {
1532
- const l = d.Children.count(o);
1533
- if (!l) return null;
1534
- if (l === 1)
1535
- return d.cloneElement(o, { error: r });
1536
- const a = d.Children.toArray(o);
1537
- return a[0] = d.cloneElement(a[0], { error: r }), a;
48
+ function Ne(e, t) {
49
+ const r = z.count(e);
50
+ if (!r) return null;
51
+ if (r === 1)
52
+ return W(e, { error: t });
53
+ const n = z.toArray(e);
54
+ return n[0] = W(n[0], { error: t }), n;
55
+ }
56
+ function Ge({ error: e, customStyle: t, ...r }) {
57
+ return /* @__PURE__ */ i(
58
+ w,
59
+ {
60
+ classList: t ? void 0 : [
61
+ "flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted",
62
+ "[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",
63
+ e ? "border-danger hover:border-danger-fore" : "border-input"
64
+ ],
65
+ ...r
66
+ }
67
+ );
1538
68
  }
1539
- function rr({ error: o, unstyled: r, className: l, ...a }) {
1540
- const m = d.useMemo(() => r ? l : J(W(
1541
- "flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted",
1542
- "[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",
1543
- o ? "border-danger hover:border-danger-fore" : "border-input"
1544
- ), l), [l, o, r]);
1545
- return /* @__PURE__ */ y.jsx("div", { className: m, ...a });
69
+ function Ue({ type: e, error: t, customStyle: r, ...n }) {
70
+ return /* @__PURE__ */ i(
71
+ w,
72
+ {
73
+ as: "input",
74
+ type: e,
75
+ classList: r ? void 0 : [
76
+ "flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted",
77
+ "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2",
78
+ t ? "border-danger hover:border-danger-fore focus-visible:ring-danger" : "border-input not-disabled:hover:border-input-fore focus-visible:ring-ring",
79
+ e === "file" ? "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground" : null
80
+ ],
81
+ ...n
82
+ }
83
+ );
1546
84
  }
1547
- const Nt = d.forwardRef(({
1548
- className: o,
1549
- type: r,
1550
- error: l,
1551
- unstyled: a,
1552
- ...m
1553
- }, f) => {
1554
- const v = d.useMemo(() => a ? o : J(W(
1555
- "flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted",
1556
- "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
1557
- l ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore",
1558
- r === "file" ? "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground" : null
1559
- ), o), [o, r, l, a]);
1560
- return /* @__PURE__ */ y.jsx("input", { ref: f, type: r, className: v, ...m });
1561
- });
1562
- Nt.displayName = "Input";
1563
- const Mt = d.forwardRef(({
1564
- className: o,
1565
- error: r,
1566
- unstyled: l,
1567
- ...a
1568
- }, m) => {
1569
- const f = d.useMemo(() => l ? o : J(W(
1570
- "flex rounded-md border bg-background px-3 py-2 w-full",
1571
- "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
1572
- r ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
1573
- ), o), [o, r, l]);
1574
- return /* @__PURE__ */ y.jsx("textarea", { ref: m, className: f, ...a });
1575
- });
1576
- Mt.displayName = "Textarea";
1577
- function Pt() {
1578
- return /* @__PURE__ */ y.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ y.jsx("rect", { width: "20", height: "3", y: "13.5", x: "4.5", fill: "currentColor", stroke: "none", rx: "2" }) });
85
+ function Je({ error: e, customStyle: t, ...r }) {
86
+ return /* @__PURE__ */ i(
87
+ w,
88
+ {
89
+ as: "textarea",
90
+ classList: t ? void 0 : [
91
+ "flex rounded-md border bg-background px-3 py-2 w-full",
92
+ "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
93
+ e ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
94
+ ],
95
+ ...r
96
+ }
97
+ );
1579
98
  }
1580
- function nr({
1581
- checked: o,
1582
- indeterminate: r,
1583
- className: l,
1584
- id: a,
1585
- name: m,
1586
- onChange: f,
1587
- value: v,
1588
- checkIcon: O,
1589
- ...p
99
+ function Fe() {
100
+ return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ i("rect", { width: "20", height: "3", y: "13.5", x: "4.5", fill: "currentColor", stroke: "none", rx: "2" }) });
101
+ }
102
+ function Qe({
103
+ checked: e,
104
+ indeterminate: t,
105
+ id: r,
106
+ name: n,
107
+ onChange: s,
108
+ value: o,
109
+ checkIcon: l,
110
+ error: u,
111
+ ...c
1590
112
  }) {
1591
- const i = d.useMemo(() => J(W(
1592
- "inline-flex justify-center items-center border w-4.5 h-4.5 rounded",
1593
- "cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
1594
- o || r ? "bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input" : "border-input not-disabled:hover:border-input-fore"
1595
- ), l), [o, r, l]), _ = () => {
1596
- p.disabled || f?.(!o);
113
+ const d = () => {
114
+ c.disabled || s?.(!e);
1597
115
  };
1598
- return /* @__PURE__ */ y.jsxs(
1599
- "button",
116
+ return /* @__PURE__ */ N(
117
+ w,
1600
118
  {
119
+ as: "button",
1601
120
  type: "button",
1602
121
  role: "checkbox",
1603
- id: a || m,
1604
- className: i,
1605
- onClick: _,
1606
- "aria-checked": o,
1607
- ...p,
122
+ id: r || n,
123
+ classList: [
124
+ "inline-flex justify-center items-center border w-4.5 h-4.5 rounded",
125
+ "cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
126
+ {
127
+ "border-danger hover:border-danger-fore": u,
128
+ "bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input": !u && e,
129
+ "border-input not-disabled:hover:border-input-fore": !u && !e
130
+ }
131
+ ],
132
+ onClick: d,
133
+ "aria-checked": e,
134
+ ...c,
1608
135
  children: [
1609
- o ? O : null,
1610
- r && !o ? /* @__PURE__ */ y.jsx(Pt, {}) : null,
1611
- /* @__PURE__ */ y.jsx(
136
+ e ? l : null,
137
+ t && !e ? /* @__PURE__ */ i(Fe, {}) : null,
138
+ /* @__PURE__ */ i(
1612
139
  "input",
1613
140
  {
1614
141
  type: "checkbox",
1615
142
  "aria-hidden": "true",
1616
- name: m,
1617
- checked: o,
1618
- value: v,
1619
- onChange: _,
1620
- disabled: p.disabled,
143
+ name: n,
144
+ checked: e,
145
+ value: o,
146
+ onChange: d,
147
+ disabled: c.disabled,
1621
148
  style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
1622
149
  }
1623
150
  )
@@ -1625,677 +152,310 @@ function nr({
1625
152
  }
1626
153
  );
1627
154
  }
1628
- var Se = { exports: {} }, Q = {};
1629
- /**
1630
- * @license React
1631
- * react-dom.production.js
1632
- *
1633
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1634
- *
1635
- * This source code is licensed under the MIT license found in the
1636
- * LICENSE file in the root directory of this source tree.
1637
- */
1638
- var tt;
1639
- function Dt() {
1640
- if (tt) return Q;
1641
- tt = 1;
1642
- var o = ke();
1643
- function r(p) {
1644
- var i = "https://react.dev/errors/" + p;
1645
- if (1 < arguments.length) {
1646
- i += "?args[]=" + encodeURIComponent(arguments[1]);
1647
- for (var _ = 2; _ < arguments.length; _++)
1648
- i += "&args[]=" + encodeURIComponent(arguments[_]);
155
+ const Ie = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", V = Ie ? oe : L;
156
+ function H({ children: e, container: t, disabled: r }) {
157
+ const [n, s] = E(null);
158
+ return V(() => {
159
+ if (!t) {
160
+ let o = document.getElementById("visits-style-portals");
161
+ return o || (o = document.createElement("div"), o.id = "visits-style-portals", document.body.appendChild(o)), s(o);
1649
162
  }
1650
- return "Minified React error #" + p + "; visit " + i + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
1651
- }
1652
- function l() {
1653
- }
1654
- var a = {
1655
- d: {
1656
- f: l,
1657
- r: function() {
1658
- throw Error(r(522));
1659
- },
1660
- D: l,
1661
- C: l,
1662
- L: l,
1663
- m: l,
1664
- X: l,
1665
- S: l,
1666
- M: l
1667
- },
1668
- p: 0,
1669
- findDOMNode: null
1670
- }, m = Symbol.for("react.portal");
1671
- function f(p, i, _) {
1672
- var c = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
1673
- return {
1674
- $$typeof: m,
1675
- key: c == null ? null : "" + c,
1676
- children: p,
1677
- containerInfo: i,
1678
- implementation: _
1679
- };
1680
- }
1681
- var v = o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1682
- function O(p, i) {
1683
- if (p === "font") return "";
1684
- if (typeof i == "string")
1685
- return i === "use-credentials" ? i : "";
1686
- }
1687
- return Q.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = a, Q.createPortal = function(p, i) {
1688
- var _ = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
1689
- if (!i || i.nodeType !== 1 && i.nodeType !== 9 && i.nodeType !== 11)
1690
- throw Error(r(299));
1691
- return f(p, i, null, _);
1692
- }, Q.flushSync = function(p) {
1693
- var i = v.T, _ = a.p;
1694
- try {
1695
- if (v.T = null, a.p = 2, p) return p();
1696
- } finally {
1697
- v.T = i, a.p = _, a.d.f();
1698
- }
1699
- }, Q.preconnect = function(p, i) {
1700
- typeof p == "string" && (i ? (i = i.crossOrigin, i = typeof i == "string" ? i === "use-credentials" ? i : "" : void 0) : i = null, a.d.C(p, i));
1701
- }, Q.prefetchDNS = function(p) {
1702
- typeof p == "string" && a.d.D(p);
1703
- }, Q.preinit = function(p, i) {
1704
- if (typeof p == "string" && i && typeof i.as == "string") {
1705
- var _ = i.as, c = O(_, i.crossOrigin), s = typeof i.integrity == "string" ? i.integrity : void 0, b = typeof i.fetchPriority == "string" ? i.fetchPriority : void 0;
1706
- _ === "style" ? a.d.S(
1707
- p,
1708
- typeof i.precedence == "string" ? i.precedence : void 0,
1709
- {
1710
- crossOrigin: c,
1711
- integrity: s,
1712
- fetchPriority: b
1713
- }
1714
- ) : _ === "script" && a.d.X(p, {
1715
- crossOrigin: c,
1716
- integrity: s,
1717
- fetchPriority: b,
1718
- nonce: typeof i.nonce == "string" ? i.nonce : void 0
1719
- });
1720
- }
1721
- }, Q.preinitModule = function(p, i) {
1722
- if (typeof p == "string")
1723
- if (typeof i == "object" && i !== null) {
1724
- if (i.as == null || i.as === "script") {
1725
- var _ = O(
1726
- i.as,
1727
- i.crossOrigin
1728
- );
1729
- a.d.M(p, {
1730
- crossOrigin: _,
1731
- integrity: typeof i.integrity == "string" ? i.integrity : void 0,
1732
- nonce: typeof i.nonce == "string" ? i.nonce : void 0
1733
- });
1734
- }
1735
- } else i == null && a.d.M(p);
1736
- }, Q.preload = function(p, i) {
1737
- if (typeof p == "string" && typeof i == "object" && i !== null && typeof i.as == "string") {
1738
- var _ = i.as, c = O(_, i.crossOrigin);
1739
- a.d.L(p, _, {
1740
- crossOrigin: c,
1741
- integrity: typeof i.integrity == "string" ? i.integrity : void 0,
1742
- nonce: typeof i.nonce == "string" ? i.nonce : void 0,
1743
- type: typeof i.type == "string" ? i.type : void 0,
1744
- fetchPriority: typeof i.fetchPriority == "string" ? i.fetchPriority : void 0,
1745
- referrerPolicy: typeof i.referrerPolicy == "string" ? i.referrerPolicy : void 0,
1746
- imageSrcSet: typeof i.imageSrcSet == "string" ? i.imageSrcSet : void 0,
1747
- imageSizes: typeof i.imageSizes == "string" ? i.imageSizes : void 0,
1748
- media: typeof i.media == "string" ? i.media : void 0
1749
- });
1750
- }
1751
- }, Q.preloadModule = function(p, i) {
1752
- if (typeof p == "string")
1753
- if (i) {
1754
- var _ = O(i.as, i.crossOrigin);
1755
- a.d.m(p, {
1756
- as: typeof i.as == "string" && i.as !== "script" ? i.as : void 0,
1757
- crossOrigin: _,
1758
- integrity: typeof i.integrity == "string" ? i.integrity : void 0
1759
- });
1760
- } else a.d.m(p);
1761
- }, Q.requestFormReset = function(p) {
1762
- a.d.r(p);
1763
- }, Q.unstable_batchedUpdates = function(p, i) {
1764
- return p(i);
1765
- }, Q.useFormState = function(p, i, _) {
1766
- return v.H.useFormState(p, i, _);
1767
- }, Q.useFormStatus = function() {
1768
- return v.H.useHostTransitionStatus();
1769
- }, Q.version = "19.1.1", Q;
1770
- }
1771
- var Z = {};
1772
- /**
1773
- * @license React
1774
- * react-dom.development.js
1775
- *
1776
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1777
- *
1778
- * This source code is licensed under the MIT license found in the
1779
- * LICENSE file in the root directory of this source tree.
1780
- */
1781
- var rt;
1782
- function It() {
1783
- return rt || (rt = 1, process.env.NODE_ENV !== "production" && function() {
1784
- function o() {
1785
- }
1786
- function r(c) {
1787
- return "" + c;
1788
- }
1789
- function l(c, s, b) {
1790
- var x = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
1791
- try {
1792
- r(x);
1793
- var R = !1;
1794
- } catch {
1795
- R = !0;
1796
- }
1797
- return R && (console.error(
1798
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1799
- typeof Symbol == "function" && Symbol.toStringTag && x[Symbol.toStringTag] || x.constructor.name || "Object"
1800
- ), r(x)), {
1801
- $$typeof: i,
1802
- key: x == null ? null : "" + x,
1803
- children: c,
1804
- containerInfo: s,
1805
- implementation: b
1806
- };
1807
- }
1808
- function a(c, s) {
1809
- if (c === "font") return "";
1810
- if (typeof s == "string")
1811
- return s === "use-credentials" ? s : "";
1812
- }
1813
- function m(c) {
1814
- return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : 'something with type "' + typeof c + '"';
1815
- }
1816
- function f(c) {
1817
- return c === null ? "`null`" : c === void 0 ? "`undefined`" : c === "" ? "an empty string" : typeof c == "string" ? JSON.stringify(c) : typeof c == "number" ? "`" + c + "`" : 'something with type "' + typeof c + '"';
1818
- }
1819
- function v() {
1820
- var c = _.H;
1821
- return c === null && console.error(
1822
- `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:
1823
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
1824
- 2. You might be breaking the Rules of Hooks
1825
- 3. You might have more than one copy of React in the same app
1826
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
1827
- ), c;
1828
- }
1829
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1830
- var O = ke(), p = {
1831
- d: {
1832
- f: o,
1833
- r: function() {
1834
- throw Error(
1835
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
1836
- );
1837
- },
1838
- D: o,
1839
- C: o,
1840
- L: o,
1841
- m: o,
1842
- X: o,
1843
- S: o,
1844
- M: o
1845
- },
1846
- p: 0,
1847
- findDOMNode: null
1848
- }, i = Symbol.for("react.portal"), _ = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1849
- typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
1850
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
1851
- ), Z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = p, Z.createPortal = function(c, s) {
1852
- var b = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
1853
- if (!s || s.nodeType !== 1 && s.nodeType !== 9 && s.nodeType !== 11)
1854
- throw Error("Target container is not a DOM element.");
1855
- return l(c, s, null, b);
1856
- }, Z.flushSync = function(c) {
1857
- var s = _.T, b = p.p;
1858
- try {
1859
- if (_.T = null, p.p = 2, c)
1860
- return c();
1861
- } finally {
1862
- _.T = s, p.p = b, p.d.f() && console.error(
1863
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
1864
- );
1865
- }
1866
- }, Z.preconnect = function(c, s) {
1867
- typeof c == "string" && c ? s != null && typeof s != "object" ? console.error(
1868
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
1869
- f(s)
1870
- ) : s != null && typeof s.crossOrigin != "string" && console.error(
1871
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
1872
- m(s.crossOrigin)
1873
- ) : console.error(
1874
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
1875
- m(c)
1876
- ), typeof c == "string" && (s ? (s = s.crossOrigin, s = typeof s == "string" ? s === "use-credentials" ? s : "" : void 0) : s = null, p.d.C(c, s));
1877
- }, Z.prefetchDNS = function(c) {
1878
- if (typeof c != "string" || !c)
1879
- console.error(
1880
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
1881
- m(c)
1882
- );
1883
- else if (1 < arguments.length) {
1884
- var s = arguments[1];
1885
- typeof s == "object" && s.hasOwnProperty("crossOrigin") ? console.error(
1886
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
1887
- f(s)
1888
- ) : console.error(
1889
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
1890
- f(s)
1891
- );
1892
- }
1893
- typeof c == "string" && p.d.D(c);
1894
- }, Z.preinit = function(c, s) {
1895
- if (typeof c == "string" && c ? s == null || typeof s != "object" ? console.error(
1896
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
1897
- f(s)
1898
- ) : s.as !== "style" && s.as !== "script" && console.error(
1899
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
1900
- f(s.as)
1901
- ) : console.error(
1902
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
1903
- m(c)
1904
- ), typeof c == "string" && s && typeof s.as == "string") {
1905
- var b = s.as, x = a(b, s.crossOrigin), R = typeof s.integrity == "string" ? s.integrity : void 0, $ = typeof s.fetchPriority == "string" ? s.fetchPriority : void 0;
1906
- b === "style" ? p.d.S(
1907
- c,
1908
- typeof s.precedence == "string" ? s.precedence : void 0,
1909
- {
1910
- crossOrigin: x,
1911
- integrity: R,
1912
- fetchPriority: $
1913
- }
1914
- ) : b === "script" && p.d.X(c, {
1915
- crossOrigin: x,
1916
- integrity: R,
1917
- fetchPriority: $,
1918
- nonce: typeof s.nonce == "string" ? s.nonce : void 0
1919
- });
1920
- }
1921
- }, Z.preinitModule = function(c, s) {
1922
- var b = "";
1923
- if (typeof c == "string" && c || (b += " The `href` argument encountered was " + m(c) + "."), s !== void 0 && typeof s != "object" ? b += " The `options` argument encountered was " + m(s) + "." : s && "as" in s && s.as !== "script" && (b += " The `as` option encountered was " + f(s.as) + "."), b)
1924
- console.error(
1925
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
1926
- b
1927
- );
1928
- else
1929
- switch (b = s && typeof s.as == "string" ? s.as : "script", b) {
1930
- case "script":
1931
- break;
1932
- default:
1933
- b = f(b), console.error(
1934
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
1935
- b,
1936
- c
1937
- );
1938
- }
1939
- typeof c == "string" && (typeof s == "object" && s !== null ? (s.as == null || s.as === "script") && (b = a(
1940
- s.as,
1941
- s.crossOrigin
1942
- ), p.d.M(c, {
1943
- crossOrigin: b,
1944
- integrity: typeof s.integrity == "string" ? s.integrity : void 0,
1945
- nonce: typeof s.nonce == "string" ? s.nonce : void 0
1946
- })) : s == null && p.d.M(c));
1947
- }, Z.preload = function(c, s) {
1948
- var b = "";
1949
- if (typeof c == "string" && c || (b += " The `href` argument encountered was " + m(c) + "."), s == null || typeof s != "object" ? b += " The `options` argument encountered was " + m(s) + "." : typeof s.as == "string" && s.as || (b += " The `as` option encountered was " + m(s.as) + "."), b && console.error(
1950
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
1951
- b
1952
- ), typeof c == "string" && typeof s == "object" && s !== null && typeof s.as == "string") {
1953
- b = s.as;
1954
- var x = a(
1955
- b,
1956
- s.crossOrigin
1957
- );
1958
- p.d.L(c, b, {
1959
- crossOrigin: x,
1960
- integrity: typeof s.integrity == "string" ? s.integrity : void 0,
1961
- nonce: typeof s.nonce == "string" ? s.nonce : void 0,
1962
- type: typeof s.type == "string" ? s.type : void 0,
1963
- fetchPriority: typeof s.fetchPriority == "string" ? s.fetchPriority : void 0,
1964
- referrerPolicy: typeof s.referrerPolicy == "string" ? s.referrerPolicy : void 0,
1965
- imageSrcSet: typeof s.imageSrcSet == "string" ? s.imageSrcSet : void 0,
1966
- imageSizes: typeof s.imageSizes == "string" ? s.imageSizes : void 0,
1967
- media: typeof s.media == "string" ? s.media : void 0
1968
- });
1969
- }
1970
- }, Z.preloadModule = function(c, s) {
1971
- var b = "";
1972
- typeof c == "string" && c || (b += " The `href` argument encountered was " + m(c) + "."), s !== void 0 && typeof s != "object" ? b += " The `options` argument encountered was " + m(s) + "." : s && "as" in s && typeof s.as != "string" && (b += " The `as` option encountered was " + m(s.as) + "."), b && console.error(
1973
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
1974
- b
1975
- ), typeof c == "string" && (s ? (b = a(
1976
- s.as,
1977
- s.crossOrigin
1978
- ), p.d.m(c, {
1979
- as: typeof s.as == "string" && s.as !== "script" ? s.as : void 0,
1980
- crossOrigin: b,
1981
- integrity: typeof s.integrity == "string" ? s.integrity : void 0
1982
- })) : p.d.m(c));
1983
- }, Z.requestFormReset = function(c) {
1984
- p.d.r(c);
1985
- }, Z.unstable_batchedUpdates = function(c, s) {
1986
- return c(s);
1987
- }, Z.useFormState = function(c, s, b) {
1988
- return v().useFormState(c, s, b);
1989
- }, Z.useFormStatus = function() {
1990
- return v().useHostTransitionStatus();
1991
- }, Z.version = "19.1.1", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1992
- }()), Z;
163
+ s(t);
164
+ }, [t]), r || !n ? null : Ce(e, n);
1993
165
  }
1994
- var nt;
1995
- function Lt() {
1996
- if (nt) return Se.exports;
1997
- nt = 1;
1998
- function o() {
1999
- if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
2000
- if (process.env.NODE_ENV !== "production")
2001
- throw new Error("^_^");
2002
- try {
2003
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o);
2004
- } catch (r) {
2005
- console.error(r);
2006
- }
2007
- }
2008
- }
2009
- return process.env.NODE_ENV === "production" ? (o(), Se.exports = Dt()) : Se.exports = It(), Se.exports;
166
+ function q(e) {
167
+ e && (e.stopPropagation(), e.preventDefault());
2010
168
  }
2011
- var $t = Lt();
2012
- const Yt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", De = Yt ? d.useLayoutEffect : d.useEffect;
2013
- function ve({ children: o, container: r, disabled: l }) {
2014
- const [a, m] = d.useState(null);
2015
- return De(() => {
2016
- if (!r) {
2017
- let f = document.getElementById("visits-style-portals");
2018
- return f || (f = document.createElement("div"), f.id = "visits-style-portals", document.body.appendChild(f)), m(f);
2019
- }
2020
- m(r);
2021
- }, [r]), l || !a ? null : $t.createPortal(o, a);
2022
- }
2023
- function Ce(o) {
2024
- o && (o.stopPropagation(), o.preventDefault());
2025
- }
2026
- const Ht = { open: 150, close: 75 }, ct = d.forwardRef(({
2027
- position: o,
169
+ const Ae = { open: 150, close: 75 };
170
+ function Te({
171
+ ref: e,
172
+ position: t,
2028
173
  label: r,
2029
- children: l,
2030
- disabled: a,
2031
- offset: m = { x: 0, y: 6 },
2032
- onOpen: f,
2033
- onClose: v,
2034
- onManualClose: O,
2035
- timeout: p = Ht,
2036
- unstyled: i,
2037
- zIndex: _ = 9996,
2038
- role: c,
2039
- ...s
2040
- }, b) => {
2041
- const [x, R] = d.useState(!1), $ = je(), U = d.useRef(f), F = d.useRef(v), { refs: Y, floatingStyles: ee, context: P } = ye({
2042
- nodeId: $,
2043
- placement: o,
174
+ children: n,
175
+ disabled: s,
176
+ offset: o = { x: 0, y: 6 },
177
+ onOpen: l,
178
+ onClose: u,
179
+ onManualClose: c,
180
+ timeout: d = Ae,
181
+ customStyle: g,
182
+ zIndex: m = 9996,
183
+ role: v,
184
+ ...C
185
+ }) {
186
+ const [p, a] = E(!1), x = Z(), b = F(l), h = F(u), { refs: y, floatingStyles: R, context: S } = _({
187
+ nodeId: x,
188
+ placement: t,
2044
189
  middleware: [
2045
- it(),
2046
- ut({ fallbackAxisSideDirection: "end" }),
2047
- at({ mainAxis: m.y, crossAxis: m.x })
190
+ ae(),
191
+ ue({ fallbackAxisSideDirection: "end" }),
192
+ ce({ mainAxis: o.y, crossAxis: o.x })
2048
193
  ],
2049
- open: x,
2050
- onOpenChange: (N) => {
2051
- N ? U.current?.(Y.reference.current, Y.floating.current) : F.current?.(Y.reference.current, Y.floating.current), R(N);
194
+ open: p,
195
+ onOpenChange: (I) => {
196
+ I ? b.current?.(y.reference.current, y.floating.current) : h.current?.(y.reference.current, y.floating.current), a(I);
2052
197
  },
2053
- whileElementsMounted: st
2054
- }), { isMounted: re, styles: se } = he(P, {
2055
- duration: p,
2056
- initial({ side: N }) {
2057
- let G = "";
2058
- return N === "top" ? G = "translateY(5%) scale(0.95)" : N === "bottom" ? G = "translateY(-5%) scale(0.95)" : N === "left" ? G = "translateX(5%) scale(0.95)" : G = "translateX(-5%) scale(0.95)", { opacity: 0, transform: G };
2059
- }
2060
- }), V = d.useCallback((N) => {
2061
- if (Ce(N), O) return O();
2062
- R(!1), F.current?.(Y.reference.current, Y.floating.current);
2063
- }, [O]);
2064
- d.useEffect(() => {
2065
- if (a && x) return R(!1);
2066
- }, [a, x]), d.useImperativeHandle(b, () => ({
198
+ whileElementsMounted: le
199
+ }), { isMounted: Y, styles: D } = X(S, {
200
+ duration: d,
201
+ initial({ side: I }) {
202
+ let P = "";
203
+ return I === "top" ? P = "translateY(5%) scale(0.95)" : I === "bottom" ? P = "translateY(-5%) scale(0.95)" : I === "left" ? P = "translateX(5%) scale(0.95)" : P = "translateX(-5%) scale(0.95)", { opacity: 0, transform: P };
204
+ }
205
+ }), $ = B((I) => {
206
+ if (q(I), c) return c();
207
+ a(!1), h.current?.(y.reference.current, y.floating.current);
208
+ }, [c]);
209
+ L(() => {
210
+ if (s && p) return a(!1);
211
+ }, [s, p]), ie(e, () => ({
2067
212
  open: () => {
2068
- R(!0), U.current?.(Y.reference.current, Y.floating.current);
213
+ a(!0), b.current?.(y.reference.current, y.floating.current);
2069
214
  },
2070
215
  close: () => {
2071
- R(!1), F.current?.(Y.reference.current, Y.floating.current);
216
+ a(!1), h.current?.(y.reference.current, y.floating.current);
2072
217
  }
2073
218
  // eslint-disable-next-line react-hooks/exhaustive-deps
2074
219
  }), []);
2075
- const { getFloatingProps: X, getReferenceProps: ue } = Me([
2076
- Et(P, { enabled: !a })
220
+ const { getFloatingProps: j, getReferenceProps: K } = J([
221
+ ye(S, { enabled: !s })
2077
222
  ]);
2078
- return U.current = f, F.current = v, /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
2079
- d.cloneElement(d.Children.only(r), ue({
2080
- ref: Y.setReference,
223
+ return b.current = l, h.current = u, /* @__PURE__ */ N(ne, { children: [
224
+ W(z.only(r), K({
225
+ ref: y.setReference,
2081
226
  tabIndex: 0,
2082
227
  role: "button",
2083
- "aria-expanded": x,
2084
- disabled: a,
2085
- onClick: Ce
228
+ "aria-expanded": p,
229
+ disabled: s,
230
+ onClick: q
2086
231
  })),
2087
- /* @__PURE__ */ y.jsx(ve, { disabled: a || !re, children: /* @__PURE__ */ y.jsx(
2088
- Pe,
232
+ /* @__PURE__ */ i(H, { disabled: s || !Y, children: /* @__PURE__ */ i(
233
+ Q,
2089
234
  {
2090
235
  "data-testid": "vs-popover-shadow",
2091
- onClick: V,
2092
- style: { zIndex: _ },
236
+ onClick: $,
237
+ style: { zIndex: m },
2093
238
  autoFocus: !0,
2094
- children: /* @__PURE__ */ y.jsx("div", { role: c || "region", ref: Y.setFloating, style: ee, children: /* @__PURE__ */ y.jsx(
2095
- lt,
239
+ children: /* @__PURE__ */ i("div", { role: v || "region", ref: y.setFloating, style: R, children: /* @__PURE__ */ i(
240
+ Le,
2096
241
  {
2097
- unstyled: i,
2098
- styles: se,
2099
- ...X({ ...s, onClick: Ce }),
2100
- children: l
242
+ customStyle: g,
243
+ styles: D,
244
+ ...j({ ...C, onClick: q }),
245
+ children: n
2101
246
  }
2102
247
  ) })
2103
248
  }
2104
249
  ) })
2105
250
  ] });
2106
- });
2107
- ct.displayName = "Popover";
2108
- const lt = d.forwardRef(({
2109
- className: o,
2110
- unstyled: r,
2111
- styles: l,
2112
- style: a = {},
2113
- ...m
2114
- }, f) => {
2115
- const v = d.useMemo(() => J(W(
2116
- "z-20 w-auto h-auto outline-none transition-transform ease-in-out",
2117
- r ? null : "border border-accent rounded-md shadow-lg p-1 bg-background"
2118
- ), o), [o, r]);
2119
- return /* @__PURE__ */ y.jsx("div", { ref: f, className: v, style: { ...l, ...a }, ...m });
2120
- });
2121
- lt.displayName = "PopoverContent";
2122
- function or({
2123
- className: o,
2124
- placeholder: r = "",
2125
- options: l = [],
2126
- error: a,
2127
- unstyled: m,
2128
- disabled: f,
2129
- value: v,
2130
- maxHeight: O = 408,
2131
- arrowIcon: p,
2132
- closeIcon: i,
2133
- checkIcon: _,
2134
- onChange: c,
2135
- onClear: s,
2136
- renderItem: b,
2137
- sectionLabelStyle: x,
2138
- buttonAreaStyle: R,
2139
- clearLabelText: $,
2140
- optionStyle: U,
2141
- ...F
2142
- }) {
2143
- const Y = d.useRef(null), [ee, P] = d.useState(0), re = d.useMemo(() => m ? o : J(W(
2144
- "flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer",
2145
- "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
2146
- a ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
2147
- ), o), [o, a, m]), se = d.useMemo(() => Array.isArray(v), []), V = d.useCallback((k) => {
2148
- c?.(k), se || Y.current?.close();
2149
- }, [c, se]), X = d.useCallback((k) => Array.isArray(v) ? v.indexOf(k) > -1 : v === k, [v]), ue = d.useMemo(() => {
2150
- const k = {}, B = l.filter((z) => typeof z != "string");
2151
- for (let z = 0, ce = B.length; z < ce; z += 1) {
2152
- const t = B[z];
2153
- k[`${t.value}`] = t.label;
2154
- }
2155
- return k;
2156
- }, [l]), N = d.useMemo(() => {
2157
- if (!v) return r;
2158
- if (Array.isArray(v)) {
2159
- if (!v.length) return r;
2160
- const k = [...v].sort(), B = [];
2161
- for (let z = 0, ce = k.length; z < ce; z += 1)
2162
- B[z] = ue[`${k[z]}`] || "";
2163
- return B.filter(Boolean).join(",") || r;
251
+ }
252
+ function Le({ customStyle: e, styles: t, style: r = {}, ...n }) {
253
+ return /* @__PURE__ */ i(
254
+ w,
255
+ {
256
+ classList: [
257
+ "z-20 w-auto h-auto outline-none transition-transform ease-in-out",
258
+ e ? null : "border border-accent rounded-md shadow-lg p-1 bg-background"
259
+ ],
260
+ style: { ...t, ...r },
261
+ ...n
2164
262
  }
2165
- return ue[`${v}`] || r;
2166
- }, [r, v, ue]), G = N === r, ae = d.useMemo(() => W(
2167
- "overflow-hidden overflow-ellipsis whitespace-nowrap",
2168
- G ? "text-muted" : "text-text"
2169
- ), [G]), ne = d.useCallback((k, B) => b ? typeof k == "string" ? b(k, { index: B, selected: !1, onChange: () => {
2170
- } }) : b(k, {
2171
- index: B,
2172
- selected: X(k.value),
2173
- onChange: () => V(k.value)
2174
- }) : typeof k == "string" ? /* @__PURE__ */ y.jsx(
2175
- "h5",
263
+ );
264
+ }
265
+ function Ve({
266
+ className: e,
267
+ placeholder: t = "",
268
+ options: r = [],
269
+ error: n,
270
+ customStyle: s,
271
+ disabled: o,
272
+ value: l,
273
+ maxHeight: u = 408,
274
+ arrowIcon: c,
275
+ closeIcon: d,
276
+ checkIcon: g,
277
+ onChange: m,
278
+ onClear: v,
279
+ renderItem: C,
280
+ sectionLabelStyle: p,
281
+ buttonAreaStyle: a,
282
+ clearLabelText: x,
283
+ optionStyle: b,
284
+ ...h
285
+ }) {
286
+ const y = F(null), [R, S] = E(0), Y = k(() => Array.isArray(l), []), D = B((f) => {
287
+ m?.(f), Y || y.current?.close();
288
+ }, [m, Y]), $ = B((f) => Array.isArray(l) ? l.indexOf(f) > -1 : l === f, [l]), j = k(() => {
289
+ const f = {}, T = r.filter((A) => typeof A != "string");
290
+ for (let A = 0, G = T.length; A < G; A += 1) {
291
+ const ee = T[A];
292
+ f[`${ee.value}`] = ee.label;
293
+ }
294
+ return f;
295
+ }, [r]), K = k(() => {
296
+ if (!l) return t;
297
+ if (Array.isArray(l)) {
298
+ if (!l.length) return t;
299
+ const f = [...l].sort(), T = [];
300
+ for (let A = 0, G = f.length; A < G; A += 1)
301
+ T[A] = j[`${f[A]}`] || "";
302
+ return T.filter(Boolean).join(",") || t;
303
+ }
304
+ return j[`${l}`] || t;
305
+ }, [t, l, j]), I = k(() => l == null ? !0 : Array.isArray(l) ? !l.length : !1, [l]), P = B((f, T) => C ? typeof f == "string" ? C(f, { index: T, selected: !1, onChange: () => {
306
+ } }) : C(f, {
307
+ index: T,
308
+ selected: $(f.value),
309
+ onChange: () => D(f.value)
310
+ }) : typeof f == "string" ? /* @__PURE__ */ i(
311
+ w,
2176
312
  {
2177
- className: W("font-normal py-1 px-2 text-muted", x),
2178
- children: k
313
+ as: "h5",
314
+ classList: ["font-normal py-1 px-2 text-muted"],
315
+ className: p,
316
+ children: f
2179
317
  },
2180
- `optionheader-${B}`
2181
- ) : /* @__PURE__ */ y.jsx(
2182
- Ut,
318
+ `optionheader-${T}`
319
+ ) : /* @__PURE__ */ i(
320
+ Me,
2183
321
  {
2184
- selected: X(k.value),
2185
- onChange: V,
2186
- checkIcon: _,
2187
- className: U,
2188
- ...k
322
+ selected: $(f.value),
323
+ onChange: D,
324
+ checkIcon: g,
325
+ className: b,
326
+ ...f
2189
327
  },
2190
- k.label
2191
- ), [b, V, X, x, U, _]), K = d.useMemo(() => W(
2192
- "relative flex items-center pr-4 space-x-2",
2193
- R
2194
- ), [R]);
2195
- return /* @__PURE__ */ y.jsx(
2196
- ct,
328
+ f.label
329
+ ), [C, D, $, p, b, g]);
330
+ return /* @__PURE__ */ i(
331
+ Te,
2197
332
  {
2198
- label: /* @__PURE__ */ y.jsxs("button", { type: "button", className: re, disabled: f, ...F, children: [
2199
- /* @__PURE__ */ y.jsx("span", { className: ae, children: N }),
2200
- /* @__PURE__ */ y.jsxs("div", { className: K, children: [
2201
- s && !G ? /* @__PURE__ */ y.jsx(
2202
- "div",
2203
- {
2204
- tabIndex: -1,
2205
- role: "button",
2206
- className: "size-6 p-1.5 rounded hover:bg-accent cursor-pointer",
2207
- "aria-label": $,
2208
- onKeyDown: (k) => {
2209
- k.key !== "Enter" && k.key !== "Space" || s();
2210
- },
2211
- onClick: (k) => {
2212
- k.stopPropagation(), s();
2213
- },
2214
- children: i
2215
- }
2216
- ) : null,
2217
- p
2218
- ] })
2219
- ] }),
2220
- ref: Y,
2221
- onOpen: (k) => P(k?.getBoundingClientRect().width || 0),
2222
- disabled: f,
2223
- children: /* @__PURE__ */ y.jsx(
333
+ label: /* @__PURE__ */ N(
334
+ w,
335
+ {
336
+ as: "button",
337
+ type: "button",
338
+ classList: s ? void 0 : [
339
+ "flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer",
340
+ "disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
341
+ n ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
342
+ ],
343
+ className: e,
344
+ disabled: o,
345
+ ...h,
346
+ children: [
347
+ /* @__PURE__ */ i(
348
+ w,
349
+ {
350
+ as: "span",
351
+ classList: [
352
+ "overflow-hidden overflow-ellipsis whitespace-nowrap",
353
+ I ? "text-muted" : "text-text"
354
+ ],
355
+ children: K
356
+ }
357
+ ),
358
+ /* @__PURE__ */ N(w, { classList: "relative flex items-center space-x-2", className: a, children: [
359
+ v && !I ? /* @__PURE__ */ i(
360
+ "div",
361
+ {
362
+ tabIndex: -1,
363
+ role: "button",
364
+ className: "size-6 p-1.5 rounded hover:bg-accent cursor-pointer",
365
+ "aria-label": x,
366
+ onKeyDown: (f) => {
367
+ f.key !== "Enter" && f.key !== "Space" || v();
368
+ },
369
+ onClick: (f) => {
370
+ f.stopPropagation(), v();
371
+ },
372
+ children: d
373
+ }
374
+ ) : null,
375
+ c
376
+ ] })
377
+ ]
378
+ }
379
+ ),
380
+ ref: y,
381
+ onOpen: (f) => S(f?.getBoundingClientRect().width || 0),
382
+ disabled: o,
383
+ children: /* @__PURE__ */ i(
2224
384
  "ul",
2225
385
  {
2226
386
  className: "overflow-y-auto flex flex-col",
2227
387
  role: "listbox",
2228
- style: { minWidth: ee, maxWidth: "calc(100vw - 3rem)", maxHeight: O },
2229
- children: l.map(ne)
388
+ style: { minWidth: R, maxWidth: "calc(100vw - 3rem)", maxHeight: u },
389
+ children: r.map(P)
2230
390
  }
2231
391
  )
2232
392
  }
2233
393
  );
2234
394
  }
2235
- function Ut({
2236
- className: o,
2237
- value: r,
2238
- label: l,
2239
- selected: a,
2240
- checkIcon: m,
2241
- onChange: f
395
+ function Me({
396
+ className: e,
397
+ value: t,
398
+ label: r,
399
+ selected: n,
400
+ checkIcon: s,
401
+ onChange: o
2242
402
  }) {
2243
- const v = d.useMemo(() => W(
2244
- "flex items-center w-full hover:bg-accent rounded p-1 cursor-pointer",
2245
- o
2246
- ), [o]);
2247
- return /* @__PURE__ */ y.jsxs(
2248
- "button",
403
+ return /* @__PURE__ */ N(
404
+ w,
2249
405
  {
406
+ as: "button",
2250
407
  type: "button",
2251
408
  role: "option",
2252
- className: v,
2253
- "aria-selected": a,
2254
- onClick: () => f?.(r),
409
+ classList: "flex items-center w-full hover:bg-accent rounded p-1 cursor-pointer",
410
+ className: e,
411
+ "aria-selected": n,
412
+ onClick: () => o?.(t),
2255
413
  children: [
2256
- a && m ? m : /* @__PURE__ */ y.jsx("div", { className: "w-5 h-1 mr-1" }),
2257
- l
414
+ n && s ? s : /* @__PURE__ */ i("div", { className: "w-5 h-1 mr-1" }),
415
+ r
2258
416
  ]
2259
417
  }
2260
418
  );
2261
419
  }
2262
- function sr({ checked: o, className: r, id: l, name: a, onChange: m, value: f, ...v }) {
2263
- const O = d.useMemo(() => W(
2264
- "relative inline-flex justify-center items-center border border-input w-4.5 h-4.5 rounded-full",
2265
- "cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",
2266
- o ? "[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input" : "",
2267
- r
2268
- ), [r, o]), p = () => {
2269
- v.disabled || m?.(!o);
420
+ function et({ checked: e, className: t, id: r, name: n, onChange: s, value: o, error: l, ...u }) {
421
+ const c = () => {
422
+ u.disabled || s?.(!e);
2270
423
  };
2271
- return /* @__PURE__ */ y.jsxs(
2272
- "button",
424
+ return /* @__PURE__ */ N(
425
+ w,
2273
426
  {
427
+ as: "button",
2274
428
  type: "button",
2275
429
  role: "radio",
2276
- id: l || a,
2277
- className: O,
2278
- onClick: p,
2279
- "aria-checked": o,
2280
- ...v,
430
+ id: r || n,
431
+ classList: [
432
+ "relative inline-flex justify-center items-center border w-4.5 h-4.5 rounded-full",
433
+ "cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",
434
+ l ? "border-danger" : "border-input",
435
+ e ? "[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input" : ""
436
+ ],
437
+ className: t,
438
+ onClick: c,
439
+ "aria-checked": e,
440
+ ...u,
2281
441
  children: [
2282
- /* @__PURE__ */ y.jsx(
442
+ /* @__PURE__ */ i(
2283
443
  "i",
2284
444
  {
2285
445
  className: "block w-2.5 h-2.5 rounded-full transition-transform",
2286
- style: { transform: o ? "" : "scale(0.8)", opacity: o ? 1 : 0 }
446
+ style: { transform: e ? "" : "scale(0.8)", opacity: e ? 1 : 0 }
2287
447
  }
2288
448
  ),
2289
- /* @__PURE__ */ y.jsx(
449
+ /* @__PURE__ */ i(
2290
450
  "input",
2291
451
  {
2292
452
  type: "radio",
2293
453
  "aria-hidden": "true",
2294
- name: a,
2295
- checked: o,
2296
- value: f,
2297
- onChange: p,
2298
- disabled: v.disabled,
454
+ name: n,
455
+ checked: e,
456
+ value: o,
457
+ onChange: c,
458
+ disabled: u.disabled,
2299
459
  style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
2300
460
  }
2301
461
  )
@@ -2303,534 +463,557 @@ function sr({ checked: o, className: r, id: l, name: a, onChange: m, value: f, .
2303
463
  }
2304
464
  );
2305
465
  }
2306
- const Ft = d.forwardRef(({
2307
- className: o,
2308
- checked: r,
2309
- onChange: l,
2310
- value: a,
2311
- id: m,
2312
- name: f,
2313
- ...v
2314
- }, O) => {
2315
- const p = d.useMemo(() => J(W(
2316
- "inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
2317
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
2318
- "w-11",
2319
- r ? "bg-primary" : "bg-input"
2320
- ), o), [o, r]), i = d.useMemo(() => J(
2321
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
2322
- o
2323
- ), [o]), _ = () => {
2324
- v.disabled || l?.(!r);
466
+ function tt({
467
+ checked: e,
468
+ onChange: t,
469
+ value: r,
470
+ id: n,
471
+ name: s,
472
+ error: o,
473
+ ref: l,
474
+ ...u
475
+ }) {
476
+ const c = () => {
477
+ u.disabled || t?.(!e);
2325
478
  };
2326
- return /* @__PURE__ */ y.jsxs(
2327
- "button",
479
+ return /* @__PURE__ */ N(
480
+ w,
2328
481
  {
482
+ as: "button",
2329
483
  type: "button",
2330
484
  role: "switch",
2331
- id: m || f,
2332
- className: p,
2333
- onClick: _,
2334
- "aria-checked": r,
2335
- ...v,
485
+ id: n || s,
486
+ classList: [
487
+ "inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
488
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
489
+ "w-11",
490
+ e ? "bg-primary disabled:bg-text" : "bg-input"
491
+ ],
492
+ onClick: c,
493
+ "aria-checked": e,
494
+ "aria-invalid": o,
495
+ ...u,
2336
496
  children: [
2337
- /* @__PURE__ */ y.jsx("span", { className: i, style: { transform: r ? "translateX(100%)" : "" } }),
2338
- /* @__PURE__ */ y.jsx(
497
+ /* @__PURE__ */ i(
498
+ "span",
499
+ {
500
+ className: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
501
+ style: { transform: e ? "translateX(100%)" : "" }
502
+ }
503
+ ),
504
+ /* @__PURE__ */ i(
2339
505
  "input",
2340
506
  {
2341
- ref: O,
507
+ ref: l,
2342
508
  type: "checkbox",
2343
509
  "aria-hidden": "true",
2344
- name: f,
2345
- checked: r,
2346
- value: a,
2347
- onChange: _,
2348
- disabled: v.disabled,
510
+ name: s,
511
+ checked: e,
512
+ value: r,
513
+ onChange: c,
514
+ disabled: u.disabled,
2349
515
  style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
2350
516
  }
2351
517
  )
2352
518
  ]
2353
519
  }
2354
520
  );
2355
- });
2356
- Ft.displayName = "Switch";
2357
- function ir({ header: o, show: r, children: l, timeout: a = 300, ...m }) {
2358
- const f = d.useRef(null), v = d.useRef(0), O = d.useRef(0), p = d.useRef(!0);
2359
- return d.useEffect(() => {
2360
- O.current = a;
2361
- }, [a]), De(() => {
2362
- if (!f.current) return;
2363
- if (f.current.style.overflow = "hidden", f.current.style.opacity = "1", p.current) {
2364
- p.current = !1, f.current.style.height = r ? "auto" : "0px", r ? window.requestAnimationFrame(() => {
2365
- f.current && (v.current = f.current.offsetHeight);
521
+ }
522
+ function nt({ header: e, show: t, children: r, timeout: n = 300, ...s }) {
523
+ const o = F(null), l = F(0), u = F(0), c = F(!0);
524
+ return L(() => {
525
+ u.current = n;
526
+ }, [n]), V(() => {
527
+ if (!o.current) return;
528
+ if (o.current.style.overflow = "hidden", o.current.style.opacity = "1", c.current) {
529
+ c.current = !1, o.current.style.height = t ? "auto" : "0px", t ? window.requestAnimationFrame(() => {
530
+ o.current && (l.current = o.current.offsetHeight);
2366
531
  }) : (window.requestAnimationFrame(() => {
2367
- f.current && (f.current.style.height = "auto", v.current = f.current.offsetHeight, f.current.style.height = "0px");
2368
- }), f.current.style.opacity = "0");
532
+ o.current && (o.current.style.height = "auto", l.current = o.current.offsetHeight, o.current.style.height = "0px");
533
+ }), o.current.style.opacity = "0");
2369
534
  return;
2370
535
  }
2371
- r || (f.current.style.height = `${v.current}px`);
2372
- const i = [];
2373
- i[0] = window.requestAnimationFrame(() => {
2374
- i[1] = window.requestAnimationFrame(() => {
2375
- f.current && (f.current.style.height = `${r ? v.current : 0}px`, f.current.style.opacity = r ? "1" : "0");
536
+ t || (o.current.style.height = `${l.current}px`);
537
+ const d = [];
538
+ d[0] = window.requestAnimationFrame(() => {
539
+ d[1] = window.requestAnimationFrame(() => {
540
+ o.current && (o.current.style.height = `${t ? l.current : 0}px`, o.current.style.opacity = t ? "1" : "0");
2376
541
  });
2377
542
  });
2378
- let _;
2379
- const c = () => {
2380
- f.current && (r ? (f.current.style.height = "auto", f.current.style.overflow = "", f.current.style.opacity = "", window.requestAnimationFrame(() => {
2381
- f.current && (v.current = f.current.offsetHeight);
2382
- })) : f.current.style.height = "0px");
543
+ let g;
544
+ const m = () => {
545
+ o.current && (t ? (o.current.style.height = "auto", o.current.style.overflow = "", o.current.style.opacity = "", window.requestAnimationFrame(() => {
546
+ o.current && (l.current = o.current.offsetHeight);
547
+ })) : o.current.style.height = "0px");
2383
548
  };
2384
- return O.current === 0 ? c() : _ = window.setTimeout(c, O.current), () => {
2385
- i.forEach(window.cancelAnimationFrame), _ && window.clearTimeout(_);
549
+ return u.current === 0 ? m() : g = window.setTimeout(m, u.current), () => {
550
+ d.forEach(window.cancelAnimationFrame), g && window.clearTimeout(g);
2386
551
  };
2387
- }, [r]), /* @__PURE__ */ y.jsxs("div", { ...m, children: [
2388
- o,
2389
- /* @__PURE__ */ y.jsx(
552
+ }, [t]), /* @__PURE__ */ N("div", { ...s, children: [
553
+ e,
554
+ /* @__PURE__ */ i(
2390
555
  "div",
2391
556
  {
2392
557
  className: "transition-all ease-in-out overflow-hidden",
2393
558
  role: "region",
2394
- "aria-hidden": !r,
2395
- ref: f,
2396
- style: { transitionDuration: `${a}ms` },
2397
- children: l
559
+ "aria-hidden": !t,
560
+ ref: o,
561
+ style: { transitionDuration: `${n}ms` },
562
+ children: r
2398
563
  }
2399
564
  )
2400
565
  ] });
2401
566
  }
2402
- const qt = d.forwardRef(({
2403
- children: o,
2404
- position: r = "bottom",
2405
- label: l,
2406
- className: a,
2407
- timeout: m = 150,
2408
- offset: f = { x: 0, y: 6 },
2409
- clientPoint: v = !1,
2410
- disabled: O
2411
- }, p) => {
2412
- const [i, _] = d.useState(!1), c = je(), { refs: s, floatingStyles: b, context: x } = ye({
2413
- nodeId: c,
2414
- open: i,
2415
- placement: r,
567
+ const Re = se(({
568
+ children: e,
569
+ position: t = "bottom",
570
+ label: r,
571
+ className: n,
572
+ timeout: s = 150,
573
+ offset: o = { x: 0, y: 6 },
574
+ clientPoint: l = !1,
575
+ disabled: u
576
+ }, c) => {
577
+ const [d, g] = E(!1), m = Z(), { refs: v, floatingStyles: C, context: p } = _({
578
+ nodeId: m,
579
+ open: d,
580
+ placement: t,
2416
581
  middleware: [
2417
- it(),
2418
- ut(),
2419
- at({ mainAxis: f.y, crossAxis: f.x })
582
+ ae(),
583
+ ue(),
584
+ ce({ mainAxis: o.y, crossAxis: o.x })
2420
585
  ],
2421
- whileElementsMounted: O ? void 0 : st,
2422
- onOpenChange: _
2423
- }), { getReferenceProps: R, getFloatingProps: $ } = Me([
2424
- wt(x, { enabled: !O }),
2425
- Rt(x, { enabled: v })
2426
- ]), { isMounted: U, styles: F } = he(x, {
2427
- duration: m,
586
+ whileElementsMounted: u ? void 0 : le,
587
+ onOpenChange: g
588
+ }), { getReferenceProps: a, getFloatingProps: x } = J([
589
+ xe(p, { enabled: !u }),
590
+ we(p, { enabled: l })
591
+ ]), { isMounted: b, styles: h } = X(p, {
592
+ duration: s,
2428
593
  initial: { opacity: 0, transform: "scale(0.8)" }
2429
594
  });
2430
- d.useImperativeHandle(p, () => ({
2431
- floating: s.floating,
2432
- reference: s.reference,
2433
- open: () => _(!0),
2434
- close: () => _(!1)
2435
- })), d.useEffect(() => {
2436
- O && _(!1);
2437
- }, [O]);
2438
- const Y = typeof o == "string" ? /* @__PURE__ */ y.jsx("span", { children: o }) : o;
2439
- return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
2440
- d.cloneElement(d.Children.only(Y), {
2441
- ref: s.setReference,
2442
- ...R()
595
+ ie(c, () => ({
596
+ floating: v.floating,
597
+ reference: v.reference,
598
+ open: () => g(!0),
599
+ close: () => g(!1)
600
+ })), L(() => {
601
+ u && g(!1);
602
+ }, [u]);
603
+ const y = typeof e == "string" ? /* @__PURE__ */ i("span", { children: e }) : e;
604
+ return /* @__PURE__ */ N(ne, { children: [
605
+ W(z.only(y), {
606
+ ref: v.setReference,
607
+ ...a()
2443
608
  }),
2444
- /* @__PURE__ */ y.jsx(ve, { disabled: O || !U, children: /* @__PURE__ */ y.jsx("div", { role: "tooltip", className: "z-[9999]", ref: s.setFloating, ...$({ style: b }), children: /* @__PURE__ */ y.jsx(ft, { className: a, style: F, children: l }) }) })
609
+ /* @__PURE__ */ i(H, { disabled: u || !b, children: /* @__PURE__ */ i("div", { role: "tooltip", className: "z-9999", ref: v.setFloating, ...x({ style: C }), children: /* @__PURE__ */ i(de, { className: n, style: h, children: r }) }) })
2445
610
  ] });
2446
611
  });
2447
- qt.displayName = "Tooltip";
2448
- const ft = d.forwardRef(({
2449
- className: o,
2450
- custom: r,
2451
- ...l
2452
- }, a) => {
2453
- const m = d.useMemo(() => J(W(
612
+ Re.displayName = "Tooltip";
613
+ const de = se(({
614
+ className: e,
615
+ custom: t,
616
+ ...r
617
+ }, n) => {
618
+ const s = k(() => O(M(
2454
619
  "relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",
2455
- r ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background"
2456
- ), o), [o, r]);
2457
- return /* @__PURE__ */ y.jsx("div", { ref: a, className: m, ...l });
620
+ t ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background"
621
+ ), e), [e, t]);
622
+ return /* @__PURE__ */ i("div", { ref: n, className: s, ...r });
2458
623
  });
2459
- ft.displayName = "TooltipContent";
2460
- function Wt({ variant: o, size: r }) {
2461
- return W(
624
+ de.displayName = "TooltipContent";
625
+ function Pe({ variant: e, size: t }) {
626
+ return M(
2462
627
  "inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer",
2463
628
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2464
629
  "disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",
2465
630
  {
2466
- "bg-primary text-inverted hover:bg-primary-fore": !o || o === "primary",
2467
- "bg-info text-inverted hover:bg-info-fore": o === "info",
2468
- "bg-warn text-inverted hover:bg-warn-fore": o === "warn",
2469
- "bg-danger text-inverted hover:bg-danger-fore": o === "danger",
2470
- "hover:bg-accent": o === "ghost",
2471
- "hover:underline": o === "link",
2472
- "border border-input hover:bg-accent": o === "outline"
631
+ "bg-primary text-inverted hover:bg-primary-fore": !e || e === "primary",
632
+ "bg-info text-inverted hover:bg-info-fore": e === "info",
633
+ "bg-warn text-inverted hover:bg-warn-fore": e === "warn",
634
+ "bg-danger text-inverted hover:bg-danger-fore": e === "danger",
635
+ "hover:bg-accent": e === "ghost",
636
+ "hover:underline": e === "link",
637
+ "border border-input hover:bg-accent": e === "outline"
2473
638
  },
2474
639
  {
2475
- "px-2 py-1": !r,
2476
- "p-1.5": r === "icon"
640
+ "px-2 py-1": !t,
641
+ "p-1.5": t === "icon"
2477
642
  }
2478
643
  );
2479
644
  }
2480
- function ur({ size: o, variant: r, className: l, ...a }) {
2481
- const m = d.useMemo(() => W(Wt({ size: o, variant: r }), l), [o, r, l]);
2482
- return /* @__PURE__ */ y.jsx("button", { className: m, type: "button", ...a });
2483
- }
2484
- function ar({
2485
- open: o,
2486
- children: r,
2487
- timeout: l = 150,
2488
- padding: a = "0.85rem",
2489
- verticalAlign: m = "center",
2490
- closeOnOverlay: f,
2491
- closeOnEsc: v,
2492
- onExited: O,
2493
- className: p,
2494
- onOpenChange: i,
2495
- size: _,
2496
- ...c
645
+ function rt({ size: e, variant: t, className: r, ...n }) {
646
+ const s = k(() => O(Pe({ size: e, variant: t }), r), [e, t, r]);
647
+ return /* @__PURE__ */ i("button", { className: s, type: "button", ...n });
648
+ }
649
+ const Ee = { open: 150, close: 75 };
650
+ function ot({
651
+ open: e,
652
+ children: t,
653
+ timeout: r = Ee,
654
+ padding: n = "0.85rem",
655
+ verticalAlign: s = "center",
656
+ closeOnOverlay: o,
657
+ closeOnEsc: l,
658
+ onExited: u,
659
+ className: c,
660
+ onOpenChange: d,
661
+ size: g,
662
+ ...m
2497
663
  }) {
2498
- const s = d.useRef(O), b = d.useRef(!1), x = je(), { refs: R, context: $ } = ye({ open: o, onOpenChange: i, nodeId: x }), { getFloatingProps: U } = Me([
2499
- Tt($, {
2500
- enabled: v,
2501
- escapeKey: v,
664
+ const v = F(u), C = F(!1), p = Z(), { refs: a, context: x } = _({ open: e, onOpenChange: d, nodeId: p }), { getFloatingProps: b } = J([
665
+ ve(x, {
666
+ enabled: l,
667
+ escapeKey: l,
2502
668
  outsidePress: !1
2503
669
  })
2504
- ]), { isMounted: F, styles: Y } = he($, {
2505
- duration: l,
670
+ ]), { isMounted: h, styles: y } = X(x, {
671
+ duration: r,
2506
672
  initial: { opacity: 0, transform: "scale(0.8)" }
2507
673
  });
2508
- d.useEffect(() => {
2509
- b.current !== F && (b.current = F, !F && s.current?.());
2510
- }, [F]);
2511
- const ee = d.useCallback(() => {
2512
- f && i?.(!1);
2513
- }, [i, f]);
2514
- s.current = O;
2515
- const P = d.useMemo(() => W("grid bg-backdrop z-40 justify-items-center", {
2516
- "place-items-start items-start": m === "start",
2517
- "place-items-end": m === "end",
2518
- "place-items-center": m === "center" || !m
2519
- }), [m]), re = d.useMemo(() => J("transition ease-in-out", p), [p]);
2520
- return /* @__PURE__ */ y.jsx(ve, { disabled: !F, children: /* @__PURE__ */ y.jsx(
2521
- Pe,
674
+ L(() => {
675
+ C.current !== h && (C.current = h, !h && v.current?.());
676
+ }, [h]);
677
+ const R = B(() => {
678
+ o && d?.(!1);
679
+ }, [d, o]);
680
+ v.current = u;
681
+ const S = k(() => M("grid bg-backdrop z-40 justify-items-center transition ease-in-out", {
682
+ "place-items-start items-start": s === "start",
683
+ "place-items-end": s === "end",
684
+ "place-items-center": s === "center" || !s
685
+ }), [s]);
686
+ return /* @__PURE__ */ i(H, { disabled: !h, children: /* @__PURE__ */ i(
687
+ Q,
2522
688
  {
2523
- className: P,
689
+ className: S,
2524
690
  "data-testid": "vs-dialog-overlay",
2525
- onClick: ee,
2526
- style: { padding: a, opacity: Y.opacity },
691
+ onClick: R,
692
+ style: { padding: n, opacity: y.opacity },
2527
693
  lockScroll: !0,
2528
- children: /* @__PURE__ */ y.jsx(
2529
- dt,
694
+ children: /* @__PURE__ */ i(
695
+ Se,
2530
696
  {
2531
- ref: R.setFloating,
2532
- className: re,
697
+ ref: a.setFloating,
698
+ className: c,
2533
699
  role: "dialog",
2534
- size: _,
2535
- style: Y,
2536
- onClick: Ce,
2537
- ...U({ ...c }),
2538
- children: r
700
+ size: g,
701
+ onClick: q,
702
+ ...b({ ...m, style: y }),
703
+ children: t
2539
704
  }
2540
705
  )
2541
706
  }
2542
707
  ) });
2543
708
  }
2544
- const dt = d.forwardRef(({
2545
- size: o,
2546
- className: r,
2547
- ...l
2548
- }, a) => {
2549
- const m = d.useMemo(() => W(
2550
- o ? "flex flex-col bg-background shadow-lg p-5 rounded" : null,
709
+ function Se({ size: e, ...t }) {
710
+ return /* @__PURE__ */ i(
711
+ w,
2551
712
  {
2552
- "w-full max-w-dialog-sm": o === "small",
2553
- "w-full max-w-dialog-md": o === "medium",
2554
- "w-full max-w-dialog-lg": o === "large"
2555
- },
2556
- r
2557
- ), [o, r]);
2558
- return /* @__PURE__ */ y.jsx("div", { ref: a, className: m, ...l });
2559
- });
2560
- dt.displayName = "DialogContent";
2561
- const zt = { open: 250, close: 150 };
2562
- function cr({
2563
- open: o,
2564
- timeout: r = zt,
2565
- onOpenChange: l,
2566
- position: a = "right",
2567
- overlay: m,
2568
- onExited: f,
2569
- onOpen: v,
2570
- ...O
713
+ classList: [
714
+ e ? "flex flex-col bg-background shadow-lg p-5 rounded" : null,
715
+ {
716
+ "w-full max-w-dialog-sm": e === "small",
717
+ "w-full max-w-dialog-md": e === "medium",
718
+ "w-full max-w-dialog-lg": e === "large"
719
+ }
720
+ ],
721
+ ...t
722
+ }
723
+ );
724
+ }
725
+ const Be = { open: 250, close: 150 };
726
+ function it({
727
+ open: e,
728
+ timeout: t = Be,
729
+ onOpenChange: r,
730
+ position: n = "right",
731
+ overlay: s,
732
+ onExited: o,
733
+ onOpen: l,
734
+ ...u
2571
735
  }) {
2572
- const p = je(), i = d.useRef(!1), _ = d.useRef(v), c = d.useRef(f), { refs: s, context: b } = ye({ open: o, onOpenChange: l, nodeId: p }), { isMounted: x, styles: R } = he(b, {
2573
- duration: r,
736
+ const c = Z(), d = F(!1), g = F(l), m = F(o), { refs: v, context: C } = _({ open: e, onOpenChange: r, nodeId: c }), { isMounted: p, styles: a } = X(C, {
737
+ duration: t,
2574
738
  initial() {
2575
- let U = "translateX(75%)";
2576
- return a === "left" ? U = "translateX(-75%)" : a === "top" ? U = "translateY(-75%)" : a === "bottom" && (U = "translateY(75%)"), { opacity: 0, transform: U };
739
+ let b = "translateX(75%)";
740
+ return n === "left" ? b = "translateX(-75%)" : n === "top" ? b = "translateY(-75%)" : n === "bottom" && (b = "translateY(75%)"), { opacity: 0, transform: b };
2577
741
  }
2578
742
  });
2579
- d.useEffect(() => {
2580
- if (i.current !== x) {
2581
- if (i.current = x, x) {
2582
- _.current?.();
743
+ L(() => {
744
+ if (d.current !== p) {
745
+ if (d.current = p, p) {
746
+ g.current?.();
2583
747
  return;
2584
748
  }
2585
- c.current?.();
749
+ m.current?.();
2586
750
  }
2587
- }, [x]);
2588
- const $ = d.useMemo(() => W(
751
+ }, [p]);
752
+ const x = k(() => M(
2589
753
  "fixed transition-transform z-30",
2590
754
  {
2591
- "top-0 right-0 h-full max-h-screen": a === "right",
2592
- "top-0 left-0 h-full max-h-screen": a === "left",
2593
- "top-0 left-0 right-0 w-full max-w-screen": a === "top",
2594
- "bottom-0 left-0 right-0 w-full max-w-screen": a === "bottom"
2595
- }
2596
- ), [a]);
2597
- return c.current = f, _.current = v, /* @__PURE__ */ y.jsxs(ve, { disabled: !x, children: [
2598
- m ? /* @__PURE__ */ y.jsx(
2599
- Pe,
755
+ "top-0 right-0 h-full max-h-screen": n === "right",
756
+ "top-0 left-0 h-full max-h-screen": n === "left",
757
+ "top-0 left-0 right-0 w-full max-w-screen": n === "top",
758
+ "bottom-0 left-0 right-0 w-full max-w-screen": n === "bottom"
759
+ }
760
+ ), [n]);
761
+ return m.current = o, g.current = l, /* @__PURE__ */ N(H, { disabled: !p, children: [
762
+ s ? /* @__PURE__ */ i(
763
+ Q,
2600
764
  {
2601
765
  className: "bg-backdrop",
2602
- style: { opacity: R.opacity },
2603
- onClick: () => l?.(!1)
766
+ style: { opacity: a.opacity },
767
+ onClick: () => r?.(!1)
2604
768
  }
2605
769
  ) : null,
2606
- /* @__PURE__ */ y.jsx(
770
+ /* @__PURE__ */ i(
2607
771
  "div",
2608
772
  {
2609
- ref: s.setFloating,
2610
- className: $,
773
+ ref: v.setFloating,
774
+ className: x,
2611
775
  role: "dialog",
2612
- style: R,
2613
- children: /* @__PURE__ */ y.jsx(Gt, { ...O })
776
+ style: a,
777
+ children: /* @__PURE__ */ i(De, { ...u })
2614
778
  }
2615
779
  )
2616
780
  ] });
2617
781
  }
2618
- function Gt({ className: o, unstyled: r, ...l }) {
2619
- const a = d.useMemo(() => r ? o : J(W(
782
+ function De({ className: e, customStyle: t, ...r }) {
783
+ const n = k(() => t ? e : O(M(
2620
784
  "relative bg-background min-w-full min-h-full border border-input shadow-lg"
2621
- ), o), [r, o]);
2622
- return /* @__PURE__ */ y.jsx("div", { className: a, ...l });
2623
- }
2624
- function Bt({ size: o = 20, label: r = "Loading...", ...l }) {
2625
- return /* @__PURE__ */ y.jsxs("div", { role: "status", ...l, children: [
2626
- /* @__PURE__ */ y.jsxs("svg", { "aria-hidden": "true", className: "text-accent animate-spin fill-primary", width: o, height: o, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2627
- /* @__PURE__ */ y.jsx("path", { d: "M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z", fill: "currentColor" }),
2628
- /* @__PURE__ */ y.jsx("path", { d: "M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z", fill: "currentFill" })
785
+ ), e), [t, e]);
786
+ return /* @__PURE__ */ i("div", { className: n, ...r });
787
+ }
788
+ function $e({ size: e = 20, label: t = "Loading...", ...r }) {
789
+ return /* @__PURE__ */ N("div", { role: "status", ...r, children: [
790
+ /* @__PURE__ */ N("svg", { "aria-hidden": "true", className: "text-accent animate-spin fill-primary", width: e, height: e, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
791
+ /* @__PURE__ */ i("path", { d: "M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z", fill: "currentColor" }),
792
+ /* @__PURE__ */ i("path", { d: "M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z", fill: "currentFill" })
2629
793
  ] }),
2630
- /* @__PURE__ */ y.jsx("span", { className: "sr-only", children: r })
794
+ /* @__PURE__ */ i("span", { className: "sr-only", children: t })
2631
795
  ] });
2632
796
  }
2633
- function Vt({ type: o, label: r, message: l }) {
2634
- const { icons: a } = Qt();
2635
- return /* @__PURE__ */ y.jsxs("div", { className: "flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2", children: [
2636
- o ? /* @__PURE__ */ y.jsxs("figure", { className: "mr-2", children: [
2637
- o === "success" && a?.success ? a.success : null,
2638
- o === "info" && a?.info ? a.info : null,
2639
- o === "error" && a?.error ? a.error : null,
2640
- o === "warn" && a?.warn ? a.warn : null,
2641
- o === "loading" ? /* @__PURE__ */ y.jsx(Bt, { size: 20 }) : null
797
+ function je({ type: e, label: t, message: r }) {
798
+ const { icons: n } = Xe();
799
+ return /* @__PURE__ */ N("div", { className: "flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2", children: [
800
+ e ? /* @__PURE__ */ N("figure", { className: "mr-2", children: [
801
+ e === "success" && n?.success ? n.success : null,
802
+ e === "info" && n?.info ? n.info : null,
803
+ e === "error" && n?.error ? n.error : null,
804
+ e === "warn" && n?.warn ? n.warn : null,
805
+ e === "loading" ? /* @__PURE__ */ i($e, { size: 20 }) : null
2642
806
  ] }) : null,
2643
- /* @__PURE__ */ y.jsxs("div", { className: "space-y-2", children: [
2644
- /* @__PURE__ */ y.jsx("p", { className: "font-medium leading-none", children: r }),
2645
- l ? /* @__PURE__ */ y.jsx("p", { children: l }) : null
807
+ /* @__PURE__ */ N("div", { className: "space-y-2", children: [
808
+ /* @__PURE__ */ i("p", { className: "font-medium leading-none", children: t }),
809
+ r ? /* @__PURE__ */ i("p", { children: r }) : null
2646
810
  ] })
2647
811
  ] });
2648
812
  }
2649
- function ot() {
813
+ function te() {
2650
814
  }
2651
- class Xt {
815
+ class Oe {
2652
816
  /** システムで1つしか存在しない前提とする */
2653
- notify = ot;
817
+ notify = te;
2654
818
  lastId = 0;
2655
819
  /** internal use only */
2656
- subscribe = (r) => (this.notify = r, () => {
2657
- this.notify = ot;
820
+ subscribe = (t) => (this.notify = t, () => {
821
+ this.notify = te;
2658
822
  });
2659
- add = (r, l = {}) => {
823
+ add = (t, r = {}) => {
2660
824
  this.lastId += 1;
2661
- const a = `${this.lastId}`;
2662
- return this.notify({ id: a, type: "add", config: { id: a, label: r, ...l } }), a;
825
+ const n = `${this.lastId}`;
826
+ return this.notify({ id: n, type: "add", config: { id: n, label: t, ...r } }), n;
2663
827
  };
2664
828
  /** 表示中のtoastを修正します。promiseのロード状態を表示することなどに使います */
2665
- update = (r, l) => {
2666
- this.notify({ id: r, type: "update", config: l });
829
+ update = (t, r) => {
830
+ this.notify({ id: t, type: "update", config: r });
2667
831
  };
2668
- remove = (r) => {
2669
- this.notify({ id: r, type: "remove" });
832
+ remove = (t) => {
833
+ this.notify({ id: t, type: "remove" });
2670
834
  };
2671
835
  clear = () => {
2672
836
  this.lastId = 0;
2673
837
  };
2674
838
  }
2675
- const pt = new Xt();
2676
- function Kt({
2677
- id: o,
2678
- type: r,
2679
- index: l,
2680
- duration: a = 5e3,
2681
- className: m,
2682
- children: f,
2683
- inverted: v,
2684
- timeout: O = 250,
2685
- max: p = 3
839
+ const fe = new Oe();
840
+ function _e({
841
+ id: e,
842
+ type: t,
843
+ index: r,
844
+ duration: n = 5e3,
845
+ className: s,
846
+ children: o,
847
+ inverted: l,
848
+ timeout: u = 250,
849
+ max: c = 3
2686
850
  }) {
2687
- const i = d.useRef(!1), [_, c] = d.useState(!1), { context: s, refs: b } = ye({ open: _, onOpenChange: c, nodeId: o }), { isMounted: x, styles: R } = he(s, {
2688
- duration: O,
2689
- initial: { opacity: 0, transform: `translateY(${v ? "" : "-"}50%)` }
851
+ const d = F(!1), [g, m] = E(!1), { context: v, refs: C } = _({ open: g, onOpenChange: m, nodeId: e }), { isMounted: p, styles: a } = X(v, {
852
+ duration: u,
853
+ initial: { opacity: 0, transform: `translateY(${l ? "" : "-"}50%)` }
2690
854
  });
2691
- d.useLayoutEffect(() => {
2692
- c(l <= p);
2693
- }, [l, p]), d.useEffect(() => {
2694
- i.current !== x && (x || pt.remove(o), i.current = x);
2695
- }, [x, o]), d.useEffect(() => {
2696
- if (!a) return;
2697
- const F = window.setTimeout(() => c(!1), a);
2698
- return () => window.clearTimeout(F);
2699
- }, [a, o]);
2700
- const $ = d.useCallback(() => {
2701
- r !== "loading" && c(!1);
2702
- }, [r]), U = d.useMemo(() => W(
855
+ oe(() => {
856
+ m(r <= c);
857
+ }, [r, c]), L(() => {
858
+ d.current !== p && (p || fe.remove(e), d.current = p);
859
+ }, [p, e]), L(() => {
860
+ if (!n) return;
861
+ const h = window.setTimeout(() => m(!1), n);
862
+ return () => window.clearTimeout(h);
863
+ }, [n, e]);
864
+ const x = B(() => {
865
+ t !== "loading" && m(!1);
866
+ }, [t]), b = k(() => U(
2703
867
  "relative flex w-fit transition-transform ease-in-out cursor-pointer",
2704
- m
2705
- ), [m]);
2706
- return x ? /* @__PURE__ */ y.jsx(
868
+ s
869
+ ), [s]);
870
+ return p ? /* @__PURE__ */ i(
2707
871
  "li",
2708
872
  {
2709
873
  role: "log",
2710
874
  tabIndex: -1,
2711
- ref: b.setFloating,
2712
- className: U,
2713
- style: R,
2714
- onClick: $,
2715
- children: f
875
+ ref: C.setFloating,
876
+ className: b,
877
+ style: a,
878
+ onClick: x,
879
+ children: o
2716
880
  }
2717
881
  ) : null;
2718
882
  }
2719
- const mt = d.createContext({});
2720
- function Qt() {
2721
- return d.useContext(mt);
2722
- }
2723
- function lr({
2724
- className: o,
2725
- margin: r = 16,
2726
- position: l = "top-left",
2727
- max: a,
2728
- ListItem: m = Vt,
2729
- icons: f
883
+ const pe = me({});
884
+ function Xe() {
885
+ return he(pe);
886
+ }
887
+ function st({
888
+ className: e,
889
+ margin: t = 16,
890
+ position: r = "top-left",
891
+ max: n,
892
+ ListItem: s = je,
893
+ icons: o
2730
894
  }) {
2731
- const v = d.useMemo(() => {
2732
- const R = { position: "fixed" };
2733
- return l.indexOf("top") > -1 ? R.top = r : l.indexOf("bottom") > -1 && (R.bottom = r), l.indexOf("left") > -1 ? (R.left = r, R.alignItems = "flex-start") : l.indexOf("right") > -1 ? (R.right = r, R.alignItems = "flex-end") : (R.left = "50%", R.alignItems = "center", R.transform = "translateX(-50%)"), R;
2734
- }, [r, l]), O = d.useMemo(() => W(
895
+ const l = k(() => {
896
+ const a = { position: "fixed" };
897
+ return r.indexOf("top") > -1 ? a.top = t : r.indexOf("bottom") > -1 && (a.bottom = t), r.indexOf("left") > -1 ? (a.left = t, a.alignItems = "flex-start") : r.indexOf("right") > -1 ? (a.right = t, a.alignItems = "flex-end") : (a.left = "50%", a.alignItems = "center", a.transform = "translateX(-50%)"), a;
898
+ }, [t, r]), u = k(() => U(
2735
899
  "flex flex-col z-40 overflow-hidden",
2736
- o
2737
- ), [o]), p = d.useMemo(() => l?.startsWith("bottom") || !1, [l]), i = d.useRef(/* @__PURE__ */ new Map()), [_, c] = d.useState([]), s = d.useState(0)[1];
2738
- De(() => pt.subscribe((R) => {
2739
- d.startTransition(() => {
2740
- if (R.type === "add")
2741
- i.current.set(R.id, R.config), c(($) => [...$, R.id]);
2742
- else if (R.type === "remove") {
2743
- if (!i.current.delete(R.id)) return;
2744
- c((U) => {
2745
- const F = new Set(U);
2746
- return F.has(R.id) ? (F.delete(R.id), Array.from(F)) : U;
900
+ e
901
+ ), [e]), c = k(() => r?.startsWith("bottom") || !1, [r]), d = F(/* @__PURE__ */ new Map()), [g, m] = E([]), v = E(0)[1];
902
+ V(() => fe.subscribe((a) => {
903
+ ge(() => {
904
+ if (a.type === "add")
905
+ d.current.set(a.id, a.config), m((x) => [...x, a.id]);
906
+ else if (a.type === "remove") {
907
+ if (!d.current.delete(a.id)) return;
908
+ m((b) => {
909
+ const h = new Set(b);
910
+ return h.has(a.id) ? (h.delete(a.id), Array.from(h)) : b;
2747
911
  });
2748
- } else if (R.type === "update") {
2749
- const $ = i.current.get(R.id);
2750
- if (!$) return;
2751
- i.current.set(R.id, { ...$, ...R.config }), s((U) => U + 1);
912
+ } else if (a.type === "update") {
913
+ const x = d.current.get(a.id);
914
+ if (!x) return;
915
+ d.current.set(a.id, { ...x, ...a.config }), v((b) => b + 1);
2752
916
  }
2753
917
  });
2754
918
  }), []);
2755
- const b = d.useMemo(() => ({ icons: f }), [f]), x = _.length;
2756
- return /* @__PURE__ */ y.jsx(ve, { children: /* @__PURE__ */ y.jsx("ol", { className: O, style: v, "aria-live": "polite", children: /* @__PURE__ */ y.jsx(mt.Provider, { value: b, children: _.map((R, $) => {
2757
- const U = i.current.get(R);
2758
- if (!U) return null;
2759
- const { className: F, duration: Y, ...ee } = U;
2760
- return /* @__PURE__ */ y.jsx(
2761
- Kt,
919
+ const C = k(() => ({ icons: o }), [o]), p = g.length;
920
+ return /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i("ol", { className: u, style: l, "aria-live": "polite", children: /* @__PURE__ */ i(pe.Provider, { value: C, children: g.map((a, x) => {
921
+ const b = d.current.get(a);
922
+ if (!b) return null;
923
+ const { className: h, duration: y, ...R } = b;
924
+ return /* @__PURE__ */ i(
925
+ _e,
2762
926
  {
2763
- id: R,
2764
- index: x - $,
2765
- className: F,
2766
- duration: Y,
2767
- inverted: p,
2768
- max: a,
2769
- children: d.createElement(m, ee)
927
+ id: a,
928
+ index: p - x,
929
+ className: h,
930
+ duration: y,
931
+ inverted: c,
932
+ max: n,
933
+ children: re(s, R)
2770
934
  },
2771
- R
935
+ a
2772
936
  );
2773
937
  }) }) }) });
2774
938
  }
2775
- function fr({ className: o, ...r }) {
2776
- const l = d.useMemo(() => J(
2777
- "inline-block animate-pulse rounded-md bg-accent",
2778
- o
2779
- ), [o]);
2780
- return /* @__PURE__ */ y.jsx("div", { className: l, ...r });
939
+ function lt(e) {
940
+ return /* @__PURE__ */ i(w, { classList: "inline-block animate-pulse rounded-md bg-accent", ...e });
2781
941
  }
2782
- function dr({ className: o, ...r }) {
2783
- const l = d.useMemo(() => W(
2784
- "flex items-center justify-center",
2785
- "[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr",
2786
- "[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",
2787
- o
2788
- ), [o]);
2789
- return /* @__PURE__ */ y.jsx("div", { role: "group", className: l, ...r });
942
+ function at(e) {
943
+ return /* @__PURE__ */ i(
944
+ w,
945
+ {
946
+ role: "group",
947
+ classList: [
948
+ "flex items-center justify-center",
949
+ "[&_button]:rounded-none **:first:rounded-bl **:first:rounded-tl **:last:rounded-br **:last:rounded-tr",
950
+ "**:first:border-r-0 **:last:border-l-0"
951
+ ],
952
+ ...e
953
+ }
954
+ );
2790
955
  }
2791
- function pr({ value: o, max: r, className: l, ...a }) {
2792
- const m = d.useMemo(() => o ? Math.round(o / r * 100) : 0, [o, r]), f = d.useMemo(() => J("relative overflow-hidden rounded-full bg-primary", l), [l]);
2793
- return /* @__PURE__ */ y.jsx("div", { role: "progressbar", className: f, "aria-valuemax": r, "aria-valuemin": 0, ...a, children: /* @__PURE__ */ y.jsx(
2794
- "div",
956
+ function ut({ value: e, max: t, ...r }) {
957
+ const n = k(() => e ? Math.min(100, Math.round(e / t * 100)) : 0, [e, t]);
958
+ return /* @__PURE__ */ i(
959
+ w,
2795
960
  {
2796
- className: "h-full w-full flex-1 bg-input transition-all origin-right",
2797
- style: { transform: `translateX(${m > 100 ? 100 : m}%)` }
961
+ role: "progressbar",
962
+ classList: "relative overflow-hidden rounded-full bg-primary",
963
+ "aria-valuemax": t,
964
+ "aria-valuemin": 0,
965
+ ...r,
966
+ children: /* @__PURE__ */ i(
967
+ w,
968
+ {
969
+ className: "h-full w-full flex-1 bg-input transition-all origin-right",
970
+ style: { transform: `translateX(${n}%)` }
971
+ }
972
+ )
2798
973
  }
2799
- ) });
974
+ );
2800
975
  }
2801
- function mr({ className: o, orientation: r = "horizontal", ...l }) {
2802
- const a = d.useMemo(() => J(W(
2803
- "border-0 p-0 shrink-0 bg-input",
2804
- r === "horizontal" ? "h-[1px] w-full" : "w-[1px] h-full"
2805
- ), o), [o, r]);
2806
- return /* @__PURE__ */ y.jsx("hr", { className: a, role: "none", ...l });
976
+ function ct({ orientation: e = "horizontal", ...t }) {
977
+ return /* @__PURE__ */ i(
978
+ w,
979
+ {
980
+ as: "hr",
981
+ role: "none",
982
+ classList: [
983
+ "border-0 p-0 shrink-0 bg-input",
984
+ e === "horizontal" ? "h-px w-full" : "w-px h-full"
985
+ ],
986
+ ...t
987
+ }
988
+ );
2807
989
  }
2808
990
  export {
2809
- ir as Accordion,
2810
- ur as Button,
2811
- dr as ButtonGroup,
2812
- nr as Checkbox,
2813
- ar as Dialog,
2814
- mr as Divider,
2815
- tr as FormField,
2816
- kt as FormLabel,
2817
- Nt as Input,
2818
- rr as InputField,
2819
- ct as Popover,
2820
- ve as Portal,
2821
- pr as Progress,
2822
- sr as Radio,
2823
- or as Select,
2824
- cr as Sheet,
2825
- fr as Skeleton,
2826
- Bt as Spinner,
2827
- Ft as Switch,
2828
- Mt as Textarea,
2829
- lr as Toast,
2830
- Vt as ToastItem,
2831
- qt as Tooltip,
2832
- hr as clsx,
2833
- J as merge,
2834
- pt as toast,
2835
- Wt as varientButton
991
+ nt as Accordion,
992
+ w as Base,
993
+ rt as Button,
994
+ at as ButtonGroup,
995
+ Qe as Checkbox,
996
+ ot as Dialog,
997
+ ct as Divider,
998
+ Ke as FormField,
999
+ ke as FormLabel,
1000
+ Ue as Input,
1001
+ Ge as InputField,
1002
+ Te as Popover,
1003
+ H as Portal,
1004
+ ut as Progress,
1005
+ et as Radio,
1006
+ Ve as Select,
1007
+ it as Sheet,
1008
+ lt as Skeleton,
1009
+ $e as Spinner,
1010
+ tt as Switch,
1011
+ Je as Textarea,
1012
+ st as Toast,
1013
+ je as ToastItem,
1014
+ Re as Tooltip,
1015
+ M as cn,
1016
+ O as merge,
1017
+ fe as toast,
1018
+ Pe as varientButton
2836
1019
  };