PageSourceSearch

https://jewishvirtuallibrary.org/_nuxt/BiwH3796.js

js jewishvirtuallibrary.org collected 2026-09-24 08:28:43 UTC 3,743 bytes, 1 lines download raw bytes

1import{_ as $}from"./BC0bmsmX.js";import{_ as E}from"./CJlzNQ1F.js";import{_ as N}from"./BKkv2N_l.js";import{_ as V}from"./v6eW2DxJ.js";import{J as T,r as i,K as U,_ as q,d as g,E as F,c as j,a as w,w as f,b as n,i as p,e as I,f as P,g as h,h as v,t as C,L as z,n as R,u as H}from"./t8OAlijK.js";import"./DSNWTBrn.js";import"./D4H9sm2l.js";import"./BbAC7yzK.js";import"./BK-tONi_.js";const J=[{name:"Page Title",sortable:!1,field:o=>o.title},{name:"Image Address",sortable:!1,field:o=>o.img},{name:"Actions",sortable:!1,field:()=>""}],K=T("brokenImageStore",()=>{const o=i([]),s=i(1),c=i(0),a=i(!1),l=i(!1),u=i(0),b=U(),m=i(!1);let r=null,d=i(!1);const _=async()=>{if(!a.value){l.value=!0,m.value=!0,d.value=!1,r&&r.abort(),r=new AbortController;try{const e=await b.get(`/reports/get-broken-images/${s.value}`,{signal:r.signal});if(d.value){console.log("Aborted request, skipping data update");return}e.data&&e.data.data&&(o.value=[...o.value,...e.data.data],c.value+=e.data.checkedRecords,u.value===0&&(u.value=e.data.totalCount),a.value=e.data.isLast,s.value+=1,!a.value&&!r.signal.aborted&&await _())}catch(e){e.name==="AbortError"?(console.log("API request aborted due to navigation away."),a.value=!0,d.value=!0):console.error("Error fetching broken images:",e)}finally{l.value=!1}}};return{brokenImages:o,isLastPage:a,fetchNextPage:_,processedRecords:c,totalCount:u,isLoading:l,showProgress:m,resetState:()=>{r&&r.abort(),d.value=!0,o.value=[],s.value=1,c.value=0,a.value=!1,l.value=!1,u.value=0,m.value=!1}}}),M={key:0,class:"progress-container"},D={class:"progress-text"},G={class:"progress-bar"},O={key:1,class:"flex justify-between items-center my-2"},Q={class:"text-sm text-gray-600"},W={scope:"col",class:"align-middle px-4"},X={__name:"index",setup(o){const s=K(),c=g(()=>s.isLoading),a=g(()=>s.processedRecords),l=g(()=>s.totalCount),u=g(()=>s.showProgress),b=g(()=>l.value===0?0:Math.round(a.value/l.value*100)),m=g(()=>J.filter(e=>!e.hidden)),r=e=>{R(`/admin/pages/${e.id}`,{open:{target:"_blank"}})},d=e=>{const t=H();R(x(t.public.API_URL)+`${e.old_url}`,{open:{target:"_blank"},external:!0})},_=async()=>{if(!(c.value||s.isLastPage))try{await s.fetchNextPage()}catch(e){console.error("Error fetching broken images:",e)}},x=e=>{try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch(t){return console.error("Invalid URL: ",t),null}};return F(()=>{s.resetState()}),(e,t)=>{const L=$,k=E,B=N,S=V;return w(),j(S,{class:"rounded-3"},{default:f(()=>[t[4]||(t[4]=n("title",null,"Broken Images Report",-1)),p(L,{title:"Broken Images Report"}),t[5]||(t[5]=n("p",null,"This report scans all articles on the server for broken images. It may take over 30 minutes to complete.",-1)),p(k,{disabled:c.value||h(s).isLastPage,class:"bg-new-blue",onClick:_},{default:f(()=>t[0]||(t[0]=[v(" Run Report ")])),_:1,__:[0]},8,["disabled"]),u.value?(w(),I("div",M,[n("p",D," Scanning... "+C(a.value)+" / "+C(l.value)+" pages ",1),n("div",G,[n("div",{class:"progress-fill",style:z({width:b.value+"%"})},null,4)])])):P("",!0),u.value?(w(),I("div",O,[n("span",Q," Found "+C(h(s).brokenImages.length)+" entries of broken images ",1)])):P("",!0),p(B,{columns:m.value,rows:h(s).brokenImages,"show-entries-dropdown":!1,"show-footer":!1,"table-class":["broken-images-table","responsive-table"]},{"row-Actions":f(({rowData:y})=>[n("td",W,[n("div",null,[n("span",null,[p(k,{class:"blue-grey",onClick:A=>r(y)},{default:f(()=>t[1]||(t[1]=[v(" Edit Page ")])),_:2,__:[1]},1032,["onClick"]),t[3]||(t[3]=v("   ")),p(k,{class:"grey darken-4",onClick:A=>d(y)},{default:f(()=>t[2]||(t[2]=[v(" View Page ")])),_:2,__:[2]},1032,["onClick"])])])])]),_:1},8,["columns","rows"])]),_:1,__:[4,5]})}}},le=q(X,[["__scopeId","data-v-7ba0258b"]]);export{le as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.