1"use strict";(self.webpackChunkx06fb_d671785a_13f2_4fac_9eb0_47d57c004005=self.webpackChunkx06fb_d671785a_13f2_4fac_9eb0_47d57c004005||[]).push([[752],{38187:function(e,t,l){l.r(t),l.d(t,{default:function(){return B}});var o=l(94822),a=l(86326),i=l(20141),n=l(31309),s=l(69977),r=l(86329),u=l(79829),c=l(87532),d=l(97553);var v=(0,d.YK)({empty:{id:"loyalty.watchlist.empty-title",defaultMessage:"No movies"},available:{id:"loyalty.watchlist.available-title",defaultMessage:"Currently on sale"},availableIntro:{id:"loyalty.watchlist.available-message",defaultMessage:"Your watchlist films currently showing or on pre-sale."},unavailable:{id:"loyalty.watchlist.unavailable-title",defaultMessage:"In my list"},unavailableIntro:{id:"loyalty.watchlist.unavailable-message",defaultMessage:"Films on your list that are not yet or no longer showing"}}),g=l(24638),m=l(92398),y=l(86819),f=l(3479),p=l(95853),h=l(18948),b=l(86559),Y=l(12387),x=l(76963);var w=(0,d.YK)({buyTickets:{id:"loyalty.watchlist.item.buy-tickets-label",defaultMessage:"Buy tickets"},notPlaying:{id:"loyalty.watchlist.item.not-playing-label",defaultMessage:"Not playing"},tapToRemove:{id:"loyalty.watchlist.item.tap-to-remove-label",defaultMessage:"Tap to remove from your watch list"},clickToRemove:{id:"loyalty.watchlist.item.click-to-remove-label",defaultMessage:"Click to remove from your watch list"},release:{id:"loyalty.watchlist.item.release-date-title",defaultMessage:"Release date"}}),A=l(5134);const C=e=>{var t,l;let{movie:o,showReleaseDate:n,showBuyTicketsButton:u,showNotPlaying:c,onRemove:d}=e;const v=(0,b.Ay)(),C=(0,y.A)(),{0:M,1:k}=(0,a.useState)(!1),{formatMessage:T}=(0,r.A)(),R=v.intl.locale.long;c=c&&!(null!==(t=o.collections)&&void 0!==t&&t.length);const S=(0,a.useMemo)((()=>T((0,s.CN)()?w.tapToRemove:w.clickToRemove)),[]);return(0,i.Y)(i.xA,{gap:4,sx:{alignContent:"start"}},(0,i.Y)(i.xA,{gap:2},(0,i.Y)("div",{sx:{position:"relative"}},(0,i.Y)(g.A,{poster:o.poster,title:o.title}),(0,i.Y)(m.A,{tip:S,disable:M},(0,i.Y)("div",{role:"button",onClick:()=>{return e=o.id,void(d&&(k(!0),d(e).then((()=>k(!1))).catch((()=>k(!1)))));var e},sx:{display:"flex",position:"absolute",color:"#ff0000",cursor:M?"default":"pointer",fontSize:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"transparent",padding:1,"&:hover, &:focus":{"& > svg":{filter:"drop-shadow(0px 0px 5px rgb(0 0 0 / 0.45))"}}}},M?(0,i.Y)(i.y$,{size:22,color:Y.o.TEXT}):(0,i.Y)(A.A,null)))),(0,i.Y)("div",{sx:{fontSize:3}},(0,i.Y)(p.A,{lines:1},o.title),n&&o.release?(0,i.Y)(i.xA,{gap:2,sx:{fontSize:3}},(0,i.Y)(i.so,{sx:{gap:1,justifyContent:"space-between",flexWrap:"wrap",lineHeight:1.25}},(0,i.Y)("div",{sx:{color:e=>{let{rawColors:t}=e;const l=(0,h.EP)(null==t?void 0:t.background);return l.isLight()?l.shade(40).toHexString():l.tint(40).toHexString()}}},T(w.release)),(0,i.Y)("div",{sx:{textAlign:"right",marginLeft:"auto"}},x.c9.fromISO(o.release,{zone:(null==C?void 0:C.timeZone)||"UTC"}).setLocale(R).toLocaleString()))):null),c&&(0,i.Y)("div",{sx:{color:Y.o.ACCENT,fontSize:3}},T(w.notPlaying))),u&&!(null===(l=o.collections)||void 0===l||!l.includes("ACTIVE_SHOWTIMES"))&&o.path&&(0,i.Y)(i.so,{sx:{justifyContent:"center"}},(0,i.Y)(f.A,{sx:{variant:"buttons.primary"},to:o.path},T(w.buyTickets))))};var M=(0,a.memo)(C);const k=e=>{let{children:t,gap:l=3,title:o,subtitle:a}=e;return(0,i.Y)("div",{className:"panel",sx:{borderStyle:"solid",borderWidth:"thin",borderColor:e=>{let{rawColors:t}=e;const l=(0,h.EP)(null==t?void 0:t.background);return l.isLight()?l.shade(15).toHexString():l.tint(15).toHexString()},borderRadius:"large",padding:8}},(0,i.Y)(i.xA,{gap:l},(0,i.Y)(i.xA,{columns:"1fr auto"},(0,i.Y)("div",null,(0,i.Y)(i.xA,{gap:1},(0,i.Y)(i.IE.h2,null,o),a||null))),t))};var T=(0,a.memo)(k);const R=e=>{let{fetching:t,movies:l,onRemoveFavoriteMovie:o}=e;const{formatMessage:a}=(0,r.A)();null==l||l.sort((0,u.C)(((e,t)=>{var l,o;const a=!(null===(l=e.collections)||void 0===l||!l.length),i=!(null===(o=t.collections)||void 0===o||!o.length);return a&&i?0:a?-1:1})).thenBy((e=>e.release||""),{direction:"asc"}).thenBy((e=>(0,c.fQ)(e.title||"")),{direction:"asc"}));const n=[],d=[];return null==l||l.forEach((e=>{var t;null!==(t=e.collections)&&void 0!==t&&t.includes("ACTIVE_SHOWTIMES")?n.push(e):d.push(e)})),(0,i.Y)(i.xA,{gap:8},(0,i.Y)(T,{title:a(v.available),subtitle:(0,i.Y)(i.IE.p,null,a(v.availableIntro))},t&&(0,i.Y)(i.so,{sx:{justifyContent:"center"}},(0,i.Y)(i.y$,{size:32,color:"currentColor"})),!t&&!(null!=n&&n.length)&&(0,i.Y)("div",null,a(v.empty)),!t&&!(null==n||!n.length)&&(0,i.Y)(i.xA,{gap:(0,s.no)({xs:4,lg:8}),sx:{gridTemplateColumns:(0,s.no)({xs:"repeat(2, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(4, 1fr)"})}},null==n?void 0:n.map((e=>(0,i.Y)(M,{key:e.id,movie:e,showReleaseDate:!0,showBuyTicketsButton:!0,onRemove:o}))))),(0,i.Y)(T,{title:a(v.unavailable),subtitle:(0,i.Y)(i.IE.p,null,a(v.unavailableIntro))},t&&(0,i.Y)(i.so,{sx:{justifyContent:"center"}},(0,i.Y)(i.y$,{size:32,color:"currentColor"})),!t&&!(null!=d&&d.length)&&(0,i.Y)("div",null,a(v.empty)),!t&&!(null==d||!d.length)&&(0,i.Y)(i.xA,{gap:(0,s.no)({xs:4,lg:8}),sx:{gridTemplateColumns:(0,s.no)({xs:"repeat(2, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(4, 1fr)"})}},null==d?void 0:d.map((e=>(0,i.Y)(M,{key:e.id,movie:e,showReleaseDate:!0,showNotPlaying:!0,onRemove:o}))))))};var S=(0,a.memo)(R);const I=e=>{let{layout:t,fetching:l,loading:o,movies:a,onRemoveFavoriteMovie:n}=e;return"BIG"===t?(0,i.Y)(S,{fetching:l,loading:o,movies:a,onRemoveFavoriteMovie:n}):null};var E=(0,a.memo)(I),_=l(71588);const z=e=>{let{layout:t,button:l}=e;const[a]=(0,n.Ay)(),{favoriteMovies:s,removeFavoriteFilm:r,favoriteMoviesFetching:u,favoriteMoviesLoading:c}=(0,_.Ay)(),{data:d,isLoading:v}=(0,o.A)({ids:s.map((e=>Number(e))),basic:!0});if(!a)return null;const g=u||v;return(0,i.Y)(E,{layout:t,button:l,fetching:g,loading:c,movies:d,onRemoveFavoriteMovie:
1async e=>r(e)})};var B=(0,a.memo)(z)}}]);
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.