"use client"; // A CLIP'S SIDE POST in Play the cut (lane vertical; common lib/report/vertical.mjs): the post shown beside the // clip while it plays -- never read, the clip's sound running -- drawn by the post-item route's `side` page (the // card the build lays in, side-card.mjs), at the right (or left) of the footage box over the side's from-to, // sliding in and out as the render does (vertical.mjs landscapeSideGeometry, SIDE_MOTION). type Side = { from: number; to: number; place?: string | null }; const MOTION = 0.35; export default function SidePostOverlay({ project, take, clipId, side, s, published }: { project: string; take: string | null; clipId: string; side: Side; s: number; published: boolean }) { const up = s >= side.from - MOTION && s <= side.to + MOTION; if (!up) return null; const left = side.place === "left"; // How far in it is: 0 off-frame, 1 in place (an ease-out in, an ease-in out). const k = s < side.from + MOTION ? Math.max(0, Math.min(1, (s - side.from) / MOTION)) : s > side.to - MOTION ? Math.max(0, Math.min(1, (side.to - s) / MOTION)) : 1; const ease = 1 - (1 - k) * (1 - k); const src = `/api/report/post-item?project=${encodeURIComponent(project)}&side=${encodeURIComponent(clipId)}&w=640&h=600${take ? `&take=${encodeURIComponent(take)}` : ""}${published ? "&published=1" : ""}`; return (