(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=t=>{clearTimeout(t.countUpTimeout),t._countUpOrigInnerHTML&&(t.innerHTML=t._countUpOrigInnerHTML,t._countUpOrigInnerHTML=void 0),t.style.visibility=""},n=(t,e={})=>{const{duration:n=1e3,delay:i=16}=e,o=n/i,r=t.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),s=[];for(let t=0;t<o;t++)s.push("");for(let t=0;t<r.length;t++)if(/([0-9.][,.0-9]*[0-9]*)/.test(r[t])&&!/<[^>]+>/.test(r[t])){let e=r[t];const n=[...e.matchAll(/[.,]/g)].map((t=>({char:t[0],i:e.length-t.index-1}))).sort(((t,e)=>t.i-e.i));e=e.replace(/[.,]/g,"");let i=s.length-1;for(let t=o;t>=1;t--){let r=parseInt(e/o*t,10);r=n.reduce(((t,{char:e,i:n})=>t.length<=n?t:t.slice(0,-n)+e+t.slice(-n)),r.toString()),s[i--]+=r}}else for(let e=0;e<o;e++)s[e]+=r[t];return s[s.length]=t.toString(),s},i=window.wp.domReady;var o=t.n(i);const r="coblocks-counter-active";window.coblocksCounter=new class{callback=t=>{t.forEach((t=>{const i=t.target,o=1e3*parseInt(i?.getAttribute("data-counter-speed")||1);!i.classList.contains(r)&&t.isIntersecting&&setTimeout((()=>{((t,i={})=>{const{action:o="start",duration:r=1e3,delay:s=16}=i;if("stop"===o)return void e(t);if(e(t),!/[0-9]/.test(t.innerHTML))return;const c=n(t.innerHTML,{duration:r||t.getAttribute("data-duration"),delay:s||t.getAttribute("data-delay")});t._countUpOrigInnerHTML=t.innerHTML,t.innerHTML=c[0]||"&nbsp;",t.style.visibility="visible";const a=function(){t.innerHTML=c.shift()||"&nbsp;",c.length?(clearTimeout(t.countUpTimeout),t.countUpTimeout=setTimeout(a,s)):t._countUpOrigInnerHTML=void 0};t.countUpTimeout=setTimeout(a,s)})(i,{duration:o}),i.classList.add(r)}),200)}))};init=()=>{const t=document.querySelectorAll(".wp-block-coblocks-counter"),e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"IntersectionObserver"in window&&!e?(this.io&&this.io.disconnect(),this.io=new IntersectionObserver(this.callback,{threshold:.25}),t.forEach((t=>{this.io.observe(t)}))):t.forEach((t=>{t.classList.add(r)}))}},o()(window.coblocksCounter.init)})();