import{i as a,cG as e,d as l,cS as s,_ as t,T as n}from"./page_layout.js?v=1764830988434";import{S as i}from"./public.js?v=1764830988434";import{r as u,W as o,F as r,j as d}from"./vue.js?v=1764830988434";import{dd as v,da as m,dh as c,bH as p}from"./naive.js?v=1764830988434";const b=u("manage"),g=u(!1),f=u([]),_=u([]),k=u(),x=u(""),y=u(""),S=u(!1),h=u(""),A=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{S.value=!0;const{message:a}=await e({p:1,limit:9999});if(l(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{S.value=!1}},j=async()=>{try{S.value=!0;const{message:a}=await s({p:1,limit:9999,id:k.value});l(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{S.value=!1}},N=e=>({key:"provider",title:a.global.t("SSL.Domain.index_28"),render:l=>{const s=l.task&&l.task.some(a=>100!==a.task_status);return o(m,null,{default:()=>[o("span",null,[l.name||l.provider]),s?o(c,{trigger:"hover"},{trigger:()=>o(n,{size:"small"},null),default:()=>o(r,null,[l.task.map(l=>o("div",{class:"flex flex-nowrap! p-10px cursor-pointer justify-between items-center",title:a.global.t("SSL.Domain.index_33"),key:l.id,onClick:()=>{e(l.task_log)}},[o("span",{class:"whitespace-nowrap mr-10px"},[l.task_name]),o(m,{class:"items-center flex-nowrap!"},{default:()=>[o(p,{class:"w-120px!",type:"line",status:"success",percentage:l.task_status,"indicator-placement":"inside",processing:100!==l.task_status},null),o(t,{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(v,{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,A as c,_ as d,y as e,h as f,g,k as h,j as i,C as j,D as k,S as l,b as m,N as r,w as t,L as u};
