"""Fallback browser runtime configuration for generated HTML artifacts. The settings dialog stores the addresses that new pages actually use. These fields remain so an older ``config.yaml`` still loads; they apply only when the dialog has not saved a value yet. """ from pydantic import BaseModel, Field DEFAULT_HTML_RUNTIME_BASE_URL = "http://localhost:8001/api/public/html-runtime" DEFAULT_HTML_MAP_TILE_URL = "https://mt0.google.com/vt/lyrs=m&hl=zh-CN&x={x}&y={y}&z={z}" class HtmlRuntimeConfig(BaseModel): """Legacy fallback used before the settings dialog saves an address.""" base_url: str = Field( default=DEFAULT_HTML_RUNTIME_BASE_URL, min_length=1, description="Fallback browser-accessible Gateway base URL for generated HTML runtime files", ) map_tile_url: str = Field( default=DEFAULT_HTML_MAP_TILE_URL, min_length=1, description="Fallback Leaflet tile URL template used when HTML maps use the map-webpage engine", )