1import{s as e}from"./BLu9F3Pw.js";import{E as t,U as n,Z as r,d as i,kt as a,nn as o}from"./BFmGqvmJ.js";import{i as s}from"./CJyR5QWI.js";import{t as c}from"./Dj3TWbBp.js";import{t as l}from"./BLDfemHo.js";import{t as u}from"./DpHf7Vhe.js";import{t as d}from"./lr5FTFhK.js";import{t as f}from"./CZRrw-K1.js";import{t as p}from"./CWBKn2Jv.js";import{n as m}from"./B4TEASuf.js";import{i as h,n as g,r as _,t as v}from"./CeCqnYcI.js";var y=Object.assign({name:`NuxtErrorBoundary`,inheritAttrs:!1},{__name:`NuxtErrorBoundary`,emits:[`error`],setup(i,{expose:s,emit:c}){let l=c,u=a(null);function f(){u.value=null}{let t=e();function r(...e){let[n,r,i]=e;l(`error`,n),t.hooks.callHook(`vue:error`,n,r,i),u.value=n}n((e,n,i)=>(t.isHydrating?d(()=>r(e,n,i)):r(e,n,i),!1))}return s({error:u,clearError:f}),(e,n)=>u.value?r(e.$slots,`error`,o(t({error:u.value,clearError:f})),void 0,void 0,0):r(e.$slots,`default`,{},void 0,void 0,1)}}),b=37;function x(e,t){if(!Array.isArray(e))return[];let n=Number(t),r=Number.isFinite(n)&&n>5?Math.floor(n):b;return e.slice(0,r)}var S=(e,t,n,r)=>{let{isMobile:i}=f(),a=Array.from({length:e.length||0},()=>-1),o=0,s=e.findIndex(e=>e.layout===`homemix`);for(let c of a.keys()){if(s!==-1&&c<s||e[c]?.contentItemType===`topics-nav`||e[c]?.contentItemType===`sport-widget`||e[c]?.contentItemType===`tippspiel`||e[c]?.layout===`home_aufmacher_3`)continue;if(e[c]?.layout===`homemix`){i||o++,i&&r!==`express`&&o++,r!==`express`&&(o++,a[c]=o++);continue}let l=r===`express`&&e[c]?.layout===`home_aufmacher_3`;if(c%2==0&&!l&&(a[c]=o++,t||n)){a[a.length-1]=o+1,o++;break}}return a},C=e=>e.flatMap(e=>e.teasables||[]).filter(e=>e!==void 0).join(`-`),w=e=>Array.isArray(e)?h(e):[],T=e=>(e?.contentItems||[]).filter(e=>e?.providerName!==`Recobox`);async function E(t){let{ssrContext:n,$handleDownstreamHeaders:r}=e(),a=m(),{mandator:o}=c(),{homemixMaxArticles:d}=l(),{ecommerceTeasableListId:f}=l(),h=p(n?.event),y=u(`/v5/homepage`,{baseURL:a,key:`homepage`,headers:{"Cache-Control":h||``},credentials:`omit`,onResponse:e=>{r(e.response.headers)}},`$82LzveVoFQ`),b=u(`/v5/teasablelists/${f}`,{baseURL:a,key:`homepage-shopping-teasablelist`,credentials:`omit`,immediate:!!f},`$BZ8txghapl`),{data:E,error:D,pending:O,status:k,refresh:A}=await y,{data:j}=await b;if(D.value||!E.value)throw s({statusCode:500,statusMessage:`Failed to fetch homepage content`});return{data:E,cleanedTeaserClusters:i(()=>{if(!E.value)return[];let e=w(T(E.value)),t=_(e),n=g(t),r=[],i=j.value??[];for(let e of n)`teasables`in e&&(e.layout===`home_aufmacher_1`&&(r=e.teasables.splice(1,e.teasables.length)),e.layout===`home_aufmacher_3`&&(r=e.teasables.splice(3,e.teasables.length)),e.layout===`homemix`&&(e.teasables=x([...r,...e.teasables],d),e.teasables=v(e.teasables,i)));return n}),adPlacementArray:i(()=>E.value?S(w(T(E.value)),!!t.isPurUser.value,!!t.isPlusUser.value,o):[]),teasablesIds:i(()=>E.value?C(w(T(E.value))):``),pending:O,status:k,error:D,refresh:A}}export{y as n,E 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.