UNPKG

react-ui-kit-priyen

Version:

Reusable Component library for Ui Design System

1,674 lines (1,672 loc) 842 kB
import * as d from "react"; import D, { forwardRef as pn, createElement as ut, useState as nt, useEffect as ct, createContext as Ln, useContext as Rn, useLayoutEffect as Ua, useRef as lt, useCallback as wt, useMemo as Zd, useImperativeHandle as Jd, isValidElement as $s } from "react"; import * as Ya from "react-dom"; import Rl from "react-dom"; import { FormProvider as Ty, useFormContext as Dy, Controller as ua } from "react-hook-form"; var Ni = { exports: {} }, Yr = {}; /** * @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 Ru; function Iy() { if (Ru) return Yr; Ru = 1; var e = D, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 }; function s(i, l, u) { var f, p = {}, g = null, m = null; u !== void 0 && (g = "" + u), l.key !== void 0 && (g = "" + l.key), l.ref !== void 0 && (m = l.ref); for (f in l) r.call(l, f) && !a.hasOwnProperty(f) && (p[f] = l[f]); if (i && i.defaultProps) for (f in l = i.defaultProps, l) p[f] === void 0 && (p[f] = l[f]); return { $$typeof: t, type: i, key: g, ref: m, props: p, _owner: o.current }; } return Yr.Fragment = n, Yr.jsx = s, Yr.jsxs = s, Yr; } var Kr = {}; /** * @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 Eu; function Ay() { return Eu || (Eu = 1, process.env.NODE_ENV !== "production" && function() { var e = D, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), v = Symbol.iterator, h = "@@iterator"; function w(N) { if (N === null || typeof N != "object") return null; var Q = v && N[v] || N[h]; return typeof Q == "function" ? Q : null; } var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function y(N) { { for (var Q = arguments.length, se = new Array(Q > 1 ? Q - 1 : 0), he = 1; he < Q; he++) se[he - 1] = arguments[he]; b("error", N, se); } } function b(N, Q, se) { { var he = x.ReactDebugCurrentFrame, De = he.getStackAddendum(); De !== "" && (Q += "%s", se = se.concat([De])); var ke = se.map(function(Ne) { return String(Ne); }); ke.unshift("Warning: " + Q), Function.prototype.apply.call(console[N], console, ke); } } var S = !1, E = !1, R = !1, C = !1, M = !1, P; P = Symbol.for("react.module.reference"); function j(N) { return !!(typeof N == "string" || typeof N == "function" || N === r || N === a || M || N === o || N === u || N === f || C || N === m || S || E || R || typeof N == "object" && N !== null && (N.$$typeof === g || N.$$typeof === p || N.$$typeof === s || N.$$typeof === i || N.$$typeof === l || // 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. N.$$typeof === P || N.getModuleId !== void 0)); } function _(N, Q, se) { var he = N.displayName; if (he) return he; var De = Q.displayName || Q.name || ""; return De !== "" ? se + "(" + De + ")" : se; } function k(N) { return N.displayName || "Context"; } function W(N) { if (N == null) return null; if (typeof N.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof N == "function") return N.displayName || N.name || null; if (typeof N == "string") return N; switch (N) { case r: return "Fragment"; case n: return "Portal"; case a: return "Profiler"; case o: return "StrictMode"; case u: return "Suspense"; case f: return "SuspenseList"; } if (typeof N == "object") switch (N.$$typeof) { case i: var Q = N; return k(Q) + ".Consumer"; case s: var se = N; return k(se._context) + ".Provider"; case l: return _(N, N.render, "ForwardRef"); case p: var he = N.displayName || null; return he !== null ? he : W(N.type) || "Memo"; case g: { var De = N, ke = De._payload, Ne = De._init; try { return W(Ne(ke)); } catch { return null; } } } return null; } var A = Object.assign, U = 0, G, F, L, z, oe, ae, $; function O() { } O.__reactDisabledLog = !0; function V() { { if (U === 0) { G = console.log, F = console.info, L = console.warn, z = console.error, oe = console.group, ae = console.groupCollapsed, $ = console.groupEnd; var N = { configurable: !0, enumerable: !0, value: O, writable: !0 }; Object.defineProperties(console, { info: N, log: N, warn: N, error: N, group: N, groupCollapsed: N, groupEnd: N }); } U++; } } function B() { { if (U--, U === 0) { var N = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: A({}, N, { value: G }), info: A({}, N, { value: F }), warn: A({}, N, { value: L }), error: A({}, N, { value: z }), group: A({}, N, { value: oe }), groupCollapsed: A({}, N, { value: ae }), groupEnd: A({}, N, { value: $ }) }); } U < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var q = x.ReactCurrentDispatcher, T; function Y(N, Q, se) { { if (T === void 0) try { throw Error(); } catch (De) { var he = De.stack.trim().match(/\n( *(at )?)/); T = he && he[1] || ""; } return ` ` + T + N; } } var J = !1, te; { var ne = typeof WeakMap == "function" ? WeakMap : Map; te = new ne(); } function X(N, Q) { if (!N || J) return ""; { var se = te.get(N); if (se !== void 0) return se; } var he; J = !0; var De = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var ke; ke = q.current, q.current = null, V(); try { if (Q) { var Ne = function() { throw Error(); }; if (Object.defineProperty(Ne.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(Ne, []); } catch (Rt) { he = Rt; } Reflect.construct(N, [], Ne); } else { try { Ne.call(); } catch (Rt) { he = Rt; } N.call(Ne.prototype); } } else { try { throw Error(); } catch (Rt) { he = Rt; } N(); } } catch (Rt) { if (Rt && he && typeof Rt.stack == "string") { for (var Ee = Rt.stack.split(` `), xt = he.stack.split(` `), Qe = Ee.length - 1, tt = xt.length - 1; Qe >= 1 && tt >= 0 && Ee[Qe] !== xt[tt]; ) tt--; for (; Qe >= 1 && tt >= 0; Qe--, tt--) if (Ee[Qe] !== xt[tt]) { if (Qe !== 1 || tt !== 1) do if (Qe--, tt--, tt < 0 || Ee[Qe] !== xt[tt]) { var Lt = ` ` + Ee[Qe].replace(" at new ", " at "); return N.displayName && Lt.includes("<anonymous>") && (Lt = Lt.replace("<anonymous>", N.displayName)), typeof N == "function" && te.set(N, Lt), Lt; } while (Qe >= 1 && tt >= 0); break; } } } finally { J = !1, q.current = ke, B(), Error.prepareStackTrace = De; } var mr = N ? N.displayName || N.name : "", Yn = mr ? Y(mr) : ""; return typeof N == "function" && te.set(N, Yn), Yn; } function K(N, Q, se) { return X(N, !1); } function ee(N) { var Q = N.prototype; return !!(Q && Q.isReactComponent); } function re(N, Q, se) { if (N == null) return ""; if (typeof N == "function") return X(N, ee(N)); if (typeof N == "string") return Y(N); switch (N) { case u: return Y("Suspense"); case f: return Y("SuspenseList"); } if (typeof N == "object") switch (N.$$typeof) { case l: return K(N.render); case p: return re(N.type, Q, se); case g: { var he = N, De = he._payload, ke = he._init; try { return re(ke(De), Q, se); } catch { } } } return ""; } var pe = Object.prototype.hasOwnProperty, ye = {}, ge = x.ReactDebugCurrentFrame; function ue(N) { if (N) { var Q = N._owner, se = re(N.type, N._source, Q ? Q.type : null); ge.setExtraStackFrame(se); } else ge.setExtraStackFrame(null); } function Me(N, Q, se, he, De) { { var ke = Function.call.bind(pe); for (var Ne in N) if (ke(N, Ne)) { var Ee = void 0; try { if (typeof N[Ne] != "function") { var xt = Error((he || "React class") + ": " + se + " type `" + Ne + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof N[Ne] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw xt.name = "Invariant Violation", xt; } Ee = N[Ne](Q, Ne, he, se, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (Qe) { Ee = Qe; } Ee && !(Ee instanceof Error) && (ue(De), 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).", he || "React class", se, Ne, typeof Ee), ue(null)), Ee instanceof Error && !(Ee.message in ye) && (ye[Ee.message] = !0, ue(De), y("Failed %s type: %s", se, Ee.message), ue(null)); } } } var Le = Array.isArray; function Te(N) { return Le(N); } function Ve(N) { { var Q = typeof Symbol == "function" && Symbol.toStringTag, se = Q && N[Symbol.toStringTag] || N.constructor.name || "Object"; return se; } } function rt(N) { try { return st(N), !1; } catch { return !0; } } function st(N) { return "" + N; } function Ae(N) { if (rt(N)) return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(N)), st(N); } var Be = x.ReactCurrentOwner, tn = { key: !0, ref: !0, __self: !0, __source: !0 }, Ct, it; function ht(N) { if (pe.call(N, "ref")) { var Q = Object.getOwnPropertyDescriptor(N, "ref").get; if (Q && Q.isReactWarning) return !1; } return N.ref !== void 0; } function Mt(N) { if (pe.call(N, "key")) { var Q = Object.getOwnPropertyDescriptor(N, "key").get; if (Q && Q.isReactWarning) return !1; } return N.key !== void 0; } function et(N, Q) { typeof N.ref == "string" && Be.current; } function dt(N, Q) { { var se = function() { Ct || (Ct = !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)", Q)); }; se.isReactWarning = !0, Object.defineProperty(N, "key", { get: se, configurable: !0 }); } } function nn(N, Q) { { var se = function() { it || (it = !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)", Q)); }; se.isReactWarning = !0, Object.defineProperty(N, "ref", { get: se, configurable: !0 }); } } var $t = function(N, Q, se, he, De, ke, Ne) { var Ee = { // This tag allows us to uniquely identify this as a React Element $$typeof: t, // Built-in properties that belong on the element type: N, key: Q, ref: se, props: Ne, // Record the component responsible for creating this element. _owner: ke }; return Ee._store = {}, Object.defineProperty(Ee._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(Ee, "_self", { configurable: !1, enumerable: !1, writable: !1, value: he }), Object.defineProperty(Ee, "_source", { configurable: !1, enumerable: !1, writable: !1, value: De }), Object.freeze && (Object.freeze(Ee.props), Object.freeze(Ee)), Ee; }; function Un(N, Q, se, he, De) { { var ke, Ne = {}, Ee = null, xt = null; se !== void 0 && (Ae(se), Ee = "" + se), Mt(Q) && (Ae(Q.key), Ee = "" + Q.key), ht(Q) && (xt = Q.ref, et(Q, De)); for (ke in Q) pe.call(Q, ke) && !tn.hasOwnProperty(ke) && (Ne[ke] = Q[ke]); if (N && N.defaultProps) { var Qe = N.defaultProps; for (ke in Qe) Ne[ke] === void 0 && (Ne[ke] = Qe[ke]); } if (Ee || xt) { var tt = typeof N == "function" ? N.displayName || N.name || "Unknown" : N; Ee && dt(Ne, tt), xt && nn(Ne, tt); } return $t(N, Ee, xt, De, he, Be.current, Ne); } } var ce = x.ReactCurrentOwner, Ce = x.ReactDebugCurrentFrame; function Se(N) { if (N) { var Q = N._owner, se = re(N.type, N._source, Q ? Q.type : null); Ce.setExtraStackFrame(se); } else Ce.setExtraStackFrame(null); } var Pe; Pe = !1; function be(N) { return typeof N == "object" && N !== null && N.$$typeof === t; } function je() { { if (ce.current) { var N = W(ce.current.type); if (N) return ` Check the render method of \`` + N + "`."; } return ""; } } function Je(N) { return ""; } var ie = {}; function ve(N) { { var Q = je(); if (!Q) { var se = typeof N == "string" ? N : N.displayName || N.name; se && (Q = ` Check the top-level render call using <` + se + ">."); } return Q; } } function Re(N, Q) { { if (!N._store || N._store.validated || N.key != null) return; N._store.validated = !0; var se = ve(Q); if (ie[se]) return; ie[se] = !0; var he = ""; N && N._owner && N._owner !== ce.current && (he = " It was passed a child from " + W(N._owner.type) + "."), Se(N), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', se, he), Se(null); } } function Ke(N, Q) { { if (typeof N != "object") return; if (Te(N)) for (var se = 0; se < N.length; se++) { var he = N[se]; be(he) && Re(he, Q); } else if (be(N)) N._store && (N._store.validated = !0); else if (N) { var De = w(N); if (typeof De == "function" && De !== N.entries) for (var ke = De.call(N), Ne; !(Ne = ke.next()).done; ) be(Ne.value) && Re(Ne.value, Q); } } } function We(N) { { var Q = N.type; if (Q == null || typeof Q == "string") return; var se; if (typeof Q == "function") se = Q.propTypes; else if (typeof Q == "object" && (Q.$$typeof === l || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. Q.$$typeof === p)) se = Q.propTypes; else return; if (se) { var he = W(Q); Me(se, N.props, "prop", he, N); } else if (Q.PropTypes !== void 0 && !Pe) { Pe = !0; var De = W(Q); y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", De || "Unknown"); } typeof Q.getDefaultProps == "function" && !Q.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function vt(N) { { for (var Q = Object.keys(N.props), se = 0; se < Q.length; se++) { var he = Q[se]; if (he !== "children" && he !== "key") { Se(N), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", he), Se(null); break; } } N.ref !== null && (Se(N), y("Invalid attribute `ref` supplied to `React.Fragment`."), Se(null)); } } var Tt = {}; function St(N, Q, se, he, De, ke) { { var Ne = j(N); if (!Ne) { var Ee = ""; (N === void 0 || typeof N == "object" && N !== null && Object.keys(N).length === 0) && (Ee += " 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 xt = Je(); xt ? Ee += xt : Ee += je(); var Qe; N === null ? Qe = "null" : Te(N) ? Qe = "array" : N !== void 0 && N.$$typeof === t ? (Qe = "<" + (W(N.type) || "Unknown") + " />", Ee = " Did you accidentally export a JSX literal instead of a component?") : Qe = typeof N, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Qe, Ee); } var tt = Un(N, Q, se, De, ke); if (tt == null) return tt; if (Ne) { var Lt = Q.children; if (Lt !== void 0) if (he) if (Te(Lt)) { for (var mr = 0; mr < Lt.length; mr++) Ke(Lt[mr], N); Object.freeze && Object.freeze(Lt); } 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 Ke(Lt, N); } if (pe.call(Q, "key")) { var Yn = W(N), Rt = Object.keys(Q).filter(function(My) { return My !== "key"; }), Os = Rt.length > 0 ? "{key: someKey, " + Rt.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!Tt[Yn + Os]) { var _y = Rt.length > 0 ? "{" + Rt.join(": ..., ") + ": ...}" : "{}"; y(`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} />`, Os, Yn, _y, Yn), Tt[Yn + Os] = !0; } } return N === r ? vt(tt) : We(tt), tt; } } function rn(N, Q, se) { return St(N, Q, se, !0); } function Ey(N, Q, se) { return St(N, Q, se, !1); } var Ny = Ey, Py = rn; Kr.Fragment = r, Kr.jsx = Ny, Kr.jsxs = Py; }()), Kr; } process.env.NODE_ENV === "production" ? Ni.exports = Iy() : Ni.exports = Ay(); var c = Ni.exports; function Qd(e) { var t, n, r = ""; if (typeof e == "string" || typeof e == "number") r += e; else if (typeof e == "object") if (Array.isArray(e)) { var o = e.length; for (t = 0; t < o; t++) e[t] && (n = Qd(e[t])) && (r && (r += " "), r += n); } else for (n in e) e[n] && (r && (r += " "), r += n); return r; } function ef() { for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Qd(e)) && (r && (r += " "), r += t); return r; } const El = "-", jy = (e) => { const t = Oy(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e; return { getClassGroupId: (s) => { const i = s.split(El); return i[0] === "" && i.length !== 1 && i.shift(), tf(i, t) || ky(s); }, getConflictingClassGroupIds: (s, i) => { const l = n[s] || []; return i && r[s] ? [...l, ...r[s]] : l; } }; }, tf = (e, t) => { var s; if (e.length === 0) return t.classGroupId; const n = e[0], r = t.nextPart.get(n), o = r ? tf(e.slice(1), r) : void 0; if (o) return o; if (t.validators.length === 0) return; const a = e.join(El); return (s = t.validators.find(({ validator: i }) => i(a))) == null ? void 0 : s.classGroupId; }, Nu = /^\[(.+)\]$/, ky = (e) => { if (Nu.test(e)) { const t = Nu.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); if (n) return "arbitrary.." + n; } }, Oy = (e) => { const { theme: t, prefix: n } = e, r = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; return Ly(Object.entries(e.classGroups), n).forEach(([a, s]) => { Pi(s, r, a, t); }), r; }, Pi = (e, t, n, r) => { e.forEach((o) => { if (typeof o == "string") { const a = o === "" ? t : Pu(t, o); a.classGroupId = n; return; } if (typeof o == "function") { if ($y(o)) { Pi(o(r), t, n, r); return; } t.validators.push({ validator: o, classGroupId: n }); return; } Object.entries(o).forEach(([a, s]) => { Pi(s, Pu(t, a), n, r); }); }); }, Pu = (e, t) => { let n = e; return t.split(El).forEach((r) => { n.nextPart.has(r) || n.nextPart.set(r, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), n = n.nextPart.get(r); }), n; }, $y = (e) => e.isThemeGetter, Ly = (e, t) => t ? e.map(([n, r]) => { const o = r.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([s, i]) => [t + s, i])) : a); return [n, o]; }) : e, Fy = (e) => { if (e < 1) return { get: () => { }, set: () => { } }; let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); const o = (a, s) => { n.set(a, s), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); }; return { get(a) { let s = n.get(a); if (s !== void 0) return s; if ((s = r.get(a)) !== void 0) return o(a, s), s; }, set(a, s) { n.has(a) ? n.set(a, s) : o(a, s); } }; }, nf = "!", zy = (e) => { const { separator: t, experimentalParseClassName: n } = e, r = t.length === 1, o = t[0], a = t.length, s = (i) => { const l = []; let u = 0, f = 0, p; for (let w = 0; w < i.length; w++) { let x = i[w]; if (u === 0) { if (x === o && (r || i.slice(w, w + a) === t)) { l.push(i.slice(f, w)), f = w + a; continue; } if (x === "/") { p = w; continue; } } x === "[" ? u++ : x === "]" && u--; } const g = l.length === 0 ? i : i.substring(f), m = g.startsWith(nf), v = m ? g.substring(1) : g, h = p && p > f ? p - f : void 0; return { modifiers: l, hasImportantModifier: m, baseClassName: v, maybePostfixModifierPosition: h }; }; return n ? (i) => n({ className: i, parseClassName: s }) : s; }, Vy = (e) => { if (e.length <= 1) return e; const t = []; let n = []; return e.forEach((r) => { r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r); }), t.push(...n.sort()), t; }, By = (e) => ({ cache: Fy(e.cacheSize), parseClassName: zy(e), ...jy(e) }), Hy = /\s+/, Gy = (e, t) => { const { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: o } = t, a = [], s = e.trim().split(Hy); let i = ""; for (let l = s.length - 1; l >= 0; l -= 1) { const u = s[l], { modifiers: f, hasImportantModifier: p, baseClassName: g, maybePostfixModifierPosition: m } = n(u); let v = !!m, h = r(v ? g.substring(0, m) : g); if (!h) { if (!v) { i = u + (i.length > 0 ? " " + i : i); continue; } if (h = r(g), !h) { i = u + (i.length > 0 ? " " + i : i); continue; } v = !1; } const w = Vy(f).join(":"), x = p ? w + nf : w, y = x + h; if (a.includes(y)) continue; a.push(y); const b = o(h, v); for (let S = 0; S < b.length; ++S) { const E = b[S]; a.push(x + E); } i = u + (i.length > 0 ? " " + i : i); } return i; }; function Wy() { let e = 0, t, n, r = ""; for (; e < arguments.length; ) (t = arguments[e++]) && (n = rf(t)) && (r && (r += " "), r += n); return r; } const rf = (e) => { if (typeof e == "string") return e; let t, n = ""; for (let r = 0; r < e.length; r++) e[r] && (t = rf(e[r])) && (n && (n += " "), n += t); return n; }; function Uy(e, ...t) { let n, r, o, a = s; function s(l) { const u = t.reduce((f, p) => p(f), e()); return n = By(u), r = n.cache.get, o = n.cache.set, a = i, i(l); } function i(l) { const u = r(l); if (u) return u; const f = Gy(l, n); return o(l, f), f; } return function() { return a(Wy.apply(null, arguments)); }; } const He = (e) => { const t = (n) => n[e] || []; return t.isThemeGetter = !0, t; }, of = /^\[(?:([a-z-]+):)?(.+)\]$/i, Yy = /^\d+\/\d+$/, Ky = /* @__PURE__ */ new Set(["px", "full", "screen"]), qy = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Xy = /\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$/, Zy = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Jy = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Qy = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, xn = (e) => Rr(e) || Ky.has(e) || Yy.test(e), Nn = (e) => Or(e, "length", ib), Rr = (e) => !!e && !Number.isNaN(Number(e)), Ls = (e) => Or(e, "number", Rr), qr = (e) => !!e && Number.isInteger(Number(e)), eb = (e) => e.endsWith("%") && Rr(e.slice(0, -1)), xe = (e) => of.test(e), Pn = (e) => qy.test(e), tb = /* @__PURE__ */ new Set(["length", "size", "percentage"]), nb = (e) => Or(e, tb, af), rb = (e) => Or(e, "position", af), ob = /* @__PURE__ */ new Set(["image", "url"]), ab = (e) => Or(e, ob, cb), sb = (e) => Or(e, "", lb), Xr = () => !0, Or = (e, t, n) => { const r = of.exec(e); return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; }, ib = (e) => ( // `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. Xy.test(e) && !Zy.test(e) ), af = () => !1, lb = (e) => Jy.test(e), cb = (e) => Qy.test(e), ub = () => { const e = He("colors"), t = He("spacing"), n = He("blur"), r = He("brightness"), o = He("borderColor"), a = He("borderRadius"), s = He("borderSpacing"), i = He("borderWidth"), l = He("contrast"), u = He("grayscale"), f = He("hueRotate"), p = He("invert"), g = He("gap"), m = He("gradientColorStops"), v = He("gradientColorStopPositions"), h = He("inset"), w = He("margin"), x = He("opacity"), y = He("padding"), b = He("saturate"), S = He("scale"), E = He("sepia"), R = He("skew"), C = He("space"), M = He("translate"), P = () => ["auto", "contain", "none"], j = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", xe, t], k = () => [xe, t], W = () => ["", xn, Nn], A = () => ["auto", Rr, xe], U = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], F = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], L = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], z = () => ["", "0", xe], oe = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], ae = () => [Rr, xe]; return { cacheSize: 500, separator: ":", theme: { colors: [Xr], spacing: [xn, Nn], blur: ["none", "", Pn, xe], brightness: ae(), borderColor: [e], borderRadius: ["none", "", "full", Pn, xe], borderSpacing: k(), borderWidth: W(), contrast: ae(), grayscale: z(), hueRotate: ae(), invert: z(), gap: k(), gradientColorStops: [e], gradientColorStopPositions: [eb, Nn], inset: _(), margin: _(), opacity: ae(), padding: k(), saturate: ae(), scale: ae(), sepia: z(), skew: ae(), space: k(), translate: k() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", "video", xe] }], /** * Container * @see https://tailwindcss.com/docs/container */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [Pn] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": oe() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": oe() }], /** * 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: [...U(), xe] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: j() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": j() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": j() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: P() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": P() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": P() }], /** * 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: [h] }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": [h] }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": [h] }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: [h] }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: [h] }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: [h] }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: [h] }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: [h] }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: [h] }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: ["auto", qr, xe] }], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: _() }], /** * 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", xe] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: z() }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: z() }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: ["first", "last", "none", qr, xe] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": [Xr] }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: ["auto", { span: ["full", qr, xe] }, xe] }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": A() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": A() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": [Xr] }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: ["auto", { span: [qr, xe] }, xe] }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": A() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": A() }], /** * 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", xe] }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", xe] }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: [g] }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": [g] }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": [g] }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: ["normal", ...L()] }], /** * 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", ...L(), "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": [...L(), "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: [y] }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: [y] }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: [y] }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: [y] }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: [y] }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: [y] }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: [y] }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: [y] }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: [y] }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: [w] }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: [w] }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: [w] }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: [w] }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: [w] }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: [w] }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: [w] }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: [w] }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: [w] }], /** * Space Between X * @see https://tailwindcss.com/docs/space */ "space-x": [{ "space-x": [C] }], /** * 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": [C] }], /** * 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", xe, t] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [xe, t, "min", "max", "fit"] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [xe, t, "none", "full", "min", "max", "fit", "prose", { screen: [Pn] }, Pn] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: [xe, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": [xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": [xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] }], /** * Size * @see https://tailwindcss.com/docs/size */ size: [{ size: [xe, t, "auto", "min", "max", "fit"] }], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", Pn, Nn] }], /** * 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", Ls] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [Xr] }], /** * 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", xe] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": ["none", Rr, Ls] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", xn, xe] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", xe] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["none", "disc", "decimal", xe] }], /** * 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: [e] }], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ "placeholder-opacity": [{ "placeholder-opacity": [x] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ "text-color": [{ text: [e] }], /** * Text Opacity * @see https://tailwindcss.com/docs/te