PageSourceSearch

https://vegoutvoyage.com/cdn/shop/t/8/assets/cart.js?v=135984084590766456771758426726

js vegoutvoyage.com collected 2026-09-26 15:32:16 UTC 4,198 bytes, 2 lines download raw bytes

1class CartItems extends HTMLElement{constructor(){super(),this.cartCountDown=document.getElementById(`CartCountdown-${this.dataset.section}`),this.giftCardElement=document.getElementById("is-a-gift"),this.giftCardButton=document.getElementById("cart-gift-wrapping"),this.removeButtons=document.querySelectorAll("[data-cart-remove]"),this.toCheckoutButton=document.getElementById("cart-checkout"),this.couponCodeInput=document.getElementById("cart-coupon-code"),this.cartNoteInput=document.getElementById("cart-note"),this.checkTerms=document.getElementById("cart_conditions"),this.toCheckoutButton?.addEventListener("click",this.handleToCheckoutPage.bind(this)),this.initToCheckoutButtonDisabling(),this.initCartCountdown(),this.giftCardElement&&this.initGiftCardElement(),this.initGiftCardManipulation()}initGiftCardElement(){if(this.giftCardButton?.dataset.isChecked==="true"){const variantId=this.giftCardButton?.dataset.giftId,giftCardRemoveButton=document.querySelector(`[data-cart-remove-id="${variantId}"]`),giftCardQuantityInput=document.querySelector(`[data-cart-quantity-id="${variantId}"]`);this.giftCardElement.style.display="none",giftCardRemoveButton?.addEventListener("click",()=>{this.giftCardButton.dataset.isChecked="false"}),giftCardQuantityInput?.addEventListener("change",e=>{Number(e.target.value)<=0&&(this.giftCardButton.dataset.isChecked="false")})}else this.giftCardElement.style.display="flex"}initGiftCardManipulation(){this.giftCardButton&&(this.giftCardButton.removeEventListener("click",this.onAddGiftCardClick.bind(this)),this.giftCardButton.addEventListener("click",this.onAddGiftCardClick.bind(this)))}onAddGiftCardClick(e){e.preventDefault(),e.stopPropagation(),this.giftCardButton.dataset.isChecked="true"}initToCheckoutButtonDisabling(){this.checkTerms&&window.addEventListener("load",()=>{this.toCheckoutButton.disabled=!this.checkTerms.checked})}async handleToCheckoutPage(e){e.preventDefault();try{const couponCode=this.couponCodeInput?.value;if(couponCode){localStorage.setItem("storedDiscount",couponCode);const text1=await(await fetch(`/discount/${couponCode}`)).text()}const cartNote=this.cartNoteInput?.value;if(cartNote){const cartNoteBody=JSON.stringify({note:cartNote}),text2=await(await fetch(`${routes.cart_update_url}`,{...fetchConfig(),body:cartNoteBody})).text()}}catch(error){console.error(`Error: ${error.message}`)}let checkoutHref=this.toCheckoutButton.dataset.href;checkoutHref==null&&(checkoutHref=`${window.routes?.root?window.routes.root:""}/checkout`),this.toCheckoutButton.classList.add("is-loading"),document.documentElement.outerHTML.includes("cdn-sf.vitals.app")?setTimeout(()=>{window.location=checkoutHref},1e3):window.location=checkoutHref}initCartCountdown(){if(this.cartCountDown&&!this.cartCountDown.classList.contains("is-running")){const duration=this.cartCountDown.getAttribute("data-cart-countdown")*60,element=this.cartCountDown.querySelector(".time");this.cartCountDown.classList.add("is-running"),this.startTimerCartCountdown(duration,element)}}startTimerCartCountdown(duration,element){var timer=duration,minutes,seconds,text,startCoundown=setInterval(()=>{minutes=parseInt(timer/60,10),seconds=parseInt(timer%60,10),minutes=minutes<10?"0"+minutes:minutes,seconds=seconds<10?"0"+seconds:seconds,text=minutes+":"+seconds,element.innerText=text,--timer<0&&(clearInterval(startCoundown),this.cartCountDown.remove())},1e3)}}customElements.define("cart-items",CartItems);class Accordion extends HTMLElement{constructor(){super(),this.header=this.firstElementChild,this.content=this.lastElementChild,this.header.addEventListener("click",this.onSummaryClick.bind(this))}onSummaryClick(event){event.preventDefault(),this.hasAttribute("open")?this.close():this.open(event)}open(event){this.setAttribute("open",!0),this.setAttribute("aria-expanded","true"),this.content.setAttribute("aria-hidden","false"),$(this.content).slideDown()}close(){this.removeAttribute("open"),this.setAttribute("aria-expanded","false"),this.content.setAttribute("aria-hidden","true"),$(this.content).slideUp()}}customElements.define("accordion-block",Accordion);
2//# sourceMappingURL=/cdn/shop/t/8/assets/cart.js.map?v=135984084590766456771758426726

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.