PageSourceSearch

https://www.theexploit.co/_next/static/immutable/chunks/3p6bb_ik0rdrd.js

js theexploit.co collected 2026-10-05 21:58:37 UTC 13,282 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},357046,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(793479),l=e.i(515288),i=e.i(555436),n=e.i(37727),c=e.i(531278);e.s(["default",0,function(){let e=(0,a.useRouter)(),d=(0,a.useSearchParams)().get("q")||"",[o,m]=(0,r.useState)(d),[u,x]=(0,r.useState)(!1),h=(0,r.useRef)(null),p=(0,r.useRef)(!1),f=(0,r.useRef)(d);return(0,r.useMemo)(()=>{p.current||d===f.current||(f.current=d,m(d))},[d]),(0,r.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,t.jsx)(l.Card,{variant:"elevated",className:"w-full !bg-white border-gray-200",children:(0,t.jsx)(l.CardContent,{className:"p-4 sm:p-6 md:p-8",children:(0,t.jsxs)("form",{onSubmit:t=>{if(t.preventDefault(),h.current&&clearTimeout(h.current),o.trim()){x(!0);let t=new URLSearchParams;t.set("q",o.trim()),e.push(`/search?${t.toString()}`,{scroll:!1}),setTimeout(()=>x(!1),300)}},className:"space-y-3 sm:space-y-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i.Search,{className:"absolute left-3 sm:left-4 top-1/2 -translate-y-1/2 w-4 sm:w-5 h-4 sm:h-5 text-muted-foreground"}),(0,t.jsx)(s.Input,{type:"text",placeholder:"Search articles...",value:o,onChange:t=>{let r=t.target.value;m(r),p.current||(h.current&&clearTimeout(h.current),r.trim()?(x(!0),h.current=setTimeout(()=>{let t=new URLSearchParams;t.set("q",r.trim()),e.push(`/search?${t.toString()}`,{scroll:!1}),setTimeout(()=>x(!1),300)},500)):(x(!1),e.push("/search",{scroll:!1})))},className:"pl-10 sm:pl-12 pr-10 sm:pr-12 h-12 sm:h-14 text-[16px] sm:text-lg border-2 focus-visible:ring-2 focus-visible:ring-primary/20 placeholder:text-sm sm:placeholder:text-base",autoFocus:!0}),o&&(0,t.jsx)("button",{type:"button",onClick:()=>{p.current=!0,h.current&&(clearTimeout(h.current),h.current=null),m(""),x(!1),e.push("/search",{scroll:!1}),setTimeout(()=>{p.current=!1},100)},className:"absolute right-2 sm:right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-2 rounded-full hover:bg-gray-100 active:bg-gray-200 min-h-[44px] min-w-[44px] flex items-center justify-center","aria-label":"Clear search",children:(0,t.jsx)(n.X,{className:"w-4 sm:w-5 h-4 sm:h-5"})})]}),u&&(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-center sm:justify-start",children:[(0,t.jsx)(c.Loader2,{className:"w-4 h-4 animate-spin text-primary"}),(0,t.jsx)("span",{className:"text-xs sm:text-sm text-muted-foreground",children:"Searching..."})]})]})})})}])},734182,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(522016),l=e.i(657688),i=e.i(721798);function n({article:e}){let[a,c]=(0,r.useState)(!1),d=(0,i.getOptimalQuality)("thumbnail");return(0,t.jsx)(s.default,{href:`/articles/${e.slug}`,className:"block group active:opacity-90 transition-opacity",children:(0,t.jsxs)("article",{className:"flex gap-3 sm:gap-4 md:gap-6 p-3 sm:p-4 md:p-6 hover:bg-gray-50/50 active:bg-gray-100/50 transition-all duration-200 min-h-[100px] sm:min-h-[120px] touch-manipulation",children:[(0,t.jsx)("div",{className:"relative w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32 flex-shrink-0 bg-gray-100 overflow-hidden rounded sm:rounded-md",children:e.featured_image&&!a?(0,t.jsx)(l.default,{src:e.featured_image,alt:e.title,fill:!0,sizes:"(max-width: 640px) 80px, (max-width: 768px) 96px, 128px",quality:d,loading:"lazy",placeholder:"blur",blurDataURL:i.BLUR_PLACEHOLDER_SQUARE,className:"object-cover group-hover:scale-105 transition-transform duration-500",onError:()=>c(!0)}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,t.jsx)("svg",{className:"w-6 sm:w-8 h-6 sm:h-8 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center space-y-1.5 sm:space-y-2 md:space-y-3 min-w-0",children:[(0,t.jsx)("div",{className:"text-[9px] sm:text-[10px] uppercase tracking-wider font-medium text-gray-500",children:e.category.replace(/-/g," ")}),(0,t.jsx)("h3",{className:"newspaper-headline text-base sm:text-lg md:text-xl lg:text-2xl leading-tight line-clamp-2 group-hover:text-primary active:text-primary transition-colors duration-200",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2.5 text-[11px] sm:text-xs md:text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.author}),(0,t.jsx)("span",{className:"text-gray-400 hidden sm:inline",children:"•"}),(0,t.jsx)("time",{className:"flex-shrink-0 text-gray-500 hidden sm:inline",children:new Date(e.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)("time",{className:"flex-shrink-0 text-gray-500 sm:hidden",children:new Date(e.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]})]})]})})}var c=e.i(515288),d=e.i(487486),o=e.i(531278),m=e.i(555436);e.s(["default",0,function(){let e=(0,a.useSearchParams)(),[s,l]=(0,r.useState)([]),[i,u]=(0,r.useState)(0),[x,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[y,b]=(0,r.useState)(null),[j,N]=(0,r.useState)(!0),[w,C]=(0,r.useState)(0),S=(0,r.useRef)(null),k=(0,r.useRef)(null),R=(0,r.useCallback)(async(e,t,r)=>{r?v(!0):f(!0),b(null);try{let a=new URLSearchParams;e&&a.set("q",e),a.set("limit","20"),a.set("offset",t.toString());let s=await fetch(`/api/articles/search?${a.toString()}`);if(!s.ok)throw Error("Failed to fetch search results");let i=await s.json();r?l(e=>[...e,...i.articles]):l(i.articles),u(i.count),h(i.query),N(t+i.articles.length<i.count),C(t+i.articles.length)}catch(e){console.error("Search results fetch error:",e),b("Could not load search results. Please try again.")}finally{f(!1),v(!1)}},[]);if((0,r.useEffect)(()=>{let t=e.get("q")||"";t!==k.current&&(k.current=t,l([]),C(0),N(!0),R(t,0,!1))},[e,R]),(0,r.useEffect)(()=>{let t=new IntersectionObserver(t=>{t[0].isIntersecting&&j&&!p&&!g&&R(e.get("q")||"",w,!0)},{threshold:.1}),r=S.current;return r&&t.observe(r),()=>{r&&t.unobserve(r)}},[j,p,g,w,e,R]),p&&0===s.length)return(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsxs)(c.CardContent,{className:"flex flex-col items-center justify-center py-16 space-y-4",children:[(0,t.jsx)(o.Loader2,{className:"w-12 h-12 animate-spin text-primary"}),(0,t.jsx)("p",{className:"text-muted-foreground text-lg",children:"Searching articles..."})]})});if(y)return(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-destructive/50",children:(0,t.jsxs)(c.CardContent,{className:"p-6 text-center",children:[(0,t.jsx)("p",{className:"text-destructive font-medium mb-2",children:"Error loading search results"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:y})]})});if(!x&&0===s.length&&!p)return(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsxs)(c.CardContent,{className:"text-center py-16",children:[(0,t.jsx)(m.Search,{className:"w-16 h-16 mx-auto mb-4 text-muted-foreground opacity-50"}),(0,t.jsx)("p",{className:"text-lg text-muted-foreground",children:"Enter a search term to find articles"})]})});let L=x&&x.trim(),T=s.length>0;
1return(0,t.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(T||!p&&!T&&L)&&(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsxs)(c.CardHeader,{className:"p-4 sm:p-6 pb-3 sm:pb-4",children:[(0,t.jsx)(c.CardTitle,{className:"text-xl sm:text-2xl md:text-3xl flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-3",children:T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Badge,{variant:"secondary",className:"text-sm sm:text-base px-2.5 sm:px-3 py-0.5 sm:py-1",children:i}),(0,t.jsxs)("span",{className:"text-lg sm:text-2xl md:text-3xl",children:[1===i?"Article":"Articles"," Found"]})]}):(0,t.jsx)("span",{className:"text-lg sm:text-2xl",children:"No articles found"})}),L&&(0,t.jsxs)(c.CardDescription,{className:"text-sm sm:text-base mt-2",children:["Search results for: ",(0,t.jsxs)("span",{className:"font-semibold text-foreground break-words",children:['"',x,'"']})]})]})}),T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"space-y-2 sm:space-y-3",children:s.map(e=>(0,t.jsx)(c.Card,{variant:"elevated",className:"overflow-hidden hover:shadow-xl hover:border-gray-300 active:shadow-lg transition-all duration-200 !bg-white border-gray-200",children:(0,t.jsx)(c.CardContent,{className:"p-0",children:(0,t.jsx)(n,{article:e})})},e.id))}),(0,t.jsxs)("div",{ref:S,className:"py-4",children:[g&&(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsxs)(c.CardContent,{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(o.Loader2,{className:"w-6 h-6 animate-spin text-primary mr-2"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading more articles..."})]})}),!j&&!g&&(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsx)(c.CardContent,{className:"text-center py-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["You've reached the end! Showing all ",i," articles."]})})})]})]}):!p&&L?(0,t.jsx)(c.Card,{variant:"elevated",className:"!bg-white border-gray-200",children:(0,t.jsxs)(c.CardContent,{className:"text-center py-12 sm:py-16 px-4 space-y-3 sm:space-y-4",children:[(0,t.jsx)("div",{className:"text-5xl sm:text-6xl mb-3 sm:mb-4",children:"🔍"}),(0,t.jsx)("h3",{className:"text-lg sm:text-xl font-bold",children:"No articles found"}),(0,t.jsxs)("p",{className:"text-sm sm:text-base text-muted-foreground max-w-md mx-auto px-4",children:["We couldn't find any articles matching \"",x,'". Try different keywords or check your spelling.']})]})}):null]})}],734182)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let s=(0,r.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r,...l}){return(0,t.jsx)("div",{className:(0,a.cn)(s({variant:r}),e),...l})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(225913),s=e.i(975157);let l=(0,a.cva)("rounded-lg border text-card-foreground transition-all duration-200",{variants:{variant:{default:"card-primary",elevated:"card-primary shadow-xl shadow-black/10 hover:shadow-2xl hover:shadow-black/15",interactive:"card-primary hover:shadow-xl hover:shadow-black/20 hover:border-primary/20 cursor-pointer","glass-subtle":"bg-white/5 dark:bg-white/3 backdrop-blur-md border border-white/10 hover:bg-white/8 hover:border-white/15 hover:shadow-lg hover:shadow-white/10"}},defaultVariants:{variant:"default"}}),i=r.forwardRef(({className:e,variant:r,...a},i)=>(0,t.jsx)("div",{ref:i,className:(0,s.cn)(l({variant:r}),e),...a}));i.displayName="Card";let n=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",e),...r}));
1n.displayName="CardHeader";let c=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("text-2xl font-semibold leading-none tracking-tight",e),...r}));c.displayName="CardTitle";let d=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("text-sm text-muted-foreground",e),...r}));d.displayName="CardDescription";let o=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("p-6 pt-0",e),...r}));o.displayName="CardContent",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,className:(0,s.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",0,i,"CardContent",0,o,"CardDescription",0,d,"CardHeader",0,n,"CardTitle",0,c])},793479,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(975157);let s=r.forwardRef(({className:e,type:r,...s},l)=>(0,t.jsx)("input",{suppressHydrationWarning:!0,type:r,className:(0,a.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base text-foreground ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:l,...s}));s.displayName="Input",e.s(["Input",0,s])}]);

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.