System.register(["./configStore-legacy.js?v=1753954525509","./index-legacy100.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509"],(function(e,a){"use strict";var l,t,n,i,s,o,r,c,f,u,p,d,v,x,m,g,_,y,w,h,b,C,S,$,k,j,P,U,E,K,N,q;return{setters:[e=>{l=e.s,t=e._,n=e.f},e=>{i=e._},e=>{s=e.m,o=e.N,r=e.aE,c=e.bw,f=e.aD,u=e.bm,p=e._,d=e.bx,v=e.c,x=e.aF,m=e.e},e=>{g=e.k,_=e.P,y=e.r,w=e.a4,h=e.U,b=e.V,C=e.W,S=e.Q,$=e.a3,k=e.a2,j=e.X,P=e.ah,U=e.l,E=e.v,K=e.j},e=>{N=e.cG,q=e.aq}],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 z={class:"px-40px py-24px"},D={class:"flex-center mb-20px"},F={class:"min-w-32px"},G={class:"ml-4px text-21px"},I={class:"text-error"},L={class:"bt-link",href:"https://www.aapanel.com/forum/d/167-common-problems-after-opening-the-panel-certificate",target:"_blank"},O={class:"flex"},Q={class:"form-label"},R={class:"w-280px"},T={class:"flex mt-16px"},V={class:"form-label"},W={class:"w-280px"},X={class:"flex mt-16px"},A={class:"form-label"},B={class:"w-280px"},H={class:"flex mt-16px"},J={class:"form-label"},M={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("O",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=N,c=q,f=i,u=n;return h(),b("div",z,[C("div",D,[C("div",F,[S(l,{name:"scan-success",size:"32"})]),C("span",G,$(e.$t("Config.Safe.index_18")),1)]),S(o,{class:"mb-20px"},{default:k((()=>[C("li",I,$(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_:k((()=>[C("a",L,$(e.$t("Config.Safe.index_22")),1)])),_:1})])),_:1}),C("div",O,[C("span",Q,$(e.$t("Config.Safe.index_24")),1),C("div",R,[S(r,{value:j(ee),"onUpdate:value":a[0]||(a[0]=e=>P(ee)?ee.value=e:null),options:ne},null,8,["value"])])]),U(C("div",T,[C("span",V,$(e.$t("Config.Safe.index_25")),1),C("div",W,[S(c,{value:j(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),[[E,2===j(ee)]]),U(C("div",X,[C("span",A,$(e.$t("Config.Safe.index_27")),1),C("div",B,[S(f,{value:j(le),"onUpdate:value":a[2]||(a[2]=e=>P(le)?le.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[E,3===j(ee)]]),U(C("div",H,[C("span",J,$(e.$t("Config.Safe.index_28")),1),C("div",M,[S(f,{value:j(te),"onUpdate:value":a[3]||(a[3]=e=>P(te)?te.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[E,3===j(ee)]]),C("div",Y,[S(u,{ref_key:"riskRef",ref:g},{default:k((()=>[K($(e.$t("Config.Safe.index_29")),1)])),_:1},512),C("a",Z,$(e.$t("Config.Safe.index_167")),1)])])}}}),[["__scopeId","data-v-02bc9a9f"]]))}}}));
