PageSourceSearch

https://thechedet.com/_assets/speeches-BmLPsfUV.js

js thechedet.com collected 2026-10-02 21:03:47 UTC 3,271 bytes, 1 lines download raw bytes

1import{r as o,j as e,L as x}from"./vendor-CBIzrWAs.js";import{a as f,b as j,m as v,S as _}from"./index-DsibisN4.js";import{B as N}from"./Badge-DGBRJnuc.js";import{P as S,a as y,b as r,c as k,d as P}from"./Pagination-DWT39WvM.js";const T="_container_1lcdp_1",C="_header_1lcdp_8",L="_title_1lcdp_13",w="_subtitle_1lcdp_21",B="_tabsRow_1lcdp_27",I="_tabBtn_1lcdp_49",R="_activeTab_1lcdp_68",D="_grid_1lcdp_78",M="_card_1lcdp_96",A="_badge_1lcdp_112",E="_cardTitle_1lcdp_119",F="_cardMeta_1lcdp_128",$="_cardSkeleton_1lcdp_138",G="_pagination_1lcdp_144",O="_pageInfo_1lcdp_148",U="_emptyState_1lcdp_154",q="_disabledLink_1lcdp_163",t={container:T,header:C,title:L,subtitle:w,tabsRow:B,tabBtn:I,activeTab:R,grid:D,card:M,badge:A,cardTitle:E,cardMeta:F,cardSkeleton:$,pagination:G,pageInfo:O,emptyState:U,disabledLink:q},z=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"});function V(){const[i,c]=o.useState(1),[d,h]=o.useState("_all"),{language:m}=f(),s=j(),p=[{value:"_all",label:s("speeches.allSpeeches")},{value:"domestic_affairs",label:s("speeches.domesticAffairs")},{value:"international_affairs",label:s("speeches.internationalAffairs")},{value:"economic_development",label:s("speeches.economicDevelopment")},{value:"education",label:s("speeches.education")},{value:"leadership",label:s("speeches.leadership")}];o.useEffect(()=>{c(1)},[m]);const{data:l,isLoading:g}=v({page:i,limit:12,category:d!=="_all"?d:void 0,language:m,admin:!1}),b=a=>{h(a),c(1)},u=a=>p.find(n=>n.value===a)?.label||a;return e.jsxs("div",{className:t.container,children:[e.jsxs("div",{className:t.header,children:[e.jsx("h1",{className:t.title,children:s("speeches.title")}),e.jsx("p",{className:t.subtitle,children:s("speeches.subtitle")})]}),e.jsx("div",{className:t.tabsRow,children:p.map(a=>e.jsx("button",{className:`${t.tabBtn} ${d===a.value?t.activeTab:""}`,onClick:()=>
1b(a.value),children:a.label},a.value))}),e.jsx("main",{className:t.main,children:g?e.jsx("div",{className:t.grid,children:Array.from({length:6}).map((a,n)=>e.jsxs("div",{className:t.cardSkeleton,children:[e.jsx(_,{style:{height:"24px",width:"90%",marginBottom:"1rem"}}),e.jsx(_,{style:{height:"14px",width:"40%"}})]},n))}):l?.items&&l.items.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:t.grid,children:l.items.map(a=>e.jsxs(x,{to:`/speeches/${a.slug}`,className:t.card,children:[e.jsx(N,{variant:"outline",className:t.badge,children:u(a.speechCategory)}),e.jsx("h2",{className:t.cardTitle,children:a.title}),e.jsx("div",{className:t.cardMeta,children:z.format(new Date(a.publishDate||a.createdAt))})]},a.id))}),l.totalPages>1&&e.jsx(S,{className:t.pagination,children:e.jsxs(y,{children:[e.jsx(r,{children:e.jsx(k,{href:"#",onClick:a=>{a.preventDefault(),c(n=>Math.max(1,n-1))},"aria-disabled":i===1,className:i===1?t.disabledLink:""})}),e.jsx(r,{children:e.jsxs("span",{className:t.pageInfo,children:[s("common.page")," ",i," ",s("common.of")," ",l.totalPages]})}),e.jsx(r,{children:e.jsx(P,{href:"#",onClick:a=>{a.preventDefault(),c(n=>Math.min(l.totalPages,n+1))},"aria-disabled":i===l.totalPages,className:i===l.totalPages?t.disabledLink:""})})]})})]}):e.jsx("div",{className:t.emptyState,children:e.jsx("p",{children:s("speeches.noResults")})})})]})}export{V 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.