PageSourceSearch

https://www.sisley-paris.com/on/demandware.static/Sites-Sisley_US-…/-/en_US/v1790295655046/js/storeLocator.js

js sisley-paris.com collected 2026-09-25 14:48:16 UTC 13,123 bytes, 1 lines download raw bytes

1!function(){var t,o={2682:function(t){var o={},e=!1;function a(){o.storelocatorPopin.removeClass("in"),o.body.removeClass("no-scroll"),o.overlayLayer.removeClass("show c-storelocator-popin--open")}function r(){$.ajax({url:o.storelocatorPopinToggler.attr("data-storelocator-display"),method:"GET",success:function(t){!function(t){""===o.storelocatorPopin.html()&&o.storelocatorPopin.append(t),o.storelocatorPopin.addClass("in"),o.body.addClass("no-scroll"),o.overlayLayer.addClass("show c-storelocator-popin--open")}(t),$(".c-storelocator-popin__close-button").on("click",a),e=!0}})}function s(){o.storelocatorPopinToggler.on("click",r)}t.exports=function(){o.window=$(window),o.body=$("body"),o.overlayLayer=$(".modal-background"),o.storelocatorPopin=$(".c-storelocator-popin"),o.storelocatorPopinToggler=$(".js-storelocator-toggler"),Foundation.MediaQuery.atLeast("md")||s(),o.window.on("changed.zf.mediaquery",(function(){Foundation.MediaQuery.atLeast("md")||!1!==e?a():s()})),o.overlayLayer.on("click",a),$("body").on("click",".c-storelocator-popin__actions",(function(t){t.preventDefault(),a()}))}},2731:function(t){var o,e={};function a(t,o){var e=t;return e+=(-1!==e.indexOf("?")?"&":"?")+Object.keys(o).map((function(t){return t+"="+encodeURIComponent(o[t])})).join("&")}function r(t,e){var a,r=new google.maps.InfoWindow,s=$(".map-canvas").data("centerBox"),n={scrollwheel:!1,zoom:4,center:new google.maps.LatLng(s.centerLat,s.centerLng),styles:[{stylers:[{saturation:-100}]}]};a=new google.maps.Map($(".map-canvas")[0],n);var l=new google.maps.LatLngBounds(new google.maps.LatLng(s.swLat,s.swLng),new google.maps.LatLng(s.neLat,s.neLng));a.fitBounds(l);var i=$(".store-locator__detailed-container").length?$(".store-locator__store-details[data-store-id]"):$(".store-locator__details[data-store-id]");1==i.length&&(t=!0,e={lat:parseFloat($(i).data("store-latitude")),long:parseFloat($(i).data("store-longitude"))}),t&&google.maps.event.addListenerOnce(a,"bounds_changed",(function(){if(this.getZoom()){this.setCenter({lat:e.lat,lng:e.long});var t=.05,o=new google.maps.LatLngBounds(new google.maps.LatLng(e.lat-t,e.long-t),new google.maps.LatLng(e.lat+t,e.long+t));this.fitBounds(o),this.setZoom(10),this.setCenter(o.getCenter())}}));var c={path:"M1.534 5.034c3.018-4.949 9.478-6.516 14.43-3.5 4.951 3.019 6.518 9.478 3.5 14.427L10.5 30.667 1.534 15.96a10.494 10.494 0 0 1 0-10.927",fillColor:"#000000",fillOpacity:1,scale:1.1,anchor:new google.maps.Point(13,30),labelOrigin:new google.maps.Point(12,12)},d=$("#store-postal-code")[0],p=$(".js-current-country").data("current-country"),u=$(".js-current-country").data("country-filter");(o=new google.maps.places.Autocomplete(d,{types:["geocode"]}))&&(o.bindTo("bounds",a),o.setFields(["geometry"]),p&&u&&p.split(",").length<=5&&o.setComponentRestrictions({country:p.split(",")}));if(l=new google.maps.LatLngBounds,i.length>1)$.each(i,(function(t,o){var e=parseInt(t,10)+1,s=new google.maps.LatLng(parseFloat($(o).data("store-latitude")),parseFloat($(o).data("store-longitude"))),n=$(o).data("store-id"),d=$(o).data("store-name"),p=$(o).data("store-has-brand"),u=new google.maps.Marker({position:s,map:a,title:d,icon:c,label:{text:e.toString(),color:"white",fontSize:"14px"}});if(l.extend(s),0==$(".store-locator__detailed-container").length){var g=$("#storeDetailMapTemplate").clone();$(".store-locator__details--map",g).attr("data-store-id",n),$(".store-name.c-card__title",g).append(d),$(".store-locator__address address",g).prepend($(o).find(".store-locator__address address").html()),$(".store-locator__link-details",g).length&&$(".store-locator__link-details",g).attr("href",$(".store-locator__link-details",g).attr("href").replace("_storeID_",n)),$(".store-locator__link-route",g).attr("href",$(o).find(".store-locator__link-map").attr("href")),p?$(".store-locator__brand-list",g).append($(o).find(".store-locator__brand-list").html()):$(".store-locator__brands",g).remove();var _=g.html();u.addListener("click",(function(){Foundation.MediaQuery.atLeast("md")?(r.setOptions({content:_,minWidth:300,maxWidth:300}),r.open(a,u)):$(".store-locator__results-card--small").empty().append(_),setTimeout((function(){$(".js-result-index").html(e.toString()+" - ")}),10)})),$(document).on("click",".store-locator__link-map",(function(t){t.preventDefault();var o=new google.maps.LatLngBounds,s=$(this).closest(".store-locator__details").data("store-id");n==s&&(Foundation.MediaQuery.atLeast("md")?(r.setOptions({content:_,maxWidth:289}),r.open(a,u)):$(".store-locator__results-card--small").empty().append(_),$(".js-result-index").html(e.toString()+" - "),o.extend(u.position),i&&0!==i.length&&(a.fitBounds(o),a.setZoom(15),a.setCenter(u.position)))}))}})),a.fitBounds(l);else{var g=new google.maps.LatLng(parseFloat($(i).data("store-latitude")),parseFloat($(i).data("store-longitude"))),_=$(i).data("store-id"),f=$(i).data("store-name"),m=$(i).data("store-has-brand"),h=new google.maps.Marker({position:g,map:a,title:f,icon:c,label:{text:"1",color:"white",fontSize:"14px"}});if(0==$(".store-locator__detailed-container").length){var v=$("#storeDetailMapTemplate").clone();$(".store-locator__details--map",v).attr("data-store-id",_),$(".store-name.c-card__title",v).append(f),$(".store-locator__address address",v).prepend($(i).find(".store-locator__address address").html()),$(".store-locator__link-detail
1s",v).length&&$(".store-locator__link-details",v).attr("href",$(".store-locator__link-details",v).attr("href").replace("_storeID_",_)),$(".store-locator__link-route",v).attr("href",$(i).find(".store-locator__link-map").attr("href")),m?$(".store-locator__brand-list",v).append($(i).find(".store-locator__brand-list").html()):$(".store-locator__brands",v).remove();var y=v.html();h.addListener("click",(function(){Foundation.MediaQuery.atLeast("md")&&(r.setOptions({content:y,maxWidth:289}),r.open(a,h))}))}}if(s.initialRadius){var w={center:new google.maps.LatLng(s.centerLat,s.centerLng),fillOpacity:0,strokeOpacity:0,map:a,radius:parseFloat(s.initialRadius)},L=new google.maps.Circle(w);a.fitBounds(L.getBounds())}}function s(t){var o=$(".store-locator__results .store-locator__shops"),e=$(".map-canvas"),a=t.stores&&t.stores.length>0;a?($(".store-locator-no-results").addClass("hide"),$(".store-locator-your-results").removeClass("hide")):($(".store-locator-no-results").removeClass("hide"),$(".store-locator-your-results").addClass("hide")),o.empty();var s=t.stores.isRTL;$.each(t.stores,(function(t,e){var a=$("#storeDetailTemplate").clone();$(".store-locator__details",a).attr("data-store-id",e.ID),$(".js-store-locator__details-wrapper",a).attr("id",e.ID),$(".store-locator__details",a).attr("data-store-name",e.name),$(".store-locator__details",a).attr("data-store-has-brand",e.brands.length>0),$(".store-locator__details",a).attr("data-store-latitude",e.latitude),$(".store-locator__details",a).attr("data-store-longitude",e.longitude),$(".store-name.c-card__title",a).append(t+1+" - "+e.name),$(".store-locator__address address",a).prepend(e.address1),e.address2&&$(".store-locator__postal-code-city",a).before(" "+e.address2),e.stateCode&&$(".store-locator__postal-code-city",a).before(" "+e.stateCode),e.postalCode&&$(".store-locator__postal-code-city",a).append(e.postalCode),e.city&&$(".store-locator__postal-code-city",a).append(" "+e.city),0!==e.brands.length?($(".store-locator__brand-list",a).addClass(s?"col-xs-12":"col-xs-11 col-sm-9"),$.each(e.brands,(function(t,o){$(".store-locator__brand-list",a).append("<div class='store-locator__brand-item'>"+o.displayValue+"</div>")}))):$(".store-locator__brands",a).remove(),$(".store-locator__link-map",a).attr("href","https://maps.google.com/?daddr="+e.latitude+","+e.longitude),o.append(a.html())})),o.data("has-results",a).data("radius",t.radius).data("filters",t.filters).data("search-key",t.searchKey),e.data("has-google-api")&&a?r(!0,t.searchKey):e.data("has-google-api")||$(".store-locator-no-apiKey").removeClass("hide")}function n(t,e,a){var r,s=o.getPlace();s&&s.geometry?(r=s.geometry.location,l(t,r,a)):(new google.maps.Geocoder).geocode({address:e},(function(o,e){if("OK"===e){var s=o[0].geometry.location.lat(),n=o[0].geometry.location.lng();r=new google.maps.LatLng(s,n)}l(t,r,a)}))}function l(t,o,r){var n=t.closest(".in-store-inventory-dialog"),l=n.length?n.spinner():$.spinner(),i=t.closest(".store-locator"),c=$("#store-postal-code"),d=i.attr("action");return e={},o?(e={lat:o.lat(),long:o.lng(),field:c.val()},c.removeClass("is-invalid")):c.val()?c.addClass("is-invalid"):(e={getAllStores:!0},c.removeClass("is-invalid")),d=a(d,e),r?d=function(t){var o=[],e=$(".store-locator__filter-value-link.selected");if(e.length>0){e.each((function(){o.push($(this).data("filter"))})),t=a(t,{filters:o=o.join("|")})}return t}(d):$(".store-locator__filter-value-link").removeClass("selected"),l.start(),$.ajax({url:d,type:i.attr("method"),dataType:"json",success:function(t){l.stop(),s(t),$(".store-locator__filters-list").addClass("hide"),$(".select-store").prop("disabled",!0),document.body.dispatchEvent(new CustomEvent("after:store-locator"))},error:function(t){l.stop(),s(t)}}),!1}var i=function(){window.navigator.geolocation&&window.navigator.geolocation.getCurrentPosition((function(t){var o=$(".js-detect-location"),e=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);(new google.maps.Geocoder).geocode({latLng:e},(function(t,e){if(e==google.maps.GeocoderStatus.OK){var a=t[0].formatted_address;n(o,a)}}))}))},c=function(){setTimeout(i)},d=function(){$.spinner().stop(),$("#store-postal-code").addClass("is-invalid"),$("#store-locator__permission-error").addClass("show")},p=function(){$("#store-postal-code").removeClass("is-invalid"),$("#store-locator__permission-error").removeClass("show")};function u(t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var o=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return null===o?"":decodeURIComponent(o[1].replace(/\+/g," "))}t.exports={init:function(){var t=u("lat"),o=u("long");t&&o?r(!0,{lat:parseFloat(t),long:parseFloat(o)}):$(".map-canvas").data("has-google-api")?r(!1):$(".store-locator-no-apiKey").removeClass("hide");$(".store-locator__results").data("has-results")||$(".store-locator-no-results").removeClass("hide")},toggleDesktopFilters:function(){$(".store-locator__filters-toggler").on("click",(function(){$(this).toggleClass("store-locator__filters-toggler--opened"),$(".store-locator__filters-list").toggleClass("hide")}))},detectLocation:function(){$(".js-detect-location").on("click",(function(){$.spinner().start(),("undefined"==typeof process||process.browser)&&navigator.permissions&&navigator.permissions.query?window.navigator.permissions.query({name:"geolocation"}).then((function(t){"granted"==t.state||"prompt"==t.state?($.spinner().stop(),c()):"denied"==t.state&&d(),t.onchange=function(){"denied"==t.state&&d()}})):$.spinner().stop()})),$("#store-postal-code").on("click",p)}
1,search:function(){$('.store-locator__container .btn-storelocator-search[type="button"]').click((function(t){t.preventDefault();var o=$("#store-postal-code").val();n($(this),o)})),$("#store-postal-code").on("keydown",(function(t){if(13==t.which){t.preventDefault();var o=$("#store-postal-code").val();n($(this),o)}}))},filter:function(){$(document).on("click",".store-locator__filter-value-link",(function(t){t.preventDefault(),$(this).toggleClass("selected");var o=$("#store-postal-code").val();n($(this),o,!0)}))},changeRadius:function(){$(".store-locator__container .radius").change((function(){var t=$(".store-locator__results").data("search-key"),o=$(".radius").data("action-url"),e={};t.postalCode?e={postalCode:t.postalCode,field:$("#store-postal-code").val()}:t.lat&&t.long&&(e={lat:t.lat,long:t.long,field:$("#store-postal-code").val()}),o=a(o,e);var r=$(this).closest(".in-store-inventory-dialog"),n=r.length?r.spinner():$.spinner();n.start(),$.ajax({url:o,type:"get",dataType:"json",success:function(t){n.stop(),s(t),$(".select-store").prop("disabled",!0)}})}))},selectStore:function(){$(".store-locator__container").on("click",".select-store",(function(t){t.preventDefault();var o=$(":checked",".store-locator__results-card .store-locator__results"),e={storeID:o.val(),searchRadius:$("#radius").val(),searchPostalCode:$(".store-locator__results").data("search-key").postalCode,storeDetailsHtml:o.siblings("label").find(".store-locator__details").addClass("store-locator__details--map").html(),event:t};$("body").trigger("store:selected",e)}))},updateSelectStoreButton:function(){$("body").on("change",".select-store-input",(function(){$(".select-store").prop("disabled",!1)}))},searchParams:function(){$("body").on("click",".store-locator__link-details",(function(t){t.preventDefault();var o=$(this).attr("href");o=a(o,e),window.location.replace(o)}))}}},6790:function(t){t.exports=function(t){"function"==typeof t?t():"object"==typeof t&&Object.keys(t).forEach((function(o){"function"==typeof t[o]&&t[o]()}))}}},e={};function a(t){var r=e[t];if(void 0!==r)return r.exports;var s=e[t]={exports:{}};return o[t](s,s.exports,a),s.exports}t=a(6790),$(document).ready((function(){t(a(2731)),t(a(2682))}))}();

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.