1import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-Zwx0XhTc.js";import"./index.esm-D-Df14uR.js";import{_ as r,a as i,c as a,i as o,o as s,p as c,u as l}from"./getMostReadArticlesContainer-lbvCAGPw.js";import{i as u}from"./enums-nXXkWbkQ-CsREMrYe.js";import{O as d,m as f,p,t as m}from"./index-DiCIeT20-DN7PmQPX.js";import"./index.esm-DO_fwkOc.js";import{n as h}from"./TransContext-C8gluf2k.js";import{B as g,G as _,H as v,I as y,J as b,K as x,L as S,R as ee,U as te,V as ne,W as C,X as w,Y as T,Z as E,q as D,z as O}from"./index-CxIZ_bYv.js";import{a as k,d as A,f as j,h as M,i as N,m as P,n as F,o as I,p as L,r as R,s as z,t as B}from"./BottomSeo-BR7_26CB.js";function V(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function H(e,t,n){let r=e.slice(0);return r[t]=n,r}var re=class extends E{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,D.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!w(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(V(e,n).forEach(e=>{e.destroy()}),V(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=T(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new x(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=H(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&D.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},U=e(n(),1);function W({queries:e,...t},n){let r=_(n),i=C(),a=te(),o=U.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{S(e);let t=r.getQueryCache().get(e.queryHash);g(e,a,t)}),v(a);let[s]=U.useState(()=>new re(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;U.useSyncExternalStore(U.useCallback(e=>d?s.subscribe(D.batchCalls(e)):b,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),U.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>O(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&O(n,e)?ee(n,new x(r,n),a):[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&ne({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function G(e,t){return W({...e,queries:e.queries.map(e=>({...e,suspense:!0,throwOnError:y,enabled:!0,placeholderData:void 0}))},t)}var K=t(),q=d(),J=r();
1function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var X,Z={exports:{}};function ie(){return X||(X=1,e=Z,function(){var t={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e!=`object`)return``;if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes(`[native code]`))return e.toString();var r=``;for(var a in e)t.call(e,a)&&e[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()),Z.exports;var e}var ae=Y(ie()),oe=`fp-list_HUuYH`,se=`fp-hasToppedArticle_fPTZV`,Q=`fp-articleCount4_JN7EM`,$=({articles:e,hasImageLoadingPriority:t=!1,hasToppedArticle:n,showProvider:r=!0,onItemClick:a})=>{let c=n??e.some((e=>e.isTopped));return(0,K.jsx)(`div`,{className:ae(oe,{[se]:c,[Q]:e.length===4}),"data-analytics-context":`widget-news-article-list`,children:e.map(((n,l)=>{let{type:u,variant:d}=((e,t,n)=>e&&t===0?{type:`topped`,variant:`l`}:e&&n<4?{type:`regular`,variant:`l`}:{type:`regular`,variant:`m`})(c,l,e.length);return(0,K.jsxs)(U.Fragment,{children:[(0,K.jsx)(s,{data:n,index:l,type:u,variant:d,hasPriority:t,metaProps:{metaLogo:r&&n.provider?.id?(0,K.jsx)(f,{providerType:n.provider.id,providerText:n.provider.name}):void 0,metaInfo:(0,K.jsx)(i,{publishedAt:n.publishedAt,editedAt:n.editedAt||0,credit:n.credit}),badgeMeta:(0,K.jsx)(o,{published:n.publishedAt,edited:n.editedAt||0,isCommercial:n.type===`COMMERCIAL`})},onClick:a?()=>a(n,l):void 0}),e.length!==l+1&&(0,K.jsx)(m,{type:`primary`}),(0,K.jsx)(k,{index:l,articleId:n.id},`banner_${n.id}`)]},n.id)}))})},ce=({articles:e,hasToppedArticle:t=!1,isMostRecentSection:n=!1,isLastSection:r,children:i,...a})=>e.length!==1||r&&n?n||e.length>4?(0,K.jsx)(I,{...a,articles:e,children:i}):(0,K.jsx)($,{...a,articles:e,hasToppedArticle:t}):(0,K.jsx)($,{...a,articles:e,hasToppedArticle:!0}),le=e=>{let t=(0,q.c)(7),{sectionHeadline:n,articleIds:r,...i}=e,o=(0,J.useInjection)(a.ARTICLE_HEADER_DATA_PROVIDER),s,c;if(t[0]!==o||t[1]!==r){let e;t[3]===o?e=t[4]:(e=e=>o.getQueryOptions(e),t[3]=o,t[4]=e),s=r.map(e),t[0]=o,t[1]=r,t[2]=s}else s=t[2];t[5]===s?c=t[6]:(c={queries:s,combine:de},t[5]=s,t[6]=c);let l=(e=>{let t=new z;for(let n of e)n&&t.addArticle({id:n.id,type:n.type,slug:n.slug,title:n.title,images:n.images,publishedAt:n.publishedAt,editedAt:n.editedAt,isTopped:!1});return t.build()})(G(c)).getArticles();return l.length===0?null:(0,K.jsx)(p,{type:`news`,headline:n,children:(0,K.jsx)(ce,{...i,articles:l})})};function ue(e){let{data:t}=e;return t}function de(e){return e.map(ue)}function fe({name:e,headerLink:t,hasToppedArticle:n,articleIds:r,typeId:i,isFirstSectionOnThePage:a}){return(0,K.jsx)(le,{sectionHeadline:{label:e,link:t?{label:t.label,targetUrl:t.url}:void 0},articleIds:r,hasImageLoadingPriority:a,hasToppedArticle:n,isMostRecentSection:i===u.MOST_RECENT,showProvider:!1})}function pe({page:e,layoutSectionArticlesContainer:t,mostReadArticlesContainer:n}){let r=h();return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`container__mainInner`,"data-testid":`container__mainInner`,children:[(0,K.jsxs)(`main`,{className:`container__news`,"data-testid":`container__news`,children:[(0,K.jsx)(N,{trans:r,parentContainer:t,children:e.sections?.map((e,t)=>e.articles.length?(0,K.jsxs)(U.Fragment,{children:[(0,K.jsx)(U.Suspense,{children:(0,K.jsx)(fe,{headerLink:e.linkName&&e.tag?.slug?{label:e.linkName,url:`/topic/${l(e.tag?.slug,e.tag?.id)}`}:void 0,name:e.title,hasToppedArticle:e.articles.some(({isTopped:e})=>e),isFirstSectionOnThePage:t===0,articleIds:e.articles.map(({id:e})=>e),typeId:e.sectionType})}),t===0?(0,K.jsx)(A,{zoneIdentifier:c.SMR_MOBIL_ARTICLE,index:`szn_sections_${t+1}`,mobileWidth:720,mobileHeight:1280},`szn_sections_${e.articles[0].id}`):null]},e.articles[0].id):null)}),(0,K.jsx)(A,{zoneIdentifier:c.SMR_MOBIL,index:`szn_smr_mobil`},`szn_smr_mobile`)]}),(0,K.jsxs)(`div`,{id:`rccontent`,className:`container__bannerZone`,children:[(0,K.jsx)(M,{}),(0,K.jsx)(N,{trans:r,parentContainer:n,children:(0,K.jsx)(U.Suspense,{children:(0,K.jsx)(F,{})})}),(0,K.jsxs)(`div`,{className:`scrollBlock`,children:[(0,K.jsx)(j,{}),(0,K.jsx)(R,{parentContainer:n})]})]})]}),(0,K.jsx)(P,{}),(0,K.jsx)(L,{}),(0,K.jsx)(B,{text:e.seoMetadata.block})]})}export{pe 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.