(()=>{"use strict";var t,e={61(){const t=(t,e)=>{const r=Number.parseFloat(String(t));return Number.isFinite(r)?r:e},e=(t,e,r)=>Math.min(r,Math.max(e,t)),r=(t,r,o)=>{const n=e(o,0,r.goal),a=r.goal,s=a>0?n/a:0,i=r.totalLength*(1-s);r.bar.style.strokeDashoffset=`${i}`,t.setAttribute("aria-valuenow",String(Math.round(n)));const l=t.querySelector(".calio-progress-pie-number");l&&(l.textContent=`${Math.round(n)}%`)},o=o=>{const n=(r=>{const o=Math.max(1,Math.round(t(r.dataset.barsize,8))),n=Math.max(1,80-o/2),a=e(Math.round(t(r.dataset.goal,75)),0,100),s=r.querySelector(".calio-progress-pie-svg");s&&s.remove();const i=document.createElement("div");i.className="calio-progress-pie-svg";const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("version","1.1"),l.setAttribute("preserveAspectRatio","xMinYMin meet"),l.setAttribute("viewBox","0 0 160 160");const c=document.createElementNS("http://www.w3.org/2000/svg","ellipse");c.setAttribute("rx",String(n)),c.setAttribute("ry",String(n)),c.setAttribute("cx",String(80)),c.setAttribute("cy",String(80)),c.setAttribute("stroke-width",String(o));const d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("stroke-width",String(o)),d.setAttribute("d",((t,r)=>{let o=e(t,0,100);o>=100&&(o=99.9999);const n=o*Math.PI*2/100,a=80+r*Math.sin(0),s=80-r*Math.cos(0),i=80+r*Math.sin(n),l=80-r*Math.cos(n);return`M${a},${s} A${r},${r} 0 ${n>Math.PI?1:0} 1 ${i},${l}`})(0===a?1e-4:a,n)),l.appendChild(c),l.appendChild(d),i.appendChild(l),r.appendChild(i);const u=d.getTotalLength();return d.style.strokeDasharray=`${u} ${u}`,d.style.strokeDashoffset=`${u}`,{goal:a,bar:d,totalLength:u}})(o),a=Math.max(1,t(o.dataset.speed,15)),s=e(Math.round(t(o.getAttribute("aria-valuenow"),0)),0,100),i=n.goal,l=Math.max(1,Math.abs(i-s)*a);if(l<=1||i===s)return void r(o,n,i);const c=performance.now(),d=t=>{const a=e((t-c)/l,0,1),u=(t=>1-(1-t)**3)(a);r(o,n,s+(i-s)*u),a<1&&window.requestAnimationFrame(d)};window.requestAnimationFrame(d)},n=(t=document,e={})=>{const r=Boolean(e.force);(t instanceof Element?t:document).querySelectorAll(".calio-progress-pie").forEach(t=>{((t,e=!1)=>{if(!(t instanceof HTMLElement))return;if(!e&&"yes"===t.dataset.calioProgressPieInit)return;e&&t.removeAttribute("data-calio-progress-pie-init"),t.dataset.calioProgressPieInit="yes";const r=t.closest(".calio-progress-pie-wrapper");Boolean(window.elementorFrontend?.isEditMode?.())?o(t):((t,e)=>{if(!(t instanceof Element))return;if(!("IntersectionObserver"in window))return void e();const r=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1&&(r.unobserve(t.target),r.disconnect(),e())})},{root:null,rootMargin:"0px",threshold:1});r.observe(t)})(r||t,()=>{o(t)})})(t,r)})};document.addEventListener("DOMContentLoaded",()=>{n(document)});let a=!1;const s=()=>!!a||!!window.elementorFrontend?.hooks&&(window.elementorFrontend.hooks.addAction("frontend/element_ready/calio-progress-pie.default",t=>{const e=t?.[0]||null;e&&n(e,{force:!0})}),a=!0,!0);if(window.addEventListener("elementor/frontend/init",s),!s()){let t=0;const e=window.setInterval(()=>{t+=1,(s()||t>=40)&&window.clearInterval(e)},250)}}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,o),a.exports}o.m=e,t=[],o.O=(e,r,n,a)=>{if(!r){var s=1/0;for(d=0;d<t.length;d++){for(var[r,n,a]=t[d],i=!0,l=0;l<r.length;l++)(!1&a||s>=a)&&Object.keys(o.O).every(t=>o.O[t](r[l]))?r.splice(l--,1):(i=!1,a<s&&(s=a));if(i){t.splice(d--,1);var c=n();void 0!==c&&(e=c)}}return e}a=a||0;for(var d=t.length;d>0&&t[d-1][2]>a;d--)t[d]=t[d-1];t[d]=[r,n,a]},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={2344:0,8720:0};o.O.j=e=>0===t[e];var e=(e,r)=>{var n,a,[s,i,l]=r,c=0;if(s.some(e=>0!==t[e])){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(l)var d=l(o)}for(e&&e(r);c<s.length;c++)a=s[c],o.o(t,a)&&t[a]&&t[a][0](),t[a]=0;return o.O(d)},r=globalThis.webpackChunkcalio_addon=globalThis.webpackChunkcalio_addon||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var n=o.O(void 0,[8720],()=>o(61));n=o.O(n)})();