/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const e=require("vue"),t=require("../../node_modules/@vueuse/core/dist/index.js");;/* empty css            */const a=require("../../_virtual/_plugin-vue_export-helper.js"),n=require("../../node_modules/lodash-es/isNumber.js"),r={key:0},o=Object.assign({name:"GscCountTo"},{__name:"index",props:{startVal:{type:Number,default:0},endVal:{type:Number,default:2021},duration:{type:Number,default:2e3},autoplay:{type:Boolean,default:!0},decimals:{type:Number,default:0,validator:e=>e>=0},inSvg:Boolean,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"}},emits:["onStarted","onFinished"],setup(a,{expose:o,emit:i}){const l=a,s=i,u=e.ref(l.startVal),d=e.ref(!1);let p=t.useTransition(u);const c=e.computed(()=>function(e){if(!e&&0!==e)return"";const{decimals:t,decimal:a,separator:r,suffix:o,prefix:i}=l;e=Number(e).toFixed(t);const s=(e+="").split(".");let u=s[0];const d=s.length>1?a+s[1]:"",p=/(\d+)(\d{3})/;if(r&&!n.default(r))for(;p.test(u);)u=u.replace(p,`$1${r}$2`);return i+u+d+o}(e.unref(p)));function f(){y(),u.value=l.endVal}function y(){p=t.useTransition(u,{disabled:d,duration:l.duration,onFinished:()=>s("onFinished"),onStarted:()=>s("onStarted"),...l.useEasing?{transition:t.TransitionPresets[l.transition]}:{}})}return e.watchEffect(()=>{u.value=l.startVal}),e.watch([()=>l.startVal,()=>l.endVal],()=>{l.autoplay&&f()}),e.onMounted(()=>{l.autoplay&&f()}),o({reset:function(){u.value=l.startVal,y()}}),(t,n)=>a.inSvg?(e.openBlock(),e.createElementBlock("text",r,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle({color:a.color})},e.toDisplayString(c.value),5))}}),i=a.default(o,[["__scopeId","data-v-55fa29ca"]]);exports.default=i;