(()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".wp-block-b-blocks-skill-bar");if(!e.length)return;const t=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&(e.target.classList.add("is-visible"),e.target.querySelectorAll(".b-blocks-skill-bar-skill-item").forEach((function(e){const t=parseInt(e.dataset.percentage,10),s=e.querySelector(".b-blocks-skill-bar-skill-bar-fill"),l=e.querySelector(".b-blocks-skill-bar-skill-circular-progress");if(s){e.style.setProperty("--b-blocks-skill-bar-skill-percentage",t+"%");const l=s.dataset.color;setTimeout((function(){s.style.width=t+"%",l&&(s.style.backgroundColor=l)}),100)}if(l){e.style.setProperty("--b-blocks-skill-bar-skill-percentage",t);const s=l.dataset.color,r=2*Math.PI*45*(1-t/100);setTimeout((function(){l.style.strokeDashoffset=r,s&&(l.style.stroke=s)}),100)}})),t.unobserve(e.target))}))}),{threshold:.2,rootMargin:"0px 0px -50px 0px"});e.forEach((function(e){t.observe(e)}))}))})();