PageSourceSearch

https://worldlanguage.com/assets/product-types-CAaWrIYw.js

js worldlanguage.com collected 2026-10-02 05:56:01 UTC 3,864 bytes, 1 lines download raw bytes

1import{r as e,t}from"./jsx-runtime-BkSabwWG.js";import{t as n}from"./react-DHmoMYoq.js";import{t as r}from"./link-fEFUCOQO.js";import{t as i}from"./useSuspenseQuery-0ughONPt.js";import{t as a}from"./sparkles-uETicRdT.js";import{at as o,ft as s,y as c}from"./index-C_HOQAN3.js";var l=e(n()),u=t();function d(e){return e.replace(/\|/g,` › `).replace(/~/g,`–`)}function f(){let{data:e}=i(c),[t,n]=(0,l.useState)(``),f=t.trim().toLowerCase(),p=(0,l.useMemo)(()=>f?e.filter(e=>d(e.name).toLowerCase().includes(f)):e,[e,f]),m=(0,l.useMemo)(()=>e.filter(e=>e.top),[e]),h=(0,l.useMemo)(()=>{let e=new Map;for(let t of[...p].sort((e,t)=>d(e.name).localeCompare(d(t.name)))){let n=d(t.name).charAt(0).toUpperCase();e.set(n,[...e.get(n)??[],t])}return[...e.entries()]},[p]);return(0,u.jsxs)(`div`,{className:`mx-auto max-w-7xl px-4 py-8`,children:[(0,u.jsxs)(`header`,{className:`rounded-3xl bg-navy px-6 py-10 text-paper sm:px-10`,children:[(0,u.jsxs)(`p`,{className:`flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-paper/60`,children:[(0,u.jsx)(s,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),` Product types`]}),(0,u.jsx)(`h1`,{className:`mt-2 font-serif text-3xl font-semibold sm:text-4xl`,children:`Search by product type`}),(0,u.jsxs)(`p`,{className:`mt-2 max-w-2xl text-sm text-paper/70`,children:[e.length,` product types across the catalog. Pick one to see every title in it.`]}),(0,u.jsxs)(`div`,{className:`mt-6 flex max-w-xl items-center overflow-hidden rounded-full bg-white shadow-sm`,children:[(0,u.jsx)(o,{className:`ml-4 h-4 w-4 shrink-0 text-navy/50`,"aria-hidden":!0}),(0,u.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`Filter product types…`,"aria-label":`Filter product types`,className:`h-11 w-full bg-transparent px-3 text-sm text-ink outline-none placeholder:text-ink/40`})]})]}),!f&&m.length>0&&(0,u.jsxs)(`section`,{className:`mt-10`,children:[(0,u.jsxs)(`h2`,{className:`flex items-center gap-2 font-serif text-2xl font-semibold text-navy`,children:[(0,u.jsx)(a,{className:`h-5 w-5 text-crimson`,"aria-hidden":!0}),` Top product types`]}),(0,u.jsx)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:m.map(e=>(0,u.jsxs)(r,{to:`/`,search:{categories:[e.name],page:1},className:`group flex items-center justify-between rounded-2xl border border-navy/10 bg-white px-5 py-4 shadow-sm transition hover:border-navy/40 hover:shadow-md`,children:[(0,u.jsx)(`span`,{className:`font-medium text-ink group-hover:text-navy`,children:d(e.name)}),(0,u.jsx)(`span`,{className:`rounded-full bg-navy px-2.5 py-0.5 text-xs font-semibold text-paper`,children:e.count.toLocaleString()})]},e.name))})]}),(0,u.jsxs)(`section`,{className:`mt-10`,children:[(0,u.jsx)(`h2`,{className:`font-serif text-2xl font-semibold text-navy`,children:f?`Matches for “${t.trim()}”`:`All product types`}),p.length===0&&(0,u.jsx)(`p`,{className:`mt-4 text-sm text-ink/60`,children:`No product types match that filter.`}),(0,u.jsx)(`div`,{className:`mt-4 space-y-8`,children:h.map(([e,t])=>(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`p`,{className:`mb-2 text-xs font-semibold uppercase tracking-widest text-navy/50`,children:e}),(0,u.jsx)(`ul`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3`,children:t.map(e=>(0,u.jsx)(`li`,{children:(0,u.jsxs)(r,{to:`/`,search:{categories:[e.name],page:1},className:`flex items-center justify-between gap-3 rounded-xl px-3 py-2 text-sm transition hover:bg-white`,children:[(0,u.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-ink`,children:[d(e.name),e.top&&(0,u.jsx)(`span`,{className:`ml-2 rounded-full bg-crimson/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-crimson`,children:`Top`})]}),(0,u.jsx)(`span`,{className:`text-xs font-medium text-ink/50`,children:e.count.toLocaleString()})]})},e.name))})]},e))})]})]})}export{f 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.