UNPKG

@tamilvananmurugan/xlibs

Version:

Comprehensive UI component library with Aceternity, MagicUI, and ShadCN components

1,659 lines (1,656 loc) 2.18 MB
import * as Gt from "react"; import Kr, { useRef as kt, useState as Nt, useEffect as $t, createContext as qs, useLayoutEffect as tT, useId as fu, useContext as Cn, useInsertionEffect as Bd, useMemo as mi, useCallback as er, Children as GL, isValidElement as WL, Fragment as xv, createElement as Hl, forwardRef as yp, Component as XL, memo as nT, useReducer as $L, useImperativeHandle as h6, useDebugValue as p6 } from "react"; import "react-dom"; function iT(n) { return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n; } var ky = { exports: {} }, Ym = {}; /** * @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 c3; function m6() { if (c3) return Ym; c3 = 1; var n = Kr, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, r = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 }; function a(l, u, d) { var p, m = {}, v = null, x = null; d !== void 0 && (v = "" + d), u.key !== void 0 && (v = "" + u.key), u.ref !== void 0 && (x = u.ref); for (p in u) i.call(u, p) && !s.hasOwnProperty(p) && (m[p] = u[p]); if (l && l.defaultProps) for (p in u = l.defaultProps, u) m[p] === void 0 && (m[p] = u[p]); return { $$typeof: e, type: l, key: v, ref: x, props: m, _owner: r.current }; } return Ym.Fragment = t, Ym.jsx = a, Ym.jsxs = a, Ym; } var qm = {}; /** * @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 u3; function g6() { return u3 || (u3 = 1, process.env.NODE_ENV !== "production" && (function() { var n = Kr, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), S = Symbol.iterator, A = "@@iterator"; function E(te) { if (te === null || typeof te != "object") return null; var Ze = S && te[S] || te[A]; return typeof Ze == "function" ? Ze : null; } var w = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function R(te) { { for (var Ze = arguments.length, xt = new Array(Ze > 1 ? Ze - 1 : 0), Ht = 1; Ht < Ze; Ht++) xt[Ht - 1] = arguments[Ht]; C("error", te, xt); } } function C(te, Ze, xt) { { var Ht = w.ReactDebugCurrentFrame, An = Ht.getStackAddendum(); An !== "" && (Ze += "%s", xt = xt.concat([An])); var xn = xt.map(function(G) { return String(G); }); xn.unshift("Warning: " + Ze), Function.prototype.apply.call(console[te], console, xn); } } var L = !1, D = !1, k = !1, B = !1, j = !1, O; O = Symbol.for("react.module.reference"); function F(te) { return !!(typeof te == "string" || typeof te == "function" || te === i || te === s || j || te === r || te === d || te === p || B || te === x || L || D || k || typeof te == "object" && te !== null && (te.$$typeof === v || te.$$typeof === m || te.$$typeof === a || te.$$typeof === l || te.$$typeof === u || // 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. te.$$typeof === O || te.getModuleId !== void 0)); } function Y(te, Ze, xt) { var Ht = te.displayName; if (Ht) return Ht; var An = Ze.displayName || Ze.name || ""; return An !== "" ? xt + "(" + An + ")" : xt; } function ne(te) { return te.displayName || "Context"; } function fe(te) { if (te == null) return null; if (typeof te.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof te == "function") return te.displayName || te.name || null; if (typeof te == "string") return te; switch (te) { case i: return "Fragment"; case t: return "Portal"; case s: return "Profiler"; case r: return "StrictMode"; case d: return "Suspense"; case p: return "SuspenseList"; } if (typeof te == "object") switch (te.$$typeof) { case l: var Ze = te; return ne(Ze) + ".Consumer"; case a: var xt = te; return ne(xt._context) + ".Provider"; case u: return Y(te, te.render, "ForwardRef"); case m: var Ht = te.displayName || null; return Ht !== null ? Ht : fe(te.type) || "Memo"; case v: { var An = te, xn = An._payload, G = An._init; try { return fe(G(xn)); } catch { return null; } } } return null; } var Z = Object.assign, ue = 0, he, oe, ee, ie, $, W, se; function _e() { } _e.__reactDisabledLog = !0; function Ee() { { if (ue === 0) { he = console.log, oe = console.info, ee = console.warn, ie = console.error, $ = console.group, W = console.groupCollapsed, se = console.groupEnd; var te = { configurable: !0, enumerable: !0, value: _e, writable: !0 }; Object.defineProperties(console, { info: te, log: te, warn: te, error: te, group: te, groupCollapsed: te, groupEnd: te }); } ue++; } } function Ne() { { if (ue--, ue === 0) { var te = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: Z({}, te, { value: he }), info: Z({}, te, { value: oe }), warn: Z({}, te, { value: ee }), error: Z({}, te, { value: ie }), group: Z({}, te, { value: $ }), groupCollapsed: Z({}, te, { value: W }), groupEnd: Z({}, te, { value: se }) }); } ue < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var Re = w.ReactCurrentDispatcher, Ge; function Ke(te, Ze, xt) { { if (Ge === void 0) try { throw Error(); } catch (An) { var Ht = An.stack.trim().match(/\n( *(at )?)/); Ge = Ht && Ht[1] || ""; } return ` ` + Ge + te; } } var et = !1, ut; { var it = typeof WeakMap == "function" ? WeakMap : Map; ut = new it(); } function X(te, Ze) { if (!te || et) return ""; { var xt = ut.get(te); if (xt !== void 0) return xt; } var Ht; et = !0; var An = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var xn; xn = Re.current, Re.current = null, Ee(); try { if (Ze) { var G = function() { throw Error(); }; if (Object.defineProperty(G.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(G, []); } catch (Lt) { Ht = Lt; } Reflect.construct(te, [], G); } else { try { G.call(); } catch (Lt) { Ht = Lt; } te.call(G.prototype); } } else { try { throw Error(); } catch (Lt) { Ht = Lt; } te(); } } catch (Lt) { if (Lt && Ht && typeof Lt.stack == "string") { for (var ae = Lt.stack.split(` `), ye = Ht.stack.split(` `), ve = ae.length - 1, xe = ye.length - 1; ve >= 1 && xe >= 0 && ae[ve] !== ye[xe]; ) xe--; for (; ve >= 1 && xe >= 0; ve--, xe--) if (ae[ve] !== ye[xe]) { if (ve !== 1 || xe !== 1) do if (ve--, xe--, xe < 0 || ae[ve] !== ye[xe]) { var rt = ` ` + ae[ve].replace(" at new ", " at "); return te.displayName && rt.includes("<anonymous>") && (rt = rt.replace("<anonymous>", te.displayName)), typeof te == "function" && ut.set(te, rt), rt; } while (ve >= 1 && xe >= 0); break; } } } finally { et = !1, Re.current = xn, Ne(), Error.prepareStackTrace = An; } var Dt = te ? te.displayName || te.name : "", It = Dt ? Ke(Dt) : ""; return typeof te == "function" && ut.set(te, It), It; } function je(te, Ze, xt) { return X(te, !1); } function Ce(te) { var Ze = te.prototype; return !!(Ze && Ze.isReactComponent); } function We(te, Ze, xt) { if (te == null) return ""; if (typeof te == "function") return X(te, Ce(te)); if (typeof te == "string") return Ke(te); switch (te) { case d: return Ke("Suspense"); case p: return Ke("SuspenseList"); } if (typeof te == "object") switch (te.$$typeof) { case u: return je(te.render); case m: return We(te.type, Ze, xt); case v: { var Ht = te, An = Ht._payload, xn = Ht._init; try { return We(xn(An), Ze, xt); } catch { } } } return ""; } var Ie = Object.prototype.hasOwnProperty, wt = {}, dt = w.ReactDebugCurrentFrame; function mt(te) { if (te) { var Ze = te._owner, xt = We(te.type, te._source, Ze ? Ze.type : null); dt.setExtraStackFrame(xt); } else dt.setExtraStackFrame(null); } function Ot(te, Ze, xt, Ht, An) { { var xn = Function.call.bind(Ie); for (var G in te) if (xn(te, G)) { var ae = void 0; try { if (typeof te[G] != "function") { var ye = Error((Ht || "React class") + ": " + xt + " type `" + G + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof te[G] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw ye.name = "Invariant Violation", ye; } ae = te[G](Ze, G, Ht, xt, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (ve) { ae = ve; } ae && !(ae instanceof Error) && (mt(An), R("%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).", Ht || "React class", xt, G, typeof ae), mt(null)), ae instanceof Error && !(ae.message in wt) && (wt[ae.message] = !0, mt(An), R("Failed %s type: %s", xt, ae.message), mt(null)); } } } var Ft = Array.isArray; function Tn(te) { return Ft(te); } function J(te) { { var Ze = typeof Symbol == "function" && Symbol.toStringTag, xt = Ze && te[Symbol.toStringTag] || te.constructor.name || "Object"; return xt; } } function z(te) { try { return le(te), !1; } catch { return !0; } } function le(te) { return "" + te; } function ze(te) { if (z(te)) return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", J(te)), le(te); } var Oe = w.ReactCurrentOwner, Xe = { key: !0, ref: !0, __self: !0, __source: !0 }, Tt, me; function De(te) { if (Ie.call(te, "ref")) { var Ze = Object.getOwnPropertyDescriptor(te, "ref").get; if (Ze && Ze.isReactWarning) return !1; } return te.ref !== void 0; } function st(te) { if (Ie.call(te, "key")) { var Ze = Object.getOwnPropertyDescriptor(te, "key").get; if (Ze && Ze.isReactWarning) return !1; } return te.key !== void 0; } function at(te, Ze) { typeof te.ref == "string" && Oe.current; } function He(te, Ze) { { var xt = function() { Tt || (Tt = !0, R("%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)", Ze)); }; xt.isReactWarning = !0, Object.defineProperty(te, "key", { get: xt, configurable: !0 }); } } function qt(te, Ze) { { var xt = function() { me || (me = !0, R("%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)", Ze)); }; xt.isReactWarning = !0, Object.defineProperty(te, "ref", { get: xt, configurable: !0 }); } } var Ye = function(te, Ze, xt, Ht, An, xn, G) { var ae = { // This tag allows us to uniquely identify this as a React Element $$typeof: e, // Built-in properties that belong on the element type: te, key: Ze, ref: xt, props: G, // Record the component responsible for creating this element. _owner: xn }; return ae._store = {}, Object.defineProperty(ae._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(ae, "_self", { configurable: !1, enumerable: !1, writable: !1, value: Ht }), Object.defineProperty(ae, "_source", { configurable: !1, enumerable: !1, writable: !1, value: An }), Object.freeze && (Object.freeze(ae.props), Object.freeze(ae)), ae; }; function Ve(te, Ze, xt, Ht, An) { { var xn, G = {}, ae = null, ye = null; xt !== void 0 && (ze(xt), ae = "" + xt), st(Ze) && (ze(Ze.key), ae = "" + Ze.key), De(Ze) && (ye = Ze.ref, at(Ze, An)); for (xn in Ze) Ie.call(Ze, xn) && !Xe.hasOwnProperty(xn) && (G[xn] = Ze[xn]); if (te && te.defaultProps) { var ve = te.defaultProps; for (xn in ve) G[xn] === void 0 && (G[xn] = ve[xn]); } if (ae || ye) { var xe = typeof te == "function" ? te.displayName || te.name || "Unknown" : te; ae && He(G, xe), ye && qt(G, xe); } return Ye(te, ae, ye, An, Ht, Oe.current, G); } } var ht = w.ReactCurrentOwner, qe = w.ReactDebugCurrentFrame; function Mt(te) { if (te) { var Ze = te._owner, xt = We(te.type, te._source, Ze ? Ze.type : null); qe.setExtraStackFrame(xt); } else qe.setExtraStackFrame(null); } var de; de = !1; function ft(te) { return typeof te == "object" && te !== null && te.$$typeof === e; } function tt() { { if (ht.current) { var te = fe(ht.current.type); if (te) return ` Check the render method of \`` + te + "`."; } return ""; } } function Le(te) { return ""; } var Ue = {}; function zt(te) { { var Ze = tt(); if (!Ze) { var xt = typeof te == "string" ? te : te.displayName || te.name; xt && (Ze = ` Check the top-level render call using <` + xt + ">."); } return Ze; } } function ln(te, Ze) { { if (!te._store || te._store.validated || te.key != null) return; te._store.validated = !0; var xt = zt(Ze); if (Ue[xt]) return; Ue[xt] = !0; var Ht = ""; te && te._owner && te._owner !== ht.current && (Ht = " It was passed a child from " + fe(te._owner.type) + "."), Mt(te), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', xt, Ht), Mt(null); } } function kn(te, Ze) { { if (typeof te != "object") return; if (Tn(te)) for (var xt = 0; xt < te.length; xt++) { var Ht = te[xt]; ft(Ht) && ln(Ht, Ze); } else if (ft(te)) te._store && (te._store.validated = !0); else if (te) { var An = E(te); if (typeof An == "function" && An !== te.entries) for (var xn = An.call(te), G; !(G = xn.next()).done; ) ft(G.value) && ln(G.value, Ze); } } } function ri(te) { { var Ze = te.type; if (Ze == null || typeof Ze == "string") return; var xt; if (typeof Ze == "function") xt = Ze.propTypes; else if (typeof Ze == "object" && (Ze.$$typeof === u || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. Ze.$$typeof === m)) xt = Ze.propTypes; else return; if (xt) { var Ht = fe(Ze); Ot(xt, te.props, "prop", Ht, te); } else if (Ze.PropTypes !== void 0 && !de) { de = !0; var An = fe(Ze); R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", An || "Unknown"); } typeof Ze.getDefaultProps == "function" && !Ze.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function un(te) { { for (var Ze = Object.keys(te.props), xt = 0; xt < Ze.length; xt++) { var Ht = Ze[xt]; if (Ht !== "children" && Ht !== "key") { Mt(te), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Ht), Mt(null); break; } } te.ref !== null && (Mt(te), R("Invalid attribute `ref` supplied to `React.Fragment`."), Mt(null)); } } var Pi = {}; function Ni(te, Ze, xt, Ht, An, xn) { { var G = F(te); if (!G) { var ae = ""; (te === void 0 || typeof te == "object" && te !== null && Object.keys(te).length === 0) && (ae += " 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 ye = Le(); ye ? ae += ye : ae += tt(); var ve; te === null ? ve = "null" : Tn(te) ? ve = "array" : te !== void 0 && te.$$typeof === e ? (ve = "<" + (fe(te.type) || "Unknown") + " />", ae = " Did you accidentally export a JSX literal instead of a component?") : ve = typeof te, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ve, ae); } var xe = Ve(te, Ze, xt, An, xn); if (xe == null) return xe; if (G) { var rt = Ze.children; if (rt !== void 0) if (Ht) if (Tn(rt)) { for (var Dt = 0; Dt < rt.length; Dt++) kn(rt[Dt], te); Object.freeze && Object.freeze(rt); } else R("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 kn(rt, te); } if (Ie.call(Ze, "key")) { var It = fe(te), Lt = Object.keys(Ze).filter(function(Qt) { return Qt !== "key"; }), Kt = Lt.length > 0 ? "{key: someKey, " + Lt.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!Pi[It + Kt]) { var Zt = Lt.length > 0 ? "{" + Lt.join(": ..., ") + ": ...}" : "{}"; R(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, Kt, It, Zt, It), Pi[It + Kt] = !0; } } return te === i ? un(xe) : ri(xe), xe; } } function Ga(te, Ze, xt) { return Ni(te, Ze, xt, !0); } function ul(te, Ze, xt) { return Ni(te, Ze, xt, !1); } var Zs = ul, oi = Ga; qm.Fragment = i, qm.jsx = Zs, qm.jsxs = oi; })()), qm; } var d3; function v6() { return d3 || (d3 = 1, process.env.NODE_ENV === "production" ? ky.exports = m6() : ky.exports = g6()), ky.exports; } var _ = v6(); function YL(n) { var e, t, i = ""; if (typeof n == "string" || typeof n == "number") i += n; else if (typeof n == "object") if (Array.isArray(n)) { var r = n.length; for (e = 0; e < r; e++) n[e] && (t = YL(n[e])) && (i && (i += " "), i += t); } else for (t in n) n[t] && (i && (i += " "), i += t); return i; } function qL() { for (var n, e, t = 0, i = "", r = arguments.length; t < r; t++) (n = arguments[t]) && (e = YL(n)) && (i && (i += " "), i += e); return i; } const rT = "-", y6 = (n) => { const e = b6(n), { conflictingClassGroups: t, conflictingClassGroupModifiers: i } = n; return { getClassGroupId: (a) => { const l = a.split(rT); return l[0] === "" && l.length !== 1 && l.shift(), KL(l, e) || x6(a); }, getConflictingClassGroupIds: (a, l) => { const u = t[a] || []; return l && i[a] ? [...u, ...i[a]] : u; } }; }, KL = (n, e) => { if (n.length === 0) return e.classGroupId; const t = n[0], i = e.nextPart.get(t), r = i ? KL(n.slice(1), i) : void 0; if (r) return r; if (e.validators.length === 0) return; const s = n.join(rT); return e.validators.find(({ validator: a }) => a(s))?.classGroupId; }, f3 = /^\[(.+)\]$/, x6 = (n) => { if (f3.test(n)) { const e = f3.exec(n)[1], t = e?.substring(0, e.indexOf(":")); if (t) return "arbitrary.." + t; } }, b6 = (n) => { const { theme: e, prefix: t } = n, i = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return S6(Object.entries(n.classGroups), t).forEach(([s, a]) => { gM(a, i, s, e); }), i; }, gM = (n, e, t, i) => { n.forEach((r) => { if (typeof r == "string") { const s = r === "" ? e : h3(e, r); s.classGroupId = t; return; } if (typeof r == "function") { if (_6(r)) { gM(r(i), e, t, i); return; } e.validators.push({ validator: r, classGroupId: t }); return; } Object.entries(r).forEach(([s, a]) => { gM(a, h3(e, s), t, i); }); }); }, h3 = (n, e) => { let t = n; return e.split(rT).forEach((i) => { t.nextPart.has(i) || t.nextPart.set(i, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), t = t.nextPart.get(i); }), t; }, _6 = (n) => n.isThemeGetter, S6 = (n, e) => e ? n.map(([t, i]) => { const r = i.map((s) => typeof s == "string" ? e + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([a, l]) => [e + a, l])) : s); return [t, r]; }) : n, w6 = (n) => { if (n < 1) return { get: () => { }, set: () => { } }; let e = 0, t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(); const r = (s, a) => { t.set(s, a), e++, e > n && (e = 0, i = t, t = /* @__PURE__ */ new Map()); }; return { get(s) { let a = t.get(s); if (a !== void 0) return a; if ((a = i.get(s)) !== void 0) return r(s, a), a; }, set(s, a) { t.has(s) ? t.set(s, a) : r(s, a); } }; }, ZL = "!", M6 = (n) => { const { separator: e, experimentalParseClassName: t } = n, i = e.length === 1, r = e[0], s = e.length, a = (l) => { const u = []; let d = 0, p = 0, m; for (let E = 0; E < l.length; E++) { let w = l[E]; if (d === 0) { if (w === r && (i || l.slice(E, E + s) === e)) { u.push(l.slice(p, E)), p = E + s; continue; } if (w === "/") { m = E; continue; } } w === "[" ? d++ : w === "]" && d--; } const v = u.length === 0 ? l : l.substring(p), x = v.startsWith(ZL), S = x ? v.substring(1) : v, A = m && m > p ? m - p : void 0; return { modifiers: u, hasImportantModifier: x, baseClassName: S, maybePostfixModifierPosition: A }; }; return t ? (l) => t({ className: l, parseClassName: a }) : a; }, E6 = (n) => { if (n.length <= 1) return n; const e = []; let t = []; return n.forEach((i) => { i[0] === "[" ? (e.push(...t.sort(), i), t = []) : t.push(i); }), e.push(...t.sort()), e; }, T6 = (n) => ({ cache: w6(n.cacheSize), parseClassName: M6(n), ...y6(n) }), A6 = /\s+/, C6 = (n, e) => { const { parseClassName: t, getClassGroupId: i, getConflictingClassGroupIds: r } = e, s = [], a = n.trim().split(A6); let l = ""; for (let u = a.length - 1; u >= 0; u -= 1) { const d = a[u], { modifiers: p, hasImportantModifier: m, baseClassName: v, maybePostfixModifierPosition: x } = t(d); let S = !!x, A = i(S ? v.substring(0, x) : v); if (!A) { if (!S) { l = d + (l.length > 0 ? " " + l : l); continue; } if (A = i(v), !A) { l = d + (l.length > 0 ? " " + l : l); continue; } S = !1; } const E = E6(p).join(":"), w = m ? E + ZL : E, R = w + A; if (s.includes(R)) continue; s.push(R); const C = r(A, S); for (let L = 0; L < C.length; ++L) { const D = C[L]; s.push(w + D); } l = d + (l.length > 0 ? " " + l : l); } return l; }; function R6() { let n = 0, e, t, i = ""; for (; n < arguments.length; ) (e = arguments[n++]) && (t = JL(e)) && (i && (i += " "), i += t); return i; } const JL = (n) => { if (typeof n == "string") return n; let e, t = ""; for (let i = 0; i < n.length; i++) n[i] && (e = JL(n[i])) && (t && (t += " "), t += e); return t; }; function P6(n, ...e) { let t, i, r, s = a; function a(u) { const d = e.reduce((p, m) => m(p), n()); return t = T6(d), i = t.cache.get, r = t.cache.set, s = l, l(u); } function l(u) { const d = i(u); if (d) return d; const p = C6(u, t); return r(u, p), p; } return function() { return s(R6.apply(null, arguments)); }; } const di = (n) => { const e = (t) => t[n] || []; return e.isThemeGetter = !0, e; }, QL = /^\[(?:([a-z-]+):)?(.+)\]$/i, N6 = /^\d+\/\d+$/, D6 = /* @__PURE__ */ new Set(["px", "full", "screen"]), L6 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, k6 = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, O6 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, I6 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, U6 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ll = (n) => ip(n) || D6.has(n) || N6.test(n), Vc = (n) => xp(n, "length", W6), ip = (n) => !!n && !Number.isNaN(Number(n)), FS = (n) => xp(n, "number", ip), Km = (n) => !!n && Number.isInteger(Number(n)), F6 = (n) => n.endsWith("%") && ip(n.slice(0, -1)), gn = (n) => QL.test(n), jc = (n) => L6.test(n), z6 = /* @__PURE__ */ new Set(["length", "size", "percentage"]), B6 = (n) => xp(n, z6, e4), V6 = (n) => xp(n, "position", e4), j6 = /* @__PURE__ */ new Set(["image", "url"]), H6 = (n) => xp(n, j6, $6), G6 = (n) => xp(n, "", X6), Zm = () => !0, xp = (n, e, t) => { const i = QL.exec(n); return i ? i[1] ? typeof e == "string" ? i[1] === e : e.has(i[1]) : t(i[2]) : !1; }, W6 = (n) => ( // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. k6.test(n) && !O6.test(n) ), e4 = () => !1, X6 = (n) => I6.test(n), $6 = (n) => U6.test(n), Y6 = () => { const n = di("colors"), e = di("spacing"), t = di("blur"), i = di("brightness"), r = di("borderColor"), s = di("borderRadius"), a = di("borderSpacing"), l = di("borderWidth"), u = di("contrast"), d = di("grayscale"), p = di("hueRotate"), m = di("invert"), v = di("gap"), x = di("gradientColorStops"), S = di("gradientColorStopPositions"), A = di("inset"), E = di("margin"), w = di("opacity"), R = di("padding"), C = di("saturate"), L = di("scale"), D = di("sepia"), k = di("skew"), B = di("space"), j = di("translate"), O = () => ["auto", "contain", "none"], F = () => ["auto", "hidden", "clip", "visible", "scroll"], Y = () => ["auto", gn, e], ne = () => [gn, e], fe = () => ["", Ll, Vc], Z = () => ["auto", ip, gn], ue = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], he = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ee = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], ie = () => ["", "0", gn], $ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ip, gn]; return { cacheSize: 500, separator: ":", theme: { colors: [Zm], spacing: [Ll, Vc], blur: ["none", "", jc, gn], brightness: W(), borderColor: [n], borderRadius: ["none", "", "full", jc, gn], borderSpacing: ne(), borderWidth: fe(), contrast: W(), grayscale: ie(), hueRotate: W(), invert: ie(), gap: ne(), gradientColorStops: [n], gradientColorStopPositions: [F6, Vc], inset: Y(), margin: Y(), opacity: W(), padding: ne(), saturate: W(), scale: W(), sepia: ie(), skew: W(), space: ne(), translate: ne() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", gn] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [jc] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": $() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": $() }], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ "break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ "box-decoration": [{ "box-decoration": ["slice", "clone"] }], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [{ box: ["border", "content"] }], /** * Display * @see https://tailwindcss.com/docs/display */ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [{ float: ["right", "left", "none", "start", "end"] }], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [{ clear: ["left", "right", "both", "none", "start", "end"] }], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: ["isolate", "isolation-auto"], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ "object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ "object-position": [{ object: [...ue(), gn] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: F() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": F() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": F() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: O() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": O() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": O() }], /** * Position * @see https://tailwindcss.com/docs/position */ position: ["static", "fixed", "absolute", "relative", "sticky"], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [{ inset: [A] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [A] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [A] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [A] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [A] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [A] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [A] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [A] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [A] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", Km, gn] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: Y() }], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ "flex-wrap": [{ flex: ["wrap", "wrap-reverse", "nowrap"] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: ["1", "auto", "initial", "none", gn] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: ie() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: ie() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", Km, gn] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [Zm] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", Km, gn] }, gn] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": Z() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": Z() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [Zm] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [Km, gn] }, gn] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": Z() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": Z() }], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ "auto-cols": [{ "auto-cols": ["auto", "min", "max", "fr", gn] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", gn] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [v] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [v] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [v] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...ee()] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ "justify-items": [{ "justify-items": ["start", "end", "center", "stretch"] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ "justify-self": [{ "justify-self": ["auto", "start", "end", "center", "stretch"] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ "align-content": [{ content: ["normal", ...ee(), "baseline"] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ "align-items": [{ items: ["start", "end", "center", "baseline", "stretch"] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ "align-self": [{ self: ["auto", "start", "end", "center", "stretch", "baseline"] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ "place-content": [{ "place-content": [...ee(), "baseline"] }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ "place-items": [{ "place-items": ["start", "end", "center", "baseline", "stretch"] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ "place-self": [{ "place-self": ["auto", "start", "end", "center", "stretch"] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: [R] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [R] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [R] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [R] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [R] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [R] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [R] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [R] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [R] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [E] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [E] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [E] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [E] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [E] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [E] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [E] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [E] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [E] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [B] }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/space */ "space-x-reverse": ["space-x-reverse"], /** * Space Between Y * @see https://tailwindcss.com/docs/space */ "space-y": [{ "space-y": [B] }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/space */ "space-y-reverse": ["space-y-reverse"], // Sizing /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", gn, e] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [gn, e, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [gn, e, "none", "full", "min", "max", "fit", "prose", { screen: [jc] }, jc] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [gn, e, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [gn, e, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [gn, e, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [gn, e, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", jc, Vc] }], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ "font-smoothing": ["antialiased", "subpixel-antialiased"], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ "font-style": ["italic", "not-italic"], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ "font-weight": [{ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", FS] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [Zm] }], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-normal": ["normal-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-ordinal": ["ordinal"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-slashed-zero": ["slashed-zero"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-figure": ["lining-nums", "oldstyle-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-spacing": ["proportional-nums", "tabular-nums"], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [{ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", gn] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", ip, FS] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Ll, gn] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", gn] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", gn] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ "list-style-position": [{ list: ["inside", "outside"] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ "placeholder-color": [{ placeholder: [n] }], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ "placeholder-opacity": [{