https://queenstation.fi/cdn/shop/t/42/assets/pickup-availability.js?v=108648253170043720721787748260
1customElements.get("pickup-availability")||customElements.define("pickup-availability",class extends BaseElement{connectedCallback(){super.connectedCallback(),this.hasAttribute("available")&&(this.errorHtml=this.errorHtml||this.querySelector("template").content.firstElementChild.cloneNode(!0),this.onClickRefreshList=this.onClickRefreshList.bind(this),this.fetchAvailability(this.getAttribute("data-variant-id")))}fetchAvailability(variantId){let rootUrl=this.getAttribute("data-root-url");rootUrl.endsWith("/")||(rootUrl=rootUrl+"/");const variantSectionUrl=`${rootUrl}variants/${variantId}/?section_id=pickup-availability`;this.availabilityAbortController?.abort(),this.availabilityAbortController=new AbortController,fetch(variantSectionUrl,{signal:this.availabilityAbortController.signal}).then(response=>response.text()).then(responseText=>{const sectionInnerHTML=new DOMParser().parseFromString(responseText,"text/html").querySelector(".shopify-section");this.renderPreview(sectionInnerHTML)}).catch(error=>{error.name!=="AbortError"&&this.renderError()})}onClickRefreshList(){this.fetchAvailability(this.getAttribute("data-variant-id"))}update(variant){variant?.available?this.fetchAvailability(variant.id):(this.innerHTML="",this.removeAttribute("available"),this.setAttribute("hidden",""))}renderError(){this.innerHTML="",this.appendChild(this.errorHtml);const button=this.querySelector("button");button&&this.on(button,"click",this.onClickRefreshList)}renderPreview(sectionInnerHTML){const drawer=document.querySelector(".pickup-availability-drawer");if(drawer&&drawer.remove(),!sectionInnerHTML.querySelector(".pickup-availability-preview")){this.innerHTML="",this.removeAttribute("available"),this.setAttribute("hidden","");return}this.innerHTML=sectionInnerHTML.querySelector(".pickup-availability-preview").outerHTML,this.removeAttribute("hidden"),this.setAttribute("available",""),document.body.appendChild(sectionInnerHTML.querySelector(".pickup-availability-drawer"))}}); 2//# sourceMappingURL=/cdn/shop/t/42/assets/pickup-availability.js.map?v=108648253170043720721787748260
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.