!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";let t=new Object;t={$:jQuery,action:{toast:null,cart:null},api:{event:null}},window.addonifyFloatingCart=t;const o=addonifyFloatingCartJSObject.ajax_url,e=addonifyFloatingCartJSObject.nonce,n=addonifyFloatingCartJSObject.ajax_refresh_cart_fragments,a=addonifyFloatingCartJSObject.ajax_update_cart_item_action,i=addonifyFloatingCartJSObject.ajax_remove_from_cart_action,d=addonifyFloatingCartJSObject.ajax_restore_in_cart_action,r="1"===addonifyFloatingCartJSObject.open_cart_modal_immediately_after_add_to_cart,c="1"===addonifyFloatingCartJSObject.open_cart_modal_after_click_on_view_cart,s="1"===addonifyFloatingCartJSObject.openCartModalOnTriggerButtonHover,l="1"===addonifyFloatingCartJSObject.hideTriggerButtonIfCartIsEmpty,p=addonifyFloatingCartJSObject.customToggleBtnClass,f="1"===addonifyFloatingCartJSObject.addonifyFloatingCartNotifyShow,u=addonifyFloatingCartJSObject.addonifyFloatingCartNotifyDuration,_="1"===addonifyFloatingCartJSObject.addonifyFloatingCartNotifyDismissible,g=addonifyFloatingCartJSObject.toast_notification_display_position.split("-"),h="1"===addonifyFloatingCartJSObject.displayToastNotificationButton,y=addonifyFloatingCartJSObject.addonifyFloatingCartNotifyMessage,m=addonifyFloatingCartJSObject.toastNotificationButton,w=addonifyFloatingCartJSObject.ajax_apply_coupon,v=addonifyFloatingCartJSObject.ajax_remove_coupon,C="1"===addonifyFloatingCartJSObject.hideScreenWhenCouponIsApplied,b=addonifyFloatingCartJSObject.updateShippingInfo,E=addonifyFloatingCartJSObject.updateShippingMethod,F=addonifyFloatingCartJSObject.shippingAddressUpdatable,S=addonifyFloatingCartJSObject.states,j="1"===addonifyFloatingCartJSObject.hideScreenWhenShippingAddressUpdated;function O(t){if(!t)throw new Error("Spinner action is required!");const o=document.getElementById("adfy__woofc-spinner-container");o&&("show"===t?(o.classList.add("visible"),o.classList.remove("hidden")):(o.classList.add("hidden"),o.classList.remove("visible")))}addonifyFloatingCartJSObject.hideCartOnOverlayClicked;const{$:A,action:T,api:W}=t;const M=async()=>{O("show");try{const{fragments:a}=await A.ajax({type:"POST",dataType:"json",url:o,data:{action:n,nonce:e}});if(!a)throw new Error("Fragments not fetched! aborting...");return A.each(a,(function(t,o){A(t).replaceWith(o)})),A(document).trigger("wc_update_cart"),t.api.event.cartUpdated(a),a}catch(t){return console.error(t),t}finally{O("hide")}},{$:k,api:x}=t;const{action:J}=t;const{$:q}=t;function D(t){if(!t)throw new Error("Function [setShoppingMeterVisibility] requires action!");const o=q("#adfy__floating-cart .adfy__woofc-shipping-bar");o.length>0&&("hide"===t?o.addClass("adfy__woofc-hidden"):o.removeClass("adfy__woofc-hidden"))}function U(t){if(!t)throw new Error("Function [setTriggerButtonVisibility] requires action!");const o=document.getElementById("adfy__woofc-trigger");o&&o.hasAttribute("data_display")&&("hide"===t?o.setAttribute("data_display","hidden"):o.setAttribute("data_display","visible"))}const{$:L}=t;function I(){L(document).on("click",".adfy__woofc-prevent-default",(function(t){t.preventDefault()}));let o=".adfy__show-woofc";p&&p.length>0&&(o+=", "+p);const e=o.split(", ").map((t=>{const o=t.replace(" ","").trim();return o.startsWith(".")?o:`.${o}`})).join(", ");L(document).on("click",e,(function(o){t.action.cart.open(o)})),L(document).on("mouseover",".adfy__show-woofc",(function(o){s&&t.action.cart.open(o)})),L(document).on("click",".added_to_cart.wc-forward",(function(o){c&&(o.preventDefault(),t.action.cart.open(o))})),L(document).on("click",".adfy__hide-woofc",(function(o){o.preventDefault(),t.action.cart.close(o)})),document.addEventListener("addonifyFloatingCartUpdated",(()=>{(()=>{const o=q("#adfy__floating-cart .adfy__woofc-shipping-bar .progress-bars .live-progress-bar");o&&(parseInt(o.attr("data_percentage"))>=100?(o.addClass("hide-animation"),t.api.event.shoppingMeterThresholdReached()):o.removeClass("hide-animation"))})()})),document.addEventListener("addonifyFloatingCartItemRestored",(()=>{l&&U("show")}))}const{$:R}=t;let P;function $(t="hide",o="info",e=""){const n=R("#adfy__floating-cart #adfy__woofc-cart-errors"),a=()=>{P&&clearTimeout(P),n.hasClass("error")&&n.removeClass("error"),n.html(" ").addClass("hidden")};"hide"===t?a():e.length>0&&(P&&clearTimeout(P),"error"===o&&n.addClass("error"),n.html(" ").html(e).removeClass("hidden"),P=setTimeout((()=>a()),1e4))}function B(t,o=null){if(!t)throw new Error("Coupon alert action is required!");let e=R("#adfy__floating-cart .adfy__woofc-alert");const n=()=>{let t;clearTimeout(t),t=setTimeout((()=>{R(e).fadeOut(),clearTimeout(t)}),1e4)};if("hide"!==t){if(e.length>0){const t={success:'<svg fill="currentColor" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>',error:'<svg fill="currentColor" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>'};if(!o)throw new Error("Coupon alert data is required!");const{style:e,message:a}=o;if(!e||!a)throw new Error("Coupon alert style & message is required!");let i;switch(e){case"success":i=`<p class="adfy__woofc-alert-text">\n                        ${t.success}\n                        ${a}\n                    </p>`,R(".adfy__woofc-alert.success").html(" ").html(i).fadeIn(),n();break;case"error":i=`<p class="adfy__woofc-alert-text">\n                        ${t.error}\n                        ${a}\n                    </p>`,R(".adfy__woofc-alert.error").html(" ").html(i).fadeIn(),n()}}}else n()}function N(){clearTimeout(P);let t=document.getElementById("adfy__woofc-coupon-alerts");t&&t.hasChildNodes()&&(P=setTimeout((function(){R("#adfy__woofc-coupon-alerts").html("")}),1e4))}function V(t="hide",o=null){if("string"!=typeof t)throw new Error("Colophon visibility must be a string value.");const e=document.querySelector(".adfy__woofc-colophon"),n=document.querySelector(".adfy__woofc-cart-summary ul li.discount"),a=document.querySelector(".adfy__woofc-cart-summary ul li.sub-total"),i="adfy__woofc-hidden";if(e&&("show"===t?e.classList.remove(i):e.classList.add(i)),e&&"show"===t){const{discountVisibility:t,subTotalVisibility:e}=o;n&&t&&("show"===t?n.classList.remove(i):n.classList.add(i)),a&&("show"===e?a.classList.remove(i):a.classList.add(i))}}const{$:z}=t;function Q(){z(document).on("added_to_cart",(function(o,e){o.preventDefault(),r&&t.action.cart.open(o),l&&U("show"),f&&function(o){if(!o||"object"!=typeof o)throw new Error("Toast message data invalid!");if(o&&"object"==typeof o){let e,n;const{__:a}=wp.i18n;n=Object.hasOwn(o,"product")?o.product.charAt(0).toUpperCase()+o.product.slice(1):a("Product","addonify-floating-cart"),e=h?y.replace("{product_name}",n)+" "+m:y.replace("{product_name}",n),t.action.toast.dispatch("success",e)}}(e),$("hide"),D("show"),V("show",{discountVisibility:"show",subTotalVisibility:"show"}),t.api.event.cartUpdated(e)})),z(document).on("wc_cart_emptied",(function(o){l&&U("hide"),D("hide"),V("hide"),t.api.event.cartUpdated(o)}))}const H=()=>{const t=document.getElementById("adfy__woofc-scrollbar"),o=t.classList.contains("ps");t&&!o&&new PerfectScrollbar(t,{wheelSpeed:1,wheelPropagation:!0,minScrollbarLength:20})},{$:X}=t,{__:G}=wp.i18n;function K(n,i,d=1){if(!n)throw new Error("Function [updateCartViaAjax] requires current element!");if(!i)throw new Error("Function [updateCartViaAjax] requires action!");let r;switch(i){case"add":r=X(n).next();break;case"sub":r=X(n).prev();break;default:r=X(n)}let c=X(n).attr("data-product_id"),s=X(n).attr("data-cart_item_key"),l=X(n).parents(".adfy__woofc-item");O("show"),X.ajax({type:"POST",dataType:"json",url:o,data:{action:a,product_id:c,cart_item_key:s,nonce:e,type:i,quantity:d},success:function(o){if(!o||o.error)throw new Error("Error updating cart via AJAX!");let e=o.fragments;e&&X.each(e,(function(t,o){X(t).replaceWith(o)}));let n=o.nQuantity;"OoS"===n?(alert("Out of stock range"),r.val(n)):"nil"!==n&&r.val(n),l.find(X(".adfy__woofc-item-price-multiplier-quantity")).html(n),l.unblock(),X(document.body).trigger("wc_update_cart"),t.api.event.cartUpdated(o)},error:function(o){const{__:e}=wp.i18n,n=e("Error processing cart update request!","addonify-floating-cart");throw t.action.toast.dispatch("error",n),new Error(o)},complete:function(){O("hide")}})}const{$:Y}=t;const{$:Z}=t;function tt(){Z(document).on("click","#adfy__woofc-shipping-trigger",(function(o){o.preventDefault(),Z("#adfy__woofc-shipping-container").attr("data_display","visible"),t.api.event.shippingModalOpened(),"1"===F&&(Z("#addonify_floating_cart_shipping_country").length&&Z("#addonify_floating_cart_shipping_country").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"}),Z("select#addonify_floating_cart_shipping_state")&&Z("select#addonify_floating_cart_shipping_state").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"}))})),Z(document).on("click","#adfy__woofc-hide-shipping-container",(function(o){o.preventDefault(),Z("#adfy__woofc-shipping-container").attr("data_display","hidden"),t.api.event.shippingModalClosed()})),document.addEventListener("addonifyFloatingCartShippingAddressUpdated",(()=>{j&&setTimeout((()=>{Z("#adfy__woofc-shipping-container").attr("data_display","hidden")}),1e3)})),Z(document).on("change","#addonify_floating_cart_shipping_country",(function(t){let o=Z(this).val(),e=Z("#addonify_floating_cart_shipping_state"),n=S[o];if(e.siblings("span.select2").remove(),"object"==typeof n&&Object.keys(n).length>0){let t="";for(let o in n)t+='<option value="'+o+'">'+n[o]+"</option>";if("input"===e.prop("tagName").toLowerCase()){let t=e.parent();e.remove();let o=Z(document.createElement("select"));o.addClass("state_select").prop("id","addonify_floating_cart_shipping_state").prop("name","addonify_floating_cart_shipping_state"),o.prop("data-placeholder","State / County"),t.append(o),Z(document).on("change","#addonify_floating_cart_shipping_country",(function(t){t.preventDefault(),"1"===F&&Z("select#addonify_floating_cart_shipping_state")&&Z("select#addonify_floating_cart_shipping_state").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"})}))}Z("#addonify_floating_cart_shipping_state").html(t)}else if(n instanceof Array&&0===n.length){let t=e.parent();e.remove();let o=Z(document.createElement("input"));o.addClass("input_text").prop("id","addonify_floating_cart_shipping_state").prop("name","addonify_floating_cart_shipping_state"),o.prop("type","hidden"),t.append(o)}else{let t=e.parent();e.remove();let o=Z(document.createElement("input"));o.addClass("input_text").prop("id","addonify_floating_cart_shipping_state").prop("name","addonify_floating_cart_shipping_state"),o.prop("placeholder","State / County"),t.append(o)}}))}function ot(){Z(document).on("submit","#adfy__woofc-shipping-form",(function(e){e.preventDefault(),O("show");let n=Z("#addonify_floating_cart_shipping_country").val(),a=Z("#addonify_floating_cart_shipping_state").val(),i=Z("#addonify_floating_cart_shipping_city").val(),d=Z("#addonify_floating_cart_shipping_postcode").val(),r=Z("#addonify-floating-cart-shipping-nonce").val();const{__:c}=wp.i18n;let s=c("Error updating shipping address!.","addonify-floating-cart");Z.ajax({url:o,method:"POST",data:{action:b,calc_shipping_country:n,calc_shipping_state:a,calc_shipping_city:i,calc_shipping_postcode:d,nonce:r},success:function(o){o?(o.fragments&&(Z.each(o.fragments,(function(t,o){""!==o?Z(t).replaceWith(o):Z(t).html(o)})),t.api.event.shippingAddressUpdated(o.fragments)),Z("#adfy__woofc-shipping-container").attr("data_display","visible"),"1"===F&&(Z("#addonify_floating_cart_shipping_country").length&&Z("#addonify_floating_cart_shipping_country").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"}),Z("select#addonify_floating_cart_shipping_state")&&Z("select#addonify_floating_cart_shipping_state").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"}))):t.action.toast.dispatchToast("error",s)},error:function(o){console.log(o),t.action.toast.dispatchToast("error",s)},complete:function(){O("hide")}})}))}function et(){Z(document).on("change",".shipping_method",(function(n){const{__:a}=wp.i18n;let i=new Object,d=a("Error processing shipping method update request.","addonify-floating-cart");Z("select.shipping_method, :input[name^=shipping_method][type=radio]:checked, :input[name^=shipping_method][type=hidden]").each((function(){i[Z(this).data("index")]=Z(this).val()})),O("show"),Z.ajax({url:o,method:"POST",data:{action:E,nonce:e,shipping_method:i},success:function(o){if(!o||o.error)return void t.action.toast.dispatch("error",d);let e=o.fragments;e&&Z.each(e,(function(t,o){""!==o?Z(t).replaceWith(o):Z(t).html(o)})),Z("#adfy__woofc-shipping-container").attr("data_display","visible"),"1"===F&&(Z("#addonify_floating_cart_shipping_country").length&&Z("#addonify_floating_cart_shipping_country").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"}),Z("select#addonify_floating_cart_shipping_state")&&Z("select#addonify_floating_cart_shipping_state").selectWoo({dropdownAutoWidth:!1,dropdownCssClass:"afc-selectWoo-dropdown"})),Z("#adfy__woofc-shipping-container").attr("data_display","hidden"),t.api.event.shippingModalClosed()},error:function(o){console.log(o),t.action.toast.dispatch("error",d)},complete:function(){O("hide")}})}))}document.addEventListener("DOMContentLoaded",(function(){(()=>{if("function"!=typeof PerfectScrollbar)return void console.warn("Info: Addonify Floating Cart, PerfectScrollbar is not defined. Perfect scroll bar won't be initialized.");const t=document.getElementById("adfy__floating-cart");new MutationObserver((t=>{t.length>0&&H()})).observe(t,{attributes:!1,childList:!0,subtree:!0})})()})),function(n){T.cart={open:t=>{t.preventDefault(),A("body").addClass("adfy__woofc-visible"),W.event.cartOpened(t)},close:t=>{t.preventDefault(),A("body").removeClass("adfy__woofc-visible"),W.event.cartClosed(t)},refresh:()=>{M()}},x.event={cartOpened:t=>{k(document).trigger("addonifyFloatingCartOpened"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartOpened"))},cartClosed:t=>{k(document).trigger("addonifyFloatingCartClosed"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartClosed"))},cartUpdated:t=>{k(document).trigger("addonifyFloatingCartUpdated",t),document.dispatchEvent(new CustomEvent("addonifyFloatingCartUpdated",{detail:t}))},cartEmptied:()=>{k(document).trigger("addonifyFloatingCartEmptied"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartEmptied")),k(document).trigger("wc_cart_emptied")},productRemoved:o=>{k(document).trigger("addonifyFloatingCartProductRemoved",o),document.dispatchEvent(new CustomEvent("addonifyFloatingCartProductRemoved",{detail:o})),t.api.event.cartUpdated(data)},productRestored:o=>{k(document).trigger("addonifyFloatingCartProductRestored",o),document.dispatchEvent(new CustomEvent("addonifyFloatingCartProductRestored",{detail:o})),t.api.event.cartUpdated(o)},couponModalOpened:()=>{k(document).trigger("addonifyFloatingCartCouponModalOpened"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartCouponModalOpened"))},couponModalClosed:()=>{k(document).trigger("addonifyFloatingCartCouponModalClosed"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartCouponModalClosed"))},couponApplied:o=>{k(document).trigger("addonifyFloatingCartCouponApplied",o),document.dispatchEvent(new CustomEvent("addonifyFloatingCartCouponApplied",{detail:o})),t.api.event.cartUpdated(o)},couponRemoved:o=>{k(document).trigger("addonifyFloatingCartCouponRemoved",o),document.dispatchEvent(new CustomEvent("addonifyFloatingCartCouponRemoved",{detail:o})),t.api.event.cartUpdated(o)},shippingModalOpened:()=>{k(document).trigger("addonifyFloatingCartShippingModalOpened"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartShippingModalOpened"))},shippingModalClosed:()=>{k(document).trigger("addonifyFloatingCartShippingModalClosed"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartShippingModalClosed"))},shippingAddressUpdated:o=>{k(document).trigger("addonifyFloatingCartShippingAddressUpdated",o),document.dispatchEvent(new CustomEvent("addonifyFloatingCartShippingAddressUpdated",{detail:o})),t.api.event.cartUpdated(o)},shoppingMeterThresholdReached:()=>{k(document).trigger("addonifyFloatingCartShoppingMeterThresholdReached"),document.dispatchEvent(new CustomEvent("addonifyFloatingCartShoppingMeterThresholdReached"))}},J.toast={dispatch:(t="success",o)=>{if("undefined"!=typeof Notyf){let e=new Notyf({duration:u,dismissible:_,ripple:!0,position:{x:g[1],y:g[0]}});if(!o)throw new Error("Notification toast data/message is empty, bailing out...");"error"===t&&e.error({className:"adfy__woofc-notfy-error",message:o}),f&&"success"===t&&e.success({className:"adfy__woofc-notfy-success",message:o})}}},n(document).ready((function(){M(),I(),Q(),X(document).on("click",".adfy__woofc-item .adfy__woofc-inc-quantity",(function(t){t.preventDefault();const o=X(this).prev();(parseInt(o.val())<parseInt(o.attr("max"))||""===o.attr("max"))&&K(this,"add")})),X(document).on("click",".adfy__woofc-item .adfy__woofc-dec-quantity",(function(t){t.preventDefault();const o=X(this).next();parseInt(o.val())<=parseInt(o.attr("min"))||K(this,"sub")})),X(document).on("change",".adfy__woofc-item .adfy__woofc-quantity-input-field",(function(t){t.preventDefault(),K(this,"update",X(this).val())})),X(document).on("click",".adfy__woofc-item .thumb .product-remove",(function(n){n.preventDefault();const a=X(this).attr("data-product_id"),d=X(this).attr("data-cart_item_key"),r=X(this);O("show"),X.ajax({type:"POST",dataType:"json",url:o,data:{action:i,product_id:a,cart_item_key:d,nonce:e},success:function(o){if(!o||o.error)throw new Error("Error removing product from cart!");X(".post-"+a).find("a.wc-forward").remove(),X(".post-"+a).find("a.add_to_cart_button").removeClass("added");let e=o.fragments;e&&X.each(e,(function(t,o){X(t).replaceWith(o)})),$("show","info",o.undo_product_link),0===o.cart_items_count&&(t.api.event.cartEmptied(),X(".adfy__woofc-content-entry").html(o.empty_cart_message)),X(document).trigger("removed_from_cart",[o.fragments,o.cart_hash,r]),X(document).trigger("wc_update_cart"),t.api.event.cartUpdated(o)},error:function(o){console.log(o);const e=G("Error processing product removal request!","addonify-floating-cart");t.action.toast.dispatch("error",e)},complete:function(){O("hide")}})})),X(document).on("click","#adfy__woofc_restore_item",(function(n){n.preventDefault();const a=X(this).attr("data-item_key");O("show"),X.ajax({type:"POST",dataType:"json",url:o,data:{action:d,cart_item_key:a,nonce:e},success:function(o){if(!o.fragments||o.error)throw new Error("Error restoring product to cart!");const e=o.fragments,n=X(".adfy__woofc-colophon"),a=X(".adfy__woofc-shipping-bar");e&&X.each(e,(function(t,o){X(t).replaceWith(o)})),n.hasClass("adfy__woofc-hidden")&&n.removeClass("adfy__woofc-hidden"),a.hasClass("adfy__woofc-hidden")&&a.removeClass("adfy__woofc-hidden"),t.api.event.productRestored(e),$("hide")},error:function(o){console.log(o);const e=G("Error processing product restore request!","addonify-floating-cart");t.action.toast.dispatch("error",e)},complete:function(){O("hide")}})})),function(){const o=Y("#adfy__woofc-coupon-container");Y(document).on("click","#adfy__woofc-coupon-trigger",(function(e){e.preventDefault(),o.attr("data_display","visible"),t.api.event.couponModalOpened()})),Y(document).on("click","#adfy__woofc-hide-coupon-container",(function(e){e.preventDefault(),o.attr("data_display","hidden"),t.api.event.couponModalClosed()})),document.addEventListener("addonifyFloatingCartCouponApplied",(()=>{C&&setTimeout((()=>{o.attr("data_display","hidden")}),1e3)}))}(),function(){const{__:n}=wp.i18n;let a;Y(document).on("submit","#adfy__woofc-coupon-form",(function(i){i.preventDefault(),O("show");let d=Y(this).find("input[name=adfy__woofc-coupon-input-field]"),r=d.val();Y.ajax({url:o,method:"post",data:{action:w,nonce:e,form_data:r},success:function(o){if(!o)return a=n("Error processing coupon request.","addonify-floating-cart"),void B("show",{style:"error",message:a});const{couponApplied:e,html:i}=o;e&&(d.val(""),t.api.event.couponApplied(o)),Y.each(i,(function(t,o){Y(t).replaceWith(o)})),N()},error:function(o){console.log(o),a=n("Error processing coupon request.","addonify-floating-cart"),t.action.toast.dispatch("error",a),B("show",{style:"error",message:a})},complete:function(){O("hide")}})}))}(),function(){const{__:n}=wp.i18n;let a;Y(document).on("click",".adfy__woofc-remove-applied-coupon-button",(function(i){i.preventDefault(),O("show");let d=Y(this).closest("li"),r=Y(this).attr("data-coupon");Y.ajax({url:o,method:"post",data:{action:v,nonce:e,form_data:r},success:function(o){if(!o)return a=n("Error processing coupon request.","addonify-floating-cart"),void B("show",{style:"error",message:a});const{couponRemoved:e,html:i}=o;e&&(d.remove(),t.api.event.couponRemoved(o)),Y.each(i,(function(t,o){Y(t).replaceWith(o)})),N()},error:function(t){console.log(t),a=n("Error processing coupon request.","addonify-floating-cart"),B("show",{style:"error",message:a})},complete:function(){O("hide")}})}))}(),tt(),ot(),et()}))}(jQuery)}));