PageSourceSearch

https://sarrieri.com/cdn/shop/t/66/assets/cart-drawer.js?v=53411242306252294231706527906

js sarrieri.com collected 2026-09-26 09:26:58 UTC 2,345 bytes, 2 lines download raw bytes

1const sectionsToRender=[{id:"#cart-counter",section:"cart-counter",selector:"#shopify-section-cart-counter"},{id:"#CartDrawer-Body",section:"cart-drawer",selector:"#shopify-section-cart-drawer #CartDrawer-Body"}];class CartDrawer extends HTMLElement{constructor(){super(),this.addEventListener("keyup",event=>event.code.toUpperCase()==="ESCAPE"&&this.close()),this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.close.bind(this)),this.setCartLink(),this.parentElement.addEventListener("shopify:section:select",()=>this.open()),this.parentElement.addEventListener("shopify:section:deselect",()=>this.close())}setCartLink(){const cartLink=document.querySelector("[data-cart-link]");cartLink.setAttribute("role","button"),cartLink.setAttribute("aria-haspopup","dialog"),cartLink.addEventListener("click",event=>{event.preventDefault(),this.open(cartLink)}),cartLink.addEventListener("keydown",event=>{event.code.toUpperCase()==="SPACE"&&(event.preventDefault(),this.open(cartLink))})}open(opener){opener&&this.setActiveElement(opener),this.classList.add("is-visible"),this.addEventListener("transitionend",()=>{this.focusOnCartDrawer()},{once:!0}),bodyScroll.lock(this.querySelector('[role="dialog"]'))}close(){this.classList.remove("is-visible"),removeTrapFocus(this.activeElement),!header.classList.contains("menu-open")&&bodyScroll.unlock(this.querySelector('[role="dialog"]'))}setActiveElement(element){this.activeElement=element}focusOnCartDrawer(){const containerToTrapFocusOn=this.firstElementChild,focusElement=this.querySelector("[data-drawer-close]");trapFocus(containerToTrapFocusOn,focusElement)}renderContents(response,open=!0){this.getSectionsToRender()?.forEach(section=>{const sectionElement=document.querySelector(section.id);sectionElement.innerHTML=this.getSectionInnerHTML(response.sections[section.section],section.selector)}),open&&this.open()}getSectionsToRender(){return sectionsToRender}getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}}customElements.define("cart-drawer",CartDrawer);class CartDrawerItems extends CartItems{getSectionsToRender(){return sectionsToRender}}customElements.define("cart-drawer-items",CartDrawerItems);
2//# sourceMappingURL=/cdn/shop/t/66/assets/cart-drawer.js.map?v=53411242306252294231706527906

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.