PageSourceSearch

https://app.sundancetv.com/code/js/chunks/collection.140451444ca569248057.js

js sundancetv.com collected 2026-09-24 20:30:50 UTC 7,790 bytes, 3 lines download raw bytes

1(()=>{(function(){try{var p=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},O=new p.Error().stack;O&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[O]="5df052fe-c7f2-4177-be3d-7625366bba6d",p._sentryDebugIdIdentifier="sentry-dbid-5df052fe-c7f2-4177-be3d-7625366bba6d")}catch(a){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[1171],{34584:((p,O,a)=>{a.r(O),a.d(O,{default:()=>jt});var s=a(96540),j=a(86364),U=a(56347),$=a(94600),B=a(31036),z=a(1346),P=a(68407),dt=a(67354),ut=a(78955),vt=a(12544),ft=a(59530),gt=a(88382),X=a(87585),ht=a(2275),St=a(32248),pt=a(58562),yt=a(90953),mt=a(94962),Ct=a(9849),Et=a(34479),Ot=a(39666),Y=a(72414),K=a(73145),Pt=a(73575),Lt=a(52955),W=a(16231),J=a(55488),Q=a(16505),Tt=a(57224);const Dt=({seriesId:t,seasonId:e,getReadyState:r,CardList:L,series:d,fetchSeries:y,fetchNextSeries:T,season:u,fetchSeasonContent:D,fetchNextSeasonContent:b,trackEvents:g,handleSeasonClick:m,updateSeriesData:A})=>{var C;const F=(0,U.W6)(),I=(0,U.zy)(),{noContentAvailable:h,anErrorOccured:N,addToWatchlist:G}=(0,pt.b0)(["noContentAvailable","anErrorOccured","addToWatchlist"]),[v,q]=s.useState(e),[E,_]=s.useState(t),[M,tt]=s.useState([]),[Vt,et]=(0,Et.M)(),Ft=(0,j.d4)(o=>o.services.session.user.isGuest),Gt=(0,j.d4)(o=>o.services.app.isRtL),{socialSharingStatus:Ht,watchlistsEnabled:$t}=(0,yt.U)(),n=u==null?void 0:u.data[v],l=d==null?void 0:d.data[E],nt=F.action==="POP",H=(0,mt.SO)([W.V7]),lt=H<W.V7,{hasLoginStateChanged:ot}=(0,Lt.O)(),R=(nt||I.hash.includes(J.UT))&&n;s.useEffect(()=>{t?R||_(t):!R&&e&&q(e)},[t,e,R]),s.useEffect(()=>{t&&y(t)},[t]),s.useEffect(()=>{var o,i;l&&!v&&q((i=(o=l.seasons)==null?void 0:o[0])==null?void 0:i.id)},[l]),s.useEffect(()=>{v&&!R&&at(v)},[v,R]),s.useEffect(()=>{ot&&at(v)},[ot]),s.useEffect(()=>{var o,i;if(!(u.data&&v))return;let c;const S=(i=(o=u==null?void 0:u.data[v])==null?void 0:o.series)==null?void 0:i.seriesId;S?c=S:c=Object.keys(d==null?void 0:d.data).find(f=>{var x,it,rt;return Array.isArray((x=d.data[f])==null?void 0:x.seasons)?(rt=(it=d.data[f])==null?void 0:it.seasons)==null?void 0:rt.some(ct=>(ct==null?void 0:ct.id)===v):!1}),c&&(_(c),Object.keys(d.data).map(Number).some(f=>f==c)||y(c))},[u.data,v,d.data]),s.useEffect(()=>{const o=M.some(i=>i.id==(n==null?void 0:n.id));nt||I.hash.includes(J.UT)||n!=null&&n.id&&(l!=null&&l.id)&&!o&&H>W.V7&&zt(l.id,n.id)},[n==null?void 0:n.id,l==null?void 0:l.id,H]);const zt=async(o,i)=>{const c=await Xt(o,i),S={id:n.id,title:n.title,description:n.description,longDescription:n.longDescription,coverUrl:n.coverUrl,smallCoverUrl:n.smallCoverUrl,episodeCount:n.episodeCount,seasonNumber:n.seasonNumber},f=[...c.precedingSeasons,S,...c.followingSeasons];tt(f)},Xt=async(o,i)=>{const c=Q.LV.baseUrl.replace("/v2","/v4");return await Q.LV.get(`${c}/series/${o}/adjacentTo/${i}`)},at=async o=>{await D(o)},Yt=({id:o,type:i,accessLevel:c,title:S})=>{var f;!lt&&d.data[E].seasons&&M.length>0&&(d.data[E].seasons=M,A(d.data[E])),(f=g==null?void 0:g.cardClick)==null||f.call(g,{id:o,type:i,accessLevel:c,title:S,collectionId:n.id})},Kt=()=>u.isFetching?null:s.createElement(L,{contentList:(n==null?void 0:n.episodes)||[],title:"playlist",seasonId:n==null?void 0:n.id,showInlineCards:!0,onCardClick:Yt}),Jt=async o=>{m==null||m(o)},Qt=()=>{var o;b(v),(o=g==null?void 0:g.loadMore)==null||o.call(g,n.id)},st=s.createElement("div",{className:"empty"},s.createElement("span",null,h.value)),Zt=()=>{if(n){const{title:o,episodes:i}=n;if(!(i!=null&&i.length)&&o)return st}else if(!u.isFetching)return st},wt=s.createElement(Ct.O,{handleClick:et,isBadge:!1}),kt=()=>{const o=[],i=t?l==null?void 0:l.socialSharingDetail:n==null?void 0:n.socialSharingDetail,c=t?E:v;return Ht===St.AvailabilityState.ENABLED&&i&&o.push(s.createElement(Y.O,{contentId:c==null?void 0:c.toString(),linkType:t?P.LinkTypes.SERIES:P.LinkTypes.SEASON,shareTitle:t?l==null?void 0:l.title:n==null?void 0:n.title,shareDescription:t?l==null?void 0:l.description:n==null?void 0:n.description,socialSharingDetail:i,iconStyle:Y.p.LIGHT})),$t&&!Ft&&o.push((0,K.It)(wt,G.value,K.C_.RIGHT)),o},qt=()=>{var o,i,c,S,f,x;return!l&&!n?null:{title:(o=n==null?void 0:n.title)!=null?o:l==null?void 0:l.title,titleImage:l==null?void 0:l.titleImage,channelLogo:l==null?void 0:l.channelLogo,tags:[(i=l==null?void 0:l.contentRating)==null?void 0:i.rating],description:(c=n==null?void 0:n.description)!=null?c:l==null?void 0:l.description,backgroundImage:(S=n==null?void 0:n.coverUrl)!=null?S:l==null?void 0:l.coverUrl,year:(x=(f=n==null?void 0:n.year)!=null?f:l==null?void 0:l.year)==null?void 0:x.toString(),extraCtaButtons:kt()}},_t=lt?l==null?void 0:l.seasons:M.length>0?M:l==null?void 0:l.seasons;return l!=null&&l.id?s.createElement(s.Fragment,null,s.createElement(Tt.e,{getReadyState:r,className:t?"collection":"playlist",list:Kt(),hasMoreContent:(C=n==null?void 0:n.paging)==null?void 0:C.moreDataAvailable,fetchNextContentPage:Qt,hasMoreSeasons:l==null?void 0:l.paging.moreDataAvailable,fetchNextSeasonsPage:()=>
1T(E),emptyMessage:Zt(),hero:qt(),seasons:_t,setSeasonList:tt,selectedSeasonId:v,selectSeason:Jt,isLoadingContent:u.isFetching||u.isFetchingNext,error:u.error||d.error?N.value:null,currentSeriesId:l==null?void 0:l.id}),Vt&&s.createElement(Ot.z,{AddToWatchlistPanel:Pt.A,eventId:String(t||e),toggleWatchlistModal:et,contentType:e?P.EContentType.VOD_SEASON:P.EContentType.VOD_SERIES,isRtL:Gt})):null};var bt=Object.defineProperty,At=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?bt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V=(t,e)=>{for(var r in e||(e={}))Mt.call(e,r)&&w(t,r,e[r]);if(Z)for(var r of Z(e))Rt.call(e,r)&&w(t,r,e[r]);return t},k=(t,e)=>At(t,Nt(e));const xt=({match:{params:{seasonId:t,seriesId:e}},season:r,series:L,getReadyState:d,fetchSeasonContent:y,fetchNextSeasonContent:T,fetchSeries:u,updateSeriesData:D,fetchNextSeries:b,setPageTitle:g,history:m})=>{const{routes:A}=s.useContext(ft.P),C=(0,U.zy)(),F={loadMore:(h,N)=>(0,X.u4)(z.Y0.LOAD_MORE,{collectionId:h,page:N}),cardClick:h=>{(0,X.u4)(z.Y0.CARD_CLICK,h)}},I=h=>{const{pathname:N,state:G}=(0,ut.Rw)(P.PlaylistType.SEASON,A,h==null?void 0:h.toString(),null,null,null,null,null,null,C);(0,ht.mH)(N,m,null,G)};return s.useEffect(()=>{if(r.data[t]){const h=r.data[t].title;g(h)}},[r.data]),s.createElement(Dt,{seasonId:parseInt(t,10),seriesId:parseInt(e,10),getReadyState:d,CardList:Bt,series:L,fetchSeries:u,fetchNextSeries:b,season:r,fetchSeasonContent:y,fetchNextSeasonContent:T,trackEvents:F,handleSeasonClick:I,updateSeriesData:D})},Ut=t=>({fetchSeries:e=>t(B.X.fetchRequest({seriesId:e,shouldFetchFirstSeason:!1,rpp:20})),updateSeriesData:e=>t(B.X.fetchSuccess(e)),fetchNextSeries:e=>t(B.X.fetchNextRequest({seriesId:e,rpp:20})),fetchSeasonContent:e=>t($.x.fetchRequest({seasonId:e})),fetchNextSeasonContent:e=>t($.x.fetchNextRequest({seasonId:e})),setPageTitle:e=>t((0,dt.D)([e]))}),It=({season:t,series:e})=>({season:t,series:e}),jt=(0,U.y)((0,j.Ng)(It,Ut)((0,gt.U)(xt))),Bt=t=>{const e=k(V({},t),{contentList:Wt(t.contentList),playlistId:t.seasonId});return s.createElement(vt.A,V({},e))},Wt=t=>t.map(e=>{const{accessLevel:r,badge:L,description:d,duration:y,favourite:T,id:u,maxHeight:D,subEvents:b,thumbnailUrl:g,title:m,type:A,computedReleases:C}=e;return k(V({accessLevel:r,availablePurchases:[]},Object.prototype.hasOwnProperty.call(e,"badge")&&{badge:L}),{description:d,duration:y,favourite:T,id:u,maxHeight:D,subEvents:b,thumbnailUrl:g,title:m,type:A,computedReleases:C})})})}]);})();
2
3//# sourceMappingURL=collection.140451444ca569248057.js.map

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.