"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[98769],{98769:function(e,t,r){r.r(t),r.d(t,{default:function(){return m}});var a=r(24468),i=r(76542),n=r(46782),s=r(8566),o=r(98320),l=r(5898),d=r(76942);function c(){return!n.A.desktop}function m(e,t,r){var m;this.preRender=function(){m=function(e,t){s.Ay.show();var r={Limit:48,Fields:"AirTime",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};return r.ParentId=t.topParentId,ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming",r))}(0,t)},this.renderTab=function(){var e;e=r,m.then((function(t){var r=t.Items;r.length?e.querySelector(".noItemsMessage").style.display="none":e.querySelector(".noItemsMessage").style.display="block",function(e,t){for(var r=[],s="",m=[],u=0,h=t.length;u<h;u++){var p=t[u],y="";if(p.PremiereDate)try{var v=o.Ay.parseISO8601Date(p.PremiereDate,!0);y=o.Ay.isRelativeDay(v,-1)?l.Ay.translate("Yesterday"):o.Ay.toLocaleDateString(v,{weekday:"long",month:"short",day:"numeric"})}catch(e){console.error("error parsing timestamp for upcoming tv shows")}y!=s?(m.length&&r.push({name:s,items:m}),s=y,m=[p]):m.push(p)}for(var f="",g=0,T=r.length;g<T;g++){var I=r[g];f+='<div class="verticalSection">',f+='<h2 class="sectionTitle sectionTitle-cards padded-left">'+I.name+"</h2>";var w=!0;if(c()){w=!1;var A="scrollX hiddenScrollX";n.A.tv&&(A+=" smoothScrollX"),f+='<div is="emby-itemscontainer" class="itemsContainer '+A+' padded-left padded-right">'}else f+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">';f+=a.default.getCardsHtml({items:I.items,showLocationTypeIndicator:!1,shape:(0,d.UI)(c()),showTitle:!0,preferThumb:!0,lazy:!0,showDetailsMenu:!0,centerText:!0,showParentTitle:!0,overlayText:!1,allowBottomPadding:w,cardLayout:!1,overlayMoreButton:!0,missingIndicator:!1}),f+="</div>",f+="</div>"}e.innerHTML=f,i.default.lazyChildren(e)}(e.querySelector("#upcomingItems"),r),s.Ay.hide()}))}}r(1177)}}]);