/* RADAR1 — director console (below the program monitor) */
function CBtn({ active, onClick, children, wide = false, momentary = false, title }) {
return (
);
}
function CGroup({ label, children }) {
return (
);
}
const L3_ORDER = ["story", "weather", "live", "analysis"];
/* cam cells are chroma holes — the preset just picks which locator/tz metadata dresses each slot */
const CAM_PRESETS = { 1: ["field"], 2: ["field", "presser"] };
function ControlStrip({ st, set, swapNow, playBreakout, nextSwapIn, breakout, scale, fit, setFit }) {
const ins = st.insets;
const setIns = (k, v) => set("insets", (prev) => ({ ...prev, [k]: v }));
const mmss = (s) => `${String(Math.floor(s / 60)).padStart(2, "0")}:${String(s % 60).padStart(2, "0")}`;
return (
PROGRAM
CONTROL
st.layout !== "A" && swapNow("A")}>L + BOTTOM
st.layout !== "B" && swapNow("B")}>TOP + R
set("auto", !st.auto)} title="Auto-rotate layouts to prevent burn-in">
AUTO {st.auto ? "· " + mmss(nextSwapIn) : "OFF"}
swapNow()}>SWAP NOW
set("mode", "normal")}>NORMAL
set("mode", "situation")}>SITUATION
{ set("tile", null); set("boxes", 0); }} title="Clean chroma hole — live video keyed in downstream">CHROMA
{ set("tile", null); set("boxes", st.boxes === 2 ? 0 : 2); }}>2-BOX
{ set("tile", null); set("boxes", st.boxes === 3 ? 0 : 3); }}>3-BOX
set("tile", null)}>OFF
{Object.entries(window.TILES).map(([k, v]) => (
{ set("boxes", 0); set("tile", k); }}>{v.label}
))}
set("cams", [])}>OFF
set("cams", CAM_PRESETS[1])}>1
set("cams", CAM_PRESETS[2])}>2
{(st.cams || []).map((k, i) => (
set("camTimes", (p) => ({ ...(p || {}), [k]: (p || {})[k] === false }))}>
CAM {i + 1} · TIME
))}
set("countdown", !st.countdown)}>COUNTDOWN
setIns("l3", !ins.l3)}>LOWER THIRD
set("l3Variant", L3_ORDER[(L3_ORDER.indexOf(st.l3Variant) + 1) % L3_ORDER.length])} title="Cycle lower-third style">
L3 · {st.l3Variant}
setIns("loc", !ins.loc)}>LOCATION
setIns("ots", !ins.ots)}>OTS
setIns("phone", !ins.phone)}>PHONE
setIns("map", !ins.map)}>MAP
setIns("source", !ins.source)}>SOURCE
playBreakout("opener")}>OPENER
playBreakout("bumper")}>BUMPER
playBreakout("stationid")}>STATION ID
set("h24", true)}>24H
set("h24", false)}>12H
MONITOR
1920×1080 · {Math.round(scale * 100)}%
setFit(fit === "exact" ? "fit" : "exact")} title="Render at exact 1:1 pixels (scroll to pan)">1:1
);
}
Object.assign(window, { ControlStrip, CBtn, CGroup });