PageSourceSearch

https://asoliani.com/cdn/shop/t/120/assets/addtocart-sticky.js?v=93596189829911135101783973771

js asoliani.com collected 2026-10-04 15:04:24 UTC 2,537 bytes, 2 lines download raw bytes

1if(!customElements.get("product-add-to-cart-sticky")){class ProductAddToCartSticky extends HTMLElement{constructor(){super(),this.handleScroll=this.handleScroll.bind(this),this.sectionId=this.dataset.section,this.variantChangeUnsubscriber=void 0}connectedCallback(){this.targetElement=document.querySelector('[id^="ProductSubmitButton-"]'),this.footerElement=document.querySelector("footer"),this.stickyAtcVariantInput=this.querySelector(".product-variant-id"),window.addEventListener("scroll",this.handleScroll),this.variantChangeUnsubscriber=subscribe(PUB_SUB_EVENTS.variantChange,this.handleVariantChange.bind(this)),this.handleScroll()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll),this.variantChangeUnsubscriber&&this.variantChangeUnsubscriber()}getAbsoluteTop(element){if(!element)return 0;let top=0;for(;element;)top+=element.offsetTop||0,element=element.offsetParent;return top}handleScroll(){if(!this.targetElement||!this.footerElement)return;const targetTopPosition=this.getAbsoluteTop(this.targetElement),footerTopPosition=this.getAbsoluteTop(this.footerElement),isTargetElementOutOfView=targetTopPosition<window.scrollY,isFooterInView=window.scrollY+window.innerHeight>footerTopPosition;isTargetElementOutOfView&&!isFooterInView?this.classList.add("show"):this.classList.remove("show")}handleVariantChange({data:{sectionId,html,variant}}){const mainSectionId=this.sectionId.replace(/^template--\d+__/,""),eventSectionId=sectionId.replace(/^template--\d+__/,"");mainSectionId===eventSectionId&&(this.stickyAtcVariantInput&&(this.stickyAtcVariantInput.value=variant?.id||"",this.stickyAtcVariantInput.dispatchEvent(new Event("change",{bubbles:!0}))),this.updateStickyOptionsFromHTML(sectionId,html))}updateStickyOptionsFromHTML(sectionId,html){const sourceOptionsContainer=html.querySelector(".selected-variant-details .options-container"),destinationOptionsContainer=this.querySelector(".selected-variant-details .options-container");if(!sourceOptionsContainer||!destinationOptionsContainer)return;const sourceOptions=sourceOptionsContainer.querySelectorAll(".selected-variant-option"),destinationOptions=destinationOptionsContainer.querySelectorAll(".selected-variant-option");sourceOptions.forEach((sourceOption,index)=>{destinationOptions[index]&&(destinationOptions[index].textContent=sourceOption.textContent)})}}customElements.define("product-add-to-cart-sticky",ProductAddToCartSticky)}
2//# sourceMappingURL=/cdn/shop/t/120/assets/addtocart-sticky.js.map?v=93596189829911135101783973771

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.