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