import Link from "next/link"; import { cookies, headers } from "next/headers"; import { LandingAnalytics } from "@/components/landing/LandingAnalytics"; import { LandingHeaderActions, LandingHeroActions, } from "@/components/landing/LandingAuthActions"; import { LANDING_LOCALE_COOKIE, pickLandingLocale, type LandingLocale, } from "@/components/landing/landingLocale"; import type { CityListItem } from "@/lib/dashboard-types"; import { STATIC_CITY_LIST } from "@/lib/static-cities"; const COVERAGE_EN = [ "AMOS 60s runway sensors", "AMSC 180s runway endpoints", "MADIS 300s airport observations", "CoWIN 60s + HKO 600s", "Live chart updates", "Short Telegram alerts", ]; const COVERAGE_ZH = [ "AMOS 60s 跑道传感器", "AMSC 180s 跑道端点", "MADIS 300s 机场观测", "CoWIN 60s + HKO 600s", "网页图表实时更新", "Telegram 简短提醒", ]; const PRO_FEATURES_EN = [ "Settlement-source-first airport, official-station, and runway observations", "DEB blend forecast with model-spread context", "Model-implied distribution and probability estimates", "Intraday windows, deviation metrics, and settlement context", "Paid Telegram group eligibility and alert workflows", "Priority support for subscription and access issues", ]; const PRO_FEATURES_ZH = [ "结算源优先的机场、官方站与跑道实测", "DEB 智能融合预报与模型分歧背景", "模型隐含分布预测与概率估算", "日内观测窗口、偏差度量与结算背景", "付费 Telegram 群准入与提醒工作流", "订阅与准入问题优先支持", ]; const CONTACT_EMAIL = "yhrsc30@gmail.com"; const CONTACT_X_URL = "https://x.com/polyweatheryuan"; const SUPPORTED_CITY_GROUPS: Array<{ descriptionEn: string; descriptionZh: string; include: (city: CityListItem) => boolean; labelEn: string; labelZh: string; }> = [ { labelEn: "Asia-Pacific", labelZh: "亚太", descriptionEn: "China, East Asia, Southeast Asia, South Asia, and Oceania markets.", descriptionZh: "中国、东亚、东南亚、南亚与大洋洲市场。", include: (city) => city.lon >= 60 || city.lon <= -170, }, { labelEn: "Europe / Middle East / Africa", labelZh: "欧洲 / 中东 / 非洲", descriptionEn: "Airport and official-station markets across EMEA.", descriptionZh: "覆盖欧洲、中东和非洲的机场与官方站市场。", include: (city) => city.lon > -30 && city.lon < 60, }, { labelEn: "Americas", labelZh: "美洲", descriptionEn: "North and South American temperature markets.", descriptionZh: "北美与南美温度市场。", include: (city) => city.lon >= -170 && city.lon <= -30, }, ]; const supportedCityGroups = SUPPORTED_CITY_GROUPS.map((group) => ({ ...group, cities: STATIC_CITY_LIST.filter(group.include).sort((left, right) => cityDisplayName(left).localeCompare(cityDisplayName(right), "en"), ), })).filter((group) => group.cities.length > 0); const supportedCityCount = supportedCityGroups.reduce( (total, group) => total + group.cities.length, 0, ); function cityDisplayName(city: CityListItem) { return city.display_name || city.name; } type IconName = | "radar" | "gauge" | "shield" | "cloudSun" | "lineChart" | "bell" | "clock" | "database" | "check" | "arrow"; function LandingIcon({ className, name, size = 16, }: { className?: string; name: IconName; size?: number; }) { const common = { "aria-hidden": true, className, fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round" as const, strokeLinejoin: "round" as const, strokeWidth: 2, viewBox: "0 0 24 24", width: size, }; switch (name) { case "radar": return ( ); case "gauge": return ( ); case "shield": return ( ); case "cloudSun": return ( ); case "lineChart": return ( ); case "bell": return ( ); case "clock": return ( ); case "database": return ( ); case "check": return ( ); case "arrow": return ( ); default: return null; } } function WeatherWorkflowIllustration() { return (