PageSourceSearch

https://oilnow.gy/assets/category-K59m5ilg.js

js oilnow.gy collected 2026-10-02 07:42:28 UTC 11,403 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./vendor-clerk-CW4_2MMl.js";import{a1 as U,a4 as K,h as P,a5 as R,$ as D,d as G,y as Q}from"./index-BvRH0Ky1.js";import{S as u,A as I}from"./site-footer-mhDU5e8Y.js";import{P as $}from"./page-heading-BWg4Gum1.js";import{A as H}from"./site-footer-BZ-gNZJi.js";import{S as d}from"./skeleton-DqQ_WJ0a.js";import{A as h}from"./ad-slot-DTUTqZI2.js";import{A as S}from"./article-image-BIRcQYKY.js";import{P as _}from"./pagination-bar-mjUb1PE-.js";import{a as g}from"./article-url-_HFmwpam.js";import{C as Z}from"./category-sidebar-Dx5lwjR8.js";import{B as J}from"./bookmark-button-CC8_FE-C.js";import{F as O}from"./follow-button-BL5nzWjX.js";import{A as V}from"./author-hover-card-DqFOd8lT.js";import{A as E}from"./article-byline-B84qJlUL.js";import{M as W}from"./message-square-B3kbpL74.js";import{f as X}from"./format-B2Tbf7Yc.js";import"./vendor-editor-Cu-Vhp5u.js";import"./vendor-charts-r3Sr4R8y.js";import"./logo-dark-_3Afpb0J.js";import"./search-CUHT-bWd.js";import"./dropdown-menu-CbgVRjno.js";import"./index-BEA706Du.js";import"./Combination-B4XLLUBl.js";import"./index-Cxsgncl7.js";import"./chevron-right-FjOxgymW.js";import"./check-DDxpiGSP.js";import"./confirm-dialog-eyEDlxN3.js";import"./dialog-BMssFU_6.js";import"./index-DyZ7x75t.js";import"./users-DfQNQnqB.js";import"./file-text-cvCviHf6.js";import"./image-O8ZNEwDR.js";import"./calendar-days-C7AwDUQi.js";import"./mail-CucW84DZ.js";import"./settings-D2K8S7Ub.js";import"./link-2-BogqTHAA.js";import"./trash-2-C_NL6wxH.js";import"./pencil-0wS7JCcZ.js";import"./user-DPk6VhoE.js";import"./clock-BaSqeJln.js";import"./radio-D1L4sgf3.js";import"./media-image-OTCHyz1L.js";import"./camera-BO6oH9sP.js";import"./trending-up-DIDfHaWA.js";import"./trending-down-CCAod8kg.js";import"./bookmarks-D7jzdxr6.js";import"./follows-BrnNe3fc.js";import"./author-url-CxjT1ljy.js";import"./en-US-SgDV8MQn.js";function M({label:s}){return e.jsxs("span",{className:"inline-flex items-center gap-1.5 leading-none",children:[e.jsx("span",{className:"block w-[3px] h-[11px] bg-accent flex-shrink-0"}),e.jsx("span",{className:"font-mono text-[10px] font-bold uppercase tracking-widest text-foreground",children:s})]})}function N({article:s,featured:r=!1}){const p=s.featuredImage?.url,a=s.publishedAt?X(new Date(s.publishedAt),"MMM d, yyyy"):"",c=D(),i=x.useRef(null);function n(){s.slug&&(i.current=setTimeout(()=>{c.prefetchQuery({queryKey:["article-by-slug",s.slug],queryFn:async({signal:f})=>{const t=await fetch(`/api/articles/by-slug/${encodeURIComponent(s.slug)}`,{signal:f});if(t.status===404)return null;if(!t.ok)throw new Error(`Failed to prefetch article: ${t.status}`);return t.json()},staleTime:5*6e4})},150))}function l(){i.current!==null&&(clearTimeout(i.current),i.current=null)}return r?e.jsxs("div",{className:G("group flex flex-col lg:flex-row gap-6 pb-8 mb-8 border-b border-border"),onMouseEnter:n,onMouseLeave:l,onFocus:n,onBlur:l,children:[e.jsx("a",{href:g(s),className:"lg:w-[55%] aspect-[16/10] overflow-hidden bg-muted rounded-xl flex-shrink-0 block",children:e.jsx(S,{id:s.id,url:p,publicId:s.featuredImage?.publicId,alt:s.title,width:1400,sizes:"(max-width: 1024px) 100vw, 55vw",className:"w-full h-full object-cover group-hover:scale-[1.03] transition-transform duration-700"})}),e.jsxs("div",{className:"flex flex-col justify-center min-w-0",children:[s.categories?.[0]&&e.jsx("div",{className:"mb-3",children:e.jsx(M,{label:s.categories[0].name})}),e.jsx("a",{href:g(s),className:"block",children:e.jsx("h2",{className:"font-display font-semibold text-[22px] sm:text-[26px] leading-[1.2] group-hover:underline decoration-accent decoration-[3px] underline-offset-[4px] mb-3",children:s.title})}),s.excerpt&&e.jsx("p",{className:"font-editorial-body text-[14px] text-muted-foreground leading-relaxed line-clamp-3 mb-4",children:s.excerpt}),e.jsxs("div",{className:"flex items-center gap-3 mt-auto flex-wrap",children:[s.author?.name&&e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(V,{slug:s.author.slug,authorId:s.author.id,name:s.author.name,children:e.jsx("span",{className:"inline-flex items-center justify-center w-5 h-5 rounded-full bg-muted font-display font-bold text-[9px] text-muted-foreground select-none cursor-pointer",children:s.author.name.trim().charAt(0).toUpperCase()})}),e.jsx(E,{authors:s.authors,author:s.author,authorId:s.authorId,className:"text-muted-foreground"})]}),a&&e.jsxs("span",{className:"font-display text-[11px] text-muted-foreground uppercase tracking-wider",children:["· ",a]})]})]})]}):e.jsxs("div",{className:"group flex gap-5 py-5 items-start border-b border-border last:border-0",onMouseEnter:n,onMouseLeave:l,onFocus:n,onBlur:l,children:[e.jsx("a",{href:g(s),className:"block w-[100px] sm:w-[120px] flex-shrink-0 aspect-square overflow-hidden bg-muted rounded-lg",children:e.jsx(S,{id:s.id,url:p,publicId:s.featuredImage?.publicId,alt:s.title,width:260,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("a",{href:g(s),className:"block",children:e.jsx("h3",{className:"font-display font-semibold text-[16px] sm:text-[17px] leading-[1.3] group-hover:underline decoration-accent decoration-[3px] underline-offset-[4px] mb-2",children:s.title})}),s.excerpt&&e.jsx("p",{className:"font-editorial-body text-[13px] text-muted-foreground leading-relaxed line-clamp-2 mb-2",children:s.excerpt}),e.jsxs("div",{className:"flex items-center gap-2 font-display text-[11px] text-muted-foreground uppercase tracking-wider flex-wrap",children:[s.categories?.[0]&&e.jsxs(e.Fragment,{children:[e.jsx(M,{label:s.categories[0].name}),(s.author?.name||a)&&e.jsx("span",{children:"·"})]}),e.jsx(E,{authors:s.authors,author:s.author,authorId:s.authorId}),(s.authors?.length||s.author?.name)&&a&&e.jsx("span",{children:"·"}),a&&e.jsx("span",{children:a}),s.commentCount!=null&&s.commentCount>0&&e.jsxs("span",{className:"flex items-center gap-0.5",children:[e.jsx(W,{size:10}),s.commentCount]})]})]}),e.jsx(J,{articleId:s.id,size:14,className:"flex-shrink-0 self-center opacity-0 group-hover:opacity-100 transition-opacity"})]})}const m=16;function Ve({slugOverride:s,allPublished:r=!1}={}){const{slug:p}=U(),a=r?void 0:s??p,[c,i]=x.useState(1),{data:n,isError:l,refetch:f}=K(),t=x.useMemo(()=>(n??[]).find(o=>o.slug===a),[n,a]),v=r?{status:"published",sortBy:"publishedAt",page:c,pageSize:m}
1:t?{categoryId:t.id,status:"published",sortBy:"publishedAt",page:c,pageSize:m}:void 0,{data:j,isLoading:B,isError:L,refetch:T}=P(v,{query:{enabled:r||!!t,queryKey:Q(v)}}),b=x.useMemo(()=>j?.items??[],[j]),w=j?.total??0,k=Math.max(1,Math.ceil(w/m)),y=b.slice(0,m/2),A=b.slice(m/2);x.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[a,c]),x.useEffect(()=>{i(1)},[a]);function F(o){i(o)}if(B||!r&&!!!n&&!l)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(u,{}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 pt-8",children:[e.jsx(d,{className:"h-[90px] w-full mb-10"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10",children:[e.jsx("div",{className:"lg:col-span-8 space-y-6",children:[...Array(4)].map((o,q)=>e.jsxs("div",{className:"flex gap-5",children:[e.jsx(d,{className:"h-24 w-28 flex-shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(d,{className:"h-5 w-3/4"}),e.jsx(d,{className:"h-4 w-full"}),e.jsx(d,{className:"h-4 w-1/2"})]})]},q))}),e.jsx("div",{className:"lg:col-span-4",children:e.jsx(d,{className:"h-[300px] w-full"})})]})]})]});if(!r&&l||L)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(u,{}),e.jsxs("main",{className:"mx-auto max-w-3xl px-6 py-32 text-center",children:[e.jsx("p",{className:"font-display text-xl font-semibold",children:"This page could not be loaded."}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Please check your connection and try again."}),e.jsx("button",{onClick:()=>{f(),T()},className:"mt-6 rounded-lg bg-accent px-5 py-2.5 text-xs font-display font-medium uppercase tracking-widest text-accent-foreground",children:"Try again"})]})]});if(!r&&!t)return e.jsx("div",{className:"min-h-screen bg-muted",children:e.jsxs("div",{className:"min-h-screen bg-background text-foreground max-w-[1440px] mx-auto border-x border-border shadow-xl",children:[e.jsx(u,{}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-32 text-center text-muted-foreground",children:[e.jsx("p",{className:"text-xl font-display font-semibold",children:"Category not found."}),e.jsxs("a",{href:"/",className:"mt-6 inline-flex items-center gap-2 font-display font-semibold text-[12px] uppercase tracking-widest text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(I,{size:14,className:"rotate-180"})," Back to homepage"]})]})]})});const C=r?"Updates":t.slug==="client-content"?"Sponsored Content":t.slug==="news"?"Updates":t.name,z=r?"Every published article from across Guyana, Suriname, the Caribbean, South America, and global energy markets.":t.description??(t.slug==="news"?"The latest energy news from Guyana, Suriname, and across the Caribbean.":void 0);return e.jsxs("div",{className:"min-h-screen bg-muted",children:[e.jsx(R,{title:C}),e.jsxs("div",{className:"min-h-screen bg-background text-foreground font-editorial-body max-w-[1440px] mx-auto border-x border-border shadow-xl",children:[e.jsx(u,{}),e.jsx("div",{className:"border-b border-border bg-background",children:e.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-10",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx($,{title:C,description:z}),!r&&t.slug!=="news"&&e.jsx("div",{className:"flex-shrink-0 pt-2",children:e.jsx(O,{type:"topic",slug:t.slug,label:t.name})})]})})}),e.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 pt-8",children:e.jsx(h,{variant:"banner",slot:"category-leaderboard-top",hideIfEmpty:!0})}),e.jsx("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-10",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 xl:gap-12",children:[e.jsxs("main",{className:"lg:col-span-8",children:[b.length===0?e.jsxs("div",{className:"py-20 text-center text-muted-foreground",children:[e.jsx("p",{className:"font-display text-[16px]",children:r?"No published articles yet.":"No articles in this category yet."}),e.jsxs("a",{href:"/",className:"mt-4 inline-flex items-center gap-1.5 font-display font-semibold text-[11px] uppercase tracking-widest text-muted-foreground hover:text-foreground transition-colors",children:["Back to homepage ",e.jsx(I,{size:12})]})]}):e.jsxs(e.Fragment,{children:[y[0]&&e.jsx(N,{article:y[0],featured:!0}),e.jsx("div",{children:y.slice(1).map(o=>e.jsx(N,{article:o},o.id))}),A.length>0&&e.jsx("div",{className:"my-10",children:e.jsx(h,{variant:"banner",slot:"category-banner-1",hideIfEmpty:!0})}),e.jsx("div",{children:A.map(o=>e.jsx(N,{article:o},o.id))})]}),k>1&&e.jsx("div",{className:"mt-8",children:e.jsx(_,{page:c,totalPages:k,onPageChange:F,total:w,pageSize:m,itemLabel:"articles"})})]}),e.jsxs("aside",{className:"lg:col-span-4 flex flex-col gap-8",children:[e.jsx(h,{variant:"block",slot:"category-rail-right",hideIfEmpty:!0}),e.jsx(h,{variant:"block",slot:"category-rail-mid",hideIfEmpty:!0}),e.jsx(Z,{trending:r||t.slug==="news"})]})]})}),e.jsx(H,{})]})]})}export{Ve 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.