1import{j as e}from"./query-vendor-tvoqzFL6.js";import{i as b,L as u}from"./react-vendor-Bs31K2lP.js";import{w as g,W as N,X as v,S as y,B as _,A as k,Y as P,q as A,C as f}from"./index-DgD0igGu.js";import{V as S,C as L,k as C}from"./ui-vendor-Cc_EYI3V.js";import"./supabase-vendor-DXfiMDn6.js";const D={watchlist:String.raw` 2 ââââââââââââââââââââââââââââââ 3 â > scanning watchlist... â 4 â > 0 targets locked â 5 â > status: STANDBY â 6 ââââââââââââââââââââââââââââââ 7 \\ 8 \\ âââââââââââ® 9 \\ â NO_DATA â 10 â°âââââââââ⯠11 `,search:String.raw` 12 ââââââââââââââââââââââââââââââââ 13 â query > _________________ â 14 â result > 0x00 matches â 15 â status > VOID â 16 ââââââââââââââââââââââââââââââââ 17 ¯\_(ã)_/¯ 18 `,generic:String.raw` 19 ââââââââââââââââââââââââ 20 â > nothing here â 21 â > 404 / EMPTY â 22 ââââââââââââââââââââââââ 23 `};function E({variant:t="generic",title:r,children:s,className:i}){return e.jsxs("div",{className:g("py-10 flex flex-col items-center text-center",i),children:[e.jsx("pre",{"aria-hidden":"true",className:"font-mono text-[10px] sm:text-xs leading-tight text-primary/70 select-none whitespace-pre",children:D[t].trimEnd()}),r&&e.jsx("p",{className:"mt-4 text-sm font-bold uppercase tracking-[0.2em] text-foreground/80",children:r}),s&&e.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:s})]})}function c(t){return t?C(new Date(t)).replace(/ (days?)/,"d").replace(/ (hours?)/,"h").replace(/ (minutes?)/,"m").replace(/ (months?)/,"mo").replace(/ (years?)/,"y").toUpperCase():""}function R({posts:t}){if(t.length===0)return null;const r=t.slice(0,2);return e.jsx("div",{className:"grid md:grid-cols-2 gap-6 md:gap-8",children:r.map((s,i)=>e.jsxs(u,{to:`/news/${s.slug}`,className:"group block",children:[e.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden rounded-md bg-muted",children:[s.cover_url&&e.jsx("img",{src:f(s.cover_url),alt:s.title,className:"absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.03]",loading:i===0?"eager":"lazy",fetchPriority:i===0?"high":void 0}),e.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -translate-x-full skew-x-12 bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-700 ease-out group-hover:translate-x-full"})]}),e.jsxs("div",{className:"mt-4 space-y-2",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/50 font-medium",children:c(s.published_at)&&`${c(s.published_at)} AGO`}),e.jsx("h2",{className:"text-[18px] md:text-[20px] font-bold text-white leading-snug line-clamp-2",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-[13px] text-white/55 leading-relaxed line-clamp-2",children:s.excerpt})]})]},s.id))})}function T({post:t}){return e.jsxs(u,{to:`/news/${t.slug}`,className:"group grid grid-cols-[180px_120px_1fr] md:grid-cols-[220px_140px_1fr] items-center gap-5 py-5",children:[e.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden rounded-md bg-muted",children:[t.cover_url?e.jsx("img",{src:f(t.cover_url),alt:t.title,loading:"lazy",className:"absolute inset-0 h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",onError:r=>{r.currentTarget.src="/placeholder.svg"}}):e.jsx("div",{className:"h-full w-full bg-secondary"}),e.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -translate-x-full skew-x-12 bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-700 ease-out group-hover:translate-x-full"})]}),e.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em] text-white/50 font-medium",children:c(t.published_at)&&`${c(t.published_at)} AGO`}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"text-[15px] md:text-[16
23px] font-bold text-white leading-snug line-clamp-2",children:t.title}),t.excerpt&&e.jsx("p",{className:"mt-1 text-[12.5px] text-white/55 leading-relaxed line-clamp-1",children:t.excerpt})]})]})}function x(t,r=2){return String(t).padStart(r,"0")}const I=()=>{const[t,r]=b(),s=Math.max(1,parseInt(t.get("page")||"1",10)||1),i=a=>{const o=typeof a=="function"?a(s):a,m=new URLSearchParams(t);o<=1?m.delete("page"):m.set("page",String(o)),r(m),typeof window<"u"&&window.scrollTo({top:0,behavior:"auto"})},{data:w}=N(2),d=w||[],h=d.map(a=>a.id),{data:n,isLoading:j}=v(s,10,h),p=((n==null?void 0:n.posts)||[]).filter(a=>!h.includes(a.id)),l=(n==null?void 0:n.totalPages)||1;return e.jsxs(e.Fragment,{children:[e.jsx(y,{title:"Latest Gaming News & Leaks â CrackWatch",description:"Latest gaming news, updates, and articles about game DRM, cracks, and the gaming industry.",canonical:"/news"}),e.jsx(_,{}),e.jsxs("main",{className:"mx-auto max-w-[1520px] px-6 lg:px-10 py-8 space-y-10",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold tracking-tight",children:"News & Leaks"}),e.jsx("p",{className:"text-[14px] text-white/55",children:"Cracks, DRM movements and gaming industry updates curated daily."})]}),e.jsxs("div",{className:"my-2 border border-white/10 bg-white/[0.02] p-3",children:[e.jsx("p",{className:"mb-2 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/60 text-center",children:"Advertisement"}),e.jsx(k,{slotKey:"category_top"})]}),d.length>0&&e.jsx("section",{children:e.jsx(R,{posts:d})}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h2",{className:"text-[12px] uppercase tracking-[0.2em] text-white/60 font-semibold",children:"All Articles"}),e.jsxs("span",{className:"text-[11px] text-white/40 font-mono",children:["PAGE ",x(s)," / ",x(l)]})]}),j?e.jsx(P,{label:"Fetching articles"}):p.length===0?e.jsx(E,{variant:"generic",title:"No articles yet"}):e.jsx("div",{className:"divide-y divide-white/10 border-t border-white/10",children:p.map(a=>e.jsx(T,{post:a},a.id))}),l>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-8 flex-wrap",children:[e.jsx("button",{onClick:()=>i(a=>Math.max(1,a-1)),disabled:s===1,className:"p-2 rounded-md border border-white/10 hover:border-primary disabled:opacity-30 transition-colors",children:e.jsx(S,{className:"h-4 w-4"})}),Array.from({length:l},(a,o)=>o+1).map(a=>e.jsx("button",{onClick:()=>i(a),className:g("h-9 w-9 text-xs font-semibold rounded-md transition-colors border",a===s?"bg-primary text-primary-foreground border-primary":"border-white/10 hover:border-primary"),children:x(a)},a)),e.jsx("button",{onClick:()=>i(a=>Math.min(l,a+1)),disabled:s===l,className:"p-2 rounded-md border border-white/10 hover:border-primary disabled:opacity-30 transition-colors",children:e.jsx(L,{className:"h-4 w-4"})})]})]})]}),e.jsx(A,{})]})};export{I 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.