"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[24871],{24871:function(e,t,i){i(14382),i(84734),i(44962),i(78557),i(90076),i(83994),i(82367);var r=i(40984),o=i(36300),a=i(5898),s=i(83375),n=i(24468),l=i(76542),c=i(46782),d=i(8566);function h(){return!c.A.desktop}function v(e,t,i,r,s){var d,v=o.Ay.getWindowSize().innerWidth,u={SortBy:"SortName",SortOrder:"Ascending",Filters:"IsFavorite",Recursive:!0,Fields:"PrimaryImageAspectRatio",CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual",EnableTotalRecordCount:!1};return i&&(u.ParentId=i),s||(u.Limit=6,h()?u.Limit=20:v>=1920?u.Limit=10:v>=1440&&(u.Limit=8)),"MusicArtist"===r.types?d=ApiClient.getArtists(t,u):(u.IncludeItemTypes=r.types,d=ApiClient.getItems(t,u)),d.then((function(t){var i="";if(t.Items.length){if(i+='<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">',!c.A.tv&&u.Limit&&t.Items.length>=u.Limit?(i+='<a is="emby-linkbutton" href="#/list?serverId='+ApiClient.serverId()+"&type="+r.types+'&IsFavorite=true" class="more button-flat button-flat-mini sectionTitleTextButton">',i+='<h2 class="sectionTitle sectionTitle-cards">',i+=a.Ay.translate(r.name),i+="</h2>",i+='<span class="material-icons chevron_right" aria-hidden="true"></span>',i+="</a>"):i+='<h2 class="sectionTitle sectionTitle-cards">'+a.Ay.translate(r.name)+"</h2>",i+="</div>",h()){var o="scrollX hiddenScrollX";c.A.tv&&(o+=" smoothScrollX"),i+='<div is="emby-itemscontainer" class="itemsContainer '+o+' padded-left padded-right">'}else i+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">';i+=n.Ay.getCardsHtml(t.Items,{preferThumb:r.preferThumb,shape:r.shape,centerText:r.centerText&&!0,overlayText:!1!==r.overlayText,showTitle:r.showTitle,showParentTitle:r.showParentTitle,scalable:!0,coverImage:r.coverImage,overlayPlayButton:r.overlayPlayButton,overlayMoreButton:r.overlayMoreButton&&!0,action:r.action,allowBottomPadding:!h(),cardLayout:!1}),i+="</div>"}e.innerHTML=i,l.Ay.lazyChildren(e)}))}i(1177),t.default={render:function(e,t,i,o){d.Ay.show();var a=[{name:"Movies",types:"Movie",id:"favoriteMovies",shape:(0,r.xK)(h()),showTitle:!1,overlayPlayButton:!0},{name:"Shows",types:"Series",id:"favoriteShows",shape:(0,r.xK)(h()),showTitle:!1,overlayPlayButton:!0},{name:"Episodes",types:"Episode",id:"favoriteEpisode",shape:(0,r.UI)(h()),preferThumb:!1,showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Videos",types:"Video,MusicVideo",id:"favoriteVideos",shape:(0,r.UI)(h()),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"Artists",types:"MusicArtist",id:"favoriteArtists",shape:(0,r.zP)(h()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Albums",types:"MusicAlbum",id:"favoriteAlbums",shape:(0,r.zP)(h()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"Songs",types:"Audio",id:"favoriteSongs",shape:(0,r.zP)(h()),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayMoreButton:!0,action:"instantmix",coverImage:!0}],n=(0,s.Ez)("sectionid");n&&(a=a.filter((function(e){return e.id===n}))),o&&(a=a.filter((function(e){return-1!==o.indexOf(e.id)})));var l=e.querySelector(".favoriteSections");if(!l.innerHTML){for(var c="",u=0,y=a.length;u<y;u++)c+='<div class="verticalSection section'+a[u].id+'"></div>';l.innerHTML=c}for(var m=[],p=0,T=a.length;p<T;p++){var f=a[p];l=e.querySelector(".section"+f.id),m.push(v(l,t,i,f,1===a.length))}Promise.all(m).then((function(){d.Ay.hide()}))}}}}]);