1const cartExitPopupElement=document.getElementById("cartExitPopup"),timeToShow=cartExitPopupElement.dataset.time;document.addEventListener("DOMContentLoaded",()=>{initExitPopup()});function setIdleTimeout(millis,getCartProducts2){let timeout=0;startTimer();function startTimer(){timeout=setTimeout(onExpires,millis),document.addEventListener("touchmove",onActivity),document.addEventListener("keypress",onActivity),document.addEventListener("scroll",onActivity),document.addEventListener("click",onActivity)}function onExpires(){timeout=0,parseInt(document.querySelector(".cart-count-bubble span").textContent)>0&&sessionStorage.getItem("popupShowed")===null&&getCartProducts2()}function onActivity(){timeout&&clearTimeout(timeout),document.removeEventListener("touchmove",onActivity),document.removeEventListener("keypress",onActivity),document.removeEventListener("scroll",onActivity),document.addEventListener("click",onActivity),startTimer()}}function getItemFromLocalStorage(key){let retrievedValue=localStorage.getItem(key);return retrievedValue||""}function checkProductIsInWishlist(product){let wishlistItems=this.getItemFromLocalStorage("_ftcWishlist")?JSON.parse(this.getItemFromLocalStorage("_ftcWishlist")):[],prodItem=product.id+","+product.handle;return wishlistItems.includes(prodItem)}let closeModal=document.getElementById("ModalClose-exit-modal"),modal=document.querySelector(".modal__container");closeModal.addEventListener("click",function(e){e.preventDefault(),modal.removeAttribute("open"),document.body.classList.remove("overflow-hidden")});const replaceText=replacement=>{const originalTextElement=document.querySelector(".modal__container .title"),newText=originalTextElement.textContent.replace("{{cart.item_count}}",replacement);originalTextElement.textContent=newText},getCartProducts=()=>{fetch("/cart.js").then(response=>{if(!response.ok)throw new Error("Network response was not ok");return response.json()}).then(data=>{console.log(data),replaceText(data.item_count),updateSlider(data.items)}).catch(error=>{console.error("Error fetching cart data:",error)}),console.log("popup triggered")},updateSlider=cartItems=>{const sliderContainer=document.getElementById("Slider-exit-popup"),activeCartCurrency=sliderContainer.dataset.cartCurrency;sliderContainer.classList.add(cartItems.length==1?"one-product":"multiple-product"),console.log(sliderContainer,cartItems.length),sliderContainer.innerHTML="",cartItems.forEach((product,index)=>{const slide=document.createElement("li");slide.id=`Slide-exit-popup-${index+1}`,slide.className="grid__item";let wishlistAddedClass=checkProductIsInWishlist(product)?" wishlist-added":"";slide.className+=" slider__slide";const cardProductHTML=`<div class="card-wrapper"> 2 <div class="card card--standard card--media" style="--ratio-percent: 139%;" product-price= "${product.price/100}" > 3 <div class="card__inner color-background-2 gradient ratio" style="--ratio-percent: 139%;"> 4 <div class="card__media"> 5 <a href="${product.url}" class="media media--transparent media--hover-effect"> 6 <img src="${product.featured_image.url}&width=700" alt="${product.title}" class="motion-reduce" loading="lazy" width="700" height="700"> 7 </a> 8 <div class="cart-count-bubble"> 9 <span aria-hidden="true">${product.quantity}</span> 10 <span class="visually-hidden">${product.quantity} items</span> 11 </div> 12 </div> 13 <div class="card__content"> 14 <div class="card__information"> 15 <h4 class="card__heading"> 16 <a href="${window.Shopify.routes.root+"products/"+product.handle}" class="card__information--title recently-viewed-product ${product.handle}" title="${product.title}">${product.title}</a> 17 </h4> 18 </div> 19 <div class="card__wishlist-icon ${wishlistAddedClass}" data-wishlist="" data-product-handle="${product.handle}" data-product-id="${product.id}" data-variant-id="${product.id}" wishlist-id="${product.id}" aria-label="Wishlist" title="Wishlist">
20 <span class="card__icon-heart-empty"><svg class="icon icon-heart-empty" viewBox="0 0 19 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 21 <title>Wishlist</title> 22 <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 23 <g id="Desktop_Double_Label" transform="translate(-217.000000, -17.000000)" fill="#707070" fill-rule="nonzero" stroke="#707070" stroke-width="0.3"> 24 <g id="noun_Heart_249778" transform="translate(218.000000, 17.000000)"> 25 <path d="M8.52858851,15.7668437 C8.53122701,15.764959 13.4588198,12.1213748 15.4199814,9.36074683 C19.0281343,4.27748233 15.8408227,0.251692143 12.3169134,0.251692143 C10.9859771,0.251692143 9.60754777,0.825566546 8.52840005,2.13313325 C7.44925232,0.825566546 6.07006911,0.251880607 4.73950973,0.251692143 C1.21484665,0.251126749 -1.97246498,4.2771054 1.63625327,9.36074683 C3.59741486,12.1213748 8.52858851,15.7668437 8.52858851,15.7668437 Z M1.41198052,3.20775783 C2.04409045,1.98424629 3.34977251,1.19363771 4.7391328,1.19382615 C4.7391328,1.19382615 4.73932127,1.19382615 4.73950973,1.19382615 C5.89517405,1.19382615 6.98261422,1.74037323 7.80168093,2.73282729 L8.52840005,3.6135219 L9.25511916,2.73282729 C10.0741859,1.74018477 11.1612491,1.19382615 12.316725,1.19382615 C13.7057083,1.19382615 15.0117673,1.98443476 15.6436888,3.20813476 C16.4552169,4.77917483 16.1027883,6.77049
25074 14.6514232,8.81495364 C13.1759346,10.8920209 9.85274009,13.558982 8.52840005,14.5827212 C7.20292922,13.5576628 3.87558846,10.8865554 2.40424611,8.8151421 C0.95306946,6.77030228 0.600640845,4.7787979 1.41198052,3.20775783 Z" id="Shape"></path> 26 </g> 27 </g> 28 </g> 29 </svg></span> 30 <span class="card__icon-heart-filled"><svg class="icon icon-heart-filled" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 19 16" style="enable-background:new 0 0 19 16;" xml:space="preserve"> 31 <title>Wishlist</title> 32 <style type="text/css">.st0{fill:#e31b23;stroke:#e31b23;stroke-width:0.3;}</style> 33 <path class="st0" d="M9.5,15.8c0,0,4.9-3.6,6.9-6.4c3.6-5.1,0.4-9.1-3.1-9.1c-1.3,0-2.7,0.6-3.8,1.9C8.4,0.8,7.1,0.3,5.7,0.3 34 c-3.5,0-6.7,4-3.1,9.1C4.6,12.1,9.5,15.8,9.5,15.8z"></path> 35 </svg></span> 36 </div> 37 </div> 38 </div> 39 <div class="card__content"> 40 <div class="card__information"> 41 <h4 class="card__heading h5" id="title-template--exit-popup"> 42 <a href="${window.Shopify.routes.root+"products/"+product.handle}" class="card__information--title recently-viewed-product ${product.handle}" title="${product.title}">${product.title}</a> 43 </h4> 44 <div class="card-information"> 45 <span class="caption-large light"></span> 46 <div class="price ff-price"> 47 <div class="price__container"> 48 <div class="price__regular"> 49 <span class="visually-hidden visually-hidden--inline">Regular price</span> 50 <span class="cart-popup-currency">${activeCartCurrency}</span> 51 <span class="subtitle--s price-item price-item--regular ${activeCartCurrency}" data-js-price="${product.price}"> 52 ${product.price} 53 </span> 54 </div> 55 <div class="price__sale"> 56 <span class="visually-hidden visually-hidden--inline">Regular price</span> 57 <span style="display: flex;"> 58 <span class="cart-popup-currency">${activeCartCurrency}</span><s class="subtitle--s price-item price-item--regular" data-js-price="${product.price}">${product.price}</s> 59 </span> 60 <span class="visually-hidden visually-hidden--inline">Sale price</span> 61 <span style="display: flex;"> 62 <span class="cart-popup-currency" style="color: red">${activeCartCurrency}</span> 63 <span class="subtitle--s price-item price-item--sale price-item--last" data-js-price="${product.price}"> 64 ${product.price} 65 </span> 66 </span> 67 </div> 68 <small class="unit-price caption hidden"> 69 <span class="visually-hidden">Unit price</span> 70 <span class="subtitle--s price-item price-item--last"> 71 <span></span> 72 <span aria-hidden="true">/</span> 73 <span class="visually-hidden"> per </span> 74 <span> 75 </span> 76 </span> 77 </small> 78 </div> 79 </div> 80 </div> 81 </div> 82 </div> 83 </div> 84 </div>`;slide.innerHTML=cardProductHTML,sliderContainer.appendChild(slide)}),sliderContainer.parentElement.resetPages(),setTimeout(()=>{window.formatPrices("#Slider-exit-popup .price-item")},10),document.querySelector(".modal__container").setAttribute("open",null),document.body.classList.add("overflow-hidden"),sessionStorage.setItem("popupS
84howed","true")},initExitPopup=()=>{window.innerWidth>750,setIdleTimeout(timeToShow,getCartProducts)}; 85//# sourceMappingURL=/cdn/shop/t/204/assets/exit-popup.static.js.map?v=25280457916991542421788231418
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.