System.register(["./vue-legacy.js?v=1723125373998","./index-legacy.js?v=1723125373998"],(function(n,e){"use strict";var i,t,s,o,r,a,l,c,p,d,u,m,h,f,v,g,y,b;return{setters:[n=>{i=n.l,t=n.k,s=n.r,o=n.I,r=n.p,a=n.J},n=>{l=n.aK,c=n.aC,p=n.aE,d=n.cD,u=n.aG,m=n.aM,h=n.aN,f=n.aP,v=n.cf,g=n.bX,y=n.bV,b=n.aT}],execute:function(){const e={name:"Spin",common:l,self:n=>{const{opacityDisabled:e,heightTiny:i,heightSmall:t,heightMedium:s,heightLarge:o,heightHuge:r,primaryColor:a,fontSize:l}=n;return{fontSize:l,textColor:a,sizeTiny:i,sizeSmall:t,sizeMedium:s,sizeLarge:o,sizeHuge:r,color:a,opacitySpinning:e}}},z=c([c("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),p("spin-container","\n position: relative;\n ",[p("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[d()])]),p("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),p("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[u("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),p("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),p("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[u("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]),S={small:20,medium:18,large:16},x=Object.assign(Object.assign({},h.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number});n("_",i({name:"Spin",props:x,setup(n){const{mergedClsPrefixRef:i,inlineThemeDisabled:r}=m(n),a=h("Spin","-spin",z,e,n,i),l=t((()=>{const{size:e}=n,{common:{cubicBezierEaseInOut:i},self:t}=a.value,{opacitySpinning:s,color:o,textColor:r}=t;return{"--n-bezier":i,"--n-opacity-spinning":s,"--n-size":"number"==typeof e?y(e):t[b("size",e)],"--n-color":o,"--n-text-color":r}})),c=r?f("spin",t((()=>{const{size:e}=n;return"number"==typeof e?String(e):e[0]})),l,n):void 0,p=v(n,["spinning","show"]),d=s(!1);return o((e=>{let i;if(p.value){const{delay:t}=n;if(t)return i=window.setTimeout((()=>{d.value=!0}),t),void e((()=>{clearTimeout(i)}))}d.value=p.value})),{mergedClsPrefix:i,active:d,mergedStrokeWidth:t((()=>{const{strokeWidth:e}=n;if(void 0!==e)return e;const{size:i}=n;return S["number"==typeof i?"medium":i]})),cssVars:r?void 0:l,themeClass:null==c?void 0:c.themeClass,onRender:null==c?void 0:c.onRender}},render(){var n,e;const{$slots:i,mergedClsPrefix:t,description:s}=this,o=i.icon&&this.rotate,l=(s||i.description)&&r("div",{class:`${t}-spin-description`},s||(null===(n=i.description)||void 0===n?void 0:n.call(i))),c=i.icon?r("div",{class:[`${t}-spin-body`,this.themeClass]},r("div",{class:[`${t}-spin`,o&&`${t}-spin--rotate`],style:i.default?"":this.cssVars},i.icon()),l):r("div",{class:[`${t}-spin-body`,this.themeClass]},r(g,{clsPrefix:t,style:i.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${t}-spin`}),l);return null===(e=this.onRender)||void 0===e||e.call(this),i.default?r("div",{class:[`${t}-spin-container`,this.themeClass],style:this.cssVars},r("div",{class:[`${t}-spin-content`,this.active&&`${t}-spin-content--spinning`,this.contentClass],style:this.contentStyle},i),r(a,{name:"fade-in-transition"},{default:()=>this.active?c:null})):c}}))}}}));
