const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/details-CWRRjyBs.js?v=1773287522785","js/index-BDlR_GtR.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/useLoading-CZ2gSAW7.js?v=1773287522785","js/rules-pmZEUQ_o.js?v=1773287522785","css/details-FCYVdsFK.css?v=1773287522785"])))=>i.map(i=>d[i]);
import{as as e,a3 as a,h as c,m as p,p as f,P as d}from"./index-BTglIPU2.js?v=1773287522785";import{a as b}from"./rules-pmZEUQ_o.js?v=1773287522785";import{r as g,a0 as l,a2 as m,F as _,a3 as k,u as h}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{al as u}from"./naive-ui--dJnpVcV.js?v=1773287522785";const y=t=>e.post("/btwaf/attack_report_log.json",t),W=t=>e.post("/plugin?action=a&name=btwaf&s=import_data",t,{requestOptions:{loading:a.global.t("Waf.Api.block_14")}}),v=t=>e.post("/btwaf/get_logs",t),w=t=>e.post("/plugin?action=a&name=btwaf&s=wubao_url_white",t,{requestOptions:{loading:a.global.t("Waf.Api.block_15"),successMessage:!0}}),q=()=>e.post("/plugin?action=a&name=btwaf&s=get_site_config"),P=t=>e.post("/plugin?action=a&name=btwaf&s=remove_log",{...t,site_logs:JSON.stringify(t.site_all===1?[]:t.site_logs)},{requestOptions:{loading:a.global.t("Waf.Api.block_16"),successMessage:!0}}),C=t=>e.post("/plugin?action=a&name=btwaf&s=get_safe_logs_sql",t),I=t=>e.post("/plugin?action=a&name=btwaf&s=remove_waf_drop_ip",t,{requestOptions:{loading:a.global.t("Waf.Api.block_17"),successMessage:!0}}),M=()=>e.post("/plugin?action=a&name=btwaf&s=clean_waf_drop_ip",{},{requestOptions:{loading:a.global.t("Waf.Api.block_18"),successMessage:!0}}),R=t=>e.post("/plugin?action=a&name=btwaf&s=get_rule_hit_list",t),j=()=>e.post("/plugin?action=a&name=btwaf&s=delete_rule_hit_list",{},{requestOptions:{loading:a.global.t("Waf.Api.block_19"),successMessage:!0}}),H=()=>e.post("/plugin?action=a&name=btwaf&s=get_rule_hit_type_list"),N=t=>e.post("/plugin?action=a&name=btwaf&s=set_hit_type",{data:JSON.stringify(t.data)},{requestOptions:{loading:a.global.t("Waf.Api.block_20"),successMessage:!0}});function r(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!h(t)}const S=t=>{const i=g(!1);c({title:a.global.t("Waf.Block.index_74"),content:()=>{let s;return l(_,null,[l(m,{tag:"div",keypath:"Waf.Block.index_82",scope:"global"},{ip:()=>l("span",{class:"text-error"},[t.ip])}),l(u,{checked:i.value,"onUpdate:checked":o=>i.value=o,class:"mt-12px"},r(s=a.global.t("Waf.Block.index_79"))?s:{default:()=>[s]})])},onConfirm:async()=>{if(i.value){const s=t.ip.replace(/\d{1,3}$/,"0/24");await W({s_Name:"ip_black",pdata:s}),p.success(a.global.t("Waf.Block.index_75"))}else await b({start_ip:t.ip,end_ip:t.ip})}})},L=(t,i=!0)=>{if(t.uri==="/"){p.error(a.global.t("Waf.Block.index_76"));return}const s=g(!1);c({title:a.global.t("Waf.Block.index_77"),content:()=>{let o;return l(_,null,[l("div",null,[a.global.t("Waf.Block.index_80")]),i?l(u,{checked:s.value,"onUpdate:checked":n=>s.value=n,class:"mt-12px"},r(o=a.global.t("Waf.Block.index_81"))?o:{default:()=>[o]}):""])},onConfirm:async()=>{let o=t.http_log;if(t.http_log_path===1){const{message:n}=await v({path:t.http_log});o=n.result}await w({url_rule:t.uri,error_log:t.ip+" >> "+t.incoming_value,http_log:o,...s.value?{param:1}:{}})}})},U=t=>{f({title:a.global.t("Waf.Block.index_78",[t.time_localtime]),width:840,minHeight:630,data:{row:t},component:k(()=>d(()=>import("./details-CWRRjyBs.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))})};export{S as a,L as b,C as c,M as d,j as e,R as f,y as g,v as h,q as i,H as j,N as k,P as r,U as s,I as u};
