System.register(["./page_layout-legacy.js?v=1763625242172","./index-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy5.js?v=1763625242172","./public-legacy.js?v=1763625242172","./useModal-legacy3.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172"],(function(e,a){"use strict";var t,s,i,n,l,o,d,r,c,u,_,p,f,g,y,b,m,x,W,w,h,A,v,j,k;return{setters:[e=>{t=e.bf,s=e.i,i=e.x,n=e.a},e=>{l=e._},e=>{o=e._},e=>{d=e.e,r=e.c,c=e.f,u=e.h},e=>{_=e.u},e=>{p=e.dj,f=e.dV,g=e.dS,y=e.aC},e=>{b=e.k,m=e.P,x=e.X,W=e.R,w=e.a2,h=e.a3,A=e.j,v=e.a4,j=e.V,k=e._}],execute:function(){e("g",(()=>t.post("/plugin?action=a&name=btwaf&s=reg_domains"))),e("a",(e=>t.post("/plugin?action=a&name=btwaf&s=add_reg_tions",e,{requestOptions:{loading:s.global.t("Waf.Api.area_32"),successMessage:!0}})));const O=e=>t.post("/plugin?action=a&name=btwaf&s="+(0===e.select?"edit_reg_tions":"edit_city"),{id:e.id,open:e.open,status:e.status},{requestOptions:{loading:s.global.t("Waf.Api.area_34"),successMessage:!0}}),M=b({__name:"index",setup(e){const b=k((()=>n((()=>a.import("./index-legacy228.js?v=1763625242172")),void 0))),{t:M}=m(),q=d(M("Waf.Area.index_1"),{onRefresh:()=>{P()}}),C=()=>{q.show=!0},{table:S,columns:V,setLoading:z}=r([{key:"region",title:M("Waf.Area.index_2"),minWidth:300,render:e=>Object.entries(e.region).filter((([,e])=>1==e)).map((([e])=>e)).join(", ")},{key:"open",title:M("Waf.Area.index_3"),minWidth:80,render:(e,a)=>x(p,{value:e.open,size:"small",onUpdateValue:async t=>{await O({select:e.select,id:a,open:t,status:e.status}),e.open=t}},null)},{key:"status",title:M("Waf.Area.index_4"),width:"14%",render:(e,a)=>x("div",{class:"w-210px"},[x(f,{value:e.status,size:"small",options:[{label:M("Waf.Area.index_5"),value:200},{label:M("Waf.Area.index_6"),value:404},{label:M("Waf.Area.index_7"),value:403},{label:M("Waf.Area.index_8"),value:444},{label:M("Waf.Area.index_9"),value:502},{label:M("Waf.Area.index_10"),value:503}],onUpdateValue:async t=>{await O({select:e.select,id:a,open:e.open,status:t}),e.status=t}},null)])},{key:"site",title:M("Waf.Area.index_11"),minWidth:260,render:e=>Object.entries(e.site).filter((([,e])=>1==e)).map((([e])=>"allsite"===e?M("Waf.Area.index_12"):e)).join(", ")},{key:"types",title:M("Waf.Area.index_13"),minWidth:90,render:e=>"refuse"===e.types?M("Waf.Area.index_15"):M("Waf.Area.index_14")},c({width:120,options:(e,a)=>[{label:M("Waf.Area.index_16"),onClick:()=>{_({path:`/www/server/btwaf/html/${e.reqfile}`})}},{label:M("Public.Btn.Del"),onClick:async()=>{var i;await(i={select:e.select,id:a},t.post("/plugin?action=a&name=btwaf&s="+(0===i.select?"del_reg_tions":"del_city"),{id:i.id},{requestOptions:{loading:s.global.t("Waf.Api.area_33"),successMessage:!0}})),P()}}]})]),P=async()=>{try{z(!0);const{message:e}=await t.post("/btwaf/get_reg_tions.json");i(e)&&(e.forEach(((e,a)=>{e.forEach((e=>{e.select=a}))})),S.data=e.reduce(((e,a)=>e.concat(a)),[]))}finally{z(!1)}};return P(),(e,a)=>{const t=y,s=u,i=o,n=l,d=g;return W(),w(d,{class:"p-16px"},{default:h((()=>[x(i,null,{toolsLeft:h((()=>[x(t,{type:"primary",onClick:C},{default:h((()=>[A(v(e.$t("Waf.Area.index_1")),1)])),_:1})])),table:h((()=>[x(s,{loading:j(S).loading,data:j(S).data,columns:j(V)},null,8,["loading","data","columns"])])),_:1}),x(n,{show:j(q).show,"onUpdate:show":a[0]||(a[0]=e=>j(q).show=e),title:j(q).title,data:j(q).data,width:720,"min-height":454,footer:!0,component:j(b)},null,8,["show","title","data","component"])])),_:1})}}}),q=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));e("i",q)}}}));
