import{o as i,c as f,w as a,u as s,b as n,d as m,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-BYcXwl4U.js";import{i as g,c as y}from"./app-a6cKceqE.js";import{_ as b}from"./app-oLjSY4QW.js";import{_ as k}from"./app-CQ-vNlMj.js";import{_ as v}from"./app-DY-0PadZ.js";import{_ as w}from"./app-CignoBaV.js";import{D as x}from"./app-7GBSHA5C.js";import{_ as R}from"./app-uhTxLRnQ.js";import{_ as C}from"./app-C3oVnfUH.js";import"./app-DCd54JMo.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";import"./app-CabATHnR.js";import"./app-BhzV4gWo.js";import"./app-CrjU8lgK.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BG60hdvp.js";import"./app-BQ5ggxk2.js";import"./app-SxAW7vhf.js";import"./app-D3zbrzdO.js";import"./app-CLawzVMq.js";import"./app-BeFNDz9n.js";import"./app-BDgR0DSb.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(),f(C,{ctx:s(e)},{default:a(()=>[n(b,{ctx:s(e),"active-tab":"fetch"},null,8,["ctx"]),m(t("div",null,[n(R,{"disable-spacing":""},{default:a(()=>[d("没有开启缓存，暂时无法预热缓存。")]),_:1})],512),[[_,s(e).webConfig.cache==null||!s(e).webConfig.cache.isOn]]),m(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(),f(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};
