import{a}from"./index.js?v=1763625242172";import{k as e,P as s,r as t,c as l,aq as i,a5 as n,R as d,S as c,U as o,a4 as p,F as r,O as m,H as v,V as x,X as u,a3 as _,ay as b,aj as f,I as y,j as H}from"./vue.js?v=1763625242172";import{a9 as g,gL as k,c as U,gM as h,gJ as j,P as w,p as $}from"./page_layout.js?v=1763625242172";import{p as C}from"./public.js?v=1763625242172";import{_ as M,aC as I}from"./naive.js?v=1763625242172";const L={class:"w-650px"},P={class:"card"},z={class:"mb-12px font-bold text-18px text-center"},B={class:"min-h-172px text-13px"},T={class:"card"},q={class:"mb-10px text-16px text-center"},F={class:"h-180px overflow-auto"},J={class:"date"},O={class:"text"},R=["innerHTML"],S={class:"font-bold"},V={class:"text-error"},X=$(e({__name:"details",emits:["close"],setup(e,{emit:$}){const X=$,{t:A}=s(),D=t(!1),E=t(5),G=l((()=>E.value>0)),K=l((()=>!D.value)),N=t([]),Q=t([]),{height:W}=i(),Y=l((()=>W.value?"".concat(.9*W.value,"px"):"auto")),Z=()=>{const a=setInterval((()=>{E.value--,E.value<=0&&clearInterval(a)}),1e3)},aa=()=>{X("close")},ea=()=>{C({title:A("Home.Update.index_24"),content:A("Home.Update.index_25"),onConfirm:async()=>{await h(),await j(),w()}})};return(async()=>{const{message:a}=await k();U(a)&&(N.value=a.beta_ps.split("<br>").map((a=>a.trim())),Q.value=a.list,Z())})(),(e,s)=>{const t=n("i18n-t"),l=M,i=I,k=a;return d(),c("div",L,[o("div",{class:"p-20px overflow-auto",style:y({maxHeight:x(Y)})},[o("div",P,[o("div",z,p(e.$t("Home.Update.index_20")),1),o("ul",B,[(d(!0),c(r,null,m(x(N),((a,e)=>(d(),c("li",{key:a,class:v(["indent--15px pl-15px leading-20px",{"mt-8px":0!==e}])},p(a),3)))),128))])]),o("div",T,[o("div",q,p(e.$t("Home.Update.index_21")),1),o("div",F,[(d(!0),c(r,null,m(x(Q),(a=>(d(),c("div",{key:a.version,class:"version"},[s[1]||(s[1]=o("div",{class:"active"},null,-1)),o("div",J,p(x(g)(a.uptime,"yyyy-MM-dd")),1),o("div",O,p(a.version),1),o("div",{class:"content",innerHTML:a.upmsg},null,8,R)])))),128))])]),o("div",null,[u(l,{checked:x(D),"onUpdate:checked":s[0]||(s[0]=a=>f(D)?D.value=a:null),disabled:x(G)},{default:_((()=>[u(t,{tag:"div",class:"text-14px",keypath:"Home.Update.index_23_1"},b({title:_((()=>[o("span",S,p(e.$t("Home.Update.index_23_2")),1)])),_:2},[x(E)>0?{name:"wait",fn:_((()=>[o("span",V,p(e.$t("Home.Update.index_23_3",[x(E)])),1)])),key:"0"}:void 0]),1024)])),_:1},8,["checked","disabled"])])],4),u(k,null,{default:_((()=>[u(i,{class:"cancel-btn",size:"small",color:"#cbcbcb",onClick:aa},{default:_((()=>[H(p(e.$t("Public.Btn.Cancel")),1)])),_:1}),u(i,{type:"primary",size:"small",disabled:x(K),onClick:ea},{default:_((()=>[H(p(e.$t("Home.Update.index_19")),1)])),_:1},8,["disabled"])])),_:1})])}}}),[["__scopeId","data-v-76523929"]]);export{X as B};
