PageSourceSearch

https://trains.fyi/_next/static/chunks/4503-d98a48ea82c68195.js

js trains.fyi collected 2026-09-24 09:55:31 UTC 11,806 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4503],{5876:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(37876);s(14232);var a=s(28766);let n=({text:e,className:t=""})=>(0,r.jsxs)("div",{className:`flex flex-col justify-center items-center ${t}`,children:[(0,r.jsxs)("div",{className:"relative w-10 h-10","aria-hidden":!0,children:[(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border-2 border-gray-200 border-t-blue-600 animate-spin"}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("img",{src:a.A.src??a.A,alt:"",className:"w-6 h-6 object-contain pointer-events-none"})})]}),e&&(0,r.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:e})]})},49086:(e,t,s)=>{s.d(t,{I:()=>y,A:()=>w});var r=s(37876),a=s(14232);function n({children:e,initialVisibleCount:t=3,expandLabel:s,collapseLabel:l,label:c,defaultOpen:o=!1,className:d=""}){let[u,m]=(0,a.useState)(o),[x,h]=(0,a.useState)(!1),f=(0,a.useId)(),g=a.Children.toArray(e),b=g.length>t,p=x?g:g.slice(0,t);return 0===g.length?null:(0,r.jsxs)("section",{className:`overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm ${d}`,children:[c&&(0,r.jsxs)("button",{type:"button","aria-controls":f,"aria-expanded":u,onClick:()=>m(e=>!e),className:`flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-500 sm:px-5 ${u?"border-b border-gray-100":""}`,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-amber-50 text-amber-600",children:(0,r.jsx)(i,{className:"h-4 w-4"})}),(0,r.jsx)("h2",{className:"text-sm font-semibold text-gray-900",children:c})]}),(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium tabular-nums text-gray-600",children:g.length}),(0,r.jsx)("svg",{className:`h-4 w-4 text-gray-400 transition-transform ${u?"rotate-180":""}`,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),(0,r.jsx)("div",{id:f,className:"divide-y divide-gray-100","aria-live":"polite",hidden:!!c&&!u,children:p}),(!c||u)&&b&&(0,r.jsx)("button",{type:"button","aria-controls":f,"aria-expanded":x,onClick:()=>h(e=>!e),className:"w-full border-t border-gray-100 bg-gray-50/70 px-4 py-2.5 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-500",children:x?l:s})]})}function l({children:e,meta:t,title:s,defaultExpanded:n=!1,className:c=""}){let[o,d]=(0,a.useState)(n),u=(0,a.useId)(),m=a.Children.toArray(e).length>0;return(0,r.jsxs)("article",{className:`relative bg-white transition-colors hover:bg-gray-50/60 ${c}`,children:[(0,r.jsxs)("button",{type:"button","aria-controls":m?u:void 0,"aria-expanded":m?o:void 0,disabled:!m,onClick:()=>m&&d(e=>!e),className:"flex w-full items-start gap-3 px-4 py-3.5 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-500 disabled:cursor-default sm:px-5",children:[(0,r.jsx)("span",{className:"mt-0.5 flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full bg-amber-50 text-amber-600",children:(0,r.jsx)(i,{className:"h-3.5 w-3.5"})}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[s,t]}),m&&(0,r.jsx)("svg",{className:`mt-1 h-4 w-4 flex-shrink-0 text-gray-400 transition-transform ${o?"rotate-180":""}`,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]}),m&&o&&(0,r.jsx)("div",{id:u,className:"pb-4 pl-[3.75rem] pr-5",children:e})]})}function i({className:e="h-5 w-5"}){return(0,r.jsx)("svg",{className:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.16
17 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function c({children:e,className:t=""}){return 0===a.Children.toArray(e).length?null:(0,r.jsx)("span",{className:`mt-1.5 flex flex-wrap items-center gap-1.5 ${t}`,children:e})}function o({children:e,tone:t="neutral",className:s=""}){let a={danger:"bg-red-50 text-red-700 ring-red-600/20",warning:"bg-amber-50 text-amber-700 ring-amber-600/20",neutral:"bg-gray-100 text-gray-600 ring-gray-300/40"};return(0,r.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium ring-1 ring-inset ${a[t]||a.neutral} ${s}`,children:e})}function d({items:e=[],maxVisible:t=3,renderItem:s,overflowLabel:a}){if(0===e.length)return null;let n=e.slice(0,t),l=e.length-n.length;return(0,r.jsxs)(r.Fragment,{children:[n.map((e,t)=>s(e,t)),l>0&&(0,r.jsx)(o,{className:"text-gray-500",children:a?a(l):`+${l}`})]})}function u({children:e,className:t=""}){return e?(0,r.jsx)("span",{className:`block text-sm font-semibold leading-5 text-gray-900 ${t}`,children:e}):null}function m({children:e,className:t=""}){return e?(0,r.jsx)("p",{className:`whitespace-pre-line text-sm leading-6 text-gray-600 ${t}`,children:e}):null}function x({href:e,children:t,className:s=""}){return e?(0,r.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:`mt-2 inline-flex items-center text-xs font-medium text-blue-600 hover:text-blue-800 ${s}`,children:[t,(0,r.jsx)("svg",{className:"ml-1 h-3 w-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})})]}):null}var h=s(73865),f=s(78240);function g({effect:e}){let{t}=(0,h.B)(),s={1:t("effectLabel1"),2:t("effectLabel2"),3:t("effectLabel3"),4:t("effectLabel4"),5:t("effectLabel5"),6:t("effectLabel6"),7:t("effectLabel7"),8:t("effectLabel8"),9:t("effectLabel9")}[e]||e;if(!s)return null;let a=["1","2","3"].includes(e);return(0,r.jsx)(o,{tone:a?"danger":"warning",children:s})}function b({label:e}){return(0,r.jsx)(o,{children:e})}function p(e){let{stops:t}=(0,f.X5)(e),{allRoutes:s}=(0,f.Ve)(e,{withShapes:!1});return{stopNames:(0,a.useMemo)(()=>{if(!t)return{};let e={};for(let s of t)e[s.stop_id]=s.stop_name;return e},[t]),routeNames:(0,a.useMemo)(()=>{if(!s||0===s.length)return{};let e={};for(let t of s){let s=t.route||t;e[s.route_id]=s.route_long_name||s.route_short_name||s.route_id}return e},[s])}}function j({alert:e,stopNames:t={},routeNames:s={}}){let{t:a}=(0,h.B)(),n={1:a("causeLabel1"),2:a("causeLabel2"),3:a("causeLabel3"),4:a("c
1auseLabel4"),5:a("causeLabel5"),6:a("causeLabel6"),7:a("causeLabel7"),8:a("causeLabel8"),9:a("causeLabel9"),10:a("causeLabel10"),11:a("causeLabel11"),12:a("causeLabel12")}[e.cause],i=(e.affected_route_ids||[]).map(e=>s[e]||e),o=(e.affected_stop_ids||[]).map(e=>t[e]||e),f=[...i.map((e,t)=>({key:`route-${t}`,label:e})),...o.map((e,t)=>({key:`stop-${t}`,label:e}))];return(0,r.jsxs)(l,{defaultExpanded:!1,title:(0,r.jsx)(u,{children:e.header_text||n||a("alertsTitle")}),meta:(0,r.jsxs)(c,{children:[e.effect&&(0,r.jsx)(g,{effect:e.effect}),(0,r.jsx)(d,{items:f,renderItem:e=>(0,r.jsx)(b,{label:e.label},e.key)}),n&&n!==a("causeLabel1")&&n!==a("causeLabel2")&&(0,r.jsx)("span",{className:"text-xs text-gray-500",children:n})]}),children:[(0,r.jsx)(m,{children:e.description_text}),(0,r.jsx)(x,{href:e.url,children:a("alertsMoreInfo")})]})}function v(e,{routeIds:t,stopIds:s,tripIds:r,includeNetworkWide:n=!1}={}){let{alerts:l,isLoading:i}=(0,f.Gn)(e);return{alerts:(0,a.useMemo)(()=>{if(!l||0===l.length)return[];let e=new Set((t||[]).map(String)),a=new Set((s||[]).map(String)),i=new Set((r||[]).map(String));return e.size>0||a.size>0||i.size>0||n?l.filter(t=>{let s=t.affected_route_ids||[],r=t.affected_stop_ids||[],l=t.affected_trip_ids||[];return 0===s.length&&0===r.length&&0===l.length?n:!!(e.size>0&&s.some(t=>e.has(String(t)))||a.size>0&&r.some(e=>a.has(String(e)))||i.size>0&&l.some(e=>i.has(String(e))))}):l},[l,t,s,r,n]),isLoading:i}}function y({networkSlug:e,routeIds:t,stopIds:s,tripIds:a,includeNetworkWide:l,className:i=""}){let{alerts:c,isLoading:o}=v(e,{routeIds:t,stopIds:s,tripIds:a,includeNetworkWide:l}),{stopNames:d,routeNames:u}=p(e),{t:m}=(0,h.B)();return o||!c||0===c.length?null:(0,r.jsx)(n,{className:i,label:m("alertsTitle"),initialVisibleCount:3,expandLabel:m("alertsViewAll").replace("{n}",c.length),collapseLabel:m("alertsShowFewer"),children:c.map((e,t)=>(0,r.jsx)(j,{alert:e,stopNames:d,routeNames:u},e.id||t))})}function w({networkSlug:e,routeIds:t,stopIds:s,tripIds:a,includeNetworkWide:l}){let{alerts:i,isLoading:c}=v(e,{routeIds:t,stopIds:s,tripIds:a,includeNetworkWide:l}),{stopNames:o,routeNames:d}=p(e),{t:u}=(0,h.B)();return c||!i||0===i.length?null:(0,r.jsxs)("div",{className:"mt-12 mb-4",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-gray-900 mb-2",children:u("alertsTitle")}),(0,r.jsx)("p",{className:"text-gray-600 mb-6",children:u("alertsSubtitle")}),(0,r.jsx)(n,{initialVisibleCount:3,expandLabel:u("alertsViewAll").replace("{n}",i.length),collapseLabel:u("alertsShowFewer"),children:i.map((e,t)=>(0,r.jsx)(j,{alert:e,stopNames:o,routeNames:d},e.id||t))})]})}},49915:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(37876),a=s(60570),n=s(48230),l=s.n(n);function i({pages:e}){return(0,r.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,r.jsxs)("ol",{role:"list",className:"flex items-center space-x-4 pt-6",children:[(0,r.jsx)("li",{children:(0,r.jsx)("div",{children:(0,r.jsxs)(l(),{href:"/",className:"text-gray-400 hover:text-gray-500",children:[(0,r.jsx)(a.A,{"aria-hidden":"true",className:"h-5 w-5 flex-shrink-0"}),(0,r.jsx)("span",{className:"sr-only",children:"Home"})]})})}),e.map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("svg",{fill:"currentColor",viewBox:"0 0 20 20","aria-hidden":"true",className:"h-5 w-5 flex-shrink-0 text-gray-300",children:(0,r.jsx)("path",{d:"M5.555 17.776l8-16 .894.448-8 16-.894-.448z"})}),(0,r.jsx)(l(),{href:e.href,"aria-current":e.current?"page":void 0,className:"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700",children:e.name})]})},e.name))]})})}},56785:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(12107),a=s(34299),n=s(89099),l=s(74880);function i({networkName:e,networkSlug:t,network:s}){let c=(0,n.useRouter)(),o=s??l.Y.getNetwork(t),d=[{name:"Trains",href:`/networks/${t}/`,icon:r.A},{name:"Statistics",href:`/networks/${t}/statistics/`,icon:a.A},...["ttc","stm","translink"].includes(t)?[{name:"Metro Map",href:`/networks/${t}/metromap/`,icon:r.A}]:[]].map(e=>{let s="Trains"===e.name&&(c.asPath===`/networks/${t}/`||c.asPath.includes(`/networks/${t}/trains`)||c.asPath.includes(`/networks/${t}/train`))||"Stations"===e.name&&c.asPath.includes(`/networks/${t}/stations`)||"Routes"===e.name&&c.asPath.includes(`/networks/${t}/routes`)||"Statistics"===e.name&&c.asPath.includes(`/networks/${t}/statistics`)||"Metro Map"===e.name&&c.asPath.includes(`/networks/${t}/metromap`);return{...e,isActive:s}});return{networkName:e,networkSlug:t,network:o,links:d}}}}]);

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.