1import{_ as M,a as P,b as A,u as E}from"./Dj0wcU9T.js";import{d as O,O as U,A as z,c as n,D as F,r as w,w as I,E as L,P as Q,g as d,l as m,u as e,i as x,a as W,M as Z,f as _,t as j,b as r,n as q}from"./IGGsmdj1.js";import{u as G}from"./Cv2r2E_f.js";import"./CK-5ZPik.js";import"./Cw-87dwf.js";const H={key:0,class:"container"},J={key:0,class:"board-loading"},K={key:1,class:"board-error-state"},X={class:"board-error-text"},ne=O({__name:"index",async setup(Y){let u,y;const l=U(),v=z(),{getCategoryBySlug:B}=G(),o=n(()=>"equipment"),s=n(()=>B(o.value));F({title:()=>s.value?.name||"Board",description:()=>s.value?.description,ogTitle:()=>s.value?.name||"Board",ogDescription:()=>s.value?.description});const h=n(()=>l.query.page?Number(l.query.page):1),c=n(()=>l.query.search?String(l.query.search):""),i=w(c.value);I(c,t=>{i.value=t});const f=n(()=>({categorySlug:o.value,page:h.value,pageSize:10,search:c.value})),{data:p,pending:V,error:b,refresh:C}=([u,y]=L(()=>E("/api/posts",{query:f,watch:[f]},"$Sir1Z3N4Ov")),u=await u,y(),u),g=w(null),{y:S}=Q(),N=async t=>{const a=t.trim();await v.push({path:`${o.value}`,query:{page:1,search:a||void 0}}),await q(),S.value=g.value?.offsetTop||0},R=async t=>{await v.push({path:`${o.value}`,query:{page:t,search:c.value||void 0}}),await q(),S.value=g.value?.offsetTop||0};return(t,a)=>{const T=M,$=P,D=A;return e(s)?(r(),d("div",{key:0,ref_key:"mainRef",ref:g,class:"min-h-screen bg-gray-50"},[e(p)?(r(),d("div",H,[x(T,{modelValue:e(i),"onUpdate:modelValue":a[0]||(a[0]=k=>Z(i)?i.value=k:null),onSearch:N,class:"mb-4"},null,8,["modelValue"]),e(V)?(r(),d("div",J,[...a[2]||(a[2]=[_("div",{class:"board-loading-spinner"},null,-1),_("p",{class:"board-loading-text"}," ê²ìê¸ ëª©ë¡ì ë¶ë¬ì¤ë ì¤... ",-1)])])):e(b)?(r(),d("div",K,[_("p",X,j(e(b)),1),_("button",{class:"mt-4 btn-board-primary",onClick:a[1]||(a[1]=k=>e(C)())}," ë¤ì ìë ")])):m("",!0),x($,{posts:e(p).posts,"category-slug":e(o)},null,8,["posts","category-slug"]),e(p)?(r(),W(D,{key:2,"model-value":e(h),pagination:e(p).pagination,"onUpdate:modelValue":R,class:"mt-8"},null,8,["model-value","pagination"])):m("",!0)])):m("",!0)],512)):m("",!0)}}});export{ne 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.