/* FORUM website — content sections. Exports window.ForumSections = {...}. */
function Reveal({ children, delay = 0, as = 'div', style = {} }) {
const ref = React.useRef(null);
const [shown, setShown] = React.useState(false);
React.useEffect(() => {
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (reduce) { setShown(true); return; }
const io = new IntersectionObserver((entries) => {
entries.forEach((e) => { if (e.isIntersecting) { setShown(true); io.disconnect(); } });
}, { threshold: 0.16 });
if (ref.current) io.observe(ref.current);
return () => io.disconnect();
}, []);
const Tag = as;
return (
{copy}
{cta} ); } /* Rotating image plate — cycles images on an interval (per request: every 2s) */ function RotatingPlate({ images, interval = 3000, stat, badge, accent = 'var(--forum-royal)' }) { const { StatBlock } = window.FORUMDesignSystem_982c6d; const [i, setI] = React.useState(0); React.useEffect(() => { const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (reduce || images.length < 2) return; const id = setInterval(() => setI((p) => (p + 1) % images.length), interval); return () => clearInterval(id); }, [images.length, interval]); return ({copy}