import{o as i,c as m,w as a,u as s,b as n,d as f,e as _,a as t,f as d,g as l,h as c,t as r,F as h,D as p}from"./app-DnroACXc.js";import{i as g,c as y}from"./app-DckefXYL.js";import{_ as b}from"./app-DJs6UMN4.js";import{_ as k}from"./app-MnSDCF4P.js";import{_ as v}from"./app-DFWP-E91.js";import{_ as w}from"./app-COct4tsy.js";import{D as x}from"./app-Cx7ENVlu.js";import{_ as R}from"./app-DezwSKU9.js";import{_ as C}from"./app-DgsA44Do.js";import"./app-C9iVkiu5.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-CUPmXIij.js";import"./app-Cu6FD8m8.js";import"./app-LqsmzyUT.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-CYYQ_Zep.js";import"./app-Cmxxk_WX.js";import"./app-CF8nmC-F.js";import"./app-B09rlSqG.js";import"./app-B2-Q9WJQ.js";import"./app-DAKlLAys.js";import"./app-xECxwo4T.js";import"./app-BBDtZW3a.js";function $(){g(this),this.isRequesting=!1,this.isOk=!1,this.message="",this.failKeys=[],this.before=function(){this.isRequesting=!0,this.isOk=!1,this.message="",this.failKeys=[]},this.success=function(o){this.isOk=!0,this.$NotifyReloadSuccess("任务提交成功")()},this.fail=function(o){this.message=o.message,o.data.failKeys!=null&&(this.failKeys=o.data.failKeys)},this.done=function(){this.isRequesting=!1}}const q=t("p",{class:"!mb-4"},"可以在这里批量预热一组URL。",-1),D=["value"],O=["value"],B=t("td",null,"URL列表",-1),K=t("p",{class:"comment"},"每行一个URL。",-1),N=t("td",{class:"title"},"操作结果",-1),S={key:0},F={key:1,class:"red"},I={key:2,class:"fail-keys-box"},L={class:"red"},fe={__name:"fetch",setup(o){const e=y(new $);return(V,U)=>(i(),m(C,{ctx:s(e)},{default:a(()=>[n(b,{ctx:s(e),"active-tab":"fetch"},null,8,["ctx"]),f(t("div",null,[n(R,{"disable-spacing":""},{default:a(()=>[d("没有开启缓存，暂时无法预热缓存。")]),_:1})],512),[[_,s(e).webConfig.cache==null||!s(e).webConfig.cache.isOn]]),f(t("div",null,[q,n(k,{action:"$",onBefore:s(e).before,onSuccess:s(e).success,onFail:s(e).fail,onDone:s(e).done,timeout:"3600"},{default:a(()=>[t("input",{type:"hidden",name:"serverId",value:s(e).serverId},null,8,D),t("input",{type:"hidden",name:"webId",value:s(e).webId},null,8,O),n(x,null,{default:a(()=>[t("tbody",null,[t("tr",null,[B,t("td",null,[n(v,{name:"keys",rows:"10",class:"w-full",autofocus:""}),K])]),t("tr",null,[N,t("td",null,[s(e).isRequesting?(i(),l("div",S,"数据发送中...")):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).message.length>0?(i(),l("span",F,"失败："+r(s(e).message),1)):c("",!0),!s(e).isRequesting&&!s(e).isOk&&s(e).failKeys.length>0?(i(),l("div",I,[(i(!0),l(h,null,p(s(e).failKeys,u=>(i(),l("div",null,[t("span",L,r(u.key)+": "+r(u.reason),1)]))),256))])):c("",!0)])])])]),_:1}),s(e).isRequesting?c("",!0):(i(),m(w,{key:0},{default:a(()=>[d("提交")]),_:1}))]),_:1},8,["onBefore","onSuccess","onFail","onDone"])],512),[[_,s(e).webConfig.cache!=null&&s(e).webConfig.cache.isOn]])]),_:1},8,["ctx"]))}};export{fe as default};
