import{k as e,ax as l,d as o,L as a,$ as s}from"./utils-lib.js?v=1761009159";import{c as t,q as r,H as p,v as d,x as i,I as n,y as m,N as u,B as c,e as h,z as f,$ as b,Q as x,ab as _,az as y,a9 as j}from"./base-lib.js?v=1761009159";import{i as V,o as g,f as v,u as w,t as k,s as C,a as T,h as U,p as F,b as I,c as $,d as z,e as H}from"./index432.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index105.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useController4.js?v=1761009159";import"./useController5.js?v=1761009159";import"./site.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./useMethod5.js?v=1761009159";const L={class:"p-[20px]"},R={class:"flex items-center"},q=t({__name:"add-url-proxy",setup:(t,{expose:q})=>(r(()=>{V()}),q({onConfirm:g}),(t,r)=>{const V=e,g=_,q=l,B=o,M=a,N=y,Q=j,S=s,A=p("bt-loading");return d(),i("div",L,[n((d(),u(Q,{ref_key:"proxyFormRef",ref:I,model:m(w),rules:m($),"label-width":"100px",disabled:m(z)},{default:c(()=>[h(g,{label:"代理目录",prop:"path"},{default:c(()=>[h(V,{modelValue:m(w).path,"onUpdate:modelValue":r[0]||(r[0]=e=>m(w).path=e),placeholder:"请输入代理目录，例如：/web",width:"42rem"},null,8,["modelValue"])]),_:1}),h(g,{label:"目标",prop:"proxysite"},{default:c(()=>[f("div",R,[h(g,null,{default:c(()=>[h(q,{class:"!w-[16rem]",modelValue:m(w).targetType,"onUpdate:modelValue":r[1]||(r[1]=e=>m(w).targetType=e),placeholder:"请选择",options:m(k),onChange:m(C)},null,8,["modelValue","options","onChange"])]),_:1}),h(V,{modelValue:m(w).proxysite,"onUpdate:modelValue":r[2]||(r[2]=e=>m(w).proxysite=e),placeholder:"http"===m(w).targetType?"请输入目标地址":"请选择sock文件",class:"!ml-[1rem]",width:"24rem",iconType:"http"!==m(w).targetType&&"folder",onFolder:m(T),onInput:m(U)},b({_:2},["http"!==m(w).targetType?{name:"append",fn:c(()=>[h(M,{onClick:m(T)},{default:c(()=>[h(B,{icon:"el-folder-opened",class:"cursor-pointer"})]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","placeholder","iconType","onFolder","onInput"])])]),_:1}),h(g,{label:"发送域名(host)",prop:"todomain","label-width":"100px"},{default:c(()=>[h(N,{placement:"top-start",effect:"dark",title:"",content:"请求转发到后端服务器时的主机名，一般为$http_host，如果目标URL是域名，则需要改为域名",width:"400",visible:m(F),"onUpdate:visible":r[5]||(r[5]=e=>x(F)?F.value=e:null),"trigger-keys":[],trigger:"focus"},{reference:c(()=>[h(V,{modelValue:m(w).todomain,"onUpdate:modelValue":r[3]||(r[3]=e=>m(w).todomain=e),onFocus:r[4]||(r[4]=e=>F.value=!0),placeholder:"请输入发送域名",width:"42rem"},null,8,["modelValue"])]),_:1},8,["visible"])]),_:1}),h(g,{label:"备注"},{default:c(()=>[h(V,{modelValue:m(w).ps,"onUpdate:modelValue":r[6]||(r[6]=e=>m(w).ps=e),placeholder:"请输入备注,可为空",width:"42rem"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","disabled"])),[[A,m(v)]]),h(S,{options:m(H),class:"mt-2rem ml-[20px]"},null,8,["options"])])})});export{q as default};
