System.register(["./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-CHm18dY8.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(e,s){"use strict";var t,a,l,r,c,n,u,o,i,p,d,v,m,y,x,g,f,k,b,_,j,I,w,h,$,z;return{setters:[e=>{t=e.k,a=e.r,l=e.c,r=e.o,c=e.b,n=e.$,u=e.Z,o=e._,i=e.S,p=e.a8,d=e.a0,v=e.a9,m=e.F,y=e.P,x=e.aa,g=e.l,f=e.v},e=>{k=e.g},e=>{b=e.i,_=e.m,j=e.c},e=>{I=e.ad,w=e.ae,h=e.k,$=e.a9,z=e.af},null],execute:function(){var s=document.createElement("style");s.textContent=".propress-box[data-v-939603d7]{border:1px solid var(--site-task-progress-border)}\n/*$vite$:1*/",document.head.appendChild(s);const C={class:"p-16px"},F={class:"mb-16px"},S={class:"propress-box p-10px rounded-8px"};e("default",j(t({__name:"progress",props:{params:{},callback:{type:Function}},setup(e){const s=e,t=a(!1),j=a([]),T=l((()=>j.value.findIndex((e=>0===e.status))+1)),E=l((()=>j.value[T.value]?.status)),O={0:"process",1:"finish","-1":"error",2:"wait"},P=e=>O[e];let Z=null;const q=async()=>{const{message:e}=await k({progress_type:s.params});b(e)&&(1===e.status?(Z&&clearInterval(Z),_.success("Task completed!"),t.value=!0):t.value=!1,delete e.status,j.value=Object.values(e))};return r((()=>{q(),Z=window.setInterval((()=>{q()}),2e3)})),c((()=>{s.callback?.(),Z&&clearInterval(Z)})),(e,s)=>{const a=I,l=$,r=h,c=w,k=z;return n(),u("div",C,[o("div",F,[i(t)?(n(),p(a,{key:0,type:"success",title:"Task completed!"})):(n(),p(a,{key:1,type:"default",title:"In progress..."}))]),o("div",S,[d(k,{vertical:"",current:i(T),status:P(i(E)),size:"small"},{default:v((()=>[(n(!0),u(m,null,y(i(j),((e,s)=>(n(),p(c,{key:s,status:P(e.status),description:e.error||e.ps},{title:v((()=>[d(r,{class:"flex-nowrap! items-center!"},{default:v((()=>[o("span",null,x(e.title),1),g(d(l,{size:"small"},null,512),[[f,0===e.status]])])),_:2},1024)])),_:2},1032,["status","description"])))),128))])),_:1},8,["current","status"])])])}}}),[["__scopeId","data-v-939603d7"]]))}}}));
