jQuery.fn.serializeArrayAll=function(){var e=/\r?\n/g;return this.map((function(){return this.elements?jQuery.makeArray(this.elements):this})).map((function(t,n){var r=jQuery(this).val();return null===r?null===r:"checkbox"===this.type&&!1===this.checked?{name:this.name,value:this.checked?this.value:""}:"radio"!==this.type?jQuery.isArray(r)?jQuery.map(r,(function(t,r){return{name:n.name,value:t.replace(e,"\r\n")}})):{name:n.name,value:r.replace(e,"\r\n")}:this.checked?{name:this.name,value:this.checked?this.value:""}:void 0})).get()},jQuery(document).ready((function(){jQuery(document.body).on("click",".single_add_to_cart_button:not(.disabled)",(function(e){var t=jQuery(this),n=t.closest("form.cart"),r=n.find('input:not([name="product_id"]), select, button, textarea').serializeArrayAll()||0,a=-1!==n.attr("action").indexOf("?")?n.attr("action")+"&wc-ajax=get_refreshed_fragments":n.attr("action")+"?wc-ajax=get_refreshed_fragments";e.preventDefault(),t.find("span").length||t.wrapInner("<span></span>"),n.find('input[name="product_id"]').length&&t.attr("value",n.find('input[name="product_id"]').val()),jQuery(document.body).trigger("adding_to_cart",[t,r]),jQuery.ajax({type:"POST",url:a,data:r,beforeSend:function(){t.removeClass("added").addClass("loading")},complete:function(){t.addClass("added").removeClass("loading")},success:function(e){e.error&&e.product_url?window.location=e.product_url:(void 0!==e.fragments.awb_woo_notices&&jQuery(e.fragments.awb_woo_notices).hasClass("woocommerce-notices-wrapper")&&jQuery(".woocommerce-notices-wrapper").each((function(t){jQuery(this).replaceWith(jQuery(e.fragments.awb_woo_notices).eq(t))})),jQuery(document.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]))}})})).on("added_to_cart",(function(e,t,n,r){const a=r.parent().parent().parent();if(a.hasClass("fusion-wqv-content-inner"))return void setTimeout((function(){a.closest(".fusion-woocommerce-quick-view-container").find(".fusion-wqv-close button").trigger("click")}),200);if(!jQuery(".woocommerce-notices-wrapper").length||!r.hasClass("single_add_to_cart_button"))return;const o=fusion.getAdminbarHeight();jQuery(".fusion-header-wrapper").find("div").each((function(){"fixed"===jQuery(this).css("position")&&($stickyHeaderHeight=jQuery(this).height())})),jQuery("html, body").stop(),jQuery("html, body").animate({scrollTop:jQuery(".woocommerce-notices-wrapper").offset().top-o-0-10},500)}))}));