1import{$ as e,$t as t,C as n,Nt as r,Tt as i,X as a,b as o,d as s,dt as c,f as l,ft as u,h as d,m as f,p,q as m,r as h,rn as g,x as _}from"./D9d_4q1I.js";import{t as v}from"./o1IW3OlU.js";import{t as y}from"./BOD6q0Xz.js";import{t as b}from"./DsQnJyZX.js";import{t as x}from"./DCyf4pHg.js";import{t as S}from"./ZqDXL8ZE.js";import{t as C}from"./JPYV92DK.js";import{t as w}from"./DKKUjX-A.js";import{t as T}from"./CqSfVKL1.js";import{r as E}from"#entry";import{t as D}from"./-STb4wMD.js";var O=[`data-k5a-pos`],k=[`data-teaser-badge`],A={class:`flex-1 box-teaser-cluster-headline-wrapper`},j=[`href`,`target`,`rel`,`aria-label`],M=Object.assign(n({inheritAttrs:!1,__name:`BoxTeaserCluster`,props:{index:{},layout:{},cluster:{}},async setup(n){let M,N,{isExpress:P}=x(),{isMobile:F}=y(),I=n,L=i([]),R=s(()=>I.cluster.teaserClusterEmphasis?I.cluster.teaserClusterEmphasis:`0`),z=s(()=>{let e=I.cluster.teasables.length;return e===2?`md:grid-cols-2`:e===3||e===6?`md:grid-cols-3`:e>=4&&e!==6?`box-teaser-cluster-large-grid`:``}),B=s(()=>D.get(R.value)?.content||``);async function V(){if(!I.cluster)return;let e=I.cluster.teasables.map(async e=>{let{data:t}=await b(`articles/${e.id}/teaser`);return t.value});try{let t=(await Promise.all(e)).filter(e=>e);t&&(L.value=t)}catch(e){console.error(e)}}[M,N]=c(()=>V()),await M,N();let H=e=>e?v:`div`;return(i,s)=>{let c=E,v=S,y=w,b=C;return n.cluster?(m(),d(`section`,{key:0,"data-content-teaserCluster":``,"data-k5a-pos":`block${n.index+1}`,class:t([r(B),i.$attrs.class,`px-4 sm:px-4`,{"rounded-xl":r(P)}])},[n.cluster.title?(m(),p(c,{key:0,"no-arrow":``,title:n.cluster.title,"target-path-or-url":n.cluster?.targetUrlPathOrUrl,emphasis:(`emphasisStyles`in i?i.emphasisStyles:r(D)).get(r(R))?.title,"emphasis-after":(`emphasisStyles`in i?i.emphasisStyles:r(D)).get(r(R))?.titleAfter},null,8,[`title`,`target-path-or-url`,`emphasis`,`emphasis-after`])):f(``,!0),l(`div`,{class:t([`grid grid-cols-1 gap-5`,`${r(z)} ${n.cluster.title?`mt-4`:``} pt-6`])},[(m(!0),d(h,null,a(r(L),a=>(m(),d(`article`,{key:a.documentId,class:`flex box-teaser-cluster-article relative`,"data-teaser-badge":a.badge||`none`},[l(`div`,{class:t([`box-teaser-cluster-image-wrapper mt-1 md:mt-0`,{"flex flex-col-reverse justify-start":a?.isSoldContent&&r(P)}])},[a?.isSoldContent&&r(P)?(m(),p(v,{key:0,class:`mt-1 mb-0 text-center text-sm box-teaser-cluster-ad`,text:i.$t(`article.sold_content`)},null,8,[`text`])):f(``,!0),(m(),p(e(H(a.targetPathOrUrl)),{to:a.targetPathOrUrl||void 0,target:a.targetPathOrUrl?a?.openInNewWindow?`_blank`:`_self`:void 0,rel:a.targetPathOrUrl&&a?.nofollow?`nofollow`:void 0,tabindex:a.targetPathOrUrl?-1:void 0,"aria-label":a.targetPathOrUrl?r(T)([a.titlePrefix,a.title]):void 0},{default:u(()=>[_(y,{"is-video-article":a.isVideoArticle,"is-podcast":a.isPodcast,loading:n.index===0?`eager`:`lazy`,"image-object":a.img,"square-image-css":r(F)||r(P),layout:`a`,"teasable-position":0,"override-img-sizes":`xs:150px md:500px`},null,8,[`is-video-article`,`is-podcast`,`loading`,`image-object`,`square-image-css`])]),_:2},1032,[`to`,`target`,`rel`,`tabindex`,`aria-label`]))],2),l(`div`,A,[l(`a`,{href:a.targetPathOrUrl,target:a?.openInNewWindow?`_blank`:`_self`,rel:a?.nofollow?`nofollow`:void 0,"aria-label":r(T)([a.titlePrefix,a.title]),class:`flex`},[l(`h2`,{class:t([`flex flex-col text-m leading-5 pb-2 box-teaser-cluster-headline`,{"box-teaser-cluster-headline--with-badge":a.badge}])},[l(`span`,{class:t((`emphasisStyles`in i?i.emphasisStyles:r(D)).get(r(R)).prefix?(`emphasisStyles`in i?i.emphasisStyles:r(D)).get(r(R)).prefix:`box-teaser-cluster-prefix first:leading-[1.5rem]`)},[a.badge?(m(),p(b,{key:0,badge:a.badge},null,8,[`badge`])):f(``,!0),o(` `+g(a?.titlePrefix),1)],2),l(`span`,{class:t([`font-serif mt-2`,(`emphasisStyles`in i?i.emphasisStyles:r(D)).get(r(R)).boxTeaserTitle])},g(a.title),3)],2)],8,j)])],8,k))),128))],2)],10,O)):f(``,!0)}}}),{__name:`TemplatesBoxTeaserCluster`});export{M 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.