text: var $=Object.defineProperty;var y=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var m=(t,a,e)=>a in t?$(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,p=(t,a)=>{for(var e in a||(a={}))E.call(a,e)&&m(t,e,a[e]);if(y)for(var e of y(a))T.call(a,e)&&m(t,e,a[e]);return t};import{a as w,v as g,cK as S,f as B,i as C,L as F,a7 as k,N as L,cL as z,cy as D,av as I,o as K,h as M,t as P,bl as j,aE as q}from"./index.d2ddfb50.js";const A={startVal:{type:Number,default:0},endVal:{type:Number,default:2021},duration:{type:Number,default:1500},autoplay:{type:Boolean,default:!0},decimals:{type:Number,default:0,validator(t){return t>=0}},prefix:{type:String,default:""},suffix:{type:String,default:""},separator:{type:String,default:","},decimal:{type:String,default:"."},color:{type:String},useEasing:{type:Boolean,default:!0},transition:{type:String,default:"linear"}},G=w({name:"CountTo",props:A,emits:["onStarted","onFinished"],setup(t,{emit:a}){const e=g(t.startVal),u=g(!1);let o=S(e);const c=B(()=>x(C(o)));F(()=>{e.value=t.startVal}),k([()=>t.startVal,()=>t.endVal],()=>{t.autoplay&&s()}),L(()=>{t.autoplay&&s()});function s(){d(),e.value=t.endVal}function h(){e.value=t.startVal,d()}function d(){o=S(e,p({disabled:u,duration:t.duration,onFinished:()=>a("onFinished"),onStarted:()=>a("onStarted")},t.useEasing?{transition:z[t.transition]}:{}))}function x(n){if(!n&&n!==0)return"";const{decimals:b,decimal:v,separator:i,suffix:V,prefix:N}=t;n=Number(n).toFixed(b),n+="";const l=n.split(".");let r=l[0];const _=l.length>1?v+l[1]:"",f=/(\d+)(\d{3})/;if(i&&!D(i))for(;f.test(r);)r=r.replace(f,"$1"+i+"$2");return N+r+_+V}return{value:c,start:s,reset:h}}});function H(t,a,e,u,o,c){return K(),M("span",{style:j({color:t.color})},P(t.value),5)}var J=I(G,[["render",H]]);const R=q(J);export{R as C};
  