System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index-legacy-BJO1GMTD.js?v=1773287522785","./utils-legacy-D3bAeO-j.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785"],(function(e,t){"use strict";var a,s,n,i,o,c,l,r,p,u,_,f,g,d,k,m,h,b,y,x,w,v,C,j,B,I;return{setters:[e=>{a=e.v,s=e.l,n=e.x,i=e.P,o=e.h,c=e.i,l=e.C},e=>{r=e._},e=>{p=e.J,u=e.K},e=>{_=e.k,f=e.R,g=e.e,d=e.o,k=e.b,m=e.$,h=e.Z,b=e.ak,y=e.a0,x=e.a9,w=e.S,v=e.a8,C=e._,j=e.a3},e=>{B=e.ab,I=e.k},null,null],execute:function(){const R={class:"p-16px"},z={class:"h-250px"};e("default",_({__name:"index",props:{onRefresh:{},type:{default:"backup"}},emits:["close"],setup(e,{emit:_}){const{t:D}=f(),S=j((()=>i((()=>t.import("./backup-success-legacy-EYBN6I8r.js?v=1773287522785")),void 0))),U=j((()=>i((()=>t.import("./backup-error-legacy-DtSPLF5T.js?v=1773287522785")),void 0))),E=_,G=e,J=a("backup"===G.type?D("Config.Backup.index_80"):D("Config.Backup.index_81")),K=a("backup"===G.type?D("Config.Backup.index_82"):D("Config.Backup.index_83")),N=g({}),P=()=>{const e="backup"===G.type?D("Config.Backup.index_78"):D("Config.Backup.index_79");o({title:D("Config.Backup.index_14"),content:e,onConfirm:async()=>{Z&&clearInterval(Z),await p({timestamp:void 0}),T()}})},T=()=>{Z&&clearInterval(Z),E("close"),G.onRefresh()};let Z=null;const $=async()=>{const{message:e}=await u({type:G.type});if(c(e)){if(N.task_msg=e.task_msg,N.exec_log=e.exec_log,N.progress=e.progress,100!==e.progress&&2!==e.task_status&&3!==e.task_status||Z&&clearInterval(Z),2===e.task_status||3===e.task_status)return G.onRefresh(),J.data.type=G.type,J.data.backup_file_info={name:e.backup_file_info.backup_name,files_size:l(Number(e.backup_file_info.backup_file_size)),end_time:e.backup_file_info.done_time,time_count:"backup"===G.type?e.backup_file_info.total_time:e.backup_file_info.restore_total_time,backup_file_sha256:e.backup_file_info.backup_file_sha256},J.show=!0,void(Z&&clearInterval(Z));3===e.task_status&&(G.onRefresh(),K.data.errData=e.err_info,K.show=!0,Z&&clearInterval(Z))}};return d((()=>{$(),Z=window.setInterval((()=>{$()}),2e3)})),k((()=>{Z&&clearInterval(Z)})),(e,t)=>{const a=B,i=s,o=I,c=r,l=n;return m(),h("div",R,[b("",!0),y(o,{class:"flex-nowrap! items-center my-10px",size:5},{default:x((()=>[y(a,{height:24,percentage:w(N).progress,"indicator-placement":"inside",processing:w(N).progress<100,status:"success"},null,8,["percentage","processing"]),w(N).progress<100?(m(),v(i,{key:0,name:"base-error",class:"text-error",size:20,onClick:P})):b("",!0)])),_:1}),C("div",z,[y(c,{log:w(N).exec_log},null,8,["log"])]),y(l,{show:w(J).show,"onUpdate:show":t[0]||(t[0]=e=>w(J).show=e),title:w(J).title,data:w(J).data,width:"600","min-height":350,component:w(S),onClose:T},null,8,["show","title","data","component"]),y(l,{show:w(K).show,"onUpdate:show":t[1]||(t[1]=e=>w(K).show=e),title:w(K).title,data:w(K).data,width:"600","min-height":350,component:w(U),onClose:T},null,8,["show","title","data","component"])])}}}))}}}));
