// Blog / insights — real client case-study articles with an in-page reader. const NS_BLOG = window.AnsysDigitalDesignSystem_4543d7; // Live auto-scrolling storefront preview for a blog card (lazy-loaded on view). // Falls back to the poster image if a site blocks embedding. function LiveThumb({ url, name, poster }) { const [live, setLive] = React.useState(false); const [scale, setScale] = React.useState(0.3); const rootRef = React.useRef(null), boxRef = React.useRef(null); React.useEffect(() => { if (!rootRef.current || live) return; const io = new IntersectionObserver((es) => { if (es.some((e) => e.isIntersecting)) { setLive(true); io.disconnect(); } }, { rootMargin: "300px" }); io.observe(rootRef.current); return () => io.disconnect(); }, [live]); React.useEffect(() => { const measure = () => { if (boxRef.current) { const n = boxRef.current.clientWidth / 1280; setScale((p) => Math.abs(n - p) < 0.002 ? p : n); } }; measure(); window.addEventListener("resize", measure); return () => window.removeEventListener("resize", measure); }, [live]); const render = 2600, shift = -(render - 800); return (
{poster && {name { e.currentTarget.style.display = "none"; }} style={{ position: "absolute", inset: 0, zIndex: 1, width: "100%", height: "100%", objectFit: "cover" }} />}
{live && (