(() => {
let a = ["data-joy-color-scheme", "data-mui-color-scheme", "data-theme", "data-color-scheme", "class"], b = (a) => a.includes("dark") ? "dark" : a.includes("light") ? "light" : null, c = (a) => {
let b = document.getElementById("--stack-theme-mode");
b || ((b = document.createElement("style")).id = "--stack-theme-mode", b.innerHTML = "/* This tag is used by Stack Auth to set the theme in the browser without causing a hydration error (since React ignores additional tags in the ). We later use the `html:has(head > [data-stack-theme=XYZ])` selector to apply styles based on the theme. */", document.head.appendChild(b)), b.setAttribute("data-stack-theme", a);
}, d = () => {
let a = getComputedStyle(document.documentElement).getPropertyValue("color-scheme");
if (a) {
let d = b(a);
if (d)
return c(d), !0;
}
return !1;
}, e = () => {
let a = getComputedStyle(document.documentElement).getPropertyValue("--background");
if (a) {
var b;
let d, e, f;
/^\d+\s\d+%\s\d+(\.\d+)?%$/.test(a) && (a = `hsl(${a})`);
let g = (b = a, (d = document.createElement("div")).style.color = b, document.body.appendChild(d), e = getComputedStyle(d).color, document.body.removeChild(d), (f = e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/)) ? [parseInt(f[1]), parseInt(f[2]), parseInt(f[3])] : null);
if (g)
return 128 > (299 * g[0] + 587 * g[1] + 114 * g[2]) / 1000 ? c("dark") : c("light"), !0;
}
return !1;
}, f = () => {
for (let d of a) {
let a = document.documentElement.getAttribute(d);
if (a) {
let d = b(a);
if (d)
return c(d), !0;
}
}
return !1;
};
new MutationObserver((b) => {
b.forEach((b) => {
if (!d() && !(b.attributeName && a.includes(b.attributeName) && f()) && e())
return;
});
}).observe(document.documentElement, { attributes: !0, attributeFilter: a }), d() || f() || e();
})()(([id]) => {
const el = document.getElementById(id);
if (!el) {
// component is not full page
return;
}
const offset = el.getBoundingClientRect().top + document.documentElement.scrollTop;
el.style.minHeight = `calc(100vh - ${offset}px)`;
})(["stack-full-page-container-_R_5fiv5utb_"])