!function(){"use strict";var t=window.ctFrontend;function e(t,e){const n=function(a){a.target===t&&(t.removeEventListener("transitionend",n),e())};t.addEventListener("transitionend",n)}(0,t.registerDynamicChunk)("blocksy_ext_woo_extra_floating_cart",{mount:function(n,{state:a}){if("INPUT"===n.tagName&&n.classList.contains("qty"))return void function(t){const e=document.querySelector(".ct-floating-bar .quantity .qty"),n=document.querySelector(".ct-cart-actions .quantity .qty");e&&n&&[e,n].forEach(function(e){e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0}))})}(n);"target-after-bottom"===a&&(n.closest(".ct-drawer-canvas").dataset.floatingBar="yes:start",requestAnimationFrame(function(){n.closest(".ct-drawer-canvas").dataset.floatingBar="yes"})),"target-after-bottom"!==a&&(n.closest(".ct-drawer-canvas").dataset.floatingBar="no:updating",e(n,function(){"no:updating"===n.closest(".ct-drawer-canvas").dataset.floatingBar&&(n.closest(".ct-drawer-canvas").dataset.floatingBar="no")}));const o=n.querySelector(".button:not(.single_add_to_cart_button):not(.product_type_external)");o&&(o.hasClickListener||(o.hasClickListener=!0,o.addEventListener("click",function(e){e.preventDefault(),function(e){if(!e)return;var n=window.scrollY,a=null;const o=function(r){a||(a=r);var c=r-a;const i=e.getBoundingClientRect();let s=0;const l=document.querySelector("[data-sticky*=yes], [data-sticky*=fixed]");l&&(s=parseFloat(getComputedStyle(l).top)||0);const u=window.scrollY+i.top-(parseFloat(getComputedStyle(document.body).getPropertyValue("--header-sticky-height"))||0)-20-s;var d,f,g,y=Math.max((d=c,f=n,g=-n,(d/=350)<1?g/2*d*d+f:-g/2*(--d*(d-2)-1)+f),u);t.areWeDealingWithSafari?(scrollTo(0,y),c<700&&requestAnimationFrame(o)):scrollTo(0,u)};t.areWeDealingWithSafari?requestAnimationFrame(o):o(0)}(document.querySelector(".single-product .single_add_to_cart_button").closest("form"))})))}})}();