1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[14018],{18(e,t,r){r.r(t),r.d(t,{default:()=>i});var s=r(724),o=r(632);class i extends window.PluginBaseClass{static #e=this.options={storeListingActionsSelector:".meteor-store-locator-listing__actions",storeListingResultStoreItemSelector:".meteor-store-locator-results__store-item"};init(){document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/beforeInit"),this.storeActions=document.querySelector(this.options.storeListingActionsSelector),this.storeActions&&(this._registerEvents(),document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/afterInit"))}_registerEvents(){document.$emitter.subscribe("MeteorStoreLocator/nearestStoresButton/find",this._loadNearestStores.bind(this)),document.$emitter.subscribe("MeteorStoreLocator/list/afterDoLocationSearch",this._selectFirstStore.bind(this)),this.el.addEventListener(o.A.isTouchDevice()?"touchstart":"click",this._loadNearestStores.bind(this))}_loadNearestStores(){s.A.create(this.el),document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/beforeFind"),navigator.geolocation?(document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/gettingPosition"),navigator.geolocation.getCurrentPosition(e=>{document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/gotPosition",e.coords),document.$emitter.publish("MeteorStoreLocator/list/doLocationSearch",{lat:e.co
1ords.latitude,lng:e.coords.longitude}),s.A.remove(this.el)},e=>{s.A.remove(this.el),document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/getCurrentPositionError"),console.warn(e),this.el.innerHTML="Unable to get current position."})):(document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/notSupported"),this.el.innerHTML="Geolocation is not supported by this browser."),document.$emitter.publish("MeteorStoreLocator/nearestStoresButton/afterFind")}_selectFirstStore(){let e=this.el.querySelector(this.options.storeListingResultStoreItemSelector);if(!e)return;let t=e.getAttribute("data-store-id");document.$emitter.publish("MeteorStoreLocator/list/doSelectStore",t)}}},632(e,t,r){r.d(t,{A:()=>s});class s{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return s.isIPhoneDevice()||s.isIPadDevice()}static isNativeWindowsBrowser(){return s.isIEBrowser()||s.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":s.isTouchDevice(),"is-ios":s.isIOSDevice(),"is-native-windows":s.isNativeWindowsBrowser(),"is-iphone":s.isIPhoneDevice(),"is-ipad":s.isIPadDevice(),"is-ie":s.isIEBrowser(),"is-edge":s.isEdgeBrowser()}}}},683(e,t,r){r.d(t,{A:()=>i});let s="loader",o={BEFORE:"before",INNER:"inner"};class i{constructor(e,t=o.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===o.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=i.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),i.getTemplate())}}remove(){if(this.position===o.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===o.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status"> 2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return s}}},724(e,t,r){r.d(t,{A:()=>i});var s=r(683);let o="element-loader-backdrop";class i extends s.A{static create(e){e.classList.add("has-element-loader"),i.exists(e)||(i.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${o}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${o}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${o}`).length>0}static getTemplate(){return` 4 <div class="${o}"> 5 <div class="loader" role="status"> 6 <span class="visually-hidden">Loading...</span> 7 </div> 8 </div> 9 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",i.getTemplate())}}}}]);
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.