1jQuery(function(t){window.storeLocatorInit=function(){var e=t("#yith-store-locator:not(.yith-store-locator-initialized)");e.length&&(e.addClass("yith-store-locator-initialized"),window.yith_sl_store_locator=e.data("atts"),window.store_locator={options:yith_sl_store_locator,infowindows:[],is_google_suggestion:!1,radius_default_step:yith_sl_store_locator.filter_radius_default_step,latitude:"",longitude:"",filters:{},search_bar_address:t("#yith-sl-search-bar-address"),address:"",product:"",change_browser_url:yith_sl_store_locator.change_browser_url,urlArgs:{},queryArgsToKeep:yith_sl_store_locator.query_args_to_keep,moveMapToSelectedStoreEvent:yith_sl_store_locator.move_map_to_selected_store_event,init:function(){store_locator.initStoreLocator(),"yes"===store_locator.change_browser_url&&t(document).on("yith_sl_search_stores_completed",store_locator.setQueryArg),t(document).on("yith_sl_store_locator_initialized",store_locator.getResultsOnChangeAddress),t(document).on("click","#yith-sl-geolocation",function(e){e.preventDefault(),t("#yith-sl-wrap-loader").show(),store_locator.useCurrentLocation()}),t(document).on("click","#yith-sl-search-icon",function(){store_locator.getResults()}),t(document).on("click","#yith-sl-show-all-stores",store_locator.showAllStores),t(document).on("click","#yith-sl-search-button",function(t){t.preventDefault(),store_locator.getResults()}),t(document).on("click","#yith-sl-view-all",store_locator.showAllResults),t(document).on("keypress",function(t){13===t.which&&store_locator.getResults()}),t(document).on("keypress change","#yith-sl-search-bar-address",store_locator.getResultsOnChangeAddress),"no"===store_locator.options.autosearch&&t(document).on("click change",".wrapper-filter[data-taxonomy="+yith_sl_store_locator.radius_taxonomy_slug+"] li, select#filter-radius",store_locator.showTooltip),"yes"===store_locator.options.full_width_layout&&t(window).on("resize",store_locator.makeLayoutFullwidth),t(document).on("click","#yith-sl-main-filters-container.layout-dropdown .type-dropdown .wrapper-options label",function(){var e=t(this).parents(".wrapper-filter");e.find("li").removeClass("active"),e.find("input").prop("checked",!1),t(this).closest("li").addClass("active"),store_locator.initFilters()}),t(document).on("change","#yith-sl-main-filters-container select, #yith-sl-main-filters-container input",function(){store_locator.initFilters()}),t(document).on("change","#yith-sl-main-filters-container input, select",function(){if(t(this).is("select")){var e=t(this).val();t(this).find("option[value="+e+"]").attr("selected","true")}else if(t(this).is(":checkbox")||t(this).is(":radio")){var o=t(this).is(":checked");t(this).attr("checked",o)}}),t(document).on("yith_sl_filters_initialized",function(){"yes"===store_locator.options.autosearch&&store_locator.getResults()}),t(document).on("click","#yith-sl-reset-all-filters",function(){store_locator.resetFilters(),store_locator.getResults()}),t(document).on("click","#wrapper-active-filters .remove-term",store_locator.removeFilter),t(document).on("click","#yith-sl-open-filters",function(){t(".wrap-filters-list").slideToggle()})},initStoreLocator:function(){localStorage.setItem("yith_store_locator_init",!0),localStorage.setItem("yith_store_locator_original_url",!0),store_locator.setProduct(),"yes"===store_locator.options.show_map&&store_locator.initMap(store_locator.latitude,store_locator.longitude),"yes"===store_locator.options.autogeolocation&&store_locator.useCurrentLocation(),"undefined"!=typeof google&&void 0!==google.maps&&void 0!==google.maps.places&&void 0!==google.maps.places.Autocomplete?store_locator.initSearchAddressInput():console.error("Google Maps Javascript API error while using Autocomplete. Probably other plugins (or your theme) include Google Maps Javascript API without support to the Places library"),"yes"===store_locator.options.full_width_layout&&store_locator.makeLayoutFullwidth(),store_locator.initFilters(),"yes"===store_locator.change_browser_url&&store_locator.isQueryFiltered()?(store_locator.getAddress(store_locator.getResults),store_locator.getResults()):"no"===store_locator.options.autogeolocation&&"yes"===store_locator.options.show_stores_by_default&&store_locator.showAllStores(),t(document).on("yith_sl_store_locator_initialized"),localStorage.setItem("yith_store_locator_init",!1)},isQueryFiltered:function(){return window.location.search.length>0},showTooltip:function(){var e=t("#yith-sl-search-bar-address").val(),o=t(this).find("input").val(),i=t(this).val(),s=t("#address-tooltip");""===e&&(void 0!==o&&0!==o&&"selectall"!==o||void 0!==i&&0!==i&&"selectall"!==i)&&(s.fadeIn(),setTimeout(function(){s.fadeOut()},4e3))},is_admin:function(){return t("body").hasClass("wp-admin")},makeLayoutFullwidth:function(){if(!(t(".yith-sl-modal").length>0||store_locator.is_admin())){var e=t("#yith-store-locator"),o=e.outerWidth(!0),i=t("body").width();e.css("margin","0 -"+(i-o)/2+"px"),e.css({padding:store_locator.options.side_padding_full_width})}},getResultsOnChangeAddress:function(t){switch(t.type){case"keypress":13===t.which&&(t.stopPropagation(),store_locator.getAddress(store_locator.getResults));break;case"change":setTimeout(function(){store_locator.getAddress(store_locator.getResults)},500)}},getAddress:function(e){var o=t("#yith-sl-search-bar-address").val();""!==o&&(geocoder=new google.maps.Geocoder).geocode({address:o},function(o,i){null!=o&&o.length>0&&(store_locator.latitude=parseFloat(o[0].geometry.location.lat()),store_locator.longitude=parseFloat(o[0].geometry.location.lng()),store_locator.is_google_suggestion=!1,t("#yith-sl-geolocation-enabled").val("no"),"yes"===store_locator.options.autosearch&&e())}),store_locator.address=o,t(document).trigger("yith_sl_address_initialized")},setQueryArg:function(e){if(t(".yith-sl-modal").length>0||store_locator.is_admin())return;let o=store_locator.getBaseUrl();if("true"===localStorage.getItem("yith_store_locator_original_url")&&null!==store_locator.product){localStorage.setItem("yith_store_locator_original_url",!1);return}t.each(store_locator.urlArgs,function(t,e){e.length>0&&o.searchParams.append(t,e)}),store_locator.address.length>0&&o.searchParams.append("address",store_locator.address),o.searchParams.set("store-filter","yes"),history.replaceState({},null,o)},getBaseUrl:function(){let e=new URL(window.location.origin+window.location.pathname),o=new URL(window.location.href);return t.each(store_locator.queryArgsToKeep,function(t,i){let s=o.searchParams.get(i);null!=s&&""!==s&&e.searchParams.append(i,s)}),null!==store_locator.product&&e.searchParams.append("product_id",store_locator.product),e},showAllResults:function(e){e.preventDefault(),t(this).css({display:"none"});var o="one"===store_locator.options.results_columns?"block":"flex";t("#yith-sl-results").find(".additional-stores").slideDown({start:function(){t(this).css({display:o})}})},showAllStores:function(e){let o=void 0!==e;o&&e.preventDefault(),(o||"all"===store_locator.options.stores_shown_by_default)&&(store_locator.latitude="",store_locator.longitude=""),t("#yith-sl-search-bar-address").val(""),store_locator.geolocation="no",store_locator.resetFilters(),void 0==e&&store_locator.getResults(!0)}
1,initSearchAddressInput:function(){if(void 0!==t(".yith-sl-gmap-places-autocomplete")[0]){var e=t(".yith-sl-gmap-places-autocomplete")[0],o=store_locator.options.autocomplete_options,i=new google.maps.places.Autocomplete(e,o);google.maps.event.addListener(i,"place_changed",function(){var e=i.getPlace();void 0!==e.geometry?(store_locator.latitude=parseFloat(e.geometry.location.lat()),store_locator.longitude=parseFloat(e.geometry.location.lng()),store_locator.is_google_suggestion=!0,t("#yith-sl-geolocation-enabled").val("no"),"yes"===store_locator.options.autosearch&&store_locator.getResults()):store_locator.is_google_suggestion=!1})}},useCurrentLocation:function(){if(!navigator.geolocation){alert(store_locator.options.alert_geolocalization_not_supported),t("#yith-sl-wrap-loader").hide();return}navigator.geolocation.getCurrentPosition(store_locator.geolocationSuccess,store_locator.geolocationError,{enableHighAccuracy:!0})},geolocationSuccess:function(e){store_locator.latitude=e.coords.latitude,store_locator.longitude=e.coords.longitude,store_locator.geolocation="yes";var o=new google.maps.Geocoder,i={lat:store_locator.latitude,lng:store_locator.longitude};o.geocode({location:i},function(e,o){if("OK"===o){if(e[0]){t("#yith-sl-wrap-loader").hide();var i=e[0].formatted_address;store_locator.search_bar_address.val(i),"yes"===store_locator.options.autosearch&&store_locator.getResults()}else window.alert(store_locator.options.geocode_no_results)}else window.alert(store_locator.options.geocode_failed_to+" "+o)})},geolocationError:function(){alert(store_locator.options.alert_calculate_position_error),t("#yith-sl-wrap-loader").hide()},getResults:function(){var e={latitude:store_locator.latitude,longitude:store_locator.longitude,geolocation:store_locator.geolocation,radius:store_locator.filter_radius_step,filters:store_locator.filters,number_results_to_show:store_locator.options.number_results_to_show,results_info_to_show:store_locator.options.results_info_to_show,action:store_locator.options.action_get_results,product:store_locator.product,context:"frontend",language:t("#yith-sl-language").val()};store_locator.ajaxSearchStores(e)},ajaxSearchStores:function(e){t(document).trigger("yith_sl_starting_search_stores");var o=t("#yith-sl-results"),i=t("#yith-sl-active-filters");t("#yith-sl-wrap-loader").show(),jQuery.ajax({type:"POST",data:e,url:store_locator.options.ajaxurl,success:function(s){"yes"===store_locator.options.show_results&&(o.find(".title").show(),o.find(".stores-list").html(s.results),i.html(s.active_filters),"yes"===store_locator.options.autosearch&&t("#yith-sl-search-button").hide()),"yes"===store_locator.options.show_map&&store_locator.initMap(e.latitude,e.longitude,s.markers,store_locator.options.map_zoom,e.geolocation),i.find("li").length>0&&!jQuery.isEmptyObject(store_locator.filters)&&("no"===e.show_all||void 0===e.show_all)&&i.show(),0===i.find("li").length&&i.hide(),o.show(),t("#yith-sl-wrap-loader").hide()},complete:function(){t("#yith-sl-main-filters-container.layout-dropdown").find(".wrapper-options").hide(),"no"===store_locator.options.show_filters_with_results&&(t("#yith-sl-main-filters-container").find(".wrap-filters-list").hide(),t("#yith-sl-open-filters").show()),t(".wrapper-filter.active").removeClass("active"),t(document).trigger("yith_sl_search_stores_completed")},error:function(){}})},initMap:function(e,o,i,s,n){if(null!==document.getElementById("yith-sl-gmap")){null==i&&(i=""),null==s&&(s=store_locator.options.map_zoom),null==n&&(n="no"),""===e&&(e=store_locator.options.map_latitude,store_locator.latitude=store_locator.options.map_latitude),""===o&&(o=store_locator.options.map_longitude,store_locator.longitude=store_locator.options.map_longitude);var l=new google.maps.LatLngBounds,a=new google.maps.Map(document.getElementById("yith-sl-gmap"),{zoom:Number(s),mapTypeId:store_locator.options.map_type,scrollWheelZoom:!0,styles:store_locator.options.map_style,minZoom:1,gestureHandling:store_locator.options.map_gesture_handling,zoomControl:store_locator.options.map_zoom_control,restriction:{latLngBounds:{north:85,south:-85,west:-180,east:180}}}),r={};if(0!==i.length){var c=[];jQuery.each(i,function(t,e){var o=new google.maps.LatLng(e.latitude,e.longitude),i=new google.maps.Marker({position:o,map:a,title:e.name,icon:e.pin_icon});if(l.extend(i.position),"yes"===store_locator.options.enable_pin_modal&&"undefined"!==e.pin_modal){var s=new google.maps.InfoWindow({content:e.pin_modal});store_locator.infowindows.push(s),i.addListener(store_locator.options.pin_modal_trigger_event,function(t){var e="";void 0!==t&&void 0!==t.rb&&(e=Math.abs(t.rb.screenY-r.y)),store_locator.closeAllInfoWindows(),(void 0===t||e>300)&&a.panTo(i.getPosition()),s.open(a,i)})}
1c[e.id]=i,i.setMap(a)});var d=t(".wrap-store-details");if(d.on(store_locator.moveMapToSelectedStoreEvent,function(){store_locator.closeAllInfoWindows();var e=t(this).data("id");google.maps.event.trigger(c[e],store_locator.options.pin_modal_trigger_event)}),store_locator.options.autoclose_pin_on_mouseleave&&d.on("mouseleave",function(){store_locator.closeAllInfoWindows()}),"yes"===n){var u=new google.maps.LatLng(e,o),p=new google.maps.Marker({position:u,map:a,icon:yith_sl_store_locator.map_user_icon});l.extend(p.position)}if(void 0!=l.getNorthEast()&&l.getNorthEast().equals(l.getSouthWest())){var h=new google.maps.LatLng(l.getNorthEast().lat()+.1,l.getNorthEast().lng()+.1);l.extend(h)}if("yes"===store_locator.options.show_radius_circle&&store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]&&void 0!==e&&void 0!==o&&e!==store_locator.options.map_latitude&&o!==store_locator.options.map_longitude){var g=new google.maps.LatLng(e,o),f=new google.maps.Circle({strokeColor:store_locator.options.circle_border_color,center:g,strokeWeight:store_locator.options.circle_border_weight,fillColor:store_locator.options.circle_background_color,map:a,radius:"km"===store_locator.options.filter_radius_distance_unit?1e3*store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]:1.60934*store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]});l.union(f.getBounds())}setTimeout(function(){a.fitBounds(l)},500)}else{yith_sl_store_locator.show_default_location_for_no_results&&(e=yith_sl_store_locator.map_latitude,o=yith_sl_store_locator.map_longitude);var m=new google.maps.LatLng(e,o);a.setCenter(m)}}},closeAllInfoWindows:function(){for(var t=0;t<store_locator.infowindows.length;t++)store_locator.infowindows[t].close()},initFilters:function(){var e=t("#yith-sl-main-filters-container");e.find(".wrapper-filter").each(function(){t(this).removeClass("selected");var e=jQuery(this).data("taxonomy");store_locator.filters[e]=[],store_locator.urlArgs[e]=[]}),e.find("li.active input, input:checked, option:selected").each(function(){var e=t(this).parents(".wrapper-filter"),o=t(this).parents(".wrapper-filter").data("taxonomy"),i=t(this).val(),s=t(this).data("slug");void 0!==o&&("selectall"!==i?(e.addClass("selected"),store_locator.filters[o].push(i),store_locator.urlArgs[o].push(s)):(store_locator.filters[o]=[],store_locator.urlArgs[o]=[]))}),t(document).trigger("yith_sl_filters_initialized")},resetFilters:function(){var e=t("#yith-sl-main-filters-container").find(".wrapper-filter");if("true"!==localStorage.getItem("yith_store_locator_init")){t(".open-dropdown").each(function(){var e=jQuery(this).data("title");t(this).find(".text").html(e)}
1),e.find("option:selected, input:checked").each(function(){t(this).prop("checked",!1),t(this).prop("selected",!1)}),e.find("li.active").removeClass("active"),e.find("select").prop("selectedIndex",0),e.removeClass("selected active"),t("#yith-sl-active-filters").hide();var o=new URL(window.location.href.split("?")[0]);history.replaceState({},null,o),t(document).trigger("yith_sl_reset_filters"),store_locator.initFilters()}},removeFilter:function(){var e=t(this).data("taxonomy"),o=t(this).data("value"),i=t("#yith-sl-main-filters-container").find("[data-taxonomy='"+e+"'][data-value='"+o+"']"),s=i.parents(".wrapper-filter"),n=t(this).closest(".wrapper-terms").find("li").length;if(i.prop("checked",!1),i.prop("selected",!1),i.parents("li").removeClass("active"),s.removeClass("selected"),n>1?t(this).parent("li").remove():t(this).parents("li").remove(),i.is(":radio")){var l=s.find(".open-dropdown").data("title");s.find(".text").html(l)}store_locator.initFilters(),0===t("#wrapper-active-filters").find("li").length&&t("#yith-sl-active-filters").hide(),"yes"===store_locator.options.autosearch&&store_locator.getResults()},setProduct:function(){if(t(".yith-sl-modal").length>0)store_locator.product=t(".yith-sl-modal").data("product");else if(window.location.href.indexOf("product_id=")){let e=new URLSearchParams(window.location.search);store_locator.product=e.get("product_id")}else store_locator.product=null}},store_locator.init())},storeLocatorInit(),t(function(){"elementorFrontend"in window&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){storeLocatorInit()})})});
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.