{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_custom_roberts/cartridge/client/default/js/experience/components/storeLocator/storelocator.js","webpack:///./cartridges/app_custom_roberts/cartridge/client/default/js/storelocator.js","webpack:///./cartridges/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js"],"names":["elementMap","document","getElementById","icons","JSON","parse","getAttribute","MAX_DISTANCE","parseFloat","markers","currentPositionClient","directionsService","directionsDisplay","markerClustered","storAux","initMap","minerva","lat","lng","map","google","maps","Map","zoom","center","storesArray","storesArrayAux","handleClickUserLocation","userLocationButton","addEventListener","updateStoresAux","createDetails","initAutocomplete","DirectionsService","DirectionsRenderer","createMarkers","stores","forEach","store","storeLat","latitude","storeLng","longitude","storeName","name","svgMarker","marker","Marker","position","title","icon","storeMarker","animaition","Animation","BOUNCE","animating","detailItem","id","addListener","click","metadata","push","centerMap","bounds","LatLngBounds","extend","getPosition","fitBounds","scopeModalUrl","dataUrl","details","getElementsByClassName","detailsArray","Array","from","detail","storeId","find","higthLightMarker","fetch","response","json","detailsJson","addDetails","isClick","setFilters","userLocationIcon","success","coords","src","userLocation","error","e","userLocationDisabled","alert","navigator","geolocation","getCurrentPosition","createRoute","origin","destination","route","LatLng","travelMode","TravelMode","DRIVING","status","DirectionsStatus","OK","setDirections","detailImage","detailImageDefault","detailsName","detailsAddress","detailsPhone","detailsHours","detailsEmail","goToMaps","closeButton","popup","image","style","display","innerHTML","address","city","state","postalCode","phone","email","preventDefault","copyToClipboard","hours","addOpenOrCloseStore","disabled","href","text","container","clipboard","writeText","currentDay","Date","schedule","querySelector","toLocaleDateString","weekday","toLowerCase","openHours","openMin","closeHours","closeMin","openTime","getFullYear","getMonth","getDate","closeTime","isOpen","storesAux","input","options","componentRestrictions","country","types","autocomplete","places","Autocomplete","place","getPlace","geometry","location","clear","value","storeWDistance","distance","calDistance","toFixed","filterStores","filter","sort","a","b","updateStores","updateList","list","li","createElement","appendChild","toggleAnimationHover","getAnimation","setAnimation","removeAllMarkers","setMap","allStore","length","clearMarkers","MarkerClusterer","cssClass","styles","url","clusterMarker","height","width","textColor","textSize","setZoom","setCenter","module","exports","processInclude","require","storeLocator","$","ready","include","Object","keys","key"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;+CCjFA,oJ;;;;;;AADA,IAAMA,UAAU,GAAGC,QAAQ,CAACC,cAAT,CAAwB,KAAxB,CAAnB;AACA,IAAMC,KAAK,GAAGC,IAAI,CAACC,KAAL,CAAWL,UAAU,CAACM,YAAX,CAAwB,OAAxB,CAAX,CAAd;AACA,IAAIC,YAAY,GAAGC,UAAU,CAACR,UAAU,CAACM,YAAX,CAAwB,cAAxB,CAAD,CAA7B,C,CAAwE;;AAExE,IAAIG,OAAO,GAAG,EAAd;AACA,IAAIC,qBAAqB,GAAG,EAA5B;AACA,IAAIC,iBAAJ;AACA,IAAIC,iBAAJ;AACA,IAAIC,eAAJ;AACA,IAAIC,OAAO,GAAG,EAAd;;AACA,SAASC,OAAT,GAAmB;EACf,IAAMC,OAAO,GAAG;IAAEC,GAAG,EAAE,iBAAP;IAA0BC,GAAG,EAAE,CAAC;EAAhC,CAAhB;EACA,IAA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,CAFD,MAEO,IAAI,QAAOA,OAAP,MAAmB,QAAvB,EAAiC;IACpCC,MAAM,CAACC,IAAP,CAAYF,OAAZ,EAAqBhL,OAArB,CAA6B,UAAUmL,GAAV,EAAe;MACxC,IAAI,OAAOH,OAAO,CAACG,GAAD,CAAd,KAAwB,UAA5B,EAAwC;QACpCH,OAAO,CAACG,GAAD,CAAP;MACH;IACJ,CAJD;EAKH;AACJ,CAVD,C","file":"default/js/storelocator.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./cartridges/app_custom_roberts/cartridge/client/default/js/storelocator.js\");\n","const elementMap = document.getElementById(\"map\");\nconst icons = JSON.parse(elementMap.getAttribute(\"icons\"));\nlet MAX_DISTANCE = parseFloat(elementMap.getAttribute(\"max-distance\")); //km\n\nlet markers = [];\nlet currentPositionClient = {};\nlet directionsService;\nlet directionsDisplay;\nlet markerClustered;\nlet storAux = [];\nfunction initMap() {\n const minerva = { lat: 20.67645435642226, lng: -103.38935752238434 };\n const map = new google.maps.Map(elementMap, {\n zoom: 4,\n center: minerva,\n });\n\n // const stores = document.getElementsByClassName(\"storelocator-store\");\n // const storesArray = parseArrayObjects(Array.from(stores));\n const storesArray = JSON.parse(\n document.getElementById(\"listing\").getAttribute(\"stores\")\n );\n storAux = storesArray;\n const storesArrayAux = JSON.parse(\n document.getElementById(\"listing\").getAttribute(\"storesAux\")\n );\n\n handleClickUserLocation(map, storesArray);\n const userLocationButton = document.getElementById(\"userLocationButton\");\n\n userLocationButton.addEventListener(\"click\", () =>\n handleClickUserLocation(map, storesArray, true)\n );\n // console.log(storesArray);\n\n updateStoresAux(map, storesArrayAux, storesArray);\n createDetails(map);\n initAutocomplete(map, storesArray, storesArrayAux);\n\n directionsService = new google.maps.DirectionsService();\n directionsDisplay = new google.maps.DirectionsRenderer({\n map: map,\n });\n}\n\nfunction createMarkers(map, stores) {\n const markers = [];\n stores.forEach((store) => {\n const storeLat = store.latitude;\n const storeLng = store.longitude;\n const storeName = store.name;\n const svgMarker = document\n .getElementById(\"map\")\n .getAttribute(\"marker-style\");\n\n const marker = new google.maps.Marker({\n position: { lat: parseFloat(storeLat), lng: parseFloat(storeLng) },\n map: map,\n title: storeName,\n icon: icons.storeMarker,\n });\n\n marker.animaition = google.maps.Animation.BOUNCE;\n marker.animating = false;\n\n const detailItem = document.getElementById(`store-${store.id}`);\n marker.addListener(\"click\", () => detailItem.click());\n marker.metadata = { id: store.id };\n markers.push(marker);\n });\n return markers;\n}\n\nfunction centerMap(map) {\n const bounds = new google.maps.LatLngBounds();\n markers.forEach((marker) => {\n bounds.extend(marker.getPosition());\n });\n map.fitBounds(bounds);\n}\n\nfunction createDetails(map) {\n // console.log(\"createDetails\");\n const scopeModalUrl = document.getElementById(\"urlStoreDetails\");\n const dataUrl = scopeModalUrl.getAttribute(\"data-url\");\n const details = document.getElementsByClassName(\"storelocator-store\");\n const detailsArray = Array.from(details);\n\n detailsArray.forEach((detail) => {\n detail.addEventListener(\"click\", async () => {\n let storeId = detail.getAttribute(\"target\");\n\n const marker = markers.find(\n ({ metadata }) => metadata.id === `${storeId}`\n );\n higthLightMarker(map, marker);\n // console.log(marker);\n const response = await fetch(`${dataUrl}?storeID=${storeId}`);\n const detailsJson = await response.json();\n if (detailsJson.store) {\n addDetails(detailsJson.store);\n }\n });\n });\n}\n\nfunction handleClickUserLocation(map, stores, isClick = false) {\n if (currentPositionClient.lat && currentPositionClient.lng) {\n setFilters(map, stores, currentPositionClient);\n } else {\n const userLocationIcon = document.getElementById(\"userLocationIcon\");\n const success = ({ coords }) => {\n userLocationIcon.src = icons.userLocation;\n // console.log(e);\n currentPositionClient = {\n lat: coords.latitude,\n lng: coords.longitude,\n };\n };\n const error = (e) => {\n userLocationIcon.src = icons.userLocationDisabled;\n if (isClick) {\n alert(\n userLocationIcon.getAttribute(\"location-disable-message\")\n );\n }\n };\n\n navigator.geolocation.getCurrentPosition(success, error);\n }\n}\n\nfunction createRoute(origin, destination) {\n directionsService.route(\n {\n origin: new google.maps.LatLng(origin.lat, origin.lng),\n destination: new google.maps.LatLng(\n destination.lat,\n destination.lng\n ),\n travelMode: google.maps.TravelMode.DRIVING,\n },\n function (response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n directionsDisplay.setDirections(response);\n }\n }\n );\n}\n\nfunction addDetails(detail) {\n const detailImage = document.getElementById(\"details-image\");\n const detailImageDefault = document.getElementById(\"details-image-default\");\n const detailsName = document.getElementById(\"details-name\");\n const detailsAddress = document.getElementById(\"details-address\");\n const detailsPhone = document.getElementById(\"details-phone\");\n const detailsHours = document.getElementById(\"details-hours\");\n const detailsEmail = document.getElementById(\"details-email\");\n const route = document.getElementById(\"route\");\n const goToMaps = document.getElementById(\"go-to-maps\");\n const closeButton = document.getElementById(\"close-modal-st\");\n const popup = document.getElementById(\"myPopup\");\n\n if (detail.image) {\n detailImage.src = detail.image;\n detailImageDefault.style.display = \"none\";\n } else {\n detailImage.src = \"null\";\n detailImageDefault.style.display = \"block\";\n }\n\n detailsName.innerHTML = detail.name;\n detailsAddress.innerHTML = `${detail.address},\n ${detail.city}, ${detail.state}
\n ${detail.postalCode}`;\n // detailsPhone.innerHTML = detail.phone;\n detailsPhone.innerHTML = `${detail.phone}`;\n detailsEmail.innerHTML = `${detail.email}`;\n detailsEmail.addEventListener(\"click\", (e) => {\n e.preventDefault();\n copyToClipboard(detail.email, detailsEmail);\n });\n detailsHours.innerHTML = detail.hours;\n if (detail.hours) {\n addOpenOrCloseStore(\n detailsHours\n //\n );\n }\n\n if (!currentPositionClient.lat && !currentPositionClient.lng) {\n route.disabled = true;\n goToMaps.href = `https://www.google.com/maps/search/?api=1&query=${detail.latitude}%2C${detail.longitude}`;\n } else {\n route.disabled = false;\n route.addEventListener(\"click\", () => {\n createRoute(currentPositionClient, {\n lat: detail.latitude,\n lng: detail.longitude,\n });\n closeButton.click();\n });\n\n goToMaps.href = `https://www.google.com/maps/dir/?api=1&origin=${currentPositionClient.lat},${currentPositionClient.lng}&destination=${detail.latitude},${detail.longitude}`;\n }\n}\n\nfunction copyToClipboard(text, container = null) {\n navigator.clipboard.writeText(text);\n if (container) {\n container.innerHTML = `${text} copied `;\n }\n}\n\nfunction addOpenOrCloseStore(detailsHours) {\n const currentDay = new Date();\n const schedule = document.querySelector(\n `#details-hours [day=\"${currentDay\n .toLocaleDateString(\"en\", {\n weekday: \"short\",\n })\n .toLowerCase()}\"]`\n );\n const openHours = schedule.getAttribute(\"openhours\");\n const openMin = schedule.getAttribute(\"openmin\");\n const closeHours = schedule.getAttribute(\"closehours\");\n const closeMin = schedule.getAttribute(\"closemin\");\n\n const openTime = new Date(\n currentDay.getFullYear(),\n currentDay.getMonth(),\n currentDay.getDate(),\n openHours,\n openMin\n );\n const closeTime = new Date(\n currentDay.getFullYear(),\n currentDay.getMonth(),\n currentDay.getDate(),\n closeHours,\n closeMin\n );\n\n const isOpen = currentDay > openTime && currentDay < closeTime;\n schedule.innerHTML += ` ${\n isOpen\n ? detailsHours.getAttribute(\"open-label\")\n : detailsHours.getAttribute(\"close-label\")\n }`;\n}\n\nfunction initAutocomplete(map, stores,storesAux) {\n const input = document.getElementById(\"storelocator-search\");\n const options = {\n componentRestrictions: { country: \"MX\" },\n types: [\"geocode\"],\n };\n const autocomplete = new google.maps.places.Autocomplete(input, options);\n autocomplete.addListener(\"place_changed\", () => {\n const place = autocomplete.getPlace();\n const lat = place.geometry.location.lat();\n const lng = place.geometry.location.lng();\n currentPositionClient = { lat, lng };\n\n // const storeWDistance = stores.map((store) => ({\n // ...store,\n // distance: calDistance(store.latitude, store.longitude, lat, lng).toFixed(\n // 2\n // ),\n // }));\n\n // const filterStores = storeWDistance\n // .filter(({ distance }) => distance < MAX_DISTANCE)\n // .sort((a, b) => a.distance - b.distance);\n\n // updateStores(map, filterStores, true);\n\n setFilters(map, stores, { lat, lng });\n });\n\n const clear = document.getElementById(\"clearInputStoreLocator\");\n clear.addEventListener(\"click\", () => {\n input.value = \"\";\n updateStoresAux(map, storesAux, stores);\n });\n}\n\nfunction setFilters(map, stores, { lat, lng }) {\n const storeWDistance = stores.map((store) => ({\n ...store,\n distance: calDistance(\n store.latitude,\n store.longitude,\n lat,\n lng\n ).toFixed(2),\n }));\n\n const filterStores = storeWDistance\n .filter(({ distance }) => distance < MAX_DISTANCE)\n .sort((a, b) => {\n if (a.state < b.state) return -1;\n });\n\n updateStores(map, filterStores, true);\n}\n\nfunction updateList(stores) {\n // console.log(stores);\n const list = document.getElementById(\"listing\");\n list.innerHTML = \"\";\n // stores.map(item => console.log(item));\n stores.sort((a, b) => {\n if (a.state < b.state) return -1;\n });\n stores.forEach((store) => {\n const li = document.createElement(\"li\");\n li.innerHTML = `
  • \n ${store.name}\n
    \n
    \n \"\"\n
    \n
    \n ${store.address},\n ${\n store.postalCode\n }\n
    \n\n
    \n\n
    \n
    \n \"\"\n
    \n
    \n ${store.phone}\n
    \n
    \n\n ${\n store.distance\n ? `
    \n
    \n
    \n
    \n ${store.distance} KM\n
    \n
    `\n : \"\"\n }\n
  • `;\n list.appendChild(li);\n });\n}\n\nfunction toggleAnimationHover(id) {\n const marker = markers.find(({ metadata }) => metadata.id === id);\n marker.getAnimation()\n ? marker.setAnimation(null)\n : marker.setAnimation(google.maps.Animation.BOUNCE);\n}\n\nfunction removeAllMarkers() {\n markers.forEach((marker) => {\n marker.setMap(null);\n });\n}\nfunction updateStoresAux(map, stores, allStore) {\n updateList(stores);\n createDetails(map);\n removeAllMarkers();\n if (stores.length > 0) {\n markers = createMarkers(map, allStore);\n centerMap(map);\n }\n if (markerClustered) {\n markerClustered.clearMarkers();\n markerClustered.setMap(null);\n }\n\n new MarkerClusterer(map, markers, {\n cssClass: \"custom-pin\",\n styles: [\n {\n url: icons.clusterMarker,\n height: 150 / 3,\n width: 126 / 3,\n textColor: \"black\",\n textSize: 15,\n },\n ],\n });\n}\nfunction updateStores(map, stores) {\n updateList(stores);\n createDetails(map);\n removeAllMarkers();\n if (stores.length > 0) {\n markers = createMarkers(map, stores);\n centerMap(map);\n }\n if (markerClustered) {\n markerClustered.clearMarkers();\n markerClustered.setMap(null);\n }\n\n new MarkerClusterer(map, markers, {\n cssClass: \"custom-pin\",\n styles: [\n {\n url: icons.clusterMarker,\n height: 150 / 3,\n width: 126 / 3,\n textColor: \"black\",\n textSize: 15,\n },\n ],\n });\n}\n\nfunction higthLightMarker(map, marker) {\n map.setZoom(15);\n map.setCenter(marker.getPosition());\n}\n\nmodule.exports = {\n initMap: initMap,\n createMarkers: createMarkers,\n centerMap: centerMap,\n createDetails: createDetails,\n handleClickUserLocation: handleClickUserLocation,\n createRoute: createRoute,\n addDetails: addDetails,\n copyToClipboard: copyToClipboard,\n addOpenOrCloseStore: addOpenOrCloseStore,\n initAutocomplete: initAutocomplete,\n setFilters: setFilters,\n updateList: updateList,\n toggleAnimationHover: toggleAnimationHover,\n removeAllMarkers: removeAllMarkers,\n updateStoresAux: updateStoresAux,\n updateStores: updateStores,\n higthLightMarker: higthLightMarker\n};\n","const processInclude = require(\"base/js/util\");\nconst storeLocator = require(\"./experience/components/storeLocator/storelocator\");\n\n$(document).ready(() => {\n processInclude(storeLocator);\n});","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n"],"sourceRoot":""}