System.register(["./index-legacy105.js?v=1763625242172","./index-legacy99.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172"],(function(e,a){"use strict";var l,t,n,i,s,o,r,c,f,u,p,d,v,x,m,g,_,y,w,b,h,C,S,$,j,k,P,U,V,E,K,N;return{setters:[e=>{l=e.s,t=e._,n=e.f},e=>{i=e._},e=>{s=e.m,o=e.S,r=e.aW,c=e.bM,f=e.aV,u=e.bC,p=e._,d=e.bN,v=e.c,x=e.aX,m=e.p},e=>{g=e.k,_=e.P,y=e.r,w=e.a5,b=e.R,h=e.S,C=e.U,S=e.X,$=e.a4,j=e.a3,k=e.V,P=e.aj,U=e.l,V=e.v,E=e.j},e=>{K=e.dV,N=e.au}],execute:function(){var a=document.createElement("style");a.textContent=".form-label[data-v-02bc9a9f]{display:flex;align-items:center;justify-content:flex-end;min-width:100px;height:32px;padding-right:20px;text-align:right}\n",document.head.appendChild(a);const R={class:"px-40px py-24px"},X={class:"flex-center mb-20px"},z={class:"min-w-32px"},I={class:"ml-4px text-21px"},L={class:"text-error"},M={class:"bt-link",href:"https://www.aapanel.com/forum/d/167-common-problems-after-opening-the-panel-certificate",target:"_blank"},T={class:"flex"},W={class:"form-label"},q={class:"w-280px"},A={class:"flex mt-16px"},B={class:"form-label"},D={class:"w-280px"},F={class:"flex mt-16px"},G={class:"form-label"},H={class:"w-280px"},J={class:"flex mt-16px"},O={class:"form-label"},Q={class:"w-280px"},Y={class:"flex justify-between mt-24px"},Z={class:"bt-link",href:"https://www.aapanel.com/forum/d/167-common-problems-after-opening-the-panel-certificate",target:"_blank"};e("P",m(g({__name:"open",setup(e,{expose:a}){const{t:m}=_(),g=y(),ee=y(1),ae=y(""),le=y(""),te=y(""),ne=[{label:m("Config.Safe.index_30"),value:1},{label:"Let's Encrypt",value:2},{label:m("Config.Safe.index_31"),value:3}],ie=async()=>{const{message:e}=await d();v(e)&&(ee.value=e.cert_type?Number(e.cert_type):1,ae.value=e.email||"")},se=async()=>{const{message:e}=await x();v(e)&&(le.value=e.privateKey||"",te.value=e.certPem||"")};return(async()=>{const e=s.loading(m("Config.Safe.index_32"));try{await Promise.all([ie(),se()])}finally{e.close()}})(),a({onConfirm:async()=>{if(await g.value.validate(),2===ee.value&&""===ae.value.trim())return s.error(m("Config.Safe.index_33")),!1;if(2===ee.value&&!o(ae.value))return s.error(m("Config.Safe.index_34")),!1;if(3===ee.value&&(""===le.value.trim()||""===te.value.trim()))return s.error(m("Config.Safe.index_35")),!1;const e=s.loading(m("Config.Safe.index_36"));try{3===ee.value&&await r({privateKey:le.value,certPem:te.value}),await c((()=>{const e=2===ee.value?{email:ae.value}:{};return{cert_type:ee.value,...e}})(),!1),await f(),setTimeout((()=>{if(u){const e="http:"===location.protocol?"https":"http";window.location.href=`${e}://${window.location.host}${l.value.adminPath}`}}),1500)}finally{e.close()}return!1}}),(e,a)=>{const l=p,s=w("i18n-t"),o=t,r=K,c=N,f=i,u=n;return b(),h("div",R,[C("div",X,[C("div",z,[S(l,{name:"scan-success",size:"32"})]),C("span",I,$(e.$t("Config.Safe.index_18")),1)]),S(o,{class:"mb-20px"},{default:j((()=>[C("li",L,$(e.$t("Config.Safe.index_19")),1),C("li",null,$(e.$t("Config.Safe.index_20")),1),S(s,{tag:"li",scope:"global",keypath:"Config.Safe.index_21"},{link_:j((()=>[C("a",M,$(e.$t("Config.Safe.index_22")),1)])),_:1})])),_:1}),C("div",T,[C("span",W,$(e.$t("Config.Safe.index_24")),1),C("div",q,[S(r,{value:k(ee),"onUpdate:value":a[0]||(a[0]=e=>P(ee)?ee.value=e:null),options:ne},null,8,["value"])])]),U(C("div",A,[C("span",B,$(e.$t("Config.Safe.index_25")),1),C("div",D,[S(c,{value:k(ae),"onUpdate:value":a[1]||(a[1]=e=>P(ae)?ae.value=e:null),placeholder:e.$t("Config.Safe.index_26")},null,8,["value","placeholder"])])],512),[[V,2===k(ee)]]),U(C("div",F,[C("span",G,$(e.$t("Config.Safe.index_27")),1),C("div",H,[S(f,{value:k(le),"onUpdate:value":a[2]||(a[2]=e=>P(le)?le.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[V,3===k(ee)]]),U(C("div",J,[C("span",O,$(e.$t("Config.Safe.index_28")),1),C("div",Q,[S(f,{value:k(te),"onUpdate:value":a[3]||(a[3]=e=>P(te)?te.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[V,3===k(ee)]]),C("div",Y,[S(u,{ref_key:"riskRef",ref:g},{default:j((()=>[E($(e.$t("Config.Safe.index_29")),1)])),_:1},512),C("a",Z,$(e.$t("Config.Safe.index_167")),1)])])}}}),[["__scopeId","data-v-02bc9a9f"]]))}}}));
