import{u as e,b2 as s,an as t,ao as l,Q as a,ap as o,_ as i}from"./utils-lib.js?v=1761009159";import{_ as r}from"./index105.js?v=1761009159";import{_ as n}from"./index.vue_vue_type_script_setup_true_lang6.js?v=1761009159";import{B as p}from"./index134.js?v=1761009159";import{c,s as m,r as u,w as _,e as d,C as f,q as x,n as v,v as h,x as y,y as b,B as k,z as j,D as C,N as B}from"./base-lib.js?v=1761009159";import{a as g,g as I,u as R}from"./column.js?v=1761009159";import{b as w,d as S,e as T,f as P,u as q}from"./useController6.js?v=1761009159";import{S as E}from"./useStore4.js?v=1761009159";import{S as L,o as A,a as D,b as O,g as V,d as W,c as z,e as F,m as H,r as N}from"./useController12.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index133.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1761009159";import"./site.js?v=1761009159";const Q={key:0,class:"flex items-center"},G={key:1,class:"flex items-center"},J=i(c({__name:"index",setup(i){e();const{getSiteList:c}=E(),{activeType:J,isRefreshList:K}=m(E()),{proxyType:M}=m(L()),U=u({});_(T,e=>{(null==e?void 0:e.pluginInfo)&&(U.value=e.pluginInfo)},{immediate:!0,deep:!0});const{BtOperation:X}=s({options:[{type:"button",label:"添加反代",active:!0,onClick:O},{type:"custom",render:()=>d(p,{class:"ml-1rem",isRequest:!1,pluginInfo:U.value},null)}]}),Y=o([q(),{label:"删除项目",value:"delete",event:async(e,s,t,l,a)=>{H(t.value,a)}}]),{BtTable:Z,BtSearch:$,BtRefresh:ee,BtPage:se,BtColumn:te,BtBatch:le,refresh:ae}=t({request:c,columns:[g(),w({label:"域名",type:J.value,openPlugin:A,onClick:e=>{D(e)}}),{label:"代理地址",prop:"proxy_pass",minWidth:220,isCustom:!0,render:e=>d("span",{class:"flex justify-start whitespace-pre-line bt-link cursor-pointer"},[d("span",{class:"full-path",onClick:()=>{D(e,"urlProxy")}},[e.proxy_pass])])},I({table:"sites",width:200}),S({onClick:e=>D(e,"ssl")}),R([{onClick:e=>A(e,"monitor"),title:"统计"},{onClick:e=>A(e,"bt_waf"),title:"WAF"},{title:"设置",onClick:e=>D(e)},{title:"删除",onClick:e=>W(e)}])],extension:[Y,l(K)],empty:()=>d("span",null,[f("您的列表为空，您可以"),d("span",{class:"bt-link",onClick:O},[f("添加一个项目")])])}),{BtTable:oe,refresh:ie,BtRefresh:re,BtColumn:ne,BtSearch:pe}=t({request:V,columns:[{label:"端口",prop:"listen_port",width:120},{label:"协议",prop:"protocol",isCustom:!0,width:80},{label:"目标",prop:"proxy_pass"},{label:"备注",prop:"ps"},R([{onClick:z,title:"设置"},{onClick:e=>F(e,ie),title:"删除"}])],extension:[l(K)]});return _(()=>N.value,e=>{e&&(ie(),"tcp"!==M.value&&(M.value="tcp"),N.value=!1)}),x(()=>{v(()=>{a(()=>import("./index351.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),a(()=>import("./index352.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})}),(e,s)=>{const t=r;return h(),y("div",null,[d(n,{ref_key:"envRef",ref:T,onInit:b(ae)},null,8,["onInit"]),d(t,null,{"header-left":k(()=>[d(b(X)),j("div",{class:"flex items-center ml-1rem",onClick:s[0]||(s[0]=(...e)=>b(P)&&b(P)(...e))},s[1]||(s[1]=[j("i",{class:"svgtofont-desired text-medium"},null,-1),j("span",{class:"bt-link"},"需求反馈",-1)]))]),"header-right":k(()=>[s[2]||(s[2]=j("div",{class:"flex items-center mr-[10px]"},null,-1)),"http"===b(M)?(h(),y("div",Q,[d(b($),{class:"mr-[10px]",placeholder:"请输入域名或备注"}),d(b(ee),{class:"mr-[10px]"}),d(b(te))])):C("",!0),"tcp"===b(M)?(h(),y("div",G,[d(b(pe),{class:"mr-[10px]",placeholder:"请输入端口"}),d(b(re),{class:"mr-[10px]"}),d(b(ne))])):C("",!0)]),content:k(()=>["http"===b(M)?(h(),B(b(Z),{key:0})):(h(),B(b(oe),{key:1}))]),"footer-left":k(()=>["http"===b(M)?(h(),B(b(le),{key:0})):C("",!0)]),"footer-right":k(()=>["http"===b(M)?(h(),B(b(se),{key:0})):C("",!0)]),_:1})])}}}),[["__scopeId","data-v-a259bc00"]]);export{J as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
