1import{a as e,i as t}from"./DUgKJ0rD.js";import{D as n,F as r,Ft as i,I as a,K as o,Kt as s,L as c,P as l,Qt as u,R as d,W as f,gt as p,hn as m,mt as h,pt as g,yn as _,yt as v}from"./CI1QfElZ.js";import{r as y}from"./B_8D-Bkj.js";import{f as b}from"./nN7mEdLy.js";import{C as x,b as S,d as C,w}from"#entry";import{t as T}from"./D7gxBW2W.js";import{t as E}from"./MV8mMghj.js";import{t as D}from"./BBIUbkac.js";var O={class:`flex flex-col lg:flex-row gap-5`},k={class:`title-sans title-sans--xl lg:title-sans--2xl uppercase pt-5 ml-5`},A=Object.assign(o({__name:`MoreSection`,props:{newsItems:{},advert:{type:Boolean}},setup(e){let t=e,o=b(),{itemsToShow:s,showMoreButton:h,handleShowMore:g,init:x}=D(t.newsItems,{all:`all`},(e,t)=>t,10,`news`),S=l(()=>!s.value.length&&x);return(t,l)=>{let b=T,w=C,D=E;return p(),d(`section`,O,[r(`div`,{class:m([`w-full bg-white md:rounded divide-y divide-dashed`,{"lg:w-3/4":e.advert,hidden:u(S)}])},[r(`h2`,k,` MORE `+_(u(o).params.category&&u(o).params.category.replace(`-`,` `)),1),u(s).length>0?(p(),d(n,{key:0},[f(y,{name:`opacity-delay-300ms`},{default:i(()=>[(p(!0),d(n,null,v(u(s),e=>(p(),a(b,{key:e.newsId,class:`[&:nth-child(2)]:!border-t-0`,item:e,"event-id":e.eventId,tertiary:``,"heading-component":`h3`},null,8,[`item`,`event-id`]))),128))]),_:1}),u(h)?(p(),d(`button`,{key:0,class:`btn-sec btn-sec--sm w-fit mx-auto !border-t-0 my-8`,onClick:l[0]||=(...e)=>u(g)&&u(g)(...e)},` Show more `)):c(``,!0)],64)):u(x)?c(``,!0):(p(),a(w,{key:1,class:`!border-t-0 my-5 mx-auto`}))],2),e.advert?(p(),a(D,{key:0,class:`flex nl-lg:order-first grow h-fit`})):c(``,!0)])}}}),{__name:`NewsMoreSection`}),j=`https://news.google.com/swg/js/v1/publisher.js`,M=!1,N=null,P=()=>{let{$siteConfig:e}=t(),{loadAfterInmobi:n}=w();return{deeplinkUrl:`https://www.google.com/preferences/source?q=${new URL(e.config.siteUrl).hostname.replace(/^www\./,``)}`,loadPreferredSource:()=>{M||(M=!0,n(()=>{window.PREFERRED_SOURCE=window.PREFERRED_SOURCE||[],window.PREFERRED_SOURCE.push(e=>{e.init({theme:`light`,lang:`en`}),N=e});let e=document.createElement(`script`);e.async=!0,e.src=j,e.setAttribute(`preferred-sources-control`,`manual`),document.head.appendChild(e)}))},addPreferredSource:e=>{N&&(e.preventDefault(),N.addPreferredSource())}}},F=[`href`],I=Object.assign(o({__name:`PreferredSourceButton`,props:{placement:{}},setup(t){let n=t,i=e(),a=b(),{gtmTrack:o}=x(),{deeplinkUrl:c,loadPreferredSource:l,addPreferredSource:f}=P(),m=`${i.public.IMAGE_CDN_BASE_URL}/images/misc/google_preferred_source_badge_light_en.png`,_=`${m} 1x, ${`${i.public.IMAGE_CDN_BASE_URL}/images/misc/[email protected]`} 2x`,v=s(null),y={placement:n.placement,news_category:a.params.category?.toString()||`all`},S=e=>{o(`preferred_source_button_clicked`,y),f(e)},C=null;return g(()=>{l(),C=new IntersectionObserver(([e])=>{e?.isIntersecting&&(o(`preferred_source_button_viewed`,y),C?.disconnect())},{threshold:.5}),v.value&&C.observe(v.value)}),h(()=>{C?.disconnect()}),(e,t)=>(p(),d(`a`,{ref_key:`buttonRef`,ref:v,href:u(c),target:`_blank`,rel:`noopener`,class:`flex shrink-0 w-44`,onClick:S},[r(`img`,{src:m,srcset:_,alt:`Add as a preferred source on Google`,width:`338`,height:`107`,class:`w-full h-auto`})],8,F))}}),{__name:`NewsPreferredSourceButton`}),L={class:`flex flex-col items-center rounded text-center gap-4 p-4`},R={class:`title-sans title-sans--lg`},z=Object.assign(o({__name:`PreferredSourceBox`,props:{placement:{default:`news_article`}},setup(e){let t=e,n=S();return(e,i)=>{let a=I;return p(),d(`div`,L,[r(`p`,R,`Love `+_(u(n).toLowerCase())+`? See us first in your news feed!`,1),f(a,{placement:t.placement},null,8,[`placement`])])}}}),{__name:`NewsPreferredSourceBox`});export{I as n,A as r,z as t};
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.