PageSourceSearch

https://foxtrailmemorycare.com/wp-content/plugins/wp-store-locator/js/wpsl-gmap.min.js

js foxtrailmemorycare.com collected 2026-09-29 21:55:25 UTC 34,790 bytes, 1 lines download raw bytes

1var wpsl = wpsl || {}; function wpslBorlabsCallback() { var e; e = setInterval(function () { "object" == typeof google && "object" == typeof google.maps && (clearInterval(e), initWpsl()) }, 500) } function wpslCallback() { jQuery(document).ready(function (e) { initWpsl() }) } function initWpsl() { loadWpslFiles(function () { if (jQuery(".wpsl-gmap-canvas").each(function (e) { var t = jQuery(this).attr("id"); wpsl.gmaps.init(t, e) }), "object" == typeof wpslAddons) for (const e in wpslAddons) wpslAddons.hasOwnProperty(e) && wpslAddons[e].init() }) } function loadWpslFiles(e) { "object" == typeof wpslSettings.infoBox && "infobox" == wpslSettings.infoWindowStyle ? jQuery.getScript(wpslSettings.url + "js/infobox.min.js").done(function () { e() }) : e() } wpsl.gmaps = {}, jQuery(document).ready(function (e) { var t, s, o, n, l, r, a, p, c, d, w = [], u = [], g = [], m = {}, f = {}, h = {}, v = !1, S = !1, y = "undefined" != typeof wpslSettings ? wpslSettings.autoLoad : "", b = {}, C = { enabled: void 0 !== wpslSettings.collectStatistics, addressComponents: "" }; function L() { var e, t, s = {}; return "object" == typeof wpslSettings.infoBox && "infobox" == wpslSettings.infoWindowStyle ? (e = wpslSettings.infoBox.clearance.split(","), t = wpslSettings.infoBox.pixelOffset.split(","), s = { alignBottom: !0, boxClass: wpslSettings.infoBox.class, closeBoxMargin: wpslSettings.infoBox.margin, closeBoxURL: wpslSettings.infoBox.url, content: "", disableAutoPan: !!Number(wpslSettings.infoBox.disableAutoPan), enableEventPropagation: !!Number(wpslSettings.infoBox.enableEventPropagation), infoBoxClearance: new google.maps.Size(Number(e[0]), Number(e[1])), pixelOffset: new google.maps.Size(Number(t[0]), Number(t[1])), zIndex: Number(wpslSettings.infoBox.zIndex) }, a = new InfoBox(s)) : a = new google.maps.InfoWindow, a } function k(e, t) { q(e, 0, "", !0, t), W(e, v, y, t) } function x() { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) } function I(t, s) { if (navigator.geolocation) { var o, n, l = Number(wpslSettings.geoLocationTimeout); o = setInterval(function () { e(".wpsl-icon-direction").toggleClass("wpsl-active-icon") }, 600), n = setTimeout(function () { R(o), k(t, s) }, l), navigator.geolocation.getCurrentPosition(function (l) { R(o), clearTimeout(n), J(), M(t, l, v, s), e(".wpsl-search").addClass("wpsl-geolocation-run") }, function (o) { if (e(".wpsl-icon-direction").hasClass("wpsl-user-activated") && !e(".wpsl-search").hasClass("wpsl-geolocation-run")) { switch (o.code) { case o.PERMISSION_DENIED: alert(wpslGeolocationErrors.denied); break; case o.POSITION_UNAVAILABLE: alert(wpslGeolocationErrors.unavailable); break; case o.TIMEOUT: alert(wpslGeolocationErrors.timeout); break; default: alert(wpslGeolocationErrors.generalError) }e(".wpsl-icon-direction").removeClass("wpsl-active-icon") } else e(".wpsl-search").hasClass("wpsl-geolocation-run") || (clearTimeout(n), k(t, s)) }, { maximumAge: 6e4, timeout: l, enableHighAccuracy: !0 }) } else alert(wpslGeolocationErrors.unavailable), k(t, s) } function R(t) { clearInterval(t), e(".wpsl-icon-direction").removeClass("wpsl-active-icon") } function M(e, t, o, n) { if (void 0 === t) k(e, n); else { var l = new google.maps.LatLng(t.coords.latitude, t.coords.longitude); b = { position: t, newRequest: !0 }, s.setCenter(l), q(l, 0, "", !0, n), W(l, o, y, n) } } function E() { void 0 !== w[0] && w[0].close() } function N(t, o) { e(".wpsl-icon-reset, #wpsl-reset-map").on("click", function () { e(this).hasClass("wpsl-in-progress") || (1 == wpslSettings.autoLoad && (y = 1), s.getCenter().lat() === h.centerLatlng.lat() && s.getCenter().lng() === h.centerLatlng.lng() && s.getZoom() === h.zoomLevel || (J(), e("#wpsl-search-input").val("").removeClass(), e(".wpsl-icon-reset").addClass("wpsl-in-progress"), p && p.clearMarkers(), E(), O(), function () { var t, s, o, n, l, i, r, a, p = e("#wpsl-wrap").hasClass("wpsl-default-filters"), c = [wpslSettings.searchRadius + " " + wpslSettings.distanceUnit, wpslSettings.maxResults], d = ["wpsl-radius", "wpsl-results"]; for (t = 0, s = d.length; t < s; t++)e("#" + d[t] + " select").val(parseInt(c[t])), e("#" + d[t] + " li").removeClass(), "wpsl-radius" == d[t] ? o = wpslSettings.searchRadius : "wpsl-results" == d[t] && (o = wpslSettings.maxResults), e("#" + d[t] + " li").each(function () { e(this).text() === c[t] && (e(this).addClass("wpsl-selected-dropdown"), e("#" + d[t] + " .wpsl-selected-item").html(c[t]).attr("data-value", o)) }); e("#wpsl-category").length && (e("#wpsl-category select").val(0), e("#wpsl-category li").removeClass(), e("#wpsl-category li:first-child").addClass("wpsl-selected-dropdown"), n = e("#wpsl-category li:first-child").text(), e("#wpsl-category .wpsl-selected-item").html(n).attr("data-value", 0)); e(".wpsl-custom-dropdown").length > 0 && e(".wpsl-custom-dropdown").each(function (t) { p ? e(this).find("option").removeAttr("selected") : (l = e(this).siblings("div"), i = l.find("li:first-child"), r = i.text(), a = i.attr("data-value"), l.find("li").removeClass(), l.prev().html(r).attr("data-value", a)) }) }(), 1 == wpslSettings.autoLocate ? M(t, b.position, !0, o) : k(t, o)), e("#wpsl-stores").show(), e("#wpsl-direction-detail
1s").hide()) }) } function O() { void 0 !== c && "" !== c && (c.setMap(null), c = "") } function P(t) { var o, n, l, i, r; for (E(), r = t.parents("li").length > 0 ? t.parents("li").data("store-id") : t.parents(".wpsl-info-window").data("store-id"), void 0 !== c && "" !== c && (n = c.getPosition()), f = { centerLatlng: s.getCenter(), zoomLevel: s.getZoom() }, o = 0, i = u.length; o < i; o++)0 != u[o].storeId || void 0 !== n && "" !== n ? u[o].storeId == r && (l = u[o].getPosition()) : n = u[o].getPosition(); if (n && l) { const t = { storeId: r, start: n, end: l }; e("#wpsl-direction-details ul").empty(), e(".wpsl-direction-before, .wpsl-direction-after").remove(), oe.calcRoute(t) } else alert(wpslLabels.generalError) } function z(e, t) { var s, o, n; for (s = 0, o = u.length; s < o; s++)u[s].storeId == e && (n = u[s], "start" == t ? n.setAnimation(google.maps.Animation.BOUNCE) : n.setAnimation(null)) } function T(s) { var o = {}; void 0 === wpslSettings.geocodeComponents || e.isEmptyObject(wpslSettings.geocodeComponents) ? o.address = e("#wpsl-search-input").val() : (o.componentRestrictions = wpslSettings.geocodeComponents, void 0 !== o.componentRestrictions.postalCode ? o.componentRestrictions.postalCode = e("#wpsl-search-input").val() : o.address = e("#wpsl-search-input").val()), t.geocode(o, function (e, t) { t == google.maps.GeocoderStatus.OK ? (C.enabled && B(e), U(e[0].geometry.location, s)) : X(t) }) } function U(e, t) { q(e, 0, "", !0, t), W(e, v, !1, t) } function A(s, o) { var n, l = s.lat().toFixed(5), i = s.lng().toFixed(5); s.lat = function () { return parseFloat(l) }, s.lng = function () { return parseFloat(i) }, t.geocode({ latLng: s }, function (t, s) { s == google.maps.GeocoderStatus.OK ? (1 == wpslSettings.autoLocate && b.newRequest && (n = function (e) { var t, s, o, n, l, i = {}, r = e.length; for (t = 0; t < r; t++) { for (n = e[t].address_components.length, s = 0; s < n; s++) { if (o = e[t].address_components[s].types, /^postal_code$/.test(o) || /^postal_code,postal_code_prefix$/.test(o)) { i.zip = e[t].address_components[s].long_name; break } /^locality,political$/.test(o) && (i.locality = e[t].address_components[s].long_name) } if (void 0 !== i.zip) break } l = void 0 === i.zip && void 0 !== i.locality ? i.locality : i.zip; return l }(t), "" !== n && e("#wpsl-search-input").val(n), b.newRequest = !1), wpslSettings.directionRedirect && (d = t[0].formatted_address), C.enabled && e("#wpsl-search-input").val().length > 0 && e.isEmptyObject(C.addressComponents) && B(t), o()) : X(s) }) } function B(t) { var s, o, n, l, r, a = {}, p = {}; for (l = function (t) { var s = ""; return e.each(t[0].address_components, function (e) { if ("country,political" == t[0].address_components[e].types.join(",")) return s = t[0].address_components[e].short_name, !1 }), s }(t), s = "GB" == l ? { city: "postal_town", city_locality: "locality,political", region: "administrative_area_level_2,political", country: "administrative_area_level_1,political" } : { city: "locality,political", region: "administrative_area_level_1,political", country: "country,political" }, o = t[0].address_components.length, i = 0; i < o; i++)for (var c in n = t[0].address_components[i].types, s) s[c] == n.join(",") && (t[0].address_components[i].long_name.length > 0 ? p[c] = t[0].address_components[i].long_name : p[c] = t[0].address_components[i].short_name); for (var c in s) void 0 === p[c] && (a[c] = s[c]); if ("GB" == l && void 0 !== a.city_locality && void 0 === a.city && (a = {}), Object.keys(a).length > 0) for (r = t.length, i = 1; i < r; i++)for (o = t[i].address_components.length, j = 0; j < o; j++)for (var c in n = t[i].address_components[j].types, a) s[c] == n.join(",") && (p[c] = t[i].address_components[j].long_name); void 0 !== p.city_locality && p.city_locality.length > 0 && (p.city = p.city_locality, delete p.city_locality), C.addressComponents = p } function W(e, t, s, o) { 1 == wpslSettings.directionRedirect || C.enabled ? A(e, function () { $(e, t, s, o) }) : $(e, t, s, o) } function $(t, o, n, l) { var i, r, a = "", p = e("#wpsl-listing-template").html(), c = e("#wpsl-stores ul"), d = wpslSettings.url + "img/ajax-loader.gif"; r = function (t, s, o) { var n, l, i, r, a, p = "", c = e("#wpsl-wrap").hasClass("wpsl-mobile"), d = e("#wpsl-wrap").hasClass("wpsl-default-filters"), w = { action: "store_search", lat: t.lat(), lng: t.lng() }; s ? (w.max_results = wpslSettings.maxResults, w.search_radius = wpslSettings.searchRadius) : (c || d ? (n = parseInt(e("#wpsl-results .wpsl-dropdown").val()), l = parseInt(e("#wpsl-radius .wpsl-dropdown").val())) : (n = parseInt(e("#wpsl-results .wpsl-selected-item").attr("data-value")), l = parseInt(e("#wpsl-radius .wpsl-selected-item").attr("data-value"))), isNaN(n) ? w.max_results = wpslSettings.maxResults : w.max_results = n, isNaN(l) ? w.search_radius = wpslSettings.searchRadius : w.search_radius = l, void 0 !== wpslSettings.categoryIds ? w.filter = wpslSettings.categoryIds : e("#wpsl-category").length > 0 ? (p = c || d ? parseInt(e("#wpsl-category .wpsl-dropdown").val()) : parseInt(e("#wpsl-category .wpsl-selected-item").attr("data-value")), isNaN(p) || 0 === p || (w.filter = p)) : e("#wpsl-checkbox-filter").length > 0 && e("#wpsl-checkbox-filter input:checked").length > 0 && (w.filter = e("#wpsl-checkbox-filter input:checked").map(function () { return e(this).val() }).get().join(",")), e(".wpsl-custom-dropdown").length > 0 && e(".wpsl-custom-dropdown").each(function (t) { i = "", r = "", c || d ? (i = e(this).attr("name"), r = e(this).val()) : (i = e(this).attr("name"), r = e(this).next(".wpsl-selected-item").attr("data-value")), i && r && (w[i] = r) }
1), e(".wpsl-custom-checkboxes").length > 0 && e(".wpsl-custom-checkboxes").each(function (t) { (a = e(this).attr("data-name")) && (w[a] = function (t) { var s = e("[data-name=" + t + "]"), o = []; return e(s).find("input:checked").each(function (t) { o.push(e(this).val()) }), o.join() }(a)) })); 1 == o && (void 0 !== b.position ? w.skip_cache = 1 : (w.autoload = 1, void 0 !== wpslSettings.categoryIds && (w.filter = wpslSettings.categoryIds))); C.enabled && 0 == o && (w.search = e("#wpsl-search-input").val(), w.statistics = C.addressComponents); return w }(t, o, n), c.empty().append("<li class='wpsl-preloader'><img src='" + d + "'/>" + wpslLabels.preloader + "</li>"), e("#wpsl-wrap").removeClass("wpsl-no-results"), e.get(wpslSettings.ajaxurl, r, function (o) { e(".wpsl-preloader").remove(), o.length > 0 && void 0 === o.addon ? (e.each(o, function (e) { _.extend(o[e], Q), q(new google.maps.LatLng(o[e].lat, o[e].lng), o[e].id, o[e], false, l), a += _.template(p)(o[e]) }), e("#wpsl-result-list").off("click", ".wpsl-directions"), c.empty(), c.append(a), e("#wpsl-result-list").on("click", ".wpsl-directions", function () { if (1 != wpslSettings.directionRedirect) return P(e(this)), !1 }), e("#wpsl-result-list p:empty").remove(), 1 == wpslSettings.runFitBounds ? Y() : (s.setZoom(Number(wpslSettings.zoomLevel)), s.setCenter(u[0].position)), 1 == wpslSettings.markerClusters && V()) : (q(t, 0, "", !0, l), i = function () { var e; e = void 0 !== wpslSettings.noResults && "" !== wpslSettings.noResults ? wpslSettings.noResults : wpslLabels.noResults; return e }(), e("#wpsl-wrap").addClass("wpsl-no-results"), c.html("<li class='wpsl-no-results-msg'>" + i + "</li>")), 1 == wpslSettings.resetMap && (e.isEmptyObject(h) && google.maps.event.addListenerOnce(s, "tilesloaded", function () { h = { centerLatlng: s.getCenter(), zoomLevel: s.getZoom() }, e("#wpsl-map-controls").addClass("wpsl-reset-exists"), e(".wpsl-icon-reset, #wpsl-reset-map").show() }), e(".wpsl-icon-reset").removeClass("wpsl-in-progress")) }), 1 != wpslSettings.mouseFocus || x() || e("#wpsl-search-input").focus() } function V() { if (1 == wpslSettings.markerClusters) { let e, t = Number(wpslSettings.clusterZoom), o = Number(wpslSettings.clusterSize); if (isNaN(t) && (t = ""), isNaN(o) && (o = ""), void 0 !== wpslSettings.excludeStartFromCluster && 1 == wpslSettings.excludeStartFromCluster) { const t = u.slice(0); t.splice(0, 1), e = t } else e = u; try { null != p && p.setMap(null), p = new window.markerClusterer.MarkerClusterer({ map: s, markers: e, algorithm: new window.markerClusterer.SuperClusterAlgorithm({ radius: o || 60, maxZoom: t || 16 }), renderer: Z() }) } catch (e) { } } } function Z() { const e = wpslSettings.clusterRendererStyle, t = wpslSettings.clusterLowDensityColor, s = wpslSettings.clusterHighDensityColor, o = wpslSettings.clusterLabelColor, n = wpslSettings.clusterTemplates || {}; return { render: function (l, i) { try { const r = l.markers.length; let a; if ("interpolation" === e) { const e = i && i.clusters && i.clusters.markers ? i.clusters.markers.max : 100, o = Math.min(r / e, 1); a = function (e, t, s) { const o = parseInt(e.slice(1), 16), n = parseInt(t.slice(1), 16), l = o >> 16 & 255, i = o >> 8 & 255, r = 255 & o, a = n >> 16 & 255, p = n >> 8 & 255, c = 255 & n, d = Math.round(l + (a - l) * s), w = Math.round(i + (p - i) * s), u = Math.round(r + (c - r) * s); return "#" + (d << 16 | w << 8 | u).toString(16).padStart(6, "0") }(t, s, o) } else { const e = i && i.clusters && i.clusters.markers ? i.clusters.markers.mean : 10; a = r > Math.max(10, e) ? s : t } const p = n[e] || n.default, c = function (e, t) { return String(e).replace(/\$\{(\w+)\}/g, function (e, s) { return t.hasOwnProperty(s) ? t[s] : e }) }(p.svg, { color: a, labelColor: o, count: r }), d = parseInt(p.size, 10) || 50; return new google.maps.Marker({ position: l.position, optimized: !1, icon: { url: "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(c), scaledSize: new google.maps.Size(d, d), anchor: new google.maps.Point(d / 2, d / 2) }, zIndex: 999 }) } catch (e) { return console.error("[WPSL] Cluster render error - disabling clustering:", e.message), null } } } } function q(t, o, n, l, i) { var r, a, p, c; 0 === o ? (n = { store: wpslLabels.startPoint }, r = m.url + wpslSettings.startMarker) : r = void 0 !== n.alternateMarkerUrl && n.alternateMarkerUrl ? n.alternateMarkerUrl : void 0 !== n.categoryMarkerUrl && n.categoryMarkerUrl ? n.categoryMarkerUrl : m.url + wpslSettings.storeMarker, a = { url: r, scaledSize: new google.maps.Size(Number(m.scaledSize[0]), Number(m.scaledSize[1])), origin: new google.maps.Point(Number(m.origin[0]), Number(m.origin[1])), anchor: new google.maps.Point(Number(m.anchor[0]), Number(m.anchor[1])) }, p = new google.maps.Marker({ position: t, map: s, optimized: !1, title: D(n.store), draggable: l, storeId: o, icon: a }
1), u.push(p), google.maps.event.addListener(p, "click", (c = s, function () { 0 != o ? void 0 !== wpslSettings.markerStreetView && 1 == wpslSettings.markerStreetView ? function (e, t) { (new google.maps.StreetViewService).getPanoramaByLocation(e, 50, function (e, s) { S = s == google.maps.StreetViewStatus.OK, t() }) }(t, function () { G(p, K(n), i, c) }) : G(p, K(n), i, c) : G(p, wpslLabels.startPoint, i, c), google.maps.event.clearListeners(i, "domready"), google.maps.event.addListener(i, "domready", function () { !function (t, s) { e(".wpsl-info-actions a").on("click", function (o) { var n = Number(wpslSettings.autoZoomLevel); if (o.stopImmediatePropagation(), e(this).hasClass("wpsl-directions")) { if (1 == wpslSettings.directionRedirect) return !0; P(e(this)) } else e(this).hasClass("wpsl-streetview") ? function (t, s) { var o = s.getStreetView(); o.setPosition(t.getPosition()), o.setVisible(!0), e("#wpsl-map-controls").hide(), function (t, s) { google.maps.event.addListener(t, "visible_changed", function () { if (!t.getVisible()) { var o = s.getZoom(); e("#wpsl-map-controls").show(), s.setZoom(o - 1), s.setZoom(o) } }) }(o, s) }(t, s) : e(this).hasClass("wpsl-zoom-here") && (s.setCenter(t.getPosition()), s.setZoom(n)); return !1 }) }(p, c), H() }) })), l && google.maps.event.addListener(p, "dragend", function (e) { J(), q(e.latLng, 0, "", !0, i), s.setCenter(e.latLng), A(e.latLng, function () { W(e.latLng, v, y = !1, i) }) }) } function D(e) { if (e) return e.replace(/&#(\d+);/g, function (e, t) { return String.fromCharCode(t) }) } function F() { google.maps.event.addListener(s, "zoom_changed", function () { google.maps.event.addListenerOnce(s, "idle", function () { if (void 0 !== p && void 0 !== r) { const e = p.clusters; if (e && e.length) for (let t = 0; t < e.length; t++) { const s = e[t].markers; if (s) for (let e = 0; e < s.length; e++)if (s[e].storeId == r) { a.getVisible() && null === s[e].map ? a.setVisible(!1) : a.getVisible() || null === s[e].map || a.setVisible(!0); break } } } }) }) } function G(e, t, s, o) { w.length = 0, s.setContent(t), s.open(o, e), w.push(s), void 0 !== wpslSettings.infoWindowStyle && "infobox" == wpslSettings.infoWindowStyle && 1 == wpslSettings.markerClusters && (r = e.storeId, s.setVisible(!0)) } function H() { s.getZoom() >= wpslSettings.autoZoomLevel ? e(".wpsl-zoom-here").hide() : e(".wpsl-zoom-here").show() } _.templateSettings = { evaluate: /\<\%(.+?)\%\>/g, interpolate: /\<\%=(.+?)\%\>/g, escape: /\<\%-(.+?)\%\>/g }, wpsl.gmaps.init = function (i, r) { var a, p, c, d, w, f, h, v, S, y, b = Number(wpslSettings.zoomLevel), C = Number(wpslSettings.autoZoomLevel); c = function (e) { var t, s, o, n = ["zoomLevel", "mapType", "mapTypeControl", "mapStyle", "streetView", "scrollWheel", "controlPosition", "zoomControls", "fullscreen", "cameraControl"], l = { zoomLevel: wpslSettings.zoomLevel, mapType: wpslSettings.mapType, mapTypeControl: wpslSettings.mapTypeControl, mapStyle: wpslSettings.mapStyle, streetView: wpslSettings.streetView, scrollWheel: wpslSettings.scrollWheel, controlPosition: wpslSettings.controlPosition, gestureHandling: wpslSettings.gestureHandling, zoomControls: wpslSettings.zoomControls, fullscreen: wpslSettings.fullscreen, cameraControl: wpslSettings.cameraControl }; if (void 0 !== window["wpslMap_" + e] && void 0 !== window["wpslMap_" + e].shortCode) for (t = 0, s = n.length; t < s; t++)void 0 !== (o = window["wpslMap_" + e].shortCode[n[t]]) && (l[n[t]] = o); return l.startLatLng = function (e) { var t, s, o = ""; void 0 !== window["wpslMap_" + e] && void 0 !== window["wpslMap_" + e].locations && (o = window["wpslMap_" + e].locations[0]); void 0 !== o && void 0 !== o.lat && void 0 !== o.lng ? t = new google.maps.LatLng(o.lat, o.lng) : "" !== wpslSettings.startLatlng ? (s = wpslSettings.startLatlng.split(","), t = new google.maps.LatLng(s[0], s[1])) : t = new google.maps.LatLng(0, 0); return t }(e), l }(r), (v = Number(c.zoomLevel)) !== b && (C = v), L(), t = new google.maps.Geocoder, o = new google.maps.DirectionsRenderer, n = new google.maps.DirectionsService, a = { zoomControl: !!Number(c.zoomControls), cameraControl: !!Number(c.cameraControl), zoomControlOptions: { position: google.maps.ControlPosition[c.controlPosition.toUpperCase() + "_TOP"] }, fullscreenControl: !!Number(c.fullscreen), zoom: v, center: c.startLatLng, mapTypeId: google.maps.MapTypeId[c.mapType.toUpperCase()], mapTypeControl: !!Number(c.mapTypeControl), streetViewControl: !!Number(c.streetView), gestureHandling: c.gestureHandling }, "cooperative" !== c.gestureHandling && (a.scrollwheel = !!Number(c.scrollWheel)), m = function () { var e, t = wpslSettings.markerIconProps, s = {}; void 0 !== t.url ? s.url = t.url : void 0 !== t.categoryMarkerUrl ? s.categoryMarkerUrl = t.categoryMarkerUrl : void 0 !== t.alternateMarkerUrl ? s.alternateMarkerUrl = t.alternateMarkerUrl : s.url = wpslSettings.url + "img/markers/"; for (var o in t) t.hasOwnProperty(o) && 2 == (e = t[o].split(",")).length && (s[o] = e); return s }(), s = new google.maps.Map(document.getElementById(i), a), (S = function (e) { tr
1y { var t = JSON.parse(e); if (t && "object" == typeof t && null !== t) return t } catch (e) { } return !1 }(S = c.mapStyle)) && s.setOptions({ styles: S }), oe.restore(), e("#wpsl-stores").off("click", ".wpsl-store-details"), e("#wpsl-stores").on("click", ".wpsl-store-details", function () { var t, s, o = e(this).parents("li"), n = o.data("store-id"); if ("info window" == wpslSettings.moreInfoLocation) for (t = 0, s = u.length; t < s; t++)u[t].storeId == n && google.maps.event.trigger(u[t], "click"); else o.find(".wpsl-more-info-listings").is(":visible") ? e(this).removeClass("wpsl-active-details") : e(this).addClass("wpsl-active-details"), o.siblings().find(".wpsl-store-details").removeClass("wpsl-active-details"), o.siblings().find(".wpsl-more-info-listings").hide(), o.find(".wpsl-more-info-listings").toggle(); if ("default" != wpslSettings.templateId || "store listings" == wpslSettings.moreInfoLocation) return !1 }), d = L(), void 0 !== window["wpslMap_" + r] && void 0 !== window["wpslMap_" + r].locations && (f = new google.maps.LatLngBounds, h = window["wpslMap_" + r].locations, e.each(h, function (e) { q(w = new google.maps.LatLng(h[e].lat, h[e].lng), h[e].id, h[e], !1, d), f.extend(w) }), h.length > 1 && (te(s, C), s.fitBounds(f)), _.isArray(wpslSettings.mapTabAnchor) && (p = { map: s, bounds: f, maxZoom: C }, g.push(p))), e("#wpsl-gmap").length && (1 == wpslSettings.autoComplete && ne.init(), !x() && e(".wpsl-dropdown").length && 1 == wpslSettings.enableStyledDropdowns ? (y = Number(wpslSettings.maxDropdownHeight), e(".wpsl-dropdown").each(function (t) { var s, o, n = e(this); n.$dropdownWrap = n.wrap("<div class='wpsl-dropdown'></div>").parent(), n.$selectedVal = n.val(), n.$dropdownElem = e("<div><ul/></div>").appendTo(n.$dropdownWrap), n.$dropdown = n.$dropdownElem.find("ul"), n.$options = n.$dropdownWrap.find("option"), n.hide().removeClass("wpsl-dropdown"), e.each(n.$options, function () { s = e(this).val() == n.$selectedVal ? 'class="wpsl-selected-dropdown"' : "", n.$dropdown.append("<li data-value=" + e(this).val() + " " + s + ">" + e(this).text() + "</li>") }), n.$dropdownElem.before("<span data-value=" + n.find(":selected").val() + " class='wpsl-selected-item'>" + n.find(":selected").text() + "</span>"), n.$dropdownItem = n.$dropdownElem.find("li"), n.$dropdownWrap.on("click", function (t) { e(this).hasClass("wpsl-active") ? e(this).removeClass("wpsl-active") : (ee(), e(this).toggleClass("wpsl-active"), o = 0, e(this).hasClass("wpsl-active") ? (n.$dropdownItem.each(function (t) { o += e(this).outerHeight() }), n.$dropdownElem.css("height", o + 2 + "px")) : n.$dropdownElem.css("height", 0), o > y && (e(this).addClass("wpsl-scroll-required"), n.$dropdownElem.css("height", y + "px")), t.stopPropagation()) }), n.$dropdownItem.on("click", function (t) { n.$dropdownWrap.find(e(".wpsl-selected-item")).html(e(this).text()).attr("data-value", e(this).attr("data-value")), n.$dropdownItem.removeClass("wpsl-selected-dropdown"), e(this).addClass("wpsl-selected-dropdown"), ee(), t.stopPropagation() }) }), e(document).click(function () { ee() })) : (e("#wpsl-search-wrap select").show(), x() ? e("#wpsl-wrap").addClass("wpsl-mobile") : e("#wpsl-wrap").addClass("wpsl-default-filters")), e(".wpsl-search").hasClass("wpsl-widget") || (1 == wpslSettings.autoLocate ? I(c.startLatLng, d) : 1 == wpslSettings.autoLoad && k(c.startLatLng, d)), 1 != wpslSettings.mouseFocus || x() || e("#wpsl-search-input").focus(), function (t) { e("#wpsl-search-btn").unbind("click").bind("click", function (s) { return e("#wpsl-search-input").removeClass(), e("#wpsl-search-input").val() ? (se(), 1 == wpslSettings.autoComplete && e(".wpsl-autocomplete-search-results").hide(), 1 == wpslSettings.autoComplete && void 0 !== l ? U(l, t) : T(t)) : e("#wpsl-search-input").addClass("wpsl-error").focus(), !1 }) }(d), function (t, s, o) { google.maps.event.addListenerOnce(s, "tilesloaded", function () { e(".gm-style").append(wpslSettings.mapControls), e(".wpsl-icon-reset, #wpsl-reset-map").length > 0 && (N(t.startLatLng, o), e(".wpsl-icon-reset").hide()), e(".wpsl-icon-direction").on("click", function () { e(this).addClass("wpsl-user-activated"), I(t.startLatLng, o) }) }) }(c, s, d), e(".wpsl-search").hasClass("wpsl-widget") && (e("#wpsl-search-btn").trigger("click"), e(".wpsl-search").removeClass("wpsl-widget"))), void 0 !== wpslSettings.infoWindowStyle && "infobox" == wpslSettings.infoWindowStyle && 1 == wpslSettings.markerClusters && F(), void 0 !== wpslSettings.markerZoomTo && 1 == wpslSettings.markerZoomTo && google.maps.event.addListener(s, "zoom_changed", function () { H() }) }, e("#wpsl-gmap").length && ("bounce" == wpslSettings.markerEffect ? (e("#wpsl-stores").on("mouseenter", "li", function () { z(e(this).data("store-id"), "start") }), e("#wpsl-stores").on("mouseleave", "li", function () { z(e(this).data("store-id"), "stop") }
1)) : "info_window" == wpslSettings.markerEffect && e("#wpsl-stores").on("mouseenter", "li", function () { var t, o; for (t = 0, o = u.length; t < o; t++)u[t].storeId == e(this).data("store-id") && (google.maps.event.trigger(u[t], "click"), s.setCenter(u[t].position)) })); var Q = { formatPhoneNumber: function (e) { return (1 == wpslSettings.phoneUrl && x() || 1 == wpslSettings.clickableDetails) && (e = "<a href='tel:" + Q.formatClickablePhoneNumber(e) + "'>" + e + "</a>"), e }, formatClickablePhoneNumber: function (e) { return -1 != e.indexOf("+") && -1 != e.indexOf("(0)") && (e = e.replace("(0)", "")), e.replace(/(-| |\(|\)|\.|)/g, "") }, formatEmail: function (e) { return 1 == wpslSettings.clickableDetails && (e = "<a href='mailto:" + e + "'>" + e + "</a>"), e }, createInfoWindowActions: function (t) { var s, o = "", n = ""; return e("#wpsl-gmap").length && (S && (o = "<a class='wpsl-streetview' href='#'>" + wpslLabels.streetView + "</a>"), 1 == wpslSettings.markerZoomTo && (n = "<a class='wpsl-zoom-here' href='#'>" + wpslLabels.zoomHere + "</a>"), s = "<div class='wpsl-info-actions'>" + Q.createDirectionUrl(t) + o + n + "</div>"), s }, createDirectionUrl: function (t) { var s, o, n = {}; return 1 == wpslSettings.directionRedirect ? (void 0 === d && (d = ""), n.target = "target='_blank'", void 0 !== t ? n.src = e("[data-store-id=" + t + "] .wpsl-directions").attr("href") : (o = this.zip ? this.zip + ", " : "", s = this.address + ", " + this.city + ", " + o + this.country, n.src = "https://www.google.com/maps/dir/?api=1&origin=" + Q.rfc3986EncodeURIComponent(d) + "&destination=" + Q.rfc3986EncodeURIComponent(s) + "&travelmode=" + wpslSettings.directionsTravelMode.toLowerCase())) : n = { src: "#", target: "" }, "<a class='wpsl-directions' " + n.target + " href='" + n.src + "'>" + wpslLabels.directions + "</a>" }, rfc3986EncodeURIComponent: function (e) { return encodeURIComponent(e).replace(/[!'()*]/g, escape) } }; function K(t) { var s; return s = e("#wpsl-base-gmap_0").length ? e("#wpsl-cpt-info-window-template").html() : e("#wpsl-info-window-template").html(), _.template(s)(t) } function Y() { var e, t, o = Number(wpslSettings.autoZoomLevel), n = new google.maps.LatLngBounds; for (te(s, o), e = 0, t = u.length; e < t; e++)n.extend(u[e].position); s.fitBounds(n) } function J() { var e, t; if (oe.removeRoute(), u) { for (t = 0, e = u.length; t < e; t++)u[t].setMap(null); u.length = 0 } p && p.clearMarkers() } function X(e) { var t; switch (e) { case "ZERO_RESULTS": t = wpslLabels.noResults; break; case "OVER_QUERY_LIMIT": t = wpslLabels.queryLimit; break; default: t = wpslLabels.generalError }alert(t) } function ee() { e(".wpsl-dropdown").removeClass("wpsl-active"), e(".wpsl-dropdown div").css("height", 0) } function te(e, t) { google.maps.event.addListenerOnce(e, "bounds_changed", function () { google.maps.event.addListenerOnce(e, "idle", function () { this.getZoom() > t && this.setZoom(t) }) }) } function se() { e("#wpsl-result-list ul").empty(), e("#wpsl-stores").show(), e(".wpsl-direction-before, .wpsl-direction-after").remove(), e("#wpsl-direction-details").hide(), v = !1, E(), J(), O() } const oe = { polyline: "", distanceUnit: "km" == wpslSettings.distanceUnit ? "METRIC" : "IMPERIAL", startEndmarkers: [], openInfoWindow: null, calcRoute: function (e) { oe.apiRequest.legacy(e) }, apiRequest: { legacy: function (t) { var l, i, r = ""; const a = { origin: t.start, destination: t.end, travelMode: wpslSettings.directionsTravelMode, unitSystem: google.maps.UnitSystem[oe.distanceUnit] }; n.route(a, function (t, n) { if (n == google.maps.DirectionsStatus.OK) { if (o.setMap(s), o.setDirections(t), t.routes.length > 0) { const s = t.routes[0]; for (let e = 0; e < s.legs.length; e++)for (let t = 0, o = (l = s.legs[e]).steps.length; t < o; t++)i = l.steps[t], r = r + "<li><div class='wpsl-direction-index'>" + (t + 1) + "</div><div class='wpsl-direction-txt'>" + i.instructions + "</div><div class='wpsl-direction-distance'>" + i.distance.text + "</div></li>"; e("#wpsl-direction-details ul").append(r).before("<div class='wpsl-direction-before'><a class='wpsl-back' id='wpsl-direction-start' href='#'>" + wpslLabels.back + "</a><div><span class='wpsl-total-distance'>" + s.legs[0].distance.text + "</span> - <span class='wpsl-total-durations'>" + s.legs[0].duration.text + "</span></div></div>").after("<p class='wpsl-direction-after'>" + t.routes[0].copyrights + "</p>
1"), e("#wpsl-direction-details").show(); for (let e = 0, t = u.length; e < t; e++)u[e].setMap(null); if (p && p.clearMarkers(), void 0 !== c && "" !== c && c.setMap(null), e("#wpsl-stores").hide(), 1 == wpslSettings.templateId) { const t = e("#wpsl-gmap").offset(); e(window).scrollTop(t.top) } } } else !function (e) { var t; switch (e) { case "NOT_FOUND": case "ZERO_RESULTS": t = wpslLabels.noDirectionsFound; break; case "OVER_QUERY_LIMIT": t = wpslLabels.queryLimit; break; default: t = wpslLabels.generalError }alert(t) }(n) }) } }, removeRoute: function () { o.setMap(null) }, restore: function () { e("#wpsl-result-list").on("click", ".wpsl-back", function () { var t, n; for (o.setMap(null), t = 0, n = u.length; t < n; t++)u[t].setMap(s); return void 0 !== c && "" !== c && c.setMap(s), p && V(), s.setCenter(f.centerLatlng), s.setZoom(f.zoomLevel), e(".wpsl-direction-before, .wpsl-direction-after").remove(), e("#wpsl-stores").show(), e("#wpsl-direction-details").hide(), !1 }) } }, ne = { init: function () { if ("legacy" === wpslSettings.apiVersions.autocomplete) ne.makeLegacyRequest(); else { e(document).on("keydown.wpslAutocomplete", function (t) { "Escape" === t.key && e(".wpsl-autocomplete-search-results").hide() }); for (const e in wpslSettings.placesApiOptions) if (wpslSettings.placesApiOptions.hasOwnProperty(e)) { const t = wpslSettings.placesApiOptions[e]; "" !== t && null != t && (ne.current.request[e] = t) } this.current.refreshToken(), e("#wpsl-search-input").on("input", this.current.makeRequest) } }, current: { request: { input: "" }, newestRequestId: 0, makeRequest: async function (t) { const s = t.target.value.trim(); try { if ("" == s) return void e(".wpsl-autocomplete-search-results").find("ul").empty().end().hide(); ne.current.request.input = s; const t = ++ne.current.newestRequestId, { suggestions: o } = await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(ne.current.request); if (t !== ne.current.newestRequestId) return; if (!e(".wpsl-autocomplete-search-container").length) { e("#wpsl-search-input").wrap('<div class="wpsl-autocomplete-search-container"></div>'); const t = '<div class="wpsl-autocomplete-search-results">\n            <ul>\n            </ul>\n        </div>'; e("#wpsl-search-input").after(t), e("#wpsl-search-input").focus() } if (o.length > 0) { e(".wpsl-autocomplete-search-results").show(); const t = e("#wpsl-search-input").outerWidth(); e(".wpsl-autocomplete-search-results").outerWidth(t) } else e(".wpsl-autocomplete-search-results").hide(); e(".wpsl-autocomplete-search-results ul").empty(); for (const t of o) { const o = t.placePrediction, n = o.text.toString(), l = s.toLowerCase().replace(/[^a-z0-9\s'-,]/gi, ""), i = e("<a>"), r = e("<li>").attr("role", "option").attr("tabindex", "0"); r.on("keydown", e => { "Enter" !== e.key && " " !== e.key || (e.preventDefault(), ne.current.onPlaceSelected(o.toPlace())) }), r.on("click", () => { ne.current.onPlaceSelected(o.toPlace()) }); const a = n.toLowerCase().indexOf(l), p = n.slice(0, a), c = n.slice(a, a + l.length), d = n.slice(a + l.length); i.html(p + '<span class="wpsl-autocomplete-highlight">' + c + "</span>" + d), r.append(i), e(".wpsl-autocomplete-search-results ul").append(r) } } catch (t) { e("#wpsl-search-input").off("input", ne.current.makeRequest) } }, onPlaceSelected: async function (t) { await t.fetchFields({ fields: ["formattedAddress", "location"] }), l = t.location, e("#wpsl-search-input").val(t.formattedAddress), e(".wpsl-autocomplete-search-results").hide(), ne.current.refreshToken() }, refreshToken: function () { ne.current.request.sessionToken = new google.maps.places.AutocompleteSessionToken } }, makeLegacyRequest: function () { let t = {}; if (e("#wpsl-search-input").keypress(function (e) { if (13 == e.which) return se(), T(a), !1 }), void 0 === wpslSettings.geocodeComponents || e.isEmptyObject(wpslSettings.geocodeComponents) || (t.componentRestrictions = wpslSettings.geocodeComponents, t.componentRestrictions = _.omit(t.componentRestrictions, "postalCode")), void 0 !== wpslSettings.autoCompleteOptions && !e.isEmptyObject(wpslSettings.autoCompleteOptions)) for (let e in wpslSettings.autoCompleteOptions) wpslSettings.autoCompleteOptions.hasOwnProperty(e) && (t[e] = wpslSettings.autoCompleteOptions[e]); const s = document.getElementById("wpsl-search-input"), o = new google.maps.places.Autocomplete(s, t); o.addListener("place_changed", function () { const e = o.getPlace(); e.geometry && (l = e.geometry.location) }) } } });

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.