import{i as a,T as e,_ as l,d9 as s,c as t,dk as n}from"./page_layout.js?v=1763625242172";import{R as i}from"./public.js?v=1763625242172";import{r as u,X as o,F as r,j as d}from"./vue.js?v=1763625242172";import{dh as v,d9 as m,bH as c,dd as p}from"./naive.js?v=1763625242172";const b=u("manage"),g=u(!1),f=u([]),_=u([]),k=u(),x=u(""),y=u(""),h=u(!1),A=u(""),S=u(!1),w=[{label:"A",value:"A"},{label:"AAAA",value:"AAAA"},{label:"MX",value:"MX"},{label:"TXT",value:"TXT"},{label:"NS",value:"NS"},{label:"CAA",value:"CAA"},{label:"CNAME",value:"CNAME"}],C=async()=>{try{h.value=!0;const{message:a}=await s({p:1,limit:9999});if(t(a)){const e=a.data.find((a=>"aaPanelDns"===a.name));e&&(a.data.splice(a.data.indexOf(e),1),a.data.unshift(e)),a.data.length>0?(f.value=a.data.map((a=>({label:a.name,value:a.id,alias:a.alias}))),e?(k.value=f.value[0].value,x.value=f.value[0].label):(k.value||(k.value=f.value[0].value),x.value||(x.value=f.value[0].label))):(f.value=[],k.value=void 0,x.value="")}}finally{h.value=!1}},j=async()=>{try{h.value=!0;const{message:a}=await n({p:1,limit:9999,id:k.value});t(a)&&(a.data.length>0?(_.value=a.data.map((a=>({label:a.name,value:a.name,ssl_info:a.ssl_info.end_time,dns_resolve:a.dns_resolve}))),y.value||(y.value=_.value[0].value)):(_.value=[],y.value=""))}finally{h.value=!1}},N=s=>({key:"provider",title:a.global.t("SSL.Domain.index_28"),render:t=>{const n=t.task&&t.task.some((a=>100!==a.task_status));return o(m,null,{default:()=>[o("span",null,[t.name||t.provider]),n?o(v,{trigger:"hover"},{trigger:()=>o(e,{size:"small"},null),default:()=>o(r,null,[t.task.map((e=>o("div",{class:"flex flex-nowrap! p-10px cursor-pointer justify-between items-center",title:a.global.t("SSL.Domain.index_33"),key:e.id,onClick:()=>{s(e.task_log)}},[o("span",{class:"whitespace-nowrap mr-10px"},[e.task_name]),o(m,{class:"items-center flex-nowrap!"},{default:()=>[o(c,{class:"w-120px!",type:"line",status:"success",percentage:e.task_status,"indicator-placement":"inside",processing:100!==e.task_status},null),o(l,{name:"base-left-logs",size:18},null)]})])))])}):""]})}}),D=e=>({key:"ps",title:a.global.t("SSL.Domain.index_29"),render:l=>{var s,t,n;const u=l.user_for;if(!u)return"--";const r=(a="site")=>{e(l,a)};return Object.keys(u).map((a=>u[a])).every((a=>0===a.length))?o("span",{class:"bt-link",onClick:()=>r()},[a.global.t("SSL.Domain.index_30")]):o(i,{options:[{label:a.global.t("Layout.Sider.site_1"),onClick:()=>r("site"),show:(null==(s=u.sites)?void 0:s.length)>0},{label:a.global.t("SSL.Domain.index_31"),onClick:()=>r("mail"),show:(null==(t=u.mails)?void 0:t.length)>0},{label:a.global.t("SSL.Domain.index_32"),onClick:()=>r("panel"),show:(null==(n=u.panel)?void 0:n.length)>0}]},null)}}),L=e=>{const{key:l="end_time"}=e;return{key:l,title:e.title,width:e.width,render:e=>{const s=l.split(".").reduce(((a,e)=>a&&a[e]),e);return-1===s||void 0===s?"--":o(p,{type:Number(s)>30?"success":Number(s)>0?"warning":"error",class:"px-10px"},{default:()=>[Number(s)?Number(s):a.global.t("Config.Safe.index_166"),d(" "),a.global.t("Crontab.arrange.index_41")]})}}};export{x as a,f as b,S as c,_ as d,y as e,A as f,g,k as h,j as i,C as j,D as k,h as l,b as m,N as r,w as t,L as u};
