@am-ogs/vue-ui
Version:
Library for components that are re-used across all my projects,
1,895 lines • 206 kB
JavaScript
import { defineComponent as yn, createElementBlock as R, openBlock as T, normalizeClass as D, isRef as P_, shallowRef as ot, toValue as de, toRef as M_, readonly as wl, ref as ms, customRef as W_, onMounted as bl, nextTick as Al, getCurrentInstance as xs, watch as Br, hasInjectionContext as Sl, inject as k_, getCurrentScope as D_, onScopeDispose as B_, computed as Ae, watchEffect as N_, unref as Zn, createElementVNode as v, createCommentVNode as Se, createBlock as tl, resolveDynamicComponent as rl, toDisplayString as an, Fragment as xn, createVNode as lt, renderList as $n, h as il, resolveComponent as U_, renderSlot as H, createTextVNode as Pt } from "vue";
const H_ = {
class: /* @__PURE__ */ D([
"mt-1",
"text-xl text-pop-secondary",
"fa-regular fa-sync fa-spin"
]),
"aria-hidden": "true"
}, bx = /* @__PURE__ */ yn({
__name: "LoadingSpinner",
props: {
text: String
},
setup(s) {
return (u, i) => (T(), R("i", H_));
}
});
function G_(s) {
return D_() ? (B_(s), !0) : !1;
}
const fs = /* @__PURE__ */ new WeakMap(), z_ = (...s) => {
var u;
const i = s[0], a = (u = xs()) == null ? void 0 : u.proxy;
if (a == null && !Sl())
throw new Error("injectLocal must be called in setup");
return a && fs.has(a) && i in fs.get(a) ? fs.get(a)[i] : k_(...s);
}, q_ = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const K_ = Object.prototype.toString, Z_ = (s) => K_.call(s) === "[object Object]", Y_ = () => {
};
function Il(...s) {
if (s.length !== 1)
return M_(...s);
const u = s[0];
return typeof u == "function" ? wl(W_(() => ({ get: u, set: Y_ }))) : ms(u);
}
function J_(s, u) {
function i(...a) {
return new Promise((c, p) => {
Promise.resolve(s(() => u.apply(this, a), { fn: u, thisArg: this, args: a })).then(c).catch(p);
});
}
return i;
}
const $l = (s) => s();
function Q_(s = $l, u = {}) {
const {
initialState: i = "active"
} = u, a = Il(i === "active");
function c() {
a.value = !1;
}
function p() {
a.value = !0;
}
const m = (...A) => {
a.value && s(...A);
};
return { isActive: wl(a), pause: c, resume: p, eventFilter: m };
}
function sl(s) {
return s.endsWith("rem") ? Number.parseFloat(s) * 16 : Number.parseFloat(s);
}
function as(s) {
return Array.isArray(s) ? s : [s];
}
function X_(s) {
return xs();
}
function V_(s, u, i = {}) {
const {
eventFilter: a = $l,
...c
} = i;
return Br(
s,
J_(
a,
u
),
c
);
}
function j_(s, u, i = {}) {
const {
eventFilter: a,
initialState: c = "active",
...p
} = i, { eventFilter: m, pause: A, resume: I, isActive: $ } = Q_(a, { initialState: c });
return { stop: V_(
s,
u,
{
...p,
eventFilter: m
}
), pause: A, resume: I, isActive: $ };
}
function Cl(s, u = !0, i) {
X_() ? bl(s, i) : u ? s() : Al(s);
}
function nv(s = !1, u = {}) {
const {
truthyValue: i = !0,
falsyValue: a = !1
} = u, c = P_(s), p = ot(s);
function m(A) {
if (arguments.length)
return p.value = A, p.value;
{
const I = de(i);
return p.value = p.value === I ? de(a) : I, p.value;
}
}
return c ? m : [p, m];
}
function ev(s, u, i) {
return Br(
s,
u,
{
...i,
immediate: !0
}
);
}
const Mt = q_ ? window : void 0;
function Tl(s) {
var u;
const i = de(s);
return (u = i == null ? void 0 : i.$el) != null ? u : i;
}
function hs(...s) {
const u = [], i = () => {
u.forEach((A) => A()), u.length = 0;
}, a = (A, I, $, F) => (A.addEventListener(I, $, F), () => A.removeEventListener(I, $, F)), c = Ae(() => {
const A = as(de(s[0])).filter((I) => I != null);
return A.every((I) => typeof I != "string") ? A : void 0;
}), p = ev(
() => {
var A, I;
return [
(I = (A = c.value) == null ? void 0 : A.map(($) => Tl($))) != null ? I : [Mt].filter(($) => $ != null),
as(de(c.value ? s[1] : s[0])),
as(Zn(c.value ? s[2] : s[1])),
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
de(c.value ? s[3] : s[2])
];
},
([A, I, $, F]) => {
if (i(), !(A != null && A.length) || !(I != null && I.length) || !($ != null && $.length))
return;
const k = Z_(F) ? { ...F } : F;
u.push(
...A.flatMap(
(q) => I.flatMap(
(X) => $.map((j) => a(q, X, j, k))
)
)
);
},
{ flush: "post" }
), m = () => {
p(), i();
};
return G_(i), m;
}
function tv() {
const s = ot(!1), u = xs();
return u && bl(() => {
s.value = !0;
}, u), s;
}
function rv(s) {
const u = tv();
return Ae(() => (u.value, !!s()));
}
const iv = Symbol("vueuse-ssr-width");
function sv() {
const s = Sl() ? z_(iv, null) : null;
return typeof s == "number" ? s : void 0;
}
function ov(s, u = {}) {
const { window: i = Mt, ssrWidth: a = sv() } = u, c = rv(() => i && "matchMedia" in i && typeof i.matchMedia == "function"), p = ot(typeof a == "number"), m = ot(), A = ot(!1), I = ($) => {
A.value = $.matches;
};
return N_(() => {
if (p.value) {
p.value = !c.value;
const $ = de(s).split(",");
A.value = $.some((F) => {
const k = F.includes("not all"), q = F.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), X = F.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
let j = !!(q || X);
return q && j && (j = a >= sl(q[1])), X && j && (j = a <= sl(X[1])), k ? !j : j;
});
return;
}
c.value && (m.value = i.matchMedia(de(s)), A.value = m.value.matches);
}), hs(m, "change", I, { passive: !0 }), Ae(() => A.value);
}
const Or = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Fr = "__vueuse_ssr_handlers__", uv = /* @__PURE__ */ lv();
function lv() {
return Fr in Or || (Or[Fr] = Or[Fr] || {}), Or[Fr];
}
function Rl(s, u) {
return uv[s] || u;
}
function fv(s) {
return ov("(prefers-color-scheme: dark)", s);
}
function av(s) {
return s == null ? "any" : s instanceof Set ? "set" : s instanceof Map ? "map" : s instanceof Date ? "date" : typeof s == "boolean" ? "boolean" : typeof s == "string" ? "string" : typeof s == "object" ? "object" : Number.isNaN(s) ? "any" : "number";
}
const cv = {
boolean: {
read: (s) => s === "true",
write: (s) => String(s)
},
object: {
read: (s) => JSON.parse(s),
write: (s) => JSON.stringify(s)
},
number: {
read: (s) => Number.parseFloat(s),
write: (s) => String(s)
},
any: {
read: (s) => s,
write: (s) => String(s)
},
string: {
read: (s) => s,
write: (s) => String(s)
},
map: {
read: (s) => new Map(JSON.parse(s)),
write: (s) => JSON.stringify(Array.from(s.entries()))
},
set: {
read: (s) => new Set(JSON.parse(s)),
write: (s) => JSON.stringify(Array.from(s))
},
date: {
read: (s) => new Date(s),
write: (s) => s.toISOString()
}
}, ol = "vueuse-storage";
function dv(s, u, i, a = {}) {
var c;
const {
flush: p = "pre",
deep: m = !0,
listenToStorageChanges: A = !0,
writeDefaults: I = !0,
mergeDefaults: $ = !1,
shallow: F,
window: k = Mt,
eventFilter: q,
onError: X = (J) => {
console.error(J);
},
initOnMounted: j
} = a, Y = (F ? ot : ms)(typeof u == "function" ? u() : u), E = Ae(() => de(s));
if (!i)
try {
i = Rl("getDefaultStorage", () => {
var J;
return (J = Mt) == null ? void 0 : J.localStorage;
})();
} catch (J) {
X(J);
}
if (!i)
return Y;
const cn = de(u), En = av(cn), rn = (c = a.serializer) != null ? c : cv[En], { pause: nn, resume: gn } = j_(
Y,
() => sn(Y.value),
{ flush: p, deep: m, eventFilter: q }
);
Br(E, () => Sn(), { flush: p }), k && A && Cl(() => {
i instanceof Storage ? hs(k, "storage", Sn, { passive: !0 }) : hs(k, ol, Tn), j && Sn();
}), j || Sn();
function K(J, hn) {
if (k) {
const wn = {
key: E.value,
oldValue: J,
newValue: hn,
storageArea: i
};
k.dispatchEvent(i instanceof Storage ? new StorageEvent("storage", wn) : new CustomEvent(ol, {
detail: wn
}));
}
}
function sn(J) {
try {
const hn = i.getItem(E.value);
if (J == null)
K(hn, null), i.removeItem(E.value);
else {
const wn = rn.write(J);
hn !== wn && (i.setItem(E.value, wn), K(hn, wn));
}
} catch (hn) {
X(hn);
}
}
function Cn(J) {
const hn = J ? J.newValue : i.getItem(E.value);
if (hn == null)
return I && cn != null && i.setItem(E.value, rn.write(cn)), cn;
if (!J && $) {
const wn = rn.read(hn);
return typeof $ == "function" ? $(wn, cn) : En === "object" && !Array.isArray(wn) ? { ...cn, ...wn } : wn;
} else return typeof hn != "string" ? hn : rn.read(hn);
}
function Sn(J) {
if (!(J && J.storageArea !== i)) {
if (J && J.key == null) {
Y.value = cn;
return;
}
if (!(J && J.key !== E.value)) {
nn();
try {
(J == null ? void 0 : J.newValue) !== rn.write(Y.value) && (Y.value = Cn(J));
} catch (hn) {
X(hn);
} finally {
J ? Al(gn) : gn();
}
}
}
}
function Tn(J) {
Sn(J.detail);
}
return Y;
}
const hv = "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";
function pv(s = {}) {
const {
selector: u = "html",
attribute: i = "class",
initialValue: a = "auto",
window: c = Mt,
storage: p,
storageKey: m = "vueuse-color-scheme",
listenToStorageChanges: A = !0,
storageRef: I,
emitAuto: $,
disableTransition: F = !0
} = s, k = {
auto: "",
light: "light",
dark: "dark",
...s.modes || {}
}, q = fv({ window: c }), X = Ae(() => q.value ? "dark" : "light"), j = I || (m == null ? Il(a) : dv(m, a, p, { window: c, listenToStorageChanges: A })), Y = Ae(() => j.value === "auto" ? X.value : j.value), E = Rl(
"updateHTMLAttrs",
(nn, gn, K) => {
const sn = typeof nn == "string" ? c == null ? void 0 : c.document.querySelector(nn) : Tl(nn);
if (!sn)
return;
const Cn = /* @__PURE__ */ new Set(), Sn = /* @__PURE__ */ new Set();
let Tn = null;
if (gn === "class") {
const hn = K.split(/\s/g);
Object.values(k).flatMap((wn) => (wn || "").split(/\s/g)).filter(Boolean).forEach((wn) => {
hn.includes(wn) ? Cn.add(wn) : Sn.add(wn);
});
} else
Tn = { key: gn, value: K };
if (Cn.size === 0 && Sn.size === 0 && Tn === null)
return;
let J;
F && (J = c.document.createElement("style"), J.appendChild(document.createTextNode(hv)), c.document.head.appendChild(J));
for (const hn of Cn)
sn.classList.add(hn);
for (const hn of Sn)
sn.classList.remove(hn);
Tn && sn.setAttribute(Tn.key, Tn.value), F && (c.getComputedStyle(J).opacity, document.head.removeChild(J));
}
);
function cn(nn) {
var gn;
E(u, i, (gn = k[nn]) != null ? gn : nn);
}
function En(nn) {
s.onChanged ? s.onChanged(nn, cn) : cn(nn);
}
Br(Y, En, { flush: "post", immediate: !0 }), Cl(() => En(Y.value));
const rn = Ae({
get() {
return $ ? j.value : Y.value;
},
set(nn) {
j.value = nn;
}
});
return Object.assign(rn, { store: j, system: X, state: Y });
}
function gv(s = {}) {
const {
valueDark: u = "dark",
valueLight: i = ""
} = s, a = pv({
...s,
onChanged: (m, A) => {
var I;
s.onChanged ? (I = s.onChanged) == null || I.call(s, m === "dark", A, m) : A(m);
},
modes: {
dark: u,
light: i
}
}), c = Ae(() => a.system.value);
return Ae({
get() {
return a.value === "dark";
},
set(m) {
const A = m ? "dark" : "light";
c.value === A ? a.value = "auto" : a.value = A;
}
});
}
function _v(s, u) {
return T(), R("svg", {
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
"stroke-width": "1.5",
stroke: "currentColor",
"aria-hidden": "true",
"data-slot": "icon"
}, [
v("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
d: "M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
})
]);
}
function vv(s, u) {
return T(), R("svg", {
xmlns: "http://www.w3.org/2000/svg",
fill: "none",
viewBox: "0 0 24 24",
"stroke-width": "1.5",
stroke: "currentColor",
"aria-hidden": "true",
"data-slot": "icon"
}, [
v("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
d: "M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
})
]);
}
const mv = { class: "float-left mr-4" }, xv = {
key: 0,
class: "float-right pt-1 text-pop-secondary"
}, Ax = /* @__PURE__ */ yn({
__name: "ThemeToggle",
props: {
is_authenticated: {}
},
setup(s) {
const u = gv(), i = nv(u);
return (a, c) => (T(), R("div", {
onClick: c[0] || (c[0] = (p) => Zn(i)()),
class: "flow-root"
}, [
v("p", mv, [
Zn(u) ? Se("", !0) : (T(), tl(rl(Zn(_v)), {
key: 0,
class: D(["text-pop-secondary", "w-6 shrink-0"]),
"aria-hidden": "true"
})),
Zn(u) ? (T(), tl(rl(Zn(vv)), {
key: 1,
class: D(["text-pop-secondary", "w-6 shrink-0"]),
"aria-hidden": "true"
})) : Se("", !0)
]),
a.is_authenticated ? (T(), R("p", xv, an(Zn(u) ? "Go Light" : "Go Dark") + " Theme ", 1)) : Se("", !0)
]));
}
}), yv = ["disabled"], wv = /* @__PURE__ */ yn({
__name: "BaseButton",
props: {
text: String,
disabled: Boolean
},
setup(s) {
return (u, i) => (T(), R("button", {
disabled: s.disabled,
class: D([
s.disabled ? "bg-btn-disabled cursor-not-allowed" : "bg-btn-primary dark:bg-btn-primary hover:bg-btn-hover hover:text-btn-txt",
"min-w-36 w-fit md:px-12 py-3",
"text-sm md:text-lg font-semibold text-btn-txt",
"rounded-md transition shadow-lg hover:border-transparent"
])
}, an(s.text), 11, yv));
}
}), bv = { class: "hidden md:flex px-4" }, Sx = /* @__PURE__ */ yn({
__name: "LoginButton",
props: {
text: String,
disabled: Boolean,
handler: Function
},
setup(s) {
return (u, i) => (T(), R(xn, null, [
v("div", bv, [
lt(Zn(wv), {
text: s.text,
onClick: s.handler
}, null, 8, ["text", "onClick"])
]),
v("button", {
onClick: i[0] || (i[0] = //@ts-ignore
(...a) => s.handler && s.handler(...a)),
class: "flex md:hidden px-4 text-pop-secondary dark:text-btn-txt hover:text-btn-hover"
}, i[1] || (i[1] = [
v("i", { class: "fa-solid fa-arrow-right-to-bracket text-3xl" }, null, -1)
]))
], 64));
}
}), Av = { class: "flex space-x-4 md:space-x-8" }, Sv = ["href"], Iv = { class: "sr-only fixed" }, Ix = /* @__PURE__ */ yn({
__name: "ReelHero",
props: {
items: {}
},
setup(s) {
return (u, i) => (T(), R("div", Av, [
(T(!0), R(xn, null, $n(u.items, (a) => (T(), R("a", {
key: a.name,
href: a.href,
target: "_blank",
class: D([
"text-pop-primary hover:text-pop-secondary",
"text-2xl md:text-6xl",
a.hidden ? "hidden" : ""
])
}, [
v("span", Iv, an(a.name), 1),
v("span", {
class: D(a.icon)
}, null, 2)
], 10, Sv))), 128))
]));
}
}), $v = { class: "flex justify-center space-x-6 md:order-2" }, Cv = ["href", "hidden"], Tv = { class: "sr-only fixed" }, $x = /* @__PURE__ */ yn({
__name: "ReelNarrow",
props: {
items: {}
},
setup(s) {
return (u, i) => (T(), R("div", $v, [
(T(!0), R(xn, null, $n(u.items, (a) => (T(), R("a", {
key: a.name,
href: a.href,
hidden: a.hidden,
class: D(["hover:text-pop-primary", "text-lg"]),
target: "_blank"
}, [
v("span", Tv, an(a.name), 1),
v("span", {
class: D(a.icon)
}, null, 2)
], 8, Cv))), 128))
]));
}
}), Rv = { class: "flex w-full items-center rounded-md" }, Lv = ["href"], Ev = { class: "sr-only fixed" }, Ov = /* @__PURE__ */ yn({
__name: "ReelWide",
props: {
items: {}
},
setup(s) {
return (u, i) => (T(), R("div", Rv, [
(T(!0), R(xn, null, $n(u.items, (a) => (T(), R("a", {
key: a.name,
href: a.href,
target: "_blank",
class: D([
"w-full p-4",
"flex justify-around text-2xl",
"border-t-2 border-pop-primary",
"text-pop-primary hover:text-pop-secondary",
a.hidden ? "hidden" : ""
])
}, [
v("span", Ev, an(a.name), 1),
v("span", {
class: D(a.icon)
}, null, 2)
], 10, Lv))), 128))
]));
}
}), Ll = /^[a-z0-9]+(-[a-z0-9]+)*$/, Nr = (s, u, i, a = "") => {
const c = s.split(":");
if (s.slice(0, 1) === "@") {
if (c.length < 2 || c.length > 3)
return null;
a = c.shift().slice(1);
}
if (c.length > 3 || !c.length)
return null;
if (c.length > 1) {
const A = c.pop(), I = c.pop(), $ = {
// Allow provider without '@': "provider:prefix:name"
provider: c.length > 0 ? c[0] : a,
prefix: I,
name: A
};
return u && !Mr($) ? null : $;
}
const p = c[0], m = p.split("-");
if (m.length > 1) {
const A = {
provider: a,
prefix: m.shift(),
name: m.join("-")
};
return u && !Mr(A) ? null : A;
}
if (i && a === "") {
const A = {
provider: a,
prefix: "",
name: p
};
return u && !Mr(A, i) ? null : A;
}
return null;
}, Mr = (s, u) => s ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
// Check name: cannot be empty
((u && s.prefix === "" || s.prefix) && s.name) : !1, El = Object.freeze(
{
left: 0,
top: 0,
width: 16,
height: 16
}
), Dr = Object.freeze({
rotate: 0,
vFlip: !1,
hFlip: !1
}), Ur = Object.freeze({
...El,
...Dr
}), ps = Object.freeze({
...Ur,
body: "",
hidden: !1
});
function Fv(s, u) {
const i = {};
!s.hFlip != !u.hFlip && (i.hFlip = !0), !s.vFlip != !u.vFlip && (i.vFlip = !0);
const a = ((s.rotate || 0) + (u.rotate || 0)) % 4;
return a && (i.rotate = a), i;
}
function ul(s, u) {
const i = Fv(s, u);
for (const a in ps)
a in Dr ? a in s && !(a in i) && (i[a] = Dr[a]) : a in u ? i[a] = u[a] : a in s && (i[a] = s[a]);
return i;
}
function Pv(s, u) {
const i = s.icons, a = s.aliases || /* @__PURE__ */ Object.create(null), c = /* @__PURE__ */ Object.create(null);
function p(m) {
if (i[m])
return c[m] = [];
if (!(m in c)) {
c[m] = null;
const A = a[m] && a[m].parent, I = A && p(A);
I && (c[m] = [A].concat(I));
}
return c[m];
}
return Object.keys(i).concat(Object.keys(a)).forEach(p), c;
}
function Mv(s, u, i) {
const a = s.icons, c = s.aliases || /* @__PURE__ */ Object.create(null);
let p = {};
function m(A) {
p = ul(
a[A] || c[A],
p
);
}
return m(u), i.forEach(m), ul(s, p);
}
function Ol(s, u) {
const i = [];
if (typeof s != "object" || typeof s.icons != "object")
return i;
s.not_found instanceof Array && s.not_found.forEach((c) => {
u(c, null), i.push(c);
});
const a = Pv(s);
for (const c in a) {
const p = a[c];
p && (u(c, Mv(s, c, p)), i.push(c));
}
return i;
}
const Wv = {
provider: "",
aliases: {},
not_found: {},
...El
};
function cs(s, u) {
for (const i in u)
if (i in s && typeof s[i] != typeof u[i])
return !1;
return !0;
}
function Fl(s) {
if (typeof s != "object" || s === null)
return null;
const u = s;
if (typeof u.prefix != "string" || !s.icons || typeof s.icons != "object" || !cs(s, Wv))
return null;
const i = u.icons;
for (const c in i) {
const p = i[c];
if (
// Name cannot be empty
!c || // Must have body
typeof p.body != "string" || // Check other props
!cs(
p,
ps
)
)
return null;
}
const a = u.aliases || /* @__PURE__ */ Object.create(null);
for (const c in a) {
const p = a[c], m = p.parent;
if (
// Name cannot be empty
!c || // Parent must be set and point to existing icon
typeof m != "string" || !i[m] && !a[m] || // Check other props
!cs(
p,
ps
)
)
return null;
}
return u;
}
const ll = /* @__PURE__ */ Object.create(null);
function kv(s, u) {
return {
provider: s,
prefix: u,
icons: /* @__PURE__ */ Object.create(null),
missing: /* @__PURE__ */ new Set()
};
}
function ut(s, u) {
const i = ll[s] || (ll[s] = /* @__PURE__ */ Object.create(null));
return i[u] || (i[u] = kv(s, u));
}
function Pl(s, u) {
return Fl(u) ? Ol(u, (i, a) => {
a ? s.icons[i] = a : s.missing.add(i);
}) : [];
}
function Dv(s, u, i) {
try {
if (typeof i.body == "string")
return s.icons[u] = { ...i }, !0;
} catch {
}
return !1;
}
let Wt = !1;
function Ml(s) {
return typeof s == "boolean" && (Wt = s), Wt;
}
function Bv(s) {
const u = typeof s == "string" ? Nr(s, !0, Wt) : s;
if (u) {
const i = ut(u.provider, u.prefix), a = u.name;
return i.icons[a] || (i.missing.has(a) ? null : void 0);
}
}
function Nv(s, u) {
const i = Nr(s, !0, Wt);
if (!i)
return !1;
const a = ut(i.provider, i.prefix);
return u ? Dv(a, i.name, u) : (a.missing.add(i.name), !0);
}
function Uv(s, u) {
if (typeof s != "object")
return !1;
if (typeof u != "string" && (u = s.provider || ""), Wt && !u && !s.prefix) {
let c = !1;
return Fl(s) && (s.prefix = "", Ol(s, (p, m) => {
Nv(p, m) && (c = !0);
})), c;
}
const i = s.prefix;
if (!Mr({
prefix: i,
name: "a"
}))
return !1;
const a = ut(u, i);
return !!Pl(a, s);
}
const Wl = Object.freeze({
width: null,
height: null
}), kl = Object.freeze({
// Dimensions
...Wl,
// Transformations
...Dr
}), Hv = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Gv = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
function fl(s, u, i) {
if (u === 1)
return s;
if (i = i || 100, typeof s == "number")
return Math.ceil(s * u * i) / i;
if (typeof s != "string")
return s;
const a = s.split(Hv);
if (a === null || !a.length)
return s;
const c = [];
let p = a.shift(), m = Gv.test(p);
for (; ; ) {
if (m) {
const A = parseFloat(p);
isNaN(A) ? c.push(p) : c.push(Math.ceil(A * u * i) / i);
} else
c.push(p);
if (p = a.shift(), p === void 0)
return c.join("");
m = !m;
}
}
function zv(s, u = "defs") {
let i = "";
const a = s.indexOf("<" + u);
for (; a >= 0; ) {
const c = s.indexOf(">", a), p = s.indexOf("</" + u);
if (c === -1 || p === -1)
break;
const m = s.indexOf(">", p);
if (m === -1)
break;
i += s.slice(c + 1, p).trim(), s = s.slice(0, a).trim() + s.slice(m + 1);
}
return {
defs: i,
content: s
};
}
function qv(s, u) {
return s ? "<defs>" + s + "</defs>" + u : u;
}
function Kv(s, u, i) {
const a = zv(s);
return qv(a.defs, u + a.content + i);
}
const Zv = (s) => s === "unset" || s === "undefined" || s === "none";
function Yv(s, u) {
const i = {
...Ur,
...s
}, a = {
...kl,
...u
}, c = {
left: i.left,
top: i.top,
width: i.width,
height: i.height
};
let p = i.body;
[i, a].forEach((Y) => {
const E = [], cn = Y.hFlip, En = Y.vFlip;
let rn = Y.rotate;
cn ? En ? rn += 2 : (E.push(
"translate(" + (c.width + c.left).toString() + " " + (0 - c.top).toString() + ")"
), E.push("scale(-1 1)"), c.top = c.left = 0) : En && (E.push(
"translate(" + (0 - c.left).toString() + " " + (c.height + c.top).toString() + ")"
), E.push("scale(1 -1)"), c.top = c.left = 0);
let nn;
switch (rn < 0 && (rn -= Math.floor(rn / 4) * 4), rn = rn % 4, rn) {
case 1:
nn = c.height / 2 + c.top, E.unshift(
"rotate(90 " + nn.toString() + " " + nn.toString() + ")"
);
break;
case 2:
E.unshift(
"rotate(180 " + (c.width / 2 + c.left).toString() + " " + (c.height / 2 + c.top).toString() + ")"
);
break;
case 3:
nn = c.width / 2 + c.left, E.unshift(
"rotate(-90 " + nn.toString() + " " + nn.toString() + ")"
);
break;
}
rn % 2 === 1 && (c.left !== c.top && (nn = c.left, c.left = c.top, c.top = nn), c.width !== c.height && (nn = c.width, c.width = c.height, c.height = nn)), E.length && (p = Kv(
p,
'<g transform="' + E.join(" ") + '">',
"</g>"
));
});
const m = a.width, A = a.height, I = c.width, $ = c.height;
let F, k;
m === null ? (k = A === null ? "1em" : A === "auto" ? $ : A, F = fl(k, I / $)) : (F = m === "auto" ? I : m, k = A === null ? fl(F, $ / I) : A === "auto" ? $ : A);
const q = {}, X = (Y, E) => {
Zv(E) || (q[Y] = E.toString());
};
X("width", F), X("height", k);
const j = [c.left, c.top, I, $];
return q.viewBox = j.join(" "), {
attributes: q,
viewBox: j,
body: p
};
}
const Jv = /\sid="(\S+)"/g, Qv = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
let Xv = 0;
function Vv(s, u = Qv) {
const i = [];
let a;
for (; a = Jv.exec(s); )
i.push(a[1]);
if (!i.length)
return s;
const c = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
return i.forEach((p) => {
const m = typeof u == "function" ? u(p) : u + (Xv++).toString(), A = p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
s = s.replace(
// Allowed characters before id: [#;"]
// Allowed characters after id: [)"], .[a-z]
new RegExp('([#;"])(' + A + ')([")]|\\.[a-z])', "g"),
"$1" + m + c + "$3"
);
}), s = s.replace(new RegExp(c, "g"), ""), s;
}
const gs = /* @__PURE__ */ Object.create(null);
function jv(s, u) {
gs[s] = u;
}
function _s(s) {
return gs[s] || gs[""];
}
function ys(s) {
let u;
if (typeof s.resources == "string")
u = [s.resources];
else if (u = s.resources, !(u instanceof Array) || !u.length)
return null;
return {
// API hosts
resources: u,
// Root path
path: s.path || "/",
// URL length limit
maxURL: s.maxURL || 500,
// Timeout before next host is used.
rotate: s.rotate || 750,
// Timeout before failing query.
timeout: s.timeout || 5e3,
// Randomise default API end point.
random: s.random === !0,
// Start index
index: s.index || 0,
// Receive data after time out (used if time out kicks in first, then API module sends data anyway).
dataAfterTimeout: s.dataAfterTimeout !== !1
};
}
const ws = /* @__PURE__ */ Object.create(null), Et = [
"https://api.simplesvg.com",
"https://api.unisvg.com"
], Wr = [];
for (; Et.length > 0; )
Et.length === 1 || Math.random() > 0.5 ? Wr.push(Et.shift()) : Wr.push(Et.pop());
ws[""] = ys({
resources: ["https://api.iconify.design"].concat(Wr)
});
function n1(s, u) {
const i = ys(u);
return i === null ? !1 : (ws[s] = i, !0);
}
function bs(s) {
return ws[s];
}
const e1 = () => {
let s;
try {
if (s = fetch, typeof s == "function")
return s;
} catch {
}
};
let al = e1();
function t1(s, u) {
const i = bs(s);
if (!i)
return 0;
let a;
if (!i.maxURL)
a = 0;
else {
let c = 0;
i.resources.forEach((m) => {
c = Math.max(c, m.length);
});
const p = u + ".json?icons=";
a = i.maxURL - c - i.path.length - p.length;
}
return a;
}
function r1(s) {
return s === 404;
}
const i1 = (s, u, i) => {
const a = [], c = t1(s, u), p = "icons";
let m = {
type: p,
provider: s,
prefix: u,
icons: []
}, A = 0;
return i.forEach((I, $) => {
A += I.length + 1, A >= c && $ > 0 && (a.push(m), m = {
type: p,
provider: s,
prefix: u,
icons: []
}, A = I.length), m.icons.push(I);
}), a.push(m), a;
};
function s1(s) {
if (typeof s == "string") {
const u = bs(s);
if (u)
return u.path;
}
return "/";
}
const o1 = (s, u, i) => {
if (!al) {
i("abort", 424);
return;
}
let a = s1(u.provider);
switch (u.type) {
case "icons": {
const p = u.prefix, A = u.icons.join(","), I = new URLSearchParams({
icons: A
});
a += p + ".json?" + I.toString();
break;
}
case "custom": {
const p = u.uri;
a += p.slice(0, 1) === "/" ? p.slice(1) : p;
break;
}
default:
i("abort", 400);
return;
}
let c = 503;
al(s + a).then((p) => {
const m = p.status;
if (m !== 200) {
setTimeout(() => {
i(r1(m) ? "abort" : "next", m);
});
return;
}
return c = 501, p.json();
}).then((p) => {
if (typeof p != "object" || p === null) {
setTimeout(() => {
p === 404 ? i("abort", p) : i("next", c);
});
return;
}
setTimeout(() => {
i("success", p);
});
}).catch(() => {
i("next", c);
});
}, u1 = {
prepare: i1,
send: o1
};
function l1(s) {
const u = {
loaded: [],
missing: [],
pending: []
}, i = /* @__PURE__ */ Object.create(null);
s.sort((c, p) => c.provider !== p.provider ? c.provider.localeCompare(p.provider) : c.prefix !== p.prefix ? c.prefix.localeCompare(p.prefix) : c.name.localeCompare(p.name));
let a = {
provider: "",
prefix: "",
name: ""
};
return s.forEach((c) => {
if (a.name === c.name && a.prefix === c.prefix && a.provider === c.provider)
return;
a = c;
const p = c.provider, m = c.prefix, A = c.name, I = i[p] || (i[p] = /* @__PURE__ */ Object.create(null)), $ = I[m] || (I[m] = ut(p, m));
let F;
A in $.icons ? F = u.loaded : m === "" || $.missing.has(A) ? F = u.missing : F = u.pending;
const k = {
provider: p,
prefix: m,
name: A
};
F.push(k);
}), u;
}
function Dl(s, u) {
s.forEach((i) => {
const a = i.loaderCallbacks;
a && (i.loaderCallbacks = a.filter((c) => c.id !== u));
});
}
function f1(s) {
s.pendingCallbacksFlag || (s.pendingCallbacksFlag = !0, setTimeout(() => {
s.pendingCallbacksFlag = !1;
const u = s.loaderCallbacks ? s.loaderCallbacks.slice(0) : [];
if (!u.length)
return;
let i = !1;
const a = s.provider, c = s.prefix;
u.forEach((p) => {
const m = p.icons, A = m.pending.length;
m.pending = m.pending.filter((I) => {
if (I.prefix !== c)
return !0;
const $ = I.name;
if (s.icons[$])
m.loaded.push({
provider: a,
prefix: c,
name: $
});
else if (s.missing.has($))
m.missing.push({
provider: a,
prefix: c,
name: $
});
else
return i = !0, !0;
return !1;
}), m.pending.length !== A && (i || Dl([s], p.id), p.callback(
m.loaded.slice(0),
m.missing.slice(0),
m.pending.slice(0),
p.abort
));
});
}));
}
let a1 = 0;
function c1(s, u, i) {
const a = a1++, c = Dl.bind(null, i, a);
if (!u.pending.length)
return c;
const p = {
id: a,
icons: u,
callback: s,
abort: c
};
return i.forEach((m) => {
(m.loaderCallbacks || (m.loaderCallbacks = [])).push(p);
}), c;
}
function d1(s, u = !0, i = !1) {
const a = [];
return s.forEach((c) => {
const p = typeof c == "string" ? Nr(c, u, i) : c;
p && a.push(p);
}), a;
}
var h1 = {
resources: [],
index: 0,
timeout: 2e3,
rotate: 750,
random: !1,
dataAfterTimeout: !1
};
function p1(s, u, i, a) {
const c = s.resources.length, p = s.random ? Math.floor(Math.random() * c) : s.index;
let m;
if (s.random) {
let K = s.resources.slice(0);
for (m = []; K.length > 1; ) {
const sn = Math.floor(Math.random() * K.length);
m.push(K[sn]), K = K.slice(0, sn).concat(K.slice(sn + 1));
}
m = m.concat(K);
} else
m = s.resources.slice(p).concat(s.resources.slice(0, p));
const A = Date.now();
let I = "pending", $ = 0, F, k = null, q = [], X = [];
typeof a == "function" && X.push(a);
function j() {
k && (clearTimeout(k), k = null);
}
function Y() {
I === "pending" && (I = "aborted"), j(), q.forEach((K) => {
K.status === "pending" && (K.status = "aborted");
}), q = [];
}
function E(K, sn) {
sn && (X = []), typeof K == "function" && X.push(K);
}
function cn() {
return {
startTime: A,
payload: u,
status: I,
queriesSent: $,
queriesPending: q.length,
subscribe: E,
abort: Y
};
}
function En() {
I = "failed", X.forEach((K) => {
K(void 0, F);
});
}
function rn() {
q.forEach((K) => {
K.status === "pending" && (K.status = "aborted");
}), q = [];
}
function nn(K, sn, Cn) {
const Sn = sn !== "success";
switch (q = q.filter((Tn) => Tn !== K), I) {
case "pending":
break;
case "failed":
if (Sn || !s.dataAfterTimeout)
return;
break;
default:
return;
}
if (sn === "abort") {
F = Cn, En();
return;
}
if (Sn) {
F = Cn, q.length || (m.length ? gn() : En());
return;
}
if (j(), rn(), !s.random) {
const Tn = s.resources.indexOf(K.resource);
Tn !== -1 && Tn !== s.index && (s.index = Tn);
}
I = "completed", X.forEach((Tn) => {
Tn(Cn);
});
}
function gn() {
if (I !== "pending")
return;
j();
const K = m.shift();
if (K === void 0) {
if (q.length) {
k = setTimeout(() => {
j(), I === "pending" && (rn(), En());
}, s.timeout);
return;
}
En();
return;
}
const sn = {
status: "pending",
resource: K,
callback: (Cn, Sn) => {
nn(sn, Cn, Sn);
}
};
q.push(sn), $++, k = setTimeout(gn, s.rotate), i(K, u, sn.callback);
}
return setTimeout(gn), cn;
}
function Bl(s) {
const u = {
...h1,
...s
};
let i = [];
function a() {
i = i.filter((A) => A().status === "pending");
}
function c(A, I, $) {
const F = p1(
u,
A,
I,
(k, q) => {
a(), $ && $(k, q);
}
);
return i.push(F), F;
}
function p(A) {
return i.find((I) => A(I)) || null;
}
return {
query: c,
find: p,
setIndex: (A) => {
u.index = A;
},
getIndex: () => u.index,
cleanup: a
};
}
function cl() {
}
const ds = /* @__PURE__ */ Object.create(null);
function g1(s) {
if (!ds[s]) {
const u = bs(s);
if (!u)
return;
const i = Bl(u), a = {
config: u,
redundancy: i
};
ds[s] = a;
}
return ds[s];
}
function _1(s, u, i) {
let a, c;
if (typeof s == "string") {
const p = _s(s);
if (!p)
return i(void 0, 424), cl;
c = p.send;
const m = g1(s);
m && (a = m.redundancy);
} else {
const p = ys(s);
if (p) {
a = Bl(p);
const m = s.resources ? s.resources[0] : "", A = _s(m);
A && (c = A.send);
}
}
return !a || !c ? (i(void 0, 424), cl) : a.query(u, c, i)().abort;
}
function dl() {
}
function v1(s) {
s.iconsLoaderFlag || (s.iconsLoaderFlag = !0, setTimeout(() => {
s.iconsLoaderFlag = !1, f1(s);
}));
}
function m1(s) {
const u = [], i = [];
return s.forEach((a) => {
(a.match(Ll) ? u : i).push(a);
}), {
valid: u,
invalid: i
};
}
function Ot(s, u, i) {
function a() {
const c = s.pendingIcons;
u.forEach((p) => {
c && c.delete(p), s.icons[p] || s.missing.add(p);
});
}
if (i && typeof i == "object")
try {
if (!Pl(s, i).length) {
a();
return;
}
} catch (c) {
console.error(c);
}
a(), v1(s);
}
function hl(s, u) {
s instanceof Promise ? s.then((i) => {
u(i);
}).catch(() => {
u(null);
}) : u(s);
}
function x1(s, u) {
s.iconsToLoad ? s.iconsToLoad = s.iconsToLoad.concat(u).sort() : s.iconsToLoad = u, s.iconsQueueFlag || (s.iconsQueueFlag = !0, setTimeout(() => {
s.iconsQueueFlag = !1;
const { provider: i, prefix: a } = s, c = s.iconsToLoad;
if (delete s.iconsToLoad, !c || !c.length)
return;
const p = s.loadIcon;
if (s.loadIcons && (c.length > 1 || !p)) {
hl(
s.loadIcons(c, a, i),
(F) => {
Ot(s, c, F);
}
);
return;
}
if (p) {
c.forEach((F) => {
const k = p(F, a, i);
hl(k, (q) => {
const X = q ? {
prefix: a,
icons: {
[F]: q
}
} : null;
Ot(s, [F], X);
});
});
return;
}
const { valid: m, invalid: A } = m1(c);
if (A.length && Ot(s, A, null), !m.length)
return;
const I = a.match(Ll) ? _s(i) : null;
if (!I) {
Ot(s, m, null);
return;
}
I.prepare(i, a, m).forEach((F) => {
_1(i, F, (k) => {
Ot(s, F.icons, k);
});
});
}));
}
const y1 = (s, u) => {
const i = d1(s, !0, Ml()), a = l1(i);
if (!a.pending.length) {
let I = !0;
return u && setTimeout(() => {
I && u(
a.loaded,
a.missing,
a.pending,
dl
);
}), () => {
I = !1;
};
}
const c = /* @__PURE__ */ Object.create(null), p = [];
let m, A;
return a.pending.forEach((I) => {
const { provider: $, prefix: F } = I;
if (F === A && $ === m)
return;
m = $, A = F, p.push(ut($, F));
const k = c[$] || (c[$] = /* @__PURE__ */ Object.create(null));
k[F] || (k[F] = []);
}), a.pending.forEach((I) => {
const { provider: $, prefix: F, name: k } = I, q = ut($, F), X = q.pendingIcons || (q.pendingIcons = /* @__PURE__ */ new Set());
X.has(k) || (X.add(k), c[$][F].push(k));
}), p.forEach((I) => {
const $ = c[I.provider][I.prefix];
$.length && x1(I, $);
}), u ? c1(u, a, p) : dl;
};
function w1(s, u) {
const i = {
...s
};
for (const a in u) {
const c = u[a], p = typeof c;
a in Wl ? (c === null || c && (p === "string" || p === "number")) && (i[a] = c) : p === typeof i[a] && (i[a] = a === "rotate" ? c % 4 : c);
}
return i;
}
const b1 = /[\s,]+/;
function A1(s, u) {
u.split(b1).forEach((i) => {
switch (i.trim()) {
case "horizontal":
s.hFlip = !0;
break;
case "vertical":
s.vFlip = !0;
break;
}
});
}
function S1(s, u = 0) {
const i = s.replace(/^-?[0-9.]*/, "");
function a(c) {
for (; c < 0; )
c += 4;
return c % 4;
}
if (i === "") {
const c = parseInt(s);
return isNaN(c) ? 0 : a(c);
} else if (i !== s) {
let c = 0;
switch (i) {
case "%":
c = 25;
break;
case "deg":
c = 90;
}
if (c) {
let p = parseFloat(s.slice(0, s.length - i.length));
return isNaN(p) ? 0 : (p = p / c, p % 1 === 0 ? a(p) : 0);
}
}
return u;
}
function I1(s, u) {
let i = s.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
for (const a in u)
i += " " + a + '="' + u[a] + '"';
return '<svg xmlns="http://www.w3.org/2000/svg"' + i + ">" + s + "</svg>";
}
function $1(s) {
return s.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
}
function C1(s) {
return "data:image/svg+xml," + $1(s);
}
function T1(s) {
return 'url("' + C1(s) + '")';
}
const pl = {
...kl,
inline: !1
}, R1 = {
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink",
"aria-hidden": !0,
role: "img"
}, L1 = {
display: "inline-block"
}, vs = {
backgroundColor: "currentColor"
}, Nl = {
backgroundColor: "transparent"
}, gl = {
Image: "var(--svg)",
Repeat: "no-repeat",
Size: "100% 100%"
}, _l = {
webkitMask: vs,
mask: vs,
background: Nl
};
for (const s in _l) {
const u = _l[s];
for (const i in gl)
u[s + i] = gl[i];
}
const kr = {};
["horizontal", "vertical"].forEach((s) => {
const u = s.slice(0, 1) + "Flip";
kr[s + "-flip"] = u, kr[s.slice(0, 1) + "-flip"] = u, kr[s + "Flip"] = u;
});
function vl(s) {
return s + (s.match(/^[-0-9.]+$/) ? "px" : "");
}
const ml = (s, u) => {
const i = w1(pl, u), a = { ...R1 }, c = u.mode || "svg", p = {}, m = u.style, A = typeof m == "object" && !(m instanceof Array) ? m : {};
for (let Y in u) {
const E = u[Y];
if (E !== void 0)
switch (Y) {
// Properties to ignore
case "icon":
case "style":
case "onLoad":
case "mode":
case "ssr":
break;
// Boolean attributes
case "inline":
case "hFlip":
case "vFlip":
i[Y] = E === !0 || E === "true" || E === 1;
break;
// Flip as string: 'horizontal,vertical'
case "flip":
typeof E == "string" && A1(i, E);
break;
// Color: override style
case "color":
p.color = E;
break;
// Rotation as string
case "rotate":
typeof E == "string" ? i[Y] = S1(E) : typeof E == "number" && (i[Y] = E);
break;
// Remove aria-hidden
case "ariaHidden":
case "aria-hidden":
E !== !0 && E !== "true" && delete a["aria-hidden"];
break;
default: {
const cn = kr[Y];
cn ? (E === !0 || E === "true" || E === 1) && (i[cn] = !0) : pl[Y] === void 0 && (a[Y] = E);
}
}
}
const I = Yv(s, i), $ = I.attributes;
if (i.inline && (p.verticalAlign = "-0.125em"), c === "svg") {
a.style = {
...p,
...A
}, Object.assign(a, $);
let Y = 0, E = u.id;
return typeof E == "string" && (E = E.replace(/-/g, "_")), a.innerHTML = Vv(I.body, E ? () => E + "ID" + Y++ : "iconifyVue"), il("svg", a);
}
const { body: F, width: k, height: q } = s, X = c === "mask" || (c === "bg" ? !1 : F.indexOf("currentColor") !== -1), j = I1(F, {
...$,
width: k + "",
height: q + ""
});
return a.style = {
...p,
"--svg": T1(j),
width: vl($.width),
height: vl($.height),
...L1,
...X ? vs : Nl,
...A
}, il("span", a);
};
Ml(!0);
jv("", u1);
if (typeof document < "u" && typeof window < "u") {
const s = window;
if (s.IconifyPreload !== void 0) {
const u = s.IconifyPreload, i = "Invalid IconifyPreload syntax.";
typeof u == "object" && u !== null && (u instanceof Array ? u : [u]).forEach((a) => {
try {
// Check if item is an object and not null/array
(typeof a != "object" || a === null || a instanceof Array || // Check for 'icons' and 'prefix'
typeof a.icons != "object" || typeof a.prefix != "string" || // Add icon set
!Uv(a)) && console.error(i);
} catch {
console.error(i);
}
});
}
if (s.IconifyProviders !== void 0) {
const u = s.IconifyProviders;
if (typeof u == "object" && u !== null)
for (let i in u) {
const a = "IconifyProviders[" + i + "] is invalid.";
try {
const c = u[i];
if (typeof c != "object" || !c || c.resources === void 0)
continue;
n1(i, c) || console.error(a);
} catch {
console.error(a);
}
}
}
}
const E1 = {
...Ur,
body: ""
}, Ul = yn({
// Do not inherit other attributes: it is handled by render()
inheritAttrs: !1,
// Set initial data
data() {
return {
// Current icon name
_name: "",
// Loading
_loadingIcon: null,
// Mounted status
iconMounted: !1,
// Callback counter to trigger re-render
counter: 0
};
},
mounted() {
this.iconMounted = !0;
},
unmounted() {
this.abortLoading();
},
methods: {
abortLoading() {
this._loadingIcon && (this._loadingIcon.abort(), this._loadingIcon = null);
},
// Get data for icon to render or null
getIcon(s, u, i) {
if (typeof s == "object" && s !== null && typeof s.body == "string")
return this._name = "", this.abortLoading(), {
data: s
};
let a;
if (typeof s != "string" || (a = Nr(s, !1, !0)) === null)
return this.abortLoading(), null;
let c = Bv(a);
if (!c)
return (!this._loadingIcon || this._loadingIcon.name !== s) && (this.abortLoading(), this._name = "", c !== null && (this._loadingIcon = {
name: s,
abort: y1([a], () => {
this.counter++;
})
})), null;
if (this.abortLoading(), this._name !== s && (this._name = s, u && u(s)), i) {
c = Object.assign({}, c);
const m = i(c.body, a.name, a.prefix, a.provider);
typeof m == "string" && (c.body = m);
}
const p = ["iconify"];
return a.prefix !== "" && p.push("iconify--" + a.prefix), a.provider !== "" && p.push("iconify--" + a.provider), { data: c, classes: p };
}
},
// Render icon
render() {
this.counter;
const s = this.$attrs, u = this.iconMounted || s.ssr ? this.getIcon(s.icon, s.onLoad, s.customise) : null;
if (!u)
return ml(E1, s);
let i = s;
return u.classes && (i = {
...s,
class: (typeof s.class == "string" ? s.class + " " : "") + u.classes.join(" ")
}), ml({
...Ur,
...u.data
}, i);
}
}), O1 = { class: "flex w-full gap-4 items-center" }, F1 = ["href"], P1 = { class: "sr-only fixed" }, Cx = /* @__PURE__ */ yn({
__name: "ReelHero",
props: {
items: {}
},
setup(s) {
return (u, i) => (T(), R("div", O1, [
(T(!0), R(xn, null, $n(u.items, (a) => (T(), R("a", {
key: a.name,
href: a.href,
target: "_blank"
}, [
v("span", P1, an(a.name), 1),
lt(Zn(Ul), {
icon: a.icon,
class: D([
"text-xl md:text-3xl lg:text-5xl",
"text-pop-primary hover:text-pop-secondary"
])
}, null, 8, ["icon"])
], 8, F1))), 128))
]));
}
}), M1 = { class: "flex justify-center space-x-6 md:order-2" }, W1 = ["href", "hidden"], k1 = { class: "sr-only fixed" }, Tx = /* @__PURE__ */ yn({
__name: "ReelNarrow",
props: {
items: {}
},
setup(s) {
return (u, i) => {
const a = U_("Icon");
return T(), R("div", M1, [
(T(!0), R(xn, null, $n(u.items, (c) => (T(), R("a", {
key: c.name,
href: c.href,
hidden: c.hidden,
class: D(["hover:text-pop-primary", "text-lg"]),
target: "_blank"
}, [
v("span", k1, an(c.name), 1),
lt(a, {
icon: c.icon,
class: "text-6xl"
}, null, 8, ["icon"])
], 8, W1))), 128))
]);
};
}
}), D1 = { class: "flex w-full items-center rounded-md" }, B1 = ["href"], N1 = { class: "sr-only fixed" }, Rx = /* @__PURE__ */ yn({
__name: "ReelWide",
props: {
items: {}
},
setup(s) {
return (u, i) => (T(), R("div", D1, [
(T(!0), R(xn, null, $n(u.items, (a) => (T(), R("a", {
key: a.name,
href: a.href,
target: "_blank",
class: D([
"flex w-full p-4 justify-around text-pop-primary hover:text-pop-secondary text-2xl border-pop-primary border-t-2",
a.hidden ? "hidden" : ""
])
}, [
v("span", N1, an(a.name), 1),
lt(Zn(Ul), {
icon: a.icon,
class: "text-6xl"
}, null, 8, ["icon"])
], 10, B1))), 128))
]));
}
}), U1 = { id: "ogs-site-layout" }, H1 = {
key: 0,
id: "ogs-sl-side-menu",
class: "hidden lg:fixed lg:flex lg:flex-col lg:inset-y-0 lg:z-50 lg:w-80"
}, G1 = {
key: 0,
id: "ogs-sl-header-authenticated",
class: "sticky top-0 z-40 lg:px-8"
}, z1 = {
key: 1,
id: "ogs-sl-top-nav-public",
class: "sticky top-0 z-40 mx-4"
}, q1 = {
id: "ogs-sl-footer",
class: "sticky z-40 mx-4"
}, Lx = /* @__PURE__ */ yn({
__name: "SiteLayout",
props: {
is_authenticated: {}
},
setup(s) {
return (u, i) => (T(), R("div", U1, [
u.is_authenticated ? (T(), R("div", H1, [
H(u.$slots, "sideMenu")
])) : Se("", !0),
v("div", {
id: "ogs-sl-main-column",
class: D([
u.is_authenticated ? "lg:pl-80" : "",
"flex flex-col h-screen justify-between"
])
}, [
u.is_authenticated ? (T(), R("div", G1, [
H(u.$slots, "header")
])) : (T(), R("div", z1, [
H(u.$slots, "topNavigation")
])),
v("main", {
id: "ogs-sl-main",
class: D(["mb-auto mx-auto w-full overflow-auto scrollbar", "px-4 sm:px-6", u.is_authenticated ? "lg:px-24" : "lg:px-36"])
}, [
H(u.$slots, "toast"),
H(u.$slots, "routerView")
], 2),
v("div", q1, [
H(u.$slots, "footer")
])
], 2)
]));
}
}), kt = (s, u) => {
const i = s.__vccOpts || s;
for (const [a, c] of u)
i[a] = c;
return i;
}, K1 = {}, Z1 = { class: "flex-1 not-italic" }, Y1 = { class: "relative mx-auto" }, J1 = { class: "pb-16 pt-10" }, Q1 = { class: "px-4 sm:px-6 lg:px-0" }, X1 = { class: "text-3xl font-bold tracking-tight text-pop-secondary" }, V1 = { class: "max-w-2xl text-sm text-dull-s