1"use strict";(globalThis.webpackChunk_telia_company_tv_web_logged_in=globalThis.webpackChunk_telia_company_tv_web_logged_in||[]).push([[309],{"./src/cdp/components/Cdp/hooks/useCdpEngagementAccessEventListener.ts"(e,t,a){a.d(t,{E:()=>n});var o=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/ServiceMessages.js"),r=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const n=({refetch:e})=>{(0,r.useEffect)(()=>{const t=o.ServiceMessages.statics.events.engagementAccess.on(()=>{e()});return()=>{o.ServiceMessages.statics.events.engagementAccess.off(t)}},[e])}},"./src/cdp/components/Cdp/hooks/useCdpMyListEventListener.ts"(e,t,a){a.d(t,{p:()=>n});var o=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/ServiceMessages.js"),r=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const n=({mediaId:e,refetch:t,seriesId:a})=>{(0,r.useEffect)(()=>{const r=o.ServiceMessages.statics.events.myList.on(o=>{(o.mediaIds&&o.mediaIds.some(t=>t===e)||o.seriesIds&&o.seriesIds.some(e=>e===a))&&t()});return()=>{o.ServiceMessages.statics.events.myList.off(r)}},[e,t,a])}},"./src/cdp/components/Cdp/hooks/useCdpNpvrEventListener.ts"(e,t,a){a.d(t,{$:()=>n});var o=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/ServiceMessages.js"),r=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const n=({mediaId:e,refetch:t,seriesId:a})=>{(0,r.useEffect)(()=>{const r=o.ServiceMessages.statics.events.npvr.on(o=>{(o.mediaIds&&o.mediaIds.some(t=>t===e)||o.seriesIds&&o.seriesIds.some(e=>e===a))&&t()});return()=>{o.ServiceMessages.statics.events.npvr.off(r)}},[e,t,a])}},"./src/cdp/components/Cdp/index.ts"(e,t,a){a.d(t,{A:()=>Sa});var o=a("./src/codegen/graphql.ts"),r=a("./src/core/apollo/client.ts"),n=a("./src/shared/components/ui/Button/index.ts"),i=a("./src/shared/hooks/useCallbackAt.ts"),s=a("./src/shared/utils/date/constants.ts"),d=a("./src/shared/utils/getFormattedDate.ts"),c=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),l=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/index.js"),p=a("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const m=({mediaId:e,startTime:t})=>{const[a,m]=(0,c.useState)({days:0,hours:0,minutes:0,seconds:0}),{t:u}=(0,l.Bd)(),g=(0,c.useCallback)(()=>{r.S.query({fetchPolicy:"network-only",query:o.Dp,variables:{id:e}})},[e]);(0,i.s)(t,g);const h=(0,c.useCallback)(e=>{const a=t-e;if(a<0)return!1;const o=Math.floor(a/s.CZ),r=Math.floor(a%s.CZ/s.MA),n=Math.floor(a%s.MA/s.iW),i=Math.floor(a%s.iW/s.OY);return o>=0&&r>=0&&n>=0&&i>=0?(m({days:o,hours:r,minutes:n,seconds:i}),!0):(m({days:0,hours:0,minutes:0,seconds:0}),!1)},[t]);return(0,c.useEffect)(()=>{let e=0;return h(Date.now()),(async()=>{let t=Date.now(),a=0,o=0;const r=n=>{let i=!0;0===a&&(a=n);a!==n&&(o+=n-a,a=n),o>=s.OY&&(t+=o,i=h(t),o=0),i&&(e=window.requestAnimationFrame(r))};e=window.requestAnimationFrame(r)})(),()=>{window.cancelAnimationFrame(e)}},[h]),(0,p.Y)(n.$,{"aria-label":`${u("STARTS_IN")} ${(0,d.p)(a)}`,"data-testid":"countdown-button",disabled:!0,icon:"PlayFill",variant:"countdown",children:(0,d.p)(a)})};var u=a("./src/shared/utils/isDefined.ts");var g=a("../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_react-_23af7fe1a84405345a895683eefe299d/node_modules/@apollo/client/react/hooks/useLazyQuery.js"),h=a("./src/shared/components/ui/Carousel/CarouselContext.tsx"),_=a("./src/shared/components/custom/Portal/index.ts"),y=a("./src/shared/components/custom/SmartLink/index.ts"),E=a("./src/shared/components/ui/Modal/index.ts");const b=({onAbort:e,visible:t})=>{const{t:a}=(0,l.Bd)();return(0,p.Y)(E.aF,{actions:[{label:a("CANCEL"),onClick:e,variant:"secondary"},{as:y.i,href:a("branding:EMAIL_RESET_URL"),label:a("EMAIL_MISSING_BUTTON_LABEL"),variant:"primary"}],onHide:e,overlayEventTrackingData:{overlay_title:a("EMAIL_REQUIRED_MESSAGE_TITLE")},title:a("EMAIL_REQUIRED_MESSAGE_TITLE"),visible:t,children:(0,p.Y)("p",{children:a("EMAIL_REQUIRED_MESSAGE_DESCRIPTION")})})},v=({onAbort:e,onContinue:t,visible:a})=>{const{t:o}=(0,l.Bd)();return(0,p.Y)(E.aF,{actions:[{label:o("RENTALS_GEOBLOCK_MODAL_SECONDARY_BUTTON"),onClick:t,variant:"ghost"},{label:o("RENTALS_GEOBLOCK_MODAL_PRIMARY_BUTTON"),onClick:e,variant:"primary"}],onHide:e,overlayEventTrackingData:{overlay_title:"rental-geoblocking"},title:o("RENTALS_GEOBLOCK_MODAL_TITLE"),visible:a,children:(0,p.Y)("p",{children:o("RENTALS_GEOBLOCK_MODAL_DESCRIPTION")})})};var S=a("./src/core/analytics/tracker.ts"),f=a("./src/shared/components/ui/Celler/Celler.tsx"),A=a("./src/shared/components/ui/FormErrorMessage/index.ts"),x=a("./src/shared/utils/image/getImageUrl.ts"),T=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),I=a("./src/shared/utils/breakpoints/mq.ts"),R=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),k=a("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-blurhash/dist/esm/index.js"),C=function(e){return e.DESCRIPTION="description",e.IMAGE="image",e.TITLE="title",e}(C||{});const D=86,w=67,O=176,M=140,L=(0,T.A)("div",{target:"e1wk6x5h4"})("position:relative;display:grid;grid-template-areas:'",C.IMAGE," ",C.TITLE,"' '",C.IMAGE," ",C.DESCRIPTION,"' '",C.IMAGE," ..';grid-template-columns:",w,"px auto;column-gap:16px;row-gap:8px;align-content:flex-start;min-height:",M,"px;box-sizing:border-box;padding:25px ",2*E.Mn+E.ix,"px 25px 16px;",I.mq.L` 2 padding: 24px ${2*E.Mn+E.ix}px 24px 24px; 3 grid-template-columns: ${D}px auto; 4 min-height: ${O}px; 5 `,">*{position:relative;}"),P=(0,T.A)("h1",{target:"e1wk6x5h3"})(R.ue.typography.headingSecondary," grid-area:",C.TITLE,";margin-bottom:0;max-width:fit-content;white-space:pre-line;"),N=(0,T.A)("p",{target:"e1wk6x5h2"})(R.ue.typography.textPrimary," color:",R.ue.color.text.primary,";grid-area:",C.DESCRIPTION,";margin:0;white-space:pre-line;"),U=(0,T.A)("img",{target:"e1wk6x5h1"})("grid-area:",C.IMAGE,";object-fit:contain;max-width:100%;"),Y=(0,T.A)(k.Q,{shouldForwardProp:e=>"dominantColor"!==e&&"backgroundColor"!==e,target:"e1wk6x5h0"})("position:absolute!important;top:0;bottom:0;left:0;right:0;canvas{object-fit:cover;object-position:center top;}&::after{content:'';position:absolute;top:0;left:0;bottom:0;right:0;background-color:",({backgroundColor:e})=>e??R.ue.color.background.primary,";opacity:0.5;}"),F=({blurHash:e,description:t,dominantColor:a,imageSrc:o,title:r})=>(0,p.FD)(L,{children:[(0,u.O)(e)&&(0,p.Y)(Y,{"aria-hidden":"true",backgroundColor:a,hash:e,height:"100%",width:"100%"}),(0,p.Y)(U,{"aria-hidden":"true",src:(0,x.V)({height:128,uri:o,width:86})}),(0,p.Y)(P,{children:r}),(0,p.Y)(N,{children:t})]});const B=(0,T.A)("label",{target:"ejus7893"})({name:"1nwmmmo",styles:"display:inline-flex;gap:8px;
5cursor:pointer"}),j=(0,T.A)("div",{target:"ejus7892"})("display:inline-flex;align-items:center;background-color:",R.ue.color.button.secondaryDefault,";border:1px solid ",R.ue.color.border.backgroundSurface,";width:16px;height:16px;vertical-align:middle;border-radius:1.6px;svg{path{stroke:",R.ue.color.text.primary,";opacity:",({checked:e})=>e?"1":"0",";transition:opacity 0.2s;will-change:opacity;}}"),H=(0,T.A)("input",{target:"ejus7891"})({name:"eivff4",styles:"display:none"}),G=(0,T.A)("span",{target:"ejus7890"})(R.ue.typography.textPrimary," margin-top:-5px;"),q=({checked:e,children:t,dangerouslySetInnerHTML:a,onChange:o,...r})=>{const n=()=>o?.(!e);return(0,p.FD)(B,{...r,children:[(0,p.FD)(j,{"aria-checked":e,checked:e,onKeyDown:e=>{const t="Space"===e.code||" "===e.key,a="Enter"===e.code||"Enter"===e.key;(t||a)&&n()},role:"checkbox",tabIndex:0,children:[(0,p.Y)(H,{checked:e,onChange:n,type:"checkbox"}),(0,p.Y)(R.PA,{"aria-hidden":"true",name:"Check"})]}),a?(0,p.Y)(G,{dangerouslySetInnerHTML:a}):t?(0,p.Y)(G,{children:t}):null]})};var $=a("./src/shared/components/ui/Modal/Modal.tsx");const V=(0,T.A)($.a,{target:"e1ih2wwv2"})("background-color:",({backgroundColor:e})=>e,";"),Q=(0,T.A)("div",{target:"e1ih2wwv1"})("display:flex;flex-flow:column;row-gap:24px;padding-top:16px;",I.mq.M` 6 padding-top: 24px; 7 `,";"),z=(0,T.A)(q,{target:"e1ih2wwv0"})({name:"1xxtehu",styles:"a{text-decoration:underline;}"}),W=({allowVoucher:e,blurHash:t,defaultChargingType:a,description:o,dominantColor:r,imageSrc:n,mediaId:i,onAbort:s,onContinue:d,prepaids:m,purchaseOption:g,purchaseType:h,title:_,visible:y})=>{const{t:E}=(0,l.Bd)(),[b,v]=(0,c.useState)(!1),[x,T]=(0,c.useState)(null),I=(0,c.useMemo)(()=>{const t=[{id:"INVOICE",label:E("INVOICE"),value:"INVOICE"}];return(0,u.O)(m)&&m.remaining>0&&e&&t.push({description:E("FREE_RENTALS_REMAINING",{prepaidRemaining:m.remaining}),id:"VOUCHER",label:E("FREE_RENTAL_MOVIE"),value:"VOUCHER"}),t},[m,E,e]),[R,k]=(0,c.useState)(a||I[0]?.value),C="VOUCHER"===R?E("FREE"):g?.priceReadable,D={blurHash:t,description:o,dominantColor:r,imageSrc:n,title:_},w=b&&(0,u.O)(R),O=_??"rental-media",M=(0,c.useMemo)(()=>({category:h,content_media_id:i,overlay_title:O}),[h,i,O]);return(0,c.useEffect)(()=>{y&&S.F.trackConfirmationImpression({category:h,content_id:i,content_type:"media",promotion_title:_})},[y,h,i,_]),(0,p.Y)(V,{actions:[{label:`${E("CONFIRM_TITLE")} ${C}`,onClick:()=>{w?d({chargingType:R,mediaId:i}):b?(0,u.O)(R)||T(E("PAYMENT_METHOD_REQUIRED")):T(E("PURCHASE_TERMS_REQUIRE_ACCEPT"))},variant:"pay"}],actionsPlacement:"center",backgroundColor:r,header:(0,p.Y)(F,{...D}),onHide:s,overlayEventTrackingData:M,visible:y,children:(0,p.FD)(Q,{children:[(0,p.Y)(f.S,{defaultItemId:R,items:I,onItemSelected:e=>{k(e),T(null)},title:E("ASK_PAYMENT_METHOD")}),(0,p.Y)(z,{checked:b,dangerouslySetInnerHTML:{__html:E("PURCHASE_TERMS_CONFIRMATION_TEXT")},onChange:e=>{v(e),T(null)}}),x&&(0,p.Y)("div",{"aria-live":"polite",role:"alert",children:(0,p.Y)(A.W,{children:x})})]})})};var K=a("./src/profiles/providers/UserProvider/UserProvider.tsx"),Z=a("./src/shared/hooks/useForgotPinCode.ts");const J=(0,T.A)("span",{target:"e1fzebbt0"})("font-weight:",R.ue.typography.textPrimaryEmphasis.fontWeight,";"),X=({onAbort:e,visible:t})=>{const{t:a}=(0,l.Bd)(),{forgotPinCode:o}=(0,Z.L)(),{userEmail:r}=(0,K.u)();return(0,p.FD)(E.aF,{actions:[{label:a("CANCEL"),onClick:e,variant:"secondary"},{label:a("SEND_EMAIL"),onClick:async()=>{e(),await o()},variant:"primary"}],onHide:e,overlayEventTrackingData:{overlay_title:a("PINCODE_REQUIRED_MESSAGE_TITLE")},title:a("PINCODE_REQUIRED_MESSAGE_TITLE"),visible:t,children:[(0,p.Y)("p",{children:a("PINCODE_REQUIRED_MESSAGE_DESCRIPTION_ONE")}),(0,p.Y)(l.x6,{i18nKey:"PINCODE_REQUIRED_MESSAGE_DESCRIPTION_TWO",t:a,tOptions:{interpolation:{escapeValue:!1}},values:{userEmail:r},children:(0,p.Y)(J,{})})]})};var ee=a("./src/shared/components/custom/PINCodeModal/index.ts"),te=a("../../../node_modules/.pnpm/@[email protected]_@telia-company+tv.common-sdk-authenticat_eff6e477fccb3c1035e3d63ff0e72c04/node_modules/@telia-company/tv.common-sdk-legacy-pack/dist/Credentials.js"),ae=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs");const oe=({mediaId:e,onAbort:t,onSuccess:a,purchaseType:o,visible:r})=>{const[n,i]=(0,c.useState)(),{t:s}=(0,l.Bd)(),d=(0,ae.zy)(),{forgotPinCode:m}=(0,Z.L)(),u=s("RENTAL"===o?"ENTER_PIN_TO_ABLE_RENT":"ENTER_PIN_TO_PURCHASE");return(0,p.Y)(ee.uR,{bounce:Boolean(n),category:o,description:u,errorMessage:n,mediaId:e,onClickForgotPinCode:m,onHide:()=>{i(void 0),t()},onSubmit:async e=>{const t=te.Credentials.instance();i(void 0);const r=await t.validatePin(e);S.F.trackPinEntry({category:o,page_name:{id:"graph_provided_page",params:{pageName:d.pathname}},pin_valid:r}),r?a({pinCode:e}):i(s("CHARGING_CREDENTIALS_INVALID"))},title:s("ENTER_PIN"),visible:r})};var re=a("./src/shared/components/ui/Snackbar/index.ts"),ne=a("./src/shared/hooks/useIsGeoblocked.ts"),ie=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@telia-company/tv.common-sdk-authentication/dist/Account.js"),se=a("../../../node_modules/.pnpm/@[email protected]_@telia-company+tv.common-sdk-authenticat_eff6e477fccb3c1035e3d63ff0e72c04/node_modules/@telia-company/tv.common-sdk-legacy-pack/dist/ErrorTypes.js"),de=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/CacheManager.js"),ce=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/Config.js"),le=a("../../libs/error-monitoring/dist/index.mjs");let pe=function(e){return e.RESET="MEDIA_PURCHASE_ACTION_TYPE_RESET",e.SET_FLOW_STATE="MEDIA_PURCHASE_ACTION_TYPE_SET_FLOW_STATE",e.SET_METADATA="MEDIA_PURCHASE_ACTION_SET_METADATA",e.SET_METADATA_LOADING="MEDIA_PURCHASE_ACTION_SET_METADATA_LOADING",e.SET_PURCHASE_STATE="MEDIA_PURCHASE_ACTION_TYPE_SET_PURCHASE_STATE",e.SET_SELECTED="MEDIA_PURCHASE_ACTION_TYPE_SET_SELECTED",e}({}),me=function(e){return e.ERROR="MEDIA_PURCHASE_FLOW_PURCHASE_STATE_ERROR",e.IDLE="MEDIA_PURCHASE_FLOW_PURCHASE_STATE_IDLE",e.LOADING="MEDIA_PURCHASE_FLOW_PURCHASE_STATE_LOADING",e.SUCCESS="MEDIA_PURCHASE_FLOW_PURCHASE_STATE_SUCCESS",e}({}),ue=function(e){return e.EMAIL_REQUIRED_MESSAGE="EMAIL_REQUIRED_MESSAGE",e.GEO_BLOCK="MEDIA_PURCHASE_FLOW_STATE_GEO_BLOCK",e.IDLE="MEDIA_PURCHASE_FLOW_STATE_IDLE",e.MEDIA_PURCHASE_MODAL="MEDIA_PURCHASE_FLOW_STATE_MEDIA_PURCHASE_MODAL",e.PIN_CODE="MEDIA_PURCHASE_FLOW_STATE_PIN_CODE",e.PIN_REQUIRED_MESSAGE="PIN_REQUIRED_MESSAGE",e.PURCHASING="MEDIA_PURCHASE_FLOW_STATE_PURCHASING",e}({}),ge=function(e){return e.PROGRESS="PROGRESS",e.REVERSE="REVERSE",e}({});var he=a("./src/shared/errors/InvalidInputError.ts"),_e=a("../../../node_modules/.pnpm/@[email protected]_@telia-company+tv.common-sdk-authenticat_eff6e477fccb3c1035e3d63ff0e72c04/node_modules/@telia-company/tv.common-sdk-legacy-pack/dist/MediaPurchases.js");const ye={flowState:ue.IDLE,metadata:{description:"",imageSrc:"",loading:!1,purchaseOption:null,purchaseType:"RENTAL",title:""},purchase:{state:me.IDLE},selected:{}},Ee=(e,t)=>{switch(t.type){case pe.RESET:return{...ye};case pe.SET_FLOW_STATE:return{...e,flowState:t.state};case pe.SET_METADATA:return{...e,metadata:{...e.metadata,...t.metadata}};case pe.SET_METADATA_LOADING:return{...e,metadata:{...e.metadata,loading:t.loading}};case pe.SET_PURCHASE_STATE:return{...e,purchase:{...e.purchase,...t.purchase}};case pe.SET_SELECTED:return{...e,selected:{...e.selected,...t.selected}};default:return e}};var be=a("../../../node_modules/.pnpm/[email protected][email protected]/node_modules/i18next/dist/esm/i18next.js");const ve=async({mediaId:e,purchaseType:t})=>{const{data:a}=await r.S.query({fetchPolicy:"cache-first",query:o.bVt,variables:{id:e}}),n=a?.movie||a?.episode,i=n?.playback,s=(({playback:e,purchaseType:t})=>"EST"===t&&e?.buy&&"est"in e.buy?e.buy?.est?.find(e=>e.priceId)?.priceId:"RENTAL"===t&&e?.buy&&"rental"in e.buy?e.buy?.rental?.find(e=>e.priceId)?.priceId:void 0)({playback:i,purchaseType:t}),d=_e.J.instance(),c=await d.getRentalPrepaids();if(!(0,u.O)(s))throw new Error(`No priceId for media: ${e}`);const l=await d.preparePurchase(e,s);if(!(0,u.O)(l))throw new Error(`Received no prepare data for media: ${e}`);const p={chargingType:0===c.remaining?"INVOICE":void 0},m="EST"===t?(0,be.t)("BUY"):l?.duration?(e=>{const t=e/1e3/3600,a=t<1?(0,be.t)("X_MINUTES_SHORT",{min:Math.floor(60*t)}):(0,be.t)("X_HOURS_SHORT",{hours:Math.floor(t)});return`${(0,be.t)("RENTAL_TIME")}: ${a}`})(l.duration):"",g=(()=>
7{if(a?.episode){const e=n?.title||"",t=a.episode.series?.title||"",o=a.episode.seasonNumber?.number,r=a.episode.episodeNumber?.number;if(null!=o&&o>0&&null!=r&&r>0&&t&&e)return`${t} - S${o}E${r} - ${e}`;if(t&&e)return`${t} - ${e}`;if(e)return e;if(t)return t}return n?.title||""})();return{metadata:{blurHash:n?.images.backdrop16x9?.colors?.blurHash??void 0,description:m,dominantColor:n?.images.backdrop16x9?.colors?.muteBgColor?.hex??void 0,imageSrc:n?.images.showcard2x3?.source||"",loading:!1,prepaids:c,purchaseOption:l,purchaseType:t,title:g},selected:p}},Se=({action:e,state:t})=>{const a=(({action:e,state:t})=>e.type===pe.SET_SELECTED&&e.selected?.mediaId?e.selected.mediaId:t.selected?.mediaId)({action:e,state:t}),o=(({action:e,state:t})=>e.type===pe.SET_METADATA?e.metadata?.purchaseType:t?.metadata?.purchaseType)({action:e,state:t}),r=(({action:e,state:t})=>e.type===pe.SET_METADATA?e.metadata?.title:t?.metadata?.title)({action:e,state:t})||"";if((0,u.O)(o)&&(0,u.O)(a)){if(!(({action:e,state:t})=>e.type===pe.SET_SELECTED&&(0,u.O)(e.selected?.mediaId)&&!(0,u.O)(t.selected?.mediaId))({action:e,state:t}))return(({action:e,state:t})=>e.type===pe.SET_FLOW_STATE&&t.flowState===ue.MEDIA_PURCHASE_MODAL&&(e.state===ue.PIN_CODE||e.state===ue.PURCHASING))({action:e,state:t})?(({mediaId:e,purchaseType:t,title:a})=>S.F.trackConfirmationClick({category:t,content_id:e,content_type:"media",promotion_title:a}))({mediaId:a,purchaseType:o,title:r}):(({action:e,state:t})=>e.type===pe.SET_FLOW_STATE&&e.state===ue.PIN_CODE&&t.flowState!==ue.PIN_CODE)({action:e,state:t})?(({mediaId:e,purchaseType:t})=>S.F.trackOverlay({category:t,content_id:e,content_type:"media",overlay_title:"PIN_CODE"}))({mediaId:a,purchaseType:o}):(({action:e,state:t})=>t.flowState===ue.PURCHASING&&e.type===pe.SET_PURCHASE_STATE&&e.purchase.state===me.SUCCESS)({action:e,state:t})?(({mediaId:e,purchaseType:t,title:a})=>S.F.trackOrderConfirmed({category:t,content_id:e,content_type:"media",promotion_title:a}))({mediaId:a,purchaseType:o,title:r}):void 0;(({mediaId:e})=>{S.F.trackAssetAction({action_type:"mngmt_rent_or_purchase",content_id:e,content_type:"media"})})({mediaId:a})}},fe={[ue.EMAIL_REQUIRED_MESSAGE]:{[ge.PROGRESS]:()=>ue.IDLE,[ge.REVERSE]:()=>ue.IDLE},[ue.GEO_BLOCK]:{[ge.PROGRESS]:()=>ue.MEDIA_PURCHASE_MODAL,[ge.REVERSE]:()=>ue.IDLE},[ue.IDLE]:{[ge.PROGRESS]:({hasUserEmail:e,isGeoblocked:t,isInitialPinSetRequired:a})=>t?ue.GEO_BLOCK:!e&&a?ue.EMAIL_REQUIRED_MESSAGE:a?ue.PIN_REQUIRED_MESSAGE:ue.MEDIA_PURCHASE_MODAL,[ge.REVERSE]:()=>ue.IDLE},[ue.MEDIA_PURCHASE_MODAL]:{[ge.PROGRESS]:({isPinActive:e})=>e?ue.PIN_CODE:ue.PURCHASING,[ge.REVERSE]:()=>ue.IDLE},[ue.PIN_CODE]:{[ge.PROGRESS]:()=>ue.PURCHASING,[ge.REVERSE]:()=>ue.MEDIA_PURCHASE_MODAL},[ue.PIN_REQUIRED_MESSAGE]:{[ge.PROGRESS]:()=>ue.IDLE,[ge.REVERSE]:()=>ue.IDLE},[ue.PURCHASING]:{[ge.PROGRESS]:()=>ue.IDLE,[ge.REVERSE]:()=>ue.MEDIA_PURCHASE_MODAL}},Ae=()=>{const[e,t]=(0,c.useReducer)(Ee,ye),{addSnackbar:a}=(0,re.k)(),{t:o}=(0,l.Bd)(),r=(0,ne.p)(),n={current:e};n.current=e;const i=e=>{Se({action:e,state:n.current});const a=Ee(n.current,e);n.current=a,t(e)},s=(e=o("ERRORS_S_110"))=>a({content:e,dismissOnActionClick:!0,variant:"negative"});(0,c.useEffect)(()=>{if(e.flowState!==ue.PURCHASING)return;if(e.purchase.state!==me.IDLE)return;i({purchase:{state:me.LOADING},type:pe.SET_PURCHASE_STATE});(async()=>{try{const{mediaId:t}=await(async({chargingType:e,mediaId:t,pinCode:a,purchaseOption:o})=>{if(!(0,u.O)(o)||!(0,u.O)(t))throw new he.o("withRent.mediaPurchase","Tried to purchase media without rental options set!");const r=_e.J.instance(),n="VOUCHER"===e;return await r.commitPurchase(o,{pinCode:a,usePrepaid:n}),{mediaId:t}})({...e.selected,purchaseOption:e.metadata.purchaseOption});i({purchase:{mediaId:t,state:me.SUCCESS},type:pe.SET_PURCHASE_STATE}),p()}catch(t){const a=new Error(`Error purchasing media: "${e.selected.mediaId}"`,{cause:t});(0,le.vV)(a,{context:"useMediaPurchaseFlow.commitMediaPurchase"}),i({purchase:{error:a,state:me.ERROR},type:pe.SET_PURCHASE_STATE}),t instanceof se.RentNotAllowedPrepaidError?s(o("ERRORS_S_20017")||void 0):s(),m()}})()},[e.flowState]);const d=async(e,t)=>{const a=te.Credentials.instance(),o=await a.isPinSet(),n=o&&await a.isPinActive(),i=ce.Config.get("subscription/purchase/pin/required")&&!o,s=ie.Account.instance(),{email:d}=await s.getAccountInformation(),c=Boolean(d);return fe[e][t]({hasUserEmail:c,isGeoblocked:r,isInitialPinSetRequired:i,isPinActive:n})},p=async t=>{(0,u.O)(t)&&i({selected:t,type:pe.SET_SELECTED});const a=await d(e.flowState,ge.PROGRESS);i({state:a,type:pe.SET_FLOW_STATE})},m=()=>i({type:pe.RESET});return{abortFlow:m,progressFlow:p,reverseFlow:async()=>{const t=await d(e.flowState,ge.REVERSE);i({state:t,type:pe.SET_FLOW_STATE})},startFlow:async({mediaId:e,purchaseType:t})=>{(async()=>{de.CacheManager.instance().clearCacheClass("common-sdk-authentication/abstractions/data/AccountIF")})(),i({metadata:{...ye.metadata,purchaseType:t},type:pe.SET_METADATA}),i({selected:{mediaId:e},type:pe.SET_SELECTED}),(async({mediaId:e,purchaseType:t})=>{try{const{metadata:a,selected:o}=await ve({mediaId:e,purchaseType:t}),r=await d(ue.IDLE,ge.PROGRESS);i({state:r,type:pe.SET_FLOW_STATE}),i({loading:!0,type:pe.SET_METADATA_LOADING}),i({metadata:a,type:pe.SET_METADATA}),i({selected:{...o,mediaId:e},type:pe.SET_SELECTED})}catch(t){(0,le.vV)(new Error(`Error fetching media purchase data for media ${e}`,{cause:t}),{context:"useMediaPurchaseFlow.prepareMediaPurchase"}),s(),m()}finally{i({loading:!1,type:pe.SET_METADATA_LOADING})}})({mediaId:e,purchaseType:t})},state:e}};var xe=a("./src/shared/utils/getRefetchQueries.ts");const Te=(e=>{const t=t=>{const{abortFlow:a,progressFlow:o,reverseFlow:r,startFlow:n,state:i}=Ae(),s=i.flowState!==ue.IDLE,d=(0,c.useCallback)(n,[]),l=Boolean(i?.metadata?.purchaseOption?.chargingTypes.includes("VOUCHER")),{mediaId:m,purchaseType:u}=t;return(0,p.FD)(p.FK,{children:[(0,p.Y)(e,{...t,isPurchasing:s,purchase:d,purchaseState:i.purchase}),(0,p.FD)(_.Z,{children:[(0,p.Y)(v,{onAbort:a,onContinue:o,visible:i.flowState===ue.GEO_BLOCK}),(0,p.Y)(b,{onAbort:a,visible:i.flowState===ue.EMAIL_REQUIRED_MESSAGE}),(0,p.Y)(X,{onAbort:a,visible:i.flowState===ue.PIN_REQUIRED_MESSAGE}),(0,p.Y)(W,{...i.metadata,allowVoucher:l,defaultChargingType:i.selected.chargingType,mediaId:m,onAbort:a,onContinue:o,purchaseOption:i.metadata.purchaseOption,purchaseType:u,visible:Boolean(i.flowState===ue.MEDIA_PURCHASE_MODAL&&!i.metadata.loading&&i.metadata.purchaseOption)}),(0,p.Y)(oe,{mediaId:m,onAbort:r,onSuccess:o,purchaseType:u,visible:i.flowState===ue.PIN_CODE})]})]})};return t.displayName=`withMediaPurchase(${e.displayName})`,t})(({episodeNumber:e,isPurchasing:t,mediaId:a,price:i,purchase:s,purchaseState:d,purchaseType:m,seasonNumber:_,seriesId:y,variant:E="pay"})=>{const{t:b}=(0,l.Bd)(),v=(0,h.R)(),[S]=(0,g._)(o.iZO,{fetchPolicy:"network-only"}),f=(0,u.O)(_)&&(0,u.O)(e),A=`${b("EST"===m?"BUY":"RENT")} ${i}`,x=A+(f?` (${b("SEASON_X_SHORT",{seasonNumber:_?.number})}, ${b("EPISODE_X_SHORT",{episodeNumber:e?.number})})`:""),T=A+(f?`, ${_?.readable}, ${e?.readable}`:"");return(0,c.useEffect)(()=>
7{if(d.state!==me.SUCCESS)return;(0,xe.O)({refreshEvent:o._am.Rental}).forEach(e=>r.S.query(e)),(async()=>{const e=[{id:a,type:o.Lzu.Media}];(0,u.O)(y)&&e.push({id:y,type:o.Lzu.Series}),await S({variables:{config:{ids:e}}})})()},[d.state]),(0,c.useEffect)(()=>{(0,u.O)(v)&&v.setAutoplay(!t)},[v,t]),(0,p.Y)(n.$,{"aria-label":T,"data-testid":"media-purchase-button","data-type":"media-purchase-button",isLoading:t,onClick:()=>{s({mediaId:a,purchaseType:m})},variant:E,children:x})});var Ie=a("./src/watch/utils/isValidTimeframe.ts"),Re=a("./src/shared/utils/buttonRenderers/getPlayableMedia.ts");var ke=a("./src/cdp/utils/getCdpUpsellData/getCdpUpsellData.ts"),Ce=a("./src/shared/components/custom/SmartLink/SmartLink.tsx");const De=(0,T.A)(n.$,{target:"e14j6eu80"})({name:"18t36v3",styles:"padding:12px 24px;margin:8px"}),we=e=>"Series"===e?.__typename&&"Playback"===e?.suggestedEpisode?.playback?.__typename;var Oe=a("./src/shared/utils/buttonRenderers/getMutationCapabilityButtonRenderer/getMutationCapabilityButtonRenderer.tsx"),Me=a("./src/shared/components/ui/Modal/Modal.styles.ts");const Le=(0,T.A)(E.aF,{target:"eow1w4y4"})("z-index:10;background:rgba(\n 255,\n 255,\n 255,\n 0.15\n );backdrop-filter:blur(45px);",Me.lP,"{padding:0 16px;}"),Pe=(0,T.A)(Me.Ob,{target:"eow1w4y3"})({name:"1mi8891",styles:"display:flex;justify-content:center;text-align:center"}),Ne=(0,T.A)("p",{target:"eow1w4y2"})("display:flex;justify-content:center;color:",R.ue.color.text.primary,";margin-bottom:8px;",I.mq.M` 8 margin-bottom: 16px; 9 `,";",R.ue.typography.headingSubHeading,";"),Ue=(0,T.A)("ul",{target:"eow1w4y1"})("display:flex;flex-direction:column;max-height:50vh;list-style:none;padding:0 16px;overflow-y:auto;gap:16px;margin-bottom:8px;::-webkit-scrollbar{width:10px;}::-webkit-scrollbar-track{background:rgba(255, 255, 255, 0.15);border-radius:5px;}::-webkit-scrollbar-thumb{background:transparent;border:2px solid rgba(255, 255, 255, 0.15);border-radius:10px;}::-webkit-scrollbar-thumb:hover{background:rgba(255, 255, 255, 0.15);border:none;}button{border-radius:4px;background:rgba(\n 255,\n 255,\n 255,\n 0.15\n );color:",R.ue.color.text.primary,";text-align:center;width:100%;}"),Ye=(0,T.A)("li",{target:"eow1w4y0"})(),Fe=({buttonRenderers:e,description:t,header:a,onHide:o,visible:r})=>(0,p.FD)(Le,{header:(0,p.Y)(Pe,{children:a}),onHide:o,overlayEventTrackingData:{overlay_title:a},visible:r,children:[t&&(0,p.Y)(Ne,{children:t}),(0,p.Y)(Ue,{role:"list",children:e.map((e,t)=>(0,p.Y)(Ye,{children:e({onHide:o,variant:"secondary"})},t))})]}),Be=({buttonRenderers:e,iconName:t,modalDescription:a,modalHeader:o,text:r,useTooltip:i,variant:s})=>{const[d,l]=(0,c.useState)(!1),m=i&&"secondary"===s&&null!==r?r:void 0,u=m?void 0:r;return(0,p.FD)(p.FK,{children:[(0,p.Y)(n.$,{"aria-label":r,"data-testid":`${t}-group-button`,icon:t,onClick:()=>l(!0),tooltipText:m,variant:s,children:u}),(0,p.Y)(_.Z,{children:(0,p.Y)(Fe,{buttonRenderers:e,description:a,header:o,onHide:()=>l(!1),visible:d})})]})};var je=a("./src/page/utils/getPosterLink.ts");const He=({linkCapability:e})=>{const{analytics:t,link:a,linkIcon:o,text:r}=e;let i=(0,je.w)(a);if("LinkChangeStreamingServiceTier"===a.__typename&&(i=((e,t)=>{if(!ce.Config.get("subscription/vasStandalone/enabled"))return e;if("LinkChangeStreamingServiceTier"!==t.link.__typename)return e;const a=t.analytics?.content_id;if(!a)return e;const o=ce.Config.get("shared/services/host"),r=`${globalThis.location.pathname}${globalThis.location.search}${globalThis.location.hash}`,n=o?new URL(r,o).toString():`${globalThis.location.origin}${r}`;return`${e}?${new URLSearchParams({contentId:a,contentType:"MEDIA",intent:"CHANGE",returnUrl:n}).toString()}`})(i??"",e)),!i)return;const s=o?(0,R.iD)(o.name):void 0;return()=>(0,p.Y)(n.$,{as:y.i,href:i,...s&&{icon:s},...t&&{onClick:()=>{S.F.trackAssetAction({action_type:t.action_type,content_id:t.content_id,content_type:t.content_type}),S.F.releaseEvents()}},variant:"secondary",children:r})};var Ge=a("./src/shared/utils/buttonRenderers/getPlayButtonRenderer/index.ts");var qe=a("./src/cdp/utils/getCdpUpsellData/utils/isSupportedSubscription.ts");const $e=e=>{const t=(0,Re.j)(e);if(!(0,u.O)(t))return;const a=t.playback;if(!(0,u.O)(a))return;const o=a.buy?.subscriptions?.filter(u.O).map(e=>e.item),r=o?.filter(qe.g),n=r?.find(e=>"SubscriptionProductSelection"===e?.__typename);return n?.packageId?n:void 0};var Ve=a("./src/shared/utils/getSelectionMenuUrl.ts");var Qe=a("./src/shared/utils/buttonRenderers/getStartOverButtonRenderer/index.ts"),ze=a("./src/shared/components/ui/Button/Button.tsx"),We=a("./src/watch/utils/getPlayerLink.ts");const Ke=({playbackSpec:e,useTooltip:t,variant:a})=>{const{t:o}=(0,l.Bd)(),r=(0,We.w)({id:e.videoId,trailer:!0}),n=o("TRAILER"),i=t&&"secondary"===a?n:void 0,s=i?void 0:n;return(0,p.Y)(ze.$,{"aria-label":n,as:Ce.i,"data-testid":"trailer-button",href:r,icon:"Trailer",tooltipText:i,variant:a,children:s})};var Ze=a("./src/shared/utils/buttonRenderers/getWatchLiveButtonRenderer/index.ts"),Je=a("./src/shared/utils/platform/isHandheldDevice.ts");const Xe=[({media:e})=>
9{if(!(0,u.O)(e))return;if(!((e=>"Movie"===e?.__typename&&"Playback"===e?.playback?.__typename)(e)||(e=>"SportEvent"===e?.__typename)(e)||(e=>"Episode"===e?.__typename)(e)||we(e)))return;const t=(0,ke.B)(e);if(!t?.showCta)return;const a=t?.ctaButtonUrl,o=t?.ctaButtonLabel,r=e.id,n=()=>{S.F.trackAssetAction({action_type:"mngmt_subscription_upsell",content_id:r,content_type:we(e)?"series":"media"})};return()=>(0,p.Y)(De,{as:Ce.i,"data-testid":"cdp-cta-button",href:a,onClick:n,variant:"primary",children:o})},({media:e})=>{if(!(0,u.O)(e))return;if(!ce.Config.get("cdp/upgradeRequiredAlert/showProviderName"))return;const t=$e(e);if(!t?.packageId)return;const a=t.name,o=(0,Ve.T)({packageId:t.packageId}),r=(0,be.t)("POINTS_MENU_ADD_SELECTION_ALT",{serviceName:a});return()=>(0,p.Y)(n.$,{as:y.i,"data-testid":"selection-menu-button",href:o,variant:"primary",children:r})},Ze.D,({media:e})=>{if(!(0,u.O)(e))return;if(!("id"in e))return;const t=(e=>{if((0,u.O)(e))return"suggestedEpisode"in e&&e.suggestedEpisode&&"availability"in e.suggestedEpisode?e.suggestedEpisode.availability:"upcomingEpisode"in e&&e.upcomingEpisode&&"availability"in e.upcomingEpisode?e.upcomingEpisode.availability:"availability"in e&&e.availability?e.availability:void 0})(e);if(!(0,u.O)(t))return;const a=t.from?.timestamp;if(!((0,u.O)(a)&&a>Date.now()))return;return()=>(0,p.Y)(m,{mediaId:e.id,startTime:a})},Qe.y,Ge.Q,({media:e})=>{if(!(0,u.O)(e))return;const t=(0,Re.j)(e);if(!t)return;if(!("playback"in t))return;const[a]=t.playback?.buy&&"rental"in t.playback.buy&&t.playback?.buy?.rental?t.playback.buy.rental:[];if(!(0,u.O)(a))return;if(!(0,u.O)(a.item.price))return;if(!(0,Ie.v)(a.item.validFrom,a.item.validTo))return;const o=a.item.price.readable,r="series"in t?t.series?.id:void 0,n="episodeNumber"in t?t.episodeNumber:void 0,i="seasonNumber"in t?t.seasonNumber:void 0;return({variant:e})=>
9(0,p.Y)(Te,{episodeNumber:n,mediaId:t.id,price:o,purchaseType:"RENTAL",seasonNumber:i,seriesId:r,variant:"primary"===e?"pay":e})},({media:e})=>{if(!(0,u.O)(e))return;const t=(0,Re.j)(e);if(!t)return;if(!("playback"in t))return;const[a]=t.playback?.buy&&"est"in t.playback.buy&&t.playback?.buy?.est?t.playback.buy.est:[];if(!(0,u.O)(a))return;if(!(0,u.O)(a.priceId))return;if(!(0,u.O)(a.item.price))return;if(!(0,Ie.v)(a.item.validFrom,a.item.validTo))return;const o=a.item.price.readable,r="series"in t?t.series?.id:void 0,n="episodeNumber"in t?t.episodeNumber:void 0,i="seasonNumber"in t?t.seasonNumber:void 0;return({variant:e})=>(0,p.Y)(Te,{episodeNumber:n,mediaId:t.id,price:o,purchaseType:"EST",seasonNumber:i,seriesId:r,variant:"primary"===e?"pay":e})},({media:e,useTooltip:t})=>{if(!(0,u.O)(e))return;if(!("trailers"in e))return;const[a]=e.trailers??[];if(!(0,u.O)(a))return;const o=a.playbackSpec;return({variant:e})=>(0,p.Y)(Ke,{playbackSpec:o,useTooltip:t,variant:e})}],et=({media:e})=>{const t=e.cdp.capabilities2,a=[];return Xe.forEach(t=>{const o=t({media:e,useTooltip:!Je.p&&a.length>0});o&&a.push(o)}),t?.forEach(t=>{if("LinkCapability2"===t.__typename){const e=He({linkCapability:t});e&&a.push(e)}if("MutationCapability"===t.__typename){const o=(0,Oe.p)(t.mutationCapabilityType),r=o&&o({capability:t,media:e,useTooltip:!Je.p&&a.length>0});r&&a.push(r)}if("CapabilityGroup"===t.__typename){const o=(({capability:e,media:t,useTooltip:a})=>{const o=e;if("CapabilityGroup"!==o?.__typename)return;const r=o?.capabilities?.map(e=>{const a=(0,Oe.p)(e.mutationCapabilityType);return a&&a({capability:e,isInCapabilityGroup:!0,media:t,useTooltip:!1})}).filter(u.O);if(!r||0===r.length)return;const n=(0,R.iD)(o.icon.name);return({variant:e})=>(0,p.Y)(Be,{buttonRenderers:r,iconName:n,modalDescription:o.description,modalHeader:o.header,text:o.text,useTooltip:a,variant:e})})({capability:t,media:e,useTooltip:!Je.p&&a.length>0});o&&a.push(o)}}),a};var tt=a("./src/shared/components/custom/FadeContainer/index.ts"),at=a("./src/shared/constants/imageSizes.ts"),ot=a("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"),rt=a("./src/shared/components/custom/Image/Image.tsx"),nt=a("./src/shared/components/custom/MarginContainer/MarginContainer.tsx"),it=a("./src/shared/constants/zindex.ts"),st=a("./src/shared/utils/breakpoints/constants.ts"),dt=a("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs");const ct=(0,T.A)("div",{target:"e155da248"})({name:"bjn8wh",styles:"position:relative"}),lt=(0,T.A)("div",{target:"e155da247"})("height:100%;position:absolute;top:0;left:0;right:0;background:radial-gradient(\n circle at top right,\n ",({backgroundColor:e})=>e||R.ue.color.background.primary,"\n 0,\n transparent 25%\n );"),pt=(0,T.A)("div",{target:"e155da246"})("position:absolute;top:0;left:0;width:100%;height:76%;max-height:100%;background-image:linear-gradient(\n 180deg,\n transparent,\n 72.38%,\n ",({backgroundColor:e})=>e||R.ue.color.background.primary,"\n 100%\n );",I.mq.S` 10 height: 100%; 11 `,";"),mt=(0,T.A)("div",{target:"e155da245"})("position:relative;padding-top:75%;overflow:hidden;",I.mq.S` 12 padding-top: min(56.25%, ${"80vh"}); 13 `,"&::after{content:'';display:block;position:absolute;width:1761px;height:100%;left:-844px;top:34%;background:radial-gradient(\n 50% 50% at 50% 50%,\n ",({backgroundColor:e})=>e||R.ue.color.background.primary,"\n 0%,\n rgba(26, 1, 40, 0) 100%\n );",I.mq.M` 14 display: block; 15 `,";}img{position:absolute;width:100%;top:0;object-fit:cover;height:auto;}"),ut=(0,T.A)("div",{target:"e155da244"})("display:flex;justify-content:flex-end;flex-direction:column;align-items:center;padding:0 ",(0,nt.ct)(st.S.S),";margin-top:-102px;",I.mq.M` 16 // margin top for desktop according to design 17 margin-top: -230px; 18 padding: 0 ${(0,nt.ct)(st.S.M)}; 19 height: auto; 20 width: 100%; 21 box-sizing: border-box; 22 `,";"),gt=(0,T.A)("div",{target:"e155da243"})("position:relative;display:flex;flex-direction:column;width:100%;z-index:",it.M.CDP.CHILDREN,";"),ht=(0,T.A)(dt.P.div,{target:"e155da242"})("position:absolute;top:0;left:0;right:0;bottom:0;height:76%;",I.mq.S` 23 height: 100%; 24 `,";"),_t=(0,T.A)(k.Q,{shouldForwardProp:e=>"isBlurred"!==e,target:"e155da241"})("display:block;height:100%;width:100%;>canvas{display:block;transition:opacity ease 1s;opacity:",({isBlurred:e})=>e?.3:0,";}"),yt=(0,T.A)(rt._,{target:"e155da240"})({name:"1am4js3",styles:"transition:opacity ease-in 0.3s"}),Et={hidden:{opacity:0,transition:{duration:.3}},visible:{opacity:1,transition:{duration:.3},transitionEnd:{opacity:""}}},bt=({backdropImageSrc:e,backdropLogId:t,backgroundColor:a,blurHash:o,children:r,className:n})=>{const[i,s]=(0,c.useState)(!1);(0,c.useLayoutEffect)(()=>{s(Boolean(o))},[o]);const[d,l]=at.o.backdrop;return(0,p.FD)(ct,{className:n,children:[(0,p.FD)(mt,{backgroundColor:a,children:[(0,p.Y)(ot.N,{children:i&&o&&(0,p.Y)(ht,{animate:"visible",initial:"hidden",variants:Et,children:(0,p.Y)(_t,{hash:o,height:"100%",isBlurred:!0,width:"100%"})})}),(0,p.Y)(yt,{alt:"",height:l,onLoad:()=>s(!1),uri:e,width:d}),(0,p.Y)(pt,{backgroundColor:a}),(0,p.Y)(lt,{backgroundColor:a})]}),(0,p.Y)(ut,{children:(0,p.Y)(gt,{children:(0,p.Y)(ot.N,{mode:"wait",children:(0,p.Y)(tt.y,{fadeInDuration:.3,fadeOutDuration:.15,children:r},t)})})})]})};var vt=a("./src/shared/components/custom/MediaDetails/components/MediaModal/index.ts");const St=(0,T.A)("div",{target:"e1w4reb11"})("position:relative;float:right;margin:3px 0 16px 16px;z-index:",it.M.CDP.PROVIDER_LOGO,";"),ft=(0,T.A)(rt._,{target:"e1w4reb10"})("max-height:30px;max-width:70px;",I.mq.M` 25 max-height: 48px; 26 max-width: 96px; 27 `,";"),At=({imageUrl:e})=>(0,p.Y)(St,{children:(0,p.Y)(ft,{alt:"",height:48,uri:e,width:96})});var xt=a("./src/shared/components/custom/MetadataRowItems/index.ts"),Tt=a("./src/shared/components/ui/Badge/index.ts"),It=a("./src/shared/components/ui/Billboard/index.ts"),Rt=a("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");const kt=(0,T.A)("p",{target:"e9mv5pe0"})("cursor:",({isExpandable:e})=>e?"pointer":"default",";",({isExpanded:e,maxLines:t,maxLinesDesktop:a})=>!e&&(0,Rt.css)("overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:",t,";-webkit-box-orient:vertical;",I.mq.M` 28 -webkit-line-clamp: ${a||t}; 29 `,";"),";"),Ct=({children:e,maxLines:t=2,maxLinesDesktop:a=4,...o}
29)=>{const[r,n]=(0,c.useState)(!1),[i,s]=(0,c.useState)(!1),d=(0,c.useRef)(null);return(0,c.useEffect)(()=>{s(!!d.current&&d.current?.scrollHeight>d.current?.clientHeight)},[]),(0,p.Y)(kt,{isExpandable:i,isExpanded:r,maxLines:t,maxLinesDesktop:a,onClick:()=>n(!r),ref:d,...o,children:e})};const Dt=(0,T.A)("div",{target:"e1fhmuvb3"})(R.ue.typography.textPrimary," ",I.mq.M` 30 max-width: 70ch; 31 `,";"),wt=(0,T.A)(Ct,{target:"e1fhmuvb2"})({name:"ti75j2",styles:"margin:0"}),Ot=(0,T.A)(Ct,{target:"e1fhmuvb1"})("color:",R.ue.color.text.secondary,";margin:8px 0 0;"),Mt=(0,T.A)(Ct,{target:"e1fhmuvb0"})(R.ue.typography.textPrimaryEmphasis," margin:0 0 16px;",I.mq.M` 32 margin: 0 0 24px; 33 `," color:",({type:e})=>"HELPFUL"===e?R.ue.color.infoDialogue.helpfulBackgroundDefault:"IMPORTANT"===e?R.ue.color.infoDialogue.importantBackgroundDefault:R.ue.color.text.primary,";"),Lt=({announcement:e,className:t,description:a,extraDescription:o})=>(0,p.FD)(Dt,{className:t,children:[e&&(0,p.Y)(Mt,{maxLines:2,maxLinesDesktop:3,type:e.type,children:e.text}),a&&(0,p.Y)(wt,{maxLines:2,maxLinesDesktop:3,children:a}),o&&(0,p.Y)(Ot,{maxLines:2,maxLinesDesktop:3,children:o})]});var Pt=a("./src/shared/components/custom/MediaDetails/components/MediaMetadata/index.ts"),Nt=a("./src/shared/components/custom/MetadataRowItems/MetadataRowItems.styles.ts"),Ut=a("./src/shared/components/ui/Billboard/Billboard.tsx");const Yt=(0,T.A)("div",{target:"enylskq0"})(R.ue.typography.contentDataSmall," color:",R.ue.color.text.secondary,";border-radius:8px;border:1px solid ",R.ue.color.border.backgroundSurface,";padding:12px;"),Ft=({className:e,text:t})=>(0,p.Y)(Yt,{className:e,children:(0,p.Y)("span",{children:t})});var Bt=a("./src/shared/components/ui/ProgressBar/ProgressBar.tsx"),jt=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js");var Ht={name:"1o3nkn",styles:"margin-left:auto"},Gt={name:"x2ir3y",styles:"margin:32px auto;text-align:center"};const qt=(0,T.A)("div",{target:"ep1vlqr3"})("display:flex;width:100%;max-width:80ch;",({align:e})=>"center"===e?Gt:"right"===e?Ht:void 0," ",R.ue.typography.textPrimaryEmphasis,";"),$t=(0,T.A)("div",{target:"ep1vlqr2"})("flex-grow:1;display:flex;align-items:center;color:",R.ue.color.text.secondary,";margin-bottom:0;",I.mq.M` 34 margin-bottom: 24px; 35 `,";"),Vt=(0,T.A)("span",{target:"ep1vlqr1"})({name:"1ff36h2",styles:"flex-grow:1"}),Qt=(0,T.A)(Ce.i,{shouldForwardProp:jt.A,target:"ep1vlqr0"})("text-decoration-line:underline;color:",R.ue.color.text.primary,";display:inline;white-space:nowrap;",R.ue.typography.textPrimaryEmphasis,";text-decoration-line:underline;"),zt=({align:e="center",className:t,link:a,linkText:o,message:r,providerName:n,showUpgradeLink:i})=>{const{t:s}=(0,l.Bd)(),d=ce.Config.get("cdp/upgradeRequiredAlert/showProviderName")&&n,c=r||(d?s("UPGRADE_REQUIRED_WITH_PROVIDER_NAME",{provider:n}):s("UPGRADE_REQUIRED"));return(0,p.Y)(qt,{align:e,className:t,children:(0,p.Y)($t,{children:(0,p.FD)(Vt,{children:[c," ",i&&(0,p.Y)(Qt,{href:a||s("branding:UPGRADE_TV_PACKAGE_URL"),children:o||s("UPGRADE_REQUIRED_READ_MORE")})]})})})},Wt=(0,T.A)("div",{target:"eu5z3q70"})(R.ue.typography.textPrimary," color:",R.ue.color.text.primary,";text-shadow:0px 0px 50px rgba(0, 0, 0, 0.7);"),Kt=({availableFrom:e,className:t})=>{const{t:a}=(0,l.Bd)();return(0,p.FD)(Wt,{className:t,children:[a("CAN_BE_VIEWED_IN")," ",e.toLowerCase()]})};const Zt=(0,T.A)("div",{target:"e1t4fi9y14"})("flex:1;height:100%;width:100vw;max-width:966px;padding-bottom:",nt.Rs.S,"px;min-height:100vh;",nt.ry,":",nt.Rs.S,"px;",({backgroundColor:e})=>(0,Rt.css)("background-color:",e,";")," ",I.mq.S` 36 min-height: auto; 37 border-radius: 8px; 38 overflow: hidden; 39 `," ",I.mq.M` 40 padding-bottom: ${nt.Rs.M}px; 41 ${nt.ry}: ${nt.Rs.M}px; 42 43 `,";"),Jt=(0,T.A)("div",{target:"e1t4fi9y13"})("display:grid;align-items:flex-start;grid-template:'upsell-call-to-action' 'labels' 'metadata' 'alert' 'primary-buttons' 'npvr-recording-info' 'start-time-container' 'progress-bar' 'info-box' 'series-info' 'description' 'secondary-buttons' 'details-container';",I.mq.M` 44 grid-template: 45 'upsell-call-to-action upsell-call-to-action' 46 'labels labels' 47 'metadata metadata' 48 'primary-buttons primary-buttons' 49 'alert alert' 50 'npvr-recording-info npvr-recording-info' 51 'start-time-container start-time-container' 52 'progress-bar progress-bar' 53 'info-box info-box' 54 'series-info series-info' 55 'description description' 56 'details-container details-container'; 57 `,";"),Xt=(0,T.A)("div",{target:"e1t4fi9y12"})("grid-area:alert;margin-top:24px;",I.mq.M` 58 margin-top: inherit; 59 `,";"),ea=(0,T.A)(zt,{target:"e1t4fi9y11"})({name:"n9vf6m",styles:"margin-bottom:0;max-width:100%"}),ta=(0,T.A)(Pt.K,{target:"e1t4fi9y10"})({name:"ea1k6j",styles:"grid-area:metadata"}),aa=(0,T.A)(Pt.L,{target:"e1t4fi9y9"})("grid-area:series-info;row-gap:unset;margin-bottom:16px;",I.mq.S` 60 margin-bottom: 24px; 61 `," ",Nt.B6,"{",R.ue.typography.textPrimary," color:",R.ue.color.text.primary,";}"),oa=(0,T.A)(Pt.L,{target:"e1t4fi9y8"})("grid-area:npvr-recording-info;margin-bottom:24px;",I.mq.S` 62 column-gap: 0; 63 `," ",I.mq.M` 64 max-width: 70ch; 65 `," ",Nt.B6,"{",R.ue.typography.textPrimary," color:",R.ue.color.text.primary,";}"),ra=(0,T.A)(Bt.z,{target:"e1t4fi9y7"})("grid-area:progress-bar;margin-bottom:16px;max-width:208px;",I.mq.S` 66 max-width: 304px; 67 margin-bottom: 24px; 68 `," ",I.mq.M` 69 max-width: 416px; 70 margin-bottom: 32px; 71 `,";"),na=(0,T.A)(Lt,{target:"e1t4fi9y6"})({name:"1x9glg",styles:"grid-area:description"}),ia=(0,T.A)(Ft,{target:"e1t4fi9y5"})({name:"hkh81z",styles:"margin-top:8px"}),sa=(0,T.A)("div",{target:"e1t4fi9y4"})("grid-area:info-box;margin-bottom:24px;max-width:100%;>",ia,":first-of-type{margin-top:0;}"),da=(0,T.A)("div",{target:"e1t4fi9y3"}
71)({name:"1aq0uc8",styles:"grid-area:details-container;margin-top:24px"}),ca=(0,T.A)("div",{target:"e1t4fi9y2"})({name:"18vd809",styles:"grid-area:start-time-container"}),la=(0,T.A)(Kt,{target:"e1t4fi9y1"})({name:"cn3xcj",styles:"margin-bottom:12px"}),pa=(0,T.A)(Ut.Q.Row.Container,{target:"e1t4fi9y0"})("grid-area:primary-buttons;margin-bottom:16px;",I.mq.M` 72 margin-bottom: 24px; 73 `," ",({showAlert:e})=>e&&(0,Rt.css)("margin-bottom:24px;",I.mq.M` 74 margin-bottom: 8px; 75 `,";"),";");const ma=(0,T.A)("section",{target:"eih3vbv4"})({name:"bjn8wh",styles:"position:relative"}),ua=(0,T.A)("div",{target:"eih3vbv3"})("width:100%;padding-right:24px;",I.mq.M` 76 width: 50%; 77 `,";"),ga=(0,T.A)("dl",{target:"eih3vbv2"})(R.ue.typography.textPrimary," display:flex;flex-direction:column;",I.mq.M` 78 max-width: 70ch; 79 flex-direction: row; 80 `,";"),ha=(0,T.A)("dt",{target:"eih3vbv1"})(R.ue.typography.contentDataSmall," color:",R.ue.color.text.secondary,";"),_a=(0,T.A)("dd",{target:"eih3vbv0"})(R.ue.typography.contentDataSmall," color:",R.ue.color.text.primary,";text-transform:",({capitalize:e})=>e?"capitalize":"none",";margin:0;margin-bottom:8px;"),ya=({actors:e,audioLanguages:t,availableTo:a,className:o,commentators:r,directors:n,genres:i,inStudio:s,rentalTime:d,showAvailableToOrRentalTime:c,venue:m})=>{const{t:u}=(0,l.Bd)();return(0,p.Y)(ma,{className:o,"data-testid":"cdp-details-info",children:(0,p.FD)(ga,{children:[(e?.length||n?.length||r?.length||s?.length)&&(0,p.FD)(ua,{children:[e?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("CAST")}),(0,p.Y)(_a,{children:e.join(", ")})]}):null,n?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("DIRECTOR")}),(0,p.Y)(_a,{children:n.join(", ")})]}):null,r?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("COMMENTATORS")}),(0,p.Y)(_a,{children:r.join(", ")})]}):null,s?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("IN_STUDIO")}),(0,p.Y)(_a,{children:s.join(", ")})]}):null]}),(t?.length||i?.length||m||d||a)&&(0,p.FD)(ua,{children:[t?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("AVAILABLE_LANGUAGES")}),(0,p.Y)(_a,{capitalize:!0,children:t.map(e=>e.name).join(", ")})]}):null,i?.length?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("GENRES")}),(0,p.Y)(_a,{children:i.join(", ")})]}):null,m?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("VENUE")}),(0,p.Y)(_a,{children:m})]}):null,c&&(d||a)?(0,p.FD)(p.FK,{children:[(0,p.Y)(ha,{children:u("AVAILABLE")}),(0,p.Y)(_a,{children:d||a})]}):null]})]})})};var Ea=a("./src/core/router/hooks/useIsModalRouteOpen/index.ts"),ba=a("./src/epg/utils/elementScroller/setSmoothScroll.ts"),va=a("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs");const Sa=({actors:e,announcement:t,audioLanguages:a,availableFrom:o,availableTo:r,backdropImageSrc:n,backdropLogId:i,backgroundColor:s,blurHash:d,children:m,className:g,commentators:h,description:_,directors:y,extraDescription:E,genre:b,hasSelectionMenu:v,inStudio:S,isActivationNeeded:f,isInternalSubscription:A,labels:x,media:T,metadataRow:I,metadataRowThree:R,metadataRowTwo:k,npvrData:C,onClose:D,playInfoText:w,progress:O,providerLogoUrl:M,purchaseInfoText:L,rentalTime:P,serviceName:N,showUpgradeSubscriptionAlert:U,subGenres:Y,title:F,venue:B,...j})=>{(()=>{const e=(0,va.I)(),{isModalRouteOpen:t}=(0,Ea.u)();(0,c.useEffect)(()=>(e||t?!e&&t&&(0,ba.O)(!1):(0,ba.O)(!0),()=>{(0,ba.O)(!1)}),[t,e])})();const{t:H}=(0,l.Bd)(),G=b?[b]:[],q=Y?[...G,...Y]:G,$=(0,c.useMemo)(()=>et({media:T}),[T]),V=w||f&&N,Q=Boolean(_||E||t),z=Boolean(U||L),W=(0,c.useCallback)(()=>{if(v){const e=$e(T);return(0,p.Y)(ea,{align:"left",providerName:e?.name,showUpgradeLink:!1})}return L?(0,p.Y)(ea,{align:"left",message:L,showUpgradeLink:!1}):A?(0,p.Y)(ea,{align:"left",showUpgradeLink:!1}):(0,p.Y)(ea,{align:"left",showUpgradeLink:!0})},[v,L,A,T]);return(0,p.Y)(vt.q,{onClose:D,...j,children:(0,p.FD)(Zt,{backgroundColor:s,children:[(0,p.Y)(bt,{backdropImageSrc:n,backdropLogId:i,backgroundColor:s,blurHash:d,className:g,children:(0,p.FD)(Jt,{children:[x?.length?(0,p.Y)(It.Q.Content,{style:{marginBottom:8},children:(0,p.Y)(It.Q.Row.Left,{children:x?.map((e,t)=>(0,p.Y)(It.Q.Label,{label:e},t))})}):null,(0,p.Y)(ta,{metadataRow:I,title:F}),(0,p.Y)(pa,{showAlert:z,children:(0,p.Y)(It.Q.Row.Left,{children:$.map((e,t)=>(0,p.Y)(c.Fragment,{children:e({variant:0===t?"primary":"secondary"})},t))})}),z&&(0,p.Y)(Xt,{children:W()}),(0,u.O)(R)&&(0,p.Y)(oa,{children:(0,p.Y)(xt.y,{badgeSize:Tt._y.DEFAULT,items:R,linkImdb:!0})}),O?(0,p.Y)(ra,{progress:O,rounded:!0}):null,V&&(0,p.FD)(sa,{children:[f&&N&&(0,p.Y)(ia,{text:H("ACTIVATE_VAS_INFO",{serviceName:N})}),w&&(0,p.Y)(ia,{text:w})]}
80),o&&(0,p.Y)(ca,{children:o&&(0,p.Y)(la,{availableFrom:o})}),(0,u.O)(k)&&(0,p.Y)(aa,{children:(0,p.Y)(xt.y,{badgeSize:Tt._y.DEFAULT,items:k,linkImdb:!0})}),Q&&(0,p.Y)(na,{announcement:t,description:_,extraDescription:E}),(0,p.FD)(da,{children:[M&&(0,p.Y)(At,{imageUrl:M}),(0,p.Y)(ya,{actors:e,audioLanguages:a,availableTo:r,commentators:h,directors:y,genres:q,inStudio:S,rentalTime:P,showAvailableToOrRentalTime:!C?.isNpvr||Boolean(C.isRecorded),venue:B})]})]})}),m]})})}},"./src/cdp/hooks/useRedirectToChildSafeRouteIfNotChildSafeMedia.ts"(e,t,a){a.d(t,{g:()=>l});var o=a("./src/codegen/graphql.ts"),r=a("./src/page/routes.tsx"),n=a("./src/profiles/providers/UserProvider/UserProvider.tsx"),i=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/Config.js"),s=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),d=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs"),c=function(e){return e[e.ADULT=15]="ADULT",e[e.CHILD=11]="CHILD",e}(c||{});const l=({media:e,skip:t})=>{const a=(0,d.Zp)(),{currentProfile:l}=(0,n.u)(),p=l?.ageGroup,m=p&&p!==o.P2Z.Adult||!1,u=(0,s.useCallback)(e=>{const t=(e=>e===o.P2Z.Child?c.CHILD:c.ADULT)(p||o.P2Z.Adult);return(e?.ageRating?.number??c.CHILD)<=t},[p]),g=(0,s.useCallback)(e=>e&&!u(e)||!1,[u]),h=(0,s.useCallback)(()=>{a((0,d.tW)(r.q.PAGE,{pageId:i.Config.get("page/kids/id")}),{replace:!0})},[a]);(0,s.useEffect)(()=>{!t&&e&&m&&g(e)&&h()},[m,g,e,h,t])}},"./src/cdp/hooks/useTrackCdp.ts"(e,t,a){a.d(t,{y:()=>n});var o=a("./src/core/analytics/tracker.ts"),r=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js");const n=({contentType:e,media:t,pageObject:a,skip:n})=>{const i=(0,r.useRef)("");(0,r.useLayoutEffect)(()=>{const r=a&&i.current===JSON.stringify(a);n||!t?.id||r||(o.F.trackPage({content_id:t.id,content_type:e,page_name:a,page_variant:"modal"}),a&&(i.current=JSON.stringify(a)))},[t?.id,a,n,e])}},"./src/cdp/utils/getCdpUpsellData/getCdpUpsellData.ts"(e,t,a){a.d(t,{B:()=>m});var o=a("./src/cdp/utils/getCdpUpsellData/utils/isSupportedSubscription.ts"),r=a("./src/shared/utils/isDefined.ts"),n=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/Config.js"),i=a("./src/subscription/routes.tsx"),s=a("../../../node_modules/.pnpm/[email protected][email protected]/node_modules/i18next/dist/esm/i18next.js"),d=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs");const c=e=>{const t=(()=>{const e=["SubscriptionProductStandard"];return n.Config.get("subscription/vasStandalone/enabled")&&e.push("SubscriptionProductVASStandalone"),e})();return e?.find(e=>e.__typename&&t.includes(e.__typename))};var l=a("./src/codegen/graphql.ts"),p=a("./src/core/apollo/client.ts");const m=e=>{if(!e)return;let t=e?.id;const a=(e=>"Series"===e?.__typename)(e),m=a?void 0:e?.playback;let u=m?.buy?.subscriptions?.filter(r.O).map(e=>e.item);a&&(u=e?.suggestedEpisode?.playback?.buy?.subscriptions?.filter(r.O).map(e=>e.item),t=e?.suggestedEpisode?.id);const g=u?.filter(o.g)||[];if(!g.length)return;const h=n.Config.get("subscription/checkout/type"),_=c(g),y=Boolean("not-allowed"===h&&_),E=Boolean("internal"===h&&_&&(()=>{const e=p.S.readQuery({query:l.BE3})?.user;return e?.profiles2?.some(e=>e.isCurrent&&e.ageGroup!==l.P2Z.Adult)||!1})()),b=(e=>!!e?.some(e=>e?.__typename?.startsWith("SubscriptionProductSelection")))(g),v=(e=>e?.some(e=>e?.__typename?.startsWith("SubscriptionProductExternal"))||!1)(g);if(y||E||v||b)return{hasSelectionMenu:b,showCta:!1,showUpgradeSubscriptionAlert:!0};if(_){let e,a;return"internal"===h&&t&&({ctaButtonLabel:a,ctaButtonUrl:e}=(e=>{const t=e?(0,d.tW)(i.c.MEDIA_SUBSCRIPTION_LIST,{mediaId:e}):void 0;return{ctaButtonLabel:(0,s.t)("EXPLORE_PACKAGES"),ctaButtonUrl:t}})(t)),{ctaButtonLabel:a,ctaButtonUrl:e,isInternalSubscription:!0,showCta:!0,showUpgradeSubscriptionAlert:!0}}}},"./src/cdp/utils/getCdpUpsellData/utils/isSupportedSubscription.ts"(e,t,a){a.d(t,{g:()=>r});var o=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.common-sdk/dist/Config.js");const r=e=>{const t=(()=>{const e=["SubscriptionProductExternalStandard","SubscriptionProductSelection","SubscriptionProductStandard"];return o.Config.get("subscription/vasStandalone/enabled")&&e.push("SubscriptionProductVASStandalone"),e})();return!!e.__typename&&t.includes(e.__typename)}},"./src/core/router/hooks/useNavigateToRootLocation/useNavigateToRootLocation.ts"(e,t,a){a.d(t,{N:()=>c});var o=a("./src/page/routes.tsx"),r=a("../../libs/error-monitoring/dist/index.mjs"),n=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),i=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs"),s=a("./src/core/router/hooks/useRootLocation/index.ts");const d=o.q.HOME,c=()=>{const e=(0,i.Zp)();return{navigateToRootLocation:(0,n.useCallback)(t=>{const a=(0,s.X0)();a||(0,r.vV)(new Error("Failed to navigate to root location. Root location does not exist."),{context:"useNavigateToRootLocation"}),e(a||d,{replace:a===d,state:{skipScrollRestoration:t?.skipScrollRestoration??!0}})},[e])}}},"./src/epg/utils/elementScroller/setSmoothScroll.ts"(e,t,a){a.d(t,{O:()=>o});const o=e=>{const t=document.scrollingElement.style.scrollBehavior,a=!window.matchMedia("(prefers-reduced-motion: no-preference)").matches;"smooth"!==t&&e&&!a&&(document.scrollingElement.style.scrollBehavior="smooth"),("smooth"===t&&!e||"smooth"===t&&a&&e)&&(document.scrollingElement.style.scrollBehavior="")}},"./src/npvr/utils/getNpvrStatus.ts"(e,t,a){a.d(t,{B:()=>r});var o=a("../../../node_modules/.pnpm/[email protected]/node_modules/date-fns/isWithinInterval.js");const r=e=>{const t=e&&"playback"in e&&e.playback?.buy?.npvr?.[0],a=e&&"playback"in e&&e.playback?.play?.npvr?.[0],r=Boolean(t||a||"series"in e&&e.series?.userData?.npvrInfo),n=e&&"playback"in e&&e.playback?.buy?.npvr?.[0].recordableBefore?.timestamp||0,i=a&&a?.npvrInfo?.originalAirDate?.startDate?.timestamp||void 0,s=a&&a?.npvrInfo?.originalAirDate?.endDate?.timestamp||void 0;let d,c;a?(d=a?.npvrInfo?.originalAirDate?.startDate?.timestamp,c=a?.npvrInfo?.originalAirDate?.endDate?.timestamp):t?(d=t.item?.validFrom.timestamp,d&&e?.duration?.seconds&&(c=d+1e3*e?.duration?.seconds)):e&&"availability"in e&&e?.availability?.from?.timestamp&&(d=e?.availability?.from?.timestamp,e?.duration?.seconds&&(c=e?.availability?.from?.timestamp+1e3*e?.duration?.seconds));const l=Date.now(),p=Boolean(s&&s<l),m=Boolean(i&&s&&i<l&&s>l),u=!(!d||!c)&&(0,o.v)(l,{end:c,start:d}),g=Boolean(e&&"series"in e&&e?.series?.userData?.npvrInfo?.active||"Series"===e.__typename&&e.userData?.npvrInfo?.active),h=r&&!g,_=Boolean(e&&"series"in e&&e?.series?.isRecordable&&!g||e&&"Series"===e.__typename&&e.isRecordable&&!g),y=Boolean(n>l),E="Episode"===e.__typename?"series"in e&&e?.series?.userData?.npvrInfo?.episodes?.recorded||0:"Series"===e.__typename&&e?.userData?.npvrInfo?.episodes?.recorded||0,b=Boolean(i&&i>l);return{hasActiveSeriesRecording:g,hasEnded:Boolean(c&&c<l),hasStarted:Boolean(d&&d<=l),isNpvr:r,isOngoingProgram:u,isOngoingRecording:m,isRecordable:y,isRecorded:p,isRecording:Boolean(a),isScheduledRecording:b,isSeriesRecordable:_,isSingleRecording:h,numberOfRecordedEpisodes:E,programStartTime:d,recordingStartTime:i}}},"./src/shared/components/custom/MediaDetails/components/MediaMetadata/index.ts"(e,t,a){a.d(t,{K:()=>g,L:()=>l});var o=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),r=a("./src/shared/components/custom/MetadataRowItems/index.ts"),n=a("./src/shared/components/ui/Badge/index.ts"),i=a("./src/shared/utils/breakpoints/mq.ts"),s=a("./src/shared/utils/isDefined.ts"),d=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),c=a("./src/shared/components/custom/MetadataRowItems/MetadataRowItems.styles.ts");const l=(0,o.A)("div",{target:"e1njipe00"})("display:flex;flex-wrap:wrap;row-gap:8px;",i.mq.S` 81 column-gap: 8px; 82 `," ",c.B6,"{",d.ue.typography.contentData," color:",d.ue.color.text.secondary,";}",c.vG,"{",d.ue.typography.textPrimary,";}",c.uz,"{",d.ue.typography.textPrimary,";}");var p=a("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const m=(0,o.A)("div",{target:"e1qkzimw1"})({name:"1aphy8w",styles:"text-align:left;align-self:flex-start"}),u=(0,o.A)("h1",{target:"e1qkzimw0"})(d.ue.typography.contentTitle," text-shadow:'0px 0px 50px rgba(0, 0, 0, 0.7)';margin-bottom:8px;",i.mq.M` 83 max-width: 27.5ch; 84 `,";"),g=({className:e,metadataRow:t,title:a})=>(0,p.FD)(m,{className:e,"data-testid":"media-metadata",children:[(0,p.Y)(u,{children:a}),(0,s.O)(t)&&(0,p.Y)(l,{children:(0,p.Y)(r.y,{badgeSize:n._y.DEFAULT,items:t,linkImdb:!0})})]})},"./src/shared/components/custom/MediaDetails/components/MediaModal/index.ts"(e,t,a){a.d(t,{q:()=>A,K:()=>b});var o=a("./src/shared/hooks/usePrevious.ts"),r=a("../../../node_modules/.pnpm/@[email protected]/node_modules/@telia-company/tv.oneapp-web-analytics/dist/index.js"),n=a("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"),i=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),s=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/index.js"),d=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/react-router/dist/development/chunk-62JRHF6Z.mjs"),
84c=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),l=a("./src/shared/components/ui/Button/Button.tsx"),p=a("./src/shared/constants/zindex.ts"),m=a("./src/shared/utils/breakpoints/mq.ts"),u=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),g=a("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs");const h=(0,c.A)(g.P.div,{target:"e1vaf3jp4"})("box-sizing:border-box;display:flex;justify-content:center;left:0;position:absolute;top:0;will-change:scroll-position;height:100%;width:100%;z-index:",p.M.CDP.MODAL_CONTAINER,";"),_=(0,c.A)("div",{target:"e1vaf3jp3"})({name:"1qg9gy1",styles:"display:flex;position:absolute;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:flex-start"}),y=(0,c.A)(g.P.div,{target:"e1vaf3jp2"})("display:flex;z-index:",p.M.CDP.MODAL_CONTENT,";will-change:transform;position:absolute;",m.mq.S` 85 border-radius: 8px; 86 margin-top: 40px; 87 width: calc(100% - 30px); 88 `," ",m.mq.L` 89 margin-top: 80px; 90 width: initial; 91 `," background-color:",u.ue.color.background.primary,";"),E=(0,c.A)("div",{target:"e1vaf3jp1"})("top:0;left:0;right:0;bottom:0;position:fixed;z-index:",p.M.CDP.MODAL_BACKDROP,";background-color:",u.ue.color.background.overlay60,";"),b=(0,c.A)(l.$,{target:"e1vaf3jp0"})("position:absolute;right:12px;top:12px;z-index:",p.M.CDP.MODAL_CLOSE_BUTTON,";");var v=a("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const S={enter:{opacity:1,scale:1,transition:{duration:.3,ease:"anticipate",type:"tween"}},entering:{opacity:0,scale:.9},leave:{opacity:0,scale:.9,transition:{duration:.3}}},f={hidden:{opacity:0,transition:{duration:.3}},visible:{opacity:1,transition:{duration:.3}}},A=({children:e,onClose:t,...a})=>{const c=(0,d.zy)(),[l,p]=(0,i.useState)(!0),m=(0,i.useRef)(null),u=(0,o.Z)(c),{t:g}=(0,s.Bd)();(0,i.useEffect)(()=>{m.current?.contains(document.activeElement)||m.current?.focus()},[]),(0,i.useEffect)(()=>{u?.key&&c.key!==u?.key&&(p(!0),setTimeout(()=>m.current?.focus()))},[c.key,u?.key]);return(0,v.Y)(n.N,{children:l&&(0,v.Y)(h,{animate:"visible","data-testid":"media-modal-container",exit:"hidden",initial:"hidden",onKeyDown:e=>{"Escape"===e.key&&m.current?.contains(document.activeElement)&&((0,r.trackModalClose)({modal_close_action:"escape key",page_name:c.pathname}),p(!1))},ref:m,tabIndex:0,variants:f,...a,children:(0,v.FD)(_,{children:[(0,v.Y)(E,{"data-testid":"media-modal-backdrop",onClick:()=>{(0,r.trackModalClose)({modal_close_action:"click outside modal",page_name:c.pathname}),p(!1)}}),(0,v.FD)(y,{animate:"enter",exit:"leave",initial:"entering",onAnimationComplete:e=>{"leave"===e&&t()},variants:S,children:[e,(0,v.Y)(b,{"aria-label":g("CLOSE"),"data-testid":"media-modal-close-button",icon:"Close",onClick:()=>{(0,r.trackModalClose)({modal_close_action:"close button",page_name:c.pathname}),p(!1)},variant:"ghost"})]})]})})})}},"./src/shared/components/custom/MediaDetails/utils/getMediaProgress.ts"(e,t,a){a.d(t,{w:()=>r});var o=a("./src/watch/utils/getPlaybackMetadata.ts");const r=e=>{let t=null;const{isOngoing:a,linearEndTime:r,linearStartTime:n}=(0,o.L)({currentTime:Date.now(),playback:e?.playback});return e?.userData?.progress?.percent&&e.userData?.progress?.percent>0?t=e.userData?.progress?.percent:n&&r&&a&&(t={endTime:r,startTime:n}),t}},"./src/shared/components/ui/Badge/index.ts"(e,t,a){a.d(t,{_y:()=>o._y});var o=a("./src/shared/components/ui/Badge/Badge.tsx")},"./src/shared/components/ui/Celler/Celler.tsx"(e,t,a){a.d(t,{S:()=>y});var o=a("./src/shared/utils/isDefined.ts"),r=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_f734d82c55a697af95f95e7d1443e8d9/node_modules/@telia-company/tv.one-design-system-web/lib/index.js"),n=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),i=a("../../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_support_a0dcb4b0ae680db98626d6fd11a2b9d9/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"),s=a("./src/shared/utils/breakpoints/mq.ts");const d=(0,i.A)("fieldset",{target:"euuni386"})({name:"1d9qsu2",styles:"display:flex;flex-direction:column;row-gap:8px;border:0;padding:0;margin:0"}),c=(0,i.A)("legend",{target:"euuni385"})(r.ue.typography.textSecondaryEmphasis," color:",r.ue.color.text.primary,";margin-bottom:8px;"),l=(0,i.A)("label",{target:"euuni384"})({name:"bjn8wh",styles:"position:relative"}),p=(0,i.A)("div",{target:"euuni383"})("padding:12px 16px;background-color:",r.ue.color.background.surface,";border-radius:4px;display:flex;flex-flow:column;row-gap:8px;
91cursor:pointer;",s.mq.M` 92 padding: 16px; 93 `,";"),m=(0,i.A)("span",{target:"euuni382"})(r.ue.typography.textPrimary," color:",r.ue.color.text.primary,";display:flex;justify-content:space-between;align-items:center;>svg{display:none;}"),u=(0,i.A)("input",{target:"euuni381"})("height:100%;width:100%;appearance:none;padding:0;position:absolute;&:checked+",p,"{background-color:",r.ue.color.button.secondaryPressed,";",m,">svg{display:inline;}}"),g=(0,i.A)("span",{target:"euuni380"})(r.ue.typography.textSecondary," color:",r.ue.color.text.secondary,";");var h=a("../../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const _=({defaultChecked:e,groupName:t,item:a})=>{const i=(0,n.useId)(),s=(0,n.useId)();return(0,h.FD)(l,{children:[(0,h.Y)(u,{"aria-labelledby":i,defaultChecked:e,name:t,type:"radio",value:a.id,...a.description?{"aria-describedby":s}:{}}),(0,h.FD)(p,{children:[(0,h.FD)(m,{"aria-hidden":!0,id:i,children:[a.label,(0,h.Y)(r.PA,{"aria-hidden":!0,height:24,name:"Check",width:24})]}),(0,o.O)(a.description)&&(0,h.Y)(g,{"aria-hidden":!0,id:s,children:a.description})]})]})},y=({defaultItemId:e,items:t,onItemSelected:a,title:r})=>{const i=(0,n.useRef)((e=>e.replace(/\s/g,"_")+"_"+Date.now().toString(36))(r)).current,s=(0,n.useRef)(e).current;return(0,h.FD)(d,{name:i,onChange:e=>{if(!(0,o.O)(a))return;const r=e.target.value,n=t.find(({id:e})=>r===e);(0,o.O)(n)&&a(n.value)},children:[(0,h.Y)(c,{children:r}),t.map((e,t)=>(0,h.Y)(_,{defaultChecked:s===e.id,groupName:i,item:e},t))]})}},"./src/shared/hooks/useForgotPinCode.ts"(e,t,a){a.d(t,{L:()=>s});var o=a("./src/shared/components/ui/Snackbar/index.ts"),r=a("../../../node_modules/.pnpm/@[email protected]_@telia-company+tv.common-sdk-authenticat_eff6e477fccb3c1035e3d63ff0e72c04/node_modules/@telia-company/tv.common-sdk-legacy-pack/dist/Credentials.js"),n=a("../../../node_modules/.pnpm/[email protected]/node_modules/react/index.js"),i=a("../../../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/index.js");const s=()=>{const{t:e}=(0,i.Bd)(),{addSnackbar:t}=(0,o.k)();return{forgotPinCode:(0,n.useCallback)(async()=>{try{const a=r.Credentials.instance();await a.forgotPin(),t({content:e("EMAIL_SENT_PIN"),dismissOnActionClick:!0,variant:"positive"})}catch(a){throw t({content:e("FAILED_TO_SEND_EMAIL"),dismissOnActionClick:!0,variant:"negative"}),a}},[t,e])}}},"./src/shared/hooks/useRetryAfterInMs.tsx"(e,t,a){a.d(t,{n:()=>r});var o=a("./src/shared/hooks/useCallbackAt.ts");const r=({error:e,refetch:t})=>{const a=e?.graphQLErrors?.reduce((e,t)=>{const a=t.extensions?.retryAfterInMs;return"number"==typeof a?Math.max(e,a):e},0)||void 0;(0,o.s)(a?Date.now()+a:void 0,t)}},"./src/watch/utils/getPlaybackMetadata.ts"(e,t,a){a.d(t,{L:()=>o});const o=({currentTime:e,playback:t})=>{const a=t?.play?.linear?.item||t?.buy?.linear?.item,o=!!a&&(a.endTime.timestamp>=e&&e>=a.startTime.timestamp),r=!!a?.startTime&&a.startTime.timestamp>=e,n=Boolean(t?.play?.est?.length),i=Boolean(t?.play?.rental?.length),s=Boolean(t?.buy?.linear?.item.isLive||t?.play?.linear?.item.isLive),d=t?.play?.rental?.[0].rentalInfo.endTime.readableDistance,c=a?.startTime.timestamp,l=a?.endTime.timestamp;return{isEst:n,isLive:s,isOngoing:o,isRented:i,isUpcoming:r,linearEndTime:l,linearStartTime:c,rentalTime:d}}}}]);
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.