https://minegenverden.dk/cdn/shop/t/42/assets/pickup-availability.js?v=51208237818945971411760111046
1if(!customElements.get("pickup-availability")){class PickupAvailability extends HTMLElement{constructor(){super(),this.hasAttribute("available")&&(this.errorHtml=this.querySelector("template").content.firstElementChild.cloneNode(!0),this.onClickRefreshList=this.onClickRefreshList.bind(this),this.fetchAvailability(this.dataset.variantId))}fetchAvailability(variantId){let rootUrl=this.dataset.baseUrl;rootUrl.endsWith("/")||(rootUrl=rootUrl+"/");const variantSectionUrl=`${rootUrl}variants/${variantId}/?section_id=pickup-availability`;fetch(variantSectionUrl).then(response=>response.text()).then(text=>{const sectionInnerHTML=new DOMParser().parseFromString(text,"text/html").querySelector(".shopify-section");this.renderPreview(sectionInnerHTML)}).catch(e=>{const button=this.querySelector("button");button&&button.removeEventListener("click",this.onClickRefreshList),this.renderError()})}onClickRefreshList(evt){this.fetchAvailability(this.dataset.variantId)}renderError(){this.innerHTML="",this.appendChild(this.errorHtml),this.querySelector("button").addEventListener("click",this.onClickRefreshList)}renderPreview(sectionInnerHTML){const drawer=document.querySelector("#Drawer-Pickup-Availability");if(drawer&&drawer.remove(),!sectionInnerHTML.querySelector("pickup-availability-preview")){this.innerHTML="",this.removeAttribute("available");return}this.innerHTML=sectionInnerHTML.querySelector("pickup-availability-preview").outerHTML,this.setAttribute("available",""),document.body.appendChild(sectionInnerHTML.querySelector("#Drawer-Pickup-Availability"));const button=this.querySelector("button");button&&button.addEventListener("click",e=>{document.querySelector("#Drawer-Pickup-Availability").openDrawer()})}}customElements.define("pickup-availability",PickupAvailability)}if(!customElements.get("pickup-availability-drawer")){class PickupAvailabilityDrawer extends HTMLElement{constructor(){super(),this.drawerWapper=this.querySelector(".m-drawer__wrapper"),this.drawerContent=this.querySelector(".m-drawer__content"),this.drawerClose=this.querySelector(".m-drawer__close"),this.drawerClose.addEventListener("click",e=>{e.preventDefault(),this.closeDrawer()}),document.body.addEventListener("click",e=>{e.target.classList.contains("m-drawer__wrapper")&&this.closeDrawer()})}openDrawer(){window.innerWidth<770&&(document.documentElement.classList.add("prevent-scroll"),this.drawerWapper.classList.add("mobile")),this.drawerWapper.classList.remove("m:hidden"),requestAnimationFrame(()=>{this.drawerWapper.style.setProperty("--m-bg-opacity","0.5"),this.drawerContent.style.setProperty("--m-translate-x","0")})}closeDrawer(){this.drawerWapper.style.setProperty("--m-bg-opacity","0"),this.drawerContent.style.setProperty("--m-translate-x","100%"),setTimeout(()=>{this.drawerWapper.classList.add("m:hidden"),this.drawerWapper.classList.remove("mobile"),document.documentElement.classList.remove("prevent-scroll")},300)}}customElements.define("pickup-availability-drawer",PickupAvailabilityDrawer)} 2//# sourceMappingURL=/cdn/shop/t/42/assets/pickup-availability.js.map?v=51208237818945971411760111046
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.