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DG,EAAAA,WAAW,EAAE,UAFZ;AAGDF,EAAAA,OAAO,EAAE,CACR;AAAEG,IAAAA,GAAG,EAAE;AAAP,GADQ,EAER;AAAEF,IAAAA,UAAU,EAAE;AAAd,GAFQ;AAHR,CANsB,EAatB;AACDF,EAAAA,WAAW,EAAE,cADZ;AAEDG,EAAAA,WAAW,EAAE,QAFZ;AAGDF,EAAAA,OAAO,EAAE,CACR;AAAEI,IAAAA,UAAU,EAAE;AAAd,GADQ;AAHR,CAbsB,CAAlB;AAqBA,MAAMC,MAAM,GAAG,kDAAf;AACA,MAAMC,WAAW,GAAG,UAApB","sources":["webpack://freightliner/./scripts/components/dealerMap.js","webpack://freightliner/./scripts/constants.js"],"sourcesContent":["\r\nimport { googleMapsKey, mapStyles } from '../constants';\r\n\r\nexport default async dealerMap => { // 'comp-dealer > [map]'\r\n\tconst \t{default: MapsLoader} = await import('load-google-maps-api'),\r\n\t\t\tMaps = await MapsLoader({\r\n\t\t\t\tv: '3.30',\r\n\t\t\t\tkey: googleMapsKey,\r\n\t\t\t\tlibraries: ['places']\r\n\t\t\t}),\r\n\t\t\tgeo = new Maps.Geocoder();\r\n\tlet addr = dealerMap.getAttribute('map'),\r\n\t\tmarker;\t\t\t\t\r\n\tgeo.geocode( { 'address': addr}, (results, status) => {\r\n\t\tif (status == Maps.GeocoderStatus.OK) {\r\n\t\t\tmarker = new Maps.Marker({\r\n\t\t\t\tposition:results[0].geometry.location,\r\n\t\t\t\tanimation: Maps.Animation.DROP,\r\n\t\t\t\tdraggable: false,\r\n\t\t\t\tclickable: false,\r\n\t\t\t\tmap: new Maps.Map(dealerMap, Object.assign({\r\n\t\t\t\t\tcenter: results[0].geometry.location\r\n\t\t\t\t},{ \r\n\t\t\t\t\tzoom: 8,\r\n\t\t\t\t\t// mapTypeControl: false,\r\n\t\t\t\t\t// streetViewControl: false,\r\n\t\t\t\t\tscrollwheel: false,\r\n\t\t\t\t\tdraggable: false,\r\n\t\t\t\t\tdisableDefaultUI: true,\r\n\t\t\t\t\tdisableDoubleClickZoom: true,\r\n\t\t\t\t\tstyles: mapStyles\r\n\t\t\t\t})),\r\n\t\t\t\ticon: {\r\n\t\t\t\t\turl: '/images/map-pin.png',\r\n\t\t\t\t\tsize: new Maps.Size(42, 68),\r\n\t\t\t\t\torigin: new Maps.Point(0, 0),\r\n\t\t\t\t\tanchor: new Maps.Point(21, 68),\r\n\t\t\t\t\tscaledSize: new Maps.Size(42, 68)\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconsole.info(\"Geocode was not successful for the following reason: \" + status);\r\n\t\t}\r\n\t});\r\n};","export const iOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false );\r\nexport const rootURL = window.location.hostname.indexOf('tombrasweb.com') !== -1 ? 'https://freightlinertrucks-dev.azurewebsites.net/umbraco/api' : '/umbraco/api';\r\nexport const mapURL = iOS ? 'http://maps.apple.com/?daddr=' : 'https://www.google.com/maps/?q=';\r\nexport const googleMapsKey = 'AIzaSyDYwYS7gcKir2F8RwxwnmagvKBcCtfPRp4';\r\nexport const mapStyles = [\r\n\t{\r\n\t\tfeatureType: \"all\",\r\n\t\tstylers: [\r\n\t\t\t{ saturation: -80 }\r\n\t\t]\r\n\t},{\r\n\t\tfeatureType: \"road.arterial\",\r\n\t\telementType: \"geometry\",\r\n\t\tstylers: [\r\n\t\t\t{ hue: \"#00ffee\" },\r\n\t\t\t{ saturation: 50 }\r\n\t\t]\r\n\t},{\r\n\t\tfeatureType: \"poi.business\",\r\n\t\telementType: \"labels\",\r\n\t\tstylers: [\r\n\t\t\t{ visibility: \"off\" }\r\n\t\t]\r\n\t}\r\n];\r\nexport const jwpKey = 'TtV5iMjD1ORmFr/yZP1lV7lbxWn69lBGpwxo9Pz2IV13Jkn4';\r\nexport const jwpPlayerId = 'sHGOoMEW';"],"names":["googleMapsKey","mapStyles","dealerMap","default","MapsLoader","Maps","v","key","libraries","geo","Geocoder","addr","getAttribute","marker","geocode","results","status","GeocoderStatus","OK","Marker","position","geometry","location","animation","Animation","DROP","draggable","clickable","map","Map","Object","assign","center","zoom","scrollwheel","disableDefaultUI","disableDoubleClickZoom","styles","icon","url","size","Size","origin","Point","anchor","scaledSize","console","info","iOS","navigator","userAgent","match","rootURL","window","hostname","indexOf","mapURL","featureType","stylers","saturation","elementType","hue","visibility","jwpKey","jwpPlayerId"],"sourceRoot":""}