(function(t,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue")):typeof define=="function"&&define.amd?define(["vue"],a):(t=typeof globalThis<"u"?globalThis:t||self,t.index=a(t.Vue))})(this,function(t){"use strict";const a={text:{name:"text",height:"1rem",width:"100%",borderRadius:"0.25rem",margin:"0 0 0.25rem"},avatar:{name:"avatar",height:"40px",width:"40px",borderRadius:"50%",margin:"0 0 0.75rem"},image:{name:"image",height:"150px",width:"100%",borderRadius:"0.25rem",margin:"0 0 0.75rem"},button:{name:"button",height:"36px",width:"64px",borderRadius:"0.25rem",margin:"0 0 0.75rem"},chip:{name:"chip",height:"32px",width:"96px",borderRadius:"1rem",margin:"0 0.75rem 0.75rem 0"},divider:{name:"divider",height:"1px",width:"100%",borderRadius:"0",margin:"0 0 0.75rem"}};function s(e){const r=l(e);return u(r)}function l(e){return e.match(/^[^\s@]+(?:@\d+(?:\.\d+)?)?$/)?e:""}function u(e){const r=Object.keys(a),[n,o="1"]=e.split("@"),d=parseInt(o);return r.includes(n)?{name:e,skeletonName:n,bonesCount:d}:{}}function c(e){const{type:r,borderRadius:n,height:o,width:d}=e,i={};return i["border-radius"]=n||a[r].borderRadius,i.height=o||a[r].height,i.width=d||a[r].width,i.margin=a[r].margin,i}const m={class:"vue-skeleton-loader"},f=t.defineComponent({__name:"VueSkeletonLoader",props:{loading:{type:Boolean,required:!1,default:!0},type:{type:String,required:!1,default:"text"},animation:{type:String,required:!1,default:"wave"},duration:{type:String,required:!1,default:"1.5s"},baseColor:{type:String,required:!1,default:"#0000001E"},highlightColor:{type:String,required:!1,default:"#FFFFFF66"},borderRadius:{type:[String,Number],required:!1,default:""},height:{type:[String,Number],required:!1,default:""},width:{type:[String,Number],required:!1,default:""},timingFunction:{type:String,required:!1,default:"linear"},direction:{type:String,required:!1,default:"ltr"},skeletonStyle:{type:Object,required:!1,default:()=>({})},skeletonClassName:{type:String,required:!1,default:""}},setup(e){t.useCssVars(i=>({"9e346efe":e.baseColor,"616210f3":e.animation,"48316e45":e.duration,"249a139a":e.timingFunction,ddfaca00:e.highlightColor}));const r=e,{skeletonName:n,bonesCount:o}=s(r.type);let d=t.reactive({});if(o&&o>0){const i={type:n,borderRadius:r.borderRadius,height:r.height,width:r.width};d=c(i)}return(i,b)=>(t.openBlock(),t.createElementBlock("div",m,[e.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(o),h=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vue-skeleton-loader-bone",[`v-skeleton-loader-${t.unref(n)}`,{"animation-disabled":!e.animation,"rtl-direction":e.direction==="rtl"},e.animation,e.skeletonClassName]]),ref_for:!0,ref:"skeleton",key:h,style:t.normalizeStyle({...t.unref(d),...e.skeletonStyle})},[t.renderSlot(i.$slots,"default",{},void 0,!0)],6))),128)):t.createCommentVNode("",!0)]))}}),g="";return((e,r)=>{const n=e.__vccOpts||e;for(const[o,d]of r)n[o]=d;return n})(f,[["__scopeId","data-v-429326cb"]])});