"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[450],{71479:(e,n,t)=>{t.r(n),t.d(n,{DISALLOWED_VIEWS:()=>M,View:()=>x,default:()=>F});var l=t(67294),r=t.n(l),o=t(94184),a=t.n(o),s=t(65858),i=t(20657),u=t(51574),c=t(33241),m=t(31595),d=t(21794),g=t(23809),v=t(70369),E=t(42273),b=t(59482),f=t(72907),w=t(1663),h=t(86964),y=t(29255);const A="XD65NhAD6ebYxMaW9cZZ",k="AJqEY1gblQDvIgjU0jAH",p="Ft1cMGlqDsCbqmXQyeKN",I="zlBEnsMyvUhuHSEtst4Q",C="INYpiFRlwWIZ0vH30xW2",N=e=>"HEADER"===e.rendering,D=e=>{const{title:n,images:t,backgroundColor:l}=e;return r().createElement(r().Fragment,null,((e,n=[],t)=>{if(!e)return r().createElement("div",{className:C});const l=n.filter((e=>"background"===e.name));return r().createElement(E.gF,{backgroundImages:l,backgroundColor:t,size:0===l.length?E.fR.SMALL:E.fR.DEFAULT},r().createElement(b.W,null,r().createElement(f.i,{text:e})),r().createElement(E.sP,null,r().createElement(E.xd,null,e)))})(n,t,l))},M=["ginger-genre-affinity"],x=r().memo((({viewData:e,viewId:n,backgroundColor:t,isFullyLoaded:o,isGenre:s,isAnonymous:d,getNextPage:g})=>{const b=null==e?void 0:e.name,f=(0,l.useCallback)((()=>M.some((n=>{var t;return null==e||null===(t=e.href)||void 0===t?void 0:t.includes(n)}))),[e]),y=(0,l.useCallback)((()=>{if(!e)return;const n=f();o||n||g()}),[e,f,o,g]),x=(0,l.useMemo)((()=>{const{content:{items:n=[]}={}}=e||{},t=n.filter(N);return t.length>0?t[0]:null}),[e]),F=(0,l.useMemo)((()=>{const{name:n}=e||{};return x?x.name:t&&n}),[t,x,e]),L=(0,l.useMemo)((()=>s||Boolean(F)),[s,F]),W=(0,l.useMemo)((()=>!(!e||!Array.isArray(e.content.items))&&L),[L,e]),S=(0,E.oX)(n)?r().createElement(E.YD,{isAnonymous:d}):r().createElement(D,{title:(null==x?void 0:x.name)||F,images:(null==x?void 0:x.images)||[],backgroundColor:t}),G=null==e?void 0:e.content.items;return e?r().createElement(r().Fragment,null,b?r().createElement(v.$,null,b):null,r().createElement(c.C,{onReachBottom:y},r().createElement("section",{className:A},W&&r().createElement(m.H,{color:t||null}),L?S:r().createElement("div",{className:C}),r().createElement("div",{className:p},L&&S&&r().createElement(u.I,{backgroundColor:t}),r().createElement("div",{className:a()(k,"contentSpacing",{[I]:s})},r().createElement(h.c,{spaces:G,viewName:e.name,viewId:n,isAnonymous:d})))))):r().createElement(w.h,{hasError:!1,errorMessage:i.ag.get("error.not_found.title.page")})})),F=r().memo((({viewId:e,match:n})=>{const t=e||n.params.viewId,{isAnonymous:l}=(0,s.v9)(y.Gg),{view:o,getNextPage:a}=(0,g.P)(t),i=!o||null===o.content.next,u=t.endsWith("-page")?t:`${t}-page`,c=(0,s.v9)((e=>{var n,t;return(null===(n=e.browse.allItemsStyle)||void 0===n||null===(t=n[u])||void 0===t?void 0:t.color)||""})),m=e=>e.viewId===t||"href"in e&&e.href===(0,d.p)(t),v=(0,s.v9)((e=>{var n,t,l,r;return(null==e||null===(n=e.browse)||void 0===n||null===(t=n.browseAll)||void 0===t?void 0:t.items.some(m))||(null==e||null===(l=e.browse)||void 0===l||null===(r=l.topGenres)||void 0===r?void 0:r.items.some(m))||!!c}));return r().createElement(x,{viewData:o,isFullyLoaded:i,viewId:t,backgroundColor:c,isGenre:v,isAnonymous:l,getNextPage:a})}))}}]);
//# sourceMappingURL=xpui-routes-view.js.map