System.register(["./public-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./setting-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(e,t){"use strict";var l,a,n,i,c,r,s,u,o,f,d,y,g,p,_,m,v,b,w,x,h,q,S,W,j,k,E,U,$;return{setters:[e=>{l=e._,a=e.b,n=e.h,i=e.f,c=e.u},e=>{r=e.c,s=e.k},e=>{u=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.U,b=e.V,w=e.Q,x=e.a2,h=e.W,q=e.X,S=e.a3,W=e.N,j=e.j},e=>{k=e.aq,E=e.cA,U=e.c1,$=e.ay},null,null],execute:function(){const t={class:"p-20px"},P={class:"w-220px"},B={class:"ml-8px text-desc"},C={class:"w-220px mr-8px"},R={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(),s=_(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(s.value?.validate()),i.isEdit?await u(W(f)):await o(W(f)),c("refresh")}}),(e,a)=>{const n=k,i=E,c=U,r=y,u=l;return v(),b("div",t,[w(r,{ref_key:"formRef",ref:s,model:q(f),rules:d},{default:x((()=>[w(i,{label:"URL",path:"url"},{default:x((()=>[h("div",P,[w(n,{value:q(f).url,"onUpdate:value":a[0]||(a[0]=e=>q(f).url=e),placeholder:"/index.php"},null,8,["value"])]),h("span",B,S(e.$t("Waf.Setting.config_51")),1)])),_:1}),w(i,{label:e.$t("Waf.Setting.config_48"),path:"frequency"},{default:x((()=>[h("div",C,[w(c,{value:q(f).frequency,"onUpdate:value":a[1]||(a[1]=e=>q(f).frequency=e),min:1,"show-button":!1},null,8,["value"])]),h("span",R,S(e.$t("Public.Unit.Time",q(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:q(f).cycle,"onUpdate:value":a[2]||(a[2]=e=>q(f).cycle=e),min:1,"show-button":!1},null,8,["value"])]),h("span",A,S(e.$t("Public.Unit.Second",q(f).cycle)),1)])),_:1},8,["label"])])),_:1},8,["model"]),w(u,{class:"mt-12px"},{default:x((()=>[h("li",null,S(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})},u=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:s(t.frequency),cycle:s(t.cycle)}))))}finally{g(!1)}};return _(),(e,t)=>{const l=$,a=i;return v(),b("div",H,[h("div",N,[w(l,{type:"primary",onClick:u},{default:x((()=>[j(S(e.$t("Public.Btn.Add")),1)])),_:1})]),w(a,{"max-height":368,loading:q(o).loading,data:q(o).data,columns:q(y)},null,8,["loading","data","columns"])])}}}))}}}));
