1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2349],{4402:()=>{},28168:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var o=r(31198),n=r.n(o);"unavailable"===n().getRTLTextPluginStatus()&&n().setRTLTextPlugin("/vendor/mapbox-gl-rtl-text/0.2.3.min.js",!0).catch(e=>console.error("Unable to initialize right-to-left map labels",e));let s=n()},52349:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var o=r(37876),n=r(28168),s=r(14232);r(4402);var a=r(59531);let i=({initialCenter:e=[40.7128,-74.006],initialZoom:t=5,height:r=600,stops:i=[],networkColor:l,networkDarkerColor:c})=>{let u=(0,s.useRef)(null),p=(0,s.useRef)(null),[d,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>(u.current&&!p.current&&(p.current=new n.A.Map({container:u.current,style:(0,a.pI)(),center:[e[1],e[0]],zoom:t,antialias:!0}),p.current.on("load",()=>{(0,a.z7)(p.current),p.current.addSource("stations",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),p.current.addLayer({id:"station-points",type:"circle",source:"stations",paint:{"circle-color":l,"circle-radius":6,"circle-stroke-width":2,"circle-stroke-color":c}}),g(!0)})),()=>{p.current&&(p.current.remove(),p.current=null)}),[e,t,l,c]),(0,s.useEffect)(()=>{if(!p.current||!d)return;let e=i.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(e.stop_lon),parseFloat(e.stop_lat)]},properties:{id:e.stop_id,name:e.stop_name,agency:e.agency,agency:e.agency,code:e.stop_code,description:e.stop_desc}})),t=p.current.getSource("stations");if(t&&t.setData({type:"FeatureCollection",features:e}),p.current.on("click","station-points",e=>{let t=e.features[0].geometry.coordinates.slice(),r=e.features[0].properties.name;new n.A.Popup().setLngLat(t).setHTML(`<h3>${r}</h3>`).addTo(p.current)}),p.current.on("mouseenter","station-points",()=>{p.current.getCanvas().style.cursor="pointer"}),p.current.on("mouseleave","station-points",()=>{p.current.getCanvas().style.cursor=""}),i.length>0){let e=new n.A.LngLatBounds;i.forEach(t=>{e.extend([parseFloat(t.stop_lon),parseFloat(t.stop_lat)])}),p.current.fitBounds(e,{padding:50})}},[d,i,l]),(0,o.jsx)("div",{ref:u,style:{height:`${r}px`,width:"100%"}})}},59531:(e,t,r)=>{"use strict";r.d(t,{Ec:()=>n,pI:()=>o,z7:()=>s});let o=(e="light")=>`https://tiles.openfreemap.org/styles/${"dark"===e?"dark":"positron"}`,n=()=>({version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},layers:[{id:"background",type:"background",paint:{"background-color":"#f2f3f0"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",paint:{"fill-color":"#a8d5e3"}}]}),s=e=>{try{let t=e.getStyle();if(!t)return;let r=t.layers?.find(e=>"symbol"===e.type&&e.layout&&e.layout["text-field"])?.id,o=Object.keys(t.sources||{}).find(e=>t.sources[e]?.type==="vector");if(!o)return;e.getLayer("3d-buildings")||e.addLayer({id:"3d-buildings",type:"fill-extrusion",source:o,"source-layer":"building",minzoom:15,paint:{"fill-extrusion-color":"#d1d5db","fill-extrusion-height":["coalesce",["get","render_height"],["get","height"],0],"fill-extrusion-base":["coalesce",["get","render_min_height"],["get","min_height"],0],"fill-extrusion-opacity":.6}},r)}catch(e){}}}}]);
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.