PageSourceSearch

https://www.vitalixworld.com/cdn/shop/t/16/assets/cart-drawer.js?v=80150289801608892571788507215

js vitalixworld.com collected 2026-10-10 00:58:56 UTC 4,002 bytes, 2 lines download raw bytes

1class CartDrawer extends HTMLElement{constructor(){super(),this.querySelector("#CartDrawer-Overlay").addEventListener("click",this.close.bind(this)),this.setHeaderCartIconAccessibility(),this._boundHandleDocumentKeyDown=this._handleDocumentKeyDown.bind(this)}setHeaderCartIconAccessibility(){const cartLink=document.querySelector("#cart-icon-bubble");cartLink&&(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(triggeredBy){triggeredBy&&this.setActiveElement(triggeredBy);const cartDrawerNote=this.querySelector('[id^="Details-"] summary');cartDrawerNote&&!cartDrawerNote.hasAttribute("role")&&this.setSummaryAccessibility(cartDrawerNote),setTimeout(()=>{this.classList.add("animate","active")},30),this.addEventListener("transitionend",()=>{const containerToTrapFocusOn=this.classList.contains("is-empty")?this.querySelector(".drawer__inner-empty"):document.getElementById("CartDrawer"),focusElement=this.querySelector(".drawer__inner")||this.querySelector(".drawer__close");typeof trapFocus=="function"&&trapFocus(containerToTrapFocusOn,focusElement)},{once:!0}),document.body.classList.add("overflow-hidden"),document.addEventListener("keydown",this._boundHandleDocumentKeyDown)}close(){this.classList.contains("active")&&(this.classList.remove("active"),typeof removeTrapFocus=="function"&&this.activeElement&&removeTrapFocus(this.activeElement),document.body.classList.remove("overflow-hidden"),document.removeEventListener("keydown",this._boundHandleDocumentKeyDown))}_handleDocumentKeyDown(event){if(event.code==="Escape"&&this.classList.contains("active")){if(document.querySelector("modal-drawer[open]"))return;event.preventDefault(),this.close()}}setSummaryAccessibility(cartDrawerNote){cartDrawerNote.setAttribute("role","button"),cartDrawerNote.setAttribute("aria-expanded","false"),cartDrawerNote.nextElementSibling.getAttribute("id")&&cartDrawerNote.setAttribute("aria-controls",cartDrawerNote.nextElementSibling.id),cartDrawerNote.addEventListener("click",event=>{event.currentTarget.setAttribute("aria-expanded",!event.currentTarget.closest("details").hasAttribute("open"))}),typeof onKeyUpEscape=="function"&&cartDrawerNote.parentElement.addEventListener("keyup",onKeyUpEscape)}renderContents(parsedState){const drawerInner=this.querySelector(".drawer__inner");drawerInner&&drawerInner.classList.contains("is-empty")&&drawerInner.classList.remove("is-empty"),this.productId=parsedState.id,this.getSectionsToRender().forEach(section=>{const sectionElement=section.selector?document.querySelector(section.selector):document.getElementById(section.id);sectionElement&&(sectionElement.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.id],section.selector))}),setTimeout(()=>{const overlay=this.querySelector("#CartDrawer-Overlay");overlay&&(overlay.removeEventListener("click",this.close.bind(this)),overlay.addEventListener("click",this.close.bind(this))),this.open()},50)}getSectionInnerHTML(html,selector=".shopify-section"){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}getSectionsToRender(){return[{id:"cart-drawer",selector:"#CartDrawer"},{id:"cart-icon-bubble"}]}getSectionDOM(html,selector=".shopify-section"){return new DOMParser().parseFromString(html,"text/html").querySelector(selector)}setActiveElement(element){this.activeElement=element}}customElements.define("cart-drawer",CartDrawer);class CartDrawerItems extends CartItems{getSectionsToRender(){return[{id:"CartDrawer",section:"cart-drawer",selector:".drawer__inner"},{id:"cart-icon-bubble",section:"cart-icon-bubble",selector:".shopify-section"}]}}customElements.define("cart-drawer-items",CartDrawerItems);
2//# sourceMappingURL=/cdn/shop/t/16/assets/cart-drawer.js.map?v=80150289801608892571788507215

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.