"use strict";(self.blocksyJsonP=self.blocksyJsonP||[]).push([[36],{36:function(t,e,o){o.r(e),o.d(e,{mount:function(){return u}});var c=o(194),n=o.n(c),r=o(601),i=o.n(r);let d=!1,a=!1;const u=function(){if(!n())return;const t='.ct-header-cart, .ct-shortcuts-bar [data-id="cart"]';if(d)return;d=!0,n()(document.body).on("adding_to_cart",(function(){return[...document.querySelectorAll(t)].map((function(t){t.closest(".ct-shortcuts-bar")||(t=t.firstElementChild),t.classList.remove("ct-added"),t.classList.add("ct-adding")}))})),n()(document.body).on("wc_fragments_loaded",(function(){setTimeout((function(){return i().trigger("ct:popper-elements:update")})),setTimeout((function(){return i().trigger("blocksy:frontend:init")}))})),n()(document.body).on("wc_cart_button_updated",(function(t,e){if(window.wc_add_to_cart_params&&window.wc_add_to_cart_params.i18n_view_cart_with_icon&&e&&e.length>0){const t=e[0];t.closest("[data-products]")&&(t.nextElementSibling.innerHTML=wc_add_to_cart_params.i18n_view_cart_with_icon)}}));const e=function(){[...document.querySelectorAll(t)].map((function(t,e){e>0||document.querySelector("#ct-compare-modal.active")||document.querySelector(".quick-view-modal.active")||!(!document.body.classList.contains("single-product")&&t.querySelector('[data-auto-open*="archive"]')||document.body.classList.contains("single-product")&&t.querySelector('[data-auto-open*="product"]'))||(t.querySelector("[data-auto-open]").focusDisabled=!0,t.querySelector("[data-auto-open]").click())}))};n()(document.body).on("added_to_cart",(function(o,c,n,r,i){r=r[0],[...document.querySelectorAll(t)].map((function(t,e){let o=t;t.closest(".ct-shortcuts-bar")||(o=t.firstElementChild),o.classList.remove("ct-adding"),o.classList.add("ct-added")})),Object.keys(c).length>0?e():a=!0})),n()(document.body).on("wc_fragments_refreshed",(function(){a&&e(),a=!1,setTimeout((function(){i().trigger("blocksy:frontend:init"),i().trigger("ct:popper-elements:update"),o()}))})),n()(document.body).on("removed_from_cart",(function(e,o,c,n){return[...document.querySelectorAll(t)].map((function(t){if(n)try{n[0].closest("li").parentNode.removeChild(n[0].closest("li"))}catch(t){}}))})),n()(document).on("uael_quick_view_loader_stop",(function(){i().trigger("ct:add-to-cart:quantity")})),n()(document).on("facetwp-loaded",(function(){i().trigger("ct:custom-select:init")}));const o=function(){let t=document.querySelector(".ct-header-cart .ct-cart-content");t&&t.removeAttribute("style")};n()(document.body).on("wc_fragments_loaded",(function(){setTimeout((function(){i().trigger("blocksy:frontend:init"),i().trigger("ct:popper-elements:update"),o()}))})),n()(document.body).on("click",".remove_from_cart_button",{},(function(t){const e=t.target.closest(".woocommerce-mini-cart-item");e&&e.classList.add("processing")}))}}}]);