1import{j as e,a as m}from"./external-link-DKgZU8z4.js";import{L as z,b as je,r as l,R as Ne}from"./vendor-react-BpBRECMi.js";import{s as ve,x as E,a6 as Ce,a7 as ke,_ as ce,y as W,a8 as le}from"./main-cKcwwXp3.js";import{u as Se}from"./useModuleToggles-C3XZ286Q.js";import{C as De}from"./ChatbotWidget-DOv8Akzs.js";import{P as Le}from"./PublicPageHeader-BgbvD0Kh.js";import{a as $e}from"./useVisitorAnalytics-CbrG3Cuo.js";import{H as qe}from"./HubFooter-vGfWMyWv.js";import{u as Ae}from"./TranslationContext-DyOPlQY4.js";import{S as j}from"./StylableRegion-pyDL5ubz.js";import{u as Ie,l as Pe}from"./useListingCustomCss-DDO9U7VI.js";import{n as H}from"./aucyberUrls-OVJUzDq6.js";import{a as Re}from"./format-Dw1NbiNr.js";import{C as O}from"./calendar-BW2-KD5X.js";import{N as Te}from"./newspaper-DyKwNzMf.js";import{S as Me}from"./search-CJysPhEv.js";import{F as Fe}from"./file-text-BW0CVo52.js";import"./vendor-supabase-CWiu_0Sd.js";import"./client-DF_nHXpp.js";import"./consent-C4o_3IrG.js";import"./circle-check-BIASu7qA.js";import"./digitalExperienceModules-BmzCcGKj.js";import"./accessibility-D_Dc9qHX.js";import"./briefcase-CptV_AS7.js";import"./gavel-zKC-77Dj.js";import"./book-open-COiRnr3X.js";import"./map-pin-CVkQla9j.js";import"./star-CzQMex3v.js";import"./calendar-clock-3DROjXoz.js";import"./ticket-DOPIPmxr.js";import"./presentation-BPif_6y7.js";import"./chatbotTheme-CmNChkLE.js";import"./colorContrast-BuMhf7ql.js";import"./pageContext-B9rz8_G8.js";import"./featuredBlocks-CAPe9G0s.js";import"./chatI18n-DNrNrwd7.js";import"./calendar-check-2-DqcEhIDC.js";import"./users-B9Ba2VrB.js";import"./browser-Ryf5FBUt.js";import"./folder-open-ViS7XxUi.js";import"./chevron-right-DHBxVDDw.js";import"./chevron-left-lmDZqDgO.js";import"./message-square-DGJo-DI0.js";import"./loader-circle-CSKdgg2A.js";import"./arrow-down-BB56QOAK.js";import"./lock-keyhole-WbQ8NvJp.js";import"./send-r3uP2EJ9.js";import"./party-popper-DzRpTr1i.js";import"./calendar-days-D4KqLecV.js";import"./megaphone-B8X4B1yn.js";import"./sparkles-DMwEyNRQ.js";import"./thumbs-up-BccJDyT2.js";import"./thumbs-down-vsal5GUf.js";import"./copy-vGWMgn6y.js";import"./arrow-right-nILsib9v.js";import"./StageShape-BIyOkZS9.js";import"./armchair-DKbOon0y.js";import"./zoom-in-DdpwrxA1.js";import"./zoom-out-DhMft_Fv.js";import"./maximize-2-BX-zPx_U.js";import"./phone-call-8f7x_ohP.js";import"./shield-check-xEcld4-3.js";import"./livechat-intake-BUAfMQV5.js";import"./phone-off-CfzpuH4u.js";import"./headset-CEVkrzl0.js";import"./mail-B7fKYEbq.js";import"./rotate-ccw-CcN2RCTN.js";import"./minimize-2-B9pG0f2U.js";import"./minus-B5bEapBN.js";import"./useResidentAuthSafe-CZaIJ_Ct.js";import"./useResidentDashboardSettings-Cgkd1IuR.js";import"./NotificationBell-Bn0QbKEW.js";import"./usePushNotifications-DJLD8jZx.js";import"./conferenceAuthClient-CLjctj6T.js";import"./bell-ring-DLN3Mpej.js";import"./bell-off-Blo8bkXb.js";import"./bell-D2NaqWeN.js";import"./globe-C-ERAOjg.js";import"./index-BT8k09yG.js";import"./OrgBannerItem-By2Nu4aN.js";import"./security-DEBt3W5X.js";import"./purify.es-BPuvlvQ_.js";import"./OrgBannerRegion-BBfQLgHi.js";import"./usePublicSiteTargets-CpIKJIDP.js";import"./eye-CHYl_NVm.js";import"./link-Cot1q64P.js";import"./type-Bnx3EH-w.js";import"./youtube-PKZ9BUv9.js";import"./pause-Yz0-JyVJ.js";import"./mouse-pointer-2-W1TeU-Iz.js";import"./align-left-7Ft1V-WZ.js";import"./menu-BtporcsX.js";import"./user-D5G-KCpF.js";import"./log-in-ClDcRDFD.js";import"./linkedin-DgXOeECT.js";import"./instagram-CDeT7Mxi.js";import"./facebook-Bb_1Cm-t.js";import"./trackingTags-BmNZ9zsE.js";import"./storyEngagement-eNHYakEe.js";import"./phone-COs7uhUK.js";const J={news:"News",media_release:"Media Release"},de=t=>new Date(t).toLocaleDateString("en-AU",{day:"numeric",month:"long",year:"numeric"}),Ee=({councilName:t,website:i,hubSettings:a})=>e.jsx(qe,{footerConfig:a?.footer_config,footerLinks:a?.footer_links,councilName:t||"Council",councilWebsite:i||void 0,primaryColor:a?.primary_color,customCss:a?.custom_footer_css}),me=({article:t,linkTo:i,accentColor:a,showDate:g,showType:d,showImage:u})=>e.jsxs(z,{to:i,"data-css-target":"card",className:"group bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm hover:shadow-md hover:border-gray-300 transition-all flex flex-col",children:[u&&t.featured_image_url&&e.jsx("div",{"data-css-target":"card-image",className:"aspect-[16/9] overflow-hidden bg-gray-100",children:e.jsx("img",{src:H(t.featured_image_url),alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),e.jsxs("div",{className:"p-5 flex flex-col flex-grow",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[d&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-semibold uppercase tracking-wide px-2 py-0.5 rounded-full",style:{backgroundColor:`${a}15`,color:a},children:J[t.article_type]||"News"}),t.category&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-semibold uppercase tracking-wide px-2 py-0.5 rounded-full text-white",style:{backgroundColor:t.category.color},children:t.category.name})]}),e.jsx("h3",{"data-css-target":"card-title",className:"text-lg font-semibold text-gray-900 group-hover:text-civic-700 transition-colors mb-2 line-clamp-2",children:t.title}),t.summary&&e.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 mb-3 flex-grow",children:t.summary}),g&&t.published_at&&e.jsxs("div",{"data-css-target":"publish-date",className:"flex items-center gap-1.5 text-xs text-gray-500 mt-auto pt-2",children:[e.jsx(O,{className:"w-3.5 h-3.5"}),Re(t.published_at)]})]})]}),ze=({article:t,linkTo:i,accentColor:a,showDate:g,showType:d,showImage:u})=>e.jsxs(z,{to:i,"data-css-target":"card",className:"group bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm hover:shadow-md hover:border-gray-300 transition-all flex flex-col sm:flex-row",children:[u&&t.featured_image_url&&e.jsx("div",{"data-css-target":"card-image",className:"sm:w-56 sm:min-h-[140px] aspect-[16/9] sm:aspect-auto overflow-hidden bg-gray-100 flex-shrink-0",children:e.jsx("img",{src:H(t.featured_image_url),alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),e.jsxs("div",{className:"p-5 flex flex-col flex-grow",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[d&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-semibold uppercase tracking-wide px-2 py-0.5 rounded-full",style:{backgroundColor:`${a}15`,color:a},children:J[t.article_type]||"News"}),t.category&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-semibold uppercase tracking-wide px-2 py-0.5 rounded-full text-white",style:{backgroundColor:t.category.color},children:t.category.name})]}),e.jsx("h3",{"data-css-target":"card-title",className:"text-lg font-semibold text-gray-900 group-hover:text-civic-700 transition-colors mb-1 line-clamp-2",children:t.title}),t.summary&&e.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 mb-2",children:t.summary}),g&&t.published_at&&e.jsxs("div",{"data-css-target":"publish-date",className:"flex items-center gap-1.5 text-xs text-gray-500 mt-auto pt-1",children:[e.jsx(O,{className:"w-3.5 h-3.5"}),de(t.published_at)]})]})]}),ne=({article:t,linkTo:i,accentColor:a,showDate:g,showType:d,showImage:u,isFeatured:N})=>N?e.jsxs(z,{to:i,"data-css-target":"card",className:"group relative bg-white rounded-2xl border border-gray-200 overflow-hidden shadow-sm hover:shadow-lg transition-all",children:[u&&t.featured_image_url&&e.jsx("div",{"data-css-target":"card-image",className:"aspect-[21/9] overflow-hidden bg-gray-100",children:e.jsx("img",{src:H(t.featured_image_url),alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),e.jsxs("div",{className:"p-6 sm:p-8",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[d&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-bold uppercase tracking-wide px-3 py-1 rounded-full",style:{backgroundColor:`${a}15`,color:a},children:J[t.article_type]||"News"}),t.category&&e.jsx("span",{"data-css-target":"card-badge",className:"text-xs font-bold uppercase tracking-wide px-3 py-1 rounded-full text-white",style:{backgroundColor:t.category.color},children:t.category.name})]}),e.jsx("h3",{"data-css-target":"card-title",className:"text-2xl sm:text-3xl font-bold text-gray-900 group-hover:text-civic-700 transition-colors mb-3",children:t.title}),t.summary&&e.jsx("p",{className:"text-base text-gray-600 line-clamp-3 mb-3 max-w-3xl",children:t.summary}),g&&t.published_at&&e.jsxs("div",{"data-css-target":"publish-date",className:"flex items-center gap-1.5 text-sm text-gray-500",children:[e.jsx(O,{className:"w-4 h-4"}),de(t.published_at)]})]})]}):e.jsx(me,{article:t,linkTo:i,accentColor:a,showDate:g,showType:d,showImage:u}),Ps=()=>{const{councilSlug:t}=je(),{isCustomDomain:i,customDomainCouncil:a,customDomainSite:g}=ve(),d=g?.id??null,{setCouncilId:u,loadTranslationsForList:N,getTranslation:D,isDefaultLanguage:v}=Ae(),q=i?a?.id?`newsListing:dom:${a.id}`:null:t?`newsListing:slug:${t}`:null,x=q?E(q):null,[b,L]=l.useState(!x),[A,C]=l.useState(null),[o,ue]=l.useState(x?.council??null),ge=Se(o?.id,"news_media"),[n,pe]=l.useState(x?.settings??null),[G,xe]=l.useState(x?.hubSettings??null),[k,he]=l.useState(x?.articles??[]),[K,fe]=l.useState(x?.categories??[]),[w,ye]=l.useState(""),[p,X]=l.useState(null),[_,I]=l.useState(1);$e({councilId:o?.id,pageType:"news_media",pageId:o?.id?`listing-${o.id}`:void 0,pageName:o?.name?`${o.name} - News & Media`:"News & Media",enabled:!b&&!!o}),l.useEffect(()=>{(async()=>{x||L(!0),C(null);try{let r,c=null;if(i&&a){r=a.id;const{data:h}=await m.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("id",a.id).single();h&&(c=h)}else if(t){const{data:h}=await m.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("slug",t).single();h&&(r=h.id,c=h)}if(!r||!c){C("Council not found"),L(!1);return}ue(c);const[S,Q,be,we]=await Promise.all([m.from("news_media_settings").select("*").eq("council_id",r).maybeSingle(),m.from("organization_hub_settings").select("custom_menu_links, footer_links, footer_config, primary_color, hide_council_name, use_portal_menu, header_layout, italia_header_config, custom_header_css, secondary_header_enabled, secondary_header_bg_color, secondary_header_text_color, secondary_header_links").eq("council_id",r).is("site_id",null).eq("enabled",!0).maybeSingle(),m.from("news_media_categories").select("*").eq("council_id",r).eq("is_published",!0).order("display_order"),ce(m.from("news_media_articles").select(` 2 *, 3 category:news_media_categories(name, color) 4 `).eq("council_id",r).eq("status","published").order("published_at",{ascending:!1}),d)]),V=S.data??null;V&&pe(V);const ae=Q.data;xe(ae);const re=be.data||[];fe(re);const _e=new Date,ie=(we.data||[]).filter(h=>!(h.expires_at&&new Date(h.expires_at)<_e));he(ie);const oe=i?`newsListing:dom:${r}`:t?`newsListing:slug:${t}`:null;oe&&W(oe,{council:c,settings:V,hubSettings:ae,articles:ie,categories:re})}catch(r){console.error("Error loading news media listing:",r),C(r.message||"Failed to load news & media")}finally{L(!1)}})()},[i,a,d,t]),l.useEffect(()=>{o?.id&&u(o.id)},[o?.id,u]),l.useEffect(()=>{k.length>0&&!v&&N("news_article",k.map(s=>s.id))},[k,v,N]);const Y=l.useMemo(()=>v?k:k.map(s=>({...s,title:D("news_article",s.id,"title",s.title),summary:s.summary?D("news_article",s.id,"summary",s.summary):s.summary})),[k,v,D]),Z=l.useMemo(()=>{let s=Y;if(p&&(s=s.filter(r=>r.category_id===p)),w.trim()){const r=w.toLowerCase();s=s.filter(c=>c.title.toLowerCase().includes(r)||c.summary&&c.summary.toLowerCase().includes(r)||c.tags&&c.tags.some(S=>S.toLowerCase().includes(r)))}return s},[Y,p,w]),U=n?.articles_per_page||12,$=Math.ceil(Z.length/U),f=Z.slice((_-1)*U,_*U);l.useEffect(()=>{I(1)},[w,p]);const y=n?.accent_color||G?.primary_color||o?.primary_color||"#3B82F6",B=n?.layout||"grid";Ie("news_media",o?.id,B);const P=n?.show_article_dates!==!1,R=n?.show_article_types!==!1,T=n?.show_featured_image!==!1,ee=n?.show_search!==!1,te=n?.show_category_filter!==!1,se=n?.page_title||"News & Media",M=n?.page_description||null,F=s=>{const r=s.slug||s.id;return i?`/news/${r}`:t?`/${t}
4/news/${r}`:`/news/${r}`};return ge.blocked?e.jsx(Ce,{}):!b&&(A||!o)?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(Te,{className:"w-8 h-8 text-red-600"})}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"News & Media Unavailable"}),e.jsx("p",{className:"text-gray-600 mb-6",children:A||"Unable to load news & media."}),e.jsx(z,{to:"/",className:"inline-flex items-center gap-2 px-4 py-2 bg-civic-600 text-white rounded-lg hover:bg-civic-700",children:"Return home"})]})}):e.jsxs("div",{className:`min-h-screen bg-gray-50 flex flex-col ${Pe("news_media")}`,children:[o&&e.jsx(Le,{councilId:o.id,council:o,hubSettings:G}),b?e.jsx("section",{className:"bg-gray-200 animate-pulse",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[e.jsx("div",{className:"h-10 w-64 bg-gray-300 rounded mb-3"}),e.jsx("div",{className:"h-5 w-96 max-w-full bg-gray-300 rounded"})]})}):n?.hero_image_url?e.jsxs(j,{as:"section",target:"hero",className:"relative overflow-hidden bg-cover bg-center min-h-[260px] md:min-h-[340px] flex items-end",style:{backgroundImage:`linear-gradient(135deg, ${y}dd 0%, #0f172add 100%), url(${H(n.hero_image_url)})`,backgroundSize:"cover",backgroundPosition:"center"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/30 to-black/10"}),e.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10 w-full",children:[e.jsx("h1",{className:"text-3xl md:text-5xl font-bold text-white drop-shadow-lg mb-2",children:n.hero_heading||se}),(n.hero_description||M)&&e.jsx("p",{className:"text-lg text-white/85 max-w-2xl",children:n.hero_description||M})]})]}):e.jsx(j,{as:"section",target:"hero",style:{backgroundColor:y},children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-white mb-2",children:se}),M&&e.jsx("p",{className:"text-lg text-white/85 max-w-2xl",children:M})]})}),!b&&(ee||te&&K.length>0)&&e.jsx("div",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[ee&&e.jsxs("div",{className:"relative flex-grow w-full sm:max-w-sm",children:[e.jsx(Me,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",value:w,onChange:s=>ye(s.target.value),placeholder:"Search articles...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-civic-500 focus:border-civic-500"})]}),te&&K.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>X(null),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition ${p===null?"text-white border-transparent":"text-gray-600 border-gray-300 hover:border-gray-400 bg-white"}`,style:p===null?{backgroundColor:y}:void 0,children:"All"}),K.map(s=>e.jsx("button",{type:"button",onClick:()=>X(s.id),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition ${p===s.id?"text-white border-transparent":"text-gray-600 border-gray-300 hover:border-gray-400 bg-white"}`,style:p===s.id?{backgroundColor:s.color}:void 0,children:s.name},s.id))]})]})})}),e.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 flex-grow w-full",children:b?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden shadow-sm animate-pulse",children:[e.jsx("div",{className:"aspect-[16/9] bg-gray-200"}),e.jsxs("div",{className:"p-5 space-y-3",children:[e.jsx("div",{className:"h-3 w-16 bg-gray-200 rounded-full"}),e.jsx("div",{className:"h-5 w-3/4 bg-gray-200 rounded"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-3 w-full bg-gray-100 rounded"}),e.jsx("div",{className:"h-3 w-2/3 bg-gray-100 rounded"})]}),e.jsx("div",{className:"h-3 w-24 bg-gray-100 rounded"})]})]},r))}):f.length===0?e.jsxs(j,{target:"empty-state",className:"text-center py-16",children:[e.jsx(Fe,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),e.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-2",children:w||p?"No articles match your search":"No articles published yet"}),e.jsx("p",{className:"text-gray-500",children:w||p?"Try adjusting your search or filter criteria.":"Check back soon for the latest news and media releases."})]}):e.jsxs("div",{children:[B==="magazine"?e.jsxs(j,{target:"list-container",className:"space-y-6",children:[f.length>0&&e.jsx(ne,{article:f[0],linkTo:F(f[0]),accentColor:y,showDate:P,showType:R,showImage:T,isFeatured:!0}),f.length>1&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:f.slice(1).map(s=>e.jsx(ne,{article:s,linkTo:F(s),accentColor:y,showDate:P,showType:R,showImage:T},s.id))})]}):B==="list"?e.jsx(j,{target:"list-container",className:"space-y-4",children:f.map(s=>e.jsx(ze,{article:s,linkTo:F(s),accentColor:y,showDate:P,showType:R,showImage:T},s.id))}):e.jsx(j,{target:"list-container",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:f.map(s=>e.jsx(me,{article:s,linkTo:F(s),accentColor:y,showDate:P,showType:R,showImage:T},s.id))}),$>1&&e.jsxs(j,{target:"pagination",className:"flex items-center justify-center gap-2 mt-10",children:[e.jsx("button",{type:"button",onClick:()=>I(s=>Math.max(1,s-1)),disabled:_===1,className:"px-4 py-2 text-sm font-medium border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition",children:"Previous"}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:$},(s,r)=>r+1).filter(s=>s===1||s===$||Math.abs(s-_)<=1).map((s,r,c)=>{const S=c[r-1],Q=S!==void 0&&s-S>1;return e.jsxs(Ne.Fragment,{children:[Q&&e.jsx("span",{className:"px-2 text-gray-500 text-sm",children:"..."}),e.jsx("button",{type:"button",onClick:()=>I(s),className:`w-9 h-9 text-sm font-medium rounded-lg transition ${_===s?"text-white":"text-gray-700 border border-gray-300 hover:bg-gray-50"}`,style:_===s?{backgroundColor:y}:void 0,children:s})]},s)})}),e.jsx("button",{type:"button",onClick:()=>I(s=>Math.min($,s+1)),disabled:_===$,className:"px-4 py-2 text-sm font-medium border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition",children:"Next"})]})]})}
4),o&&e.jsxs(e.Fragment,{children:[e.jsx(Ee,{councilName:o.name,website:o.website,hubSettings:G}),e.jsx(De,{councilId:o.id})]})]})};async function He(t){if(!t)return null;const i=E(le(t));if(i?.id)return i.id;try{const{data:a}=await m.from("councils").select("id, name, slug, logo_url, website, primary_color").eq("slug",t).maybeSingle();return a&&W(le(t),a),a?.id??null}catch{return null}}async function Rs(t){try{const i=t.isCustomDomain?t.councilId??null:t.councilId??await He(t.councilSlug);if(!i)return;const a=t.isCustomDomain?`newsListing:dom:${i}`:t.councilSlug?`newsListing:slug:${t.councilSlug}`:null;if(!a||E(a))return;const g=t.isCustomDomain?E(ke(window.location.hostname))?.site_id??null:null,{data:d}=await m.from("councils").select("id, name, slug, logo_url, primary_color, website").eq("id",i).single();if(!d)return;const[u,N,D,v]=await Promise.all([m.from("news_media_settings").select("*").eq("council_id",i).maybeSingle(),m.from("organization_hub_settings").select("custom_menu_links, footer_links, footer_config, primary_color, hide_council_name, use_portal_menu, header_layout, italia_header_config, custom_header_css, secondary_header_enabled, secondary_header_bg_color, secondary_header_text_color, secondary_header_links").eq("council_id",i).is("site_id",null).eq("enabled",!0).maybeSingle(),m.from("news_media_categories").select("*").eq("council_id",i).eq("is_published",!0).order("display_order"),ce(m.from("news_media_articles").select(` 5 *, 6 category:news_media_categories(name, color) 7 `).eq("council_id",i).eq("status","published").order("published_at",{ascending:!1}),g)]),q=u.data??null,x=N.data,b=D.data||[],L=new Date,A=(v.data||[]).filter(C=>!(C.expires_at&&new Date(C.expires_at)<L));W(a,{council:d,settings:q,hubSettings:x,articles:A,categories:b})}catch{}}export{me as ArticleCardGrid,ze as ArticleCardList,ne as ArticleCardMagazine,Ps as PublicNewsMediaListingPage,Ps as default,Rs as prefetchNewsListing};
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.