/* global React */ // ──────────────────────────────────────────────────────────── // ALARM — драматичный экран события для сильных (M ≥ 6.0) // Адаптация AlarmA из прототипа (Сдержанный приборный): // огромная цифра магнитуды, pulsing предупреждение, параметры в grid. // // Кнопка «Карта эпицентра» переключает на полный EventDetailScreen // с Leaflet картой. // ──────────────────────────────────────────────────────────── window.AlarmScreen = ({ T, dark, ev, onBack, onShowDetail, onShowTsunami }) => { if (!ev) return null; const color = window.magColor(ev.mag, T); const magLabel = window.magLabel(ev.mag); const dateUtc = new Date(ev.timeUtc); const fmtMskWithSec = new Intl.DateTimeFormat("ru-RU", { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false, timeZone: "Europe/Moscow", }).format(dateUtc); return (
{/* Top — UTC time + LIVE marker */}
СОБЫТИЕ · {fmtMskWithSec} МСК LIVE
{/* Warning header — pulsing icon + title */}
!
ЗАФИКСИРОВАНО ЗЕМЛЕТРЯСЕНИЕ
{window.formatAgo(ev.minutesAgo)} · {ev.flag} {ev.region || "—"}
{/* Magnitude — huge number */}
{ev.mag.toFixed(1)}
МАГНИТУДА
{magLabel}
{ev.place}
{[ ["Глубина", `${ev.depth.toFixed(1)} км`], ["Время МСК", fmtMskWithSec], ["Локально", ev.timeLocal || "—"], ["Координаты", `${ev.lat.toFixed(2)}°, ${ev.lon.toFixed(2)}°`], ].map(([k, v]) => (
{k.toUpperCase()}
{v}
))}
{/* Sources */}
ИСТОЧНИКИ
{(ev.sources && ev.sources.length > 0 ? ev.sources : ["—"]).map((src, i, arr) => (
{src} ПОДТВ.
))}
{/* Confirmation badge */} {ev.confirmed && (
✓ Событие подтверждено двумя независимыми источниками
)} {/* Tsunami warning — strong+shallow events trigger this. */} {window.TsunamiNotice && ( )} {/* Actions */}
); };