if(!result.Items.length)returnvoidsection.classList.add("hide");section.classList.remove("hide"),"MusicArtist"===item.Type?section.querySelector("h2").innerHTML=globalize.translate("sharedcomponents#HeaderAppearsOn"):section.querySelector("h2").innerHTML=globalize.translate("MoreFromValue",item.AlbumArtists[0].Name),cardBuilder.buildCards(result.Items,{parentContainer:section,itemsContainer:section.querySelector(".itemsContainer"),shape:"autooverflow",sectionTitleTagName:"h2",scalable:!0,coverImage:"MusicArtist"===item.Type||"MusicAlbum"===item.Type,showTitle:!0,showParentTitle:!1,centerText:!0,overlayText:!1,overlayPlayButton:!0,showYear:!0})})}}functionrenderSimilarItems(page,item,context){varsimilarCollapsible=page.querySelector("#similarCollapsible");if(similarCollapsible){if("Movie"!=item.Type&&"Trailer"!=item.Type&&"Series"!=item.Type&&"Program"!=item.Type&&"Recording"!=item.Type&&"Game"!=item.Type&&"MusicAlbum"!=item.Type&&"MusicArtist"!=item.Type&&"Playlist"!=item.Type)returnvoidsimilarCollapsible.classList.add("hide");similarCollapsible.classList.remove("hide");varapiClient=connectionManager.getApiClient(item.ServerId),options={userId:apiClient.getCurrentUserId(),limit:12,fields:"PrimaryImageAspectRatio,UserData,CanDelete"};"MusicAlbum"==item.Type&&item.AlbumArtists&&item.AlbumArtists.length&&(options.ExcludeArtistIds=item.AlbumArtists[0].Id),apiClient.getSimilarItems(item.Id,options).then(function(result){if(!result.Items.length)returnvoidsimilarCollapsible.classList.add("hide");similarCollapsible.classList.remove("hide");varhtml="";html+=cardBuilder.getCardsHtml({items:result.Items,shape:"autooverflow",showParentTitle:"MusicAlbum"==item.Type,centerText:!0,showTitle:!0,context:context,lazy:!0,showDetailsMenu:!0,coverImage:"MusicAlbum"==item.Type||"MusicArtist"==item.Type,overlayPlayButton:!0,overlayText:!1,showYear:"Movie"===item.Type||"Trailer"===item.Type});varsimilarContent=similarCollapsible.querySelector(".similarContent");similarContent.innerHTML=html,imageLoader.lazyChildren(similarContent)})}}functionrenderSeriesAirTime(page,item,isStatic){varseriesAirTime=page.querySelector("#seriesAirTime");if("Series"!=item.Type)returnvoidseriesAirTime.classList.add("hide");varhtml="";if(item.AirDays&&item.AirDays.length&&(html+=7==item.AirDays.length?"daily":item.AirDays.map(function(a){returna+"s"}).join(",")),item.AirTime&&(html+=" at "+item.AirTime),item.Studios.length)if(isStatic)html+=" on "+item.Studios[0].Name;else{varcontext=inferContext(item),href=appRouter.getRouteUrl(item.Studios[0],{context:context,itemType:"Studio",serverId:item.ServerId});html+=' on <a class="textlink button-link" is="emby-linkbutton" href="'+href+'">'+item.Studios[0].Name+"</a>"}html?(html=("Ended"==item.Status?"Aired ":"Airs ")+html,seriesAirTime.innerHTML=html,seriesAirTime.classList.remove("hide")):seriesAirTime.classList.add("hide")}functionrenderTags(page,item){varitemTags=page.querySelector(".itemTags"),tagElements=[],tags=item.Tags||[];"Program"===item.Type&&(tags=[]);for(vari=0,length=tags.length;i<length;i++)tagElements.push(tags[i]);tagElements.length?(itemTags.innerHTML=globalize.translate("sharedcomponents#TagsValue",tagElements.join(", ")),itemTags.classList.remove("hide")):(itemTags.innerHTML="",itemTags.classList.add("hide"))}functionrenderChildren(page,item){varfields="ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,CanDelete,MediaSourceCount",query={ParentId:item.Id,Fields:fields};"BoxSet"!==item.Type&&(query.SortBy="SortName");varpromise,apiClient=connectionManager.getApiClient(item.ServerId),userId=apiClient.getCurrentUserId();"Series"==item.Type?promise=apiClient.getSeasons(item.Id,{userId:userId,Fields:fields}):"Season"==item.Type?(fields+=",Overview",promise=apiClient.getEpisodes(item.SeriesId,{seasonId:item.Id,userId:userId,Fields:fields})):"MusicAlbum"==item.Type||"MusicArtist"==item.Type&&(query.SortBy="ProductionYear,SortName"),promise=promise||apiClient.getItems(apiClient.getCurrentUserId(),query),promise.then(function(result){varhtml="",scrollX=!1,isList=!1,childrenItemsContainer=