1import{a7 as g,j as e,M as j,a8 as p,_ as d}from"./index-Gk7PUVEm.js";import{P as f,C as N}from"./page-breadcrumb-Bv82dsoZ.js";import{F as b,V as y,a as v}from"./volume-x-DmjdX7il.js";function _(){const{keyword:a,page:r,pageCount:t,total:n,films:l}=g.useLoaderData(),i=(r-1)*p+1,c=i+l.length-1,m=`Showing ${i.toLocaleString("en-US")} to ${c.toLocaleString("en-US")} of ${n.toLocaleString("en-US")} results`;return e.jsx("main",{className:"min-h-[100svh] bg-gray-100",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-10 sm:px-6 lg:px-8 lg:py-14",children:[e.jsx(f,{trail:[{title:"Categories",href:"/categories/"}],current:e.jsx("span",{className:"capitalize",children:a})}),e.jsx("h1",{className:"font-heading text-4xl capitalize tracking-tight text-balance sm:text-5xl lg:text-6xl",children:a}),e.jsxs("p",{className:"mt-4 text-lg text-muted-foreground",children:[n.toLocaleString("en-US")," films tagged ",e.jsx("span",{className:"capitalize",children:a}),"."]}),e.jsxs("div",{className:"mt-10 flex flex-wrap items-center justify-between gap-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:m}),e.jsx(x,{keyword:a,page:r,pageCount:t,compact:!0})]}),e.jsx("ul",{className:"mt-4 space-y-3",children:l.map(s=>e.jsx("li",{children:e.jsxs("a",{href:j(s),className:"group flex items-center gap-4 roun
1ded-lg border border-border/60 bg-card px-5 py-4 shadow-sm transition-colors hover:bg-muted/40",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-6",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["ID: ",s.film_id]}),e.jsx("h2",{className:"mt-1 text-base font-semibold group-hover:underline underline-offset-4",children:s.title}),s.keywords!=null&&s.keywords.length>0&&e.jsxs("p",{className:"mt-1 line-clamp-1 text-sm text-muted-foreground",children:[e.jsx("span",{className:"capitalize",children:s.keywords.slice(0,5).join(", ")}),s.keywords.length>5&&e.jsxs(e.Fragment,{children:[", and ",s.keywords.length-5," moreâ¦"]})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-3 text-sm sm:block sm:text-right",children:[s.release_date!=null&&e.jsx("p",{className:"font-medium tabular-nums",children:s.release_date}),e.jsxs("p",{className:"flex items-center gap-3 text-muted-foreground sm:mt-1 sm:justify-end",children:[s.sound!=null&&e.jsx(S,{sound:s.sound}),s.color!=null&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(b,{className:"size-4 shrink-0","aria-hidden":"true"}),s.color]})]})]})]}),e.jsx(N,{className:"size-5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},s.id))}),e.jsx(x,{keyword:a,page:r,pageCount:t})]})})}const w={true:"Sound",false:"No sound",partial:"Partial sound"};function S({sound:a}){const r=a==="false"?y:v;return e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(r,{className:"size-4 shrink-0","aria-hidden":"true"}),w[a]??a]})}function x({keyword:a,page:r,pageCount:t,compact:n=!1}){if(t<=1)return null;const l=n?1:2,i=Math.max(1,Math.min(r-l,t-l*2)),c=Math.min(t,Math.max(r+l,1+l*2)),m=Array.from({length:c-i+1},(o,u)=>i+u),s="inline-flex min-w-10 items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm transition-colors hover:bg-muted",h="border-primary bg-primary text-primary-foreground hover:bg-primary";return e.jsxs("nav",{className:`flex flex-wrap items-center gap-2 ${n?"":"mt-8 justify-center"}`,"aria-label":n?"Pagination, top":"Pagination",children:[r>1&&e.jsx("a",{className:s,href:d(a,r-1),"aria-label":n?"Previous page":void 0,children:n?e.jsx("span",{"aria-hidden":"true",children:"â¹"}):"Previous"}),i>1&&e.jsx("a",{className:`${s} tabular-nums`,href:d(a,1),children:"1"}),i>2&&e.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"â¦"}),m.map(o=>e.jsx("a",{href:d(a,o),"aria-current":o===r?"page":void 0,className:`${s} tabular-nums ${o===r?h:""}`,children:o},o)),c<t-1&&e.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"â¦"}),c<t&&e.jsx("a",{className:`${s} tabular-nums`,href:d(a,t),children:t}),r<t&&e.jsx("a",{className:s,href:d(a,r+1),"aria-label":n?"Next page":void 0,children:n?e.jsx("span",{"aria-hidden":"true",children:"âº"}):"Next"})]})}export{_ as component};
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.