1function htmlEncode(value){return value?$("<div/>").text(value).html():""}$(window).on("cart:change",function(){console.log("cart changed"),$.ajax({url:"/cart.js",dataType:"json",success:function(cart){refreshCart(cart)}})});function refreshCart(cart,convertTheCurrencies=!0){if(typeof jQuery>"u")return;let $2=jQuery;free_shipping_price=7500,free_towel_price=9900,free_accessory_price=0,free_accessory2_price=19900,free_settings={first_gift_price:99,first_gift_name:"Towel",second_gift_price:0,second_gift_name:"",third_gift_price:199,third_gift_name:"Headband",free_shipping_price:75,free_gifts_highest_price:199},console.log(cart),$2(".cart_count").empty(),$cartBtn=$2(".cart_count");var value=$cartBtn.text()||"0",cart_items_html="",cart_discounts_html="",cart_action_html="",cart_savings_html="",$cart_form=$2("[data-cart-form]"),productHasSale=!1,productCompareAtPrice=0,productFinalPrice=0,has_free_towl=!1,has_free_accessory=!1,has_free_accessory2=!1;if(cart.item_count==0)console.log("no cart items"),$2(".js-empty-cart__message").removeClass("hidden");else{console.log("has cart items"),$2(".js-empty-cart__message").addClass("hidden");var total_saving=0,saving=0;let data={};const gift_card2=cart.items.find(item=>item.gift_card);let total_price2=0;if(gift_card2?total_price2=cart.total_price-gift_card2.line_price:total_price2=cart.total_price,$2.each(cart.items,function(index,item){item.properties&&$2.each(item.properties,function(title2,val){total_price2<free_towel_price?(title2=="_free_towel"&&val||title2=="_free_accessory"&&val||title2=="_free_accessory2"&&val)&&(data[item.variant_id]=0):total_price2<free_accessory_price?title2=="_free_accessory"&&val&&(data[item.variant_id]=0):total_price2<free_accessory2_price&&title2=="_free_accessory2"&&val&&(data[item.variant_id]=0),title2=="_free_towel"&&val&&(has_free_towl=!0),title2=="_free_accessory"&&val&&(has_free_accessory=!0),title2=="_free_accessory2"&&val&&(has_free_accessory2=!0)})}),console.log("dataaa",data),Object.keys(data).length>0){$2.ajax({url:"/cart/update.js",dataType:"json",type:"post",data:{updates:data},success:function(itemData){$2.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart2){refreshCart(cart2)}})},error:function(){}});return}$2.each(cart.items,function(index,item){var itemDiscounts=item.discounts,discountMessage="";for(i=0;i<itemDiscounts.length;i++){var amount2=Shopify.formatMoney(itemDiscounts[i].amount,$2("body").data("money-format")),title2=itemDiscounts[i].title;discountMessage='<p class="notification-discount meta">'+title2+"</p>"}var line_id=index+1;const hasFreeGift=has_free_towl||has_free_accessory||has_free_accessory2;$2.ajax({dataType:"json",async:!1,cache:!1,url:"/products/"+item.handle+".js",success:function(data2){if(data2.variants){var itemVariants=data2.variants;if(itemVariants.length>1){for(v=0;v<itemVariants.length;v++)if(itemVariants[v].id==item.id)var data2=itemVariants[v]}}data2.compare_at_price?data2.compare_at_price>data2.price&&(productHasSale=!0,productCompareAtPrice=data2.compare_at_price,productFinalPrice=data2.price):productHasSale=!1}});let priceHtml="";cart_items_html+=` 2 <line-item class="line-item"> 3 <img src="${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")}" alt="${htmlEncode(item.title)}" 4 srcset="${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 70w, 5 ${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 120w, 6 ${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 140w, 7 ${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 210w, 8 ${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 240w, 9 ${item.image.replace(/(\.[^.]*)$/,"_compact$1").replace("http:","")} 360w" 10 width="1024" height="1024" loading="lazy" sizes="(max-width: 699px) 70px" class="line-item__media"> 11 <div class="line-item-info"> 12 <div class="v-stack justify-items-start gap-2"> 13 <div class="v-stack justify-items-start gap-1">`,!item.properties._free_accessory&&!item.properties._free_accessory2&&!item.properties._free_towel?cart_items_html+=`<a href="${item.url}" class="h6">${item.product_title}</a>`:cart_items_html+=`<p class="h6">${item.product_title}</p>`;var isLineDiscounted=item.original_price>item.final_price,salePriceClasses=isLineDiscounted?"h6 text-on-sale":"h6 text-subdued";cart_items_html+=` 14 <price-list class="price-list "> 15 <sale-price class="${salePriceClasses}">
16 <span class="sr-only">Sale price</span>${Shopify.formatMoney(item.final_price,$2("body").data("money-format"))} 17 </sale-price>`,isLineDiscounted&&(cart_items_html+=` 18 <compare-at-price class="h6 text-subdued line-through"> 19 <span class="sr-only">Regular price</span>${Shopify.formatMoney(item.original_price,$2("body").data("money-format"))} 20 </compare-at-price>`),cart_items_html+=` 21 </price-list> 22 </div> 23 <div class="v-stack justify-items-start gap-1"> 24 <p class="smallcaps text-subdued">${item.variant_title}</p> 25 <ul class="text-subdued"></ul> 26 </div> 27 <line-item-quantity class="h-stack gap-4 ">`,!item.properties._free_accessory&&!item.properties._free_accessory2&&!item.properties._free_towel&&(cart_items_html+=`<quantity-selector class="quantity-selector quantity-selector--sm"> 28 <a href="/cart/change?id=${item.id}&quantity=${item.quantity-1}" class="quantity-selector__button"> 29 <span class="sr-only">Decrease quantity</span> 30 <svg aria-hidden="true" focusable="false" fill="none" width="10" class="icon icon-minus" viewBox="0 0 12 12"> 31 <path d="M0 6h12" stroke="currentColor" stroke-width="1.5"></path> 32 </svg> 33 </a> 34 <quantity-input class="quantity-selector__input-wrapper" style="--quantity-selector-character-count: 1ch;"> 35 <input class="quantity-selector__input text-sm" type="number" value="${item.quantity}" name="updates[]" inputmode="numeric" step="1" min="1" max="739" aria-label="Change quantity"> 36 </quantity-input> 37 <a href="/cart/change?id=${item.id}&quantity=${item.quantity+1}" class="quantity-selector__button"> 38 <span class="sr-only">Increase quantity</span> 39 <svg aria-hidden="true" focusable="false" fill="none" width="10" class="icon icon-plus" viewBox="0 0 12 12"> 40 <path d="M6 0v12M0 6h12" stroke="currentColor" stroke-width="1.5"></path> 41 </svg> 42 </a> 43 </quantity-selector>`),cart_items_html+=` 44 <a href="/cart/change?id=${item.id}&quantity=0" class="link text-xs" aria-label="Remove ${item.product_title} - ${item.variant_title}">Remove</a> 45 </line-item-quantity>`;var lineAllocations=item.line_level_discount_allocations||[];if(lineAllocations.length>0){var discountIconSvg='<svg aria-hidden="true" focusable="false" fill="none" width="12" class="icon icon-discount" viewBox="0 0 24 24"><path d="M22.707 12.293l-11-11A1.002 1.002 0 0 0 11 1H2a1 1 0 0 0-1 1v9c0 .265.105.52.293.707l11 11a.997.997 0 0 0 1.414 0l9-9a.999.999 0 0 0 0-1.414zM7 9a2 2 0 1 1-.001-3.999A2 2 0 0 1 7 9zm6 8.414L8.586 13 10 11.586 14.414 16 13 17.414zm3-3L11.586 10 13 8.586 17.414 13 16 14.414z" fill="currentColor"></path></svg>';cart_items_html+='<ul class="v-stack justify-items-start gap-1 unstyled-list" role="list">';for(var d=0;d<lineAllocations.length;d++){var alloc=lineAllocations[d],allocTitle=alloc.discount_application&&alloc.discount_application.title||"",allocAmount=Shopify.formatMoney(alloc.amount,$2("body").data("money-format"));cart_items_html+='<li class="discount-badge text-xs">'+discountIconSvg+" "+htmlEncode(allocTitle)+' (-<span class="money">'+allocAmount+"</span>)</li>"}cart_items_html+="</ul>"}cart_items_html+=` 46 </div> 47 </div> 48 </line-item>`});var cartDiscounts=cart.cart_level_discount_applications,cartDiscountMessage="",renderedCodes=[];for(i=0;i<cartDiscounts.length;i++){var amount=Shopify.formatMoney(cartDiscounts[i].total_allocated_amount,$2("body").data("money-format")),title=cartDiscounts[i].title;cart_discounts_html+='<span class="cart_discounts--title">'+title+"</span>",cart_discounts_html+='<span class="cart_discounts--price">',cart_discounts_html+='-<span class="money">'+amount+"</span></span>",title&&renderedCodes.push(title.toLowerCase())}var sessionCodes=cart.discount_codes||[];for(i=0;i<sessionCodes.length;i++){var sessionCode=sessionCodes[i].code;sessionCode&&renderedCodes.indexOf(sessionCode.toLowerCase())===-1&&(cart_discounts_html+='<sp
48an class="cart_discounts--title">'+htmlEncode(sessionCode)+"</span>",cart_discounts_html+='<span class="cart_discounts--price text-subdued">Applied at checkout</span>')}total_saving=total_saving+cart.total_discount}$2(".cart-drawer .cart-drawer__items").html(cart_items_html),$2(".cart-drawer .cart-drawer__discounts").html(cart_discounts_html),$2(".cart-drawer .cart-drawer__subtotal").html(cart_action_html),$2(".cart-drawer .cart-drawer__savings").html(cart_savings_html);let total_price=0,gift_card=cart.items.find(item=>item.gift_card);gift_card?total_price=cart.total_price-gift_card.line_price:total_price=cart.total_price;let itemClass="",inputName="";if(has_free_accessory2||(itemClass=".free-item--item",inputName="_free_accessory2",$2(`input[name="${inputName}"]`).prop("checked",!1),$2(itemClass).removeClass("giftItem-added")),has_free_accessory||(itemClass=".free-item--accessory",inputName="_free_accessory",$2(`input[name="${inputName}"]`).prop("checked",!1),$2(itemClass).removeClass("giftItem-added")),has_free_towl||(itemClass=".free-item--towel",inputName="_free_towel",$2(`input[name="${inputName}"]`).prop("checked",!1),$2(itemClass).removeClass("giftItem-added")),$2(itemClass).removeClass("giftItem-added"),$2(".cart__wrapper .progress-bar>span").css("width",total_price/free_settings.free_gifts_highest_price+"%"),$2(".cart__wrapper .progress-bar>span").html(Shopify.formatMoney(total_price,$2("body").data("money-format"))),console.log("Price without gift card: ",total_price),total_price<=free_accessory_price?(console.log("total_price ",total_price," free_accessory_price:",free_accessory_price),$2(".cart__wrapper .free-items--wrapper").removeClass("accessory-masked"),console.log("removed wrapper",$2(".cart__wrapper .free-items--wrapper"))):$2(".cart__wrapper .free-items--wrapper").removeClass("accessory-masked"),total_price>=free_towel_price&&(console.log("total_price ",total_price," free_towel_price:",free_towel_price),$2(".cart__wrapper .free-items--wrapper").addClass("accessory-masked"),$2(".cart__wrapper .free-items--wrapper .free-items--wrapper__overlay-container").css("top","119px"),console.log("added wrapper",$2(".cart__wrapper .free-items--wrapper"))),total_price<=free_accessory2_price)if(console.log("total_price ",total_price," free_accessory2_price",free_accessory2_price),$2(".cart__wrapper .free-items--wrapper").removeClass("free-masked"),$2(".cart__wrapper .free-items--wrapper").addClass("masked"),console.log("greater"),console.log("total_price",total_price),console.log("free_towel_price",free_towel_price),console.log("free_accessory_price",free_accessory_price),total_price<=free_towel_price)console.log("towel"),$2(".cart__wrapper .free-items--wrapper .free-items--wrapper__overlay-container").css("top","0px");else if(total_price<=free_accessory_price)console.log("total_price ",total_price," free_accessory_price",free_accessory_price),$2(".cart__wrapper .free-items--wrapper .free-items--wrapper__overlay-container").css("top","119px");else{var innerH=$2(".cart-container.active_link .cart__wrapper .free-items--wrapper .free-item--item").innerHeight(),containerH=$2(".cart-container.active_link .cart__wrapper .free-items--wrapper").innerHeight(),h=containerH-innerH;console.log("innerH",innerH),console.log("containerH",containerH),console.log("h",h),$2(".cart__wrapper .free-items--wrapper .free-items--wrapper__overlay-container").css("top",h+"px")}else $2(".cart__wrapper .free-items--wrapper").removeClass("masked");let free_item_message="",unlock_item_message="";total_price>=free_accessory2_price?(free_item_message=`Congrats! You are qualified for <strong>FREE Shipping, ${free_settings.first_gift_name!==""?"FREE "+free_settings.first_gift_name:""} ${free_settings.second_gift_name!==""?"FREE"+free_settings.second_gift_name:""} ${free_settings.third_gift_name!==""?" & FREE "+free_settings.third_gift_name:""}</strong>`,has_free_towl?unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.third_gift_name}</strong>`:($2('.cart__wrapper input[name="_free_towel"]:checked').prop("checked",!1),unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.first_gift_name}</strong>`),has_free_accessory2?unlock_item_message="":($2('.cart__wrapper input[name="_free_accessory2"]:checked').prop("checked",!1),unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.third_gift_name}</strong>`)):total_price>=free_accessory_price&&free_accessory_price>0?(free_item_message=`Congrats! You are qualified for <strong>FREE Shipping, FREE ${free_settings.first_gift_name} & FREE ${free_settings.second_gift_name}</strong>`,has_free_towl?unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.second_gift_name}</strong>`:($2('.cart__wrapper input[name="_free_towel"]:checked').prop("checked",!1),unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.second_gift_name}</strong>`),has_free_accessory?unlock_item_message=`Add <strong class="unlock-price">${Shopify.formatMoney(free_accessory2_price-cart.total_price,$2("body").data("money-format"))}</strong> more to unlock <strong class="unlock-item">FREE ${free_settings.third_gift_name}</strong>`:$2('.cart__wrapper input[name="_free_accessory"]:checked').prop("checked",!1)):total_price>=free_towel_price?(free_item_message=`Congrats! You are qualified for <strong>FREE Shipping & FREE ${free_settings.first_gift_name}</strong>`,unlock_item_message=`Pick your <strong class="unlock-item">FREE ${free_settings.first_gift_name}</strong>`,$2('.cart__wrapper input[name="_free_accessory"]:checked').prop("checked",!1),has_free_towl?free_settings.second_gift_name!==""?unlock_item_message=`Add <strong class="unlock-price">${Shopify.formatMoney(free_accessory_price-total_price,$2("body").data("money-format"))}</strong> more to unlock <strong class="unlock-item">FREE ${free_settings.second_gift_name}</strong>`:unlock_item_message=`Add <strong class="unlock-price">${Shopify.formatMoney(free_accessory2_price-total_price,$2("body").data("money-format"))}</strong> more to unlock <strong class="unlock-item">FREE ${free_settings.third_gift_name}</strong>`:$2('.cart__wrapper input[name="_free_towel"]:checked').prop("checked",!1)):total_price>=free_shipping_price?(free_item_message="Congrats! You are qualified for <strong>FREE Shipping*</strong>",unlock_item_message=`Add <strong class="unlock-price">${Shopify.formatMoney(free_towel_price-total_price,$2("body").data("money-format"))}</strong> more to unlock <strong class="unlock-item">FREE ${free_settings.first_gift_name}</strong>`,$2('.cart__wrapper input[name="_free_accessory"]:checked').prop("checked",!1),$2('.cart__wrapper input[name="_free_towel"]:checked').prop("checked",!1)):(free_item_message="",unlock_item_message=`Add <strong class="unlock-price">${Shopify.formatMoney(free_shipping_price-total_price,$2("body").data("money-format"))}</strong> more to unlock <strong class="unlock-item">FREE Shipping</strong>`,$2('.cart__wrapper input[name="_free_accessory"]:checked').prop("checked",!1),$2('.cart__wrapper input[name="_free_towel"]:checked').prop("checked",!1)),$2(".cart__wrapper .free-shipping--message").html(free_item_message),$2(".cart__wrapper .unlock-free-item--message").html(unlock_item_message),$2(".minicart-free-message-header .unlock-free-item--message").html(unlock_item_message),unlock_item_message!==""?$2(".minicart-free-message-header").removeClass("minicart-free-message-header--hidden"):$2(".minicart-free-message-header").addClass("minicart-free-message-header--hidden")}$("document").ready(function(){window.runRefreshCart=refreshCart,$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart){refreshCart(cart)}}),$(window).on("cart-drawer:refreshed",function(){}),$("body").on("change",'.cart__wrapper input[name="_free_towel"]',function(e2){console.log("cart changed"),$(this).is(":checked")?$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(this).attr("data-product"),quantity:1,properties:{_free_towel:!0}},success:function(itemData){$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart){refreshCart(cart)}})},error:function(){}}):$.ajax({url:"/cart/update.js",dataType:"json",type:"post",data:{updates:{[$(this).attr("data-product")]:0}},success:function(itemData){$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart){refreshCart(cart)}})},error:function(){}})});function addFreeAccessory(id,reloadPage){reloadPage=reloadPage===!0||!1,console.log(id);const wrapper=document.querySelector(".free-items--wrapper");wrapper.classList.add("loading"),console.log("Free acc"),$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart){let free_accessory_id=null;$.each(cart.items,function(index,item){item.properties&&$.each(item.properties,function(title,value){title=="_free_accessory"&&value&&(free_accessory_id=item.variant_id)})}),free_accessory_id?$.ajax({url:"/cart/update.js",dataType:"json",type:"post",data:{updates:{[free_accessory_id]:0}},success:function(itemData){$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(`#${id}`).attr("data-product"),quantity:1,properties:{_free_accessory:!0}},success:function(itemData2){reloadPage?window.location.reload():$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart2){wrapper.classList.remove("loading"),refreshCart(cart2)}})},error:function(){}})},error:function(){}}):$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(`#${id}`).attr("data-product"),quantity:1,properties:{_free_accessory:!0}},success:function(itemData){reloadPage?window.location.reload():$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart2){wrapper.classList.remove("loading"),refreshCart(cart2)}})},error:function(){}})}})}$("body").on("change",'.cart__wrapper input[name="_free_accessory"]',function(e2){let id=$(this).attr("id");console.log(`This is the id: ${id}`),addFreeAccessory(id)});function addFreeAccessory2(id,reloadPage){reloadPage=reloadPage===!0||!1;const wrapper=document.querySelector(".free-items--wrapper");wrapper.classList.add("loading"),console.log($(`label[for="${id}"] input:checked`).attr("data-product")),$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart){let free_accessory_id=null;$.each(cart.items,function(index,item){item.properties&&$.each(item.properties,function(title,value){title=="_free_accessory2"&&value&&(free_accessory_id=item.variant_id)})}),free_accessory_id?$.ajax({url:"/cart/update.js",dataType:"json",type:"post",data:{updates:{[free_accessory_id]:0}},success:function(itemData){$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(`#${id}`).attr("data-product"),quantity:1,properties:{_free_accessory2:!0}},success:function(itemData2){reloadPage?window.location.reload():$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart2){wrapper.classList.remove("loading"),refreshCart(cart2)}})},error:function(){}})},error:function(){}}):$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(`#${id}`).attr("data-product"),quantity:1,properties:{_free_accessory2:!0}},success:function(itemData){reloadPage?window.location.reload():$.ajax({url:"/cart.js",dataType:"json",cache:!1,success:function(cart2){wrapper.classList.remove("loading"),refreshCart(cart2)}})},error:function(){}})}})}$("body").on("change",'.cart__wrapper input[name="_free_accessory2"]',function(e2){let id=$(this).attr("id");console.log(id),addFreeAccessory2(id)}),$("body").on("change",'.cart-template input[name="_free_accessory2"]',function(e2){let id=$(this).attr("id");addFreeAccessory2(id,!0)}),$("body").on("click",".free-item--atc-btn",function(e2){const freeItemEl2=e2.target.closest(".free-item");console.log("freeItemEl ",freeItemEl2.parentElement);const radioInput=freeItemEl2.querySelector('input[name="_free_accessory"], input[name="_free_accessory2"], input[name="_free_towel"]');radioInput.checked=!0,$(radioInput).trigger("change"),freeItemEl2.parentElement.classList.add("giftItem-ad
48ded")}),$("body").on("change",'.cart-template input[name="_free_towel"]',function(e2){$(this).is(":checked")?$.ajax({url:"/cart/add.js",dataType:"json",type:"post",data:{id:$(this).attr("data-product"),quantity:1,properties:{_free_towel:!0}},success:function(itemData){window.location.reload(),freeItemEl.classList.add("item-added")},error:function(){}}):$.ajax({url:"/cart/update.js",dataType:"json",type:"post",data:{updates:{[$(this).attr("data-product")]:0}},success:function(itemData){window.location.reload()},error:function(){}})}),$("body").on("change",'.cart-template input[name="_free_accessory"]',function(e2){let id=$(this).attr("id");addFreeAccessory(id,!0)}),$("body").on("change",".cart__wrapper [data-cart-quantity-input]",function(){var cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:$(this).val(),parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};$(this).parents(".product-quantity-box").find(".js-change-quantity").addClass("is-disabled"),updateCartItemQuantity(cartItem)}),$("body").on("change",".cart-template [data-cart-quantity-input]",function(){var cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:$(this).val(),parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};$(this).parents(".product-quantity-box").find(".js-change-quantity").addClass("is-disabled"),updateCartTemplateItemQuantity(cartItem)}),$(document).on("click",".cart__wrapper .add_to_cart, .cart-template .add_to_cart",function(e2){e2.preventDefault();var freeItems=[];$(".free-items--wrapper .free-item").each(function(idx){$(this).find("input.free-item--select").is(":checked")&&freeItems.push($(this))}),freeItems.length<1&&!1?$("#free-item--modal").css("display","block"):window.location.href="/checkout"}),$("body").on("click",".modal-content .close",function(e2){$("#free-item--modal").css("display","none")}),$("body").on("click",".modal-content .no-gift",function(e2){window.location.href="/checkout"}),$("body").on("click","[data-remove-item]",function(e2){e2.preventDefault();var cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:0,parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};cartItem.$element.addClass("animated fadeOutLeft"),cartItem.parentCartForm.data("cart-form")==="cart-template"&&updateCartTemplateItemQuantity(cartItem),cartItem.parentCartForm.data("cart-form")==="mini-cart"&&(updateCartItemQuantity(cartItem),cartItem.$element.find("input").val("0"))}),$("body").on("click","#mini-cart-free-gift-offers .swatch-element.color",function(e2){let swatch=$(this)[0];const cartThumb=swatch.closest(".free-item--content").querySelector(".free-item--image img"),variantImageSrc=swatch.querySelector(".swatch-element__label--color").getAttribute("data-image"),closestFreeItem=swatch.closest(".free-item"),variantId=this.dataset.id;closestFreeItem.querySelector(".free-item--select").setAttribute("data-product",variantId),cartThumb.setAttribute("src",variantImageSrc),cartThumb.setAttribute("srcset",variantImageSrc)}),$("ul.tabs > li > a").attr("data-no-instant",!0),$("body").on("click","ul.tabs > li > a",function(e2){e2.preventDefault();var contentLocation=$(this).attr("href");contentLocation.charAt(0)=="#"&&($("ul.tabs > li > a.active").removeClass("active"),$(this).addClass("active"),$(this).parents("ul.tabs").next().find(contentLocation).show().css({display:"block"}).addClass("active").siblings().hide().removeClass("active"))});var globalAccordions={init:function(){var flg=0,$faqHeading=$(".faqAccordion > dt > button, .accordion > dt > a");$(".faqAccordion > dd, .accordion > dd").attr("aria-hidden",!0),$faqHeading.attr("aria-expanded",!1),$faqHeading.on("click activate",function(){if(flg)return!1;flg=1;var state=$(this).attr("aria-expanded")==="false";return $(this).attr("aria-expanded",state),$(this).parent().next().slideToggle(function(){flg=0}),$(this).parent().next().attr("aria-hidden",!state),!1}
48),$faqHeading.on("keydown",function(event){var keyCode=event.keyCode||e.which;keyCode===13&&$(this).trigger("activate")})}};if(globalAccordions.init(),document.body.addEventListener("mouseenter",function(e2){const element=e2.target.closest(".js-hover-update");if(!element)return;const productCard=element.closest(".product-card");if(!productCard)return;const mainImage=productCard.querySelector("img.product-card__image--primary");if(!mainImage)return;mainImage.dataset.originalSrc||(mainImage.dataset.originalSrc=mainImage.src),mainImage.dataset.originalSrcset||(mainImage.dataset.originalSrcset=mainImage.srcset),element.classList.add("is-hovering");const newSrc=element.getAttribute("data-hover-image");newSrc&&mainImage&&(mainImage.src=newSrc,mainImage.removeAttribute("srcset"))},!0),document.body.addEventListener("mouseleave",function(e2){const element=e2.target.closest(".js-hover-update");if(!element)return;const productCard=element.closest(".product-card");if(!productCard)return;const mainImage=productCard.querySelector("img.product-card__image--primary");mainImage&&(element.classList.remove("is-hovering"),mainImage.dataset.originalSrc&&(mainImage.src=mainImage.dataset.originalSrc,mainImage.dataset.originalSrcset&&(mainImage.srcset=mainImage.dataset.originalSrcset)))},!0),(function(){const logoBarItems=document.querySelectorAll(".logo-bar__item");window.matchMedia("(min-width: 1024px)").matches?logoBarItems.forEach(item=>{item.addEventListener("mouseenter",function(e2){e2.target.classList.add("logo-bar__item--show-tooltip")}),item.addEventListener("mouseleave",function(e2){e2.target.classList.remove("logo-bar__item--show-tooltip")})}):logoBarItems.forEach(item=>{item.addEventListener("click",function(){const wasNotShowingTooltip=!item.classList.contains("logo-bar__item--show-tooltip");console.log(item,wasNotShowingTooltip),logoBarItems.forEach(i2=>i2.classList.remove("logo-bar__item--show-tooltip")),item.classList.toggle("logo-bar__item--show-tooltip",wasNotShowingTooltip)})})})(),theme.template=="product"||theme.template=="collection"){let showCorrectVariantThumbs2=function(color){let selectedVariantColor=color;if(!selectedVariantColor){let dataVariant=document.querySelector("script[data-variant]");dataVariant&&(selectedVariantColor=JSON.parse(dataVariant.textContent).option1)}selectedVariantColor&&document.querySelectorAll(".product-gallery__thumbnail, .product-gallery__media, .tap-area").forEach(function(thumb){let thumbColor=thumb.getAttribute("data-thumb-color");thumbColor==selectedVariantColor?thumb.setAttribute("data-is-selected-var","true"):thumb.setAttribute("data-is-selected-var","false"),thumbColor=="global-image"&&thumb.setAttribute("data-is-selected-var","true"),document.querySelector("product-gallery scroll-carousel").select(0,{instant:!0})})};var showCorrectVariantThumbs=showCorrectVariantThumbs2;showCorrectVariantThumbs2(),document.addEventListener("click",function(e2){const swatch=e2.target.closest("label.color-swatch");swatch&&showCorrectVariantThumbs2(swatch.getAttribute("data-value"))}),document.addEventListener("variant:change",function(){setTimeout(function(){showCorrectVariantThumbs2()},50)})}}); 49//# sourceMappingURL=/cdn/shop/t/169/assets/custom.js.map?v=31434198569763524991783254905
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.