1import{k as F,i as y,c as l,p as N,q as S,m as A,a as n,o as r,d as B,F as f,r as h,j as p,e as v,f as c,v as w}from"./Do1nZpFk.js";import"./BM5aYONo.js";const I=["textContent"],j=["textContent"],M={__name:"Counter",props:{counter:{type:Object,required:!0},parentEl:{required:!0},shapeEnabled:{required:!0},styles:{required:!0}},setup(u){const{$_:k}=F(),e=u,i=y(0),d=y(!1),x=l(()=>e.counter.to.toString().length),C=l(()=>new Intl.NumberFormat().format(i.value).split("")),g=l(()=>i.value.toString()==="NaN"?[0]:i.value.toString().split("")),E=l(()=>k.get(e.counter.decimal,["enabled","lg"],!1)?C.value:g.value),q=l(()=>({color:e.counter.decimal.color})),b=()=>{let t=null;const o=s=>{t||(t=s);const a=Math.min((s-t)/((e.counter.speed||.1)*1e3),1);i.value=Math.floor(a*(parseInt(e.counter.to)-parseInt(e.counter.from))+parseInt(e.counter.from)),a<1?window.requestAnimationFrame(o):window.cancelAnimationFrame(window.requestAnimationFrame(o))};window.requestAnimationFrame(o)},m=()=>{if(d.value)return;const t=e.parentEl.getBoundingClientRect();if(t.top>=0&&t.left>=0&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight))return d.value=!0,!0};return N(()=>{m(),document.addEventListener("scroll",m)}),S(()=>{document.removeEventListener("scroll",m)}),A(d,()=>{b()}),(t,o)=>(r(),n(f,null,[u.shapeEnabled&&e.counter.from<e.counter.to?(r(!0),n(f,{key:0},h(c(x)-c(g).length,(s,a)=>(r(),n("div",{key:`key-${a}`,style:p(u.styles),class:"d-flex align-items-center justify-content-center"},o[0]||(o[0]=[v("span",null,"0",-1)]),4))),128)):B("",!0),(r(!0),n(f,null,h(c(E),(s,a)=>(r(),n("div",{key:a},[s!==","?(r(),n("div",{key:0,style:p(u.styles),class:"d-flex align-items-center justify-content-center"},[v("span",{textContent:w(s)},null,8,I)],4)):(r(),n("div",{key:1,class:"drop-shadow",style:p(c(q)),textContent:w(u.counter.decimal.char)},null,12,j))]))),128))],64))}};export{M as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.