https://trains.fyi/_next/static/chunks/8447-bce9b7d83fd9bc68.js?dpl=dpl_9XWdyFE2CuQprotrFPs22V64Rr34
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8447],{74:(e,t,a)=>{a.d(t,{A:()=>L});var s=a(37876),r=a(70005),o=a(89214),l=a(73837),n=a(69291),i=a(9985),c=a(65685),m=a(84591),d=a(48230),h=a.n(d),g=a(14232),p=a(17190),u=a(62665),x=a(78240);let b=()=>{let[e,t]=(0,g.useState)(!0),[a,r]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1);return((0,g.useEffect)(()=>{let e=()=>t(!0),a=()=>{t(!1),r(!0)};return window.addEventListener("online",e),window.addEventListener("offline",a),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",a)}},[]),(0,g.useEffect)(()=>{let e=async()=>{try{(await fetch(x.QU)).ok?l(!1):(l(!0),r(!0))}catch(e){l(!0),r(!0)}},t=setInterval(e,3e4);return e(),()=>clearInterval(t)},[]),e&&!o)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>r(!0),className:"flex items-center px-3 py-1 text-sm font-medium text-white bg-red-600 border-2 border-red-600 rounded-md hover:bg-red-700",children:[(0,s.jsx)(u.A,{className:"w-4 h-4 mr-1"}),"Error"]}),(0,s.jsxs)(p.lG,{open:a,onClose:()=>r(!1),className:"relative z-10",children:[(0,s.jsx)(p.Xi,{transition:!0,className:"fixed inset-0 bg-gray-500/75 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,s.jsxs)(p.Lj,{transition:!0,className:"relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-lg sm:p-6 data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95",children:[(0,s.jsx)("div",{className:"absolute right-0 top-0 hidden pr-4 pt-4 sm:block",children:(0,s.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)(c.A,{"aria-hidden":"true",className:"size-6"})]})}),(0,s.jsxs)("div",{className:"sm:flex sm:items-start",children:[(0,s.jsx)("div",{className:"mx-auto flex size-12 shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:size-10",children:(0,s.jsx)(u.A,{"aria-hidden":"true",className:"size-6 text-red-600"})}),(0,s.jsxs)("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[(0,s.jsx)(p.L3,{as:"h3",className:"text-base font-semibold text-gray-900",children:"Connectivity Error"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:e?"Unable to connect to the trains.fyi service. Please try again later.":"You appear to be offline. Please check your internet connection."})})]})]})]})})})]})]})};var v=a(46100),y=a(48166);function f({isOpen:e,onClose:t,children:a}){return((0,g.useEffect)(()=>{if(e){document.body.style.overflow="hidden",document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="none",e.style.zIndex="-1"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="none",e.style.opacity="0.5")}else{document.body.style.overflow="unset",document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="auto",e.style.zIndex="auto"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="auto",e.style.opacity="1")}return()=>{document.body.style.overflow="unset",document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="auto",e.style.zIndex="auto"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="auto",e.style.opacity="1")}},[e]),e)?(0,s.jsx)("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:(0,s.jsxs)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:t}),(0,s.jsx)("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:a})]})}):null}var w=a(42644);let j=({isOpen:e,onClose:t})=>{let[a,r]=(0,g.useState)(!1),{units:o,setUnits:l}=(0,y.t)();(0,g.useEffect)(()=>{r(!0)},[]);let n=e=>{l(e)};return a?(0,s.jsx)(f,{isOpen:e,onClose:t,children:(0,s.jsxs)("div",{className:"px-6 py-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Settings"}),(0,s.jsxs)("button",{onClick:t,className:"text-gray-400 hover:text-gray-600",children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(w.A,{}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"text-base font-medium text-gray-900 mb-3",children:"Speed Units"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("label",{className:"flex items-center",children:[(0,s.jsx)("input",{type:"radio",name:"speedUnits",value:"kph",checked:"kph"===o,onChange:e=>n(e.target.value),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300"}),(0,s.jsx)("span",{className:"ml-3 text-sm text-gray-700",children:"Kilometers per hour (km/h)"})]}),(0,s.jsxs)("label",{className:"flex items-center",children:[(0,s.jsx)("input",{type:"radio",name:"speedUnits",value:"mph",checked:"mph"===o,onChange:e=>n(e.target.value),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300"}),(0,s.jsx)("span",{className:"ml-3 text-sm text-gray-700",children:"Miles per hour (mph)"})]})]})]})]}),(0,s.jsx)("div",{className:"mt-8 flex justify-end",children:(0,s.jsx)("button",{onClick:t,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium",children:"Done"})})]})}):(0,s.jsx)(f,{isOpen:e,onClose:t,children:(0,s.jsxs)("div",{className:"px-6 py-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Settings"}),(0,s.jsxs)("button",{onClick:t,className:"text-gray-400 hover:text-gray-600",children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),(0,s.jsx)("div",{className:"flex justify-center py-8",children:(0,s.jsx)("div",{className:"animate-pulse",children:"Loading settings..."})})]})})};var N=a(28766),k=a(25620),C=a(21081),z=a(73865),F=a(35634);let S=({className:e="w-4 h-4"})=>
1(0,s.jsx)("svg",{viewBox:"0 0 384 512",className:e,fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})}),E=({className:e="w-4 h-4"})=>(0,s.jsxs)("svg",{viewBox:"30 336.7 120.9 129.2",className:e,"aria-hidden":"true",children:[(0,s.jsx)("path",{fill:"#FFD400",d:"M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z"}),(0,s.jsx)("path",{fill:"#FF3333",d:"M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1z"}),(0,s.jsx)("path",{fill:"#48FF48",d:"M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z"}),(0,s.jsx)("path",{fill:"#3BCCFF",d:"M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z"})]}),T=({className:e="w-4 h-4"})=>
1(0,s.jsx)("svg",{viewBox:"0 0 24 24",className:e,fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M20.3 4.4A16.5 16.5 0 0016.2 3l-.5 1a15.1 15.1 0 00-7.4 0l-.5-1a16.8 16.8 0 00-4.1 1.4C1.1 8.2.4 12 .8 15.8a16.7 16.7 0 005 2.5l1.2-1.7a10.8 10.8 0 01-1.9-.9l.5-.4a11.9 11.9 0 0012.8 0l.5.4c-.6.4-1.2.7-1.9.9l1.2 1.7a16.7 16.7 0 005-2.5c.5-4.4-.8-8.1-2.9-11.4zM8.3 14.2c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.1 1.1 2.1 2.4-.9 2.4-2.1 2.4zm7.4 0c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.1 1.1 2.1 2.4-.9 2.4-2.1 2.4z"})});function A(){let{language:e,setLanguage:t}=(0,y.t)(),{t:a}=(0,z.B)(),o=F.Y.find(t=>t.code===e)||F.Y[0];return(0,s.jsxs)(r.W1,{as:"div",className:"relative shrink-0",children:[(0,s.jsxs)(r.IU,{className:"flex items-center gap-1.5 text-white text-sm font-medium hover:text-blue-200 focus:outline-none",children:[(0,s.jsx)("span",{children:o.flag}),(0,s.jsx)("span",{children:o.code.toUpperCase()})]}),(0,s.jsxs)(r.c,{className:"absolute right-0 z-50 mt-2 w-44 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[(0,s.jsx)("div",{className:"px-3 py-1.5 border-b border-gray-100",children:(0,s.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:a("language")})}),F.Y.map(a=>(0,s.jsx)(r.Dr,{children:({focus:r})=>(0,s.jsxs)("button",{onClick:()=>t(a.code),className:`${r?"bg-gray-100":""} ${e===a.code?"font-semibold text-blue-700":"text-gray-700"} flex w-full items-center gap-2.5 px-3 py-2 text-sm`,children:[(0,s.jsx)("span",{className:"text-base",children:a.flag}),(0,s.jsx)("span",{children:a.nativeName})]})},a.code))]})]})}function L({networkNav:e}
1){let[t,a]=(0,g.useState)(!1),{user:d,loading:p,logout:u}=(0,k.A)(),{isPremium:x}=(0,C.x)(),{units:f,setUnits:w,language:M,setLanguage:_}=(0,y.t)(),{t:P}=(0,z.B)(),R=[{name:"Late List",href:"/most-delayed-trains/"},{name:P("cities"),href:"/cities/"},{name:P("networks"),href:"/networks/"},{name:P("merchNavLabel"),href:"/merch/"},{name:"Pro",href:"/pro/"}];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.EN,{as:"nav",className:"bg-blue-800",children:({open:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mx-auto max-w-7xl px-2 sm:px-4 lg:px-8",children:(0,s.jsxs)("div",{className:"relative flex h-16 items-center justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center px-2 lg:px-0 shrink-0",children:[(0,s.jsx)("div",{className:"flex-shrink-0",children:(0,s.jsxs)(h(),{href:"/",className:"flex items-center",children:[(0,s.jsx)("img",{src:N.A.src,alt:"trains.fyi logo",className:"h-8 w-auto"}),(0,s.jsx)("span",{className:"text-white text-base font-bold ml-2",children:"trains.fyi"})]})}),(0,s.jsx)("div",{className:"hidden lg:ml-6 lg:block",children:(0,s.jsx)("div",{className:"flex space-x-1",children:R.map(e=>(0,s.jsx)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"rounded-md px-3 py-2 text-sm font-medium text-white hover:bg-blue-700",children:e.name},e.href))})})]}),(0,s.jsx)("div",{className:"hidden lg:flex flex-1 justify-center min-w-0",children:(0,s.jsx)("div",{className:"w-full max-w-xs",children:(0,s.jsx)(v.A,{})})}),(0,s.jsxs)("div",{className:"hidden lg:flex items-center gap-3 shrink-0",children:[(0,s.jsx)(b,{}),!p&&(d?(0,s.jsxs)(r.W1,{as:"div",className:"relative shrink-0",children:[(0,s.jsxs)(r.IU,{className:"flex items-center justify-center rounded-full p-1.5 text-white bg-white/10 hover:bg-white/20 border border-white/30 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white shrink-0",children:[(0,s.jsx)(l.A,{className:"h-8 w-8","aria-hidden":"true"}),(0,s.jsx)("span",{className:"sr-only",children:P("account")})]}),(0,s.jsxs)(r.c,{className:"absolute right-0 z-50 mt-2 w-64 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[(0,s.jsxs)("div",{className:"px-4 py-3 border-b border-gray-100",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:d.email||P("account")}),x&&(0,s.jsx)("span",{className:"inline-block mt-1 rounded bg-amber-500/90 text-white text-xs px-1.5 py-0.5",children:"Pro"})]}),(0,s.jsxs)("div",{className:"px-4 py-3 border-b border-gray-100",children:[(0,s.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:P("speedUnits")}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("label",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"navSpeedUnits",value:"kph",checked:"kph"===f,onChange:()=>w("kph"),className:"h-3.5 w-3.5 text-blue-600 focus:ring-blue-500 border-gray-300"}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"km/h"})]}),(0,s.jsxs)("label",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"navSpeedUnits",value:"mph",checked:"mph"===f,onChange:()=>w("mph"),className:"h-3.5 w-3.5 text-blue-600 focus:ring-blue-500 border-gray-300"}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"mph"})]})]})]}),(0,s.jsx)(r.Dr,{children:(0,s.jsx)(h(),{href:"/account/",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Account & subscription"})}),(0,s.jsx)(r.Dr,{children:({focus:e})=>(0,s.jsxs)("button",{onClick:()=>a(!0),className:`${e?"bg-gray-100":""} flex w-full items-center gap-2 px-4 py-2 text-sm text-gray-700`,children:[(0,s.jsx)(n.A,{className:"h-4 w-4"}),P("settings")]})}),(0,s.jsx)(r.Dr,{children:({focus:e})=>(0,s.jsxs)("button",{onClick:()=>u(),className:`${e?"bg-gray-100":""} flex w-full items-center gap-2 px-4 py-2 text-sm text-gray-700`,children:[(0,s.jsx)(i.A,{className:"h-4 w-4"}),P("signOut")]})})]})]}):(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(h(),{href:"/login/",className:"rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white hover:bg-white/20",children:"Sign in"}),(0,s.jsxs)("a",{href:"/ios/",target:"_blank",rel:"noopener noreferrer",className:"hidden xl:inline-flex items-center gap-1.5 pl-2 pr-3 py-1.5 rounded-md bg-white text-black text-xs font-semibold hover:bg-gray-100 transition-colors shadow-sm","aria-label":"Download on the App Store",children:[(0,s.jsx)(S,{}),(0,s.jsxs)("span",{className:"flex flex-col leading-tight text-left",children:[(0,s.jsx)("span",{className:"text-[8px] font-normal opacity-60",children:P("downloadOnThe")}),(0,s.jsx)("span",{className:"font-bold text-xs -mt-0.5",children:P("appStore")})]})]}),(0,s.jsxs)("a",{href:"/android/",target:"_blank",rel:"noopener noreferrer",className:"hidden xl:inline-flex items-center gap-1.5 pl-2 pr-3 py-1.5 rounded-md bg-white text-black text-xs font-semibold hover:bg-gray-100 transition-colors shadow-sm","aria-label":"Get it on Google Play",children:[(0,s.jsx)(E,{}),(0,s.jsxs)("span",{className:"flex flex-col leading-tight text-left",children:[(0,s.jsx)("span",{className:"text-[8px] font-normal opacity-60",children:P("getItOn")}),(0,s.jsx)("span",{className:"font-bold text-xs -mt-0.5",children:P("googlePlay")})]})]}),(0,s.jsxs)("a",{href:"https://discord.gg/TmHN7bamKX",target:"_blank",rel:"noopener noreferrer",className:"hidden xl:inline-flex items-center gap-1.5 rounded-md bg-[#5865F2] px-3 py-2 text-xs font-semibold text-white shadow-sm transition-colors hover:bg-[#47
152C4]","aria-label":"Join trains.fyi on Discord",children:[(0,s.jsx)(T,{}),(0,s.jsx)("span",{children:"Discord"})]})]})),(0,s.jsx)(A,{})]}),(0,s.jsx)("div",{className:"flex lg:hidden",children:(0,s.jsxs)(o._q,{className:"inline-flex items-center justify-center rounded-md p-2 text-blue-200 hover:bg-blue-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",children:[(0,s.jsx)("span",{className:"sr-only",children:P("openMenu")}),t?(0,s.jsx)(c.A,{className:"block h-6 w-6","aria-hidden":"true"}):(0,s.jsx)(m.A,{className:"block h-6 w-6","aria-hidden":"true"})]})})]})}),(0,s.jsxs)(o.kS,{className:"lg:hidden",children:[(0,s.jsxs)("div",{className:"space-y-1 px-2 pb-3 pt-2",children:[(0,s.jsx)("div",{className:"py-2",children:(0,s.jsx)(v.A,{})}),!p&&(d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"px-3 py-2 text-sm text-blue-200",children:[d.email||P("account"),x&&(0,s.jsx)("span",{className:"ml-2 rounded bg-amber-500/90 text-white text-xs px-1.5 py-0.5",children:"Pro"})]}),(0,s.jsx)(h(),{href:"/account/",className:"block rounded-md px-3 py-2 text-white hover:bg-blue-700",children:"Account & subscription"}),(0,s.jsx)(o._q,{as:"button",onClick:()=>u(),className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-white hover:bg-blue-700",children:P("signOut")})]}):(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[(0,s.jsx)(h(),{href:"/login/",className:"col-span-3 rounded-md bg-white/10 px-3 py-3 text-center font-semibold text-white hover:bg-white/20",children:"Sign in or create an account"}),(0,s.jsxs)(o._q,{as:"a",href:"/ios/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-1.5 px-2 py-2.5 rounded-md bg-white text-black font-semibold hover:bg-gray-100 transition-colors shadow-sm",children:[(0,s.jsx)(S,{className:"w-5 h-5"}),(0,s.jsxs)("span",{className:"flex flex-col leading-tight text-left",children:[(0,s.jsx)("span",{className:"text-[9px] font-normal opacity-60",children:P("downloadOnThe")}),(0,s.jsx)("span",{className:"font-bold text-sm -mt-0.5",children:P("appStore")})]})]}),(0,s.jsxs)(o._q,{as:"a",href:"/android/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-1.5 px-2 py-2.5 rounded-md bg-white text-black font-semibold hover:bg-gray-100 transition-colors shadow-sm",children:[(0,s.jsx)(E,{className:"w-5 h-5"}),(0,s.jsxs)("span",{className:"flex flex-col leading-tight text-left",children:[(0,s.jsx)("span",{className:"text-[9px] font-normal opacity-60",children:P("getItOn")}),(0,s.jsx)("span",{className:"font-bold text-sm -mt-0.5",children:P("googlePlay")})]})]}),(0,s.jsxs)(o._q,{as:"a",href:"https://discord.gg/TmHN7bamKX",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-1.5 rounded-md bg-[#5865F2] px-2 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-[#4752C4]","aria-label":"Join trains.fyi on Discord",children:[(0,s.jsx)(T,{className:"w-5 h-5"}),(0,s.jsx)("span",{children:"Discord"})]})]})),(0,s.jsx)("hr",{className:"border-blue-600 my-2"}),R.map(e=>(0,s.jsx)(o._q,{as:"a",href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"block rounded-md px-3 py-2 text-base font-medium text-white hover:bg-blue-700",children:e.name},e.href)),d&&(0,s.jsx)(o._q,{as:"button",onClick:()=>a(!0),className:"block w-full text-left rounded-md px-3 py-2 text-base font-medium text-white hover:bg-blue-700",children:P("settings")}),(0,s.jsxs)("div",{className:"px-3 py-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium text-blue-300 uppercase tracking-wide mb-2",children:P("language")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:F.Y.map(e=>(0,s.jsxs)("button",{onClick:()=>_(e.code),className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium border transition-colors ${M===e.code?"bg-white text-blue-800 border-white":"text-white border-white/30 hover:bg-white/10"}`,children:[(0,s.jsx)("span",{children:e.flag}),(0,s.jsx)("span",{children:e.nativeName})]},e.code))})]}),(0,s.jsx)("div",{className:"lg:hidden py-1",children:(0,s.jsx)(b,{})})]}),e&&(0,s.jsxs)("div",{style:{backgroundColor:e.network?.color??"#000000"},className:"mt-1 px-2 pb-3 pt-2",children:[(0,s.jsxs)("div",{className:"px-3 py-2",children:[(0,s.jsx)("p",{style:{color:e.network?.textColor??"#FFFFFF"},className:"text-xs",children:P("selectedNetwork")}),(0,s.jsxs)("div",{className:"mt-1 flex items-baseline gap-3",children:[(0,s.jsx)("h3",{className:"text-base font-medium",children:(0,s.jsx)("a",{href:`/networks/${e.networkSlug}/`,style:{color:e.network?.textColor??"#FFFFFF"},className:"underline-offset-2 hover:underline",children:e.networkName})}),(0,s.jsx)(h(),{href:"/networks/",style:{color:e.network?.textColor??"#FFFFFF"},className:"text-xs opacity-80 hover:underline",children:P("changeNetworks")})]})]}),(0,s.jsx)("div",{className:"space-y-1 mt-2",children:e.links.map(t=>(0,s.jsx)(o._q,{as:"a",href:t.href,style:{color:e.network?.textColor??"#FFFFFF"},className:"block rounded-md px-3 py-2 text-base font-medium hover:bg-opacity-75",children:t.name}
1,t.name))})]})]})]})}),(0,s.jsx)("div",{className:"hidden lg:block",children:e&&(0,s.jsx)("div",{style:{backgroundColor:e.network?.color??"#000000"},children:(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,s.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,s.jsxs)("div",{className:"flex-shrink-0",children:[(0,s.jsx)("p",{style:{color:e.network?.textColor??"#FFFFFF"},className:"text-xs",children:P("selectedNetwork")}),(0,s.jsxs)("div",{className:"mt-1 flex items-baseline gap-3",children:[(0,s.jsx)("h3",{className:"text-base",children:(0,s.jsx)("a",{href:`/networks/${e.networkSlug}/`,style:{color:e.network?.textColor??"#FFFFFF"},className:"font-medium underline-offset-2 hover:underline",children:e.networkName})}),(0,s.jsx)(h(),{href:"/networks/",style:{color:e.network?.textColor??"#FFFFFF"},className:"text-xs opacity-80 hover:underline",children:P("changeNetworks")})]})]}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("div",{className:"flex items-baseline space-x-4",children:e.links.map(t=>(0,s.jsxs)("a",{href:t.href,style:{color:e.network?.textColor??"#FFFFFF"},className:"px-3 py-2 rounded-md text-sm font-medium relative hover:bg-opacity-75","aria-current":t.isActive?"page":void 0,children:[t.name,t.isActive&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sr-only",children:"(current page)"}),(0,s.jsx)("span",{style:{backgroundColor:e.network?.textColor??"#FFFFFF"},className:"absolute bottom-1 left-3 right-3 h-0.5"})]})]},t.name))})})]})})})}),(0,s.jsx)(j,{isOpen:t,onClose:()=>a(!1)})]})}},46100:(e,t,a)=>{a.d(t,{A:()=>f});var s=a(37876),r=a(17190),o=a(4425),l=a(72902),n=a(6986),i=a(490),c=a(59079),m=a(24033),d=a(14232),h=a(99904),g=a(72641),p=a(74880),u=a(73865),x=a(78240);let b=h.L.getAllCities(),v=g.i.getAllCountries(),y=p.Y.getAllNetworks(),f=()=>{let[e,t]=(0,d.useState)(""),[a,h]=(0,d.useState)([]),[g,p]=(0,d.useState)(!1),f=(0,d.useRef)(null),{trains:w}=(0,x.nC)(g),{t:j}=(0,u.B)(),N=(0,d.useMemo)(()=>w?.trains||[],[w?.trains]),k=(0,d.useCallback)(()=>[...y.filter(e=>"via"===e.slug||"amtrak"===e.slug).map(e=>({...e,type:"network"})),{name:j("searchViewAllCities"),slug:"cities",type:"default"},{name:j("searchViewAllNetworks"),slug:"networks",type:"default"}],[j]);(0,d.useEffect)(()=>{if(g){document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="none",e.style.zIndex="-1"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="none",e.style.opacity="0.5"),f.current&&f.current.focus(),h(k())}else{document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="auto",e.style.zIndex="auto"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="auto",e.style.opacity="1")}return()=>{document.querySelectorAll(".leaflet-container").forEach(e=>{e.style.pointerEvents="auto",e.style.zIndex="auto"});let e=document.querySelector(".absolute.top-2.left-2.z-\\[1000\\]");e&&(e.style.pointerEvents="auto",e.style.opacity="1")}},[g,k]);let C=(0,d.useCallback)(e=>{if(0===e.length)return void h(k());let t=e=>(e||"").toLowerCase().normalize("NFD").replace(/[Ì-ͯ]/g,""),a=t(e),s=v.filter(e=>t(e.name).includes(a)).map(e=>({...e,type:"country"})),r=b.filter(e=>t(e.name).includes(a)||t(e.state).includes(a)||t(e.country).includes(a)).map(e=>({...e,type:"city"})),o=y.filter(e=>t(e.name).includes(a)||e.shortForms.some(e=>t(e).includes(a))||e.cities.some(e=>{let s=b.find(t=>t.slug===e);return s&&(t(s.name).includes(a)||t(s.state).includes(a)||t(s.country).includes(a))})).map(e=>{let t=e.cities.length>0?b.find(t=>t.slug===e.cities[0]):null;return{...e,type:"network",cityName:t?.name}}),l=[];if(e.length>=2&&N.length>0){let a=e.toLowerCase().split(" ").filter(e=>e.length>0),s=null,r=a;if(a.length>1){let e=a[0],o=y.find(a=>t(a.name).includes(e)||a.shortForms.some(a=>t(a).includes(e))||t(a.slug).includes(e));o&&(s=o.slug,r=a.slice(1))}let o=N.filter(e=>(!s||e.agency.toLowerCase()===s.toLowerCase())&&r.every(a=>{let s=t(a);return e.name&&t(e.name).includes(s)||e.org&&t(e.org).includes(s)||e.dst&&t(e.dst).includes(s)||e.vid&&e.vid.toString().includes(s)||e.id&&e.id.toString().includes(s)||e.agency&&t(e.agency).includes(s)})).slice(0,10).map(e=>{let t=e.normalized?.network?.shortForms&&e.normalized.network.shortForms.length>0?e.normalized.network.shortForms[0]:e.normalized?.network?.name||e.agency,a=j("statusCardUnknown");return{...e,type:"train",searchName:`${t}: ${j("searchTrainWord")}
1 ${e.name||e.id}`,routeInfo:j("searchTrainRoute").replace("{origin}",e.org||a).replace("{destination}",e.dst||a)}});l.push(...o)}let n=[...s,...r,...o];l.length>0&&n.push(...l),h(n)},[N,k,j]);function z(...e){return e.filter(Boolean).join(" ")}return(0,d.useEffect)(()=>{g&&C(e)},[g,e,C]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"relative w-full max-w-lg lg:max-w-xs",children:[(0,s.jsx)("label",{htmlFor:"search",className:"sr-only",children:j("searchPlaceholder")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,s.jsx)(l.A,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"})}),(0,s.jsx)("input",{id:"search",name:"search",className:"block w-full rounded-md border-0 bg-blue-700 py-1.5 pl-10 pr-3 text-white placeholder:text-blue-300 focus:bg-blue-600 focus:outline-none sm:text-sm sm:leading-6",placeholder:j("searchPlaceholder"),type:"search",onClick:()=>p(!0),readOnly:!0})]})]}),(0,s.jsxs)(r.lG,{ref:f,className:"relative z-50",open:g,onClose:()=>{p(!1),t(""),h(k())},children:[(0,s.jsx)(r.Xi,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),(0,s.jsx)("div",{className:"fixed inset-0 z-50 w-screen overflow-y-auto p-4 sm:p-6 md:p-20",children:(0,s.jsx)(r.Lj,{className:"mx-auto max-w-xl transform divide-y divide-gray-100 overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all",children:(0,s.jsxs)(o.G3,{onChange:e=>{e&&e.type&&(p(!1),"city"===e.type?window.location.href=`/${e.slug}/`:"network"===e.type?window.location.href=`/networks/${e.slug}/`:"country"===e.type?window.location.href=`/countries/${e.slug}/`:"default"===e.type?window.location.href=`/${e.slug}/`:"train"===e.type&&(window.location.href=`/networks/${e.agency}/trains/${e.vid}/`))},children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(l.A,{className:"pointer-events-none absolute left-4 top-3.5 h-5 w-5 text-gray-400","aria-hidden":"true"}),(0,s.jsx)(o.oK,{autoFocus:!0,className:"h-12 w-full border-0 bg-transparent pl-11 pr-4 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm",placeholder:j("searchPlaceholder"),onChange:e=>t(e.target.value),value:e})]}),a.length>0&&(0,s.jsx)(o.Kc,{static:!0,className:"max-h-96 transform-gpu scroll-py-3 overflow-y-auto p-3",children:a.map(e=>(0,s.jsx)(o.jO,{value:e,className:({active:e})=>z("group flex cursor-pointer select-none rounded-xl p-3",e?"bg-gray-100":""),children:({active:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:z("flex h-10 w-10 flex-none items-center justify-center rounded-lg","network"===e.type?"":"city"===e.type?"USA"===e.country?"bg-blue-500":"bg-red-500":"country"===e.type?"bg-purple-500":"train"===e.type?"":"bg-gray-400"),style:"network"===e.type||"train"===e.type?{backgroundColor:"train"===e.type?e.normalized?.network?.color||"#000000":e.color}:{},children:"network"===e.type?(0,s.jsx)(n.A,{className:"h-6 w-6",style:{color:e.textColor||"#ffffff"},"aria-hidden":"true"}):"city"===e.type||"country"===e.type?(0,s.jsx)(i.A,{className:"h-6 w-6 text-white","aria-hidden":"true"}):"train"===e.type?(0,s.jsx)(c.A,{className:"h-6 w-6",style:{color:e.normalized?.network?.textColor||"#ffffff"},"aria-hidden":"true"}):(0,s.jsx)(l.A,{className:"h-6 w-6 text-white","aria-hidden":"true"})}),(0,s.jsxs)("div",{className:"ml-4 flex-auto",children:[(0,s.jsxs)("p",{className:z("text-sm font-medium",t?"text-gray-900":"text-gray-700"),children:["train"===e.type?e.searchName:e.name,"network"===e.type&&e.cityName&&!e.name.toLowerCase().includes(e.cityName.toLowerCase())&&(0,s.jsxs)("span",{className:"ml-1 text-gray-500",children:["[",e.cityName,"]"]})]}),(0,s.jsx)("p",{className:z("text-sm",t?"text-gray-700":"text-gray-500"),children:"city"===e.type?j("searchCityIn").replace("{state}",e.state).replace("{country}",e.country):"network"===e.type?j("searchNetwork"):"country"===e.type?j("searchCountry"):"train"===e.type?e.routeInfo:j("searchAllResults")})]})]})},`${e.type}-${e.slug||e.vid||e.id}`))}),""!==e&&0===a.length&&(0,s.jsxs)("div",{className:"px-6 py-14 text-center text-sm sm:px-14",children:[(0,s.jsx)(m.A,{className:"mx-auto h-6 w-6 text-gray-400"}),(0,s.jsx)("p",{className:"mt-4 font-semibold text-gray-900",children:j("searchNoResults")}),(0,s.jsx)("p",{className:"mt-2 text-gray-500",children:j("searchNoResultsDesc")})]})]})})})]})]})}},72641:(e,t,a)=>{a.d(t,{i:()=>i});var s=a(99904),r=a(74880);let o=JSON.parse('[{"name":"United States","slug":"usa","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Track trains across the United States with real-time updates.","map":{"lat":39.8283,"lng":-98.5795,"zoom":4}},{"name":"Canada","slug":"canada","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Follow Canadian trains with minute-by-minute position updates.","map":{"lat":56.1304,"lng":-106.3468,"zoom":3}},{"name":"Mexico","slug":"mexico","color":"bg-green-600","hoverColor":"hover:bg-green-700","description":"View Mexican train movements in real-time across the country.","map":{"lat":23.6345,"lng":-102.5528,"zoom":5}},{"name":"Australia","slug":"australia","color":"bg-yellow-600","hoverColor":"hover:bg-yellow-700","description":"Monitor train movements across the Australian continent.","map":{"lat":-25.2744,"lng":133.7751,"zoom":4}},{"name":"Malaysia","slug":"malaysia","color":"bg-blue-600","hoverColor":"hover:bg-blue-700","description":"Track train movements across Malaysia with real-time updates.","map":{"lat":4.2105,"lng":101.9758,"zoom":6}}
1,{"name":"New Zealand","slug":"new-zealand","color":"bg-black","hoverColor":"hover:bg-gray-800","description":"Track train movements across New Zealand with real-time updates.","map":{"lat":-40.9006,"lng":174.886,"zoom":5}},{"name":"Netherlands","slug":"netherlands","color":"bg-blue-800","hoverColor":"hover:bg-blue-900","description":"View real-time train movements across the Netherlands, including NS and regional operators.","map":{"lat":52.1326,"lng":5.2913,"zoom":7}},{"name":"Finland","slug":"finland","color":"bg-blue-500","hoverColor":"hover:bg-blue-600","description":"Track train movements across Finland, including VR and regional services.","map":{"lat":64,"lng":26,"zoom":5}},{"name":"Sweden","slug":"sweden","color":"bg-yellow-400","hoverColor":"hover:bg-yellow-500","description":"Monitor real-time train movements throughout Sweden, including SJ and regional networks.","map":{"lat":60.1282,"lng":18.6435,"zoom":4}},{"name":"Norway","slug":"norway","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Track train movements across Norway, including Vy and other operators.","map":{"lat":60.472,"lng":8.4689,"zoom":4}},{"name":"India","slug":"india","color":"bg-orange-600","hoverColor":"hover:bg-orange-700","description":"Track Indian Railways trains with real-time position updates across the country.","map":{"lat":20.5937,"lng":78.9629,"zoom":5}},{"name":"France","slug":"france","color":"bg-blue-600","hoverColor":"hover:bg-blue-700","description":"Track train movements across France with real-time updates.","map":{"lat":46.2276,"lng":2.2137,"zoom":5}},{"name":"United Kingdom","slug":"united-kingdom","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Track train movements across the United Kingdom with real-time updates.","map":{"lat":55.3781,"lng":-3.436,"zoom":5}},{"name":"Belgium","slug":"belgium","color":"bg-yellow-500","hoverColor":"hover:bg-yellow-600","description":"Track train movements across Belgium with real-time updates.","map":{"lat":50.5039,"lng":4.4699,"zoom":7}},{"name":"Chile","slug":"chile","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Track train movements across Chile with schedule-based updates.","map":{"lat":-35.6751,"lng":-71.543,"zoom":5}},{"name":"Spain","slug":"spain","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Track Renfe train movements across Spain with real-time updates.","map":{"lat":40.4168,"lng":-3.7038,"zoom":6}},{"name":"Argentina","slug":"argentina","color":"bg-blue-400","hoverColor":"hover:bg-blue-500","description":"Track train movements across Argentina with real-time updates.","map":{"lat":-38.4161,"lng":-63.6167,"zoom":4}},{"name":"Egypt","slug":"egypt","color":"bg-yellow-700","hoverColor":"hover:bg-yellow-800","description":"Track Cairo Metro trains across Egypt with scheduled position updates.","map":{"lat":26.8206,"lng":30.8025,"zoom":5}},{"name":"Morocco","slug":"morocco","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Track ONCF national rail trains across Morocco, including the Al Boraq high-speed line, with scheduled position updates.","map":{"lat":31.7917,"lng":-7.0926,"zoom":5}},{"name":"Poland","slug":"poland","color":"bg-red-500","hoverColor":"hover:bg-red-600","description":"Track tram and rail movements across Poland with real-time updates.","map":{"lat":51.9194,"lng":19.1451,"zoom":6}},{"name":"Czechia","slug":"czechia","color":"bg-blue-700","hoverColor":"hover:bg-blue-800","description":"Track Prague\'s metro, trams, and national rail across Czechia with scheduled and real-time updates.","map":{"lat":49.8175,"lng":15.473,"zoom":6}},{"name":"Latvia","slug":"latvia","color":"bg-red-800","hoverColor":"hover:bg-red-900","description":"Track tram movements across Latvia with real-time updates.","map":{"lat":56.8796,"lng":24.6032,"zoom":7}},{"name":"Bulgaria","slug":"bulgaria","color":"bg-green-700","hoverColor":"hover:bg-green-800","description":"Track tram movements across Bulgaria with real-time updates.","map":{"lat":42.7339,"lng":25.4858,"zoom":7}},{"name":"Italy","slug":"italy","color":"bg-green-600","hoverColor":"hover:bg-green-700","description":"Track tram and rail movements across Italy with real-time updates.","map":{"lat":41.8719,"lng":12.5674,"zoom":6}}
1,{"name":"Croatia","slug":"croatia","color":"bg-blue-700","hoverColor":"hover:bg-blue-800","description":"Track tram movements across Croatia with real-time updates.","map":{"lat":45.1,"lng":15.2,"zoom":7}},{"name":"Romania","slug":"romania","color":"bg-yellow-500","hoverColor":"hover:bg-yellow-600","description":"Track tram movements across Romania with real-time updates.","map":{"lat":45.9432,"lng":24.9668,"zoom":6}},{"name":"Ukraine","slug":"ukraine","color":"bg-blue-500","hoverColor":"hover:bg-blue-600","description":"Track tram movements across Ukraine with real-time updates.","map":{"lat":48.3794,"lng":31.1656,"zoom":6}},{"name":"Israel","slug":"israel","color":"bg-blue-600","hoverColor":"hover:bg-blue-700","description":"Track rail and light rail movements across Israel with real-time updates.","map":{"lat":31.0461,"lng":34.8516,"zoom":7}},{"name":"Switzerland","slug":"switzerland","color":"bg-red-700","hoverColor":"hover:bg-red-600","description":"Track Swiss trains, from SBB intercity services to the Glacier and Bernina Express, with real-time updates.","map":{"lat":46.8182,"lng":8.2275,"zoom":7}},{"name":"Estonia","slug":"estonia","color":"bg-blue-800","hoverColor":"hover:bg-blue-900","description":"Track tram movements across Estonia with real-time updates.","map":{"lat":58.5953,"lng":25.0136,"zoom":7}},{"name":"Hong Kong","slug":"hong-kong","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Track MTR trains across Hong Kong with real-time updates.","map":{"lat":22.3193,"lng":114.1694,"zoom":11}},{"name":"Taiwan","slug":"taiwan","color":"bg-blue-700","hoverColor":"hover:bg-blue-800","description":"Track TRA and THSR trains across Taiwan with real-time updates.","map":{"lat":23.9739,"lng":120.982,"zoom":7}},{"name":"Japan","slug":"japan","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Track Toei Subway and Tokyo Metro trains across Tokyo with real-time updates.","map":{"lat":35.6895,"lng":139.6917,"zoom":10}},{"name":"South Africa","slug":"south-africa","color":"bg-green-600","hoverColor":"hover:bg-green-700","description":"Follow Rovos Rail across South Africa.","map":{"lat":-30.5595,"lng":22.9375,"zoom":5}},{"name":"Philippines","slug":"philippines","color":"bg-blue-700","hoverColor":"hover:bg-blue-800","description":"Track urban rail services across Metro Manila.","map":{"lat":12.8797,"lng":121.774,"zoom":6}},{"name":"Singapore","slug":"singapore","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Track MRT and LRT trains across Singapore with real-time updates.","map":{"lat":1.3521,"lng":103.8198,"zoom":11}},{"name":"Portugal","slug":"portugal","color":"bg-green-700","hoverColor":"hover:bg-green-800","description":"Track CP national rail trains across Portugal with scheduled positions.","map":{"lat":39.5,"lng":-8,"zoom":7}},{"name":"Vietnam","slug":"vietnam","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Track Vietnam Railways\' North-South trains and Hanoi/Ho Chi Minh City metro with scheduled position updates.","map":{"lat":16,"lng":108,"zoom":5}},{"name":"China","slug":"china","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Track China Railway high-speed trains and the Shanghai, Shenzhen, Guangzhou, and Beijing metro systems with scheduled position updates.","map":{"lat":34,"lng":113,"zoom":4}},{"name":"Thailand","slug":"thailand","color":"bg-blue-700","hoverColor":"hover:bg-blue-800","description":"Track the State Railway of Thailand\'s long-distance trains and Bangkok\'s commuter rail lines with scheduled position updates.","map":{"lat":13.5,"lng":101,"zoom":6}},{"name":"Kazakhstan","slug":"kazakhstan","color":"bg-cyan-600","hoverColor":"hover:bg-cyan-700","description":"Track Kazakhstan Temir Zholy\'s domestic long-distance trains with scheduled position updates.","map":{"lat":48,"lng":68,"zoom":4}},{"name":"Indonesia","slug":"indonesia","color":"bg-rose-600","hoverColor":"hover:bg-rose-700","description":"Track Kereta Api Indonesia\'s Java intercity trains with scheduled position updates.","map":{"lat":-7.5,"lng":110,"zoom":6}}
1,{"name":"Lithuania","slug":"lithuania","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Track published passenger rail services in Lithuania using timetable estimates.","map":{"lat":54.6872,"lng":25.2797,"zoom":7}},{"name":"Serbia","slug":"serbia","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Track published passenger rail services in Serbia using timetable estimates.","map":{"lat":44.8125,"lng":20.4612,"zoom":7}},{"name":"Kosovo","slug":"kosovo","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Track published passenger rail services in Kosovo using timetable estimates.","map":{"lat":42.6629,"lng":21.1655,"zoom":7}},{"name":"North Macedonia","slug":"north-macedonia","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Track published passenger rail services in North Macedonia using timetable estimates.","map":{"lat":41.9981,"lng":21.4254,"zoom":7}},{"name":"Brazil","slug":"brazil","color":"bg-green-600","hoverColor":"hover:bg-green-700","description":"Explore Brazilian rail networks with schedule-based estimated train positions.","map":{"lat":-23.1,"lng":-44.8,"zoom":6}},{"name":"Panama","slug":"panama","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Explore Panamaâs metro and railway with estimated train positions.","map":{"lat":9.08,"lng":-79.7,"zoom":8}},{"name":"Denmark","slug":"denmark","color":"bg-red-600","hoverColor":"hover:bg-red-700","description":"Explore Danish rail services with timetable-based train positions.","map":{"lat":56,"lng":10,"zoom":7}},{"name":"Armenia","slug":"armenia","color":"bg-red-700","hoverColor":"hover:bg-red-600","description":"Explore Armenian passenger rail services with timetable-based train positions.","map":{"lat":40.5,"lng":44.55,"zoom":7}},{"name":"Bolivia","slug":"bolivia","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger trains in Bolivia with estimated map positions.","map":{"lat":-17.4,"lng":-66.2,"zoom":6}},{"name":"Costa Rica","slug":"costa-rica","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore Costa Ricaâs passenger trains with estimated map positions.","map":{"lat":9.9,"lng":-84.1,"zoom":7}},{"name":"Ecuador","slug":"ecuador","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger trains in Ecuador with estimated map positions.","map":{"lat":-1.5,"lng":-78.8,"zoom":6}},{"name":"Georgia","slug":"georgia","color":"bg-red-700","hoverColor":"hover:bg-red-600","description":"Explore Georgian passenger rail services with timetable-based train positions.","map":{"lat":42.08,"lng":43.6,"zoom":7}},{"name":"Kenya","slug":"kenya","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Explore Madaraka Express trains with timetable-based estimated positions.","map":{"lat":-2.5,"lng":38,"zoom":7}},{"name":"Luxembourg","slug":"luxembourg","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger rail services in Luxembourg with timetable-based train positions.","map":{"lat":49.76,"lng":6.1,"zoom":8}},{"name":"Montenegro","slug":"montenegro","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger rail services in Montenegro with timetable-based train positions.","map":{"lat":42.73,"lng":19.29,"zoom":8}},{"name":"Paraguay","slug":"paraguay","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger trains in Paraguay with estimated map positions.","map":{"lat":-27.37,"lng":-55.865,"zoom":6}},{"name":"Peru","slug":"peru","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger trains in Peru with estimated map positions.","map":{"lat":-12.08,"lng":-77,"zoom":6}},{"name":"Puerto Rico","slug":"puerto-rico","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore Puerto Ricoâs Tren Urbano with estimated map positions.","map":{"lat":18.22,"lng":-66.43,"zoom":8}},{"name":"Senegal","slug":"senegal","color":"bg-green-700","hoverColor":"hover:bg-green-800","description":"Explore Dakar TER with timetable-based estimated train positions.","map":{"lat":14.727,"lng":-17.32,"zoom":10}},{"name":"Slovenia","slug":"slovenia","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger rail services in Slovenia with timetable-based train positions.","map":{"lat":46.13,"lng":14.82,"zoom":7}},{"name":"Uruguay","slug":"uruguay","color":"bg-blue-800","hoverColor":"hover:bg-blue-600","description":"Explore passenger trains in Uruguay with estimated map positions.","map":{"lat":-31.3,"lng":-55.8,"zoom":6}}
1,{"name":"Dominican Republic","slug":"dominican-republic","color":"bg-blue-600","hoverColor":"hover:bg-blue-700","description":"Explore the Dominican Republicâs metro with estimated train positions.","map":{"lat":18.7357,"lng":-70.1627,"zoom":7}},{"name":"Venezuela","slug":"venezuela","color":"bg-yellow-600","hoverColor":"hover:bg-yellow-700","description":"Explore Venezuelan rail with estimated positions from available timetables.","map":{"lat":8,"lng":-66,"zoom":5}},{"name":"Tunisia","slug":"tunisia","color":"bg-red-700","hoverColor":"hover:bg-red-800","description":"Explore Tunis passenger trains with timetable-based estimated positions.","map":{"lat":34.5,"lng":9.5,"zoom":6}},{"name":"Nigeria","slug":"nigeria","color":"bg-green-700","hoverColor":"hover:bg-green-800","description":"Explore Nigerian passenger trains with timetable-based estimated positions.","map":{"lat":9.1,"lng":8.7,"zoom":6}},{"name":"Saudi Arabia","slug":"saudi-arabia","color":"bg-emerald-800","hoverColor":"hover:bg-emerald-900","description":"Explore the Haramain High-Speed Railway with timetable-based estimated positions.","map":{"lat":22.5,"lng":39.5,"zoom":6}}]');class l{constructor(e){this.name=e.name,this.slug=e.slug,this.color=e.color,this.hoverColor=e.hoverColor,this.description=e.description,this.map={...e.map}}toJSON(){return{name:this.name,slug:this.slug,color:this.color,hoverColor:this.hoverColor,description:this.description,map:{...this.map}}}getFormattedName(){return this.name}getCSSClasses(){return`${this.color} ${this.hoverColor}`}getCities(){return s.L.getCitiesByCountry(this.slug)}getHighlightedCities(){return this.getCities().filter(e=>e.highlighted)}getNetworks(){let e=this.getCities().flatMap(e=>r.Y.getNetworksByCity(e.slug)),t=r.Y.getNetworksByCountryName(this.name),a=new Map;return[...e,...t].forEach(e=>a.set(e.slug,e)),Array.from(a.values())}}class n{constructor(){this.countries=new Map,o.forEach(e=>{this.countries.set(e.slug,new l(e))})}static getInstance(){return n._instance||(n._instance=new n),n._instance}getCountry(e){return this.countries.get(e)}getAllCountries(){return Array.from(this.countries.values())}searchCountries(e){let t=e.toLowerCase();return this.getAllCountries().filter(e=>e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}}let i=n.getInstance()},93408:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(37876),r=a(77328),o=a.n(r);function l({title:e="trains.fyi",description:t="Track trains in real-time across North America",canonical:a,image:r="/social.png",type:n="website",meta:i={},author:c="trains.fyi",keywords:m="",locale:d="en_US",datePublished:h,dateModified:g,noIndex:p=!1}){let u="trains, train map, where is my train, trains.fyi, real-time tracking, railway, transit, transportation",x=m?`${u}, ${m}`:u,b=e.includes("trains.fyi")?e:`${e} | trains.fyi`,v="https://trains.fyi",y=a?`${v}${a}`:null,f=r&&r.startsWith("http")?r:`${v}${r}`,w={"@context":"https://schema.org","@type":"article"===n?"Article":"WebSite",name:b,description:t,url:y||v,..."article"===n&&{author:{"@type":"Person",name:c},image:f,datePublished:h||new Date().toISOString(),...g&&{dateModified:g}}};return(0,s.jsxs)(o(),{children:[(0,s.jsx)("title",{children:b}),(0,s.jsx)("meta",{name:"description",content:t}),(0,s.jsx)("meta",{name:"keywords",content:x}),(0,s.jsx)("meta",{name:"author",content:c}),(0,s.jsx)("meta",{name:"robots",content:p?"noindex, nofollow":"index, follow"}),y&&(0,s.jsx)("link",{rel:"canonical",href:y}),(0,s.jsx)("link",{rel:"icon",type:"image/png",href:"/favicon.png"}),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,s.jsx)("meta",{name:"theme-color",content:"#ffffff"}),(0,s.jsx)("meta",{property:"og:type",content:n}),(0,s.jsx)("meta",{property:"og:title",content:b}),(0,s.jsx)("meta",{property:"og:description",content:t}),(0,s.jsx)("meta",{property:"og:image",content:f}),(0,s.jsx)("meta",{property:"og:site_name",content:"trains.fyi"}),(0,s.jsx)("meta",{property:"og:locale",content:d}),y&&(0,s.jsx)("meta",{property:"og:url",content:y}),"article"===n&&h&&(0,s.jsx)("meta",{property:"article:published_time",content:h}),"article"===n&&g&&(0,s.jsx)("meta",{property:"article:modified_time",content:g}),"article"===n&&c&&(0,s.jsx)("meta",{property:"article:author",content:c}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,s.jsx)("meta",{property:"twitter:domain",content:"trains.fyi"}),(0,s.jsx)("meta",{name:"twitter:title",content:b}),(0,s.jsx)("meta",{name:"twitter:description",content:t}),(0,s.jsx)("meta",{name:"twitter:image",content:f}),(0,s.jsx)("meta",{name:"twitter:site",content:"@trainsfyi"}),y&&(0,s.jsx)("meta",{property:"twitter:url",content:y}),Object.entries(i).map(([e,t])=>(0,s.jsx)("meta",{name:e,content:t},e)),(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(w)}})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.