!function(){mapboxgl.accessToken="pk.eyJ1IjoibG9yZC1zaGl2YW0iLCJhIjoiY2xpeTlpNHFwMDVzbDNmczl2MXdob29udyJ9.JOLDU6VQG_ra1CoVG4jbUA";const e={type:"FeatureCollection",features:[{type:"Feature",properties:{iconSize:[20,42],message:"1"},geometry:{type:"Point",coordinates:[-73.999024,40.75249842]}},{type:"Feature",properties:{iconSize:[20,42],message:"2"},geometry:{type:"Point",coordinates:[-74.03,40.75699842]}},{type:"Feature",properties:{iconSize:[20,42],message:"3"},geometry:{type:"Point",coordinates:[-73.967524,40.7599842]}},{type:"Feature",properties:{iconSize:[20,42],message:"4"},geometry:{type:"Point",coordinates:[-74.0325,40.742992]}}]},t=new mapboxgl.Map({container:"map",style:"mapbox://styles/mapbox/light-v9",center:[-73.999024,40.75249842],zoom:12.25});for(const o of e.features){const r=document.createElement("div"),s=o.properties.iconSize[0],a=o.properties.iconSize[1];r.className="marker",r.insertAdjacentHTML("afterbegin",'<img src="'+assetsPath+'img/illustrations/fleet-car.png" alt="Fleet Car" width="20" class="rounded-3" id="carFleet-'+o.properties.message+'">'),r.style.width=`${s}px`,r.style.height=`${a}px`,r.style.cursor="pointer",new mapboxgl.Marker(r).setLngLat(o.geometry.coordinates).addTo(t);const n=document.getElementById("fl-"+o.properties.message),i=document.getElementById("carFleet-"+o.properties.message);n.addEventListener("click",(function(){const r=document.querySelector(".marker-focus");Helpers._hasClass("active",n)?(t.flyTo({center:e.features[o.properties.message-1].geometry.coordinates,zoom:16}),r&&Helpers._removeClass("marker-focus",r),Helpers._addClass("marker-focus",i)):Helpers._removeClass("marker-focus",i)}))}const o=document.getElementById("carFleet-1");Helpers._addClass("marker-focus",o),document.querySelector(".mapboxgl-control-container").classList.add("d-none");var r=$(".logistics-fleet-sidebar-body");r.length&&new PerfectScrollbar(r[0],{wheelPropagation:!1,suppressScrollX:!0})}();
