1import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{Tn as t}from"./icons-XNDO9md9.js";import{t as n}from"./react-vendor-CrWGwBDo.js";var r=e(t(),1),i=n();function a(e){let t=e.match(/\d+(?:[.,]\d+)?/);return!t||t.index===void 0?{prefix:e,num:``,suffix:``}:{prefix:e.slice(0,t.index),num:t[0],suffix:e.slice(t.index+t[0].length)}}function o({value:e,className:t,animate:n=!0,duration:o=1200}){let s=(0,r.useRef)(null),c=(0,r.useRef)(null),{prefix:l,num:u,suffix:d}=(0,r.useMemo)(()=>a(e),[e]);return(0,r.useEffect)(()=>{if(!n||!u)return;let e=s.current,t=c.current;if(!e||!t||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let r=Number.parseFloat(u.replace(`,`,`.`));if(!Number.isFinite(r))return;let i=u.includes(`,`)?u.split(`,`)[1].length:0,a=e=>{let t=Math.abs(e).toFixed(i);return i?t.replace(`.`,`,`):t},l=0,d=()=>{let e=performance.now(),n=i=>{let s=Math.min(1,(i-e)/o),c=1-(1-s)**3;s<1?(t.textContent=a(r*c),l=requestAnimationFrame(n)):t.textContent=u};l=requestAnimationFrame(n)},f=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(f.disconnect(),d())})},{threshold:.4});return f.observe(e),()=>{f.disconnect(),cancelAnimationFrame(l),t.textContent=u}},[u,n,o]),(0,i.jsxs)(`span`,{ref:s,className:t,"aria-label":e,children:[l,(0,i.jsx)(`span`,{ref:c,children:u}),d]})}export{o as t};
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.