# Build a 2D Leaflet version with the same behavior, keeping per-event color if provided. # - Dark basemap # - No buttons/menus # - Swarm lines dashed # - Events numbered 1..n in order of appearance # - Preserve event color if available from properties (e.g., color, col, stroke, or magnitude-based fallback) # - Right sidebar with swarm counts by region; clicking pans/zooms to the swarm # # Writes to /mnt/data/index_swarm_america_2d.html html_2d = r"""