UNPKG

@clxrity/react-audio

Version:
1,642 lines (1,640 loc) 277 kB
import * as ye from "react"; import Yo, { forwardRef as Go, useContext as qo, useState as Ce, useRef as Ie, useEffect as qe, useCallback as Je } from "react"; import { jsxs as Ho, jsx as $e } from "react/jsx-runtime"; function Ko(e2) { return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2; } var Mr = { exports: {} }, Vr = {}; /** * @license React * react-jsx-dev-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var cn; function Xo() { if (cn) return Vr; cn = 1; var e2 = Symbol.for("react.fragment"); return Vr.Fragment = e2, Vr.jsxDEV = void 0, Vr; } var Ur = {}; /** * @license React * react-jsx-dev-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ln; function Jo() { return ln || (ln = 1, process.env.NODE_ENV !== "production" && function() { function e2(d) { if (d == null) return null; if (typeof d == "function") return d.$$typeof === fe ? null : d.displayName || d.name || null; if (typeof d == "string") return d; switch (d) { case E: return "Fragment"; case y: return "Portal"; case _: return "Profiler"; case N: return "StrictMode"; case M: return "Suspense"; case B: return "SuspenseList"; } if (typeof d == "object") switch (typeof d.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), d.$$typeof) { case c: return (d.displayName || "Context") + ".Provider"; case J: return (d._context.displayName || "Context") + ".Consumer"; case A: var I = d.render; return d = d.displayName, d || (d = I.displayName || I.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d; case L: return I = d.displayName || null, I !== null ? I : e2(d.type) || "Memo"; case oe: I = d._payload, d = d._init; try { return e2(d(I)); } catch { } } return null; } function r(d) { return "" + d; } function t(d) { try { r(d); var I = false; } catch { I = true; } if (I) { I = console; var j = I.error, ie = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object"; return j.call( I, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", ie ), r(d); } } function n() { } function o() { if (U === 0) { G = console.log, F = console.info, W = console.warn, K = console.error, Q = console.group, X = console.groupCollapsed, we = console.groupEnd; var d = { configurable: true, enumerable: true, value: n, writable: true }; Object.defineProperties(console, { info: d, log: d, warn: d, error: d, group: d, groupCollapsed: d, groupEnd: d }); } U++; } function i() { if (U--, U === 0) { var d = { configurable: true, enumerable: true, writable: true }; Object.defineProperties(console, { log: T({}, d, { value: G }), info: T({}, d, { value: F }), warn: T({}, d, { value: W }), error: T({}, d, { value: K }), group: T({}, d, { value: Q }), groupCollapsed: T({}, d, { value: X }), groupEnd: T({}, d, { value: we }) }); } 0 > U && console.error( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } function s(d) { if (P === void 0) try { throw Error(); } catch (j) { var I = j.stack.trim().match(/\n( *(at )?)/); P = I && I[1] || "", Ae = -1 < j.stack.indexOf(` at`) ? " (<anonymous>)" : -1 < j.stack.indexOf("@") ? "@unknown:0:0" : ""; } return ` ` + P + d + Ae; } function l(d, I) { if (!d || Ke) return ""; var j = ar.get(d); if (j !== void 0) return j; Ke = true, j = Error.prepareStackTrace, Error.prepareStackTrace = void 0; var ie = null; ie = se.H, se.H = null, o(); try { var Te = { DetermineComponentFrameRoot: function() { try { if (I) { 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 (We) { var jr = We; } Reflect.construct(d, [], Xe); } else { try { Xe.call(); } catch (We) { jr = We; } d.call(Xe.prototype); } } else { try { throw Error(); } catch (We) { jr = We; } (Xe = d()) && typeof Xe.catch == "function" && Xe.catch(function() { }); } } catch (We) { if (We && jr && typeof We.stack == "string") return [We.stack, jr.stack]; } return [null, null]; } }; Te.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; var de = Object.getOwnPropertyDescriptor( Te.DetermineComponentFrameRoot, "name" ); de && de.configurable && Object.defineProperty( Te.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" } ); var q = Te.DetermineComponentFrameRoot(), Fe = q[0], cr = q[1]; if (Fe && cr) { var ke = Fe.split(` `), nr = cr.split(` `); for (q = de = 0; de < ke.length && !ke[de].includes( "DetermineComponentFrameRoot" ); ) de++; for (; q < nr.length && !nr[q].includes( "DetermineComponentFrameRoot" ); ) q++; if (de === ke.length || q === nr.length) for (de = ke.length - 1, q = nr.length - 1; 1 <= de && 0 <= q && ke[de] !== nr[q]; ) q--; for (; 1 <= de && 0 <= q; de--, q--) if (ke[de] !== nr[q]) { if (de !== 1 || q !== 1) do if (de--, q--, 0 > q || ke[de] !== nr[q]) { var Er = ` ` + ke[de].replace( " at new ", " at " ); return d.displayName && Er.includes("<anonymous>") && (Er = Er.replace("<anonymous>", d.displayName)), typeof d == "function" && ar.set(d, Er), Er; } while (1 <= de && 0 <= q); break; } } } finally { Ke = false, se.H = ie, i(), Error.prepareStackTrace = j; } return ke = (ke = d ? d.displayName || d.name : "") ? s(ke) : "", typeof d == "function" && ar.set(d, ke), ke; } function u(d) { if (d == null) return ""; if (typeof d == "function") { var I = d.prototype; return l( d, !(!I || !I.isReactComponent) ); } if (typeof d == "string") return s(d); switch (d) { case M: return s("Suspense"); case B: return s("SuspenseList"); } if (typeof d == "object") switch (d.$$typeof) { case A: return d = l(d.render, false), d; case L: return u(d.type); case oe: I = d._payload, d = d._init; try { return u(d(I)); } catch { } } return ""; } function f() { var d = se.A; return d === null ? null : d.getOwner(); } function p(d) { if (x.call(d, "key")) { var I = Object.getOwnPropertyDescriptor(d, "key").get; if (I && I.isReactWarning) return false; } return d.key !== void 0; } function m(d, I) { function j() { nn || (nn = true, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", I )); } j.isReactWarning = true, Object.defineProperty(d, "key", { get: j, configurable: true }); } function h() { var d = e2(this.type); return on[d] || (on[d] = true, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), d = this.props.ref, d !== void 0 ? d : null; } function w(d, I, j, ie, Te, de) { return j = de.ref, d = { $$typeof: C, type: d, key: I, props: de, _owner: Te }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(d, "ref", { enumerable: false, get: h }) : Object.defineProperty(d, "ref", { enumerable: false, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", { configurable: false, enumerable: false, writable: true, value: 0 }), Object.defineProperty(d, "_debugInfo", { configurable: false, enumerable: false, writable: true, value: null }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d; } function g(d, I, j, ie, Te, de) { if (typeof d == "string" || typeof d == "function" || d === E || d === _ || d === N || d === M || d === B || d === V || typeof d == "object" && d !== null && (d.$$typeof === oe || d.$$typeof === L || d.$$typeof === c || d.$$typeof === J || d.$$typeof === A || d.$$typeof === Y || d.getModuleId !== void 0)) { var q = I.children; if (q !== void 0) if (ie) if (z(q)) { for (ie = 0; ie < q.length; ie++) a(q[ie], d); Object.freeze && Object.freeze(q); } else console.error( "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 a(q, d); } else q = "", (d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (q += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), d === null ? ie = "null" : z(d) ? ie = "array" : d !== void 0 && d.$$typeof === C ? (ie = "<" + (e2(d.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof d, console.error( "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, q ); if (x.call(I, "key")) { q = e2(d); var Fe = Object.keys(I).filter(function(ke) { return ke !== "key"; }); ie = 0 < Fe.length ? "{key: someKey, " + Fe.join(": ..., ") + ": ...}" : "{key: someKey}", sn[q + ie] || (Fe = 0 < Fe.length ? "{" + Fe.join(": ..., ") + ": ...}" : "{}", console.error( `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} />`, ie, q, Fe, q ), sn[q + ie] = true); } if (q = null, j !== void 0 && (t(j), q = "" + j), p(I) && (t(I.key), q = "" + I.key), "key" in I) { j = {}; for (var cr in I) cr !== "key" && (j[cr] = I[cr]); } else j = I; return q && m( j, typeof d == "function" ? d.displayName || d.name || "Unknown" : d ), w(d, q, de, Te, f(), j); } function a(d, I) { if (typeof d == "object" && d && d.$$typeof !== Wo) { if (z(d)) for (var j = 0; j < d.length; j++) { var ie = d[j]; v(ie) && S(ie, I); } else if (v(d)) d._store && (d._store.validated = 1); else if (d === null || typeof d != "object" ? j = null : (j = pe && d[pe] || d["@@iterator"], j = typeof j == "function" ? j : null), typeof j == "function" && j !== d.entries && (j = j.call(d), j !== d)) for (; !(d = j.next()).done; ) v(d.value) && S(d.value, I); } } function v(d) { return typeof d == "object" && d !== null && d.$$typeof === C; } function S(d, I) { if (d._store && !d._store.validated && d.key == null && (d._store.validated = 1, I = D(I), !an[I])) { an[I] = true; var j = ""; d && d._owner != null && d._owner !== f() && (j = null, typeof d._owner.tag == "number" ? j = e2(d._owner.type) : typeof d._owner.name == "string" && (j = d._owner.name), j = " It was passed a child from " + j + "."); var ie = se.getCurrentStack; se.getCurrentStack = function() { var Te = u(d.type); return ie && (Te += ie() || ""), Te; }, console.error( 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', I, j ), se.getCurrentStack = ie; } } function D(d) { var I = "", j = f(); return j && (j = e2(j.type)) && (I = ` Check the render method of \`` + j + "`."), I || (d = e2(d)) && (I = ` Check the top-level render call using <` + d + ">."), I; } var k = Yo, C = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), c = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), oe = Symbol.for("react.lazy"), V = Symbol.for("react.offscreen"), pe = Symbol.iterator, fe = Symbol.for("react.client.reference"), se = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, T = Object.assign, Y = Symbol.for("react.client.reference"), z = Array.isArray, U = 0, G, F, W, K, Q, X, we; n.__reactDisabledLog = true; var P, Ae, Ke = false, ar = new (typeof WeakMap == "function" ? WeakMap : Map)(), Wo = Symbol.for("react.client.reference"), nn, on = {}, sn = {}, an = {}; Ur.Fragment = E, Ur.jsxDEV = function(d, I, j, ie, Te, de) { return g(d, I, j, ie, Te, de); }; }()), Ur; } var un; function Qo() { return un || (un = 1, process.env.NODE_ENV === "production" ? Mr.exports = Xo() : Mr.exports = Jo()), Mr.exports; } var O = Qo(); function ro({ src: e2 }) { if (e2.endsWith(".ogg") || e2.endsWith(".wav") || e2.endsWith(".aac") || e2.endsWith(".flac") || e2.endsWith(".mp3") || e2.endsWith(".webm") || e2.endsWith(".m4a")) return /* @__PURE__ */ O.jsxDEV("source", { src: e2, type: `audio/${e2.split(".").pop()}` }, void 0, false, { fileName: "/Users/clxrity/Desktop/stuff/code/pkg (@clxrity)/react-audio/src/components/ui/AudioSource.tsx", lineNumber: 11, columnNumber: 16 }, this); } function to(e2) { var r, t, n = ""; if (typeof e2 == "string" || typeof e2 == "number") n += e2; else if (typeof e2 == "object") if (Array.isArray(e2)) { var o = e2.length; for (r = 0; r < o; r++) e2[r] && (t = to(e2[r])) && (n && (n += " "), n += t); } else for (t in e2) e2[t] && (n && (n += " "), n += t); return n; } function no() { for (var e2, r, t = 0, n = "", o = arguments.length; t < o; t++) (e2 = arguments[t]) && (r = to(e2)) && (n && (n += " "), n += r); return n; } const Ut = "-", Zo = (e2) => { const r = ri(e2), { conflictingClassGroups: t, conflictingClassGroupModifiers: n } = e2; return { getClassGroupId: (s) => { const l = s.split(Ut); return l[0] === "" && l.length !== 1 && l.shift(), oo(l, r) || ei(s); }, getConflictingClassGroupIds: (s, l) => { const u = t[s] || []; return l && n[s] ? [...u, ...n[s]] : u; } }; }, oo = (e2, r) => { var _a2; if (e2.length === 0) return r.classGroupId; const t = e2[0], n = r.nextPart.get(t), o = n ? oo(e2.slice(1), n) : void 0; if (o) return o; if (r.validators.length === 0) return; const i = e2.join(Ut); return (_a2 = r.validators.find(({ validator: s }) => s(i))) == null ? void 0 : _a2.classGroupId; }, fn = /^\[(.+)\]$/, ei = (e2) => { if (fn.test(e2)) { const r = fn.exec(e2)[1], t = r == null ? void 0 : r.substring(0, r.indexOf(":")); if (t) return "arbitrary.." + t; } }, ri = (e2) => { const { theme: r, classGroups: t } = e2, n = { nextPart: /* @__PURE__ */ new Map(), validators: [] }; for (const o in t) At(t[o], n, o, r); return n; }, At = (e2, r, t, n) => { e2.forEach((o) => { if (typeof o == "string") { const i = o === "" ? r : dn(r, o); i.classGroupId = t; return; } if (typeof o == "function") { if (ti(o)) { At(o(n), r, t, n); return; } r.validators.push({ validator: o, classGroupId: t }); return; } Object.entries(o).forEach(([i, s]) => { At(s, dn(r, i), t, n); }); }); }, dn = (e2, r) => { let t = e2; return r.split(Ut).forEach((n) => { t.nextPart.has(n) || t.nextPart.set(n, { nextPart: /* @__PURE__ */ new Map(), validators: [] }), t = t.nextPart.get(n); }), t; }, ti = (e2) => e2.isThemeGetter, ni = (e2) => { if (e2 < 1) return { get: () => { }, set: () => { } }; let r = 0, t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); const o = (i, s) => { t.set(i, s), r++, r > e2 && (r = 0, n = t, t = /* @__PURE__ */ new Map()); }; return { get(i) { let s = t.get(i); if (s !== void 0) return s; if ((s = n.get(i)) !== void 0) return o(i, s), s; }, set(i, s) { t.has(i) ? t.set(i, s) : o(i, s); } }; }, Ot = "!", Pt = ":", oi = Pt.length, ii = (e2) => { const { prefix: r, experimentalParseClassName: t } = e2; let n = (o) => { const i = []; let s = 0, l = 0, u = 0, f; for (let g = 0; g < o.length; g++) { let a = o[g]; if (s === 0 && l === 0) { if (a === Pt) { i.push(o.slice(u, g)), u = g + oi; continue; } if (a === "/") { f = g; continue; } } a === "[" ? s++ : a === "]" ? s-- : a === "(" ? l++ : a === ")" && l--; } const p = i.length === 0 ? o : o.substring(u), m = si(p), h = m !== p, w = f && f > u ? f - u : void 0; return { modifiers: i, hasImportantModifier: h, baseClassName: m, maybePostfixModifierPosition: w }; }; if (r) { const o = r + Pt, i = n; n = (s) => s.startsWith(o) ? i(s.substring(o.length)) : { isExternal: true, modifiers: [], hasImportantModifier: false, baseClassName: s, maybePostfixModifierPosition: void 0 }; } if (t) { const o = n; n = (i) => t({ className: i, parseClassName: o }); } return n; }, si = (e2) => e2.endsWith(Ot) ? e2.substring(0, e2.length - 1) : e2.startsWith(Ot) ? e2.substring(1) : e2, ai = (e2) => { const r = Object.fromEntries(e2.orderSensitiveModifiers.map((n) => [n, true])); return (n) => { if (n.length <= 1) return n; const o = []; let i = []; return n.forEach((s) => { s[0] === "[" || r[s] ? (o.push(...i.sort(), s), i = []) : i.push(s); }), o.push(...i.sort()), o; }; }, ci = (e2) => ({ cache: ni(e2.cacheSize), parseClassName: ii(e2), sortModifiers: ai(e2), ...Zo(e2) }), li = /\s+/, ui = (e2, r) => { const { parseClassName: t, getClassGroupId: n, getConflictingClassGroupIds: o, sortModifiers: i } = r, s = [], l = e2.trim().split(li); let u = ""; for (let f = l.length - 1; f >= 0; f -= 1) { const p = l[f], { isExternal: m, modifiers: h, hasImportantModifier: w, baseClassName: g, maybePostfixModifierPosition: a } = t(p); if (m) { u = p + (u.length > 0 ? " " + u : u); continue; } let v = !!a, S = n(v ? g.substring(0, a) : g); if (!S) { if (!v) { u = p + (u.length > 0 ? " " + u : u); continue; } if (S = n(g), !S) { u = p + (u.length > 0 ? " " + u : u); continue; } v = false; } const D = i(h).join(":"), k = w ? D + Ot : D, C = k + S; if (s.includes(C)) continue; s.push(C); const y = o(S, v); for (let E = 0; E < y.length; ++E) { const N = y[E]; s.push(k + N); } u = p + (u.length > 0 ? " " + u : u); } return u; }; function fi() { let e2 = 0, r, t, n = ""; for (; e2 < arguments.length; ) (r = arguments[e2++]) && (t = io(r)) && (n && (n += " "), n += t); return n; } const io = (e2) => { if (typeof e2 == "string") return e2; let r, t = ""; for (let n = 0; n < e2.length; n++) e2[n] && (r = io(e2[n])) && (t && (t += " "), t += r); return t; }; function di(e2, ...r) { let t, n, o, i = s; function s(u) { const f = r.reduce((p, m) => m(p), e2()); return t = ci(f), n = t.cache.get, o = t.cache.set, i = l, l(u); } function l(u) { const f = n(u); if (f) return f; const p = ui(u, t); return o(u, p), p; } return function() { return i(fi.apply(null, arguments)); }; } const xe = (e2) => { const r = (t) => t[e2] || []; return r.isThemeGetter = true, r; }, so = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ao = /^\((?:(\w[\w-]*):)?(.+)\)$/i, pi = /^\d+\/\d+$/, mi = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, hi = /\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$/, gi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, yi = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, bi = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, lr = (e2) => pi.test(e2), H = (e2) => !!e2 && !Number.isNaN(Number(e2)), or = (e2) => !!e2 && Number.isInteger(Number(e2)), pn = (e2) => e2.endsWith("%") && H(e2.slice(0, -1)), Qe = (e2) => mi.test(e2), vi = () => true, xi = (e2) => ( // `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. hi.test(e2) && !gi.test(e2) ), zt = () => false, wi = (e2) => yi.test(e2), Ei = (e2) => bi.test(e2), Si = (e2) => !R(e2) && !$(e2), Ci = (e2) => vr(e2, uo, zt), R = (e2) => so.test(e2), ir = (e2) => vr(e2, fo, xi), yt = (e2) => vr(e2, Ii, H), ki = (e2) => vr(e2, co, zt), Ti = (e2) => vr(e2, lo, Ei), Ni = (e2) => vr(e2, zt, wi), $ = (e2) => ao.test(e2), zr = (e2) => xr(e2, fo), Ai = (e2) => xr(e2, ji), Oi = (e2) => xr(e2, co), Pi = (e2) => xr(e2, uo), _i = (e2) => xr(e2, lo), Ri = (e2) => xr(e2, Mi, true), vr = (e2, r, t) => { const n = so.exec(e2); return n ? n[1] ? r(n[1]) : t(n[2]) : false; }, xr = (e2, r, t = false) => { const n = ao.exec(e2); return n ? n[1] ? r(n[1]) : t : false; }, co = (e2) => e2 === "position", $i = /* @__PURE__ */ new Set(["image", "url"]), lo = (e2) => $i.has(e2), Di = /* @__PURE__ */ new Set(["length", "size", "percentage"]), uo = (e2) => Di.has(e2), fo = (e2) => e2 === "length", Ii = (e2) => e2 === "number", ji = (e2) => e2 === "family-name", Mi = (e2) => e2 === "shadow", Vi = () => { const e2 = xe("color"), r = xe("font"), t = xe("text"), n = xe("font-weight"), o = xe("tracking"), i = xe("leading"), s = xe("breakpoint"), l = xe("container"), u = xe("spacing"), f = xe("radius"), p = xe("shadow"), m = xe("inset-shadow"), h = xe("drop-shadow"), w = xe("blur"), g = xe("perspective"), a = xe("aspect"), v = xe("ease"), S = xe("animate"), D = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], C = () => ["auto", "hidden", "clip", "visible", "scroll"], y = () => ["auto", "contain", "none"], E = () => [$, R, u], N = () => [lr, "full", "auto", ...E()], _ = () => [or, "none", "subgrid", $, R], J = () => ["auto", { span: ["full", or, $, R] }, $, R], c = () => [or, "auto", $, R], A = () => ["auto", "min", "max", "fr", $, R], M = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline"], B = () => ["start", "end", "center", "stretch"], L = () => ["auto", ...E()], oe = () => [lr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], V = () => [e2, $, R], pe = () => [pn, ir], fe = () => [ // Deprecated since Tailwind CSS v4.0.0 "", "none", "full", f, $, R ], se = () => ["", H, zr, ir], x = () => ["solid", "dashed", "dotted", "double"], T = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Y = () => [ // Deprecated since Tailwind CSS v4.0.0 "", "none", w, $, R ], z = () => ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", $, R], U = () => ["none", H, $, R], G = () => ["none", H, $, R], F = () => [H, $, R], W = () => [lr, "full", ...E()]; return { cacheSize: 500, theme: { animate: ["spin", "ping", "pulse", "bounce"], aspect: ["video"], blur: [Qe], breakpoint: [Qe], color: [vi], container: [Qe], "drop-shadow": [Qe], ease: ["in", "out", "in-out"], font: [Si], "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"], "inset-shadow": [Qe], leading: ["none", "tight", "snug", "normal", "relaxed", "loose"], perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"], radius: [Qe], shadow: [Qe], spacing: ["px", H], text: [Qe], tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"] }, classGroups: { // -------------- // --- Layout --- // -------------- /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [{ aspect: ["auto", "square", lr, R, $, a] }], /** * Container * @see https://tailwindcss.com/docs/container * @deprecated since Tailwind CSS v4.0.0 */ container: ["container"], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [{ columns: [H, R, $, l] }], /** * Break After * @see https://tailwindcss.com/docs/break-after */ "break-after": [{ "break-after": D() }], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ "break-before": [{ "break-before": D() }], /** * 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"], /** * Screen Reader Only * @see https://tailwindcss.com/docs/display#screen-reader-only */ sr: ["sr-only", "not-sr-only"], /** * 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: [...k(), R, $] }], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [{ overflow: C() }], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ "overflow-x": [{ "overflow-x": C() }], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ "overflow-y": [{ "overflow-y": C() }], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [{ overscroll: y() }], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-x": [{ "overscroll-x": y() }], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ "overscroll-y": [{ "overscroll-y": y() }], /** * 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: N() }], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-x": [{ "inset-x": N() }], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ "inset-y": [{ "inset-y": N() }], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [{ start: N() }], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [{ end: N() }], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [{ top: N() }], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [{ right: N() }], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [{ bottom: N() }], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [{ left: N() }], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: ["visible", "invisible", "collapse"], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [{ z: [or, "auto", $, R] }], // ------------------------ // --- Flexbox and Grid --- // ------------------------ /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [{ basis: [lr, "full", "auto", l, ...E()] }], /** * 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: ["nowrap", "wrap", "wrap-reverse"] }], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [{ flex: [H, lr, "auto", "initial", "none", R] }], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [{ grow: ["", H, $, R] }], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [{ shrink: ["", H, $, R] }], /** * Order * @see https://tailwindcss.com/docs/order */ order: [{ order: [or, "first", "last", "none", $, R] }], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ "grid-cols": [{ "grid-cols": _() }], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ "col-start-end": [{ col: J() }], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ "col-start": [{ "col-start": c() }], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ "col-end": [{ "col-end": c() }], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ "grid-rows": [{ "grid-rows": _() }], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ "row-start-end": [{ row: J() }], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ "row-start": [{ "row-start": c() }], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ "row-end": [{ "row-end": c() }], /** * 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": A() }], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ "auto-rows": [{ "auto-rows": A() }], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [{ gap: E() }], /** * Gap X * @see https://tailwindcss.com/docs/gap */ "gap-x": [{ "gap-x": E() }], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ "gap-y": [{ "gap-y": E() }], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ "justify-content": [{ justify: [...M(), "normal"] }], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ "justify-items": [{ "justify-items": [...B(), "normal"] }], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ "justify-self": [{ "justify-self": ["auto", ...B()] }], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ "align-content": [{ content: ["normal", ...M()] }], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ "align-items": [{ items: [...B(), "baseline"] }], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ "align-self": [{ self: ["auto", ...B(), "baseline"] }], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ "place-content": [{ "place-content": M() }], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ "place-items": [{ "place-items": [...B(), "baseline"] }], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ "place-self": [{ "place-self": ["auto", ...B()] }], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [{ p: E() }], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [{ px: E() }], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [{ py: E() }], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [{ ps: E() }], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [{ pe: E() }], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [{ pt: E() }], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [{ pr: E() }], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [{ pb: E() }], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [{ pl: E() }], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [{ m: L() }], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [{ mx: L() }], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [{ my: L() }], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [{ ms: L() }], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [{ me: L() }], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [{ mt: L() }], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [{ mr: L() }], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [{ mb: L() }], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [{ ml: L() }], /** * Space Between X * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-x": [{ "space-x": E() }], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-x-reverse": ["space-x-reverse"], /** * Space Between Y * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-y": [{ "space-y": E() }], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/margin#adding-space-between-children */ "space-y-reverse": ["space-y-reverse"], // -------------- // --- Sizing --- // -------------- /** * Size * @see https://tailwindcss.com/docs/width#setting-both-width-and-height */ size: [{ size: oe() }], /** * Width * @see https://tailwindcss.com/docs/width */ w: [{ w: [l, "screen", ...oe()] }], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ "min-w": [{ "min-w": [ l, "screen", /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ "none", ...oe() ] }], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ "max-w": [{ "max-w": [ l, "screen", "none", /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ "prose", /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ { screen: [s] }, ...oe() ] }], /** * Height * @see https://tailwindcss.com/docs/height */ h: [{ h: ["screen", ...oe()] }], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ "min-h": [{ "min-h": ["screen", "none", ...oe()] }], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ "max-h": [{ "max-h": ["screen", ...oe()] }], // ------------------ // --- Typography --- // ------------------ /** * Font Size * @see https://tailwindcss.com/docs/font-size */ "font-size": [{ text: ["base", t, zr, ir] }], /** * 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: [n, $, yt] }], /** * Font Stretch * @see https://tailwindcss.com/docs/font-stretch */ "font-stretch": [{ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", pn, R] }], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ "font-family": [{ font: [Ai, R, r] }], /** * 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: [o, $, R] }], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ "line-clamp": [{ "line-clamp": [H, "none", $, yt] }], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [{ leading: [ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ i, ...E() ] }], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ "list-image": [{ "list-image": ["none", $, R] }], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ "list-style-position": [{ list: ["inside", "outside"] }], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ "list-style-type": [{ list: ["disc", "decimal", "none", $, R] }], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://v3.tailwindcss.com/docs/placeholder-color */ "placeholder-color": [{ placeholder: V() }], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ "text-color": [{ text: V() }], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ "text-decoration": ["underline", "overline", "line-through", "no-underline"], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ "text-decoration-style": [{ decoration: [...x(), "wavy"] }], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ "text-decoration-thickness": [{ decoration: [H, "from-font", "auto", $, ir] }], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ "text-decoration-color": [{ decoration: V() }], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ "underline-offset": [{ "underline-offset": [H, "auto", $, R] }], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ "text-overflow": ["truncate", "text-ellipsis", "text-clip"], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [{ indent: E() }], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", $, R] }], /** * Whitespace * @see https://tailwindcss.com/docs/whitespace */ whitespace: [{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }], /** * Word Break * @see https://tailwindcss.com/docs/word-break */ break: [{ break: ["normal", "words", "all", "keep"] }], /** * Hyphens * @see https://tailwindcss.com/docs/hyphens */ hyphens: [{ hyphens: ["none", "manual", "auto"] }], /** * Content * @see https://tailwindcss.com/docs/content */ content: [{ content: ["none", $, R] }], // ------------------- // --- Backgrounds --- // ------------------- /** * Background Attachment * @see https://tailwindcss.com/docs/background-attachment */ "bg-attachment": [{ bg: ["fixed", "local", "