!function(){"use strict";var t=window.ctFrontend;(0,t.registerDynamicChunk)("blocksy_ext_woo_extra_stock_scarcity",{mount:function(t,e){var n=e.event,r=e.eventData;"reset_data"!==n.type&&"found_variation"!==n.type||function(t,e,n){n.querySelector(".ct-message"),n.dataset.items=t||0;var r=n.querySelector(".ct-stock-quantity");if(0!==t&&e&&r){if(r.innerHTML=r.innerHTML.replace(/\d+/,t),n){var o=Math.min(t/e*100,100);o>=100?n.hidden=!0:n.removeAttribute("hidden"),n.querySelector(".ct-progress-bar span").style.width="".concat(o,"%")}}else n.hidden=!0}((null==r?void 0:r.max_qty)||0,null==r?void 0:r.blocksy_low_stock_amount,t)}})}();