1import{a as G,_ as U}from"./CG5UAfhP.js";import{_ as Y}from"./BEREdQ6Q.js";import{_ as Z}from"./B6cetFI_.js";import{_ as K}from"./BV-VMysY.js";import{_ as q}from"./BCY-6_NJ.js";import{o as Q,a as A,_ as L,b as F}from"./BEbVkMZM.js";import{g as H,t as M,_ as J}from"./DxHJbHqA.js";import{E as P,L as o,Y as n,a5 as i,M as w,N as x,u as e,a7 as l,P as d,T as h,l as k,F as v,Z as O,w as R,a6 as y,Q as W,bK as X,i as ee,p as E,aU as te,bI as oe,ah as se}from"./CdF3t0oV.js";import{f as ne,t as ae,b as le,c as ie}from"./Dp1dSCzu.js";import{v as re}from"./D92X5zYB.js";import{B as ce}from"./L2URQU9b.js";import{u as ue}from"./lghkdXAa.js";import"./DlAUqK2U.js";import"./BQHxe3Zg.js";import"./D2HbcKdl.js";import"./CWSHiX_w.js";import"./CyOriLK0.js";import"./DAaiGirh.js";import"./C0k_CvG7.js";const de={key:0,class:"mb-4 flex animate-pulse flex-col gap-2"},be={key:1,"aria-hidden":"true",class:"relative aspect-[1.75/1] w-full overflow-hidden rounded-xl bg-linear-to-br from-[#49316e] via-[#2b2046] to-zeno-dark text-white transition-transform duration-200 group-hover:scale-[1.02] motion-reduce:transition-none"},me={class:"relative flex h-full flex-col justify-between p-3 sm:p-4"},_e={class:"text-[10px] font-semibold tracking-[0.16em] text-white/75 uppercase"},pe={class:"flex items-end justify-between gap-2"},ge={key:0,class:"font-monigue text-5xl leading-none text-white/90 sm:text-6xl"},ke={key:2,class:"flex size-8 shrink-0 items-center justify-center rounded-full bg-white text-zeno-dark sm:size-9"},he={class:"flex min-w-0 flex-col gap-0.5"},xe={class:"leading-snug"},fe={class:"text-xs text-zeno-text-light"},ve=P({__name:"BibleBookCard",props:{book:{},bibleId:{}},setup(s){const c=k(()=>s.book?H(s.book.bookId,s.book.testament):null),u=k(()=>s.book?M(s.book.name):""),m=k(()=>s.book?.chapters[0]??1),g=k(()=>s.book?.media.length===1&&s.book.media[0]==="video"),t=k(()=>s.book?.bookId.match(/^C(\d+)$/)?.[1]??null);return(z,_)=>{const f=Q,$=A,p=L;return!s.book||!s.bibleId?(o(),n("div",de,[..._[0]||(_[0]=[i("div",{class:"relative inline-block aspect-[1.75/1] rounded-xl bg-zeno-gray-light"},null,-1),i("span",{class:"h-5 w-32 rounded-sm bg-zeno-gray-light"},null,-1)])])):(o(),w(p,{key:1,to:{name:"bible-bibleId-bookId-chapter",params:{bibleId:s.bibleId,bookId:s.book.bookId,chapter:e(m)}},class:"group mb-4 flex flex-col gap-2 rounded-xl outline-offset-4 focus-visible:outline-2 focus-visible:outline-zeno-purple"},{default:x(()=>[e(c)?(o(),w(f,{key:0,alt:e(u),src:e(c),class:"aspect-[1.75/1] w-full rounded-xl bg-zeno-gray-light object-cover object-center"},null,8,["alt","src"])):(o(),n("div",be,[_[1]||(_[1]=i("span",{class:"absolute -top-1/2 -right-1/4 aspect-square w-3/4 rounded-full border border-white/15"},null,-1)),_[2]||(_[2]=i("span",{class:"absolute -top-1/3 -right-1/3 aspect-square w-full rounded-full border border-white/10"},null,-1)),i("div",me,[i("span",_e,l(e(g)?"Video story":"Bible book"),1),i("div",pe,[e(t)?(o(),n("span",ge,l(e(t)),1)):(o(),w($,{key:1,name:"lucide:book-open",class:"size-9 text-white/85"})),e(g)?(o(),n("span",ke,[d($,{name:"lucide:play",class:"size-4 fill-current"})])):h("",!0)])])])),i("div",he,[i("span",xe,l(e(u)),1),i("span",fe,l(s.book.chapters.length)+" "+l(s.book.chapters.length===1?"chapter":"chapters"),1)])]),_:1},8,["to"]))}}}),ye=Object.assign(ve,{__name:"BibleBookCard"}),$e={class:"grid grid-cols-2 gap-2 sm:grid-cols-3 sm:gap-4 md:grid-cols-4"},Ie=P({__name:"BibleBookGrid",props:{bibleId:{},books:{},status:{},skeletons:{default:8}},setup(s){return(c,u)=>{const m=ye;return o(),n("div",$e,[s.status==="pending"?(o(!0),n(v,{key:0},O(s.skeletons,(g,t)=>(o(),w(m,{key:`skeleton-${t}`}))),128)):(o(!0),n(v,{key:1},O(s.books,g=>(o(),w(m,{key:g.bookId,book:g,"bible-id":s.bibleId},null,8,["book","bible-id"]))),128))])}}}),Be=Object.assign(Ie,{__name:"BibleBookGrid"}),we={class:"space-y-4"},ze={class:"relative w-full"},Se={class:"pointer-events-none absolute inset-y-0 inset-s-0 flex items-center pl-5"},Te={key:0,class:"text-sm text-zeno-text-light"},Ce={key:0,class:"text-sm text-zeno-text-light"},Ne={key:1,class:"text-sm text-zeno-text-light"},je={key:2,class:"text-sm text-zeno-text-light"},Oe={key:0,class:"text-sm text-zeno-text-light"},Pe={class:"space-y-3"},Ve={class:"block text-sm font-semibold"},Ee={class:"block text-sm"},Fe={key:0,class:"rounded-sm bg-yellow-100 px-0.5"},Re={key:1,class:"flex items-center justify-between"},qe=15,Ae=P({__name:"BibleSearch",props:{bibleId:{},filesetId:{},books:{}},setup(s){const c=E(""),u=E(""),m=E(1),g=k(()=>({query:u.value,filesetId:s.filesetId,page:m.value,limit:qe})),{data:t,status:z,execute:_}=ne(s.bibleId,g),f=re(b=>{const a=b.trim();if(a.length<3){u.value="";return}a!==u.value&&(m.value=1,u.value=a)},500);R(c,b=>f(b)),R(g,b=>{b.query&&_()});const $=k(()=>u.value?t.value?.data??[]:[]),p=k(()=>t.value?.pagination??null),j=k(()=>c.value.trim().length>0&&c.value.trim().length<3),S=b=>{const a=s.books.find(I=>I.bookId===b);return a?M(a.name):b},T=b=>
1{const a=u.value.split(/\s+/).filter(Boolean);if(!a.length)return[{text:b.text,match:!1}];const I=new RegExp(`(${a.map(B=>B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})`,"gi");return b.text.split(I).map((B,C)=>({text:B,match:C%2===1}))};return(b,a)=>{const I=q,B=A,C=L;return o(),n("section",we,[d(I,null,{default:x(()=>[...a[3]||(a[3]=[y("Search this Bible",-1)])]),_:1}),i("div",ze,[i("div",Se,[d(B,{class:"mr-2 text-gray-400",name:"solar:magnifer-linear",size:"16","aria-hidden":"true"})]),W(i("input",{id:"bible-search","onUpdate:modelValue":a[0]||(a[0]=r=>ee(c)?c.value=r:null),type:"search",placeholder:"Search for a word or phrase","aria-label":"Search this Bible",class:"w-full rounded-full border border-zeno-gray-border bg-zeno-gray-light p-4 ps-12 pe-6 text-sm placeholder:text-zeno-gray sm:text-base"},null,512),[[X,e(c)]])]),e(j)?(o(),n("p",Te,"Type at least 3 characters.")):e(u)?(o(),n(v,{key:1},[e(z)==="pending"?(o(),n("p",Ce,"Searchingâ¦")):e(z)==="error"?(o(),n("p",Ne,"Search isn't available right now.")):e($).length?(o(),n(v,{key:3},[e(p)?(o(),n("p",Oe,l(e(p).total)+" "+l(e(p).total===1?"verse":"verses")+" â page "+l(e(p).currentPage)+" of "+l(e(p).totalPages),1)):h("",!0),i("ol",Pe,[(o(!0),n(v,null,O(e($),r=>(o(),n("li",{key:`${r.bookId}-${r.chapter}-${r.verse}`},[d(C,{to:{name:"bible-bibleId-bookId-chapter",params:{bibleId:s.bibleId,bookId:r.bookId,chapter:r.chapter},hash:`#verse-${r.verse}`},class:"block rounded-xl border border-zeno-gray-border-light p-3 transition duration-150 hover:border-zeno-dark"},{default:x(()=>[i("span",Ve,l(S(r.bookId))+" "+l(r.chapter)+":"+l(r.verse),1),i("span",Ee,[(o(!0),n(v,null,O(T(r),(N,V)=>(o(),n(v,{key:V},[N.match?(o(),n("mark",Fe,l(N.text),1)):(o(),n(v,{key:1},[y(l(N.text),1)],64))],64))),128))])]),_:2},1032,["to"])]))),128))]),e(p)&&e(p).totalPages>1?(o(),n("div",Re,[d(e(F),{variant:"outline",disabled:e(m)<=1,onClick:a[1]||(a[1]=r=>m.value--)},{default:x(()=>[...a[4]||(a[4]=[y("Previous",-1)])]),_:1},8,["disabled"]),d(e(F),{variant:"outline",disabled:e(m)>=e(p).totalPages,onClick:a[2]||(a[2]=r=>m.value++)},{default:x(()=>[...a[5]||(a[5]=[y("Next",-1)])]),_:1},8,["disabled"])])):h("",!0)],64)):(o(),n("p",je,"No verses contain â"+l(e(u))+"â.",1))],64)):h("",!0)])}}}),Le=Object.assign(Ae,{__name:"BibleSearch"}),Me={class:"space-y-4"},De={key:0,class:"text-lg text-zeno-text-light"},Ge={class:"flex flex-wrap items-center gap-3"},Ue={key:0,class:"text-sm text-zeno-text-light"},Ye={key:0,class:"space-y-5"},Ze={key:1,class:"space-y-5"},mt=P({__name:"index",async setup(s){let c,u;const m=te(),{bibleId:g}=m.params,[{data:t,error:z},{data:_,status:f}]=([c,u]=oe(()=>Promise.all([le(g),ie(g)])),c=await c,u(),c);if(ae(z.value),z.value?.statusCode===404||!t.value)throw se({status:404,fatal:!0});const $=k(()=>!!t.value&&t.value.nativeName!==t.value.name),p=k(()=>_.value?.filter(S=>S.testament==="OT")??[]),j=k(()=>_.value?.filter(S=>S.testament==="NT")??[]);return ue({title:`${t.value.name} â ${t.value.language} Bible`,description:`${t.value.name} (${t.value.language}) on Zeno.FM: read every book and chapter online${t.value.media.includes("audio")?" and listen to the audio Bible":""}.`,breadcrumbs:[ce.bible,{name:t.value.language,path:`/bible/languages/${t.value.languageIso}/`},{name:t.value.name,path:`/bible/${t.value.bibleId}/`}]}),(S,T)=>{const b=U,a=Y,I=Z,B=K,C=q,r=Be,N=Le,V=J,D=G;return e(t)?(o(),w(D,{key:0},{default:x(()=>[i("div",Me,[d(b,{route:{name:"bible-languages-iso",params:{iso:e(t).languageIso}}},{default:x(()=>[y(l(e(t).name),1)]),_:1},8,["route"]),e($)?(o(),n("p",De,l(e(t).nativeName),1)):h("",!0),i("div",Ge,[d(a,{route:{name:"bible-languages-iso",params:{iso:e(t).languageIso}}},{default:x(()=>[y(l(e(t).language),1)]),_:1},8,["route"]),e(t).publicationYear?(o(),n("span",Ue,l(e(t).publicationYear),1)):h("",!0),d(I,{media:e(t).media},null,8,["media"])]),d(B,{"bible-id":e(t).bibleId,"language-iso":e(t).languageIso},null,8,["bible-id","language-iso"])]),e(f)==="pending"||e(p).length?(o(),n("section",Ye,[d(C,null,{default:x(()=>[...T[0]||(T[0]=[y("Old Testament",-1)])]),_:1}),d(r,{"bible-id":e(t).bibleId,books:e(p),status:e(f)},null,8,["bible-id","books","status"])])):h("",!0),e(f)==="pending"||e(j).length?(o(),n("section",Ze,[d(C,null,{default:x(()=>[...T[1]||(T[1]=[y("New Testament",-1)])]),_:1}),d(r,{"bible-id":e(t).bibleId,books:e(j),status:e(f)},null,8,["bible-id","books","status"])])):h("",!0),e(t).recommendedFilesets.text&&e(_)?.length?(o(),w(N,{key:2,"bible-id":e(t).bibleId,"fileset-id":e(t).recommendedFilesets.text,books:e(_)},null,8,["bible-id","fileset-id","books"])):h("",!0),d(V,{entries:e(t).copyright},null,8,["entries"])]),_:1})):h("",!0)}}});
1export{mt 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.