System.register(["./page_layout-legacy.js?v=1753954525509","./index-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509"],(function(s,e){"use strict";var t,a,o,n,i,l,r,c,p,d,u,m,g,_,w,h,v,f,y,x,k,S,b,j,T;return{setters:[s=>{t=s.v,a=s.a,o=s.c,n=s.m,i=s._,l=s.O,r=s.e},s=>{c=s._},s=>{p=s.e,d=s.A,u=s.B},s=>{m=s.k,g=s.P,_=s.r,w=s.o,h=s.b,v=s.U,f=s.V,y=s.Q,x=s.a2,k=s.W,S=s.X,b=s.a3,j=s._},s=>{T=s.bA}],execute:function(){var C=document.createElement("style");C.textContent=".panel-ssl-progress[data-v-82c005c3]{min-width:340px;padding:24px 24px 22px}.panel-ssl-progress .progress-item[data-v-82c005c3]{display:flex;gap:16px;cursor:pointer}.panel-ssl-progress .progress-item+.progress-item[data-v-82c005c3]{margin-top:16px}.panel-ssl-progress .progress-item .progress-label[data-v-82c005c3]{min-width:120px}\n",document.head.appendChild(C),s("g",(()=>t.post("/ssl_domain?action=get_panel_domain"))),s("s",(s=>t.post("/ssl_domain?action=set_panel_domain_ssl",{domain:JSON.stringify(s.domain)},{requestOptions:{loading:"Installing certificate, please wait...",successMessage:!1}})));const J={class:"panel-ssl-progress"},D={class:"progress-label"},F={class:"w-120px"},L=m({__name:"ssl-lets-progress",props:{task_id:{type:Number,default:0},isJump:{type:Boolean,default:!0},onFinish:{type:Function,default:()=>{}}},emits:["close"],setup(s,{emit:r}){const m=j((()=>a((()=>e.import("./ssl-log-legacy.js?v=1753954525509")),void 0))),{t:C}=g(),L=r,O=_({});let A=null;const B=_(!1),E=p(C("SSL.Domain.index_5")),I=async(e=!1)=>{try{e&&(B.value=!0);const{message:i}=await(a={task_id:s.task_id},t.post("/ssl_domain?action=ssl_tasks_status",a));if(o(i)&&(O.value=i,-1===i.task_code)){L("close");const s=i.task_result.match(/Error:\s*(\[[\s\S]+\])$/);if(s&&s[1]){const e=s[1];try{const s=d.parse(e);u(s)}catch{n.error(C("SSL.index_31"))}}else n.error(C("SSL.index_31"));return}100===O.value.task_status?(A&&clearTimeout(A),L("close"),s.onFinish?.(),n.success(C("Config.Safe.Ssl.index_11")),s.isJump&&setTimeout((()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()}),1e3)):N()}catch{s.isJump&&setTimeout((()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()}),1e3)}finally{e&&(B.value=!1)}var a},N=()=>{A&&clearTimeout(A),A=window.setTimeout((()=>{I()}),3e3)};return w((()=>{I(!0)})),h((()=>{A&&(clearTimeout(A),A=null)})),(s,e)=>{const t=T,a=i,o=l,n=c;return v(),f("div",J,[y(o,{show:S(B)},{default:x((()=>[k("div",{class:"progress-item",onClick:e[0]||(e[0]=s=>{return e=S(O),E.data.path=e.task_log,void(E.show=!0);var e})},[k("span",D,b(S(O).task_name),1),k("div",F,[y(t,{percentage:S(O).task_status,type:"line",status:"success",processing:100!==S(O).task_status,"indicator-placement":"inside"},null,8,["percentage","processing"])]),y(a,{name:"base-left-logs",size:"18"})])])),_:1},8,["show"]),y(n,{show:S(E).show,"onUpdate:show":e[1]||(e[1]=s=>S(E).show=s),title:S(E).title,data:S(E).data,width:700,height:450,footer:!1,component:S(m)},null,8,["show","title","data","component"])])}}});s("a",r(L,[["__scopeId","data-v-82c005c3"]]))}}}));
