%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/c/a/s/casasmonvl/luxuryhotelproject/wp-content/themes/houzez/js/
Upload File :
Create Path :
Current File : /home/c/a/s/casasmonvl/luxuryhotelproject/wp-content/themes/houzez/js/osm-properties.min.js

jQuery(function(e){"use strict";if("undefined"!=typeof houzez_map_properties){if(e("#houzez-properties-map").length>0){var a,o,r=houzez_vars.is_mapbox,t=houzez_vars.api_mapbox,i=new Array,n=(new Array,1),s="",l=0,p=0,u="no",c=houzez_vars.admin_url+"admin-ajax.php",m=houzez_vars.user_id,d=houzez_vars.houzez_rtl,h=houzez_vars.processing_text,v=houzez_vars.not_found,z=houzez_vars.compare_url,_=houzez_vars.compare_add_icon,g=houzez_vars.add_compare_text,f=houzez_vars.compare_remove_icon,y=houzez_vars.remove_compare_text,x=houzez_vars.compare_limit,b=(houzez_vars.compare_page_not_found,houzez_vars.for_rent_price_slider),w=parseInt(houzez_vars.search_min_price_range),k=parseInt(houzez_vars.search_max_price_range),j=parseInt(houzez_vars.search_min_price_range_for_rent),I=parseInt(houzez_vars.search_max_price_range_for_rent),Z=(parseInt(houzez_vars.get_min_price),parseInt(houzez_vars.get_max_price),houzez_vars.currency_position),C=houzez_vars.currency_symbol,T=houzez_vars.thousands_separator,M=parseInt(houzez_vars.is_halfmap),P=parseFloat(houzez_vars.default_lat),S=parseFloat(houzez_vars.default_long),B=parseInt(houzez_vars.houzez_default_radius);if(d="yes"==d,"undefined"!=typeof houzez_map_options&&(houzez_map_options.clusterIcon,n=houzez_map_options.map_cluster_enable,houzez_map_options.clusterer_zoom,houzez_map_options.closeIcon,s=houzez_map_options.infoWindowPlac,houzez_map_options.marker_spiderfier,u=houzez_map_options.markerPricePins,houzez_map_options.map_type,houzez_map_options.googlemap_style),"mapbox"==r&&""!=t)var O=L.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token="+t,{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:18,id:"mapbox.streets",accessToken:"your.mapbox.access.token"});else O=L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'});var A=e=>{if("number"==typeof e){for(var a=(e+="").split("."),o=a[0],r=a.length>1?"."+a[1]:"",t=/(\d+)(\d{3})/;t.test(o);)o=o.replace(t,"$1"+T+"$2");return o+r}return e};e("#houzez-gmap-next").on("click",function(){!function(e){for(++l>i.length&&(l=1);!1===i[l-1].visible;)++l>i.length&&(l=1);e.getZoom()<15&&e.setZoom(15),e.setView(i[l-1].getLatLng()),i[l-1]._icon||i[l-1].__parent.spiderfy(),e.setZoom(20),l-1==0||l-1==i.length?setTimeout(function(){i[l-1].fire("click")},500):i[l-1].fire("click")}(a)}),e("#houzez-gmap-prev").on("click",function(){!function(e){for(--l<1&&(l=i.length);!1===i[l-1].visible;)--l>i.length&&(l=1);e.getZoom()<15&&e.setZoom(15),e.setView(i[l-1].getLatLng()),i[l-1]._icon||i[l-1].__parent.spiderfy(),e.setZoom(20),l-1==0||l==i.length?setTimeout(function(){i[l-1].fire("click")},500):i[l-1].fire("click")}(a)});var D=function(){for(var e=0;e<i.length;e++)a.removeLayer(i[e]);i=[],o&&a.removeLayer(o)},E=function(e){for(var a=[],o=0;o<e.length;o++)e[o].lat&&e[o].lng&&a.push([e[o].lat,e[o].lng]);return a},H=function(e,a){var r,t=E(e);1<t.length&&a.fitBounds(t),1==n&&(o=new L.MarkerClusterGroup({iconCreateFunction:function(e){var a='<div class="houzez-osm-cluster">'+e.getAllChildMarkers().length+"</div>";return L.divIcon({html:a,className:"mycluster",iconSize:L.point(47,47)})},spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0}));for(var l=0;l<e.length;l++)if(e[l].lat&&e[l].lng){var p=e[l],c=L.latLng(p.lat,p.lng),m={riseOnHover:!0};if(p.title&&(m.title=p.title),"yes"==u){var d='<div data-id="'+e[l].property_id+'" class="gm-marker gm-marker-color-'+e[l].term_id+'"><div class="gm-marker-price">'+e[l].pricePin+"</div></div>",h=L.divIcon({className:"someclass",iconSize:new L.Point(0,0),html:d});r=1==n?new L.Marker(c,{icon:h}):L.marker(c,{icon:h}).addTo(a)}else{if(p.marker){var v={iconUrl:p.marker,iconSize:[44,56],iconAnchor:[20,57],popupAnchor:[1,-57]};p.retinaMarker&&(v.iconRetinaUrl=p.retinaMarker),m.icon=L.icon(v)}r=1==n?new L.Marker(c,m):L.marker(c,m).addTo(a)}1==n&&o.addLayer(r);var z=document.createElement("div");z.className="map-info-window";var _="";_+='<div class="item-wrap">',_+='<div class="item-header">',e[l].thumbnail?_+='<a href="'+e[l].url+'"><img class="img-fluid" src="'+e[l].thumbnail+'" alt="'+e[l].title+'"/></a>':_+='<a href="'+e[l].url+'"><img class="img-fluid" src="'+s+'" alt="'+e[l].title+'"/></a>',_+="</div>",_+='<div class="item-body flex-grow-1">',_+='<h2 class="item-title">',_+='<a href="'+e[l].url+'">'+e[l].title+"</a>",_+="</h2>",_+='<ul class="list-unstyled item-info">',e[l].price&&(_+='<li class="item-price">'+e[l].price+"</li>"),e[l].property_type&&(_+='<li class="item-type">'+e[l].property_type+"</li>"),_+="</ul>",_+="</div>",_+="</div>",z.innerHTML=_,i.push(r),r.bindPopup(z)}1==n&&a.addLayer(o)};if(houzez_map_properties.length>0){var q=E(houzez_map_properties),F=L.latLng(P,S);1==q.length&&(F=L.latLng(q[0]));var G={dragging:!0,center:F,zoom:10,tap:!0};(a=L.map("houzez-properties-map",G)).scrollWheelZoom.disable(),1<q.length&&a.fitBounds(q),a.addLayer(O),document.getElementById("listing-mapzoomin")&&(R=a,e("#listing-mapzoomin").on("click",function(){var e=parseInt(R.getZoom(),10);console.log(e),++e>20&&(e=20),console.log("=="+e+" ++ "),R.setZoom(e)})),document.getElementById("listing-mapzoomout")&&function(a){e("#listing-mapzoomout").on("click",function(){var e=parseInt(a.getZoom(),10);console.log(e),--e<0&&(e=0),console.log("=="+e+" -- "),a.setZoom(e)})}(a),H(houzez_map_properties,a)}else{var N={center:[P,S],zoom:10};(a=L.map("houzez-properties-map",N)).addLayer(O),a.scrollWheelZoom.disable()}var Q=function(o){var r=e("#houzez_ajax_container"),t=e(".map-wrap"),i=e("#half-map-listing-area .page-title span"),n=e(".houzez-search-form-js"),s=e("#ajax_sort_properties").val(),l=e(".listing-view").data("layout");return e.ajax({type:"GET",dataType:"json",url:c,data:n.serialize()+"&action=houzez_half_map_listings&paged="+o+"&sortby="+s+"&item_layout="+l,beforeSend:function(){e(".houzez-map-loading").show(),r.empty().append('<div id="houzez-map-loading" class="houzez-map-loading"><div class="mapPlaceholder"><div class="loader-ripple spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div></div>'),t.append('<div id="houzez-map-loading" class="houzez-map-loading"><div class="mapPlaceholder"><div class="loader-ripple spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div></div>')},success:function(o){var t;return""!=o.query&&e('input[name="search_args"]').val(o.query),e(".map-notfound").remove(),e(".search-no-results-found").remove(),e(".houzez-map-loading").hide(),!0===o.getProperties?(D(),H(o.properties,a),r.empty().html(o.propHtml),i.empty().html(o.total_results),V(),houzez_init_add_favorite(c,m),houzez_init_remove_favorite(c,m),houzez_listing_lightbox(c,h,d,m),t=houzezGetCookie("houzez_compare_listings"),add_to_compare(z,_,f,g,y,x,t,4),remove_from_compare(t,_,f,g,y),e('[data-toggle="tooltip"]').tooltip()):(D(),e("#houzez-properties-map").append('<div class="map-notfound">'+v+"</div>"),r.empty().html('<div class="search-no-results-found">'+v+"</div>"),i.empty().html(o.total_results)),!1},error:function(e,a,o){console.log(e.status),console.log(e.responseText),console.log(o)}}),!1},W=function(e){D(),Q(e)},U=function(a,o){if(e(".price-range").slider({range:!0,min:a,max:o,values:[a,o],slide:function(a,o){if("after"==Z)var r=A(o.values[0])+C,t=A(o.values[1])+C;else r=C+A(o.values[0]),t=C+A(o.values[1]);e(".min-price-range-hidden").val(o.values[0]),e(".max-price-range-hidden").val(o.values[1]),e(".min-price-range").text(r),e(".max-price-range").text(t)},stop:function(e,a){W(p=0)}}),"after"==Z)var r=A(e(".price-range").slider("values",0))+C,t=A(e(".price-range").slider("values",1))+C;else r=C+A(e(".price-range").slider("values",0)),t=C+A(e(".price-range").slider("values",1));e(".min-price-range").text(r),e(".max-price-range").text(t),e(".min-price-range-hidden").val(e(".price-range").slider("values",0)),e(".max-price-range-hidden").val(e(".price-range").slider("values",1))};if(e(".price-range").length>0&&1==M)e(".status-js").val()==b?U(j,I):U(w,k),e(".status-js").on("change",function(){e(this).val()==b?U(j,I):U(w,k)});e("#radius-range-slider").length>0&&($=B,e("#radius-range-slider").slider({value:$,min:0,max:100,step:1,slide:function(a,o){e("#radius-range-text").html(o.value),e("#radius-range-value").val(o.value)},stop:function(a,o){e("#houzez-properties-map").length>0&&W(p=0)}}),e("#radius-range-text").html(e("#radius-range-slider").slider("value")),e("#radius-range-value").val(e("#radius-range-slider").slider("value")));var V=function(){return e(".houzez_ajax_pagination a").on("click",function(a){a.preventDefault(),p=e(this).data("houzepagi"),W(p)}),!1};V();e("#ajax_sort_properties").on("change",function(){W(p=0)}),e("select.houzez_search_ajax, input.houzez_search_ajax").on("change",function(){W(p=0)}),e(".btn-apply, .half-map-search-js-btn").on("click",function(e){e.preventDefault(),W(p=0)})}e("#houzez-gmap-full-osm").on("click",function(){var o=e(this);o.hasClass("active")?(o.removeClass("active"),o.parents(".map-wrap").removeClass("houzez-fullscreen-map")):(o.parents(".map-wrap").addClass("houzez-fullscreen-map"),o.addClass("active")),a.invalidateSize(),a.panTo(a.getCenter())}),e("#houzez-btn-map-view").on("click",function(o){o.preventDefault(),e("#half-map-listing-area, .listing-wrap").hide(),e("#map-view-wrap").show(),a.invalidateSize(),a.panTo(a.getCenter());var r=E(houzez_map_properties);1<r.length&&a.fitBounds(r)}),e("#houzez-btn-listing-view").on("click",function(a){a.preventDefault(),e("#map-view-wrap").hide(),e("#half-map-listing-area, .listing-wrap").show()}),e("input.search_location_js").length>0&&jQuery("input.search_location_js").autocomplete({source:function(e,a){jQuery.get("https://nominatim.openstreetmap.org/search",{format:"json",q:e.term},function(e){e.length?a(e.map(function(e){return{label:e.display_name,latitude:e.lat,longitude:e.lon,value:e.display_name}})):a([{value:"",label:"there are no results"}])},"json")},select:function(a,o){if(e('input[name="lat"]').val(o.item.latitude),e('input[name="lng"]').val(o.item.longitude),M){W(0)}}})}var $,R});

Zerion Mini Shell 1.0