1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29830],{3030:(e,t,l)=>{"use strict";l.r(t),l.d(t,{BrandtreeRatingCards:()=>f,default:()=>v});var i=l(6029),n=l(55729),r=l(54717),s=l(81163),a=l(32988),o=l.n(a),c=l(58376);let d={editorial:"redaktion",community:"community"},u=({items:e=[],className:t="",requireLoginForDetails:l=!1,onLoginRequired:n=null,hasMore:a=!1,isLoadingMore:u=!1,onLoadMore:m=null})=>{let{track:h}=(0,c.z1)();return e.length?(0,i.jsx)("div",{className:o()({"flex flex-col gap-4 lg:col-span-2 lg:gap-8":!0,[t]:t}),children:(0,i.jsxs)("div",{className:"py-4 lg:py-8",children:[e.map((t,s)=>{let o=d[t.type]||t.type,u=((e,t)=>{if(null!=e)return`${Math.round(e/(t||5)*5)}/5`})(t.score,t.maxScore),m=t.testUrl||void 0,g={type:o,text:u,href:m,destination_host:(e=>{try{return e?new URL(e,window.location.origin).hostname:void 0}catch(e){return}})(m)},x=()=>h("mb_rating_teaser_click",g);return(0,i.jsx)(c.Ec,{name:"mb_rating_teaser_impression",action:{type:o,text:u},threshold:.5,delay:300,avoidBottomNav:!0,children:(0,i.jsx)("div",{onClick:x,onAuxClick:x,children:(0,i.jsx)(r.Kr,{...t,cardIndex:s,className:s!==e.length-1||a?"":"border-b",requireLoginForDetails:"community"===t.type&&l,onLoginRequired:n})})},t.title||t.headline||s)}),a&&m&&(0,i.jsx)("div",{className:"flex justify-center pt-4",children:(0,i.jsx)(s.Button,{type:"button",style:"greyInverted",text:u?"Wird geladen...":"Mehr Bewertungen laden",onClick:m,disabled:u,"aria-label":"Mehr Bewertungen laden"})})]})}):null};var m=l(72824),h=l(70217),g=l(4455),x=l(64996),p=l(76932),y=l(60146);let f=({items:e=[],hasMoreCommunity:t=!1,hasMoreEditorial:l=!1,page:r,irConfig:s,requireLoginForDetails:a=!0})=>{let o=(0,p.A)(e=>e.filter),c=(0,x.A)(),d=(0,n.useContext)(g.VQ),f=d?.loggedIn,[v,b]=(0,n.useState)(e.filter(e=>"community"===e.type)),[k,j]=(0,n.useState)(e.filter(e=>"editorial"===e.type)),[_,w]=(0,n.useState)(t),[C,M]=(0,n.useState)(l),[N,R]=(0,n.useState)(!1),[z,S]=(0,n.useState)(!1),q=(0,y.A)(e=>e.submitCount),B=(0,n.useRef)(v.length);B.current=v.length;let L=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!L.current){L.current=!0;return}let e=!1;return c("brandtree.ratingCards",s,r,{action:"loadMore",type:"community",offset:0,limit:Math.max(5,B.current+1)}).then(t=>{!e&&t?.items&&(b(t.items),w(t.hasMore||!1))}).catch(()=>{}),()=>{e=!0}},[q]);let E=(0,n.useCallback)(()=>{S(!0)},[]),A=(0,n.useCallback)(async()=>{if(N)return;let e=("all"===o||"community"===o)&&_,t=("all"===o||"editorial"===o)&&C;if(e||t){R(!0);try{let l=[];e&&l.push(c("brandtree.ratingCards",s,r,{action:"loadMore",type:"community",offset:v.length,limit:3}).then(e=>{e?.items&&(b(t=>[...t,...e.items]),w(e.hasMore||!1))})),t&&l.push(c("brandtree.ratingCards",s,r,{action:"loadMore",type:"editorial",offset:k.length,limit:3}).then(e=>{e?.items&&(j(t=>[...t,...e.items]),M(e.hasMore||!1))})),await Promise.all(l)}catch(e){console.error("Error loading more ratings:",e)}finally{R(!1)}}},[N,o,_,C,v.length,k.length,c,s,r]),D=(0,n.useMemo)(()=>[...k,...v].sort((e,t)=>{let l=e.dateRaw?new Date(e.dateRaw).getTime():0;return(t.dateRaw?new Date(t.dateRaw).getTime():0)-l}),[k,v]),O=(0,n.useMemo)(()=>"all"===o?D:D.filter(e=>e.type===o),[D,o]),T="community"===o&&_||"editorial"===o&&C||"all"===o&&(_||C);return!O.length&&D.length>0?(0,i.jsx)("div",{className:"py-8 text-center",children:(0,i.jsx)(h.Text,{isDarkMode:!0,children:"F\xfcr diese Auswahl liegen noch keine Bewertungen vor."})}):O.length?(0,i.jsxs)("div",{className:"va-maincol w-full lg:col-span-2 px-4 lg:px-0",children:[(0,i.jsx)(u,{items:O,requireLoginForDetails:a&&!f,onLoginRequired:E,hasMore:T,isLoadingMore:N,onLoadMore:A}),(0,i.jsx)(m.b,{isOpen:z,onClose:()=>S(!1),icon:"lock",headline:"Anmeldung erforderlich",description:"Melde dich an, um die vollst\xe4ndige Bewertung zu lesen.",buttonText:"Jetzt anmelden",actionUrl:"/benutzer-login"})]}):null},v=f},36003:e=>{e.exports={backdrop:"loginRequiredOverlay_backdrop__H72G7",modal:"loginRequiredOverlay_modal__XOFGK",iconContainer:"loginRequiredOverlay_iconContainer__xQ1t4",icon:"loginRequiredOverlay_icon__o0GjM"}},60146:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i=(0,l(29784).vt)(e=>({submitCount:0,lastSubmittedModelId:null,notifyRatingSubmitted:(t=null)=>e(e=>({submitCount:e.submitCount+1,lastSubmittedModelId:t}))}))},62790:(e,t,l)=>{e.exports=l.p+"static/img/icon-plus.svg"},72824:(e,t,l)=>{"use strict";l.d(t,{b:()=>w});var i=l(6029),n=l(55729),r=l(32988),s=l.n(r),a=l(58376),o=l(85169),c=l(36003),d=l.n(c),u=l(81163),m=l(1844),h=l(31332),g=l(70217),x=l(41498),p=l(46966),y=l.n(p),f=l(93963),v=l.n(f),b=l(62790),k=l.n(b),j=l(3732),_=l.n(j);let w=({isOpen:e=!1,onClose:t=null,onAction:l=null,onLogin:r=null,actionUrl:c=null,loginUrl:x="/login",icon:p="favorite",headline:y="Anmeldung erforderlich",description:f="Um Vergleiche zu speichern und sp\xe4ter wieder aufzurufen, melden Sie sich bitte an oder erstellen Sie ein kostenloses Konto.",buttonText:v="Jetzt anmelden",buttonIcon:b="user",dismissText:k="Sp\xe4ter",loginRequestTracking:j=null,source:_=null})=>{let w=l||r,M=c||x,{track:N}=(0,a.z1)();(0,n.useEffect)(()=>{e&&j&&N("mb_login_request_impression",{type:j.type})},[e]);let R=(0,n.useCallback)(e=>{j&&N("mb_login_request_close_later",{type:j.type,text:e}),t?.()},[j,N,t]),z=(0,n.useCallback)(()=>{let e;if(_&&(0,o.Tn)(),j){try{e=M?new URL(M,window.location.origin).hostname:void 0}catch(t){e=void 0}N("mb_login_request_click",{type:j.type,text:"login",href:M,destination_host:e})}},[_,j,N,M]);return((0,n.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&R("x")};return e&&(document.addEventListener("keydown",t),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e,R]),e)?(0,i.jsx)("div",{className:s()("fixed inset-0 z-insane flex items-start justify-center overflow-y-auto lg:p-4 lg:py-8",d().backdrop),onClick:e=>{e.target===e.currentTarget&&R("x")},role:"dialog","aria-modal":"true","aria-labelledby":"login-required-overlay-title",children:(0,i.jsxs)("div",{className:s()("relative w-full max-w-lg p-6 my-auto",d().modal),children:[(0,i.jsx)("div",{className:"absolute top-3 right-4",children:(0,i.jsx)(m.J,{onClick:()=>R("x"),size:"medium",ariaLabel:"Overlay schlie\xdfen"})}),(0,i.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center pt-4",children:[(0,i.jsx)(C,{icon:p}),(0,i.jsx)("div",{className:"px-8",children:(0,i.jsx)(h.Headline,{headline:y,size:"medium",isDarkMode:!0,id:"login-required-overlay-title"})}),(0,i.jsx)("div",{className:"px-4",children:(0,i.jsx)(g.Text,{isDarkMode:!0,children:f})}),w?(0,i.jsx)(u.Button,{text:v,style:"primary",type:"button",onClick:()=>{z(),w&&w(),t&&t()},icon:b,iconPosition:"before"}):(0,i.jsx)(u.Button,{text:v,style:"primary",type:"link",link:M,onClick:z,icon:b,iconPosition:"before"}),(0,i.jsx)("button",{type:"button",onClick:()=>R("spaeter"),className:"text-sm underline text-skin-grey-dark hover:text-skin-primary transition-colors",children:k})]})]})}):null},C=({icon:e})=>{e=String(e).toLowerCase();let t=s()("flex items-center justify-center size-px-60 rounded-full",d().iconContainer);switch(e){case"ams-plus":return(0,i.jsx)(x.B,{src:_(),className:"h-px-40",alt:""});case"lock":return(0,i.jsx)("div",{className:t,children:(0,i.jsx)(x.B,{src:v(),className:s()("size-px-28",d().icon),alt:""})});case"plus":return(0,i.jsx)("div",{className:t,children:(0,i.jsx)(x.B,{src:k(),className:s()("size-px-28",d().icon),alt:""})});default:return(0,i.jsx)("div",{className:t,children:(0,i.jsx)(x.B,{src:y(),className:s()("size-px-28",d().icon),alt:""})})}}},76932:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i=(0,l(29784).vt)(e=>
1({filter:"all",setFilter:t=>e({filter:t})}))},93963:(e,t,l)=>{e.exports=l.p+"static/img/icon-lock.svg"}}]);
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.