1const customSelectors={notifyMeBtn:document.querySelectorAll(".notify-me .notify-me-btn"),notifyModal:document.querySelector("#PopupModal-notifyme"),notifyMeForm:document.querySelector("#PopupModal-notifyme form"),customSliderSelector:document.querySelector(".feature-slider")};class customJS{constructor(){customSelectors.notifyMeBtn.length>0&&this.notifyMe(),customSelectors.customSliderSelector&&this.manageFeaturedSlider(),window.location.pathname=="/collections/all-products"&&(window.location.href="/")}notifyMe(){customSelectors.notifyMeBtn.forEach(button=>{button.addEventListener("click",event=>{event.preventDefault();let target=event.currentTarget,form=target.closest("product-form"),selectedVariantID=form.querySelector('input[name="id"]').value,productTitle=target.dataset.title,productID=target.dataset.id,qunatity=form.querySelector('input[name="quantity"]').value||1,selectedVariant=JSON.parse(form.querySelector("[data-variantjson]").innerHTML).find(item=>item.id==selectedVariantID);this.selectedVariant=selectedVariant;let scriptEle=customSelectors.notifyModal.querySelector("[data-bodyJSON]");scriptEle.innerHTML=JSON.stringify({device:"web",product_id:productID,product_name:productTitle,shopify_domain:`${Shopify.shop}`,variant_id:selectedVariantID,variant_name:selectedVariant?selectedVariant.title:"",variant_qty:qunatity,variant_sku:selectedVariant?selectedVariant.sku:""}),openModal(customSelectors.notifyModal,target)})}),customSelectors.notifyMeForm&&customSelectors.notifyMeForm.addEventListener("submit",event=>{event.preventDefault();let currentTarget=event.currentTarget,submitBtn=currentTarget.querySelector('[type="submit"]'),emailValue=currentTarget.querySelector('[name="email"]').value;Utility.validateEmail(emailValue)!=null&&(console.log(this.selectedVariant,"selected variant"),this.sendData(emailValue,this.selectedVariant.id,currentTarget))})}sendData(emailValue,variantId,currentTarget){let attributes={...emailValue!==""&&{email:`${emailValue}`}};const payload={data:{type:"back-in-stock-subscription",attributes:{profile:{data:{type:"profile",attributes:{email:emailValue}}},channels:["EMAIL"]},relationships:{variant:{data:{type:"catalog-variant",id:`$shopify:::$default:::${variantId}`}}}}};var requestOptions={method:"POST",headers:{"Content-Type":"application/json",revision:"2024-05-15"},body:JSON.stringify(payload)};fetch("https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id=VHppZt",requestOptions).then(result=>{console.log(result,"result"),result.status===202&&(currentTarget.querySelector(".form_content").classList.add("d-none"),currentTarget.querySelector(".response-msg").style.display="block",currentTarget.querySelector(".response-msg").classList.add("success"),currentTarget.closest(".modal-content").querySelector(".confetti-top").classList.remove("d-none"))}).catch(error=>console.log("error",error))}
1manageFeaturedSlider(){if(window.innerWidth<767){const sliderEl=document.querySelector(".feature-slider");if(!sliderEl||sliderEl.dataset.initialized)return;const initSlider=()=>{sliderEl.dataset.initialized||(sliderEl.dataset.initialized="true",new Swiper(".feature-slider",{slidesPerView:1,spaceBetween:0,slidesPerGroupSkip:1,autoplay:{delay:4e3,disableOnInteraction:!1},navigation:{nextEl:".feature-button-next",prevEl:".feature-button-prev"},pagination:{el:".feature-pagination",clickable:!0}}))};new IntersectionObserver((entries,obs)=>{entries.forEach(entry=>{entry.isIntersecting&&(initSlider(),obs.disconnect())})},{threshold:.1}).observe(sliderEl)}}}typeof customJS<"u"&&new customJS; 2//# sourceMappingURL=/cdn/shop/t/704/assets/custom.js.map?v=114836458689022606251764115549
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.