function ateqccf(){SMT.eventObject.call(this); var a=this;jQuery("#bottomDevelopText").empty().append(config.bottomDevelopText),jQuery("#bottomSupportText").empty().append(config.bottomSupportText),""!=config.bottomSupportHref&&jQuery("#bottomSupportText").attr("href",config.bottomSupportHref),""!=config.bottomDevelopHref&&jQuery("#bottomDevelopText").attr("href",config.bottomDevelopHref),this.routesShowed=!1;var c=jQuery("#topPanelRoutesButton");this.stationsShowed=!1;var f=jQuery("#topPanelStationsButton");this.favShowed=!1;var d=jQuery("#topPanelFavButton");this.buildShowed=!1;var e=jQuery("#topPanelBuildRoute");this.trafficShowed=!1;var h=null,p=null;jQuery("#topPanelTraffic").click(function(){a.trafficShowed?(map.removeTileLayer(h),a.set("trafficShowed",!1),clearInterval(p)):(h=map.addTileLayer(config.trafficServer+"/"+config.trafficCity+"/render/{z}/{x}/{y}.png?_="+Math.random()),a.set("trafficShowed",!0),p=setInterval(function(){h&&map.removeTileLayer(h),h=map.addTileLayer(config.trafficServer+"/"+config.trafficCity+"/render/{z}/{x}/{y}.png?_="+Math.random())},config.trafficRefresh))}),this.camerasShowed=!1;var m=[],n=jQuery("#topPanelCameras");config.showCamerasButton||n.css("display","none"),n.click(function(){if(a.camerasShowed){for(c in a.set("camerasShowed",!1),m)map._map.removeLayer(m[c]);m=[]}else if(a.set("camerasShowed",!0),config.iCameras)for(var c in config.iCameras){var d=config.iCameras[c],f=L.marker([d.lat,d.lng],{zIndexOffset:1,title:d.hint,icon:L.divIcon({html:"
",className:"cameraIco",iconSize:[32,32],iconAnchor:[16,16]})});f.addTo(map._map),m.push(f),f.camera=d,f.on("click",function(b){$.ajax({url:b.target.camera.url,dataType:"text"}).success(function(k){popup=L.popup({maxWidth:700,minWidth:455,maxHeight:400,closeButton:!0,className:""}),popup.setContent(k),popup.setLatLng(L.latLng(b.target.camera.lat,b.target.camera.lng)),popup.openOn(map._map),popup.update()})})}}),c.click(function(){a.get("routesShowed")?(a.set("routesShowed",!1),ffcxdrr.hidePanel()):(a.set("routesShowed",!0),a.set("stationsShowed",!1),a.set("favShowed",!1),a.set("buildShowed",!1),ffcxdrr.showPanel(),aufnonu.hidePanel(),hhrjosj.hidePanel(),buildRoutePanelWorks.hidePanel())}),e.click(function(){a.get("buildShowed")?(a.set("buildShowed",!1),buildRoutePanelWorks.hidePanel()):(a.set("buildShowed",!0),a.set("stationsShowed",!1),a.set("favShowed",!1),a.set("routesShowed",!1),buildRoutePanelWorks.showPanel(),ffcxdrr.hidePanel(),aufnonu.hidePanel(),hhrjosj.hidePanel())}),f.click(function(){a.get("stationsShowed")?(a.set("stationsShowed",!1),aufnonu.hidePanel()):(a.set("stationsShowed",!0),a.set("routesShowed",!1),a.set("favShowed",!1),a.set("buildShowed",!1),ffcxdrr.hidePanel(),aufnonu.showPanel(),hhrjosj.hidePanel(),buildRoutePanelWorks.hidePanel())}),d.click(function(){a.get("favShowed")?(a.set("favShowed",!1),hhrjosj.hidePanel()):(a.set("favShowed",!0),a.set("routesShowed",!1),a.set("stationsShowed",!1),a.set("buildShowed",!1),hhrjosj.showPanel(),ffcxdrr.hidePanel(),aufnonu.hidePanel(),buildRoutePanelWorks.hidePanel())}),new SMT.htmlLinker(this,"onchanged",jQuery("#topPanelDiv"),{"#topPanelRoutesButton":{class:"routesShowed:isDown"},"#topPanelStationsButton":{class:"stationsShowed:isDown"},"#topPanelFavButton":{class:"favShowed:isDown"},"#topPanelBuildRoute":{class:"buildShowed:isDown"},"#topPanelCameras":{class:"camerasShowed:isDown"},"#topPanelTraffic":{class:"trafficShowed:isDown"}}),a.set("routesShowed",!0),ffcxdrr.showPanel()}function FavList(a,c,f,d){SMT.eventObject.call(this),this.id=a,this.name=c,this.routes=f||[],this.zones=d||[],this.isShowed=!1,this.packToString=function(){return this.id+"|"+this.name+"|"+this.routes.map(function(a){return a.getKey()}).join(";")+"|"+this.zones.map(function(a){return a.id}).join(";")},this.parseFromString=function(a){a=a.split("|"),this.id=a[0],this.name=a[1];var c=a[2];if(a=a[3],c){for(var d in c=c.split(";")){var e=c[d].split("-");null!=(e=tdhreuu.getRouteByTypeAndId(parseInt(e[0]),e[1]))&&this.routes.push(e)}this.routes=jQuery.unique(this.routes)}if(a)for(d in a=a.split(";"))null!=(c=tdhreuu.getZoneById(a[d]))&&this.zones.push(c)}}function RouteType(a,c,f,d,e){SMT.eventObject.call(this),this.id=a,this.shortName=c,this.name=f,this.pluralName=d,this.code=e,this.allVehiclesShowed=!1}function Route(a,c,f,d,e,h,p,m,n,r){SMT.eventObject.call(this),this.id1=a,this.id2=c,this.ids=f,this.name=e,this.type=d,this.num=h,this.fromStationId=p,this.fromStationName=m,this.toStationId=n,this.toStationName=r,this.isLineShow=this.allVehiclesShowed=this.isVehiclesShow=!1,this.getKey=function(){var a="0";return"Тр"!=this.type&&"Мор"!=this.type||(a="1"),jQuery.map(this.ids,function(c,b){return c.toString()+"-"+a}).join(";")},this.getKeySubRoute1=function(){var a="0";return"Тр"!=this.type&&"Мор"!=this.type||(a="1"),this.ids[0]+"-"+a},this.getKeySubRoute2=function(){var a="0";return"Тр"!=this.type&&"Мор"!=this.type||(a="1"),this.id2+"-"+a},this.getKeyAllSubRoutes=function(){var a="0";return"Тр"!=this.type&&"Мор"!=this.type||(a="1"),jQuery.map(this.ids,function(c,b){return c.toString()+"-"+a}).join(",")}}function ZoneCategory(a,c){SMT.eventObject.call(this),this.id=a,this.name=c}function Zone(a,c,f,d){SMT.eventObject.call(this),this.id=a,this.categoryId=c,this.name=f,this.routes=d,this.isShowed=!1}function bfdrwvd(){this.gosnum=this.id="",this.animPoints=[],this.speed=this.direction=this.lng=this.lat=0,this.lasttime=new Date,this.routeNum=this.routeType="",this.routeId=-1}function ljgzcxz(a,c,f,d){this.percent=a,this.direction=c,this.lat=f,this.lng=d}function mktmohx(){this.routeNum=this.routeType=this.id="",this.routeId=0,this.lasttime=this.gosnum="",this.curticks=this.dLng=this.dLat=0,this.animPoints=[],this.debugmes=[],this.focused=!1,this.curDirection=this.dfybvnc=this.kqvirek=0}function VehicleForecast(){this.arrTime=this.stdescr=this.stname=this.vehicleId="",this.stationId=this.lng1=this.lat1=this.lng0=this.lat0=0}function StationForecast(){this.vehicleId="",this.routeId=this.arrTime=0,this.whereGo=this.routeType=this.routeNum=""}function NodePoint(){this.lng=this.lat=0}function RouteStation(){this.lng=this.lat=0,this.description=this.name="-",this.id=-1}function Station(a,c,f,d,e,h){SMT.eventObject.call(this),this.id=a,this.name=f,this.description=d,this.lng=e,this.lat=h,this.type=c,this.isFav=!1,this.getKey=function(){return this.id+"-"+this.type}}function advoiku(a){SMT.eventObject.call(this);var c=[],f=[],d=[],e=jQuery("#favPanelTemplate").attr("id",""),h=e.find("#favListBlocksContainer");h.children().detach();var p=jQuery("#favBlockTemplate").clone().css("display","").attr("id","");p.appendTo(h),p.find("#favListBlockHeaderName").text(lang.myStationsText),p.find("#favListBlockHeaderIco").addClass("stations");var m=jQuery("#favBlockTemplate").clone().css("display","").attr("id","");m.appendTo(h),m.find("#favListBlockHeaderName").text(lang.myRoutesText),m.find("#favListBlockHeaderIco").addClass("routes"),this.showPanel=function(){e.css("height",(jQuery(window).height()-config.top_height-config.bottom_height).toString()+"px"),h.css("height",(jQuery(window).height()-config.top_height-config.bottom_height-11).toString()+"px"),e.css("display","inherit")},this.hidePanel=function(){e.css("display","none")},this.updateFavStations=function(){f=rzyoyrm.getFavStationsFromStorage(),u(f)},this.updateFavRoutesLists=function(){d=rzyoyrm.getFavListFromStorage(),r(d)};var n={},r=function(b){var a=m.find("#favListBlockItems");if(a.empty(),0
').html();currentRouteStationsHandles[e][m]||(currentRouteStationsHandles[e][m]=map.addDivMarker(n,{lat:h.lat,lng:h.lng,width:28,height:29,anchorX:14,anchorY:15,tooltip:h.name})),jQuery("#station-"+m).click(h,function(a){a=a.data,zpmymzk.showStationForecasts(a.id,a.name,a.description,b.type,a.lat,a.lng)})}}else isnvyse.getRouteStations(d,a,function(a,c,k){if(c=c.toString()+"-"+k.toString(),!currentRouteStationsHandles[c])for(var l in stationsCache[c]=a,currentRouteStationsHandles[c]={},a){k=a[l];var f=d.toString()+"-"+k.id,q=jQuery('
').html();currentRouteStationsHandles[e][f]||(currentRouteStationsHandles[c][f]=map.addDivMarker(q,{lat:k.lat,lng:k.lng,width:28,height:29,anchorX:14,anchorY:15,tooltip:k.name})),jQuery("#station-"+f).click(k,function(a){a=a.data,zpmymzk.showStationForecasts(a.id,a.name,a.description,b.type,a.lat,a.lng)})}})}},this.removeStations=function(b){var a=0;for(var c in"Тр"!=b.type&&"Мор"!=b.type||(a=1),b.ids){var d=b.ids[c].toString()+"-"+a.toString();if(currentRouteStationsHandles[d]){for(var e in currentRouteStationsHandles[d])map.removeMarker(currentRouteStationsHandles[d][e]);currentRouteStationsHandles[d]=null}}},wideScreenLatLng1=wideScreenLatLng0=screenLatLng1=screenLatLng0=null,isZoomAnimating=!1,refreshCoords=function(){var b=map._map.getBounds().getNorthWest(),a=map._map.getBounds().getSouthEast();screenLatLng0={lat:1e6,lng:-1e6},screenLatLng1={lat:-1e6,lng:1e6},b=map._map.project(b).subtract(L.point(70,70)),a=map._map.project(a).add(L.point(70,70)),b=map._map.unproject(b),a=map._map.unproject(a),wideScreenLatLng0={lat:1e6,lng:-1e6},wideScreenLatLng1={lat:-1e6,lng:1e6}},map.addHandler("move",refreshCoords),map.addHandler("zoomstart",function(){isZoomAnimating=!0}),map.addHandler("zoomend",function(){isZoomAnimating=!1,recalculateStorageMarkerAnimations()}),refreshCoords();var h=!1;this.disableRoutesOnMap=function(){h=!0,removeAllStorageMarkers(),curAnimKey=0},this.enableRoutesOnMap=function(){h=!1,curAnimKey=0,storageMarkersRoutine()};var p=null;$(window).blur(function(){console.log("blur at "+(new Date).toLocaleTimeString()),p&&clearTimeout(p),p=setTimeout(function(){console.log("disableRoutesOnMap at "+(new Date).toLocaleTimeString()),ukgeodm.disableRoutesOnMap()},4e4)}),$(window).focus(function(){console.log("focus at "+(new Date).toLocaleTimeString()),p&&clearTimeout(p),h&&(console.log("enableRoutesOnMap at "+(new Date).toLocaleTimeString()),ukgeodm.enableRoutesOnMap())}),storageMarkersRoutineTimeout=null,needToForceStorageMarkersRoutine=!1,curAnimKey=0,startStorageMarkersRoutine=function(){storageMarkersRoutineTimeout&&(clearTimeout(storageMarkersRoutineTimeout),storageMarkersRoutineTimeout=null)},endStorageMarkersRoutine=function(b){storageMarkersRoutineTimeout=setTimeout(storageMarkersRoutine,b)},isStorageMarkersRoutineBusy=function(){return null==storageMarkersRoutineTimeout},storageMarkersRoutine=function(){if(isStorageMarkersRoutineBusy()&&(console.log("Внеочередной запрос на сервер, но поток занят"),isnvyse.dropLastRequestVehiclesMarkers()),startStorageMarkersRoutine(),0==currentRoutes.length)m={},endStorageMarkersRoutine(500);else if(h)endStorageMarkersRoutine(500);else{var b=new Date;isnvyse.efaclpf(currentRoutes,0,0,90,180,curAnimKey,function(a,c){h||(curAnimKey=c,parseVehicleMarkers(a));var d=1e4-(new Date-b);(d<0||needToForceStorageMarkersRoutine)&&(d=0,needToForceStorageMarkersRoutine=!1),endStorageMarkersRoutine(d)},function(){var a=1e41e3*p&&config.useLocalTimeForInterval||e-h.lasttime>1e3*p&&!config.useLocalTimeForInterval?(delete m[r],c++,hzdjlcz.hideForecasts()):vehiclesOnRoutesCount[h.routeType+"-"+h.routeNum]++;for(var u in vehiclesOnRoutesCount)config.showHintWithVehiclesCount&&(jQuery("#short"+u).attr("data-hint",lang.textOnRoute+vehiclesOnRoutesCount[u]+" "+lang.textVehicleOnRoute),jQuery("#full"+u).attr("data-hint",lang.textOnRoute+vehiclesOnRoutesCount[u]+" "+lang.textVehicleOnRoute));console.log("Total="+Object.keys(m).length+" parsed="+b.length+" filtered="+d+" created="+a+" deleted="+c)},startStorageMarkerAnimation=function(b,a){b.animPoints=a.animPoints,0").append(jQuery("#mapMarkerTemplate").clone().css("display","").attr("id","")).html();a.markerHandle=map.addDivMarker(b,{lat:a.kqvirek,lng:a.dfybvnc,width:50,height:50,anchorX:25,anchorY:25,tooltip:""}),a.jqMarker=jQuery(a.markerHandle._icon),a.jqMarkerGosNum=a.jqMarker.find("#mapMarkerGosNum"),a.jqMarkerIco=a.jqMarker.find("#mapMarkerIco"),a.jqMarkerRouteNum=a.jqMarker.find("#mapMarkerRouteNum"),a.jqMarkerExtra=a.jqMarker.find("#mapMarkerExtra"),(b=tdhreuu.getRouteTypeByShortName(a.routeType))?a.jqMarker.find("#mapMarkerIco").addClass(b.get("code")):a.jqMarker.find("#mapMarkerIco").addClass("bus"),setIcoForMarker(a,a.forecastsIsShowed),a.hasBeenOnMap||config.no_animation||a.jqMarker.addClass("hidden"),updateScreenMarker(a),a.jqMarker.click(function(){a.forecastsIsShowed?($(".mapMarkerIco").removeClass("selected"),setIcoForMarker(a,!1),hzdjlcz.hideForecasts()):a.isOld||"Мор"==a.routeType||($(".mapMarkerIco").removeClass("selected"),a.jqMarker.find("#mapMarkerIco").addClass("selected"),setIcoForMarker(a,!0),hzdjlcz.hideForecasts(),hzdjlcz.showForecasts(a))})},setIcoForMarker=function(a,c){var d,b="bus.png";for(d in r){var e=r[d].getIco(a.routeType,a.routeNum);e&&(b=e)}a.showExtra=a.lowFloor||a.wifi,a.showExtra?(a.jqMarkerExtra.css("display","table"),a.wifi&&(a.jqMarkerExtra.children().first()[0].src="transportOnline/img/wifi.png"),a.lowFloor&&(a.jqMarkerExtra.children().first()[0].src="transportOnline/img/invalid.png")):a.jqMarkerExtra.css("display","none"),(-1!=n.indexOf(a.id)||config.useGosnumForIVehicles&&-1!=n.indexOf(a.gosnum))&&(b="i_"+b),c&&"Мор"!=a.routeType&&(b="hi_"+b),a.isOld&&(b="old_veh.png","Мор"==a.routeType&&(b="sea_old.png")),config.useSpeed&&0==a.speed&&0==a.animPoints.length&&(b="Мор"==a.routeType?a.isOld?"old_sea_stop.png":"sea_stop.png":"s_"+b),a.lastSetIco&&a.lastSetIco==b||(a.lastSetIco=b,a.jqMarkerIco.css("background-image","url('transportOnline/img/"+b+"')"),a.jqMarkerIco.css("background-repeat","norepeat"))},removeFromMapScreenMarker=function(a){map.removeMarker(a.markerHandle),a.markerHandle=null},updateScreenMarker=function(a){a.selected?a.jqMarker.hasClass("selected")||a.jqMarker.addClass("selected"):a.jqMarker.hasClass("selected")&&a.jqMarker.removeClass("selected"),a.isOld?a.jqMarkerIco.hasClass("isOld")||a.jqMarkerIco.addClass("isOld"):a.jqMarkerIco.hasClass("isOld")&&a.jqMarkerIco.removeClass("isOld"),"Мор"!=a.routeType?a.jqMarkerRouteNum.text(a.routeNum):a.jqMarkerRouteNum.text(""),1==a.routeNum.length&&a.jqMarkerRouteNum.addClass("short"),2==a.routeNum.length&&a.jqMarkerRouteNum.addClass("medium"),2").append(jQuery("#forecastMapMarkerTemplate").clone().css("display","").attr("id",getVehicleForecastId(a.forecast))).html();a.markerHandle=map.addDivMarker(c,{tooltip:a.forecast.stname,lat:a.forecast.lat0,lng:a.forecast.lng0,width:35,height:41,anchorX:18,anchorY:41}),a.jqMarker=jQuery("#"+getVehicleForecastId(a.forecast)),a.jqArrTimeSpan=jQuery("#"+getVehicleForecastId(a.forecast)+" #forecastMapMarkerArrTime"),updateForecastMarker(a),a.jqMarker.click(function(){zpmymzk.showStationForecasts(a.forecast.stationId,a.forecast.stname,a.forecast.stdescr,currentStorageMarker.routeType,a.forecast.lat0,a.forecast.lng0)}),config.no_animation?a.jqMarker.removeClass("hidden"):setTimeout(function(){a.jqMarker.removeClass("hidden")},30)},updateForecastMarker=function(a){var c=Math.round(a.forecast.arrTime/60).toString();a.jqArrTimeSpan.text(c),a.jqArrTimeSpan.removeClass("short"),a.jqArrTimeSpan.removeClass("medium"),a.jqArrTimeSpan.removeClass("wide"),1==c.length&&a.jqArrTimeSpan.addClass("short"),2==c.length&&a.jqArrTimeSpan.addClass("medium"),2=config.showMiddleStationZoomStart&&(a=L.icon({iconUrl:"transportOnline/img/middle_station.png",iconSize:[13,13],iconAnchor:[7,7],popupAnchor:[7,7]}),b=L.icon({iconUrl:"transportOnline/img/tram_middle_station.png",iconSize:[13,13],iconAnchor:[7,7],popupAnchor:[7,7]})),map._map.getZoom()>=config.showBigStationZoomStart&&(a=L.icon({iconUrl:"transportOnline/img/station.png",iconSize:[28,29],iconAnchor:[14,14],popupAnchor:[14,14]}),b=L.icon({iconUrl:"transportOnline/img/tram_station.png",iconSize:[28,29],iconAnchor:[14,14],popupAnchor:[14,14]})),n.length)for(c in n)n[c].setIcon("0"==n[c].station.type?a:b);else for(var d in e)(c=L.marker([e[d].lat,e[d].lng],{zIndexOffset:0,icon:"0"==e[d].type?a:b}).addTo(map._map)).station=e[d],c.on("click",function(a){a=a.target.station,zpmymzk.showStationForecasts(a.id,a.name,a.description,"0"==a.type?"А":"Тр",a.lat,a.lng)}),n.push(c)}}map._map.on("zoomend",r),showStations=function(){r(),f.children().detach();var a=h.filter(function(a){return"0"==a.type}),c=h.filter(function(a){return"1"==a.type});if(0'+a+"
"+c+"
")}SMT.eventObject.call(this);var h,p=jQuery("#buildRoutePanelTemplate").attr("id",""),m=p.find("#route_results");this.showPanel=function(){ukgeodm.showRoutes([]),p.css("height",(jQuery(window).height()-114).toString()+"px"),m.css("height",(jQuery(window).height()-108-78).toString()+"px"),p.css("display","inherit"),h.setInputState(!0),h.clear()},this.hidePanel=function(){p.css("display","none"),h.setInputState(!1),h.clear(),ukgeodm.showRoutes(ffcxdrr.allRoutes)};function u(a,c,d,e){var b=map._map,f=new L.FeatureGroup([]),h=new L.FeatureGroup([]),g=!1,k=!1,l=!0;b.on("click",function(a){l&&(g?n(a.latlng,!0):m(a.latlng,!0))});var m=function(a,c){a?(g?g.setLatLng(a):((g=new L.marker(a,{draggable:!0,icon:new L.AwesomeMarkers.icon({icon:"flag",color:"red",textClass:"routeIconA",text:"А"})})).bindPopup("Старт"),g.on("dragend",function(){e(g,k)}),h.addLayer(g),b.addLayer(h)),c&&e(g,k)):g=!1},n=function(a,c){a?(k?k.setLatLng(a):((k=new L.marker(a,{draggable:!0,icon:new L.AwesomeMarkers.icon({icon:"flag",color:"blue",textClass:"routeIconB",text:"Б"})})).bindPopup("Стоп"),k.on("dragend",function(){e(g,k)}),h.addLayer(k),b.addLayer(h)),c&&e(g,k)):k=!1};return{setInputState:function(a){a&&f.clearLayers(),l=a},clear:function(){f.clearLayers(),h.clearLayers(),k=g=!1},drawRoute:function(a,c){f.clearLayers(),c&&b.fitBounds(c),_.each(a.steps,function(a,c){if(0!=c){var d={};d.icon=a.walk?new L.AwesomeMarkers.icon({icon:"heart",color:"purple"}):new L.AwesomeMarkers.icon({icon:"random",color:"purple"}),d=new L.marker(a.start.location,d),a.start.name&&d.bindPopup(a.start.name,{showOnMouseOver:!0}),f.addLayer(d)}d={weight:3,opacity:.7},a.walk?(d.color="green",d.dashArray=[5,5]):d.color="#D152B8",d=new L.polyline(a.polyline.points,d).addTo(b),f.addLayer(d)}),_.first(a.steps);var d=_.last(a.steps);d.end.name&&k.bindPopup(d.end.name,{showOnMouseOver:!0}),b.addLayer(f)},setStartMarker:m,setEndMarker:n}}var g,n={},r=new function(a){return{render:function(a,c,d){!function(b,c){$.ajax({url:"transportOnline/templates/"+b,success:function(a){c(!1,a)},error:function(a,b,d){c(d)}})}(a,function(a,b){if(a)d(a);else{var e=Handlebars.compile(b);d(!1,e(c))}})}}}("transportOnline/templates/");!function(){function a(){var a={from:$("#route_from").data("latlng"),to:$("#route_to").data("latlng"),param:{}};return $(".route_filter_option").each(function(){$(this).is(":checked")&&(a.param[$(this).val()]=1)}),a}$(window).height(),g=L.esri.Geocoding.Services.geocoding(),(h=new u("map",[54.61667,39.71667],15,function(b,d){if(b){var e=b.getLatLng();$("#route_from").data("latlng",e.lat+","+e.lng),$("#route_from").val(e.lat+","+e.lng),g.reverse().latlng(e).run(function(a,b){a||$("#route_from").val(b.address.Address)})}else $("#route_from").data("latlng",""),$("#route_from").val("");d?(e=d.getLatLng(),$("#route_to").data("latlng",e.lat+","+e.lng),$("#route_to").val(e.lat+","+e.lng),g.reverse().latlng(e).run(function(a,b){a||$("#route_to").val(b.address.Address)})):($("#route_to").data("latlng",""),$("#route_to").val("")),c(e=a())})).setInputState(!1),$(".route_place_input").change(function(){c(a())}),$(".route_filter_option").click(function(){c(a())}),$("#new_route").click(function(){c({})}),$("#swap_points").click(function(){var b=a(),d=b.from;b.from=b.to,b.to=d,c(b)})}()}$(document).ready(function(){}),version="2.0.28",SMT={},window.console||(window.console={}),window.console.log||(window.console.log=function(){}),SMT.eventObject=function(){var a=this,c=!1,f=!1;this.Events={},this.set=function(d,c){a.hasOwnProperty(d)&&(a[d]=c,a.raiseEvent("onchanged"))},this.get=function(d){return a.hasOwnProperty(d)?a[d]:null},this.toggle=function(d){if(!a.hasOwnProperty(d))return null;a[d]=!a[d],a.raiseEvent("onchanged")},this.addHandler=function(a,c){this.Events[a]||(this.Events[a]=[]),this.Events[a].push(c)},this.removeHandler=function(a,c){for(var d=this.Events[a],f=[];0OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox',id:"examples.map-i86knfo3"}).addTo(c._map)},this.addPopupCloseHandler=function(a){c._map.on("popupclose",a)},this.addTileLayer=function(a){return(a=L.tileLayer(a,{})).addTo(c._map),a},this.removeTileLayer=function(a){c._map.removeLayer(a)},this.addPopup=function(a,d,e){return popup=L.popup({maxWidth:700,minWidth:455,maxHeight:400,closeButton:!1,className:"",autoPanPaddingTopLeft:[400,25]}),popup.setContent(a),popup.setLatLng(L.latLng(d,e)),popup.openOn(c._map),popup.update(),popup},this.addPolyline=function(a,d){return a=jQuery.map(a,function(a,c){return L.latLng(a.lat,a.lng)}),L.polyline(a,{color:d||"red",opacity:1}).addTo(c._map)},this.removePolyline=function(a){c._map.removeLayer(a)},this.addMarker=function(a){return a=a||{},L.marker([a.lat,a.lng]).addTo(c._map)};var mym=L.Marker.extend({update:function(){var b=this._latlng,lat1=b.lat/(1*(b.lat,1)),lng1=b.lng/(1*(b.lng,1)),rlat=lat1*Math.cos(-0)+lng1*Math.sin(-0),rlng=lng1*Math.cos(-0)-lat1*Math.sin(-0);L.latLng((0+rlat)/1e6,(0+rlng)/1e6);return this._icon&&this._setPos(this._map.latLngToLayerPoint(b).round()),this}});this.addDivMarker=function(a,d){return new mym([(d=d||{}).lat,d.lng],{zIndexOffset:1,title:d.tooltip,icon:L.divIcon({html:a,className:"",iconSize:[d.width,d.height],iconAnchor:[d.anchorX,d.anchorY]})}).addTo(c._map)},this.getMarkerLatLng=function(a){return{lat:a.getLatLng().lat,lng:a.getLatLng().lng}},this.setMarkerLatLng=function(a,b){var lat1=(b=b||{}).lat/(1*(b.lat,1)),lng1=b.lng/(1*(b.lng,1));Math.cos(-0),Math.sin(-0),Math.cos(-0),Math.sin(-0);a.setLatLng([b.lat,b.lng])},this.setMarkerOpacity=function(a,c){a.setOpacity(c)},this.removeMarker=function(a){c._map.removeLayer(a)},this.addHandler=function(a,d){c._map.on(a,d)},this.getBounds=function(){return{northWest:c._map.getBounds().getNorthWest(),southEast:c._map.getBounds().getSouthEast()}},this.project=function(a){return{x:(a=c._map.project(L.latLng(a.lat,a.lng))).x,y:a.y}},this.unproject=function(a){return c._map.project(L.point(a.x,a.y)),{lat:markerHandle.getLatLng().lat,lng:markerHandle.getLatLng().lng}}},RouteTypePngRule=function(a,c,f){this.routeType=a,this.routeNum=c,this.icoName=f,this.getIco=function(a,c){return"*"!=this.routeType&&this.routeType!=a||"*"!=this.routeNum&&this.routeNum!=c?null:f}},RouteTypeLineColorRule=function(a,c,f){this.routeType=a,this.routeNum=c,this.color=f,this.getColor=function(a,c){return"*"!=this.routeType&&this.routeType!=a||"*"!=this.routeNum&&this.routeNum!=c?null:f}},hhrjosj=null,isnvyse=null,rzyoyrm=null,tdhreuu=null,ffcxdrr=null,ukgeodm=null,vehiclesOnRoutesCount={},hzdjlcz=null,zpmymzk=null,aufnonu=null,buildRoutePanelWorks=null;