System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./term-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172"],(function(e,a){"use strict";var l,t,r,s,o,u,p,n,d,i,c,y,_,m,v,f,k,w,x,h,b,g,$,T,j;return{setters:[e=>{l=e._},e=>{t=e.f,r=e.h},e=>{s=e.dE,o=e.c},null,e=>{u=e.k,p=e.P,n=e.r,d=e.e,i=e.w,c=e.R,y=e.S,_=e.V,m=e.a2,v=e.a3,f=e.j,k=e.an,w=e.X},e=>{x=e.dk,h=e.au,b=e.dP,g=e.df,$=e.d9,T=e.dZ,j=e.dT},null,null],execute:function(){const a={class:"p-20px"},U={key:1};e("default",u({__name:"form",props:{data:{}},setup(e,{expose:u}){const P=s(),{t:C}=p(),S=e,{isEdit:q,row:I,tips:R,localhost:D,onRefresh:E}=S.data,H=n(null),V=d({ip:"",port:22,account:"root",type:1,password:"",key:"",keyPassword:"",remark:""});i((()=>V.ip),(e=>{q||(V.remark=e)}));const X={ip:{required:!0,message:C("Security.Conf.Index_28"),trigger:["blur","input"]},port:{required:!0,type:"number",message:C("Security.Conf.Index_28"),trigger:["blur","input"]},account:{required:!0,message:C("Security.Conf.Index_28"),trigger:["blur","input"]},password:{required:!0,message:C("Security.Conf.Index_28"),trigger:["blur","input"]},key:{required:!0,message:C("Security.Conf.Index_28"),trigger:["blur","input"]}};return(async()=>{if(D)return V.ip="127.0.0.1",V.port=22,V.account="root",V.type=1,V.password="",V.key="",V.keyPassword="",void(V.remark="127.0.0.1");if(q&&I){const{message:e}=await r({host:I.host});o(e)&&(V.ip=e.host,V.port=e.port,V.account=e.username,V.type=e.password?1:2,V.password=e.password,V.key=e.pkey,V.keyPassword=e.pkey_passwd,V.remark=e.ps)}})(),u({onConfirm:async({hide:e})=>{await(H.value?.validate()),await t({host:V.ip,port:V.port,username:V.account,password:1===V.type?V.password:"",pkey:2===V.type?V.key:"",pkey_passwd:2===V.type?V.keyPassword:"",ps:V.remark}),P.setRefresh(!0),e(),E?.()}}),(e,t)=>{const r=x,s=h,o=b,u=g,p=$,n=T,d=j,i=l;return c(),y("div",a,[_(R)?(c(),m(r,{key:0,class:"mb-16px",type:"warning"},{default:v((()=>t[8]||(t[8]=[f(" Unable to authenticate automatically, please fill in the login information of the local server! ")]))),_:1,__:[8]})):k("",!0),w(i,{ref_key:"formRef",ref:H,model:_(V),rules:X},{default:v((()=>[w(p,null,{default:v((()=>[w(o,{label:e.$t("Term.index_8"),path:"ip"},{default:v((()=>[w(s,{class:"w-190px!",value:_(V).ip,"onUpdate:value":t[0]||(t[0]=e=>_(V).ip=e),placeholder:e.$t("Term.index_9")},null,8,["value","placeholder"])])),_:1},8,["label"]),w(o,{path:"port"},{default:v((()=>[w(u,{"show-button":!1,class:"w-80px!",value:_(V).port,"onUpdate:value":t[1]||(t[1]=e=>_(V).port=e),placeholder:e.$t("Docker.Container.create.index_7")},null,8,["value","placeholder"])])),_:1})])),_:1}),w(o,{label:e.$t("Term.index_10"),path:"account"},{default:v((()=>[w(s,{class:"w-280px!",value:_(V).account,"onUpdate:value":t[2]||(t[2]=e=>_(V).account=e),placeholder:e.$t("Term.index_11")},null,8,["value","placeholder"])])),_:1},8,["label"]),w(o,{label:e.$t("Term.index_12")},{default:v((()=>[w(d,{value:_(V).type,"onUpdate:value":t[3]||(t[3]=e=>_(V).type=e)},{default:v((()=>[w(n,{label:e.$t("Database.index_14"),value:1},null,8,["label"]),w(n,{label:e.$t("Term.index_13"),value:2},null,8,["label"])])),_:1},8,["value"])])),_:1},8,["label"]),1===_(V).type?(c(),m(o,{key:0,label:e.$t("Database.index_14"),path:"password"},{default:v((()=>[w(s,{class:"w-280px!",value:_(V).password,"onUpdate:value":t[4]||(t[4]=e=>_(V).password=e),placeholder:e.$t("Term.index_14")},null,8,["value","placeholder"])])),_:1},8,["label"])):(c(),y("div",U,[w(o,{label:e.$t("Term.index_13"),path:"key"},{default:v((()=>[w(s,{class:"w-280px!",type:"textarea",value:_(V).key,"onUpdate:value":t[5]||(t[5]=e=>_(V).key=e),placeholder:e.$t("Term.index_15")},null,8,["value","placeholder"])])),_:1},8,["label"]),w(o,{label:e.$t("Term.index_16")},{default:v((()=>[w(s,{class:"w-280px!",value:_(V).keyPassword,"onUpdate:value":t[6]||(t[6]=e=>_(V).keyPassword=e),placeholder:e.$t("Term.index_17")},null,8,["value","placeholder"])])),_:1},8,["label"])])),w(o,{label:"Remarks"},{default:v((()=>[w(s,{class:"w-280px!",value:_(V).remark,"onUpdate:value":t[7]||(t[7]=e=>_(V).remark=e),placeholder:e.$t("Term.index_18")},null,8,["value","placeholder"])])),_:1})])),_:1},8,["model"])])}}}))}}}));
