https://rabblewine.com/cdn/shop/t/11/assets/awtomic-theme-custom.js?v=147804056468776667631711561454
1window.bundleapp=window.bundleapp||{},window.bundleapp.settings=Object.assign({},window.bundleapp.settings||{},{bab:{productImage:600,addToCartRedirect:({cartItems,discountCode})=>{const openCartEvent=new Event("reloadCartAndOpen",{cartItems,discountCode});window.dispatchEvent(openCartEvent),window.location.assign(`/discount/${discountCode}?redirect=/checkout`)}}});let total=0;window.selections={};function updateSelectionImages(selection){let imagesContainer=document.getElementById("awt-images-container");imagesContainer||(imagesContainer=document.createElement("div"),imagesContainer.id="awt-images-container",document.querySelector(".bundleapp-modal__container--complete-screen").appendChild(imagesContainer)),imagesContainer.innerHTML="",Object.entries(selection).forEach(([id,{quantity,img}])=>{if(!quantity)return;const imageContainer=document.createElement("div");imageContainer.classList.add("awt-custom-selection-container");const image=document.createElement("img");image.src=img,image.classList.add("awt-custom-selection"),image.alt="Selected product image";const badge=document.createElement("span");badge.classList.add("awt-custom-selection-badge"),badge.textContent=quantity,imageContainer.appendChild(image),imageContainer.appendChild(badge),imagesContainer.appendChild(imageContainer)})}const getTotals=()=>{setTimeout(()=>{const bundleProductCards=document.querySelectorAll(".bundle-product-card");let totalQuantity=0;if(bundleProductCards.forEach(card=>{const quantity=parseInt(card.getAttribute("quantity"));isNaN(quantity)||(quantity?window.selections[card.getAttribute("pid")]={quantity,img:card.querySelectorAll("img")[1].src}:window.selections[card.getAttribute("pid")]={quantity:0},totalQuantity+=quantity)}),updateSelectionImages(window.selections),!document.querySelector("#upgrade-bundle-button")){const footerContainer=document.querySelector(".bundleapp-modal__container--complete-screen footer > div > div"),button=document.createElement("button");button.id="upgrade-bundle-button",button.classList.add("bundle-button"),button.classList.add("button--primary"),button.innerHTML="Add more to save 10%";const sellingPlanValue=new URLSearchParams(window.location.search).get("selling_plan")||"onetime";button.addEventListener("click",function(){window.location.href=`/tools/bundle-subscriptions/bundle/7923336806569?product=6-plus-bottles&selling_plan=${sellingPlanValue}&${Object.keys(window.selections).map(key=>`${key}=${window.selections[key].quantity}`).join("&")}`}),footerContainer.appendChild(button)}totalQuantity>=5&&window.location.href.includes("/tools/bundle-subscriptions/bundle/7923335168169")?document.querySelector("#upgrade-bundle-button")&&document.querySelector("#upgrade-bundle-button").classList.add("visible"):document.querySelector("#upgrade-bundle-button")&&document.querySelector("#upgrade-bundle-button").classList.remove("visible"),console.log({totalQuantity,selections:window.selections})},10)};if(window.location.href.includes("/tools/bundle-subscriptions/bundle/7923335168169")||window.location.href.includes("/tools/bundle-subscriptions/bundle/7923336806569"))var addListeners=function(){return document.querySelector(".bundle-product-card__quantity-button-container--button")?(document.querySelectorAll(".bundle-product-card__quantity-button-container--button").forEach(element=>{element.addEventListener("click",function(e){getTotals()})}),setTimeout(function(){getTotals()},500),!0):!1}; 2//# sourceMappingURL=/cdn/shop/t/11/assets/awtomic-theme-custom.js.map?v=147804056468776667631711561454
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.