PageSourceSearch

https://londonrugcompany.com/cdn/shop/t/27/assets/sticky-atc.aio.min.js?v=103635132293243865281761645969

js londonrugcompany.com collected 2026-09-30 10:40:25 UTC 3,385 bytes, 5 lines download raw bytes

1/*
2Generated time: April 24, 2025 08:09
3This file was created by the app developer. Feel free to contact the original developer with any questions. It was minified (compressed) by AVADA. AVADA do NOT own this script.
4*/
5function throttle(t,e=300){let i=-1,a=!1;return()=>{clearTimeout(i),i=setTimeout(t,e),a||(t.call(),a=!0,setTimeout(()=>{a=!1},e))}}customElements.get("sticky-atc")||customElements.whenDefined("product-form").then(()=>{class t extends customElements.get("product-form"){constructor(){super(),this.section=this.closest(".section-main-product"),this.mainProductForm=this.section.querySelector(".js-product"),this.buyButtons=this.section.querySelector("buy-buttons"),this.imageContainer=this.querySelector(".sticky-atc__image"),this.variantContainer=this.querySelector(".sticky-atc__details__variant"),this.variantTitle=this.querySelector(".sticky-atc__details__variant__title"),this.variantTitle?.toggleAttribute("hidden",!this.section.querySelector("variant-picker")),this.throttledOnScroll=throttle(t.handleScroll.bind(this)),window.addEventListener("scroll",this.throttledOnScroll),this.section.addEventListener("on:variant:change",this.onVariantChange.bind(this)),this.section.addEventListener("on:media-gallery:change",this.updateImage.bind(this)),this.updateImage()}disconnectedCallback(){window.removeEventListener("scroll",this.throttledOnScroll)}async handleSubmit(t){if(t.preventDefault(),this.section.querySelector('product-form buy-buttons input[name="id"]').value){var e,i,a=this.mainProductForm.validate();if(a&&this.mainProductForm.form.reportValidity()){this.form.querySelectorAll("[data-copied]").forEach(t=>t.remove());for(e of new FormData(this.mainProductForm.form))this.form.querySelector(`[name="${e[0]}"]`)||((i=document.createElement("input")).name=e[0],i.value=e[1],i.hidden=!0,i.setAttribute("data-copied",""),this.form.append(i));super.handleSubmit(t)}else if(t.preventDefault(),a){let t=Array.from(this.mainProductForm.form.elements).find(t=>!t.checkValidity());setTimeout(()=>theme.scrollToRevealElement(t),100)}else theme.scrollToRevealElement(this.mainProductForm)}else(a=this.section.querySelector("#product-info"))&&a.offsetParent&&(t.preventDefault(),theme.scrollToRevealElement(a))}static handleScroll(){var t=document.querySelector(".pageheader--sticky")?document.querySelector(".section-header").offsetHeight:0;this.classList.toggle("sticky-atc--out",this.buyButtons.getBoundingClientRect().bottom>t),document.body.classList.toggle("scrolled-to-bottom",window.scrollY+window.innerHeight+100>document.body.scrollHeight)}onVariantChange(t){var e=this.form?.querySelector('[name="id"]');t.detail.variant?(this.variantTitle.textContent=t.detail.variant.title,this.variantContainer.hidden=!1,e&&(e.value=t.detail.variant.id)):(this.variantContainer.hidden=!0,this.variantTitle.textContent="",e&&(e.value="")),this.updateImage(),this.updateAddToCartButton(t.detail.variant),this.setErrorMsgState()}updateImage(){var t=this.section.querySelector(".media-gallery .main-image .slider__item.is-active .product-media img");t?this.imageContainer.innerHTML=t.outerHTML:this.imageContainer.textContent=""}updateAddToCartButton(t){var e;this.submitBtn&&(e=t&&t.available,t=t?theme.strings.noStock:this.submitBtn.dataset.unavailableText,this.submitBtn.textContent=e?this.submitBtn.dataset.addToCartText:t)}}customElements.define("sticky-atc",t)});

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.