1jQuery(document).ready(function(){product_card_select(),product_card_quickview(),order_ajax_buy_again(),cart_change_selling_plan()});function cart_change_selling_plan(){fetch("/cart.js").then(function(response){return response.json()}).then(function(cart){console.log(cart)}).catch(function(error){return console.error("Error fetching cart data:",error)}),jQuery("form.cart__contents").on("change",".variant-select",function(event){event.stopPropagation();var line=jQuery(this).parent(".variant-select-wrap").attr("data-line"),quantity=jQuery(this).parents(".cart-item").find(".quantity__input").val(),selling_plan=jQuery(this).parents(".variant-select-wrap").attr("data-selling"),newVariantId=jQuery(this).val();if(selling_plan=="null")var selling_plan=null;console.log(line),console.log(quantity),console.log(selling_plan),console.log(newVariantId),$.ajax({type:"POST",url:"/cart/add.js",data:{id:newVariantId,selling_plan:selling_plan,quantity:quantity},dataType:"json",success:function(cart){console.log(2222),setTimeout(function(){$.ajax({type:"POST",url:"/cart/change.js",data:{line:parseInt(line)+1,quantity:0},dataType:"json",success:function(cart2){console.log(333),location.reload()},error:function(xhr,status,error){}})},500)},error:function(xhr,status,error){console.error("Error adding item to cart:",error)}})}),jQuery(".selling-select-wrap .subscribe-btn").click(function(){if(!jQuery(this).parent().hasClass("active")){jQuery(this).parent().addClass("active"),jQuery(this).parent().siblings().removeClass("active");var line=jQuery(this).parents(".cart-item__selling_plan").attr("data-line"),quantity=jQuery(this).parents(".cart-item").find(".quantity__input").val(),selling_plan=jQuery(this).siblings(".selling-box").find(".selling-plan-select").val();change_selling_plan(line,quantity,selling_plan)}}),jQuery("form.cart__contents").on("change",".selling-plan-select",function(event){event.stopPropagation();var line=jQuery(this).parents(".cart-item__selling_plan").attr("data-line"),quantity=jQuery(this).parents(".cart-item").find(".quantity__input").val(),selling_plan=jQuery(this).val();change_selling_plan(line,quantity,selling_plan)}),jQuery(".selling-select-wrap .one-time-purchase-btn").click(function(){if(!jQuery(this).parent().hasClass("active")){jQuery(this).parent().addClass("active"),jQuery(this).parent().siblings().removeClass("active");var line=jQuery(this).parents(".cart-item__selling_plan").attr("data-line"),quantity=jQuery(this).parents(".cart-item").find(".quantity__input").val(),selling_plan=null;change_selling_plan(line,quantity,selling_plan)}})}function change_selling_plan(line,quantity,selling_plan){$.ajax({type:"POST",url:"/cart/change.js",data:{line:line,quantity:quantity,selling_plan:selling_plan},dataType:"json",success:function(cart){location.reload()},error:function(xhr,status,error){}})}function order_ajax_buy_again(){jQuery(".ajax-buy-again").click(function(){var ids=jQuery(this).attr("data-ids"),qtys=jQuery(this).attr("data-qtys"),idsArr=ids.split(","),qtysArr=qtys.split(","),itemsToAdd=[];for(i in idsArr)itemsToAdd.push({id:idsArr[i],quantity:parseInt(qtysArr[i])});console.log(itemsToAdd),addMultipleToCart(itemsToAdd)})}function addMultipleToCart(items){fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:items})}).then(function(response){return response.json()}).then(function(data){console.log("Products added to cart:",data)}).catch(function(error){console.error("Error adding products to cart:",error)})}function product_card_quickview(){jQuery(document).on("click",".ajax-quick-view",function(){var handle=jQuery(this).attr("data-handle"),img=jQuery(this).parents(".product-item__text").siblings(".product-item__img").find(".img-box").html(),title=jQuery(this).parents(".product-item__text").find("h3").text(),rating=jQuery(this).parents(".product-item__text").find(".rating-row").html(),list=jQuery(this).parents(".product-item__text").find(".checkde-list").html(),price=jQuery(this).parents(".product-item__text").find(".price-row").html();jQuery(".quick-popup").find(".product-item__img").html(img),jQuery(".quick-popup").find(".rating-row").html(rating),jQuery(".quick-popup").find(".quick-title").text(title),jQuery(".quick-popup").find(".checkde-list").html(list),jQuery(".quick-popup").find(".price-row").html(price);var productHandle=handle,productUrl="/products/"+productHandle;jQuery.ajax({url:productUrl,method:"GET",success:function(response){var productPageHtml=jQuery(response),button=productPageHtml.find(".pdp-details__item__right__box").find(".buy-col").html();jQuery(".quick-popup").find(".links.full--width").html(button),jQuery(".quick-popup").fadeIn()},error:function(xhr,status,error){console.error("Error fetching product page HTML:",error)}})}),jQuery(".quick-popup").click(function(){jQuery(".quick-popup").fadeOut()}),jQuery(".quick-popup .product-item").click(function(event){event.stopPropagation()}),jQuery(".quick-popup .close-quick-popup").click(function(event){event.preventDefault(),jQuery(".quick-popup").fadeOut()})}function product_card_select(){jQuery(".variant-select").change(function(){var id=jQuery(this).val();jQuery(this).parent().siblings().find(".product-variant-id").val(id)}),jQuery(".selling-plan-select").change(function(){var id=jQuery(this).val();jQuery(this).parent().siblings().find('input[name="selling_plan"]').val(id)})} 2//# sourceMappingURL=/cdn/shop/t/4/assets/shop-scripts.js.map?v=110898726485342612111785313527
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.