PageSourceSearch

https://www.bb22.it/wp-content/cache/min/1/wp-content/plugins/swis…gle-map-7d0b7473a75e5aaf10ec181b5ae64854.js

js bb22.it collected 2026-09-26 12:58:40 UTC 12,228 bytes, 16 lines download raw bytes

1(function($){'use strict';var qodefGoogleMap={mapHolder:'',mapOptions:[],mapElement:'',map:{},markers:{},circleMap:{},init:function($mapHolder,options){this.mapHolder=$mapHolder;if(typeof google!=='object'||typeof this.mapHolder==='undefined'||typeof this.mapHolder===''){return}
2this.initMap(this.mapHolder,options)},getMapSettings:function(){var settings={styles:qodefMapsVariables.global.mapStyle,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:qodefMapsVariables.global.mapScrollable,draggable:qodefMapsVariables.global.mapDraggable,streetViewControl:qodefMapsVariables.global.streetViewControl,zoomControl:qodefMapsVariables.global.zoomControl,zoom:parseInt(qodefMapsVariables.global.mapZoom,10),mapTypeControl:qodefMapsVariables.global.mapTypeControl,fullscreenControl:qodefMapsVariables.global.fullscreenControl,};return settings},getMapOptions:function($mapHolder,forwardOptions){var options={uniqueId:'',holderId:'',mapHeight:0,addresses:[],addressesLatLng:[],pin:'',selectorIsID:!1,multipleTrigger:!1,geolocation:!1,};options=$.extend(options,forwardOptions);if(options.selectorIsID){options.uniqueId=$mapHolder[0].id;options.holderId=$mapHolder[0].id}else if(typeof $mapHolder.data('unique-id')!=='undefined'&&$mapHolder.data('unique-id')!==!1){options.uniqueId=$mapHolder.data('unique-id');options.holderId='qodef-map-id--'+$mapHolder.data('unique-id')}
3if(typeof $mapHolder.data('height')!=='undefined'&&$mapHolder.data('height')!==!1){options.mapHeight=parseInt($mapHolder.data('height'),10)}
4if(typeof qodefMapsVariables.multiple.addresses!=='undefined'&&qodefMapsVariables.multiple.addresses!==''){options.addresses=qodefMapsVariables.multiple.addresses}else if(typeof $mapHolder.data('addresses')!=='undefined'&&$mapHolder.data('addresses')!==!1){options.addresses=$mapHolder.data('addresses')}
4
5if(typeof $mapHolder.data('pin')!=='undefined'&&$mapHolder.data('pin')!==!1){options.pin=$mapHolder.data('pin')}
6return options},initMap:function($mapHolder,options){this.mapOptions=this.getMapOptions($mapHolder,options);this.mapElement=document.getElementById(this.mapOptions.holderId);this.map=new google.maps.Map(this.mapElement,this.getMapSettings());this.triggerGeolocation();this.setAddress();this.setMapHeight()},triggerGeolocation:function(){if(navigator.geolocation&&this.mapOptions.geolocation){this.centerMapToGeolocationAddress()}},setAddress:function(){for(var index=0;index<this.mapOptions.addresses.length;index++){var address=this.mapOptions.addresses[index];if(address===''){return}
7if(this.mapOptions.multipleTrigger){var addressLocation=address.location;if(typeof addressLocation!=='undefined'&&addressLocation!==null&&addressLocation.latitude!==''&&addressLocation.longitude!==''){this.mapOptions.addressesLatLng.push($.extend(addressLocation,address))}}else{this.setSingleAddress(address)}}
8if(this.mapOptions.multipleTrigger){this.centerMapMultipleAddresses(this.map,this.mapOptions);this.addMultipleMarkers()}},setSingleAddress:function(address){var $infoWindow=new google.maps.InfoWindow({content:'<div id="content"><div id="siteNotice"></div><div id="bodyContent"><p>'+address+'</p></div></div>',});var $geocoder=new google.maps.Geocoder();if(typeof $geocoder==='object'){var $map=this.map,mapOptions=this.mapOptions;$geocoder.geocode({'address':address},function(results,status){if(status===google.maps.GeocoderStatus.OK&&typeof results==='object'){var $marker=new google.maps.Marker({map:$map,position:results[0].geometry.location,icon:mapOptions.pin,title:address.store_title,});google.maps.event.addListener($marker,'click',function(){$infoWindow.open($map,$marker)});var addressVariables={address:results[0].formatted_address,latitude:results[0].geometry.location.lat(),longitude:results[0].geometry.location.lng(),};mapOptions.addressesLatLng.push(addressVariables);qodefGoogleMap.centerMapAddress($map,mapOptions,results)}})}},setMapHeight:function(){var mapOptions=this.mapOptions;if(mapOptions.mapHeight>0&&this.mapElement!==''){this.mapElement.style.height=mapOptions.mapHeight+'px'}},centerMapAddress:function($map,mapOptions,results){if(mapOptions.addresses.length===1){$map.setCenter(results[0].geometry.location)}else{this.centerMapMultipleAddresses($map,mapOptions)}
9google.maps.event.addDomListener(window,'resize',function(){qodefGoogleMap.centerMapAddress($map,mapOptions,results)})},centerMapMultipleAddresses:function($map,mapOptions){var $bounds=new google.maps.LatLngBounds(),addressesLatLng=mapOptions.addressesLatLng;if(mapOptions.multipleTrigger&&addressesLatLng.length===1){$map.setCenter({lat:parseFloat(addressesLatLng[0].latitude),lng:parseFloat(addressesLatLng[0].longitude),})}else if(typeof $bounds==='object'&&addressesLatLng.length){for(var index=0;index<addressesLatLng.length;index++){$bounds.extend({lat:parseFloat(addressesLatLng[index].latitude),lng:parseFloat(addressesLatLng[index].longitude),})}
10$map.fitBounds($bounds)}},centerMapToGeolocationAddress:function(setInputAddressValue,placesInput,geoLocationLinkIcon,listHolder){if(navigator.geolocation){var $map=this.map;if(setInputAddressValue){geoLocationLinkIcon.addClass('fa-spinner fa-spin')}
11navigator.geolocation.getCurrentPosition(function(position){var lat=position.coords.latitude,lng=position.coords.longitude,latlng={lat:lat,lng:lng,};if(setInputAddressValue){var $geocoder=new google.maps.Geocoder(),cityName='',cityWithCountryName='';$geocoder.geocode({'latLng':latlng},function(results,status){if(status===google.maps.GeocoderStatus.OK&&typeof results==='object'){var resultsObject=results;for(var $i=0;$i<=resultsObject.length;$i++){var result=resultsObject[$i];if(typeof result==='object'&&result.types[0]==='locality'){var currentAddress=result.address_components;cityName=currentAddress[0].long_name;for(var $j=0;$j<=currentAddress.length;$j++){if(typeof currentAddress[$j]==='object'&&currentAddress[$j].types[0]==='country'){cityWithCountryName=cityName+','+currentAddress[$j].long_name}}}}
12if(typeof cityName==='string'){geoLocationLinkIcon.removeClass('fa-spinner fa-spin');if(typeof cityWithCountryName==='string'){placesInput.val(cityWithCountryName)}else{placesInput.val(cityName)}
13window.qodefGeoLocation.showRangeSlider(latlng,!0);qodef.body.trigger('swissdelight_core_trigger_after_autocomplete_places',[placesInput])}}})}else{$map.setCenter(latlng)}})}},centerMapToForwardAddress:function(addressName){if(typeof addressName==='string'&&typeof google==='object'){var $map=this.map,mapSettings=this.getMapSettings(),$geocoder=new google.maps.Geocoder();$geocoder.geocode({'address':addressName},function(results,status){if(status===google.maps.GeocoderStatus.OK&&typeof results[0]==='object'){$map.setZoom(mapSettings.zoom);$map.setCenter(results[0].geometry.location)}})}},addMultipleMarkers:function(){var markers=[],addressesLatLng=this.mapOptions.addressesLatLng;for(var i=0;i<addressesLatLng.length;i++){var latLng={lat:parseFloat(addressesLatLng[i].latitude),lng:parseFloat(addressesLatLng[i].longitude)};var templateData={title:addressesLatLng[i].title,itemId:addressesLatLng[i].itemId,address:addressesLatLng[i].address,featuredImage:addressesLatLng[i].featuredImage,itemUrl:addressesLatLng[i].itemUrl,latLng:latLng,};var $customMarker=new window.qodefCustomMarker({position:latLng,map:this.map,templateData:templateData,markerPin:addressesLatLng[i].markerPin,});markers.push($customMarker)}
14this.markers=markers;this.initMarkerClusters();this.initMarkerInfo()},initMarkerClusters:function(){var markerOptions={minimumClusterSize:2,maxZoom:12,styles:[{width:50,height:60,url:'',textSize:12,}],};new MarkerClusterer(this.map,this.markers,markerOptions)},initMarkerInfo:function(){var $map=this.map;$(document).off('click','.qodef-map-marker').on('click','.qodef-map-marker',function(){var self=$(this),$markerHolders=$('.qodef-map-marker-holder'),$infoWindows=$('.qodef-info-window'),$markerHolder=self.parent('.qodef-map-marker-holder'),markerlatlngData=$markerHolder.data('latlng'),$infoWindow=self.siblings('.qodef-info-window');if($markerHolder.hasClass('qodef-active qodef-map-active')){$markerHolder.removeClass('qodef-active qodef-map-active');$infoWindow.fadeOut(0)}else{$markerHolders.removeClass('qodef-active qodef-map-active');$infoWindows.fadeOut(0);$markerHolder.addClass('qodef-active qodef-map-active');$infoWindow.fadeIn(300);
14if(markerlatlngData.length&&markerlatlngData!==undefined){var latlngStr=markerlatlngData.replace('(','').replace(')','').split(',',2);$map.panTo(new google.maps.LatLng(parseFloat(latlngStr[0]),parseFloat(latlngStr[1])))}}})},setGeoLocationRadius:function($geoLocation,radius,isActive){if(typeof $geoLocation==='object'&&typeof google==='object'){var $map=this.map,$markers=this.markers;if(isActive){this.circleMap.setMap(null)}
15this.circleMap=new google.maps.Circle({map:$map,center:$geoLocation,radius:parseInt(radius,10)*1000,strokeWeight:0,fillColor:'#fc475f',fillOpacity:0.15,});var $currentCircle=this.circleMap;var itemsInArea=[];$.each($markers,function(i,marker){if($currentCircle.getBounds().contains(marker.latlng)){itemsInArea.push(marker.templateData.itemId)}});window.qodefGeoLocation.disableItemsOutOfRange(itemsInArea)}},createAutocompletePlaces:function(placeInputID){if(typeof google==='object'&&typeof google.maps.places==='object'){var autocompleteConfig={types:['(cities)']};var autocomplete=new google.maps.places.Autocomplete(placeInputID,autocompleteConfig);autocomplete.addListener('place_changed',function(){$(placeInputID).next().show();window.qodefGeoLocation.reset();qodef.body.trigger('swissdelight_core_trigger_after_autocomplete_places',[placeInputID])})}},};window.qodefGoogleMap=qodefGoogleMap;var qodefGeoLocation={holder:'',radius:'',slider:'',init:function($holder=''){this.holder=$holder;if(this.holder.length){this.radius=this.holder.find('.qodef-places-geo-radius');this.slider=document.getElementById('qodef-range-slider-id');if(this.radius.length&&this.slider!==null){this.createSlider()}}},createSlider:function(){noUiSlider.create(this.slider,{connect:[!0,!1],start:0,step:1,tooltips:!0,format:{from:function(value){return parseInt(value)},to:function(value){return parseInt(value)},},range:{min:0,max:100,}});this.updateMapRadius()},updateMapRadius:function(){var sliderEventCount=0;this.slider.noUiSlider.on('set',function(values){var $geoLocation=qodefGeoLocation.radius.data('geo-location');if(typeof $geoLocation==='object'){window.qodefGoogleMap.setGeoLocationRadius($geoLocation,values,sliderEventCount>0);sliderEventCount++}})},reset:function(){if(this.slider!==null&&this.radius.length&&this.radius.is(':visible')){this.setRadiusVisibility('',!1);this.slider.noUiSlider.reset()}},showRangeSlider:function(latlng,visibility){if(this.radius.length){this.setRadiusVisibility(latlng,visibility)}},setRadiusVisibility:function(latlng,visibility){this.radius.data('geo-location',latlng);if(visibility){this.radius.show()}else{this.radius.hide()}},disableItemsOutOfRange:function($itemsInArea){var $holder=this.holder;if($holder.length&&typeof $itemsInArea==='object'){var $items=$holder.find('.qodef-grid-inner article'),$outOfRangeHolder,$outOfRangeItems,$inRangeHolder=$holder.find('.qodef-grid-inner');if(!$holder.children('.qodef-out-of-range-holder').length){$holder.append('<div class="qodef-out-of-range-holder"></div>')}
16$outOfRangeHolder=$holder.children('.qodef-out-of-range-holder');$outOfRangeItems=$outOfRangeHolder.children('article');if($items.length||$outOfRangeItems.length){$items.each(function(){var $thisItem=$(this),itemID=$thisItem.data('id');if(itemID!==undefined&&itemID!==!1){var itemInRange=!1;$.each($itemsInArea,function(i,id){if(parseInt(itemID,10)===id){itemInRange=!0;return!0}});if(!itemInRange){$thisItem.appendTo($outOfRangeHolder);if($holder.hasClass('qodef-layout--masonry')){$inRangeHolder.isotope('layout')}}}});if($outOfRangeItems.length){$outOfRangeItems.each(function(){var $thisOutItem=$(this),outItemID=$thisOutItem.data('id'),itemInRange=!1;$.each($itemsInArea,function(i,id){if(parseInt(outItemID,10)===id){itemInRange=!0;return!0}});if(itemInRange){$thisOutItem.appendTo($inRangeHolder);if($holder.hasClass('qodef-layout--masonry')){$inRangeHolder.isotope('layout')}}})}}}},};window.qodefGeoLocation=qodefGeoLocation})(jQuery)

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.