@aveonline/ui-react
Version:
Home base for Aveonline design system - ecosystem react
1,410 lines (1,407 loc) • 2.42 MB
JavaScript
import * as M from "react";
import u, { useState as pe, useEffect as ve, useCallback as Je, forwardRef as qe, useLayoutEffect as k1, useRef as ce, Fragment as un, isValidElement as In, cloneElement as ln, createElement as Ke, createContext as Pt, useContext as wt, useMemo as we, useReducer as N1, createRef as H4, Component as c7, Children as Bn, PureComponent as Fr, memo as B0 } from "react";
import * as $P from "react-dom";
import E2, { createPortal as P0, flushSync as F0, unstable_batchedUpdates as lc } from "react-dom";
var ts = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function jt(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function XP(e) {
if (e.__esModule)
return e;
var t = e.default;
if (typeof t == "function") {
var n = function r() {
return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
};
n.prototype = t.prototype;
} else
n = {};
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
var i = Object.getOwnPropertyDescriptor(e, r);
Object.defineProperty(n, r, i.get ? i : {
enumerable: !0,
get: function() {
return e[r];
}
});
}), n;
}
var z4 = { exports: {} }, Ll = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Sf;
function YP() {
if (Sf)
return Ll;
Sf = 1;
var e = u, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
function o(l, s, c) {
var d, f = {}, h = null, p = null;
c !== void 0 && (h = "" + c), s.key !== void 0 && (h = "" + s.key), s.ref !== void 0 && (p = s.ref);
for (d in s)
r.call(s, d) && !a.hasOwnProperty(d) && (f[d] = s[d]);
if (l && l.defaultProps)
for (d in s = l.defaultProps, s)
f[d] === void 0 && (f[d] = s[d]);
return { $$typeof: t, type: l, key: h, ref: p, props: f, _owner: i.current };
}
return Ll.Fragment = n, Ll.jsx = o, Ll.jsxs = o, Ll;
}
var jl = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Mf;
function UP() {
return Mf || (Mf = 1, process.env.NODE_ENV !== "production" && function() {
var e = u, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), l = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, m = "@@iterator";
function g(U) {
if (U === null || typeof U != "object")
return null;
var le = v && U[v] || U[m];
return typeof le == "function" ? le : null;
}
var C = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function y(U) {
{
for (var le = arguments.length, ge = new Array(le > 1 ? le - 1 : 0), Ie = 1; Ie < le; Ie++)
ge[Ie - 1] = arguments[Ie];
x("error", U, ge);
}
}
function x(U, le, ge) {
{
var Ie = C.ReactDebugCurrentFrame, ht = Ie.getStackAddendum();
ht !== "" && (le += "%s", ge = ge.concat([ht]));
var At = ge.map(function(Xe) {
return String(Xe);
});
At.unshift("Warning: " + le), Function.prototype.apply.call(console[U], console, At);
}
}
var b = !1, E = !1, w = !1, I = !1, S = !1, O;
O = Symbol.for("react.module.reference");
function B(U) {
return !!(typeof U == "string" || typeof U == "function" || U === r || U === a || S || U === i || U === c || U === d || I || U === p || b || E || w || typeof U == "object" && U !== null && (U.$$typeof === h || U.$$typeof === f || U.$$typeof === o || U.$$typeof === l || U.$$typeof === s || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
U.$$typeof === O || U.getModuleId !== void 0));
}
function P(U, le, ge) {
var Ie = U.displayName;
if (Ie)
return Ie;
var ht = le.displayName || le.name || "";
return ht !== "" ? ge + "(" + ht + ")" : ge;
}
function F(U) {
return U.displayName || "Context";
}
function D(U) {
if (U == null)
return null;
if (typeof U.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof U == "function")
return U.displayName || U.name || null;
if (typeof U == "string")
return U;
switch (U) {
case r:
return "Fragment";
case n:
return "Portal";
case a:
return "Profiler";
case i:
return "StrictMode";
case c:
return "Suspense";
case d:
return "SuspenseList";
}
if (typeof U == "object")
switch (U.$$typeof) {
case l:
var le = U;
return F(le) + ".Consumer";
case o:
var ge = U;
return F(ge._context) + ".Provider";
case s:
return P(U, U.render, "ForwardRef");
case f:
var Ie = U.displayName || null;
return Ie !== null ? Ie : D(U.type) || "Memo";
case h: {
var ht = U, At = ht._payload, Xe = ht._init;
try {
return D(Xe(At));
} catch {
return null;
}
}
}
return null;
}
var R = Object.assign, j = 0, T, G, N, Q, k, K, z;
function H() {
}
H.__reactDisabledLog = !0;
function $() {
{
if (j === 0) {
T = console.log, G = console.info, N = console.warn, Q = console.error, k = console.group, K = console.groupCollapsed, z = console.groupEnd;
var U = {
configurable: !0,
enumerable: !0,
value: H,
writable: !0
};
Object.defineProperties(console, {
info: U,
log: U,
warn: U,
error: U,
group: U,
groupCollapsed: U,
groupEnd: U
});
}
j++;
}
}
function Z() {
{
if (j--, j === 0) {
var U = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: R({}, U, {
value: T
}),
info: R({}, U, {
value: G
}),
warn: R({}, U, {
value: N
}),
error: R({}, U, {
value: Q
}),
group: R({}, U, {
value: k
}),
groupCollapsed: R({}, U, {
value: K
}),
groupEnd: R({}, U, {
value: z
})
});
}
j < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var J = C.ReactCurrentDispatcher, q;
function oe(U, le, ge) {
{
if (q === void 0)
try {
throw Error();
} catch (ht) {
var Ie = ht.stack.trim().match(/\n( *(at )?)/);
q = Ie && Ie[1] || "";
}
return `
` + q + U;
}
}
var te = !1, W;
{
var ne = typeof WeakMap == "function" ? WeakMap : Map;
W = new ne();
}
function V(U, le) {
if (!U || te)
return "";
{
var ge = W.get(U);
if (ge !== void 0)
return ge;
}
var Ie;
te = !0;
var ht = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var At;
At = J.current, J.current = null, $();
try {
if (le) {
var Xe = function() {
throw Error();
};
if (Object.defineProperty(Xe.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(Xe, []);
} catch (qt) {
Ie = qt;
}
Reflect.construct(U, [], Xe);
} else {
try {
Xe.call();
} catch (qt) {
Ie = qt;
}
U.call(Xe.prototype);
}
} else {
try {
throw Error();
} catch (qt) {
Ie = qt;
}
U();
}
} catch (qt) {
if (qt && Ie && typeof qt.stack == "string") {
for (var Ye = qt.stack.split(`
`), Ct = Ie.stack.split(`
`), yt = Ye.length - 1, Ft = Ct.length - 1; yt >= 1 && Ft >= 0 && Ye[yt] !== Ct[Ft]; )
Ft--;
for (; yt >= 1 && Ft >= 0; yt--, Ft--)
if (Ye[yt] !== Ct[Ft]) {
if (yt !== 1 || Ft !== 1)
do
if (yt--, Ft--, Ft < 0 || Ye[yt] !== Ct[Ft]) {
var dn = `
` + Ye[yt].replace(" at new ", " at ");
return U.displayName && dn.includes("<anonymous>") && (dn = dn.replace("<anonymous>", U.displayName)), typeof U == "function" && W.set(U, dn), dn;
}
while (yt >= 1 && Ft >= 0);
break;
}
}
} finally {
te = !1, J.current = At, Z(), Error.prepareStackTrace = ht;
}
var Qt = U ? U.displayName || U.name : "", vr = Qt ? oe(Qt) : "";
return typeof U == "function" && W.set(U, vr), vr;
}
function ue(U, le, ge) {
return V(U, !1);
}
function ae(U) {
var le = U.prototype;
return !!(le && le.isReactComponent);
}
function se(U, le, ge) {
if (U == null)
return "";
if (typeof U == "function")
return V(U, ae(U));
if (typeof U == "string")
return oe(U);
switch (U) {
case c:
return oe("Suspense");
case d:
return oe("SuspenseList");
}
if (typeof U == "object")
switch (U.$$typeof) {
case s:
return ue(U.render);
case f:
return se(U.type, le, ge);
case h: {
var Ie = U, ht = Ie._payload, At = Ie._init;
try {
return se(At(ht), le, ge);
} catch {
}
}
}
return "";
}
var me = Object.prototype.hasOwnProperty, L = {}, _ = C.ReactDebugCurrentFrame;
function ee(U) {
if (U) {
var le = U._owner, ge = se(U.type, U._source, le ? le.type : null);
_.setExtraStackFrame(ge);
} else
_.setExtraStackFrame(null);
}
function ie(U, le, ge, Ie, ht) {
{
var At = Function.call.bind(me);
for (var Xe in U)
if (At(U, Xe)) {
var Ye = void 0;
try {
if (typeof U[Xe] != "function") {
var Ct = Error((Ie || "React class") + ": " + ge + " type `" + Xe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof U[Xe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw Ct.name = "Invariant Violation", Ct;
}
Ye = U[Xe](le, Xe, Ie, ge, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (yt) {
Ye = yt;
}
Ye && !(Ye instanceof Error) && (ee(ht), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Ie || "React class", ge, Xe, typeof Ye), ee(null)), Ye instanceof Error && !(Ye.message in L) && (L[Ye.message] = !0, ee(ht), y("Failed %s type: %s", ge, Ye.message), ee(null));
}
}
}
var fe = Array.isArray;
function Ce(U) {
return fe(U);
}
function Qe(U) {
{
var le = typeof Symbol == "function" && Symbol.toStringTag, ge = le && U[Symbol.toStringTag] || U.constructor.name || "Object";
return ge;
}
}
function Ne(U) {
try {
return Pe(U), !1;
} catch {
return !0;
}
}
function Pe(U) {
return "" + U;
}
function je(U) {
if (Ne(U))
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(U)), Pe(U);
}
var Ee = C.ReactCurrentOwner, _e = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, Ue, lt, gt;
gt = {};
function Yt(U) {
if (me.call(U, "ref")) {
var le = Object.getOwnPropertyDescriptor(U, "ref").get;
if (le && le.isReactWarning)
return !1;
}
return U.ref !== void 0;
}
function Kt(U) {
if (me.call(U, "key")) {
var le = Object.getOwnPropertyDescriptor(U, "key").get;
if (le && le.isReactWarning)
return !1;
}
return U.key !== void 0;
}
function Me(U, le) {
if (typeof U.ref == "string" && Ee.current && le && Ee.current.stateNode !== le) {
var ge = D(Ee.current.type);
gt[ge] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', D(Ee.current.type), U.ref), gt[ge] = !0);
}
}
function Te(U, le) {
{
var ge = function() {
Ue || (Ue = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", le));
};
ge.isReactWarning = !0, Object.defineProperty(U, "key", {
get: ge,
configurable: !0
});
}
}
function He(U, le) {
{
var ge = function() {
lt || (lt = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", le));
};
ge.isReactWarning = !0, Object.defineProperty(U, "ref", {
get: ge,
configurable: !0
});
}
}
var Ve = function(U, le, ge, Ie, ht, At, Xe) {
var Ye = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: t,
// Built-in properties that belong on the element
type: U,
key: le,
ref: ge,
props: Xe,
// Record the component responsible for creating this element.
_owner: At
};
return Ye._store = {}, Object.defineProperty(Ye._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(Ye, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Ie
}), Object.defineProperty(Ye, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: ht
}), Object.freeze && (Object.freeze(Ye.props), Object.freeze(Ye)), Ye;
};
function xe(U, le, ge, Ie, ht) {
{
var At, Xe = {}, Ye = null, Ct = null;
ge !== void 0 && (je(ge), Ye = "" + ge), Kt(le) && (je(le.key), Ye = "" + le.key), Yt(le) && (Ct = le.ref, Me(le, ht));
for (At in le)
me.call(le, At) && !_e.hasOwnProperty(At) && (Xe[At] = le[At]);
if (U && U.defaultProps) {
var yt = U.defaultProps;
for (At in yt)
Xe[At] === void 0 && (Xe[At] = yt[At]);
}
if (Ye || Ct) {
var Ft = typeof U == "function" ? U.displayName || U.name || "Unknown" : U;
Ye && Te(Xe, Ft), Ct && He(Xe, Ft);
}
return Ve(U, Ye, Ct, ht, Ie, Ee.current, Xe);
}
}
var $e = C.ReactCurrentOwner, tt = C.ReactDebugCurrentFrame;
function Re(U) {
if (U) {
var le = U._owner, ge = se(U.type, U._source, le ? le.type : null);
tt.setExtraStackFrame(ge);
} else
tt.setExtraStackFrame(null);
}
var Ae;
Ae = !1;
function Oe(U) {
return typeof U == "object" && U !== null && U.$$typeof === t;
}
function De() {
{
if ($e.current) {
var U = D($e.current.type);
if (U)
return `
Check the render method of \`` + U + "`.";
}
return "";
}
}
function ct(U) {
{
if (U !== void 0) {
var le = U.fileName.replace(/^.*[\\\/]/, ""), ge = U.lineNumber;
return `
Check your code at ` + le + ":" + ge + ".";
}
return "";
}
}
var Ge = {};
function Ze(U) {
{
var le = De();
if (!le) {
var ge = typeof U == "string" ? U : U.displayName || U.name;
ge && (le = `
Check the top-level render call using <` + ge + ">.");
}
return le;
}
}
function ut(U, le) {
{
if (!U._store || U._store.validated || U.key != null)
return;
U._store.validated = !0;
var ge = Ze(le);
if (Ge[ge])
return;
Ge[ge] = !0;
var Ie = "";
U && U._owner && U._owner !== $e.current && (Ie = " It was passed a child from " + D(U._owner.type) + "."), Re(U), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ge, Ie), Re(null);
}
}
function Le(U, le) {
{
if (typeof U != "object")
return;
if (Ce(U))
for (var ge = 0; ge < U.length; ge++) {
var Ie = U[ge];
Oe(Ie) && ut(Ie, le);
}
else if (Oe(U))
U._store && (U._store.validated = !0);
else if (U) {
var ht = g(U);
if (typeof ht == "function" && ht !== U.entries)
for (var At = ht.call(U), Xe; !(Xe = At.next()).done; )
Oe(Xe.value) && ut(Xe.value, le);
}
}
}
function nt(U) {
{
var le = U.type;
if (le == null || typeof le == "string")
return;
var ge;
if (typeof le == "function")
ge = le.propTypes;
else if (typeof le == "object" && (le.$$typeof === s || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
le.$$typeof === f))
ge = le.propTypes;
else
return;
if (ge) {
var Ie = D(le);
ie(ge, U.props, "prop", Ie, U);
} else if (le.PropTypes !== void 0 && !Ae) {
Ae = !0;
var ht = D(le);
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ht || "Unknown");
}
typeof le.getDefaultProps == "function" && !le.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function rt(U) {
{
for (var le = Object.keys(U.props), ge = 0; ge < le.length; ge++) {
var Ie = le[ge];
if (Ie !== "children" && Ie !== "key") {
Re(U), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Ie), Re(null);
break;
}
}
U.ref !== null && (Re(U), y("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
}
}
function It(U, le, ge, Ie, ht, At) {
{
var Xe = B(U);
if (!Xe) {
var Ye = "";
(U === void 0 || typeof U == "object" && U !== null && Object.keys(U).length === 0) && (Ye += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var Ct = ct(ht);
Ct ? Ye += Ct : Ye += De();
var yt;
U === null ? yt = "null" : Ce(U) ? yt = "array" : U !== void 0 && U.$$typeof === t ? (yt = "<" + (D(U.type) || "Unknown") + " />", Ye = " Did you accidentally export a JSX literal instead of a component?") : yt = typeof U, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", yt, Ye);
}
var Ft = xe(U, le, ge, ht, At);
if (Ft == null)
return Ft;
if (Xe) {
var dn = le.children;
if (dn !== void 0)
if (Ie)
if (Ce(dn)) {
for (var Qt = 0; Qt < dn.length; Qt++)
Le(dn[Qt], U);
Object.freeze && Object.freeze(dn);
} else
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
Le(dn, U);
}
return U === r ? rt(Ft) : nt(Ft), Ft;
}
}
function nn(U, le, ge) {
return It(U, le, ge, !0);
}
function xn(U, le, ge) {
return It(U, le, ge, !1);
}
var Ht = xn, ot = nn;
jl.Fragment = r, jl.jsx = Ht, jl.jsxs = ot;
}()), jl;
}
process.env.NODE_ENV === "production" ? z4.exports = YP() : z4.exports = UP();
var A = z4.exports, eA = { exports: {} };
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
(function(e) {
(function() {
var t = {}.hasOwnProperty;
function n() {
for (var r = [], i = 0; i < arguments.length; i++) {
var a = arguments[i];
if (a) {
var o = typeof a;
if (o === "string" || o === "number")
r.push(a);
else if (Array.isArray(a)) {
if (a.length) {
var l = n.apply(null, a);
l && r.push(l);
}
} else if (o === "object") {
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]")) {
r.push(a.toString());
continue;
}
for (var s in a)
t.call(a, s) && a[s] && r.push(s);
}
}
}
return r.join(" ");
}
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
})();
})(eA);
var _P = eA.exports;
const re = /* @__PURE__ */ jt(_P);
function JP({
rounded: e,
hasFill: t,
variant: n,
isLoading: r,
size: i,
fullWidth: a,
align: o,
onlyOneIcon: l,
className: s,
isSingleLine: c
}) {
const d = () => n === "disabled" ? "bg-action-primary-disabled text-letter-disabled disabled:text-letter-disabled disabled:bg-action-primary-disabled" : n === "primary" ? r ? "bg-action-primary-disabled" : "bg-action-primary-default hover:bg-action-primary-hovered active:bg-action-primary-active text-letter-on disabled:bg-action-primary-disabled" : n === "brand" ? r ? "bg-action-primary-disabled" : "bg-action-primary-brand text-letter-on disabled:bg-action-primary-disabled px-md py-sm text-md" : n === "primary-active" ? r ? "bg-action-primary-disabled" : "bg-action-primary-active hover:bg-action-primary-hovered active:bg-action-primary-active text-letter-on disabled:bg-action-primary-disabled" : n === "basic" ? r ? "bg-action-secondary-disabled" : "bg-action-opacity-default text-letter-default hover:bg-action-opacity-hovered active:bg-action-opacity-active disabled:bg-action-opacity-disabled" : n === "destructive" ? r ? "bg-action-critical-disabled" : "bg-action-critical-default text-letter-on hover:bg-action-critical-hovered active:bg-action-critical-active disabled:bg-action-critical-disabled" : n === "plain" ? "text-action-primary-default hover:bg-surface-action-hovered active:bg-surface-action-active active:text-action-primary-pressed disabled:bg-white" : n === "plain-monochrome" ? "text-letter-default hover:bg-action-opacity-hovered active:bg-action-opacity-active active:text-letter-default disabled:bg-white" : n === "plain-destructive" ? "text-letter-critical hover:bg-surface-critical-hovered active:bg-surface-critical-active active:text-letter-critical disabled:bg-white" : n === "plain-brand" ? "text-action-primary-brand hover:bg-action-primary-brand hover:text-letter-on active:bg-surface-critical-active active:text-letter-critical disabled:bg-white" : n === "primary-border" ? r ? "bg-action-primary-disabled" : "border border-action-primary-default text-action-primary-default hover:bg-action-primary-hovered hover:text-letter-on active:bg-action-primary-active text-action-primary-default disabled:bg-action-primary-disabled" : n === "destructive-border" ? r ? "bg-action-critical-disabled" : "border border-action-critical-default text-action-critical-default hover:bg-action-critical-hovered hover:text-letter-on active:bg-action-critical-active disabled:bg-action-critical-disabled" : n === "brand-border" ? r ? "bg-action-primary-disabled" : "border border-action-primary-brand hover:bg-action-primary-brand hover:text-letter-on active:bg-action-primary-brand text-action-primary-brand disabled:bg-action-primary-disabled" : n === "basic-border" ? r ? "bg-action-secondary-disabled" : "border border-action-opacity-default hover:bg-action-opacity-hovered hover:text-letter-on active:bg-action-opacity-active disabled:bg-action-opacity-disabled" : "", f = () => [
"primary",
"basic",
"destructive",
"disabled",
"primary-border",
"destructive-border"
].includes(n ?? "primary"), h = re("p-sm", {
"h-[56px] w-[56px]": i === "md" && f(),
"h-[36px] w-[36px]": i === "sm" && f(),
"h-[40px] w-[40px]": i === "md" && !f(),
"h-[30px] w-[30px]": i === "sm" && !f()
}), p = re("leading-xs", t ? "px-sm" : "p-[2.7px]", {
"h-[36px] py-xs": i === "sm" && f() && t,
"h-[56px] py-md": i === "md" && f() && t,
"h-[30px] py-[5px]": i === "sm" && !f() && t,
"h-[40px] py-[10px]": i === "md" && !f() && t
}), v = () => l ? "" : a ? "w-full" : "w-auto", m = () => ({
all: "rounded-sm",
left: "rounded-l-sm",
right: "rounded-r-sm"
})[e ?? "all"];
return { getClass: () => {
const C = "text-xs font-sans font-medium disabled:text-letter-disabled flex items-center gap-x-2 focus:outline-none transition-colors";
return re(
m(),
C,
r ? "relative" : "",
l ? h : p,
v(),
d(),
{
"justify-center": o === "center",
"justify-start": o === "start",
"justify-end": o === "end"
},
s,
{
"whitespace-nowrap": c
}
);
} };
}
function Of({
size: e = "sm",
isActive: t = !1,
imageUrl: n = "",
className: r = ""
}) {
const i = re({
"hover:border hover:border-icon-subdued": !t,
"border border-focused-default": t
});
return e === "xs" ? n ? /* @__PURE__ */ A.jsx("picture", { children: /* @__PURE__ */ A.jsx(
"img",
{
className: re(
"rounded-full w-[24px] h-[24px] object-cover",
i
),
src: n,
alt: "image user"
}
) }) : /* @__PURE__ */ A.jsxs(
"svg",
{
width: "24",
height: "24",
viewBox: "0 0 24 24",
fill: "none",
xmlns: "",
className: re("rounded-full w-[24px]", i),
children: [
/* @__PURE__ */ A.jsx("rect", { width: "24", height: "24", rx: "12", fill: "#E8E8E8" }),
/* @__PURE__ */ A.jsx("circle", { cx: "12", cy: "12", r: "12", fill: "#E8E8E8" }),
/* @__PURE__ */ A.jsx(
"path",
{
fillRule: "evenodd",
clipRule: "evenodd",
d: "M12.0001 11.8571C13.8585 11.8571 15.3651 10.3221 15.3651 8.42857C15.3651 6.53502 13.8585 5 12.0001 5C10.1416 5 8.63503 6.53502 8.63503 8.42857C8.63503 10.3221 10.1416 11.8571 12.0001 11.8571ZM12.0001 21C14.8276 21 17.354 19.6604 19 17.5715C17.354 15.4825 14.8275 14.1429 11.9999 14.1429C9.17242 14.1429 6.64602 15.4824 5 17.5713C6.64601 19.6604 9.17247 21 12.0001 21Z",
fill: "#61666B"
}
)
]
}
) : e === "sm" ? n ? /* @__PURE__ */ A.jsx("picture", { children: /* @__PURE__ */ A.jsx(
"img",
{
className: re(
"rounded-full w-[32px] h-[32px] object-cover",
i
),
src: n,
alt: "image user"
}
) }) : /* @__PURE__ */ A.jsxs(
"svg",
{
width: "32",
height: "32",
viewBox: "0 0 32 32",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: re("rounded-full w-[32px]", i),
children: [
/* @__PURE__ */ A.jsx("rect", { width: "32", height: "32", rx: "16", fill: "#E8E8E8" }),
/* @__PURE__ */ A.jsx(
"path",
{
fillRule: "evenodd",
clipRule: "evenodd",
d: "M16 16.1238C18.651 16.1238 20.8 13.9747 20.8 11.3238C20.8 8.67279 18.651 6.52376 16 6.52376C13.349 6.52376 11.2 8.67279 11.2 11.3238C11.2 13.9747 13.349 16.1238 16 16.1238ZM16 28.9238C20.0332 28.9238 23.637 27.0484 25.9849 24.1239C23.637 21.1992 20.0332 19.3238 15.9998 19.3238C11.9665 19.3238 8.36282 21.1991 6.01489 24.1236C8.36282 27.0483 11.9666 28.9238 16 28.9238Z",
fill: "#61666B"
}
)
]
}
) : e === "md" ? n ? /* @__PURE__ */ A.jsx("picture", { children: /* @__PURE__ */ A.jsx(
"img",
{
className: re(
"rounded-full w-[41.5px] h-[41.5px] object-cover",
i
),
src: n,
alt: "image user"
}
) }) : /* @__PURE__ */ A.jsxs(
"svg",
{
width: "40",
height: "40",
viewBox: "0 0 40 40",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: re("rounded-full w-[41.5px]", i),
children: [
/* @__PURE__ */ A.jsx("rect", { width: "40", height: "40", rx: "20", fill: "#E8E8E8" }),
/* @__PURE__ */ A.jsx(
"path",
{
fillRule: "evenodd",
clipRule: "evenodd",
d: "M20 20.1547C23.3137 20.1547 26 17.4684 26 14.1547C26 10.841 23.3137 8.15469 20 8.15469C16.6863 8.15469 14 10.841 14 14.1547C14 17.4684 16.6863 20.1547 20 20.1547ZM20 36.1547C25.0416 36.1547 29.5462 33.8105 32.4811 30.1548C29.5462 26.4991 25.0415 24.1547 19.9998 24.1547C14.9582 24.1547 10.4535 26.4989 7.51862 30.1545C10.4535 33.8103 14.9583 36.1547 20 36.1547Z",
fill: "#61666B"
}
)
]
}
) : e === "lg" ? n ? /* @__PURE__ */ A.jsx("picture", { children: /* @__PURE__ */ A.jsx(
"img",
{
className: re(
"rounded-full w-[61.5px] h-[61.5px] object-cover",
i
),
src: n,
alt: "image user"
}
) }) : /* @__PURE__ */ A.jsxs(
"svg",
{
width: "60",
height: "60",
viewBox: "0 0 60 60",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: re("rounded-full w-[61.5px]", i),
children: [
/* @__PURE__ */ A.jsx("rect", { width: "60", height: "60", rx: "30", fill: "#E8E8E8" }),
/* @__PURE__ */ A.jsx(
"path",
{
fillRule: "evenodd",
clipRule: "evenodd",
d: "M30 30.232C34.9706 30.232 39 26.2026 39 21.232C39 16.2615 34.9706 12.232 30 12.232C25.0294 12.232 21 16.2615 21 21.232C21 26.2026 25.0294 30.232 30 30.232ZM30 54.232C37.5623 54.232 44.3193 50.7157 48.7217 45.2323C44.3193 39.7486 37.5622 36.232 29.9996 36.232C22.4373 36.232 15.6803 39.7484 11.2779 45.2318C15.6803 50.7155 22.4374 54.232 30 54.232Z",
fill: "#61666B"
}
)
]
}
) : e === "custom" && n && r ? /* @__PURE__ */ A.jsx("picture", { children: /* @__PURE__ */ A.jsx(
"img",
{
className: re(
"rounded-full object-cover",
r,
i
),
src: n,
alt: "image user"
}
) }) : /* @__PURE__ */ A.jsx(A.Fragment, {});
}
function tA(e) {
const { size: t, weight: n, lineHeight: r, className: i, color: a } = e;
return { getWeight: () => re({
"font-bold": n === "bold",
"font-regular": n === "regular",
"font-medium": n === "medium"
}), getFontSize: () => re({
"text-xxs": t === "xxs",
"text-xs": t === "xs",
"text-sm": t === "sm",
"text-md": t === "md",
"text-lg": t === "lg",
"text-xl": t === "xl",
"text-xxl": t === "xxl"
}), getLineHeight: () => re({
"leading-xxs": r === "xxs",
"leading-xs": r === "xs",
"leading-sm": r === "sm",
"leading-md": r === "md",
"leading-lg": r === "lg",
"leading-xl": r === "xl",
"leading-xxl": r === "xxl"
}), getColorText: () => re({
"text-letter-on": a === "on",
"text-letter-critical": a === "critical",
"text-letter-default": a === "default",
"text-letter-disabled": a === "disabled",
"text-letter-subdued": a === "subdued",
"text-letter-success": a === "success",
"text-letter-warning": a === "warning",
"text-letter-brand": a === "brand",
"text-action-primary-default": a === "primary"
}), getClassName: () => re(i) };
}
function xa(e) {
const t = (i) => typeof window < "u" ? window.matchMedia(i).matches : !1, [n, r] = pe(t(e));
return ve(() => {
const i = window.matchMedia(e);
i.matches !== n && r(i.matches);
const a = () => r(i.matches);
return window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
}, [n, e]), n;
}
function KP({ variant: e, ...t }) {
const n = "font-sans", r = tA({ ...t }), { getColorText: i, getFontSize: a, ...o } = r, { getLineHeight: l, getWeight: s, getClassName: c } = o;
return {
getClass: re(n, (() => e === "xxl" ? re(
s() || "font-bold",
l() || "leading-xxl",
a() || "text-xxl"
) : e === "xl" ? re(
s() || "font-bold",
l() || "leading-xl",
a() || "text-xl"
) : e === "lg" ? re(
s() || "font-bold",
l() || "leading-lg",
a() || "text-lg"
) : e === "md" ? re(
s() || "font-bold",
l() || "leading-md",
a() || "text-md"
) : e === "sm" ? re("font-regular", "leading-sm", "text-sm") : e === "heading" ? re(
s() || "font-bold",
l() || "leading-sm",
a() || "text-sm"
) : e === "subheading" ? re(
s() || "font-bold",
l() || "leading-xxs",
a() || "text-xs"
) : "")(), i(), c())
};
}
const qP = (e, t) => typeof e == "string" && t ? t == null ? void 0 : t(e) : e, R0 = ({ _t: e, useT: t = !0 }) => ({
_t: Je(
(r) => qP(r, t !== !1 ? e : void 0),
[e, t]
)
});
function Rt(e, t, n) {
return typeof e == "string" && t && n ? n(e) : e;
}
function ui({
variant: e = "heading",
children: t,
lineHeight: n,
weight: r,
color: i = "default",
size: a,
className: o,
as: l = "h2",
...s
}) {
const { getClass: c } = KP({
size: a,
weight: r,
variant: e,
color: i,
lineHeight: n,
className: o
}), { _t: d } = R0({ ...s });
return /* @__PURE__ */ A.jsx(l, { className: c, children: d(t) });
}
function eF({ variant: e, ...t }) {
const n = "font-sans", r = tA({ ...t }), { getColorText: i, getFontSize: a, getLineHeight: o, getWeight: l, getClassName: s } = r;
return {
getClass: re(n, (() => e === "button" ? re(
l() || "font-medium",
o() || "leading-xs",
a() || "text-xs"
) : e === "body" ? re(
l() || "font-regular",
o() || "leading-xs",
a() || "text-xs"
) : e === "highlight" ? re(
l() || "font-bold",
o() || "leading-xs",
a() || "text-xs"
) : e === "caption" ? re(
l() || "font-regular",
o() || "leading-xxs",
a() || "text-xxs"
) : "")(), i(), s())
};
}
function nA(e) {
const {
variant: t = "body",
lineHeight: n,
weight: r,
color: i = "default",
size: a,
className: o,
onClick: l,
htmlFor: s
} = e, { getClass: c } = eF({
size: a,
weight: r,
variant: t,
color: i,
lineHeight: n,
className: o
});
return { attributes: {
...l && { onClick: l },
...s && { htmlFor: s }
}, getClass: c };
}
function Be(e) {
const { attributes: t, getClass: n } = nA(e), { children: r, as: i = "p" } = e, { _t: a } = R0({ ...e });
return /* @__PURE__ */ A.jsx(i, { className: n, ...t, children: a(r) });
}
const ha = qe((e, t) => {
const { attributes: n, getClass: r } = nA(e), { children: i, as: a = "p" } = e;
return /* @__PURE__ */ A.jsx(a, { className: r, ...n, ref: t, children: i });
});
function jme({
kind: e = "default",
variant: t,
className: n,
children: r,
as: i = "span",
onClick: a,
_t: o,
useT: l = !0
}) {
const s = t || e, c = re(
n,
"font-sans cursor-pointer font-book text-xs leading-xs",
s === "underline" && "text-action-primary-default underline decoration-action-primary-default decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-action-primary-hovered active:text-action-primary-active active:decoration-action-primary-active",
s === "default" && "text-action-primary-default active:decoration-solid hover:text-action-primary-hovered active:text-action-primary-active",
s === "monochrome" && "text-letter-default underline decoration-letter-default decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-letter-default active:text-letter-default",
s === "brandunderline" && "text-letter-brand underline decoration-action-brand-active decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-letter-brand active:text-letter-brand active:decoration-action-primary-active"
), d = Rt(r, l, o);
return /* @__PURE__ */ A.jsx(i, { onClick: a, className: c, children: d });
}
function rA({
variant: e,
children: t,
state: n,
addonStart: r,
addonEnd: i,
_t: a,
useT: o = !0
}) {
const l = Rt(t, o, a);
return /* @__PURE__ */ A.jsxs("span", { className: "flex gap-2 items-center", children: [
n && /* @__PURE__ */ A.jsx(
"div",
{
className: re("w-2 h-2 rounded-2xl", {
"bg-focused-default": n === "active",
"bg-surface-neutral-default": n === "disabled"
})
}
),
/* @__PURE__ */ A.jsxs(
"span",
{
className: re(
"inline-flex items-center gap-1 rounded-md py-[2px] px-2",
{
"bg-surface-neutral-default": e === "neutral",
"bg-surface-action-default": e === "info",
"bg-surface-success-default": e === "success",
"bg-surface-warning-default": e === "warning",
"bg-surface-critical-default": e === "critical"
}
),
children: [
r && /* @__PURE__ */ A.jsx("span", { className: "flex-shrink-0", children: r }),
/* @__PURE__ */ A.jsx(Be, { as: "span", variant: "caption", children: l }),
i && /* @__PURE__ */ A.jsx("span", { className: "flex-shrink-0", children: i })
]
}
)
] });
}
const D0 = typeof window > "u" || typeof document > "u";
let En = D0 ? ve : k1;
function Xr(e) {
let t = ce(e);
return En(() => {
t.current = e;
}, [e]), t;
}
function x2(e) {
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
throw t;
}));
}
function Ki() {
let e = [], t = [], n = { enqueue(r) {
t.push(r);
}, addEventListener(r, i, a, o) {
return r.addEventListener(i, a, o), n.add(() => r.removeEventListener(i, a, o));
}, requestAnimationFrame(...r) {
let i = requestAnimationFrame(...r);
return n.add(() => cancelAnimationFrame(i));
}, nextFrame(...r) {
return n.requestAnimationFrame(() => n.requestAnimationFrame(...r));
}, setTimeout(...r) {
let i = setTimeout(...r);
return n.add(() => clearTimeout(i));
}, microTask(...r) {
let i = { current: !0 };
return x2(() => {
i.current && r[0]();
}), n.add(() => {
i.current = !1;
});
}, add(r) {
return e.push(r), () => {
let i = e.indexOf(r);
if (i >= 0) {
let [a] = e.splice(i, 1);
a();
}
};
}, dispose() {
for (let r of e.splice(0))
r();
}, async workQueue() {
for (let r of t.splice(0))
await r();
} };
return n;
}
function T0() {
let [e] = pe(Ki);
return ve(() => () => e.dispose(), [e]), e;
}
let ft = function(e) {
let t = Xr(e);
return u.useCallback((...n) => t.current(...n), [t]);
}, $3 = { serverHandoffComplete: !1 };
function el() {
let [e, t] = pe($3.serverHandoffComplete);
return ve(() => {
e !== !0 && t(!0);
}, [e]), ve(() => {
$3.serverHandoffComplete === !1 && ($3.serverHandoffComplete = !0);
}, []), e;
}
var Bf;
let tF = 0;
function Pf() {
return ++tF;
}
let Yn = (Bf = u.useId) != null ? Bf : function() {
let e = el(), [t, n] = u.useState(e ? Pf : null);
return En(() => {
t === null && n(Pf());
}, [t]), t != null ? "" + t : void 0;
};
function sn(e, t, ...n) {
if (e in t) {
let i = t[e];
return typeof i == "function" ? i(...n) : i;
}
let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((i) => `"${i}"`).join(", ")}.`);
throw Error.captureStackTrace && Error.captureStackTrace(r, sn), r;
}
function V1(e) {
return D0 ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
}
let k4 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
var Sn = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Sn || {}), C1 = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(C1 || {}), nF = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(nF || {});
function iA(e = document.body) {
return e == null ? [] : Array.from(e.querySelectorAll(k4));
}
var u7 = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(u7 || {});
function d7(e, t = 0) {
var n;
return e === ((n = V1(e)) == null ? void 0 : n.body) ? !1 : sn(t, { 0() {
return e.matches(k4);
}, 1() {
let r = e;
for (; r !== null; ) {
if (r.matches(k4))
return !0;
r = r.parentElement;
}
return !1;
} });
}
function aA(e) {
let t = V1(e);
Ki().nextFrame(() => {
t && !d7(t.activeElement, 0) && Ca(e);
});
}
function Ca(e) {
e == null || e.focus({ preventScroll: !0 });
}
let rF = ["textarea", "input"].join(",");
function iF(e) {
var t, n;
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, rF)) != null ? n : !1;
}
function Bs(e, t = (n) => n) {
return e.slice().sort((n, r) => {
let i = t(n), a = t(r);
if (i === null || a === null)
return 0;
let o = i.compareDocumentPosition(a);
return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
});
}
function aF(e, t) {
return Gr(iA(), t, !0, e);
}
function Gr(e, t, n = !0, r = null) {
let i = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, a = Array.isArray(e) ? n ? Bs(e) : e : iA(e);
r = r ?? i.activeElement;
let o = (() => {
if (t & 5)
return 1;
if (t & 10)
return -1;
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
})(), l = (() => {
if (t & 1)
return 0;
if (t & 2)
return Math.max(0, a.indexOf(r)) - 1;
if (t & 4)
return Math.max(0, a.indexOf(r)) + 1;
if (t & 8)
return a.length - 1;
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
})(), s = t & 32 ? { preventScroll: !0 } : {}, c = 0, d = a.length, f;
do {
if (c >= d || c + d <= 0)
return 0;
let h = l + c;
if (t & 16)
h = (h + d) % d;
else {
if (h < 0)
return 3;
if (h >= d)
return 1;
}
f = a[h], f == null || f.focus(s), c += o;
} while (f !== i.activeElement);
return t & 6 && iF(f) && f.select(), f.hasAttribute("tabindex") || f.setAttribute("tabindex", "0"), 2;
}
function X3(e, t, n) {
let r = Xr(t);
ve(() => {
function i(a) {
r.current(a);
}
return document.addEventListener(e, i, n), () => document.removeEventListener(e, i, n);
}, [e, n]);
}
function oA(e, t, n = !0) {
let r = ce(!1);
ve(() => {
requestAnimationFrame(() => {
r.current = n;
});
}, [n]);
function i(o, l) {
if (!r.current || o.defaultPrevented)
return;
let s = function d(f) {
return typeof f == "function" ? d(f()) : Array.isArray(f) || f instanceof Set ? f : [f];
}(e), c = l(o);
if (c !== null && c.getRootNode().contains(c)) {
for (let d of s) {
if (d === null)
continue;
let f = d instanceof HTMLElement ? d : d.current;
if (f != null && f.contains(c))
return;
}
return !d7(c, u7.Loose) && c.tabIndex !== -1 && o.preventDefault(), t(o, c);
}
}
let a = ce(null);
X3("mousedown", (o) => {
var l, s;
r.current && (a.current = ((s = (l = o.composedPath) == null ? void 0 : l.call(o)) == null ? void 0 : s[0]) || o.target);
}, !0), X3("click", (o) => {
!a.current || (i(o, () => a.current), a.current = null);
}, !0), X3("blur", (o) => i(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
}
function Ff(e) {
var t;
if (e.type)
return e.type;
let n = (t = e.as) != null ? t : "button";
if (typeof n == "string" && n.toLowerCase() === "button")
return "button";
}
function L0(e, t) {
let [n, r] = pe(() => Ff(e));
return En(() => {
r(Ff(e));
}, [e.type, e.as]), En(() => {
n || !t.current || t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button");
}, [n, t]), n;
}
let lA = Symbol();
function sA(e, t = !0) {
return Object.assign(e, { [lA]: t });
}
function tn(...e) {
let t = ce(e);
ve(() => {
t.current = e;
}, [e]);
let n = ft((r) => {
for (let i of t.current)
i != null && (typeof i == "function" ? i(r) : i.current = r);
});
return e.every((r) => r == null || (r == null ? void 0 : r[lA])) ? void 0 : n;
}
function cA({ container: e, accept: t, walk: n, enabled: r = !0 }) {
let i = ce(t), a = ce(n);
ve(() => {
i.current = t, a.current = n;
}, [t, n]), En(() => {
if (!e || !r)
return;
let o = V1(e);
if (!o)
return;
let l = i.current, s = a.current, c = Object.assign((f) => l(f), { acceptNode: l }), d = o.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, c, !1);
for (; d.nextNode(); )
s(d.currentNode);
}, [e, r, i, a]);
}
function oF(e) {
throw new Error("Unexpected object: " + e);
}
var ai = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(ai || {});
function lF(e, t) {
let n = t.resolveItems();
if (n.length <= 0)
return null;
let r = t.resolveActiveIndex(), i = r ?? -1, a = (() => {
switch (e.focus) {
case 0:
return n.findIndex((o) => !t.resolveDisabled(o));
case 1: {
let o = n.slice().reverse().findIndex((l, s, c) => i !== -1 && c.length - s - 1 >= i ? !1 : !t.resolveDisabled(l));
return o === -1 ? o : n.length - 1 - o;
}
case 2:
return n.findIndex((o, l) => l <= i ? !1 : !t.resolveDisabled(o));
case 3: {
let o = n.slice().reverse().findIndex((l) => !t.resolveDisabled(l));
return o === -1 ? o : n.length - 1 - o;
}
case 4:
return n.findIndex((o) => t.resolveId(o) === e.id);
case 5:
return null;
default:
oF(e);
}
})();
return a === -1 ? r : a;
}
var wi = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(wi || {}), $i = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))($i || {});
function $t({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: i, visible: a = !0, name: o }) {
let l =