import{a as e,u as a}from"./public.js?v=1763625242172";import{a as t}from"./soft.js?v=1763625242172";import{t as s,c as l,m as n,i as o,dp as r,dq as i,dr as c,da as p}from"./page_layout.js?v=1763625242172";import{k as u,r as d,P as f,w as m,n as w,o as y,G as h,R as v,S as g,V as x,X as b,F as D,j as S,u as j}from"./vue.js?v=1763625242172";import{d9 as C,dV as P,dT as M,dU as k}from"./naive.js?v=1763625242172";const A=["innerHTML"],I=u({__name:"index",props:{path:{type:String,default:"/www/server/panel/logs/letsencrypt.log"},callBack:{type:Function,default:()=>{}}},emits:["close"],setup(e,{emit:a}){const t=d("Please wait..."),o=d(null),{t:r}=f(),i=e,c=a,p=async()=>{const{message:e}=await s({path:i.path});l(e)&&(t.value=e.data?e.data:"None",e.data.includes("aaPanelDns Service Success!")&&(n.success(r("Waf.Block.index_75")),i.callBack(),c("close")))};p();m(t,(async()=>{await w(),(()=>{const e=o.value;e&&(e.scrollTop=e.scrollHeight)})()}));let u=null;return y((()=>{u=setInterval((()=>{p()}),1e3)})),h((()=>{u&&clearInterval(u)})),(e,a)=>(v(),g("pre",{ref_key:"logRef",ref:o,innerHTML:x(t),class:"h-full overflow-auto bg-black text-white p-10px whitespace-pre-wrap"},null,8,A))}});const{t:R}=o.global,_=async()=>{const a=d("none"),t=[{label:R("Accept all emails"),value:"none"},{label:R("Reject all emails"),value:"reject"}];e({width:500,title:R("Confirm Applying DMARC Policy?"),content:()=>b(D,null,[b("p",null,[R("Enabling this feature will create DMARCDNS records for all domains. If a domain already has a DMARC record, the system will not modify the existing record.")]),b(C,{class:"items-center flex-nowrap! mt-10px"},{default:()=>[b("span",{class:"whitespace-nowrap"},[R("Policy:")]),b(P,{class:"w-320px",value:a.value,"onUpdate:value":e=>a.value=e,options:t,placeholder:R("Select DMARC Policy"),consistentMenuWidth:!1},null)]})]),onConfirm:async()=>{await r({policy:a.value})}})},N=async()=>{e({width:400,title:R("Confirm DKIM/SPF Enabled?"),content:R("After enabling this feature, the system will create DKIM and SPF DNS records for the selected domain. If an SPF record already exists for a domain, the system will appropriately append the servers IP address to the existing record. However, the system will not modify any existing DKIM records. During this process, please do not edit any nameserver configuration files."),onConfirm:async()=>{await i()}})},B=async()=>{t({title:()=>b(C,{class:"items-center flex-nowrap!",size:5},{default:()=>[b("span",{class:"bg-#4caf50 inline-block w-25px h-25px flex items-center justify-center rounded-5px"},[b("i",{class:"i-soft-dns-icon text-18px text-white"},null)]),b("span",null,[R("DNS Manager")])]}),name:"dnscustom",admin:!0})},F=async(t,s)=>{const l=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()+" "+R("Self-Built DNS"),n=R("Are you sure you want to {0} a self-built DNS server?",[t]),o=d(0);e({width:400,title:l,content:()=>{let e;return"install"===t?n:b(D,null,[b("p",null,[n]),b(C,{class:"items-center flex-nowrap! mt-10px"},{default:()=>[b("span",null,[R("Preserve config")]),b(M,{value:o.value,"onUpdate:value":e=>o.value=e},{default:()=>{return[b(k,{value:0},(a=e=R("Preserve"),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!j(a)?e:{default:()=>[e]})),b(k,{value:1},{default:()=>[S("Don't preserve")]})];var a}})]})])},onConfirm:async()=>{await c({act:t,clean:o.value}),a({title:l,width:500,height:300,hideClose:!0,data:{path:"/www/server/panel/logs/install_pdns.log",callBack:()=>{null==s||s()}},component:I})}})},H=d(!0),T=async()=>{const{message:e}=await p({act:"status"});l(e)&&(H.value=0===e.checker_status)};export{T as a,_ as b,H as c,N as d,F as e,B as o};
