System.register(["./public-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./setting-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-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,t){"use strict";var l,a,n,i,c,r,u,s,o,f,d,y,g,p,_,m,v,b,w,x,h,S,q,W,j,k,E,U,P;return{setters:[e=>{l=e._,a=e.c,n=e.f,i=e.h,c=e.u},e=>{r=e.c,u=e.l},e=>{s=e.k,o=e.l,f=e.n,d=e.g},e=>{y=e._},e=>{g=e.k,p=e.P,_=e.r,m=e.e,v=e.R,b=e.S,w=e.X,x=e.a3,h=e.U,S=e.V,q=e.a4,W=e.N,j=e.j},e=>{k=e.au,E=e.dP,U=e.df,P=e.aC},null,null],execute:function(){const t={class:"p-20px"},$={class:"w-220px"},C={class:"ml-8px text-desc"},R={class:"w-220px mr-8px"},B={class:"text-desc"},L={class:"w-220px mr-8px"},A={class:"text-desc"},D=g({__name:"form",props:{isEdit:{type:Boolean,default:!1},row:{}},emits:["refresh"],setup(e,{expose:a,emit:n}){const i=e,c=n,{t:r}=p(),u=_(null),f=m({url:"",frequency:30,cycle:60}),d={url:{trigger:["blur","input"],validator:()=>""!==f.url.trim()||new Error(r("Waf.Setting.config_55"))},frequency:{trigger:["blur","input"],validator:()=>!!f.frequency||new Error(r("Waf.Setting.config_56"))},cycle:{trigger:["blur","input"],validator:()=>!!f.cycle||new Error(r("Waf.Setting.config_57"))}};return(()=>{const{row:e,isEdit:t}=i;t&&e&&(f.url=e.url,f.frequency=e.frequency,f.cycle=e.cycle)})(),a({onConfirm:async()=>{await(u.value?.validate()),i.isEdit?await s(W(f)):await o(W(f)),c("refresh")}}),(e,a)=>{const n=k,i=E,c=U,r=y,s=l;return v(),b("div",t,[w(r,{ref_key:"formRef",ref:u,model:S(f),rules:d},{default:x((()=>[w(i,{label:"URL",path:"url"},{default:x((()=>[h("div",$,[w(n,{value:S(f).url,"onUpdate:value":a[0]||(a[0]=e=>S(f).url=e),placeholder:"/index.php"},null,8,["value"])]),h("span",C,q(e.$t("Waf.Setting.config_51")),1)])),_:1}),w(i,{label:e.$t("Waf.Setting.config_48"),path:"frequency"},{default:x((()=>[h("div",R,[w(c,{value:S(f).frequency,"onUpdate:value":a[1]||(a[1]=e=>S(f).frequency=e),min:1,"show-button":!1},null,8,["value"])]),h("span",B,q(e.$t("Public.Unit.Time",S(f).frequency)),1)])),_:1},8,["label"]),w(i,{label:e.$t("Waf.Setting.config_49"),path:"cycle"},{default:x((()=>[h("div",L,[w(c,{value:S(f).cycle,"onUpdate:value":a[2]||(a[2]=e=>S(f).cycle=e),min:1,"show-button":!1},null,8,["value"])]),h("span",A,q(e.$t("Public.Unit.Second",S(f).cycle)),1)])),_:1},8,["label"])])),_:1},8,["model"]),w(s,{class:"mt-12px"},{default:x((()=>[h("li",null,q(e.$t("Waf.Setting.config_54")),1)])),_:1})])}}}),H={class:"p-20px"},N={class:"flex mb-16px"};e("default",g({__name:"config",setup(e){const{t:t}=p(),l=e=>{c({title:e.title,width:570,footer:!0,data:{...e.data,onRefresh:()=>{_()}},component:D})},s=async()=>{l({title:t("Waf.Setting.config_46"),data:{isEdit:!1}})},{table:o,columns:y,setLoading:g}=a([{key:"url",title:"URL",ellipsis:{tooltip:!0}},{key:"frequency",title:t("Waf.Setting.config_48"),width:100,ellipsis:{tooltip:!0}},{key:"cycle",title:t("Waf.Setting.config_49"),width:120,ellipsis:{tooltip:!0},render:e=>t("Waf.Setting.config_50",[e.cycle])},n({width:100,options:e=>[{label:t("Public.Btn.Edit"),onClick:async()=>{(async e=>{l({title:t("Waf.Setting.config_47"),data:{row:e,isEdit:!0}})})(e)}},{label:t("Public.Btn.Del"),onClick:async()=>{await f({url:e.url}),_()}}]})]),_=async()=>{try{g(!0);const{message:e}=await d();r(e)&&(o.data=Object.entries(e.cc_uri_frequency).map((([e,t])=>({url:e,frequency:u(t.frequency),cycle:u(t.cycle)}))))}finally{g(!1)}};return _(),(e,t)=>{const l=P,a=i;return v(),b("div",H,[h("div",N,[w(l,{type:"primary",onClick:s},{default:x((()=>[j(q(e.$t("Public.Btn.Add")),1)])),_:1})]),w(a,{"max-height":368,loading:S(o).loading,data:S(o).data,columns:S(y)},null,8,["loading","data","columns"])])}}}))}}}));
