PageSourceSearch

https://appcms.monumentalsportsnetwork.com/build/7595/6144.fa019b96d92da691a47d.js

js monumentalsportsnetwork.com collected 2026-09-24 18:31:50 UTC 249,961 bytes, 11 lines download raw bytes

1(()=>{(self.webpackChunkweb_v2=self.webpackChunkweb_v2||[]).push([[6144],{1937(Ao,yt,o){"use strict";var e=o(83428),w=o(61171),$=o.n(w),s=o(65608),Ue=o(43543),i=o(47281),Le=o(30209),st=o(51354),U=o(48220);let me="",ue="";const B=(L,W=!1,M="")=>{if(W){$().publish("multiviewPaywall",{isPaywallActive:L,playerId:M});return}$().publish("paywall",L)},A=(L,W)=>{if((0,Ue.js)().TVE)return{monetizationModels:L,priorityCTAObj:W};const M=L==null?void 0:L.filter(P=>P!=="TVE"&&P!=="SVOD+TVE");let Y=W;return Y&&(Y={...Y},Y.primaryCTA==="TVE"&&(Y.primaryCTA=Y.secondaryCTA&&Y.secondaryCTA!=="TVE"?Y.secondaryCTA:"SVOD"),Y.secondaryCTA==="TVE"&&(Y.secondaryCTA=null)),{monetizationModels:M,priorityCTAObj:Y}},c=async L=>{var W,M,Y,P,Q,H;let{VLPlayerCore:N,playerId:h,navigate:_e,metadataMap:F,monetizationModels:r,contentPlanIds:E,isPlayable:y,containerClass:ne,detailPageClass:ke,errorDetails:j,errorMsg:Se,priorityCTAObj:d,isLoginRequired:se,isEmailRequired:f,plans:be,monetizationBadgeIdentifier:q,subscriptionPopupFonts:Ke,videoType:Je,contentType:T,contentDetails:at,showMonetizationBadge:Yt,isGameCheckout:Pt,isMultiviewHardwall:G,isToShowSecurityWallMessage:je,onPlayerWall:Z,isGetStartedWall:ft,toShowCta:Ce,currentState:Ye,isContentAvailabilityTimerWall:Ft,isCheckoutCombination:rt,showNoPlansCta:ye,createAccountCta:te,discountBadgeStyles:pt,isAuthzError:Vt,showNonSubscribedUserUI:ro}=L;({monetizationModels:r,priorityCTAObj:d}=A(r,d)),Ft&&$().publish("content-countdown",!0),G?((0,e.IB)(G,ne),(0,e.Kg)(G,ne),(0,e.RG)(ne)):((0,e.IB)(),(0,e.Kg)(),(0,e.m_)()),me=ne||"",ue=ke||"";let ve={VLPlayerCore:N,playerId:h,navigate:_e,metadataMap:F,monetisationType:"",contentPlanIds:E,isPlayable:y,priorityCTAObj:d,isLoginRequired:se,isEmailRequired:f,videoContainer:me,detailPageContainer:ue,plans:be,monetizationBadgeIdentifier:q,subscriptionPopupFonts:Ke,type:"other",videoType:Je,contentType:T,contentDetails:at,showMonetizationBadge:Yt,isMultiviewHardwall:!!G,isToShowSecurityWallMessage:je,onPlayerWall:Z,toShowCta:Ce,currentState:Ye,isContentAvailabilityTimerWall:Ft,showNoPlansCta:ye,createAccountCta:te,discountBadgeStyles:pt,showNonSubscribedUserUI:ro},kt=await(0,e.fetchAuthenticationStoreData)(),{user:l,tveProvider:$t}=kt,Ot=(0,U.qy)(l,at==null?void 0:at.plans),zt=$t||l!=null&&l.tveProvider?!0:(0,s.Ih)(l,be),Jt=at==null||(W=at.gist)===null||W===void 0?void 0:W.id,dt=await(0,e.isTvodSubscribed)(Jt),Rt=kt==null||(M=kt.user)===null||M===void 0?void 0:M.isVip;if((Ot||zt||Rt)&&(ye=!1,ve.showNoPlansCta=!1),Pt||rt){ge({VLPlayerCore:N,playerId:h,metadataMap:F,isPlayable:y,detailPageClass:ke,isLoginRequired:se,containerClass:ne,contentDetails:at,isGameCheckout:Pt,errorDetails:j,errorMsg:Se,user:l,videoType:Je,isAuthzError:Vt});return}if(Ft)return $().publish("paywall",!0),$().publish("content-countdown",!0);const Bt=window==null||(Q=window.app_data)===null||Q===void 0||(P=Q.appcmsMain)===null||P===void 0||(Y=P.features)===null||Y===void 0?void 0:Y.free_preview,Io=(Bt==null?void 0:Bt.isFreePreview)||!1;let ko=!1,co=at==null||(H=at.gist)===null||H===void 0?void 0:H.contentType,Vo=(j==null?void 0:j.errorCode)==="TVE_PROVIDER_DISABLED";if(Io&&(G||!G&&!Pt&&(co!=="GAME"||co==="GAME"&&Je!=="preview"))&&!Rt&&co!=="GAME"||Vo){let fo=r==null?void 0:r.includes("FREE"),Do=r==null?void 0:r.includes("AVOD");if(zt=Vo?!1:zt,(!l||l&&!!!(Ot||zt))&&Je!=="preview"&&!Do&&!fo&&(r!=null&&r.length)){var Ho;if(ko=!0,y=!1,ve.isPlayable=!1,!((Ho=N())===null||Ho===void 0)&&Ho.isPlayerInitialised(h)){var Xo;(Xo=N())===null||Xo===void 0||Xo.dispose(h);let dl=document.getElementsByClassName(me);if(co==="SERIES"&&dl.length){let Yo=document.createElement("video");Yo.classList.add("video-js"),Yo.classList.add("videoEl"),Yo.id=h||"",Yo.style.width="100%",Yo.style.height="100%",Yo.style.position="absolute",dl[0].appendChild(Yo)}}}}const el=localStorage.getItem("subscribedEmail");if(!(l!=null&&l.email)&&!el&&(0,e.mX)({isEmailRequired:f,securityParameters:ve})){$().publish("paywall",!0);return}if(!l){if((0,e.R5)({isLoginRequired:se,securityParameters:ve}))return;if(!y){if((0,e.rW)({errorDetails:j,errorMsg:Se,metadataMap:F,user:l},ne,G,h,Ce,ft,Ye,Ft)&&!ye&&!te)return;if(ft){(0,e.k8)(j,Se,F,ne,h,E,r);return}if(r!=null&&r.length||ye){var It;if(ye){ve.monetisationType="NoPlans",(0,e.r1)(ve);return}let fo=window==null||(It=window.app_data)===null||It===void 0?void 0:It.monetizationModelByCountry;if(ve.isToShowSecurityWallMessage=!Ft,$().publish("content-countdown",!0),r!=null&&r.includes("SVOD")&&(r!=null&&r.includes("TVE"))||r!=null&&r.includes("SVOD+TVE")){ve.monetisationType="SVOD+TVE",(0,st.A)(`SVOD+TVE :: ${ve.monetisationType}`),(0,e.r1)(ve);return}if(r!=null&&r.includes("SVOD")&&(r!=null&&r.includes("TVOD"))||r!=null&&r.includes("SVOD+TVOD")){ve.monetisationType="SVOD+TVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("TVOD")){ve.monetisationType="TVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("SVOD")){if(fo==="FREE")return B(!1,G,h),!1;ve.monetisationType="SVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("TVE")){ve.monetisationType="TVE",(0,e.r1)(ve);return}if(r!=null&&r.includes("FREE")||r!=null&&r.includes("AVOD")){B(co==="GAME",G,h);return}}else{B(!0,G,h);return}}if(y){if(Ft)return $().publish("paywall",!0),$().publish("content-countdown",!0);if(n({isSubscribed:Ot,isTvodLoggedIn:dt,monetizationModels:r,videoType:Je,securityParameters:ve,isTveLoggedIn:zt,isMultiviewHardwall:G,playerId:h}))return}B(!1,G,h)}if(l){if(!y){if((0,e.rW)({errorDetails:j,errorMsg:Se,metadataMap:F,user:l},ne,G,h,Ce,ft,Ye)&&!ye&&!te)return;if(ft){(0,e.k8)(j,Se,F,ne,h,E,r);return}if($t&&!zt){let fo=r||[];r=fo==null?void 0:fo.filter(Do=>Do!="TVE")}if(r!=null&&r.length||ye){if(ye){ve.monetisationType="NoPlans",(0,e.r1)(ve);return}if(ve.isToShowSecurityWallMessage=!Ft,$().publish("content-countdown",!0),r!=null&&r.includes("SVOD")&&(r!=null&&r.includes("TVE"))||r!=null&&r.includes("SVOD+TVE")){if(Ot||zt){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}ve.monetisationType="SVOD+TVE",(0,e.r1)(ve);return}if(r!=null&&r.includes("SVOD")&&(r!=null&&r.includes("TVOD"))||r!=null&&r.includes("SVOD+TVOD")){if(Ot||dt){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}ve.monetisationType="SVOD+TVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("SVOD")){if(Ot){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}ve.monetisationType="SVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("TVE")){if(zt){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}ve.monetisationType="TVE",(0,e.r1)(ve);return}if(r!=null&&r.includes("TVOD")){if(Ot||dt){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}ve.monetisationType="TVOD",(0,e.r1)(ve);return}if(r!=null&&r.includes("FREE")||r!=null&&r.includes("AVOD")){(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}}else{(0,e.fK)({errorDetails:j,errorMsg:Se,metadataMap:F,isContentAvailabilityTimerWall:Ft},me,G,h,Ye,!1,null),B(!0,G,h);return}}if(y){if(Ft)return $().publish("paywall",!0),$().publish("content-countdown",!0);if(n({isSubscribed:Ot,isTvodLoggedIn:dt,monetizationModels:r,videoType:Je,securityParameters:ve,isTveLoggedIn:zt,isMultiviewHardwall:G,playerId:h}))return;B(!1,G,h);return}else{B(!1,G,h);return}}else{B(!1,G,h);return}},ge=L=>{var W;let{VLPlayerCore:M,playerId:Y,metadataMap:P,isPlayable:Q,detailPageClass:H,isLoginRequired:N,containerClass:h,contentDetails:_e,isGameCheckout:F,errorDetails:r,errorMsg:E,user:y,videoType:ne,isAuthzError:ke}=L;if(N){$().publish("paywall",!0);return}if(r&&(r.isCheckout=!0),(0,e.rW)({errorDetails:r,errorMsg:E,metadataMap:P,user:y},h,null,null,null,null,null)){(0,Le.TK)(!1);return}if(ne==="preview"){$().publish("paywall",!1);return}const j=(_e==null?void 0:_e.id)||(_e==null||(W=_e.gist)===null||W===void 0?void 0:W.id),Se=_e==null?void 0:_e.currentState,{remainingPreviewTime:d,isBlocked:se}=(0,e.qL)(j),{remainingPreviewTime:f}=(0,e.Tk)(Se),be=F?f:d,q=F?be<=0:se;if(M==null||M.onTimeUpdate(Y,e.nd),be&&!q&&!ke){let Ke=Array.from(document.getElementsByClassName("vjs-control-bar"))||[];Ke!=null&&Ke.length&&(Ke[0].style.visibility="hidden"),$().publish("paywall",!1);return}$().publish("block-preview",!0),$().publish("paywall",!0),(0,i.publishAppLoading)(!1)},n=({isSubscribed:L,isTvodLoggedIn:W,monetizationModels:M,videoType:Y,securityParameters:P,isTveLoggedIn:Q,isMultiviewHardwall:H,playerId:N})=>{var h;let _e=window==null||(h=window.app_data)===null||h===void 0?void 0:h.monetizationModelByCountry;if(Y==="preview"){if((!L||!W)&&(M!=null&&M.length)){if(M!=null&&M.includes("SVOD")&&(M!=null&&M.includes("TVE"))||M!=null&&M.includes("SVOD+TVE")){if(L||Q){B(!1,H,N);return}P.monetisationType="SVOD+TVE",(0,e.r1)(P);return}if(M!=null&&M.includes("SVOD")&&(M!=null&&M.includes("TVOD"))||M!=null&&M.includes("SVOD+TVOD")){if(L||W){B(!1,H,N);return}P.monetisationType="SVOD+TVOD",(0,e.r1)(P);return}if(M!=null&&M.includes("SVOD"))return L||_e==="FREE"?(B(!1,H,N),!1):(P.monetisationType="SVOD",(0,e.r1)(P),!1);if(M!=null&&M.includes("TVE")){if(Q){B(!1,H,N);return}P.monetisationType="TVE",(0,e.r1)(P);return}if(M!=null&&M.includes("TVOD")){if(L||W){B(!1,H,N);return}P.monetisationType="TVOD",(0,e.r1)(P);return}}}else return!1};o.d(yt,["$",0,c])},161(Ao,yt,o){"use strict";o.d(yt,{A:()=>s});var e=o(96540),w=o(77869),$=o(14546);function s(Ue){return function(i){var Le,st,U,me,ue,B;const[A,c]=(0,e.useState)(),{sectionHeadingStyles:ge}=(0,w.getFontsStyles)(i==null||(st=i.moduleData)===null||st===void 0||(Le=st.layout)===null||Le===void 0?void 0:Le.fontSetting),n=(i==null||(B=i.checkoutModuleData)===null||B===void 0||(ue=B.moduleData)===null||ue===void 0||(me=ue.layout)===null||me===void 0||(U=me.settings)===null||U===void 0?void 0:U.mergeForm)||!1,L=n&&(i==null?void 0:i.index)==="2.",W=async()=>{let M=await(0,$.j)(i==null?void 0:i.type);c(M)};return(0,e.useEffect)(()=>{W()},[]),A!=null&&A.error&&!(A!=null&&A.moduleData)?e.createElement(e.Fragment,null):e.createElement("div",null,i!=null&&i.title?e.createElement("div",{className:`checkout-container-listing-wrapper ${n?"merge-form-data":""}`},!L&&e.createElement("div",{className:"checkout-container-heading",style:{color:i==null?void 0:i.sectionTextColor,fontSize:ge.fontSize,fontFamily:ge.fontFamily}},n?i==null?void 0:i.title:`${i!=null&&i.index?i.index:""} ${i==null?void 0:i.title}`),e.createElement(Ue,{...i,moduleData:A==null?void 0:A.moduleData})):e.createElement(Ue,{...i,moduleData:A==null?void 0:A.moduleData}))}}},14546(Ao,yt,o){"use strict";var e=o(35295),w=o(51354);const $=async s=>{var Ue,i,Le,st,U,me,ue,B,A;if(!s)return{error:!1,type:s,moduleData:null};let c=window==null||(Le=window.app_data)===null||Le===void 0||(i=Le.appcmsMain)===null||i===void 0||(Ue=i.apiConfig)===null||Ue===void 0?void 0:Ue.apiBaseUrl,ge=(window==null?void 0:window.cachedAPI)||`${c}/graphql`,n={site:(window==null||(U=window.app_data)===null||U===void 0||(st=U.site)===null||st===void 0?void 0:st.siteInternalName)||null,device:"WEB",includeContent:!0,moduleLimit:4,moduleOffset:0,languageCode:(window==null||(A=window.app_data)===null||A===void 0||(B=A.appcmsMain)===null||B===void 0||(ue=B.languages)===null||ue===void 0||(me=ue.default)===null||me===void 0?void 0:me.code)||"en",countryCode:window==null?void 0:window.countryCode,userState:window.btoa(JSON.stringify({state:["loggedOut"]}
1)),modules:[],platform:"web_browser"};s==="SubscriptionModule"&&(n.path="/subscription"),s==="LocateModule"&&(n.path="/locate"),s==="CheckoutModule"&&(n.path="/checkout"),s==="AuthenticationModule"&&(n.path="/authentication"),s==="TveModule"&&(n.path="/tve");try{var L,W,M;let Y=await(0,e.O)(n,ge),P=Y==null||(M=Y.data)===null||M===void 0||(W=M.data)===null||W===void 0||(L=W.page)===null||L===void 0?void 0:L.modules,Q=P==null?void 0:P.filter(H=>(H==null?void 0:H.moduleType)===s);return{error:!1,moduleData:Q!=null&&Q.length?Q[0]:{},type:s}}catch(Y){return(0,w.A)(`Error in fetching ${s} module: ${Y}`,"error"),{error:!0,type:s,moduleData:null}}};o.d(yt,["j",0,$])},58689(Ao,yt,o){"use strict";var e=o(96540),w=o(51612),$=o(61171),s=o.n($);const i=({children:Le,enableBtns:st,title:U,description:me,confirmHandler:ue,cancelHandler:B,backHandler:A,shouldClosePopUpAfterConfirm:c=!0,show:ge,contentExtraPadding:n,contentAlignment:L,confirmCTA:W,cancelCTA:M,isComponent:Y,Component:P,options:Q,showSelectInput:H=!1,selectInputConfig:N,showTextBox:h=!1,textareaConfig:_e,message:F,messageAlignment:r="left",errorList:E,termsOfService:y})=>{var ne,ke,j,Se,d,se,f,be,q,Ke,Je,T,at,Yt,Pt,G,je,Z,ft,Ce,Ye,Ft,rt,ye;const[te,pt]=(0,e.useState)(!1),[Vt,ro]=(0,e.useState)({isError:!1,errMsg:""}),[io,ae]=(0,e.useState)(""),[ve,kt]=(0,e.useState)(""),l=!!(H&&!io);let $t=(0,e.useRef)(null),Ot=(0,e.useRef)(null),zt=(0,e.useRef)(null);const Jt=(0,e.useRef)(!1),dt=(0,e.useRef)(E);(0,e.useEffect)(()=>{dt.current=E},[E]),(0,e.useEffect)(()=>{pt(ge)},[ge]);const Rt=It=>{pt(It)},No=()=>{c&&Rt(!1),ue&&ue()},Bt=()=>{Rt(!1),B&&B()},Io=(se=window)===null||se===void 0||(d=se.app_data)===null||d===void 0||(Se=d.appcmsMain)===null||Se===void 0||(j=Se.brand)===null||j===void 0||(ke=j.cta)===null||ke===void 0||(ne=ke.primary)===null||ne===void 0?void 0:ne.backgroundColor,ko=(T=window)===null||T===void 0||(Je=T.app_data)===null||Je===void 0||(Ke=Je.appcmsMain)===null||Ke===void 0||(q=Ke.brand)===null||q===void 0||(be=q.cta)===null||be===void 0||(f=be.primary)===null||f===void 0?void 0:f.textColor,co=((je=window)===null||je===void 0||(G=je.app_data)===null||G===void 0||(Pt=G.appcmsMain)===null||Pt===void 0||(Yt=Pt.brand)===null||Yt===void 0||(at=Yt.cta)===null||at===void 0?void 0:at.rounded)||!1,Vo=It=>{var fo;if(!Jt.current)return;let Do=It,ll="Something went wrong";!((fo=dt.current)===null||fo===void 0)&&fo[`${Do}`]&&(ll=dt.current[`${Do}`]),ro({isError:!0,errMsg:ll})};(0,e.useEffect)(()=>(s().subscribe("popup-error",Vo),()=>s().unsubscribe("popup-error",Vo)),[]),(0,e.useEffect)(()=>(Jt.current=te,ro(It=>It!=null&&It.isError?{isError:!1,errMsg:""}:It),te?(window.addEventListener("keydown",Ho),document.body.style.overflow="hidden"):(window.removeEventListener("keydown",Ho),document.body.style.overflow=""),()=>{window.removeEventListener("keydown",Ho),document.body.style.overflow=""}),[te]),(0,e.useEffect)(()=>{const It=zt.current;if(!It)return;const fo=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'],Do=Array.from(It.querySelectorAll(fo.join(","))).filter(il=>il.offsetParent!==null);if(Do.length===0)return;const ll=Do[0],dl=Do[Do.length-1],Yo=il=>{il.key==="Tab"&&(il.shiftKey?document.activeElement===ll&&(il.preventDefault(),dl.focus()):document.activeElement===dl&&(il.preventDefault(),ll.focus()))};return It.addEventListener("keydown",Yo),$t!=null&&$t.current&&$t.current.focus(),()=>{It.removeEventListener("keydown",Yo)}},[te]);const Ho=It=>{if(It.key==="Escape"){var fo;Ot==null||(fo=Ot.current)===null||fo===void 0||fo.click();let Do=document.getElementById("otp-back-btn");Do&&Do.click()}},Xo=It=>{var fo,Do;N==null||N.selectHandler(It==null||(fo=It.target)===null||fo===void 0?void 0:fo.value),ae(It==null||(Do=It.target)===null||Do===void 0?void 0:Do.value)},el=It=>{var fo,Do;_e==null||_e.textareaHandler(It==null||(fo=It.target)===null||fo===void 0?void 0:fo.value),kt(It==null||(Do=It.target)===null||Do===void 0?void 0:Do.value)};return e.createElement(e.Fragment,null,te&&e.createElement(e.Fragment,null,e.createElement("div",{className:"popup-container",ref:zt,role:"dialog","aria-modal":"true","aria-label":U||"Popup Dialog",tabIndex:-1},e.createElement("div",{className:"popup-holder"},e.createElement("div",{className:"popup-wrapper popup-dialog"},!Y&&!(!(Q==null||(Z=Q.deleteConfig)===null||Z===void 0)&&Z.isMessage)&&e.createElement("div",{className:"back-btn",role:"button","aria-label":"back button",onKeyDown:It=>{(It.key==="Enter"||It.key===" ")&&Ot!=null&&Ot.current&&Ot.current.click()},tabIndex:0,ref:Ot,onClick:()=>
1{if(A)return A();Rt(!1),B&&B()}},(0,w.ev)(),e.createElement("div",null,((Ft=window)===null||Ft===void 0||(Ye=Ft.app_data)===null||Ye===void 0||(Ce=Ye.appcmsMain)===null||Ce===void 0||(ft=Ce.genericMessages)===null||ft===void 0?void 0:ft.backCta)||"Back")),Y?e.createElement(P,Q):e.createElement("div",{className:n?"popup-content extra-padding":"popup-content",style:{textAlign:L||"start"}},(U||me)&&e.createElement("div",{className:"disclaimer-holder"},e.createElement("div",{className:"disclaimer-title site-color"},U),e.createElement("div",{className:"disclaimer-description"},me)),e.createElement("div",{className:"child"},Le)),F&&e.createElement("div",{className:"message",style:{textAlign:r||"center"}},F),H&&(N==null?void 0:N.options)&&e.createElement("div",{className:"select-container"},e.createElement("select",{id:"select",name:"select",value:io,onChange:Xo},(N==null?void 0:N.placeHolderText)&&e.createElement("option",{value:"",disabled:!0,selected:!0},N==null?void 0:N.placeHolderText),N==null||(rt=N.options)===null||rt===void 0?void 0:rt.map((It,fo)=>e.createElement("option",{key:fo,value:It==null?void 0:It.value},It==null?void 0:It.title)))),h&&e.createElement("div",{className:"textarea-container"},e.createElement("textarea",{id:"textarea",name:"textarea",value:ve,placeholder:_e==null?void 0:_e.placeHolderText,rows:_e==null?void 0:_e.rows,onChange:el})),Vt!=null&&Vt.isError?e.createElement("div",{className:"error-msg"},Vt==null?void 0:Vt.errMsg):e.createElement(e.Fragment,null),st&&e.createElement("div",{className:"btn-holder"},e.createElement("button",{ref:$t,onClick:()=>No(),onKeyDown:It=>{(It.key==="Enter"||It.key===" ")&&No()},id:"confirm-btn",style:{...co&&{borderRadius:"30px"}},"aria-label":"Confirm",className:`confirm-btn btn ${l?"disable":""}`,disabled:!!l},W||"Confirm"),!(Q==null||(ye=Q.deleteConfig)===null||ye===void 0)&&ye.isDelete?e.createElement(e.Fragment,null):e.createElement("button",{style:{...co&&{borderRadius:"30px"}},onClick:()=>Bt(),onKeyDown:It=>{(It.key==="Enter"||It.key===" ")&&Bt()},"aria-label":"Cancel",className:"cancel-btn btn"},M||"Cancel")),y&&e.createElement("div",{className:"terms-container"},e.createElement("div",{dangerouslySetInnerHTML:{__html:y}})))))))};o.d(yt,["default",0,i])},26680(Ao,yt,o){"use strict";o.r(yt),o.d(yt,{default:()=>Y});var e=o(96540),w=o(47281),$=o(81952),s=o(76910),Ue=o(18987),i=o(50316),Le=o(51612),st=o(18213),U=o(51354),me=o(83061);const B=({moduleData:P})=>{var Q,H,N,h,_e,F,r,E,y,ne,ke;const j=(P==null?void 0:P.metadataMap)||{},Se=(P==null?void 0:P.layout)||{},[d,se]=(0,e.useState)(!0),[f,be]=(0,e.useState)([]),[q,Ke]=(0,e.useState)([]),[Je,T]=(0,e.useState)([]),at=window==null||(h=window.app_data)===null||h===void 0||(N=h.appcmsPlatform)===null||N===void 0||(H=N.images)===null||H===void 0?void 0:H.desktopLogo,Yt=(window==null||(r=window.app_data)===null||r===void 0||(F=r.appcmsPlatform)===null||F===void 0||(_e=F.tveSettings)===null||_e===void 0?void 0:_e.version)||"v1",Pt=(0,e.useRef)(null),[G,je]=(0,e.useState)(null),[Z,ft]=(0,e.useState)(!1),Ce=ae=>{for(let ve=0;ve<f.length;ve++)if(ae.identifier==f[ve].ID||ae.identifier==f[ve].id)return!0;return!1},Ye=()=>{typeof window!="undefined"&&(0,st.T)().then(ae=>{var ve,kt,l,$t;Ke(ae==null||($t=ae.data)===null||$t===void 0||(l=$t.bootstrap)===null||l===void 0||(kt=l.appcmsPlatform)===null||kt===void 0||(ve=kt.tveSettings)===null||ve===void 0?void 0:ve.providers),(0,s.R1)().then(Ot=>{(0,s.m8)({...Ot.data}).then(()=>{(0,s.D0)().then(zt=>{be(zt),T(zt),se(!1)})})})})};(0,e.useEffect)(()=>{const ae=Ue.default.get("TveAccessToken"),ve=localStorage.getItem("fingerprintDeviceId");Yt=="v2"&&(!ae||!ve?Ye():(0,st.T)().then(kt=>{var l,$t,Ot,zt;Ke(kt==null||(zt=kt.data)===null||zt===void 0||(Ot=zt.bootstrap)===null||Ot===void 0||($t=Ot.appcmsPlatform)===null||$t===void 0||(l=$t.tveSettings)===null||l===void 0?void 0:l.providers),(0,s.D0)().then(Jt=>{be(Jt),T(Jt),se(!1)})})),Pt!=null&&Pt.current&&Pt.current.focus()},[]);let Ft;const rt=ae=>{var ve,kt,l;clearTimeout(Ft);let $t=ae==null||(kt=ae.target)===null||kt===void 0||(ve=kt.value)===null||ve===void 0?void 0:ve.trim().toLowerCase(),Ot=ae==null||(l=ae.target)===null||l===void 0?void 0:l.value;if($t===""){be(Je),je(null);return}je(Ot),Ft=setTimeout(()=>{let zt=Je.filter(Jt=>Jt.displayName.toLowerCase().includes($t));be(zt)},300)},ye=()=>{(0,$.oY)(!1)},te=ae=>{var ve;let kt=window==null||(ve=window.location)===null||ve===void 0?void 0:ve.host;const l=sessionStorage.getItem("tveRegCode");kt.includes("www.")&&(kt=kt.replace("www.",""));
1const $t=new URLSearchParams;if($t.append("domainName",kt),$t.append("mvpd",ae),l){var Ot;$t.append("redirectUrl",`${window==null||(Ot=window.location)===null||Ot===void 0?void 0:Ot.origin}`)}else{var zt;$t.append("redirectUrl",`${window==null||(zt=window.location)===null||zt===void 0?void 0:zt.origin}${window.location.pathname}?isTveUser=Authenticated`),localStorage.setItem("selectedMvpdId",ae)}l?(0,s.cP)($t,l):(0,s.$A)($t,ae)},Vt=(ae=>{let ve={alt:"Provider logo",src:""};try{const kt=JSON.parse(ae);if(!kt||!Array.isArray(kt)||!(kt!=null&&kt.length))return ve;const{title:l,subTitle:$t,description:Ot,imageUrl:zt,imageUrlMobile:Jt,imageUrlTablet:dt}=kt[0];return ve.src=zt||Jt||dt,ve.alt=l||$t||Ot||"Provider logo",ve}catch(kt){return(0,U.A)(`Error parsing imageList: ${kt}`,"error"),ve}})(j==null?void 0:j.imageList),ro=(Q=Se==null||(E=Se.settings)===null||E===void 0?void 0:E.mvpdBgColor)!==null&&Q!==void 0?Q:"#383838",io=ae=>{const ve=document.getElementsByClassName("toggle-info")[0];ae=="over"?ve.style.display="block":(ae=="out",ve.style.display="none")};return e.createElement("div",{tabIndex:1,role:"dialog","aria-live":"polite","aria-modal":"true",ref:Pt,className:"v2-login-popup-overlay"},e.createElement("div",{className:"close-btn-wrapper"},e.createElement("button",{className:"close-button","aria-label":"back",tabIndex:0,onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),be(Je),je(null),ft(!1))},onClick:()=>{be(Je),je(null),ft(!1)}},(0,Le.j2)()," ",(window==null||(ke=window.app_data)===null||ke===void 0||(ne=ke.appcmsMain)===null||ne===void 0||(y=ne.genericMessages)===null||y===void 0?void 0:y.backCta)||"Back"),e.createElement("button",{className:"close-button","aria-label":"close",onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),ye())},onBlur:ye,onClick:ye},(0,Le.n)())),e.createElement("div",{className:"v2-tve-container site-background-color site-color",onClick:ae=>ae.stopPropagation()},e.createElement("div",{className:"popup-content","aria-label":"TVE Provider Selector"},e.createElement("div",{className:"popup-left"},e.createElement("div",{className:"logo-wrapper"},e.createElement("img",{src:Vt==null?void 0:Vt.src,alt:""}))),e.createElement("div",{className:"popup-right"},e.createElement("div",{tabIndex:1,className:"head"},(j==null?void 0:j.chooseProvderTxt)||"Choose Your TV Provider"),e.createElement("div",{tabIndex:1,className:"subtitle"},"Don't see your provider? Search below, or select from the ",e.createElement("span",{tabIndex:1,role:"link","aria-pressed":Z,"aria-label":"view full provider list Switch btween list and grid view",onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),ft(!Z))},onClick:()=>{ft(!Z),Z||(0,me.pushAdobeAnalyticsData)({eventName:"Choose Alternate Provider",config:{type:"TVE",status:"authn"}})}},"full list"),".",e.createElement("span",{className:"toggle-info-wrapper"},e.createElement("button",{tabIndex:1,className:"toggle-icon","aria-label":"Switch to list or grid view","aria-describedby":"toggle-tooltip",onMouseOver:()=>io("over"),onMouseOut:()=>io("out"),onFocus:()=>io("over"),onBlur:()=>io("out")},(0,Le.zQ)()),e.createElement("div",{className:"toggle-info",role:"tooltip",id:"toggle-tooltip"},"Switch between grid and list view"))),e.createElement("div",{className:"search-container"},e.createElement("input",{tabIndex:1,"aria-label":"Search",type:"text",placeholder:"Search",className:"search-input",value:G||"",onChange:rt}),e.createElement("span",{className:"search-icon"},(0,Le.ju)())),d?e.createElement(i.Z,null):e.createElement("div",null,e.createElement("div",{className:"mvpd-grid"},f.length>0&&!G&&!Z&&(q==null?void 0:q.length)>0&&q.map((ae,ve)=>{if(Ce(ae))return e.createElement("div",{key:ve,tabIndex:1,className:"grid-item",role:"button","aria-label":ae.title||"Tve provider",onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),(0,w.publishAppLoading)(!0),te(ae.identifier),localStorage.setItem("selectedMvpdFw",ae.fwIdentifier))},onClick:()=>{(0,w.publishAppLoading)(!0),te(ae.identifier),(0,me.pushAdobeAnalyticsData)({eventName:"Adobe Pass: MVPD Selected",config:{type:"TVE",
1status:"authn",mvpdIdentifier:ae.identifier,customEvent:{key:"passselected",value:!0}}}),localStorage.setItem("selectedMvpdFw",ae.fwIdentifier)},style:{backgroundColor:ro}},e.createElement("img",{src:ae.logoUrl,alt:`${ae.title}`||"Tve provider","aria-label":ae.title||"Tve provider"}))})),f.length>0&&(G||Z)?e.createElement("div",{className:"list-container"},e.createElement("ul",null,q.map((ae,ve)=>{if(Ce(ae))return e.createElement("li",{tabIndex:1,key:ve,role:"button",className:"mvpd-provider","aria-label":ae==null?void 0:ae.title,"aria-pressed":"false",onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),(0,w.publishAppLoading)(!0),te(ae.identifier),localStorage.setItem("selectedMvpdFw",ae.fwIdentifier))},onClick:()=>{(0,w.publishAppLoading)(!0),(0,me.pushAdobeAnalyticsData)({eventName:"Adobe Pass: MVPD Selected",config:{type:"TVE",status:"authn",mvpdIdentifier:(ae==null?void 0:ae.identifier)||(ae==null?void 0:ae.displayName),customEvent:{key:"passselected",value:!0}}}),te(ae.identifier),localStorage.setItem("selectedMvpdFw",ae.fwIdentifier)}},e.createElement(A,{label:ae==null?void 0:ae.title,search:G}))}))):null)))))};function A({label:P,search:Q}){if(!P)return null;if(!Q)return e.createElement(e.Fragment,null,P);const H=P.split(new RegExp(`(${Q})`,"gi"));return!H||!H.length?e.createElement("p",null,P):e.createElement("p",null,H.map((N,h)=>N.toLowerCase()===Q.toLowerCase()?e.createElement("span",{style:{fontWeight:"bold"},key:h},N):N))}var c=o(5968),ge=o(43543),n=o(161),L=o(12308);const W=({previouslyFocusedElement:P,moduleData:Q})=>{const[H,N]=(0,e.useState)(!1),h=F=>{P.current||(P.current=document.activeElement),N(F),F&&((0,me.pushAdobeAnalyticsData)({eventName:"Provider Landing",config:{type:"TVE",status:"authn",customEvent:{key:"passlanding",value:!0}}}),setTimeout(()=>{(0,me.pushAdobeAnalyticsData)({eventName:"Open MVPD Selector",config:{type:"TVE",status:"authn",customEvent:{key:"passmvpdselector",value:!0}}})},300))};(0,e.useEffect)(()=>{!H&&P.current&&P.current.focus()},[H]);const _e=async()=>{let F=(0,ge.ky)(),r=new URLSearchParams(window.location.search);const E=window.location.pathname.includes("checkout")?"/":window.location.pathname,y=localStorage.getItem("selectedMvpdId");let ne=r.get("isTveUser");if(F&&ne==="Authenticated"){localStorage.setItem("IsLoaded","true"),(0,w.publishAppLoading)(!0);try{var ke,j,Se,d;const Ke=await(0,s.lO)(),Je=(d=window)===null||d===void 0||(Se=d.app_data)===null||Se===void 0||(j=Se.appcmsPlatform)===null||j===void 0||(ke=j.tveSettings)===null||ke===void 0?void 0:ke.resourceIds;if(y===Ke.data.existingParameters.mvpd){const at=(await(0,s.Ls)()).data.profiles[y].attributes;if((0,L.setStorageItem)("tveProfileResponse",at),Je&&Je.length>0){var se,f;const Pt=(await(0,s.K)(y)).filter(G=>G&&G.authorized).map(G=>G.resource);await(0,c.i)({tveUserId:(at==null||(se=at.userID)===null||se===void 0?void 0:se.value)||"",mvpd:y,encryptedZip:(at==null||(f=at.zip)===null||f===void 0?void 0:f.value)||"",path:E,resourceIds:Pt}),localStorage.removeItem("IsLoaded")}else{var be,q;await(0,c.i)({tveUserId:(at==null||(be=at.userID)===null||be===void 0?void 0:be.value)||"",mvpd:y,encryptedZip:(at==null||(q=at.zip)===null||q===void 0?void 0:q.value)||"",path:E})}}}catch(Ke){localStorage.removeItem("IsLoaded"),(0,w.publishAppLoading)(!1),(0,me.pushAdobeAnalyticsData)({eventName:"Adobe Pass:Authenticate:Fail",config:{type:"TVE",status:"authn",mvpdIdentifier:y||null,authorizationStatus:"Not Authorized",customEvent:{key:"passauthenfail",value:!0}}})}}};return(0,e.useEffect)(()=>{localStorage.getItem("IsLoaded")||_e()},[]),(0,e.useEffect)(()=>((0,$.n3)(h),()=>{(0,$.YT)(h)}),[]),e.createElement(e.Fragment,null,H?e.createElement(B,{moduleData:Q}):null)};function M(P){return e.createElement(W,P)}const Y=(0,n.A)(M)},93289(Ao,yt,o){"use strict";var e=o(96540);const $=({targetDate:s,metadataMap:Ue=null,className:i,style:Le,containerStyles:st,labelStyles:U,valueStyles:me})=>{var ue,B,A;const[c,ge]=(0,e.useState)(W(L(s))),n=(A=window)===null||A===void 0||(B=A.app_data)===null||B===void 0||(ue=B.appcmsMain)===null||ue===void 0?void 0:ue.genericMessages;(0,e.useEffect)(()=>{const Y=setInterval(()=>{const P=W(L(s));P.total<=0&&(clearInterval(Y),window.location.reload()),ge(P)},1e3);return()=>clearInterval(Y)},[s]);function L(Y){return typeof Y=="number"?Y:Y instanceof Date?Y.getTime():Date.now()}function W(Y){const P=Date.now(),Q=Y-P,H=Math.floor(Q/1e3%60),N=Math.floor(Q/1e3/60%60),h=Math.floor(Q/(1e3*60*60)%24),_e=Math.floor(Q/(1e3*60*60*24)%30),F=Math.floor(Q/(1e3*60*60*24*30)%12),r=Math.floor(Q/(1e3*60*60*24*365));return{total:Q,years:r,months:F,days:_e,hours:h,minutes:N,seconds:H}}function M(){return c.years>0?e.createElement("div",null,c.years," ",c.years>1?(n==null?void 0:n.yearTextPlural)||"Years":(n==null?void 0:n.yearText)||"Year",c.months>0&&e.createElement(e.Fragment,null,", ",c.months," ",c.months>1?(n==null?void 0:n.monthTextPlural)||"Months":(n==null?void 0:n.monthText)||"Month")):c.months>0?e.createElement("div",null,c.months," ",c.months>1?(n==null?void 0:n.monthTextPlural)||"Months":(n==null?void 0:n.monthText)||"Month",c.days>0&&e.createElement(e.Fragment,null,", ",c.days," ",c.days>1?(n==null?void 0:n.dayTextPlural)||"Days":(n==null?void 0:n.dayUpper)||"Day")):c.days>=1?e.createElement("div",null,c.days," ",c.days>1?(n==null?void 0:n.dayTextPlural)||"Days":(n==null?void 0:n.dayUpper)||"Day"):e.createElement("div",{className:"countdown-timer"},e.createElement("div",{className:"time-box"},c.hours.toString().padStart(2,"0")," "),e.createElement("span",null," : "),e.createElement("div",{className:"time-box"}," ",c.minutes.toString().padStart(2,"0")," "),e.createElement("span",null," : "),e.createElement("div",{className:"time-box"}," ",c.seconds.toString().padStart(2,"0")))}return c.total>0?e.createElement("div",{className:`counter-overlay ${i}`,style:Le},e.createElement("div",{className:"counter-container",style:st},e.createElement("div",{className:"static-label",style:U},(Ue==null?void 0:Ue.videoStartInText)||"Available in: "),e.createElement("div",{className:"time-text",style:me},M()))):null};o.d(yt,["A",0,$])},63479(Ao,yt,o){"use strict";o.d(yt,{A:()=>L});var e=o(96540),w=o(61171),$=o.n(w),s=o(90969),Ue=o(50316),i=o(51354);const Le=["fire_tv","android_tv","roku_box"],U=W=>{var M,Y,P,Q;const H=W==null||(M=W.module)===null||M===void 0?void 0:M.metadataMap,N=W==null||(P=W.module)===null||P===void 0||(Y=P.layout)===null||Y===void 0?void 0:Y.settings,[h,_e]=(0,e.useState)(!1),F="$$$",r=(H==null||(Q=H.shareLocationDescription)===null||Q===void 0?void 0:Q.includes(F))||!1,E=()=>{var d,se,f,be;const q=((se=window)===null||se===void 0||(d=se.location)===null||d===void 0?void 0:d.search)||"",Ke=((be=window)===null||be===void 0||(f=be.location)===null||f===void 0?void 0:f.pathname)||"",T=ne
1w URLSearchParams(q).get("device");return!T||!Ke?!1:Le.includes(T)&&Ke.includes("/locate")},y=()=>{var d,se;const f=((se=window)===null||se===void 0||(d=se.location)===null||d===void 0?void 0:d.search)||"";return new URLSearchParams(f).get("device")==="roku_box"};(0,e.useEffect)(()=>{y()&&sessionStorage.setItem("isRokuBox","locate"),E()&&sessionStorage.setItem("needToSetPlatformLocation","true")},[]);const ke=r?(()=>{var d;const se=N==null?void 0:N.delimiterText,f=N==null?void 0:N.delimiterLink,be=e.createElement("a",{"aria-label":se,target:"_blank",rel:"noreferrer",style:{textDecoration:"underline",textUnderlineOffset:"3px",color:"white"},href:f},se),[q,Ke]=H==null||(d=H.shareLocationDescription)===null||d===void 0?void 0:d.split(F);return e.createElement(e.Fragment,null,q," ",be," ",Ke)})():H==null?void 0:H.shareLocationDescription,j=()=>{localStorage.removeItem("locationCoords"),(0,s.to)().then(d=>{let se=d.data.lookupMode==="coordinates";const f={postalCode:d.data.postalcode,countryisocode:d.data.countryisocode,byCoordinates:se,origip:d.data.origip};localStorage.setItem("locationCoords",JSON.stringify(f))})},Se=()=>{_e(!0),navigator.geolocation?navigator.geolocation.getCurrentPosition(d=>{localStorage.removeItem("locationCoords");let se=d.coords;se!=null&&se.latitude&&(se!=null&&se.longitude)&&(0,s.WR)(se.latitude,se.longitude).then(f=>{let be=f.data.lookupMode==="coordinates";const q={postalCode:f.data.postalcode,latitude:se.latitude,longitude:se.longitude,countryisocode:f.data.countryisocode,byCoordinates:be,origip:f.data.origip};localStorage.setItem("locationCoords",JSON.stringify(q))}),$().publish("progressState",2)},d=>{switch(d.code&&j(),d.code){case d.PERMISSION_DENIED:(0,i.A)("User denied the request for Geolocation.","error");break;case d.POSITION_UNAVAILABLE:(0,i.A)("Location information is unavailable.","error");break;case d.TIMEOUT:(0,i.A)("The request to get user location timed out.","error");break;default:(0,i.A)("An unknown error occurred.","error");break}_e(!1),$().publish("showHbaFlow",!1)}):(0,i.A)("Geolocation is not supported by this browser.","error")};return e.createElement(e.Fragment,null,h?e.createElement(Ue.A,null):e.createElement("div",{className:"share-location-wrapper"},e.createElement("h4",{className:"title"},(H==null?void 0:H.setHomeLocationText)||"Share your location"),e.createElement("p",{className:"description"}," ",ke||"Broadcast restrictions can limit live game broadcasts to a 150-mile radius from Washington, DC. Enabling location services allows for more accurate detection of your viewing area."),e.createElement("button",{"aria-label":"Continue",className:"action-btn",onClick:Se},(H==null?void 0:H.continueText)||"Continue")))};var me=o(51612),ue=o(92857),B=o(47767),A=o(12308);const ge=({module:W,isNoPlans:M})=>{var Y;const[P,Q]=(0,e.useState)(null),[H,N]=(0,e.useState)(!0),h=W==null||(Y=W.module)===null||Y===void 0?void 0:Y.metadataMap,_e=(0,B.Zp)(),F=(0,e.useRef)(null);(0,e.useEffect)(()=>{const ke=document.querySelector(".locate-design-wrapper");return ke&&(ke.getElementsByClassName("geo-locate-wrapper")[0].style.padding="0px",ke.getElementsByClassName("right-section")[0].classList.add("zipcode-right-section")),()=>{const j=document.querySelector(".locate-design-wrapper");j&&(j.getElementsByClassName("geo-locate-wrapper")[0].style.padding="16px",j.getElementsByClassName("right-section")[0].classList.remove("zipcode-right-section"))}},[]);const r=()=>{const ke=localStorage.getItem("locationCoords");return ke&&Q(JSON.parse(ke)),ke},E=()=>{if(H||N(!0),!r())clearTimeout(F.current),F.current=setTimeout(()=>{E()},500);else{N(!1);return}};(0,e.useEffect)(()=>{E()},[]);const y=async()=>{N(!0);const ke=P.byCoordinates?{hba:{enabled:!0,latitude:P==null?void 0:P.latitude,longitude:P==null?void 0:P.longitude}}:{hba:{enabled:!0}},j=(0,A.getStorageItem)("AuthenticationStore");P&&(0,s.x_)(ke).then(Se=>{const d=Se.data.hba;let f={...j==null?void 0:j.user,hbaMetadata:d};(0,A.setStorageItem)("AuthenticationStore",{...j,user:f}),M?($().publish("apploading",!1),N(!1),$().publish("reRender",!0),window.location.reload()):$().publish("apploading",!0),ne(!1)}).catch(Se=>{N(!1)}),$().publish("showHbaFlow",!1)},ne=async ke=>{var j,Se,d,se,f;const be=((Se=window)===null||Se===void 0||(j=Se.location)===null||j===void 0?void 0:j.search)||"",q=sessionStorage.getItem("needToSetPlatformLocation")==="true";N(!0);const Ke=(0,A.getStorageItem)("routeState");let Je=(se=window)===null||se===void 0||(d=se.location)===null||d===void 0?void 0:d.pathname;const T={hba:{enabled:!1}};if(ke){const Yt=(0,A.getStorageItem)("AuthenticationStore");await(0,s.x_)(T).then(Pt=>{const G=Pt.data.hba;let Z={...Yt==null?void 0:Yt.user,hbaMetadata:G};(0,A.setStorageItem)("AuthenticationStore",{...Yt,user:Z}),$().publish("apploading",!0),M&&($().publish("apploading",!1),N(!1),$().publish("reRen
1der",!0),window.location.reload())}).catch(Pt=>{N(!1)})}let at=await(0,ue.e)(Ke,(f=location)===null||f===void 0?void 0:f.pathname,ke,!1,Je);if(q){$().publish("apploading",!1),N(!1),window.location.replace("/thankyou"),sessionStorage.removeItem("needToSetPlatformLocation");return}M||_e(at),$().publish("showHbaFlow",!1)};return e.createElement(e.Fragment,null,H||!P?e.createElement(Ue.A,null):e.createElement("div",{className:"zipcode-wrapper"},e.createElement("div",{className:"zipcode-info"},(0,me.BR)(),e.createElement("p",{className:"title"},(h==null?void 0:h.zipCodeText)||"Zip Code:"),e.createElement("p",{className:"num"},P==null?void 0:P.postalCode)),e.createElement("div",{className:"zipcode-actions"},e.createElement("h4",{className:"title"},(h==null?void 0:h.setHomeLocationText)||"Set your home location"),e.createElement("p",{className:"description"},(h==null?void 0:h.setHomeLocationDescText)||"You can always change your home location in settings later. Not your zip code? Continue and verify your location in settings later."),e.createElement("div",{className:"action-btn"},e.createElement("button",{"aria-label":"Set as Home Location",className:"btn1",onClick:y},(h==null?void 0:h.setHomeLocationBtn)||"Set as Home Location"),e.createElement("button",{"aria-label":"I'll do it later",className:"btn2",onClick:()=>ne(!0)},(h==null?void 0:h.cancelSetLocationText)||"I'll do it later")))))},L=W=>{const[M,Y]=(0,e.useState)(1),P=Q=>{Y(Q)};return(0,e.useEffect)(()=>{$().subscribe("progressState",P)},[]),e.createElement(e.Fragment,null,e.createElement("div",{className:"geo-locate-wrapper"},M===1?e.createElement(U,{module:W==null?void 0:W.module}):e.createElement(e.Fragment,null),M===2?e.createElement(ge,{module:W==null?void 0:W.module,isNoPlans:W==null?void 0:W.NoPlans}):e.createElement(e.Fragment,null)))}},47472(Ao,yt,o){"use strict";var e=o(96540);const $=({rating:s,runtime:Ue,year:i,seasons:Le,categories:st,className:U,children:me})=>{var ue,B,A,c,ge;const n=[s&&{value:s,className:"content-metadata",isRating:!0},Ue&&{value:Ue,className:"metadata-text"},i&&{value:i,className:"metadata-text"},Le&&{value:Le,className:"metadata-text"},st&&{value:st,className:"categories-list"}].filter(Boolean);return!n.length&&!me?null:e.createElement("div",{className:["metadata-row",U].filter(Boolean).join(" "),style:{color:(ge=window)===null||ge===void 0||(c=ge.app_data)===null||c===void 0||(A=c.appcmsMain)===null||A===void 0||(B=A.brand)===null||B===void 0||(ue=B.general)===null||ue===void 0?void 0:ue.textColor}},n.map((L,W)=>{var M;return e.createElement(e.Fragment,{key:`${L.className}-${W}`},W>0&&!(!((M=n[W-1])===null||M===void 0)&&M.isRating)&&e.createElement("span",{className:"metadata-separator","aria-hidden":"true"},"|"),e.createElement("p",{"aria-label":L.value,role:"text",tabIndex:0,className:L.className},L.value))}),me)};o.d(yt,["h",0,$])},24666(Ao,yt,o){"use strict";var e=o(96540),w=o(51612),$=o(61171),s=o.n($),Ue=o(47767),i=o(43543),Le=o(79543),st=o(73851),U=o(30209),me=o(64707),ue=o(17535),B=o(25806),A=o(12308);const c=({metadataMap:n,subscriptionPopupFonts:L,ctaStyles:W})=>{var M,Y,P,Q,H,N,h;let{popupHeadingTitleFont:_e,popupCtaTitleFont:F,popupCtaSubTitleFont:r,popupPriceFont:E,popupDetailFont:y}=L,ne=window==null||(Y=window.app_data)===null||Y===void 0||(M=Y.appcmsMain)===null||M===void 0?void 0:M.brand,{cta:ke,ctaHover:j}=W;const Se=(0,e.useRef)(null),[d,se]=(0,e.useState)({isOpen:!1,plansData:{},contentDetails:{},isMultiview:!1,subscriptionPopupFonts:null,isCheckout:!1}),[f,be]=(0,e.useState)(null),[q,Ke]=(0,e.useState)(null),Je=(0,Ue.Zp)(),T=(window==null||(H=window.app_data)===null||H===void 0||(Q=H.appcmsMain)===null||Q===void 0||(P=Q.monetizationConfig)===null||P===void 0?void 0:P.showPlanFromPlanInfo)||!1,at=Ce=>{se(Ce);let Ye=document.getElementsByTagName("body");Ye!=null&&Ye.length&&Ce?Ye[0].style.overflow="hidden":Ye[0].style.overflow="unset",Ce!=null&&Ce.isOpen||(Ye[0].style.overflow="unset")},Yt=()=>{let Ce=document.getElementsByTagName("body");Ce[0].style.overflow="unset",se(Ye=>({...Ye,isOpen:!1}))},Pt=Ce=>
1{if(Ce!=null&&Ce.selectedPlanId){be({planId:Ce.selectedPlanId,type:Ce==null?void 0:Ce.selectedType});return}be(Ce==null?void 0:Ce.plan)},G=Ce=>{Ce!=null&&Ce.appliedOfferCode&&!(Ce!=null&&Ce.isDeferred)?Ke(Ce):Ke(null)};(0,e.useEffect)(()=>{let Ce=(0,st.fetchCurrentPlan)();return Ce&&be(Ce),s().subscribe("subscription-modal",at),(0,Le.Ju)(Pt),(0,U.Mf)(G),()=>{let Ye=document.getElementsByTagName("body");Ye[0].style.overflowX="hidden",Ye[0].style.overflowY="unset"}},[]);const je=()=>"/viewplans",Z=async(Ce,Ye,Ft)=>{var rt,ye,te,pt,Vt,ro,io,ae,ve;const kt=await(0,B.checkUserCheckoutFlow)(d==null||(ro=d.contentDetails)===null||ro===void 0||(Vt=ro.seasons)===null||Vt===void 0||(pt=Vt[0])===null||pt===void 0||(te=pt.episodes)===null||te===void 0||(ye=te[0])===null||ye===void 0||(rt=ye.gist)===null||rt===void 0?void 0:rt.id),l=(d==null||(ae=d.contentDetails)===null||ae===void 0||(io=ae.gist)===null||io===void 0?void 0:io.contentType)==="SERIES",$t=d==null?void 0:d.isV2Content;if(kt&&l&&$t){var Ot,zt,Jt,dt;sessionStorage.setItem("currentPlan",JSON.stringify(d==null?void 0:d.plansData[Ye])),s().publish("showCheckoutDetailPage",d==null||(dt=d.contentDetails)===null||dt===void 0||(Jt=dt.seasons)===null||Jt===void 0||(zt=Jt[0])===null||zt===void 0||(Ot=zt.episodes)===null||Ot===void 0?void 0:Ot[0]);return}if(d!=null&&d.plansData){var Rt;let co=(Rt=Object.keys(d==null?void 0:d.plansData))===null||Rt===void 0?void 0:Rt.map(Ho=>{var Xo,el;return d==null||(el=d.plansData[Ho])===null||el===void 0||(Xo=el.plan)===null||Xo===void 0?void 0:Xo.id}),Vo=co==null?void 0:co.filter(Ho=>Ho).join(",");sessionStorage.setItem("contentPlanIds",Vo)}if(d!=null&&d.isCheckout){let co=d==null?void 0:d.plansData[Ye];be(co),sessionStorage.setItem("currentPlan",JSON.stringify(d==null?void 0:d.plansData[Ye])),(0,ue.setTransactionDataInStorage)(d==null?void 0:d.plansData[Ye],d.contentDetails,Ye),(0,Le.Yy)(d==null?void 0:d.plansData[Ye]);let Vo={id:co==null?void 0:co.planId,featureDetails:co==null?void 0:co.featureDetails};if((0,Le.SJ)({planDetails:Vo,selectedPlanId:Vo==null?void 0:Vo.id,selectedType:co==null?void 0:co.type}),Ce==="allPlans"){var No;(0,A.setStorageItem)("isRedirected",{path:(No=location)===null||No===void 0?void 0:No.pathname,redirect:!0,isDetailPage:!0});let Ho=je();Je(Ho)}return}if((0,i.H3)()&&Ft){var Bt;sessionStorage.setItem("currentPlan",JSON.stringify(Ft)),(0,ue.setTransactionDataInStorage)(d==null?void 0:d.plansData[Ye],d.contentDetails,Ye),(0,A.setStorageItem)("isRedirected",{path:(Bt=location)===null||Bt===void 0?void 0:Bt.pathname,redirect:!0,isDetailPage:!0}),Je("/checkout");return}sessionStorage.setItem("currentPlan",JSON.stringify(d==null?void 0:d.plansData[Ye])),(0,ue.setTransactionDataInStorage)(d==null?void 0:d.plansData[Ye],d.contentDetails,Ye);let Io=await(0,i.CX)();if((0,A.setStorageItem)("isRedirected",{path:(ve=location)===null||ve===void 0?void 0:ve.pathname,redirect:!0,isDetailPage:!0}),Io){if(!await(0,i.vS)()){let Vo=(0,A.getStorageItem)("isRedirected");(0,A.setStorageItem)("isRedirected",{...Vo,checkForHBA:!0,path:location.pathname,isDetailPage:!0,redirect:!1}),Je("/locate");return}if(Ye!=null&&Ye.includes("TVE")){Je("/tve");return}if(Ce==="allPlans"){var ko;(0,A.setStorageItem)("isRedirected",{path:(ko=location)===null||ko===void 0?void 0:ko.pathname,redirect:!0,isDetailPage:!0,isMultiview:d==null?void 0:d.isMultiview}),Je("/viewplans")}else Je("/subscription")}else Je("/authentication")},ft=Ce=>Ce?{backgroundColor:j==null?void 0:j.backgroundColor,color:j==null?void 0:j.color}:ke;return e.createElement(e.Fragment,null,d!=null&&d.isOpen?e.createElement("div",{className:"subscription-popup-wrapper"},e.createElement("div",{className:"popup-card",style:{background:ne==null||(N=ne.general)===null||N===void 0?void 0:N.backgroundColor}},e.createElement("div",{className:"popup-header"},e.createElement("div",{className:"popup-header",style:_e},n==null?void 0:n.morePurchaseText),e.createElement("div",{className:"close-btn",onClick:()=>Yt()},e.createElement("p",null,n==null?void 0:n.closeText),(0,w.n)())),e.createElement("div",{className:"popup-content-container"},e.createElement("div",{className:"popup-buttons"},(h=Object.keys(d==null?void 0:d.plansData))===null||h===void 0?void 0:h.map((Ce,Ye)=>{var Ft,rt,ye,te,pt,Vt,ro,io,ae,ve,kt;let l=d==null?void 0:d.plansData[Ce];if(!(l!=null&&l.planId)&&(l!=null&&l.plan)&&(l=(0,st.structuredPlan)(l==null?void 0:l.plan,d==null?void 0:d.subscriptionPopupFonts)),(l==null?void 0:l.type)==="TVE"||(l==null?void 0:l.type)==="FreeAccount"||(l==null?void 0:l.type)==="NoPlans"){var $t;return e.createElement("div",{className:(f==null?void 0:f.type)=="TVE"?"popup-button is-active":"popup-button",id:Ce,onClick:()=>Z("other",Ce,l),style:ft((f==null?void 0:f.type)=="TVE")},e.createElement("div",{className:"type-details"},e.createElement("div",{className:"sub-type",style:F},d==null||($t=d.plansData[Ce])===null||$t===void 0?void 0:$t.title)))}if((l==null?void 0:l.type)==="Rent"||(l==null?void 0:l.type)==="Buy"){var Ot,zt,Jt,dt,Rt,No;let Bt=d==null?void 0:d.plansData[Ce];return e.createElement("div",{className:((f==null?void 0:f.planId)||(f==null?void 0:f.id))===((Bt==null?void 0:Bt.id)||(Bt==null?void 0:Bt.planId))&&
1(f==null?void 0:f.type)===(Bt==null?void 0:Bt.type)?"popup-button is-active":"popup-button",ref:Se,id:Ce,onClick:()=>Z("other",Ce,Bt),style:ft(((f==null?void 0:f.planId)||(f==null?void 0:f.id))===((Bt==null?void 0:Bt.id)||(Bt==null?void 0:Bt.planId))&&(f==null?void 0:f.type)===(Bt==null?void 0:Bt.type))},e.createElement("div",{className:"type-details"},e.createElement("div",{className:"sub-type",style:F},Bt==null?void 0:Bt.title),e.createElement("div",{className:"plan-description amountp",style:r},Bt==null?void 0:Bt.subTitle)),(q==null?void 0:q.planId)===(l==null?void 0:l.planId)||!(l==null||(Ot=l.plansDetail)===null||Ot===void 0)&&Ot.displayStrikeThroughPrice&&(!(l==null||(zt=l.plansDetail)===null||zt===void 0)&&zt.strikeThroughPrice)?e.createElement("div",{className:"plan-amount",style:E},e.createElement("p",{className:"strike-price"},e.createElement("span",{className:"strike-through"},(0,i.Qn)(l==null?void 0:l.currency)+((l==null?void 0:l.amount)||(l==null||(Jt=l.plansDetail)===null||Jt===void 0?void 0:Jt.amount)),l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""),e.createElement("span",null,`${(0,i.Qn)(l==null?void 0:l.currency)}${(q==null?void 0:q.amount)||(l==null||(dt=l.plansDetail)===null||dt===void 0?void 0:dt.strikeThroughPrice)}${l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""}`))):e.createElement("div",{className:"plan-amount",style:E},(0,i.Qn)(d==null||(Rt=d.plansData[Ce])===null||Rt===void 0?void 0:Rt.currency)+(d==null||(No=d.plansData[Ce])===null||No===void 0?void 0:No.amount),l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""))}return e.createElement("div",{className:(f==null?void 0:f.planId)===(l==null?void 0:l.planId)?"popup-button is-active":"popup-button",ref:Se,id:Ce,onClick:()=>Z("other",Ce,l),style:ft((f==null?void 0:f.planId)===(l==null?void 0:l.planId))},e.createElement("div",{className:"type-details"},e.createElement("div",{className:"sub-type",style:F},T&&(!(l==null||(Ft=l.plansDetail)===null||Ft===void 0)&&Ft.title)?l==null||(rt=l.plansDetail)===null||rt===void 0?void 0:rt.title:l==null?void 0:l.title),e.createElement("div",{className:"plan-description amountp",style:r},T&&(!(l==null||(ye=l.plansDetail)===null||ye===void 0)&&ye.description)?l==null||(te=l.plansDetail)===null||te===void 0?void 0:te.description:d==null||(pt=d.plansData[Ce])===null||pt===void 0?void 0:pt.subTitle)),(q==null?void 0:q.planId)===(l==null?void 0:l.planId)||!(l==null||(Vt=l.plansDetail)===null||Vt===void 0)&&Vt.displayStrikeThroughPrice&&(!(l==null||(ro=l.plansDetail)===null||ro===void 0)&&ro.strikeThroughPrice)?e.createElement("div",{className:"plan-amount",style:E},e.createElement("p",{className:"strike-price"},e.createElement("span",{className:"strike-through"},(0,i.Qn)(l==null?void 0:l.currency)+((l==null?void 0:l.amount)||(l==null||(io=l.plansDetail)===null||io===void 0?void 0:io.amount)),l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""),e.createElement("span",null,`${(0,i.Qn)(l==null?void 0:l.currency)}${(q==null?void 0:q.amount)||(l==null||(ae=l.plansDetail)===null||ae===void 0?void 0:ae.strikeThroughPrice)}${l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""}`))):e.createElement("div",{className:"plan-amount",style:E},(0,i.Qn)(d==null||(ve=d.plansData[Ce])===null||ve===void 0?void 0:ve.currency)+(d==null||(kt=d.plansData[Ce])===null||kt===void 0?void 0:kt.amount),l!=null&&l.cycleType?`/${(0,i.ps)(l==null?void 0:l.cycleType,l==null?void 0:l.renewalCyclePeriodMultiplier)||""}`:""))}))),e.createElement("div",{className:"more-plans-btn",onClick:()=>{Z("allPlans",null,null)},style:y},(n==null?void 0:n.redirectPlansCtaText)||"View all plans"))):e.createElement(e.Fragment,null))},ge=(0,me.A)(c);o.d(yt,["A",0,ge])},36165(Ao,yt,o){"use strict";o.d(yt,{A:()=>ge});var e=o(96540),w=o(83707),$=o(23438),s=o(92553),Ue=o(57293),i=o(92149),Le=o(51612),st=o(43543),U=o(51354),me=o(12308);const ue="trailer-popup-player",A=({isOpen:n,onClose:L,trailer:W,mainPlayerId:M})=>{var Y,P,Q,H;const N=(0,e.useRef)(null),h=(0,e.useRef)(null),_e=(0,e.useRef)(!1),F=(0,e.useRef)(!0),r=W==null||(Y=W.gist)===null||Y===void 0?void 0:Y.id;if((0,e.useEffect)(()=>{var j;if(!n||!r)return;h.current=document.activeElement,document.body.style.overflow="hidden";const Se=q=>{q.key==="Escape"&&L()};if(window.addEventListener("keydown",Se),(j=N.current)===null||j===void 0||j.focus(),_e.current=!1,M){var d;const q=(0,i.default)();if(!(q==null||(d=q.isPlayerInitialised)===null||d===void 0)&&d.call(q,M)){var se,f;const Ke=(se=q.getPlayer)===null||se===void 0?void 0:se.call(q,M);if(Ke&&!(!((f=Ke.paused)===null||f===void 0)&&f.call(Ke))){var be;(be=Ke.pause)===null||be===void 0||be.call(Ke),_e.current=!0}}}return()=>{var q,Ke;if(window.removeEventListener("keydown",Se),document.body.style.overflow="",(Ke=h.current)===null||Ke===void 0||(q=Ke.focus)===null||q===void 0||q.call(Ke),_e.current&&M){var Je;const Pt=(0,i.default)();if(!(Pt==null||(Je=Pt.isPlayerInitialised)===null||Je===void 0)&&Je.call(Pt,M)){var T,at,Yt;(Yt=Pt.getPlayer)===null||Yt===void 0||(at=Yt.call(Pt,M))===null||at===void 0||(T=at.play)===null||T===void 0||T.call(at)}_e.current=!1}}},[n,r,L,M]),(0,e.useEffect)(()=>!n||!r?void 0:(F.current=!0,(async()=>{var Se,d,se,f,be,q,Ke,Je,T,at,Yt,Pt,G,je,Z;
1const ft=await(0,st.gf)();if(!F.current)return;const Ce=await(0,st.LH)();if(!F.current)return;const Ye={videoId:r,playerId:ue,apiBaseUrl:(Se=(0,st._S)())===null||Se===void 0?void 0:Se.apiBaseUrl,token:ft,enableAdvertisements:!1,skin:"defaultV2",autoplay:!0,airplay:!0,chromecastReceiverId:window==null||(f=window.app_data)===null||f===void 0||(se=f.appcmsMain)===null||se===void 0||(d=se.features)===null||d===void 0?void 0:d.customReceiverId,customData:{overrideEntitlementBaseUrl:(be=(0,st._S)())===null||be===void 0?void 0:be.overrideEntitlementBaseUrl,localisation:(0,st.LP)(),macros:Ce,userId:(Ke=(0,me.getStorageItem)("AuthenticationStore"))===null||Ke===void 0||(q=Ke.user)===null||q===void 0?void 0:q.userId,siteId:window==null||(T=window.app_data)===null||T===void 0||(Je=T.appcmsMain)===null||Je===void 0?void 0:Je.id,beacon:{url:window==null||(Pt=window.app_data)===null||Pt===void 0||(Yt=Pt.appcmsMain)===null||Yt===void 0||(at=Yt.apiConfig)===null||at===void 0?void 0:at.playerBeaconUrl}},analytics:{gaId:window==null||(Z=window.app_data)===null||Z===void 0||(je=Z.appcmsPlatform)===null||je===void 0||(G=je.analytics)===null||G===void 0?void 0:G.googleAnalyticsId}};try{await(0,i.default)().init(Ye)}catch(Ft){(0,U.A)(`TrailerPopup: player init failed for ${r}`,"error",!0)}})(),()=>{var Se;F.current=!1;const d=(0,i.default)();if(!(d==null||(Se=d.isPlayerInitialised)===null||Se===void 0)&&Se.call(d,ue)){var se;(se=d.dispose)===null||se===void 0||se.call(d,ue)}}),[n,r]),!n||!r)return null;const E=window==null||(Q=window.app_data)===null||Q===void 0||(P=Q.appcmsMain)===null||P===void 0?void 0:P.genericMessages,y=(E==null?void 0:E.closeText)||(E==null?void 0:E.close)||"",ne=W==null||(H=W.gist)===null||H===void 0?void 0:H.title,ke=j=>{j.target===j.currentTarget&&L()};return e.createElement("div",{className:"trailer-popup-overlay",onClick:ke,role:"presentation"},e.createElement("div",{className:"trailer-popup-panel",role:"dialog","aria-modal":"true","aria-label":ne||"",ref:N,tabIndex:-1},e.createElement("button",{type:"button",className:"trailer-popup-close",onClick:L,"aria-label":y},(0,Le.$A)("#FFFFFF")),e.createElement("video",{id:ue,crossOrigin:"anonymous",className:"video-js videoEl trailer-popup-video"})))};$.Ay.use([$.Vx]);const ge=({title:n="TRAILERS",data:L,trayStyles:W,mainPlayerId:M})=>{const Y=(0,e.useRef)(null),P=(0,e.useRef)(null),[Q,H]=(0,e.useState)(null);if(!L||L.length===0)return null;const N=W==null?void 0:W.trayTitle,h=W==null?void 0:W.trayItem,_e=F=>{var r;!(F==null||(r=F.gist)===null||r===void 0)&&r.id&&H(F)};return e.createElement("div",{className:"slider-wrapper"},n&&e.createElement("div",{className:"tray-title site-color"},e.createElement("div",{className:"title-wrapper"},e.createElement("div",{className:"para-title bold-title",style:N},n))),e.createElement("div",{className:"tray-navigation-wrapper"},e.createElement("div",{ref:Y},e.createElement(Ue.A,{to:"prev",onClick:()=>{},className:!0,isArticlePage:!1})),e.createElement("div",{ref:P},e.createElement(Ue.A,{to:"next",onClick:()=>{},className:!0,isArticlePage:!1}))),e.createElement("div",{className:"tray-container"},e.createElement(w.RC,{spaceBetween:10,navigation:{prevEl:Y.current,nextEl:P.current},onInit:F=>{F.params.navigation.prevEl=Y.current,F.params.navigation.nextEl=P.current,F.navigation.init(),F.navigation.update()},breakpoints:{360:{slidesPerView:2,slidesPerGroup:1},650:{slidesPerView:3,slidesPerGroup:2},768:{slidesPerView:4,slidesPerGroup:3},1024:{slidesPerView:5,slidesPerGroup:4}}},L.map(F=>{var r,E;return e.createElement(w.qr,{key:F.id},e.createElement("div",{className:"slide-item",role:"button",tabIndex:0,onClick:()=>_e(F),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&_e(F)}},e.createElement("div",{className:"trailers-tile-image"},e.createElement("img",{src:(0,s.by)("16*9",F),alt:(F==null||(r=F.gist)===null||r===void 0?void 0:r.title)||""})),(F==null||(E=F.gist)===null||E===void 0?void 0:E.title)&&e.createElement("p",{className:"trailers-tile-title",style:h},F.gist.title)))}))),e.createElement(A,{isOpen:!!Q,trailer:Q,onClose:()=>H(null),mainPlayerId:M}))}},92553(Ao,yt,o){"use strict";let e=null;const w=A=>{let c="";switch(A){case"16*9":case"16x9":c="r16x9";break;case"9*16":case"9x16":c="r9x16";break;case"1*1":c="r1x1";break;case"3*4":c="r3x4";break;case"4*3":c="r4x3";break;case"32*9":c="r32x9";break;default:c=""}return c},$=A=>{let c={w:1920,h:1080,type:"placeholderCover"};switch(A){case"16*9":c={w:1920,h:1080,type:"placeholderCover"};break;case"1*1":c={w:1080,h:1080,type:"placeholderPoster"};break;case"3*4":c={w:1080,h:1440,type:"placeholderPoster"};break;default:c={w:1920,h:1080,type:"placeholderCover"}}return c},s=(A,c)=>{var ge,n,L,W,M,Y,P;let Q=w(A),{type:H}=$(A);return!(c==null||(n=c.gist)===null||n===void 0||(ge=n.imageGist)===null||ge===void 0)&&ge[`${Q}`]?`${c==null||(L=c.gist)===null||L===void 0?void 0:L.imageGist[`${Q}`]}?impolicy=resize&w=80&h=80`:`${(P=window)===null||P===void 0||(Y=P.app_data)===null||Y===void 0||(M=Y.appcmsMain)===null||M===void 0||(W=M.images)===null||W===void 0?void 0:W[H]}?impolicy=resize&w=80&h=80`},Ue=(A,c)=>{var ge,n,L,W,M,Y,P;const Q=w(A),{type:H}=$(A),N=(c==null?void 0:c.channels)&&(c==null||(ge=c.channels)===null||ge===void 0?void 0:ge.length)>0;let h=c==null||(L=c.gist)===null||L===void 0||(n=L.imageGist)===null||n===void 0?void 0:n[`${Q}`];if(N){const _e=c.channels.find(F=>(F==null?void 0:F.isDefault)===!0);_e&&_e.featuredThumbnail&&(h=_e.featuredThumbnail)}return h||((P=window)===null||P===void 0||(Y=P.app_data)===null||Y===void 0||(M=Y.appcmsMain)===null||M===void 0||(W=M.images)===null||W===void 0?void 0:W[H])||""},i=(A,c)=>{let{w:ge,h:n}=$(A),L=Ue(A,c);return L?`${L}?impolicy=resize&w=${ge}&h=${n}`:""},Le=[{w:480,h:270},{w:768,h:432},{w:1080,h:608},{w:1920,h:1080}],st=[{w:320,h:320},{w:480,h:480},{w:768,h:768},{w:1080,h:1080}],U=[{w:320,h:427},{w:480,h:640},{w:768,h:1024},{w:1080,h:1440}],me=A=>{switch(A){case"1*1":return st;case"3*4":return U;default:return Le}},ue=(A,c)=>{const ge=Ue(A,c);return ge?me(A).map(({w:L,h:W})=>`${ge}?impolicy=resize&w=${L}&h=${W} ${L}w`).join(", "):""},B=A=>{const{w:c,h:ge}=$(A);return{width:c,height:ge}};o.d(yt,["LF",0,s,"by",0,i,"tS",0,ue,"vX",0,B])},95129(Ao,yt,o){"use strict";o.r(yt),o.d(yt,{CheckoutModuleContainer:()=>Yl,default:()=>on});var e=o(96540),w=o(47281),$=o(92149),s=o(43543),Ue=o(61171),i=o.n(Ue),Le=o(92553),st=o(55102),U=o(18987),me=o(90969),ue=o(1937),B=o(83428),A=o(77151),c=o(77869),ge=o(34886),n=o(51612),L=o(30209);function W(t){i().subscribe("render-updated-timer",t)}function M(t){i().publish("render-updated-timer",t)}function Y(t){i().subscribe("render-updated-timer",t)}const Q=({contentType:t,metadataMap:a,styles:p,brandColors:u,layoutSettings:S,videoData:O,isAuthzError:z=!1,gameData:R=null})=>{var ie,v,k,C,X;let re=(C=window)===null||C===void 0||(k=C.app_data)===null||k===void 0||(v=k.appcmsMain)===null||v===void 0||(ie=v.features)===null||ie===void 0?void 0:ie.free_preview,oe=(parseInt(re==null||(X=re.length)===null||X===void 0?void 0:X.multiplier,10)||0)*60;const{remainingPreviewTime:Be}=(0,B.Tk)(),[fe,he]=(0,e.useState)(!1),[b,we]=(0,e.useState)(null),[de,Ze]=(0,e.useState)(),m=(0,e.useRef)(null),{gamePlayerpreviewTitleStyles:Ne,gamePlayerpreviewDescriptionStyles:qe}=p,ht=$e=>{if($e!=null&&$e.haultTimer){Y(ht),we(1);return}if(we($e),m.current){const Te=(R==null?void 0:R.currentState)!=="live"?oe:Be,I=Te>0?Math.min(100,Math.floor($e/Te*100)):0;m.current.style.width=`${I}%`}},Ct=$e=>{$e&&he(!1)},He=$e=>{const Te=String(Math.floor($e/60)).padStart(2,"0"),I=String($e%60).padStart(2,"0");return`${Te}:${I}`};(0,e.useEffect)(()=>{Ze(He(b))},[b]);const Pe=$e=>{he($e)};return(0,e.useEffect)(()=>{var $e,Te,I,et;(0,L.OY)(Pe);let ce=(et=window)===null||et===void 0||(I=et.app_data)===null||I===void 0||(Te=I.appcmsMain)===null||Te===void 0||($e=Te.features)===null||$e===void 0?void 0:$e.free_preview;he(ce==null?void 0:ce.isFreePreview);let{remainingPreviewTime:tt}=(0,B.qL)();we((R==null?void 0:R.currentState)!=="live"?tt:Be),W(ht),(0,w.subscribeVideoError)(Ct)},[]),e.createElement(e.Fragment,null,fe&&!z?e.createElement("div",{className:"preview-container",style:{background:u==null?void 0:u.overlayColor}},e.createElement("div",{className:"preview-content"},t==="GAME"?e.createElement(e.Fragment,null,e.createElement("div",{className:"preview-content-heading",style:Ne},b>1?a==null?void 0:a.hardwallBannerTitle:a==null?void 0:a.hardwallBannerEndedTitle),e.createElement("div",{className:"preview-content-description",style:qe},a==null?void 0:a.hardwallBannerDescription)):e.createElement(e.Fragment,null,e.createElement("div",{className:"preview-content-heading",style:Ne},b>1?O==null?void 0:O.title:a==null?void 0:a.freePreviewEndedText),e.createElement("div",{className:"preview-content-description",style:qe},b>1?a==null?void 0:a.freePreviewText:a==null?void 0:a.previewSubscriptionText))),b>1?e.createElement("div",{className:"preview-content-timer",style:{background:u==null?void 0:u.progressBgColor}},e.createElement("div",{className:"progress",style:{background:u==null?void 0:u.activeBgColor},ref:m}),e.createElement("div",{className:"lock-icon"}
1,(0,n.vl)("#000")," ",e.createElement("p",{style:Ne},de))):e.createElement(e.Fragment,null,e.createElement("div",{className:"preview-content-timer",style:{background:u==null?void 0:u.progressBgColor}},e.createElement("div",{className:"progress",style:{background:u==null?void 0:u.progressBgColor}}),e.createElement("div",{className:"lock-icon"},(0,n.vl)("#000"))))):e.createElement(e.Fragment,null))};var H=o(24666),N=o(30832);const h=t=>{var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze;let m=`vl-player-${t.moduleData.id}-${t==null||(p=t.moduleData)===null||p===void 0||(a=p.contentData[0])===null||a===void 0?void 0:a.id}`;const Ne=t.moduleData,{gamePlayerpreviewTitleStyles:qe,gamePlayerpreviewDescriptionStyles:ht}=(0,c.getFontsStyles)(t==null||(S=t.moduleData)===null||S===void 0||(u=S.layout)===null||u===void 0?void 0:u.fontSetting);let Ct=t==null||(z=t.moduleData)===null||z===void 0||(O=z.layout)===null||O===void 0?void 0:O.settings,He=t==null||(R=t.moduleData)===null||R===void 0?void 0:R.layout,Pe=!0,$e="vl-game-container",Te=(0,$.default)(),I=t.moduleData.contentData,et=t==null||(k=t.moduleData)===null||k===void 0||(v=k.contentData)===null||v===void 0||(ie=v[0])===null||ie===void 0?void 0:ie.id,ce=0,tt=0,At=0,wt=Ne==null?void 0:Ne.plans;const{popupHeadingTitleFont:Wt,popupCtaTitleFont:Ae,popupCtaSubTitleFont:Ut,popupPriceFont:ee,popupDetailFont:xe}=(0,c.getFontsStyles)(t==null||(X=t.moduleData)===null||X===void 0||(C=X.layout)===null||C===void 0?void 0:C.fontSetting);let We={popupHeadingTitleFont:Wt,popupCtaTitleFont:Ae,popupCtaSubTitleFont:Ut,popupPriceFont:ee,popupDetailFont:xe};const[Me,ut]=(0,e.useState)(t==null||(oe=t.moduleData)===null||oe===void 0||(re=oe.contentData[0])===null||re===void 0?void 0:re.currentState),[Oe,lt]=(0,e.useState)({isLoading:!0,playerError:!1});let Dt=(t==null||(Be=t.moduleData)===null||Be===void 0?void 0:Be.contentData.length)>0&&(t==null||(he=t.moduleData)===null||he===void 0||(fe=he.contentData[0])===null||fe===void 0?void 0:fe.score),Ve={};const{remainingPreviewTime:Ge,previewRestriction:K}=(0,B.Tk)(Me),Qt=Ge,Zt=Ee=>{Ee!=null&&Ee.currentState&&ut(Ee==null?void 0:Ee.currentState)};let gt=t==null||(b=t.moduleData)===null||b===void 0?void 0:b.contentData[0],uo=t==null||(we=t.moduleData)===null||we===void 0?void 0:we.metadataMap;const D=()=>{var Ee,Re,Qe,Fe,ct;return!((Fe=I[0])===null||Fe===void 0||(Qe=Fe.preview)===null||Qe===void 0||(Re=Qe.gist)===null||Re===void 0||(Ee=Re.imageGist)===null||Ee===void 0)&&Ee.r16x9?(ct=I[0])===null||ct===void 0?void 0:ct.preview:I[0]},g=()=>{var Ee,Re,Qe;return{content:t==null||(Qe=t.moduleData)===null||Qe===void 0||(Re=Qe.contentData[0])===null||Re===void 0||(Ee=Re.related)===null||Ee===void 0?void 0:Ee.map(ct=>{let Xt=ct.gist.imageGist.r16x9,Kt=ct.gist.id,Bo=ct.title||"";return{id:Kt,img:Xt,title:Bo}}),autoNext:!1,cb:ct=>{}}},le=Ee=>{if(Ee&&(lt({isLoading:!0,playerError:!0}),Te!=null&&Te.isPlayerInitialised(m))){Te==null||Te.dispose(m);let Re=document.createElement("video");Re.style.visibility="hidden",Re.style.position="absolute",Re.id=m,Re.classList.add("video-js"),Re.classList.add("videoEl");let Qe=document.querySelector(".game-container");Qe&&(Qe==null||Qe.appendChild(Re))}},pe=Ee=>{if(Ee<0)return;if(K&&Ee>K){M({haultTimer:!0}),i().publish("block-preview",!0);return}let Re=JSON.parse(sessionStorage.getItem("previous-played-time")||"0"),Qe=Math.floor(Ee);Me!=="default"&&(At!==Qe||Qe==0)&&(At=Qe,ce+=1);const Fe=Qt;if(Fe>ce){if(ce!==tt){(Re<ce||!Re)&&sessionStorage.setItem("previous-played-time",JSON.stringify(ce)),Re>ce&&sessionStorage.setItem("previous-played-time",JSON.stringify(Re+1)),tt=ce;let ct=Fe-ce;localStorage.setItem("remaining-preview-time",ct.toString()),M(ct)}}else i().publish("block-preview",!0)};(0,e.useEffect)(()=>(i().subscribe("block-preview",le),i().subscribe("update-preview-time",pe),()=>{i().unsubscribe("update-preview-time",pe),i().unsubscribe("block-preview",le),et&&(0,A.gj)(et)}),[Me]),(0,e.useLayoutEffect)(()=>{(0,st.y$)(Ne==null?void 0:Ne.contentData)},[]),(0,e.useEffect)(()=>{i().subscribe("paywall",Et);const Ee=document.getElementById(m);let Re=I&&I[0]&&I[0].id;return i().subscribe(Re,Zt),Ee&&(Ee.style.visibility="hidden"),()=>{i().unsubscribe(Re,Zt),Te!=null&&Te.isPlayerInitialised(m)&&(Te==null||Te.dispose(m)),sessionStorage.removeItem("activeGame")}},[]);const Ie=()=>{lt({isLoading:!0,playerError:!0});let Ee=window.location.search,Qe=!new URLSearchParams(Ee).get("popup");if(Te!=null&&Te.isPlayerInitialised(m)){(0,B.m_)(),Te==null||Te.dispose(m);let Fe=document.querySelector(".left-section"),ct=document.createElement("video");
1if(ct.style.visibility="hidden",ct.id=m,ct.classList.add("video-js"),ct.classList.add("videoEl"),Fe){let Xt=Fe.querySelector(".game-container");Xt?Xt==null||Xt.appendChild(ct):Fe==null||Fe.appendChild(ct)}}mt(I)};(0,e.useEffect)(()=>{Ie()},[Me]);const Xe=Ee=>{var Re,Qe,Fe;let ct=(Ee==null?void 0:Ee.length)&&((Qe=Ee[0])===null||Qe===void 0||(Re=Qe.livestreams)===null||Re===void 0?void 0:Re.length)&&((Fe=Ee[0])===null||Fe===void 0?void 0:Fe.livestreams)||[];return ct==null?void 0:ct.map(Kt=>{var Bo,Lo,wo,De,qt;let So=(Kt==null||(Lo=Kt.gist)===null||Lo===void 0||(Bo=Lo.imageGist)===null||Bo===void 0?void 0:Bo.r16x9)||(window==null||(qt=window.app_data)===null||qt===void 0||(De=qt.appcmsMain)===null||De===void 0||(wo=De.images)===null||wo===void 0?void 0:wo.placeholderCover);return{id:Kt==null?void 0:Kt.id,img:`${So}?impolicy=resize&w=400&h=200`}})},Et=Ee=>lt(Ee?{isLoading:!1,playerError:!0}:{isLoading:!1,playerError:!1}),mt=async Ee=>{var Re,Qe,Fe,ct,Xt,Kt,Bo;(0,w.publishAppLoading)(!0);const Lo=window==null||(ct=window.app_data)===null||ct===void 0||(Fe=ct.appcmsMain)===null||Fe===void 0||(Qe=Fe.features)===null||Qe===void 0||(Re=Qe.free_preview)===null||Re===void 0?void 0:Re.isFreePreview,wo=((Kt=Ee[0])===null||Kt===void 0||(Xt=Kt.gist)===null||Xt===void 0?void 0:Xt.title)||((Bo=Ee[0])===null||Bo===void 0?void 0:Bo.title);let De=Xe(Ee),{id:qt,videoType:So,type:Wo}=(0,ge.getPreviewId)(Ee[0],Me);const J=Wo==="live";if(Lo&&Qt<2&&So!=="preview"&&qt){M(0),(0,w.publishAppLoading)(!1);return}So==="preview"&&(0,L.TK)(!1);const it=await(0,s.CX)();let xt=await(0,s.QZ)(),Tt=xt&&await(0,s.HW)(xt),Nt=await(0,me.ye)(),po=await(0,s.h)();const vo=await(0,s.LH)(),vt=await(0,s.sv)();(0,s.gf)().then(bo=>{var _o,Oo,xo,ao,Mo,_,V,nt,Lt,ot,_t,Po,St,Ht,Eo;let so={debugStats:!0,videoId:qt,playerId:m,experimentalBufferBasedABR:!0,token:bo,enableAdvertisements:!1,skin:"VL_ONE",autoplay:!0,drmLibrary:!0,chromecastReceiverId:window==null||(xo=window.app_data)===null||xo===void 0||(Oo=xo.appcmsMain)===null||Oo===void 0||(_o=Oo.features)===null||_o===void 0?void 0:_o.customReceiverId,airplay:!0,tvProviderLogoUrl:Tt,apiBaseUrl:(ao=(0,s._S)())===null||ao===void 0?void 0:ao.apiBaseUrl,debugConfig:(0,s.bu)(),convivaConfig:{...(0,N.W4)(it==null?void 0:it.user)},customData:{overrideEntitlementBaseUrl:(Mo=(0,s._S)())===null||Mo===void 0?void 0:Mo.overrideEntitlementBaseUrl,entitlement:{hba_status:U.default.get("hba_status"),householdID:U.default.get("householdID")},beacon:{url:window==null||(nt=window.app_data)===null||nt===void 0||(V=nt.appcmsMain)===null||V===void 0||(_=V.apiConfig)===null||_===void 0?void 0:_.playerBeaconUrl,params:{...vt,...wo&&{title:wo},islivestream:J}},macros:vo,subscription:{...po},...Ve},analytics:{gaId:window==null||(_t=window.app_data)===null||_t===void 0||(ot=_t.appcmsPlatform)===null||ot===void 0||(Lt=ot.analytics)===null||Lt===void 0?void 0:Lt.googleAnalyticsId}};if(Nt!=null&&Nt.byCoordinates){var yo,Mt;so.customData.entitlement={latitude:(yo=Nt==null?void 0:Nt.latitude)!==null&&yo!==void 0?yo:null,longitude:(Mt=Nt==null?void 0:Nt.longitude)!==null&&Mt!==void 0?Mt:null}}Me=="default"&&(so.relatedVideos=g()),Me==="live"&&(so.streams=De);let Gt=!(t==null||(Po=t.moduleData)===null||Po===void 0)&&Po.contentData.length?t==null||(Eo=t.moduleData)===null||Eo===void 0||(Ht=Eo.contentData[0])===null||Ht===void 0||(St=Ht.plans)===null||St===void 0?void 0:St.filter(bt=>(bt==null?void 0:bt.type)==="TVE"):[];if((Gt==null?void 0:Gt.length)===0?Gt=!1:Gt=!0,qt)Te.init(so).then(async bt=>{var eo,x,go,mo,jt,to,To,oo,$o,Co,lo;const Uo=document.getElementById(m),Qo=document.getElementsByTagName("video"),ho=Array.from(document.getElementsByClassName("video-js"));ho.length&&(ho[0].classList.remove("abs-pos"),ho[0].style.position="relative");let Jo=[];!(bt==null||(go=bt.response)===null||go===void 0||(x=go.video)===null||x===void 0||(eo=x.plans)===null||eo===void 0)&&eo.length&&(bt==null||(to=bt.response)===null||to===void 0||(jt=to.video)===null||jt===void 0||(mo=jt.plans)===null||mo===void 0||mo.map(Ro=>{Jo=Jo!=null&&Jo.length?[...Jo,...Ro==null?void 0:Ro.planIds]:[...Ro==null?void 0:Ro.planIds]}));let qo=Jo;const nl=(bt==null||(Co=bt.response)===null||Co===void 0||($o=Co.plans)===null||$o===void 0||(oo=$o.filter(Ro=>qo.includes(Ro.id))[0])===null||oo===void 0||(To=oo.featureSetting)===null||To===void 0?void 0:To.isLoginRequired)||!1;nl?le(!0):ho[0].classList.remove("abs-pos");let sl=bt==null||(lo=bt.response)===null||lo===void 0?void 0:lo.playable;(0,ue.$)({VLPlayerCore:Te,playerId:so.playerId,metadataMap:uo,isPlayable:sl,detailPageClass:$e,isLoginRequired:nl,containerClass:"game-container",contentDetails:gt,isGameCheckout:Pe,videoType:So}
1),Array.from(Qo).forEach(function(Ro){Ro.style.visibility="visible"}),Uo&&(Uo.style.visibility="visible")}).catch(bt=>{var eo,x,go,mo;(0,w.publishVideoError)(!0);let jt=(bt==null||(x=bt.response)===null||x===void 0||(eo=x.response)===null||eo===void 0?void 0:eo.data)||(bt==null?void 0:bt.response),to=wt!=null&&wt.length?wt:!(jt==null||(go=jt.plans)===null||go===void 0)&&go.length?jt.plans:[],To=to==null?void 0:to.map(ho=>ho==null?void 0:ho.monetizationModel);(Gt||!(jt==null||(mo=jt.models)===null||mo===void 0)&&mo.includes("TVE"))&&To.push("TVE");let oo=to==null?void 0:to.map(ho=>ho==null?void 0:ho.id),$o=jt==null?void 0:jt.playable,Co=oo,lo="video-thumbnail",Uo={errorCode:jt==null?void 0:jt.errorCode,errorMessage:jt==null?void 0:jt.errorMessage},Qo=null;Uo!=null&&Uo.errorCode||(Qo=bt==null?void 0:bt.msg),(0,ue.$)({VLPlayerCore:$.default,playerId:so.playerId,metadataMap:uo,monetizationModels:To,plans:to,contentPlanIds:Co,isPlayable:$o,containerClass:lo,detailPageClass:$e,monetisationPlansIds:oo,errorDetails:Uo,errorMsg:Qo,contentDetails:gt,isGameCheckout:Pe})});else if(wt!=null&&wt.length||Gt){let bt=wt==null?void 0:wt.map(oo=>oo==null?void 0:oo.monetizationModel);Gt&&bt.push("TVE");let eo=wt==null?void 0:wt.map(oo=>oo==null?void 0:oo.id),x=!1,go=eo,mo="video-thumbnail",jt=document.querySelector(`.${mo}`);jt&&(jt.style.position="relative");let to={errorCode:"",errorMessage:""};(0,ue.$)({VLPlayerCore:$.default,playerId:so.playerId,metadataMap:uo,monetizationModels:bt,plans:wt,contentPlanIds:go,isPlayable:x,containerClass:mo,detailPageClass:$e,monetisationPlansIds:eo,errorDetails:to,errorMsg:null,contentDetails:gt})}else lt({isLoading:!1,playerError:!0})}).catch(bo=>{lt({isLoading:!1,playerError:!0}),(0,w.publishAppLoading)(!1)})};let ze=(I==null?void 0:I.length)&&((Ze=I[0])===null||Ze===void 0||(de=Ze.livestreams)===null||de===void 0?void 0:de.length)&&I[0].livestreams[0]||null;return e.createElement("div",{className:"gamedetail-player-container"},e.createElement(H.A,{metadataMap:uo,subscriptionPopupFonts:We}),e.createElement("div",{className:"video-thumbnail game-container"},e.createElement("video",{id:m,style:{width:"100%",height:"100%",position:"absolute"},className:"video-js videoEl abs-pos"}),((Oe==null?void 0:Oe.isLoading)||(Oe==null?void 0:Oe.playerError))&&e.createElement("div",{className:"game-thumbnail"},e.createElement("img",{src:(0,Le.by)("16*9",Me==="default"||Me==="end"?D():ze),className:"landscape",alt:"Tray Item Icon",style:{width:"100%"}})),e.createElement(Q,{contentType:"GAME",videoData:null,layoutSettings:He,brandColors:Ct,metadataMap:uo,styles:{gamePlayerpreviewTitleStyles:qe,gamePlayerpreviewDescriptionStyles:ht},gameData:gt})))};var _e=o(161),F=o(17225),r=o(19324),E=o(753),y=o(51354),ne=o(6765),ke,j,Se,d,se,f,be,q,Ke;let Je=(ke=window)===null||ke===void 0?void 0:ke.xApiKey,T=(se=window)===null||se===void 0||(d=se.app_data)===null||d===void 0||(Se=d.appcmsMain)===null||Se===void 0||(j=Se.apiConfig)===null||j===void 0?void 0:j.apiBaseUrl,at=(Ke=window)===null||Ke===void 0||(q=Ke.app_data)===null||q===void 0||(be=q.appcmsMain)===null||be===void 0||(f=be.apiConfig)===null||f===void 0?void 0:f.apiBaseCachedUrl,Yt=window.app_data.site.siteInternalName;const Pt=async(t=!1)=>{try{let{userId:p,hba:u,mvpdProvider:S}=await(0,s.CX)(),O=sessionStorage.getItem("locationCoords"),z=JSON.parse(O),R=u?u==null?void 0:u.latitude:z==null?void 0:z.latitude,ie=u?u==null?void 0:u.longitude:z==null?void 0:z.longitude,v=await(0,s.gf)(k=>k);if(p){let k={site:Yt,userId:p,device:"web_browser",monetizationModel:"SVOD",platform:"web_browser"};if(S&&(k.mvpdProvider=S),u!=null&&u.enabled&&!t){let X=JSON.parse(localStorage.getItem("locationCoords")),re=X==null?void 0:X.countryisocode,oe=X==null?void 0:X.latitude,Be=X==null?void 0:X.longitude;k.countryCode=re,k.latitude=oe,k.longitude=Be}else k.latitude=R,k.longitude=ie;return(await r.A.get(`${T}/v3/plans`,{params:k,headers:{"x-api-key":Je,authorization:v}})).data}else{let k={site:Yt,device:"web_browser",monetizationModel:"SVOD",platform:"web_browser",latitude:R,longitude:ie},C=`${T}/v3/plans`;if(Yt==="caliente"){var a;let re=(a=(0,ne.A)(v))===null||a===void 0?void 0:a.countryCode;k.store_countryCode=re,C=`${at}/v3/plans`}
1return S&&(k.mvpdProvider=S),(await r.A.get(C,{params:k,headers:{"x-api-key":Je,authorization:v}})).data}}catch(p){return(0,y.A)(`Error Fetching Plans: ${p}`,"error"),(0,w.publishErrorUpdate)("Error Fetching Plans"),(0,w.publishAppLoading)(!1),null}};var G=o(70493),je=o(73851),Z=o(17535),ft=o(12308),Ce,Ye,Ft,rt;let ye=(rt=window)===null||rt===void 0||(Ft=rt.app_data)===null||Ft===void 0||(Ye=Ft.appcmsMain)===null||Ye===void 0||(Ce=Ye.apiConfig)===null||Ce===void 0?void 0:Ce.apiBaseUrl,te=0;const pt=()=>++te,Vt=()=>{te++},ro=()=>{te=0},io=t=>t===te,ae=t=>{io(t)&&(0,L.xe)(!0)},ve=async(t,a)=>{let p=await(0,s.gf)(u=>u);return r.A.get(`${ye}/geolocation?latitude=${t}&longitude=${a}`,{headers:{Authorization:p}})},kt=async(t,a)=>{let p=await(0,s.gf)(u=>u);return r.A.get(`${ye}/geolocation`,{headers:{Authorization:p}})},l=async t=>{let a=await(0,s.gf)(u=>u),{userId:p}=await(0,s.CX)();return r.A.put(`${ye}/v2/identity/${p}`,t,{headers:{Authorization:a}})},$t=async(t,a,p)=>{const u=t.byCoordinates?{hba:{enabled:!0,latitude:t==null?void 0:t.latitude,longitude:t==null?void 0:t.longitude}}:{hba:{enabled:!0}},S=(0,ft.getStorageItem)("AuthenticationStore");t&&l(u).then(async O=>{const z=O.data.hba;let ie={...S==null?void 0:S.user,hbaMetadata:z},v=(0,je.fetchCurrentPlan)();const k=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let C={pageUrl:k==null?void 0:k.pageUrl,planId:v==null?void 0:v.planId,Location:`${t==null?void 0:t.latitude},${t==null?void 0:t.longitude} `};if(z!=null&&z.enabled){if(await(0,G.qZ)(z)){(0,s.iR)({eventName:"location_in_range",subSection:null,type:"location",reason:t,status:null,action:"Verification",paymentStatus:null,eventCategory:"Location Verification Success",additionalLabel:null,section:null});let re=await Pt();re!=null&&re.length?ae(p):io(p)&&(a(!0),(0,w.publishAppLoading)(!1));let oe={ename:E.ANALYTICSEVENTS.LOCATION_IN_RANGE,data:C};i().publish("user-analytics",oe)}else if(io(p)){(0,s.iR)({eventName:"location_out_range",subSection:null,type:"location",reason:t,status:null,action:"Verification",paymentStatus:null,eventCategory:"Location Verification Failure",additionalLabel:null,section:null}),a(!0),(0,w.publishAppLoading)(!1);let re={ename:E.ANALYTICSEVENTS.LOCATION_OUT_RANGE,data:C};i().publish("user-analytics",re)}}else ae(p);(0,ft.setStorageItem)("AuthenticationStore",{...S,user:ie})}).catch(O=>{console.log(O)})},Ot=(t,a)=>{(0,Z.pushStepToFlow)("location verification failed"),localStorage.removeItem("locationCoords"),(0,Z.pushStepToFlow)("location verified"),kt().then(p=>{let u=p.data.lookupMode==="coordinates";const S={postalCode:p.data.postalcode,countryisocode:p.data.countryisocode,byCoordinates:u,origip:p.data.origip};localStorage.setItem("locationCoords",JSON.stringify(S)),$t(S,t,a)}).catch(()=>{io(a)&&(0,w.publishAppLoading)(!1)})},zt=t=>{const a=pt();let p=null;(0,w.publishAppLoading)(!0);let u=(0,je.fetchCurrentPlan)();const S=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let O={pageUrl:S==null?void 0:S.pageUrl,planId:u==null?void 0:u.planId};navigator.geolocation?(p=!0,navigator.geolocation.getCurrentPosition(z=>{p=!1,localStorage.removeItem("locationCoords");let R=z.coords;R!=null&&R.latitude&&(R!=null&&R.longitude)&&ve(R.latitude,R.longitude).then(ie=>{O.Location=`${R.latitude}, ${R.longitude}`,O.message="permission allowed",i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.LOCATION_VERFIY,data:O});let v=ie.data.lookupMode==="coordinates";const k={postalCode:ie.data.postalcode,latitude:R.latitude,longitude:R.longitude,countryisocode:ie.data.countryisocode,byCoordinates:v,origip:ie.data.origip};localStorage.setItem("locationCoords",JSON.stringify(k)),$t(k,t,a);let C={ename:E.ANALYTICSEVENTS.USER_LOCATION,data:k};(0,Z.pushStepToFlow)("location verified"),i().publish("user-analytics",C),(0,N.Ay)("USER_LOCATION",k,null)}).catch(ie=>{(0,y.A)(ie,"error")})},z=>{switch(p=!1,z.code){case z.PERMISSION_DENIED:O.error="PERMISSION_DENIED",O.message="permission denied",Ot(t,a),console.log("User denied the request for Geolocation.");break;case z.POSITION_UNAVAILABLE:O.error="POSITION_UNAVAILABLE",O.message="permission denied",Ot(t,a),console.log("Location information is unavailable.");break;case z.TIMEOUT:O.error="TIMEOUT",O.message="permission denied",Ot(t,a),console.log("The request to get user location timed out.");break;default:O.error="permission denied",O.message="permission denied",Ot(t,a),console.log("An unknown error occurred.");break}i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.LOCATION_VERFIY,data:O})}),setTimeout(()=>{p&&(O.error="PERMISSION_DENIED",O.message="permission denied",(0,Z.pushStepToFlow)("location verification failed"),localStorage.removeItem("locationCoords"),(0,Z.pushStepToFlow)("location verified"),kt().then(z=>{let R=z.data.lookupMode==="coordinates";const ie={postalCode:z.data.postalcode,countryisocode:z.data.countryisocode,byCoordinates:R,origip:z.data.origip};localStorage.setItem("locationCoords",JSON.stringify(ie)),$t(ie,t,a),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.LOCATION_VERFIY,data:O})}).catch(()=>{io(a)&&(0,w.publishAppLoading)(!1)}),(0,y.A)("User denied the request for Geolocation.","error"))},7e3)):(console.log("Geolocation is not supported by this browser."),(0,w.publishAppLoading)(!1),(0,L.xe)(!1))};
1var Jt=o(48620),dt=o(92857),Rt=o(47767);const No=t=>{var a;let p=t==null?void 0:t.checkoutMetaData,u=t==null?void 0:t.moduleData,S=u==null?void 0:u.metadataMap,O=u==null||(a=u.layout)===null||a===void 0?void 0:a.settings,z=t==null?void 0:t.continueWithoutSubscription;const R=(0,Rt.Zp)(),[ie,v]=(0,e.useState)(!1),[k,C]=(0,e.useState)(!1),X=he=>{v(he)},re=()=>{v(!1),C(!1),Vt(),i().publish("processing",!1),(0,w.publishAppLoading)(!1)};(0,e.useEffect)(()=>{(0,F.VU)(X)},[]);const oe=()=>{(0,w.publishAppLoading)(!0),(0,L.xe)(!0)},Be=()=>{try{(0,Jt.DC)()&&(0,s.Sk)().then(async()=>{U.default.set("without-subscription",!0),(0,w.publishUserCreated)({status:!!status}),(0,w.publishAppLoading)(!1);let b=await(0,dt.e)(null,window.location.pathname,!0);fe(),R(b)}).catch(b=>{console.log(b)})}catch(he){(0,w.publishErrorUpdate)("Error while creating account",he),(0,w.publishAppLoading)(!1)}},fe=()=>{let he=(0,je.fetchCurrentPlan)();const b=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let we={pageUrl:b==null?void 0:b.pageUrl,monetizationType:he==null?void 0:he.type,stepsCompleted:Z.flowSteps,message:"user clicked on continue without subscription"};i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.NEW_ONBOARDING_CHECKOUT_CANCELED,data:we})};return e.createElement(e.Fragment,null,ie&&!k?e.createElement("div",{className:"geo-location-container"},e.createElement("div",{style:{backgroundColor:O==null?void 0:O.moduleBackgroun
1dColor},className:"share-location-wrapper"},e.createElement("div",{className:"cancel-cross",onClick:re},(0,n.$A)()),e.createElement("h4",{className:"title"},S==null?void 0:S.confirmLocationText),e.createElement("p",{className:"description"}," ",S==null?void 0:S.shareLocationDescription),e.createElement("button",{"aria-label":"Share Location",className:"action-btn bg-color",style:{backgroundColor:O==null?void 0:O.CTABgColor},onClick:()=>zt(C),"data-test":"request-location-btn"},S==null?void 0:S.shareLocationText),z?e.createElement("p",{onClick:()=>{Be()},className:"without-subscription-tag","data-test":"without-subscription-btn"},(S==null?void 0:S.withoutSubscriptionText)||"Continue without a subscription"):null)):e.createElement(e.Fragment,null),ie&&k?e.createElement("div",{className:"geo-location-container"},e.createElement("div",{style:{backgroundColor:O==null?void 0:O.moduleBackgroundColor},className:"share-location-wrapper"},e.createElement("div",{className:"cancel-cross",onClick:re},(0,n.$A)()),e.createElement("div",{className:"title"},(p==null?void 0:p.noPlansHeading)||"There are no plans in your area"),e.createElement("div",{className:"description",dangerouslySetInnerHTML:{__html:(0,c.getTrayTitle)(p==null?void 0:p.noPlansBody)}}),e.createElement("button",{"aria-label":"Continue",className:"action-btn site-cta-background-color",onClick:()=>oe()},(p==null?void 0:p.noPlansContinueText)||"Continue"),z?e.createElement("button",{"aria-label":"Continue without a subscription",onClick:()=>{Be()},className:"action-btn bg-color"},(S==null?void 0:S.withoutSubscriptionText)||"Continue without a subscription"):null)):e.createElement(e.Fragment,null))},Bt=(0,_e.A)(No);var Io=o(22926),ko=o(36540);const Vo=({El:t,theme:a,style:p,title:u,moduleData:S,isCvc:O,isDisabled:z})=>{var R,ie,v,k,C,X,re,oe,Be,fe,he,b;const[we,de]=(0,e.useState)(!1),[Ze,m]=(0,e.useState)(!1);let Ne;const qe=()=>{clearTimeout(Ne),Ne=setTimeout(()=>{if(document.getElementsByClassName("StripeElement StripeElement--complete").length==3){const Te=(0,ko.O)(sessionStorage.getItem("checkoutInitPageData"));let I={pageUrl:Te==null?void 0:Te.pageUrl,status:"success"};i().publish("stripeComplete",!0),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.CARD_ADDED,data:I}),(0,s.iR)({eventName:"card_added",subSection:"payment",type:"cardAdded",reason:null,status:null,additionalLabel:null,action:"Add Card",paymentStatus:null,eventCategory:"Payment",section:"checkout"})}else i().publish("stripeComplete",!1)},500)},ht="rgb(183 186 194)",Ct=S==null||(ie=S.layout)===null||ie===void 0||(R=ie.settings)===null||R===void 0?void 0:R.inputBoxBorderColor;let He={background:(S==null||(k=S.layout)===null||k===void 0||(v=k.settings)===null||v===void 0?void 0:v.inputBoxActiveBackgroundColor)||(S==null||(X=S.layout)===null||X===void 0||(C=X.settings)===null||C===void 0?void 0:C.inputColor)||"#fff",border:` 1px solid ${Ct}`},Pe={background:(S==null||(oe=S.layout)===null||oe===void 0||(re=oe.settings)===null||re===void 0?void 0:re.inputBoxDisabledBackgroundColor)||ht,border:` 1px solid ${Ct}`};return e.createElement(e.Fragment,null,e.createElement("div",{className:`stripe-input title-head ${Ze?"title-head":""} ${we?" ticked site-color-before":""} ${O?"cvc-input":""}`,style:z?Pe:He},e.createElement(t,{options:{placeholder:u||"",style:{base:{color:(S==null||(fe=S.layout)===null||fe===void 0||(Be=fe.settings)===null||Be===void 0?void 0:Be.inputBoxActiveColor)||(S==null||(b=S.layout)===null||b===void 0||(he=b.settings)===null||he===void 0?void 0:he.cardTextColor)||"#000",fontSize:"14px","::placeholder":{color:"rgba(89, 93, 102, 1)"}}}},onBlur:$e=>qe(),onChange:$e=>qe()})))};var Ho=o(54312),Xo,el,It,fo,Do,ll,dl,Yo,il,Il;let Ul=(Xo=window)===null||Xo===void 0?void 0:Xo.xApiKey,Vl=(Do=window)===null||Do===void 0||(fo=Do.app_data)===null||fo===void 0||(It=fo.appcmsMain)===null||It===void 0||(el=It.apiConfig)===null||el===void 0?void 0:el.apiBaseUrl,$l=(Yo=window)===null||Yo===void 0||(dl=Yo.app_data)===null||dl===void 0||(ll=dl.site)===null||ll===void 0?void 0:ll.siteInternalName,Xl=((Il=window)===null||Il===void 0||(il=Il.app_data)===null||il===void 0?void 0:il.countryCode)||"IN";const Ql=async t=>{try{let a=await(0,Ho.gf)(u=>u);return{isError:!1,data:(await(0,r.A)({method:"POST",url:`${Vl}/subscription/offer/validate`,params:{site:$l},data:t,headers:{Authorization:a,"x-api-key":Ul}})).data}}
1catch(a){return{isError:!0,code:a.response&&a.response.data&&a.response.data.code,error:a.response&&a.response.data&&a.response.data.message||"An error occuredd. Try again later"}}};var Wl=async(t,a={})=>{var p;const{publish:u=!0}=a;let S=await(0,Ho.gf)(v=>v),O=t==null?void 0:t.id,z=(0,ft.getStorageItem)("transactionData"),R=(z==null?void 0:z.purchaseType)==="Buy"?"PURCHASE":z==null||(p=z.purchaseType)===null||p===void 0?void 0:p.toUpperCase(),ie={countryCode:Xl,planId:O,site:$l,offerCode:(t==null?void 0:t.offerCode)||null,transactionType:(t==null?void 0:t.transactionType)||R};return(0,r.A)({method:"GET",url:`${Vl}/subscription/calculate/discount`,params:ie,headers:{Authorization:S,"x-api-key":Ul}}).then(v=>{var k,C,X,re,oe,Be,fe,he,b,we;let de={appliedOfferCode:v==null||(k=v.data)===null||k===void 0?void 0:k.appliedOfferCode,amount:v==null||(C=v.data)===null||C===void 0?void 0:C.amount,offerId:v==null||(oe=v.data)===null||oe===void 0||(re=oe.usedOffers)===null||re===void 0||(X=re[0])===null||X===void 0?void 0:X.offerId,planId:O,pretaxAmount:v==null||(Be=v.data)===null||Be===void 0?void 0:Be.pretaxAmount,taxAmount:v==null||(fe=v.data)===null||fe===void 0?void 0:fe.taxAmount,isDeferred:v==null||(he=v.data)===null||he===void 0?void 0:he.deferChargeOfferId,...!(v==null||(b=v.data)===null||b===void 0)&&b.deferChargeOfferId?{nextBillingDate:v==null||(we=v.data)===null||we===void 0?void 0:we.nextBillingDate}:{}};return u!==!1&&(0,L.Ls)(de),de}).catch(v=>((0,y.A)(v,"error"),v))};const Zl=({moduleData:t,name:a,title:p,isDisabled:u})=>{var S,O,z,R,ie,v,k,C,X,re;const[oe,Be]=(0,e.useState)(!1),fe=async Ze=>{let m=!!Ze.target.value;oe!==m&&Be(m)},he="rgb(183 186 194)",b=t==null||(O=t.layout)===null||O===void 0||(S=O.settings)===null||S===void 0?void 0:S.inputBoxBorderColor;let we={margin:"4px 0 !important",background:(t==null||(R=t.layout)===null||R===void 0||(z=R.settings)===null||z===void 0?void 0:z.inputBoxActiveBackgroundColor)||(t==null||(v=t.layout)===null||v===void 0||(ie=v.settings)===null||ie===void 0?void 0:ie.inputColor)||"#fff",color:"#000",border:` 1px solid ${b}`},de={background:(t==null||(C=t.layout)===null||C===void 0||(k=C.settings)===null||k===void 0?void 0:k.inputBoxDisabledBackgroundColor)||he,border:`1px solid ${b}`};return e.createElement(e.Fragment,null,e.createElement("div",{className:`our-input ${a} ticked`,style:u?de:we},e.createElement("input",{className:"input-el","aria-labelledby":p,type:"text",onChange:Ze=>fe(Ze),placeholder:p,name:a,style:{color:(t==null||(re=t.layout)===null||re===void 0||(X=re.settings)===null||X===void 0?void 0:X.inputBoxActiveColor)||"#000"}})))},ql=({metadataMap:t,isValid:a,moduleData:p,isDisabled:u,ctaText:S})=>{var O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we;const[de,Ze]=(0,e.useState)(null),[m,Ne]=(0,e.useState)(null),[qe,ht]=(0,e.useState)(null),[Ct,He]=(0,e.useState)(!1),[Pe,$e]=(0,e.useState)(null),[Te,I]=(0,e.useState)(!1),et=(t==null?void 0:t.addCard)||"Add Card",ce=(t==null?void 0:t.processingTxt)||"Processing",tt=((ie=window)===null||ie===void 0||(R=ie.app_data)===null||R===void 0||(z=R.appcmsMain)===null||z===void 0||(O=z.genericMessages)===null||O===void 0?void 0:O.updateCardText)||"Update Card",At=(t==null?void 0:t.cancelBtnCta)||"",wt=(0,s.KQ)(),Wt=((re=window)===null||re===void 0||(X=re.app_data)===null||X===void 0||(C=X.appcmsMain)===null||C===void 0||(k=C.brand)===null||k===void 0||(v=k.cta)===null||v===void 0?void 0:v.rounded)||!1,Ae=lt=>{Ze(lt.currentSelectedPlan),Ne(lt.firstPayment)},Ut=lt=>{Ne(lt)},ee=lt=>{He(!lt)};(0,e.useEffect)(()=>{i().subscribe("isLoading",ee),i().subscribe("firstPayment",Ut),i().subscribe("monetizationStore",Ae)},[]);const xe=lt=>{I(lt)},We=(p==null||(Be=p.layout)===null||Be===void 0||(oe=Be.settings)===null||oe===void 0?void 0:oe.disabledCTAColor)||"rgba(89, 93, 102, 1)",Me=(p==null||(he=p.layout)===null||he===void 0||(fe=he.settings)===null||fe===void 0?void 0:fe.activeCTAColor)||"#cf0a2c",ut=(p==null||(we=p.layout)===null||we===void 0||(b=we.settings)===null||b===void 0?void 0:b.inputColor)||"#fff";(0,e.useEffect)(()=>{i().subscribe("processing",xe)},[de]);const Oe=()=>{const{externalPlatform:lt,externalRedirectUrl:Dt}=(0,s.KQ)()||{};let Ve="/";lt&&Dt&&((0,s.t8)({moduleDataLayout:p==null?void 0:p.layout,pageType:"Checkout Page",stepsCompleted:["auth-verified","plan-selection","cancel-payment"]}),(0,s.Wb)()?Ve="/":Ve=Dt),window.location.href=Ve};return e.createElement(e.Fragment,null,e.createElement("input",{"aria-labelledby":S||"Subscribe & Pay",className:`${!a||u?"button continue-button disabled":"button continue-button site-cta-color "}`,style:!a||u?{background:We,color:ut,...Wt&&{borderRadius:"30px"}}:{background:Me,...Wt&&{borderRadius:"30px"}},disabled:!a||u||Te,type:"submit",value:Te?ce:S||"Subscribe & Pay","data-test":"subscribe-submit-btn"}),(wt==null?void 0:wt.externalPlatform)&&e.createElement("input",{"aria-labelledby":At||"Cancel",className:"button cancel-button site-cta-color ",style:{background:Me},type:"button",onClick:Oe,value:At||"Cancel","data-test":"cancel-submit-btn"}))};var cl=o(36381);const ei=({moduleData:t,isDisabled:a,labelTextColor:p})=>{var u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we;const de=(0,Io.useElements)(),Ze="rgb(183 186 194)",m=t==null||(S=t.layout)===null||S===void 0||(u=S.settings)===null||u===void 0?void 0:u.inputBoxBorderColor,Ne=t==null||(z=t.layout)===null||z===void 0||(O=z.settings)===null||O===void 0?void 0:O.inputBoxDisabledBackgroun
1dColor,qe=(t==null||(ie=t.layout)===null||ie===void 0||(R=ie.settings)===null||R===void 0?void 0:R.inputBoxDisabledColor)||"rgba(89, 93, 102, 1)",ht={theme:"night",variables:{colorPrimary:"#979797",colorBackground:Ne||Ze||"#000",colorText:(t==null||(k=t.layout)===null||k===void 0||(v=k.settings)===null||v===void 0?void 0:v.inputBoxActiveColor)||(t==null||(X=t.layout)===null||X===void 0||(C=X.settings)===null||C===void 0?void 0:C.cardTextColor)||"#000",colorDanger:"#a4a4a4",spacingUnit:"3px",borderRadius:"4px",marginBottom:"10px",fontSizeBase:"fontSizeSm",tabSpacing:"3px"},rules:{".Input":{border:m?`1px solid ${m}`:"none",boxShadow:"none",colorText:(t==null||(oe=t.layout)===null||oe===void 0||(re=oe.settings)===null||re===void 0?void 0:re.inputBoxDisabledBackgroundColor)||"#000"},".Input::placeholder":{colorText:qe},".Input:focus":{border:m?`1px solid ${m}`:"none",boxShadow:"none"},".Label":{color:p||"#595d66"}}};(0,e.useEffect)(()=>{if(!a){var He,Pe,$e,Te;ht.variables.colorBackground=(t==null||(Pe=t.layout)===null||Pe===void 0||(He=Pe.settings)===null||He===void 0?void 0:He.inputBoxActiveBackgroundColor)||(t==null||(Te=t.layout)===null||Te===void 0||($e=Te.settings)===null||$e===void 0?void 0:$e.inputColor)}de.update({appearance:ht})},[a]);let Ct=(we=window)===null||we===void 0||(b=we.app_data)===null||b===void 0||(he=b.appcmsMain)===null||he===void 0||(fe=he.paymentProviders)===null||fe===void 0||(Be=fe.stripe)===null||Be===void 0?void 0:Be.showPaymentAddress;return e.createElement("div",{className:"address-form",style:{marginTop:"10px",marginBottom:"1rem"}},e.createElement("div",{className:a?"address-form-disable-wrapper disabled-containter":"address-form-disable-wrapper"}),e.createElement(Io.AddressElement,{options:{mode:"billing",...Ct&&{fields:{line1:"always",city:"always",state:"always",postalCode:"always",country:"always"}}}}))};var Zo=o(79543),Al=o(59160),ti=o(72346),Nl=o(48220);const oi=({metadataMap:t,moduleData:a,checkoutModuleData:p,isUpgrade:u})=>{var S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze,m,Ne,qe,ht,Ct,He,Pe,$e;const Te=(0,Io.useStripe)(),I=(0,Io.useElements)(),[et,ce]=(0,e.useState)(!1),[tt,At]=(0,e.useState)(!1),[wt,Wt]=(0,e.useState)(!1),[Ae,Ut]=(0,e.useState)({}),[ee,xe]=(0,e.useState)(null),We=(0,e.useRef)(0),Me=J=>J!==We.current,ut=(J,it)=>{it!=null&&Me(it)||J!=null&&J.isError||!(J!=null&&J.planId)||J instanceof Error||(0,L.Ls)(J)},Oe=J=>{var it,xt,Tt,Nt,po;const vo=(0,ko.O)(sessionStorage.getItem("currentPlan")),vt=J||vo,bo=(vt==null?void 0:vt.id)||(vt==null?void 0:vt.planId),_o=(it=(xt=(Tt=vt==null||(Nt=vt.plansDetail)===null||Nt===void 0?void 0:Nt.recurringPaymentAmount)!==null&&Tt!==void 0?Tt:vt==null?void 0:vt.amount)!==null&&xt!==void 0?xt:vo==null||(po=vo.plansDetail)===null||po===void 0?void 0:po.recurringPaymentAmount)!==null&&it!==void 0?it:vo==null?void 0:vo.amount;!bo||_o==null||(0,L.Ls)({planId:bo,appliedOfferCode:null,amount:_o,pretaxAmount:_o,taxAmount:0})},[lt,Dt]=(0,e.useState)(!1),[Ve,Ge]=(0,e.useState)(!1),[K,Qt]=(0,e.useState)(!0),[Zt,gt]=(0,e.useState)(!1);let uo=((ie=window)===null||ie===void 0||(R=ie.app_data)===null||R===void 0||(z=R.appcmsMain)===null||z===void 0||(O=z.paymentProviders)===null||O===void 0||(S=O.stripe)===null||S===void 0?void 0:S.showPaymentAddress)||!1,D=p==null||(v=p.moduleData)===null||v===void 0?void 0:v.metadataMap,g=D==null?void 0:D.requiredText;const le=(0,e.useMemo)(()=>{var J,it,xt,Tt,Nt,po,vo;return!(p==null||(xt=p.moduleData)===null||xt===void 0||(it=xt.layout)===null||it===void 0||(J=it.settings)===null||J===void 0)&&J.multiCheckbox?p==null||(vo=p.moduleData)===null||vo===void 0||(po=vo.layout)===null||po===void 0||(Nt=po.settings)===null||Nt===void 0||(Tt=Nt.multiCheckbox)===null||Tt===void 0?void 0:Tt.filter(vt=>{var bo;return vt==null||(bo=vt.platforms)===null||bo===void 0?void 0:bo.includes("web")}):[]},[p]),pe=()=>{const J=I.getElement(Io.CardNumberElement),it=I.getElement(Io.AddressElement);if(!J){console.warn("CardNumberElement not yet mounted retyr!!");return}(0,L.wG)({value:!0,formRef:{elements:I,stripe:Te,cardElement:J,addressElement:it}})},Ie=J=>{J&&pe()},Xe=J=>{Dt(J)},Et=J=>{const it={'"':"&quot;","&":"&amp;","'":"&#039;","<":"&lt;",">":"&gt;"};return J.replace(/["&'<>]/g,xt=>it[xt]||xt)},mt=J=>{Qt(J)},ze="rgb(183 186 194)",Ee=J=>{var it;const xt=(0,ft.getStorageItem)("CheckoutStore");let Tt=(xt==null||(it=xt.plansDetail)===null||it===void 0?void 0:it.allPlans)||[],Nt=Tt==null?void 0:Tt.filter(po=>(po==null?void 0:po.id)===(J==null?void 0:J.planId));if(!(Nt!=null&&Nt.length)){(0,w.publishErrorUpdate)("Offer code is not applicable");return}J.offerPlan=Nt[0],Qe(null,J)},Re=()=>{new URLSearchParams(window.location.search).get("offer")&&!u&&Qe()};(0,e.useEffect)(()=>{const J=!!(()=>{var xt;const Tt=(xt=JSON.parse(localStorage.getItem("CheckoutStore")||"{}"))===null||xt===void 0?void 0:xt.userDetails;return Tt==null?void 0:Tt.e})(),it=(0,Jt.DC)();(J||it!=null&&it.email||it!=null&&it.phoneNumber)&&Qt(!1)},[]),(0,e.useEffect)(()=>{(0,cl.J)(!1),(0,L.UA)(Ie),(0,L.g)(Fe),(0,L.mm)(Ee),(0,w.enableCardFormEvent)(mt),i().subscribe("stripeComplete",Xe),Re(),(0,w.publishAppLoading)(!1)},[]);const Qe=async(J,it)=>{var xt,Tt,Nt,po,vo;J==null||J.stopPropagation(),J==null||J.preventDefault();let vt=(0,je.fetchCurrentPlan)();if(it){var bo;if((vt==null?void 0:vt.planId)!==(it==null||(bo=it.offerPlan)===null||bo===void 0?void 0:bo.id)){let St=(0,je.structuredPlan)(it==null?void 0:it.offerPlan,vt==null?void 0:vt.subscriptionPopupFonts),Ht={id:St==null?void 0:St.planId,featureDetails:St==null?void 0:St.featureDetails};sessionStorage.setItem("currentPlan",JSON.stringify(St)),vt=St,(0,Zo.SJ)({planDetails:Ht,selectedPlanId:St==null?void 0:St.planId,selectedType:St.type,plan:St})}}ce(!0);const _o=++We.current;Wt(!1),At(!1);let ao=new URLSearchParams(window.location.search).get("offer")||(J==null?void 0:J.target)&&(J==null||(Tt
1=J.target)===null||Tt===void 0||(xt=Tt.value)===null||xt===void 0?void 0:xt.toUpperCase())||(ee==null?void 0:ee.toUpperCase())||(it==null?void 0:it.promocode);sessionStorage.setItem("offerCode",ao);let Mo=vt.planId||(vt==null?void 0:vt.id);if(!Ae)return ce(!1),i().publish("isLoading",!1),!1;const _={offerCode:ao,subscriptionPlanId:Mo,site:(vo=window)===null||vo===void 0||(po=vo.app_data)===null||po===void 0||(Nt=po.site)===null||Nt===void 0?void 0:Nt.siteInternalName};(0,s.iR)({eventName:"apply_code_status",type:"apply-code",reason:ao,status:"initiate",action:"Apply Promo Code",paymentStatus:null,eventCategory:"Payment",section:"checkout"});let V=await Ql(_);if(Me(_o)){ce(!1);return}if(!V.isError){var nt,Lt,ot,_t;let St={promotionCode:V==null||(nt=V.data)===null||nt===void 0?void 0:nt.id,offerName:V==null||(Lt=V.data)===null||Lt===void 0?void 0:Lt.name,offerType:V==null||(_t=V.data)===null||_t===void 0||(ot=_t.offerDetails)===null||ot===void 0?void 0:ot.offerStrategyType,offerAdd:"Manual"};const Ht=await ct(St,_o);if(Me(_o)){ce(!1);return}if(Ht!=null&&Ht.isError){ce(!1),i().publish("isLoading",!1),sessionStorage.getItem("offerCode")===ao&&sessionStorage.removeItem("offerCode"),Ut({}),Wt(!1);const eo=(t==null?void 0:t[Ht.code])||(t==null?void 0:t.promoValidatingError)||"Invalid Promo Code";if((0,w.publishErrorUpdate)(eo),At(eo),Me(_o))return;const x=await ct(void 0,_o,{offerCode:null});if(Me(_o))return;x!=null&&x.isError&&Oe(vt);return}ce(!1),Ut({displayName:V.data.displayName,name:V.data.name,code:ao}),xe(ao);const Eo=eo=>String(eo!=null?eo:""),so=eo=>`<strong>${Et(Eo(eo))}</strong>`,yo=!!(Ht!=null&&Ht.isDeferred),Mt=yo?D==null?void 0:D.offerCodeBillingDescription:D==null?void 0:D.offerCodeAppliedText;let Gt=Mt==null?void 0:Mt.replace("$VIEWLIFT_OFFERCODER",so(ao)),bt=Mt==null?void 0:Mt.replace("$VIEWLIFT_OFFERCODER",Eo(ao));if(yo&&(Gt!=null&&Gt.includes("$VIEWLIFT_NEXTBILLINGDATE"))){const eo=Ht==null?void 0:Ht.nextBillingDate,x=eo!=null?(0,s.Yq)(new Date(eo))||(0,ti.default)(new Date(eo),"MM/dd/yyyy"):"";Gt=Gt.replace("$VIEWLIFT_NEXTBILLINGDATE",so(x)),bt=bt.replace("$VIEWLIFT_NEXTBILLINGDATE",Eo(x))}else if(Gt!=null&&Gt.includes("$VIEWLIFT_OFFERAMOUNT")){var Po;const eo=Ht==null?void 0:Ht.amount,x=(vt==null?void 0:vt.currency)||(vt==null||(Po=vt.plansDetail)===null||Po===void 0?void 0:Po.recurringPaymentCurrencyCode),go=vt!=null&&vt.cycleType?`/${(0,s.ps)(vt.cycleType,vt==null?void 0:vt.renewalCyclePeriodMultiplier)}`:"",mo=eo!=null?`${(0,s.Qn)(x)} ${eo}${go}`:"";Gt=Gt.replace("$VIEWLIFT_OFFERAMOUNT",so(mo)),bt=bt.replace("$VIEWLIFT_OFFERAMOUNT",Eo(mo))}(0,w.publishNotificationUpdate)({message:bt||"Promo Code Applied",type:"OFFER"}),(0,Jt.Y2)(vt,{displayName:V.data.displayName,name:V.data.name,code:ao}),At(!1),Wt(Gt||"Promo Code Applied"),(0,s.iR)({eventName:"apply_code_status",type:"apply-code",reason:ao,status:"success",action:"Apply Promo Code",paymentStatus:null,eventCategory:"Payment",section:"checkout"}),(0,s.iR)({eventName:"select_promotion",type:"apply-code",reason:ao,status:"success",action:"Apply Promo Code",paymentStatus:null,eventCategory:"Payment",section:"checkout"})}if(V.isError){if(Me(_o)){ce(!1);return}ce(!1),i().publish("isLoading",!1),sessionStorage.removeItem("offerCode",ao),(0,y.A)(V),(0,w.publishErrorUpdate)((t==null?void 0:t.promoValidatingError)||"Invalid Promo Code"),Wt(!1),At((t==null?void 0:t.promoValidatingError)||"Invalid Promo Code"),(0,s.iR)({eventName:"apply_code_status",type:"apply-code",reason:ao,status:"failure",action:"Apply Promo Code",paymentStatus:null,eventCategory:"Payment",section:"checkout"}),(0,s.iR)({eventName:"select_promotion",type:"apply-code",reason:ao,status:"failure",action:"Apply Promo Code",paymentStatus:null,eventCategory:"Payment",section:"checkout"})}},Fe=()=>{We.current+=1;let J=sessionStorage.getItem("offerCode");if(ce(!1),Wt(!1),At(!1),!J){Ut({}),xe("");return}sessionStorage.removeItem("offerCode"),Ut({}),xe(""),ct()},ct=async(J,it,xt={})=>{let Tt=xt.offerCode!==void 0?xt.offerCode:sessionStorage.getItem("offerCode")||null,Nt=(0,ko.O)(sessionStorage.getItem("currentPlan"));const po={id:Nt.id||(Nt==null?void 0:Nt.planId),offerCode:Tt};try{let _=await Wl(po,{publish:!1});if(!(_!=null&&_.planId)||_ instanceof Error){var vo,vt,bo,_o;const V=_==null||(vt=_.response)===null||vt===void 0||(vo=vt.data)===null||vo===void 0?void 0:vo.code;return V==="OFFER_ALREADY_USED"&&sessionStorage.getItem("offerCode")===Tt&&sessionStorage.removeItem("offerCode"),{isError:!0,
1code:V,error:_==null||(_o=_.response)===null||_o===void 0||(bo=_o.data)===null||bo===void 0?void 0:bo.message}}if(Tt&&sessionStorage.getItem("offerCode")===Tt){let V=(0,Jt.DC)(),nt={event_label1:_==null?void 0:_.appliedOfferCode,event_label2:_==null?void 0:_.amount,event_label3:"pending",logged_in_status:V!=null&&V.userId?"Yes":"No",subscribed_status:(0,Nl.sm)(),email:V==null?void 0:V.email,subscription_plan:Nt==null?void 0:Nt.title,event_category:"Payment",event_action:"Apply Offer Code",event_value:_==null?void 0:_.amount,payment_status:null};(0,N.Ay)("offer_code_applied",nt,null),(0,Z.pushStepToFlow)("offer-code-applied"),J.discountAmount=_==null?void 0:_.amount,i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.OFFER_CODE_APPLIED,data:{...J,discountAmount:_==null?void 0:_.amount}})}return ut(_,it),_}catch(_){var Oo,xo,ao,Mo;const V=_==null||(xo=_.response)===null||xo===void 0||(Oo=xo.data)===null||Oo===void 0?void 0:Oo.code;return V==="OFFER_ALREADY_USED"&&sessionStorage.getItem("offerCode")===Tt&&sessionStorage.removeItem("offerCode"),{isError:!0,
1code:V,error:_==null||(Mo=_.response)===null||Mo===void 0||(ao=Mo.data)===null||ao===void 0?void 0:ao.message}}};(0,e.useEffect)(()=>{const J={};le.forEach(it=>{J[it.key]=!1}),gt(J)},[le]);function Xt(J,it){if(!it||it.length===0)return Et(J);let xt=Et(J);return it.forEach(Tt=>{const Nt=Tt.key,po=`<a aria-label="${Et(Tt.label)}" href="${encodeURI(Tt.permalink)}" class="consentLinks" target="_blank">${Et(Tt.label)}</a>`;xt=xt.replace(Nt,po)}),xt}function Kt(J){var it,xt,Tt,Nt,po,vo,vt;const bo=((Nt=window)===null||Nt===void 0||(Tt=Nt.app_data)===null||Tt===void 0||(xt=Tt.appcmsMain)===null||xt===void 0||(it=xt.emailConsent)===null||it===void 0?void 0:it.enableEmailConsent)||!1;let _o=p==null||(vt=p.moduleData)===null||vt===void 0||(vo=vt.layout)===null||vo===void 0||(po=vo.settings)===null||po===void 0?void 0:po.mergeForm;if(bo&&!J.some(V=>V.key==="emailConsent")&&_o){var Oo,xo,ao,Mo;const V={id:"1",isRequired:!1,key:"emailConsent",label:(Mo=window)===null||Mo===void 0||(ao=Mo.app_data)===null||ao===void 0||(xo=ao.appcmsMain)===null||xo===void 0||(Oo=xo.emailConsent)===null||Oo===void 0?void 0:Oo.message,platforms:["web"]};J.push(V)}return!J||!(J!=null&&J.length)?null:J.map((_,V)=>{var nt,Lt,ot;const{id:_t,key:Po,label:St,isRequired:Ht,delimiter:Eo=[]}=_,so=Xt(St,Eo),yo=`dynamic-checkbox-${_t||V}`;return e.createElement("div",{key:_t||V,tabIndex:0,className:"custom-checkbox-wrapper"},e.createElement("div",{tabIndex:0,className:"container",onClick:()=>Bo(Po)},e.createElement("input",{"aria-labelledby":`label-${yo}`,tabIndex:0,id:yo,type:"checkbox",name:Po,"data-key":Po,"data-required":Ht,checked:Zt[Po]||!1}),e.createElement("span",{className:"checkmark"})),e.createElement("p",{id:`label-${yo}`,style:{color:p==null||(ot=p.moduleData)===null||ot===void 0||(Lt=ot.layout)===null||Lt===void 0||(nt=Lt.settings)===null||nt===void 0?void 0:nt.sectionTextColor},className:"checkbox-label",dangerouslySetInnerHTML:{__html:so}}))})}function Bo(J){gt(it=>{const xt={[J]:!it[J]},Tt=(0,ft.getStorageItem)("CheckoutStore");return(0,Al.t)({userDetails:{...Tt==null?void 0:Tt.userDetails,...xt}}),{...it,...xt}})}const Lo=(0,e.useMemo)(()=>!le||le.length===0?!0:le.every(J=>J.isRequired?Zt[J.key]===!0:!0),[Zt,le]),wo=a==null||(C=a.layout)===null||C===void 0||(k=C.settings)===null||k===void 0?void 0:k.disabledCTAColor,De=a==null||(re=a.layout)===null||re===void 0||(X=re.settings)===null||X===void 0?void 0:X.inputBoxBorderColor;let qt={background:(a==null||(Be=a.layout)===null||Be===void 0||(oe=Be.settings)===null||oe===void 0?void 0:oe.inputBoxActiveBackgroundColor)||(a==null||(he=a.layout)===null||he===void 0||(fe=he.settings)===null||fe===void 0?void 0:fe.inputColor)||"transparent",border:` 1px solid ${De}`,color:(a==null||(we=a.layout)===null||we===void 0||(b=we.settings)===null||b===void 0?void 0:b.inputBoxActiveColor)||"#000"},So={background:(a==null||(Ze=a.layout)===null||Ze===void 0||(de=Ze.settings)===null||de===void 0?void 0:de.inputBoxDisabledBackgroundColor)||ze,border:`1px solid ${De}`};const Wo=p==null||(qe=p.moduleData)===null||qe===void 0||(Ne=qe.layout)===null||Ne===void 0||(m=Ne.settings)===null||m===void 0?void 0:m.sectionTextColor;return e.createElement("div",{className:"ccform-wrapper"},uo?e.createElement(ei,{moduleData:a,isDisabled:K,labelTextColor:Wo}):e.createElement(e.Fragment,null),e.createElement("div",{className:"element-wrapper",style:K?{pointerEvents:"none"}:{}},e.createElement("div",{className:"element-heading",style:{color:Wo}},(t==null?void 0:t.cardNumberLabel)||"Card Number"),e.createElement(Vo,{El:Io.CardNumberElement,moduleData:a,title:(t==null?void 0:t.cardNumberText)||"Card Number",isDisabled:K})),e.createElement("div",{className:"inline-wrapper"},e.createElement("div",{className:"element-wrapper",style:K?{pointerEvents:"none"}:{}},e.createElement("div",{className:"element-heading",style:{color:Wo}},(t==null?void 0:t.expirationLabel)||"Expiry"),e.createElement(Vo,{El:Io.CardExpiryElement,moduleData:a,title:(t==null?void 0:t.expiryText)||"Expiry",isDisabled:K})),e.createElement("div",{className:"element-wrapper",style:K?{pointerEvents:"none"}:{}},e.createElement("div",{className:"element-heading",style:{color:Wo}},(t==null?void 0:t.verificationLabel)||"CVV"),e.createElement(Vo,{El:Io.CardCvcElement,moduleData:a,isCvc:!0,title:(t==null?void 0:t.cvcText)||"CVV",isDisabled:K}))),uo?e.createElement(e.Fragment,null):e.createElement("div",{className:"element-wrapper",style:K?{pointerEvents:"none"}:{}},e.createElement("div",{className:"element-heading",style:{color:Wo}}
1,(t==null?void 0:t.nameLabel)||"Name"),e.createElement(Zl,{title:(t==null?void 0:t.nameText)||"Name",moduleData:a,name:"customer_name",isDisabled:K})),e.createElement("div",{className:Ve?"full-w form-2":"form-2"},e.createElement("div",{className:"element-wrapper",style:K?{pointerEvents:"none"}:{}},e.createElement("div",{className:"element-heading",style:{color:Wo}},(t==null?void 0:t.offerCodeLabel)||"Offer Code"),e.createElement("div",{className:"offer-container"},e.createElement("div",{className:"coupon-input"},e.createElement("input",{"aria-labelledby":(t==null?void 0:t.addPromoPlaceholder)||"Add Promo",className:`offer-code-input ${Object.keys(Ae).length>0?"applied-code":""}`,placeholder:(t==null?void 0:t.addPromoPlaceholder)||"Add Promo",onChange:J=>{xe(J.target.value)},onKeyPress:J=>{J.key==="Enter"&&ee&&Qe(J)},value:ee,style:K?So:qt}),Object.keys(Ae).length>0&&e.createElement("button",{"aria-label":"cancel",className:"remove-code-btn  site-cta-color site-cta-background-color ",onClick:()=>{Fe(!1)}},(t==null?void 0:t.cancelPromo)||"cancel"),!wt&&Object.keys(Ae).length==0&&e.createElement("button",{disabled:!ee,style:ee?{background:a==null||(Ct=a.layout)===null||Ct===void 0||(ht=Ct.settings)===null||ht===void 0?void 0:ht.activeCTAColor}:{background:wo},"aria-label":"apply",className:`apply site-cta-color ${et?" processing":""}`,onClick:J=>Qe(J)},et?(t==null?void 0:t.processingTxt)||"Processing":(t==null?void 0:t.applyCode)||"Apply"))))),tt&&e.createElement("div",{className:"offer-code-error notice-text"},tt," "),wt&&e.createElement("div",{className:"offer-code-success notice-text",dangerouslySetInnerHTML:{__html:wt}}),e.createElement("div",{style:{margin:"1rem 0"}},Kt(le)),g&&e.createElement("div",{className:"checkbox-label-text",style:{color:p==null||($e=p.moduleData)===null||$e===void 0||(Pe=$e.layout)===null||Pe===void 0||(He=Pe.settings)===null||He===void 0?void 0:He.sectionTextColor}},g),e.createElement(ql,{isValid:lt,isDisabled:K||!Lo,metadataMap:t,ctaText:D==null?void 0:D.subscribeCtaText,moduleData:a}))},li=t=>e.createElement(e.Fragment,null,e.createElement(oi,{moduleData:t==null?void 0:t.moduleData,metadataMap:t==null?void 0:t.metadataMap,currentPlan:t==null?void 0:t.currentPlan,checkoutModuleData:t==null?void 0:t.checkoutModuleData,isUpgrade:t==null?void 0:t.isUpgrade}));var ii=o(37427);const ni=({moduleData:t,stripeElStyle:a,currentPlan:p,firstPayment:u,metadataMap:S,checkoutModuleData:O,isUpgrade:z})=>{const[R,ie]=(0,e.useState)(null),v=async()=>{var k,C,X,re,oe;let Be=await(0,ii.c)((oe=window)===null||oe===void 0||(re=oe.app_data)===null||re===void 0||(X=re.appcmsMain)===null||X===void 0||(C=X.paymentProviders)===null||C===void 0||(k=C.stripe)===null||k===void 0?void 0:k.apiKey);ie(Be)};return(0,e.useEffect)(()=>{v()},[]),e.createElement(e.Fragment,null,R&&e.createElement("div",{className:"billing stripe-container"},e.createElement("div",{className:"stripe-form-wrapper"},e.createElement(Io.Elements,{stripe:R},e.createElement(li,{theme:"dark",layout:"NEW_SUBSCRIPTION_FLOW",stripeElStyle:a,buttonCaption:"Subscribe Now!",currentPlan:p,firstPayment:u,moduleData:t,metadataMap:S,checkoutModuleData:O,isUpgrade:z})))))},ai=()=>{if(!document.getElementById("stripeV3JS"))return new Promise((a,p)=>{var u=document.createElement("script");u.type="text/javascript",u.async=!0,u.id="stripeV3JS",u.src="https://js.stripe.com/v3/",u.onload=()=>{a("resolved")},u.onerror=()=>{p("Cannot load stripe"),document.head.removeChild(u)},document.head.appendChild(u)})};var Ll=o(26878),Ml=o(51108);const di=({statusData:t,handleRetry:a,handlePaymentSuccess:p,metadataMap:u,moduleDataLayout:S})=>{let{status:O,data:z}=t;const R=(u==null?void 0:u.paymentReceivedText)||"Payment Received",ie=(u==null?void 0:u.paymentFailedText)||"Payment Failed",v=(u==null?void 0:u.paymentReceivedDescription)||"We\u2019ve received your payment. You will be redirected in a moment.",k=u==null?void 0:u.paymentFailedDescription,C=u==null?void 0:u.goBackToAppCta,X=(0,s.KQ)(),re=()=>{X!=null&&X.externalPlatform?((0,s.t8)({moduleDataLayout:S,pageType:"Stripe Thank You Popup",stepsCompleted:["auth-verified","plan-selection",O?"close-success-popup":"cancel-payment",O?R:ie,O?v:k]}),(0,Jt.ee)()):(0,w.publishRedirect)("/")};return(0,e.useEffect)(()=>{let oe=Array.from(document.getElementsByTagName("body"));return oe!=null&&oe.length&&(oe[0].style.overflow="hidden"),()=>{oe!=null&&oe.length&&(oe[0].style.overflow="unset")}},[]),e.createElement(e.Fragment,null,e.createElement("div",{className:"status-wrapper"},e.createElement("div",{className:"status-container site-background-color"},O?e.createElement("div",{className:"cross-icon",onClick:()=>{(0,s.t8)({moduleDataLayout:S,pageType:"Stripe Thank You Popup",stepsCompleted:["auth-verified","plan-selection","close-success-popup",R,v]}),p()}},(0,Ml.sk)()):e.createElement(e.Fragment,null),e.createElement("div",{className:"status-icon"},O?(0,Ml.rv)():(0,Ml.ie)()),e.createElement("div",{className:"payment-status-title"},O?R:ie),e.createElement("div",{className:"payment-status-description"},O?v:k),O?e.createElement(e.Fragment,null):e.createElement("div",{className:"fail-btns"},e.createElement("div",{className:"fail-btn site-cta-background-color",onClick:a},(u==null?void 0:u.retryPaymentBtnCta)||"Retry Payment"),e.createElement("div",{className:"cancel-btn",onClick:re},(u==null?void 0:u.cancelBtnCta)||"Cancel")))))};var si=o(95211),ri=o(42583),Ol=o.n(ri);const ui=({metadataMap:t,taxDetails:a,layoutSettings:p})=>{var u,S;const[O,z]=(0,e.useState)(null),[R,ie]=(0,e.useState)("not identified");
1let v=(0,ko.O)(sessionStorage.getItem("currentPlan"));const k=(v==null?void 0:v.plansDetail)||(v==null||(S=v.plan)===null||S===void 0||(u=S.planDetails)===null||u===void 0?void 0:u[0])||{},C=(k==null?void 0:k.recurringPaymentCurrencyCode)||(v==null?void 0:v.currency),X=oe=>{var Be;const fe=(oe==null||(Be=oe.toUpperCase)===null||Be===void 0?void 0:Be.call(oe))||oe;return fe==="YEAR"||fe==="YR"?(t==null?void 0:t.yearlyText)||"Yearly":fe==="MONTH"||fe==="MO"?(t==null?void 0:t.monthlyText)||"Monthly":fe==="DAY"?(t==null?void 0:t.dailyText)||"Daily":fe==="WEEK"?(t==null?void 0:t.weeklyText)||"Weekly":oe==="Rent"?"Rent":"Buy"},re=async()=>{if((v==null?void 0:v.type)==="Svod"){var oe;const Be=(v==null?void 0:v.cycleType)||(v==null||(oe=v.plan)===null||oe===void 0?void 0:oe.renewalCycleType);ie(Be?X(Be):"not identified"),z((t==null?void 0:t.recurringText)||"Recurring")}else ie("One time")};return(0,e.useEffect)(()=>{re()},[]),e.createElement(e.Fragment,null,e.createElement("div",{className:"review-purchase-container"},e.createElement("div",{style:{backgroundColor:p==null?void 0:p.moduleBackgroun
1dColor},className:"review-purchase-wrapper"},e.createElement("h4",{className:"site-color"},(t==null?void 0:t.reviewPurchaseTxt)||"Review Purchase"),e.createElement("div",{className:"cross-icon",onClick:()=>{i().publish("processing",!1),(0,L.JR)("cancelled")}},(0,n.$A)("#fff")),v&&a&&e.createElement(e.Fragment,null,e.createElement("div",{className:"review-container"},e.createElement("div",{className:"review-detail"},e.createElement("h5",null,(t==null?void 0:t.paymentMethodTxt)||"Payment Method"),e.createElement("h5",null,(t==null?void 0:t.cardText)||"Card")),e.createElement("div",{className:"review-detail"},e.createElement("h5",null,"Billing Frequency"),e.createElement("h5",null,R)),O&&e.createElement("div",{className:"review-detail"},e.createElement("h5",null,(t==null?void 0:t.purchaseTypeTxt)||"Purchase Type"),e.createElement("h5",null,O)),e.createElement("div",{className:"review-detail"},e.createElement("h5",null,(t==null?void 0:t.chargeTxt)||"Charge"),e.createElement("h5",null,(a==null?void 0:a.pretaxAmount)===0||a!=null&&a.pretaxAmount?`${Ol()(C)} ${a==null?void 0:a.pretaxAmount}`:a==null?void 0:a.amount,(v==null?void 0:v.type)==="Svod"?`/${R}`:"")),e.createElement("div",{className:"review-detail"},e.createElement("h5",null,(t==null?void 0:t.tax)||"Tax"),e.createElement("h5",null,`${Ol()(C)} ${a==null?void 0:a.taxAmount}`))),(a==null?void 0:a.amount)===0||a!=null&&a.amount?e.createElement("div",{className:"review-detail"},e.createElement("h5",null,t==null?void 0:t.total),e.createElement("h5",null,`${Ol()(C)} ${a==null?void 0:a.amount}`)):e.createElement(e.Fragment,null)),e.createElement("input",{"aria-labelledby":(t==null?void 0:t.confirmTxt)||"Confirm Purchase",className:"button continue-button site-cta-color site-cta-background-color",onClick:async()=>{(0,L.JR)(null)},type:"button",value:(t==null?void 0:t.confirmTxt)||"Confirm Purchase"}))))};var zo=o(76712),tl=o(98646);let pl=!1;const vi=({moduleData:t,checkoutModuleData:a,isUpgrade:p})=>{var u;const[S,O]=(0,e.useState)(!1),[z,R]=(0,e.useState)(!1),[ie,v]=(0,e.useState)({status:!1}),[k,C]=(0,e.useState)(!1),[X,re]=(0,e.useState)(""),[oe,Be]=(0,e.useState)(null),[fe,he]=(0,e.useState)(!1),[b,we]=(0,e.useState)({pretaxAmount:0,taxAmount:0}),de=(0,e.useRef)(!1),Ze=(0,e.useRef)(!1),m=(0,e.useRef)(!1),Ne=(0,e.useRef)(!1);let qe=t==null?void 0:t.metadataMap,ht=t==null||(u=t.layout)===null||u===void 0?void 0:u.settings;const Ct=async()=>{await ai(),O(!0)},He=ee=>{we(ee)},Pe=()=>{R(!1)},$e=()=>{R(!1)},Te=ee=>{(0,F.Wh)(!1),(0,w.publishAppLoading)(!0),(ee==null?void 0:ee.status)!=="COMPLETED"&&(0,w.publishErrorUpdate)(ee==null?void 0:ee.status),setTimeout(async()=>{if(!k){var xe;i().publish("processing",!1),(0,w.publishAppLoading)(!1);let We=await(0,Ll.Q3)(),Me=We==null||(xe=We.subscriptionInfo)===null||xe===void 0?void 0:xe.subscriptionStatus;Wt({subscriptionStatus:Me},We)}},3e4)},I=()=>sessionStorage.getItem("offerCode")||null,et=ee=>{var xe,We,Me,ut,Oe,lt,Dt,Ve,Ge,K,Qt;if(ee==="cancelled"){he(!1);return}(0,w.publishAppLoading)(!0);let Zt=JSON.parse(sessionStorage.getItem("subscription-info")),gt=ee||(Zt==null?void 0:Zt.subscriptionInfo);const uo=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let D=(0,ko.O)(sessionStorage.getItem("currentPlan"));he(!1),ce(gt),(0,Z.pushStepToFlow)("payment initiated"),sessionStorage.getItem("transactionId")||(0,Z.handleStatusGaCalls)({eventName:"payment_initiate",subSection:null,type:"initiate",reason:null,status:"Card",action:"Initiate Payment",paymentStatus:"initiate",eventCategory:"Payment"}),sessionStorage.setItem("transactionId",gt==null||(xe=gt.billingToken)===null||xe===void 0?void 0:xe.requestId),Be(gt==null||(We=gt.billingToken)===null||We===void 0?void 0:We.requestId);let le={pageUrl:uo==null?void 0:uo.pageUrl,planId:D==null?void 0:D.planId,planName:D==null?void 0:D.title,planDesc:D==null?void 0:D.description,planType:D==null?void 0:D.type,paymentMethod:gt==null||(Me=gt.billingToken)===null||Me===void 0?void 0:Me.requestId,PromotionCode:I(),discountAmount:(gt==null||(Oe=gt.plan)===null||Oe===void 0||(ut=Oe.plansDetail)===null||ut===void 0?void 0:ut.strikeThroughPrice)-(gt==null||(Dt=gt.plan)===null||Dt===void 0||(lt=Dt.plansDetail)===null||lt===void 0?void 0:lt.recurringPaymentAmount),monetizationType:(D==null?void 0:D.type)==="Buy"?"PURCHASE":D==null||(Ve=D.type)===null||Ve===void 0?void 0:Ve.toUpperCase(),orderSubTotalAmount:D==null?void 0:D.amount,orderTaxAmount:b==null?void 0:b.taxAmount,orderTotalAmount:b!=null&&b.taxAmount?b==null?void 0:b.taxAmount:D==null?void 0:D.amount,currencyCode:gt==null||(K=gt.plan)===null||K===void 0||(Ge=K.plansDetail)===null||Ge===void 0?void 0:Ge.recurringPaymentCurrencyCode,transactionId:gt==null||(Qt=gt.billingToken)===null||Qt===void 0?void 0:Qt.requestId};i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.PAYMENT_INITIATE,data:le})},ce=async ee=>{let xe=(0,ft.getStorageItem)("transactionData"),We=(0,ko.O)(sessionStorage.getItem("currentPlan"));if(xe!=null&&xe.isPurchase){(0,Jt.Ov)(ee,xe),(0,Jt.yB)(We,I(),ee==null?void 0:ee.token);return}(0,Jt.B1)(ee),(0,Jt.yB)(We,I(),ee==null?void 0:ee.token)},tt=async(ee,xe,We,Me)=>
1{const ut=(0,Jt.DC)();if(!ut){(0,w.publishErrorUpdate)("User not found"),(0,F.Wh)(!1),i().publish("processing",!1),(0,w.publishAppLoading)(!1);return}return(0,Jt.z8)(ee,xe,We,Me).then(async Oe=>{var lt;re(Oe==null?void 0:Oe.requestId);let Dt=ut;Dt.billingInfo=Oe;let Ve=(0,ko.O)(sessionStorage.getItem("currentPlan")),Ge={plan:Ve,billingToken:Oe,offerCode:I(),onOpen:()=>(0,Jt.kX)("InProcess"),onMessageSuccess:K=>(0,Jt.kX)("Success",K==null?void 0:K.plan),onMessageFailure:()=>(0,Jt.kX)("Failed"),onError:()=>(0,Jt.kX)("InProcess"),token:ee};(0,Al.t)({paymentDetails:{subscribeInfo:Ge}}),Wl({id:(Ve==null?void 0:Ve.planId)||(Ve==null||(lt=Ve.plan)===null||lt===void 0?void 0:lt.id),offerCode:I()}).then(K=>{(K==null?void 0:K.taxAmount)===0||K!=null&&K.taxAmount?(sessionStorage.setItem("subscription-info",JSON.stringify({subscriptionInfo:Ge})),(0,F.Wh)(!1),(0,w.publishAppLoading)(!1),he(!0)):et(Ge)}).catch(K=>{(0,y.A)(K,"error"),(0,F.Wh)(!1),i().publish("processing",!1),(0,w.publishAppLoading)(!1)})}).catch(Oe=>{(0,y.A)(Oe,"error"),(0,w.publishErrorUpdate)((Oe==null?void 0:Oe.message)||"Error In Processing Payment"),(0,F.Wh)(!1),i().publish("processing",!1),(0,w.publishAppLoading)(!1)})},At=async ee=>{var xe,We,Me,ut,Oe,lt,Dt,Ve;ee.preventDefault(),i().publish("processing",!0),(0,w.publishAppLoading)(!0);const Ge=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let K=(0,ko.O)(sessionStorage.getItem("currentPlan")),Qt={pageUrl:Ge==null?void 0:Ge.pageUrl,planId:K==null?void 0:K.planId,planName:K==null?void 0:K.title,planDesc:K==null?void 0:K.description,planType:K==null?void 0:K.type,paymentMethod:null,PromotionCode:I(),discountAmount:(K==null||(xe=K.plansDetail)===null||xe===void 0?void 0:xe.strikeThroughPrice)-(K==null||(Me=K.plan)===null||Me===void 0||(We=Me.plansDetail)===null||We===void 0?void 0:We.recurringPaymentAmount),monetizationType:(K==null?void 0:K.type)==="Buy"?"PURCHASE":K==null||(ut=K.type)===null||ut===void 0?void 0:ut.toUpperCase(),orderSubTotalAmount:K==null?void 0:K.amount,orderTaxAmount:b==null?void 0:b.taxAmount,orderTotalAmount:b!=null&&b.taxAmount?b==null?void 0:b.taxAmount:K==null?void 0:K.amount,currencyCode:K==null||(Oe=K.plansDetail)===null||Oe===void 0?void 0:Oe.recurringPaymentCurrencyCode,transactionId:null};(0,L.bZ)(Te);let Zt=a==null||(Ve=a.moduleData)===null||Ve===void 0||(Dt=Ve.layout)===null||Dt===void 0||(lt=Dt.settings)===null||lt===void 0?void 0:lt.disableHba;(0,Z.proceedOnboarding)(Zt),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.SUBSCRIBE_CLICKED,data:Qt}),(0,Z.handleStatusGaCalls)({eventName:"subscribe_clicked",subSection:null,type:"subscribe",reason:K==null?void 0:K.type,status:null,action:"Subscribe Now",paymentStatus:null,eventCategory:"Subscription"})},wt=ee=>{if(pl||!(ee!=null&&ee.value))return;let xe=ee==null?void 0:ee.formRef;if(xe){pl=!0,i().publish("processing",!0);let{stripe:We,cardElement:Me,addressElement:ut}=xe;We==null||We.createToken(Me).then(async Oe=>{var lt;if(!(Oe==null||(lt=Oe.error)===null||lt===void 0)&&lt.message){var Dt;(0,w.publishAppLoading)(!1),i().publish("purchaseError",Oe.error.message),(0,F.Wh)(!1),(0,w.publishErrorUpdate)(Oe==null||(Dt=Oe.error)===null||Dt===void 0?void 0:Dt.message),i().publish("processing",!1),pl=!1;return}await tt(Oe,We,Me,ut),pl=!1}).catch(Oe=>{(0,y.A)(`Error in processing payment ${Oe}`,"error"),(0,w.publishErrorUpdate)("Error In Processing Payment"),i().publish("processing",!1),(0,w.publishAppLoading)(!1),pl=!1})}},Wt=(ee,xe)=>{var We,Me;let ut=(0,je.fetchCurrentPlan)(),Oe=(Me=window)===null||Me===void 0||(We=Me.page_data)===null||We===void 0?void 0:We.page,lt=Oe==null?void 0:Oe.id,Dt=Oe==null?void 0:Oe.title;const Ve=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let Ge={pageUrl:Ve==null?void 0:Ve.pageUrl,transactionId:X};if((ee==null?void 0:ee.subscriptionStatus)!=="COMPLETED"&&((ee==null?void 0:ee.subscriptionStatus)==="INITIATED"?Ge.status={errorCode:"",message:"payment pending"}:Ge.status={errorCode:"",message:"payment failed"}),i().publish("processing",!1),(0,w.publishAppLoading)(!1),C(!0),v({status:(ee==null?void 0:ee.subscriptionStatus)==="COMPLETED"}),R(!0),(ee==null?void 0:ee.subscriptionStatus)==="COMPLETED"){var K,Qt;(0,Z.pushStepToFlow)("payment-success");let Zt=sessionStorage.getItem("transactionId");i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.PAYMENT_SUCCCESS,data:Ge}),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.NEW_ONBOARDING_CHECKOUT_SUCCESS,data:(0,Jt.Uv)()}),(0,Z.handleStatusGaCalls)({eventName:"checkout_success",subSection:null,type:"success",reason:"Payment Success",status:"success",action:"Success",paymentStatus:null,eventCategory:"Checkout"}),(0,Z.handleStatusGaCalls)({eventName:"payment_success",subSection:null,type:"success",reason:"success",status:Zt,action:"Success",paymentStatus:"success",eventCategory:"Payment"}),(0,Z.handleStatusGaCalls)({eventName:"registration",subSection:null,type:"success",reason:"success",status:Zt,action:"Success",paymentStatus:"success",eventCategory:"Payment",method:"Stripe"});const gt=(0,zo.wR)(),uo=Zt||X||"",D=(0,ft.getStorageItem)("MonetizationStore"),g=ut&&(ut.planDetails||ut.plansDetail||ut.amount)?ut:(D==null?void 0:D.currentSelectedPlan)||ut,le=(g==null?void 0:g.plansDetail)||(g==null||(Qt=g.planDetails)===null||Qt===void 0?void 0:Qt[0])||{},pe=(K=g==null?void 0:g.amount)!==null&&K!==void 0?K:le==null?void 0:le.recurringPaymentAmount,Ie=(g==null?void 0:g.currency)||(le==null?void 0:le.recurringPaymentCurrencyCode),Xe=(g==null?void 0:g.planId)||(g==null?void 0:g.id),Et={value:pe,currency:Ie,content_ids:Xe?[Xe]:void 0,content_type:"subscription",content_category:"subscription",order_id:uo,transaction_id:uo,event_id:gt,paymentPlan:(g==null?void 0:g.title)||(g==null?void 0:g.name),country:le==null?void 0:le.countryCode};if(pe&&Ie&&!de.current){(0,zo.w_)("PIXEL",tl.DD.PURCHASE,Et,gt),(0,zo.w_)("PIXEL",tl.DD.SUBSCRIPTION_COMPLETED,Et,gt);const mt=(0,N.L4)((g==null?void 0:g.renewalCycleType)||(g==null?void 0:g.cycleType),tl.DD);mt&&(0,zo.w_)("PIXEL",mt,Et,gt),de.current=!0}pe&&Ie&&!Ze.current&&((0,zo.w_)("FB",tl.$8.PURCHASE,Et,gt),(0,zo.w_)("FB",tl.$8.SUBSCRIPTION_COMPLETED,Et,gt),Ze.current=!0),setTimeout(()=>{(0,Ll.BE)(null,null,!0,xe)},3e3)}else(ee==null?void 0:ee.subscriptionStatus)==="INITIATED"?((0,Z.handleStatusGaCalls)({eventName:"checkout_pending",subSection:null,type:"pending",reason:"SSE gets delayed by 30 sec",status:"Payment Pending",action:"Pending",paymentStatus:null,eventCategory:"Payment"}),(0,Z.handleStatusGaCalls)({eventName:"payment_pending",subSection:null,type:"pending",reason:"SSE gets delayed by 30 sec",status:"Payment Pending",action:"Pending",paymentStatus:null,eventCategory:"Payment"}),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.PAYMENT_PENDING,data:Ge}),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.NEW_ONBOARDING_CHECKOUT_PENDING,data:(0,Jt.bM)()}),R(!1)):((0,Z.handleStatusGaCalls)({eventName:"checkout_error",subSection:null,type:"failure",reason:"failure",status:"Payment Failed",action:"Failure",paymentStatus:null,eventCategory:"Payment"}),(0,Z.handleStatusGaCalls)({eventName:"payment_failure",subSection:null,type:"failure",reason:"failure",status:"Payment Failed",action:"Failure",paymentStatus:null,eventCategory:"Payment"}),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.PAYMENT_FAILURE,data:Ge}),i().publish("user-analytics",{ename:E.ANALYTICSEVENTS.NEW_ONBOARDING_CHECKOUT_FAILURE,data:(0,Jt.bM)()}),R(!1))},Ae=ee=>{if(v(ee),R(!0),(0,w.publishAppLoading)(!1),ee!=null&&ee.status){var xe,We,Me,ut,Oe,lt;const Dt=(0,ft.getStorageItem)("transactionData"),Ve=Dt==null?void 0:Dt.contentDetails,Ge=
1Dt==null?void 0:Dt.planDetails,Qt=(Dt==null?void 0:Dt.purchaseType)==="Rent"||(Ge==null?void 0:Ge.isRentEnabled)?(xe=Ge==null?void 0:Ge.rentAmount)!==null&&xe!==void 0?xe:Ge==null?void 0:Ge.amount:(We=Ge==null?void 0:Ge.purchaseAmount)!==null&&We!==void 0?We:Ge==null?void 0:Ge.amount,Zt=(Ge==null?void 0:Ge.recurringPaymentCurrencyCode)||(Ge==null?void 0:Ge.currencyCode)||(Ge==null?void 0:Ge.currency),gt=(Ve==null?void 0:Ve.id)||(Ve==null||(Me=Ve.gist)===null||Me===void 0?void 0:Me.id),uo=(Ve==null||(ut=Ve.gist)===null||ut===void 0?void 0:ut.title)||(Ve==null?void 0:Ve.title),D=(Oe=(Ve==null||(lt=Ve.gist)===null||lt===void 0?void 0:lt.contentType)||"video")===null||Oe===void 0?void 0:Oe.toString().toLowerCase(),g=(0,zo.wR)(),le=sessionStorage.getItem("transactionId")||X||"",pe={value:Qt,currency:Zt,content_ids:gt?[gt]:void 0,content_name:uo,content_type:D,content_category:"tvod",order_id:le,transaction_id:le,event_id:g,purchaseType:Dt==null?void 0:Dt.purchaseType};Qt&&Zt&&!m.current&&((0,zo.w_)("PIXEL",tl.DD.PURCHASE,pe,g),m.current=!0),Qt&&Zt&&!Ne.current&&((0,zo.w_)("FB",tl.$8.PURCHASE,pe,g),Ne.current=!0);const Ie=(0,s.Pl)();Ie?setTimeout(()=>{const Xe=t==null?void 0:t.layout;(0,s.t8)({moduleDataLayout:Xe,stepsCompleted:["auth-verified","plan-selection","checkout-completed"]}),(0,w.publishRedirect)(Ie)},2e3):setTimeout(()=>{(0,Ll.xR)(null,null,!0)},5e3)}},Ut=(0,si.nF)(At,1500);return(0,e.useEffect)(()=>(pl=!1,Ct(),(0,L.r1)(wt),(0,L.J3)(Ae),(0,L.Mf)(He),(0,L.Iq)(et),(0,L.S_)(Wt),()=>{(0,y.A)("cleanup - unsubscribing","info"),i().unsubscribe("process-stripe-payment",wt),i().unsubscribe("transaction-modal",Ae),i().unsubscribe("discount-data",He),i().unsubscribe("purchase-details",et),i().unsubscribe("subscription-status-event",Wt)}),[]),e.createElement(e.Fragment,null,fe?e.createElement(ui,{metadataMap:qe,layoutSettings:ht,taxDetails:b}):e.createElement(e.Fragment,null),z?e.createElement(di,{statusData:ie,handleRetry:Pe,handlePaymentSuccess:$e,metadataMap:t==null?void 0:t.metadataMap,moduleDataLayout:t==null?void 0:t.layout}):e.createElement(e.Fragment,null),e.createElement("form",{onSubmit:ee=>Ut(ee)},S&&e.createElement(ni,{moduleData:t,metadataMap:qe,checkoutModuleData:a,isUpgrade:p})))},ci=t=>e.createElement(e.Fragment,null,t!=null&&t.moduleData?e.createElement(vi,t):e.createElement(e.Fragment,null)),pi=(0,_e.A)(ci),mi=({layoutSettings:t,subscriptionPopupFonts:a})=>{var p,u,S,O;const[z,R]=(0,e.useState)([]),ie=C=>{var X;if(!(C==null||(X=C.planDetails)===null||X===void 0)&&X.featureDetails||C!=null&&C.featureDetails){var re;R((C==null||(re=C.planDetails)===null||re===void 0?void 0:re.featureDetails)||(C==null?void 0:C.featureDetails))}else{let oe=(0,je.structurePlanFeatures)(C);R(oe)}};(0,e.useEffect)(()=>{(0,Zo.Ju)(ie)},[]);let v={color:t==null?void 0:t.featureActiveColor,fontSize:a==null||(p=a.featureItemStyles)===null||p===void 0?void 0:p.fontSize,fontFamily:a==null||(u=a.featureItemStyles)===null||u===void 0?void 0:u.fontFamily},k={color:t==null?void 0:t.featureInactiveColor,fontSize:a==null||(S=a.featureItemStyles)===null||S===void 0?void 0:S.fontSize,fontFamily:a==null||(O=a.featureItemStyles)===null||O===void 0?void 0:O.fontFamily};return e.createElement(e.Fragment,null,e.createElement("div",{className:"featurelist-wrapper"},z==null?void 0:z.map(C=>{if(C!=null&&C.featureStatus)return e.createElement("div",{className:"feature-item",style:(C==null?void 0:C.featureStatus)!=="N"?v:k},e.createElement("div",{className:"feature-image"},(C==null?void 0:C.featureStatus)=="Y"?(0,n.Vw)():(C==null?void 0:C.featureStatus)=="N"?(0,n.$A)():C==null?void 0:C.featureStatus),e.createElement("div",{className:"feature-value"},`${C==null?void 0:C.featureValue}`))})))};var fi=o(64707),_l=o(88909);const gi=({plan:t,ctaStyles:a,ctaStyleType:p,plans:u,parentModuleData:S,isActive:O,contentDetails:z})=>{var R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze,m,Ne,qe,ht,Ct,He,Pe,$e;let{cta:Te,ctaHover:I}=a,{title:et,subTitle:ce="",currency:tt,amount:At,planId:wt,type:Wt,subscriptionPopupFonts:Ae,plansDetail:Ut}=t;const ee=((k=window)===null||k===void 0||(v=k.app_data)===null||v===void 0||(ie=v.appcmsMain)===null||ie===void 0||(R=ie.monetizationConfig)===null||R===void 0?void 0:R.showPlanFromPlanInfo)||!1,xe=(0,e.useRef)(null),[We,Me]=(0,e.useState)(!1),[ut,Oe]=(0,e.useState)(null),lt=({planDetails:pe,selectedPlanId:Ie,selectedType:Xe})=>{Oe(null),(0,L.JL)(!0),Me(Ie===wt&&Xe===Wt),(pe==null?void 0:pe.type)==="default"&&Me(!1)},Dt=()=>{let pe=window.location.search,Ie=new URLSearchParams(pe);const Xe=Ie.get("auth"),Et=Ie.get("email"),mt=Ie.get("tveCode"),ze=Ie.get("phoneNumber");let Ee=Ie.get("toolbox_user_token");const Re=location.pathname,Fe=(0,s.oU)()||(t==null?void 0:t.type);if(Xe&&(Et||ze)&&mt&&Re=="/checkout"||Ee){let ct={id:"TVE",type:"TVE",featureDetails:null};(0,Zo.SJ)({selectedPlanId:"TVE",planDetails:ct,selectedType:Fe}),(0,cl.J)(!0)}else if(O){if((t==null?void 0:t.planId)==="TVE"){(0,cl.J)(!0),Me(!0);return}let ct={id:t==null?void 0:t.planId,featureDetails:(t==null?void 0:t.featureDetails)||(t==null?void 0:t.features)||null};(0,Zo.SJ)({planDetails:ct,selectedPlanId:t==null?void 0:t.planId,selectedType:Fe}),Me(!0)}};let Ve=(Ae==null||(C=Ae.planBannerHeadingStyles)===null||C===void 0?void 0:C.fontSize)||(Ae==null||(X=Ae.popupCtaTitleFont)===null||X===void 0?void 0:X.fontSize),Ge=(Ae==null||(re=Ae.planBannerHeadingStyles)===null||re===void 0?void 0:re.fontFamily)||(Ae==null||(oe=Ae.popupCtaTitleFont)===null||oe===void 0?void 0:oe.fontFamily),K=(Ae==null||(Be=Ae.planBannerSubHeadingStyles)===null||Be===void 0?void 0:Be.fontSize)||(Ae==null||(fe=Ae.popupCtaSubTitleFont)===null||fe===void 0?void 0:fe.fontSize),Qt=(Ae==null||(he=Ae.planBannerSubHeadingStyles)===null||he===void 0?void 0:he.fontFamily)||(Ae==null||(b=Ae.popupCtaSubTitleFont)===null||b===void 0?void 0:b.fontFamily),Zt=(Ae==null||(we=Ae.planBannerSubHeadingStyles)===null||we===void 0?void 0:we.fontSize)||(Ae==null||(de=Ae.popupPriceFont)===null||de===void 0?void 0:de.fontSize),gt=(Ae==null||(Ze=Ae.planBannerSubHeadingStyles)===null||Ze===void 0?void 0:Ze.fontFamily)||(Ae==null||(m=Ae.popupPriceFont)===null||m===void 0?void 0:m.fontFamily);const uo=pe=>{let{appliedOfferCode:Ie,amount:Xe,planId:Et,isDeferred:mt}=pe;Ie&&!mt&&Et===(t==null?void 0:t.planId)&&Oe(Xe),(!Ie||mt)&&Oe(null)};(0,e.useEffect)(()=>{Dt(),(0,Zo.Ju)(lt),(0,L.Mf)(uo)},[]);const D=()=>{let pe={isOpen:!0,plansData:u,isCheckout:!0,contentDetails:z};(0,L.uJ)(pe)},g=(t==null||(Ne=t.plansDetail)===null||Ne===void 0?void 0:Ne.displayStrikeThroughPrice)||null,le=(t==null||(qe=t.plansDetail)===null||qe===void 0?void 0:qe.strikeThroughPrice)||null;return e.createElement("div",{className:We?"monetisation-cta-container active-cta":"monetisation-cta-container",ref:xe,style:We?{color:I==null?void 0:I.color,backgroundColor:I==null?void 0:I.backgroundColor}:Te,onMouseOver:()=>{xe.current.style.backgroundColor=I==null?void 0:I.backgroundColor,xe.current.style.color=I==null?void 0:I.color,xe.current.style.border=I==null?void 0:I.border},onMouseOut:()=>{xe.current.style.backgroundColor=We?I==null?void 0:I.backgroundColor:Te==null?void 0:Te.backgroundColor,xe.current.style.color=`${We?I==null?void 0:I.color:Te==null?void 0:Te.color}`,xe.current.style.border=(Te==null?void 0:Te.border)||"unset"},onClick:async pe=>{var Ie,Xe,Et;if(t.type==="NoPlans"){const Lo=await(0,B.fetchAuthenticationStoreData)(),{user:wo}=Lo,De=sessionStorage.getItem("locationCoords"),qt=!!wo,So=!!De,Wo=qt&&!(wo!=null&&wo.hbaMetadata);
1!qt&&!So&&await(0,_l.vM)()&&i().publish("reRender",!0),Wo&&i().publish("showHbaFlow",!0);return}pe.stopPropagation();let mt={id:wt||null,type:Wt,featureDetails:(t==null?void 0:t.featureDetails)||(t==null?void 0:t.features)||null};if((0,w.publishScrollIntoView)(!0),Wt==="more"){D();return}let ze=(0,je.fetchCurrentPlan)(),Ee={planId:ze==null?void 0:ze.planId,planName:ze==null?void 0:ze.title,planType:ze==null?void 0:ze.cycleType,planDesc:ze==null?void 0:ze.description,pageUrl:(Ie=window)===null||Ie===void 0?void 0:Ie.location.href};if(ze){let Lo={ename:E.ANALYTICSEVENTS.PLAN_UPDATE,data:Ee};i().publish("user-analytics",Lo),(0,Z.handleStatusGaCalls)({eventName:"plan_update",subSection:null,type:"plan",reason:ze==null?void 0:ze.title,status:t==null?void 0:t.title,additionalLabel:null,action:"Update Plan",paymentStatus:null,eventCategory:"Subscription",section:"checkout"})}else{let Lo={ename:E.ANALYTICSEVENTS.PLAN_SELECTION,data:Ee};i().publish("user-analytics",Lo),(0,Z.handleStatusGaCalls)({eventName:"plan_selection",subSection:null,type:"plan",reason:t==null?void 0:t.title,status:null,additionalLabel:null,action:"Plan Selection",paymentStatus:null,eventCategory:"Subscription",section:"checkout"})}(0,Z.pushStepToFlow)("plan-selection");let Re=wt;(0,Z.handleUpdatedPlan)({planDetails:mt,plan:t,plans:u,contentDetails:z}),(0,Zo.SJ)({selectedPlanId:Re,planDetails:mt,selectedType:Wt});let Qe={...t};delete Qe.subscriptionPopupFonts;let Fe=(0,Jt.DC)(),ct={section:"checkout",event_label1:t==null?void 0:t.planId,event_label2:t==null?void 0:t.type,event_label3:1,etstamp:Date.now(),logged_in_status:Fe!=null&&Fe.userId?"Yes":"No",subscribed_status:(0,Nl.sm)(),uid:(Fe==null?void 0:Fe.userId)||null,profid:!(Fe==null||(Xe=Fe.profiles)===null||Xe===void 0)&&Xe.length?Fe==null||(Et=Fe.profiles[0])===null||Et===void 0?void 0:Et.profileId:"",subscription_plan:t==null?void 0:t.title,event_value:t==null?void 0:t.amount,payment_status:null},Xt=await(0,N.nf)(),Kt={ecommerce:{currency:tt,value:t==null?void 0:t.amount,items:[{...ct,...Xt}]}};(0,N.Ay)("begin_checkout",Kt,null),(0,N.Ay)("add_to_cart",Kt,null),(0,N.Ay)("view_item",Kt,null),(0,N.Ay)("view_cart",Kt,null);let Bo={currency:tt,items:[{item_id:Re,item_name:t==null?void 0:t.title,price:t==null?void 0:t.amount,quantity:1}]};i().publish("user-analytics",{ename:"add_to_cart",data:Bo})}},p!="default"?e.createElement("div",{tabIndex:0,className:"cta-text-wrapper"},e.createElement("div",{className:"title-container"},e.createElement("p",{className:"title",style:{fontSize:Ve,fontFamily:Ge}},ee&&(Ut!=null&&Ut.title)?Ut==null?void 0:Ut.title:et),e.createElement("p",{className:"sub-title",style:{fontSize:K,fontFamily:Qt}},ee&&(Ut!=null&&Ut.description)?Ut==null?void 0:Ut.description:ce)),ut||g&&le?e.createElement("p",{style:{fontSize:Zt,fontFamily:gt,textWrap:"nowrap",display:"flex",alignItems:"center",gap:"0.3rem"}},e.createElement("span",{className:"strike-price"},e.createElement("span",{className:"strike-through"},`${(0,s.Qn)(tt)} ${At}/${(0,s.ps)(t==null?void 0:t.cycleType,t==null?void 0:t.renewalCyclePeriodMultiplier)}`),e.createElement("span",null,`${(0,s.Qn)(tt)} ${ut||le}/${(0,s.ps)(t==null?void 0:t.cycleType,t==null?void 0:t.renewalCyclePeriodMultiplier)}`))):At?e.createElement("span",null,!(Ut==null||(ht=Ut.discountText)===null||ht===void 0)&&ht.trim()?e.createElement("p",{className:"plan-discount-text",style:{background:(S==null||(He=S.layout)===null||He===void 0||(Ct=He.settings)===null||Ct===void 0?void 0:Ct.discountBadgeBgColor)||"#03a775",color:(S==null||($e=S.layout)===null||$e===void 0||(Pe=$e.settings)===null||Pe===void 0?void 0:Pe.discountBadgeTextColor)||"#ffffff"}},Ut.discountText):null,e.createElement("p",{style:{fontSize:Zt,fontFamily:gt,textWrap:"nowrap"}},`${(0,s.Qn)(tt)} ${ut||At}${t!=null&&t.cycleType?`/${(0,s.ps)(t==null?void 0:t.cycleType,t==null?void 0:t.renewalCyclePeriodMultiplier)}`:""}`)):""):e.createElement("div",{className:"more-option-cta",onClick:()=>D()},et||"More purchase options"))},_i=(0,fi.A)(gi);var wl=o(23870);const yi=t=>{let a=t==null?void 0:t.metadataMap,p=t==null?void 0:t.moneisationCta,u=t==null?void 0:t.layoutSettings;const S=(t==null?void 0:t.contentData)||[],[O,z]=(0,e.useState)([]),[R,ie]=(0,e.useState)([]),[v,k]=(0,e.useState)(null),[C,X]=(0,e.useState)(null),re=async fe=>{var he,b,we,de,Ze,m,Ne,qe,ht,Ct,He,Pe,$e,Te,I,et,ce,tt,At,wt,Wt,Ae,Ut,ee;const xe=await(0,B.fetchAuthenticationStoreData)(),{user:We}=xe,Oe=!!sessionStorage.getItem("locationCoords")||(We==null?void 0:We.hbaMetadata),lt=(t==null||(he=t.layoutSettings)===null||he===void 0?void 0:he.showCreateAccount)&&!(t!=null&&t.isRokuBox),Dt=t==null||(b=t.layoutSettings)===null||b===void 0?void 0:b.showNoPlansCta;let Ve=(0,G.Nc)((de=window)===null||de===void 0||(we=de.location)===null||we===void 0?void 0:we.href),Ge=Ve==="TVE"||Ve==="tve",K=[...fe||[]];const Qt={id:"FreeAccount",title:((qe=window)===null||qe===void 0||(Ne=qe.app_data)===null||Ne===void 0||(m=Ne.appcmsMain)===null||m===void 0||(Ze=m.genericMessages)===null||Ze===void 0?void 0:Ze.createFreeAccountTitle)||"Create Free Account",subTitle:((Pe=window)===null||Pe===void 0||(He=Pe.app_data)===null||He===void 0||(Ct=He.appcmsMain)===null||Ct===void 0||(ht=Ct.genericMessages)===null||ht===void 0?void 0:ht.createFreeAccountSubtitle)||"Get Access",type:"FreeAccount",subscriptionPopupFonts:t==null?void 0:t.subscriptionPopupFonts,planId:"FreeAccount"},Zt={title:((et=window)===null||et===void 0||(I=et.app_data)===null||I===void 0||(Te=I.appcmsMain)===null||Te===void 0||($e=Te.genericMessages)===null||$e===void 0?void 0:$e.noPlansTitle)||"
1NO Plans Available",subTitle:Oe?((wt=window)===null||wt===void 0||(At=wt.app_data)===null||At===void 0||(tt=At.appcmsMain)===null||tt===void 0||(ce=tt.genericMessages)===null||ce===void 0?void 0:ce.noPlansSubtitleTwo)||" ":((ee=window)===null||ee===void 0||(Ut=ee.app_data)===null||Ut===void 0||(Ae=Ut.appcmsMain)===null||Ae===void 0||(Wt=Ae.genericMessages)===null||Wt===void 0?void 0:Wt.noPlansSubtitleOne)||"Share your location to check plans",type:"NoPlans",subscriptionPopupFonts:t==null?void 0:t.subscriptionPopupFonts,planId:"NoPlans"},gt=!K.some(D=>{var g;return((g=D.type)===null||g===void 0?void 0:g.toUpperCase())==="SVOD"}),uo=!K.some(D=>{var g;return["BUY","RENT"].includes((g=D.type)===null||g===void 0?void 0:g.toUpperCase())});return(K.length===0||gt&&uo)&&!Ge?(Dt&&K.unshift(Zt),lt&&!We&&K.splice(1,0,Qt)):lt&&!We&&K.unshift(Qt),K},oe=async()=>{let fe=(0,je.handlePlanStructure)({metadataMap:a,plans:t==null?void 0:t.plans,subscriptionPopupFonts:t==null?void 0:t.subscriptionPopupFonts});ie(fe);let he=await(0,je.formulatePlansStructure)({plans:t==null?void 0:t.plans,monetisationCTA:p,metadataMap:a,subscriptionPopupFonts:t==null?void 0:t.subscriptionPopupFonts,isTvePlan:t==null?void 0:t.isTvePlan,isCheckout:t==null?void 0:t.isCheckout}),b=await re(he);z(b);let we=(0,je.fetchCurrentPlan)();const de=b==null?void 0:b.some(Ne=>(Ne==null?void 0:Ne.id)===(we==null?void 0:we.planId)||(Ne==null?void 0:Ne.id)===(we==null?void 0:we.id)),Ze=b==null?void 0:b.find(Ne=>["SVOD","Svod"].includes(Ne==null?void 0:Ne.type));if((0,wl.Gx)()&&Ze)k(Ze),(0,Z.updateSelectedPlans)(Ze,t==null?void 0:t.plans,S),(0,cl.J)(!1),(0,wl.uT)();else if(we&&(de||(we==null?void 0:we.type)==="TVE"))k(we);else if((b==null?void 0:b.length)>0){var m;k(b[0]),(b==null||(m=b[0])===null||m===void 0?void 0:m.type)==="FreeAccount"&&(i().publish("showFreePlan",!0),sessionStorage.setItem("currentPlan",JSON.stringify(b[0])))}C||Be(b)};(0,e.useEffect)(()=>{oe()},[t==null?void 0:t.plans]);const Be=async fe=>{var he,b,we;X(!0);let de=(0,je.fetchCurrentPlan)(),Ze={planId:de==null?void 0:de.planId,planName:de==null?void 0:de.title,planType:de==null?void 0:de.cycleType,planDesc:de==null?void 0:de.description,pageUrl:(he=window)===null||he===void 0?void 0:he.location.href};const m=m||fe[0];if(de){let et={ename:E.ANALYTICSEVENTS.PLAN_UPDATE,data:Ze};i().publish("user-analytics",et),(0,Z.handleStatusGaCalls)({eventName:"plan_update",subSection:null,type:"plan",reason:de==null?void 0:de.title,status:m==null?void 0:m.title,additionalLabel:null,action:"Update Plan",paymentStatus:null,eventCategory:"Subscription",section:"checkout"})}else{let et={ename:E.ANALYTICSEVENTS.PLAN_SELECTION,data:Ze};i().publish("user-analytics",et),(0,Z.handleStatusGaCalls)({eventName:"plan_selection",subSection:null,type:"plan",reason:m==null?void 0:m.title,status:null,additionalLabel:null,action:"Plan Selection",paymentStatus:null,eventCategory:"Subscription",section:"checkout"})}let Ne=(0,Jt.DC)(),qe={section:"checkout",event_label1:m==null?void 0:m.planId,event_label2:m==null?void 0:m.type,event_label3:1,etstamp:Date.now(),logged_in_status:Ne!=null&&Ne.userId?"Yes":"No",subscribed_status:(0,Nl.sm)(),uid:(Ne==null?void 0:Ne.userId)||null,profid:!(Ne==null||(b=Ne.profiles)===null||b===void 0)&&b.length?Ne==null||(we=Ne.profiles[0])===null||we===void 0?void 0:we.profileId:"",subscription_plan:m==null?void 0:m.title,event_value:m==null?void 0:m.amount,payment_status:null},ht=await(0,N.nf)(),Ct={ecommerce:{currency:m==null?void 0:m.currency,value:m==null?void 0:m.amount,items:[{...qe,...ht}]}};(0,N.Ay)("begin_checkout",Ct,null),(0,N.Ay)("add_to_cart",Ct,null),(0,N.Ay)("view_item",Ct,null),(0,N.Ay)("view_cart",Ct,null);const He=(0,zo.wR)(),Pe={content_ids:m!=null&&m.planId?[m.planId]:void 0,content_name:m==null?void 0:m.title,content_type:"subscription",content_category:"subscription",currency:m==null?void 0:m.currency,value:m==null?void 0:m.amount,num_items:1,checkout:!0};(0,zo.w_)("FB",tl.$8.INITIATE_CHECKOUT,Pe,He),(0,zo.w_)("PIXEL",tl.DD.INITIATE_CHECKOUT,Pe,He);const $e=(0,zo.wR)(),Te={content_ids:m!=null&&m.planId?[m.planId]:void 0,content_name:m==null?void 0:m.title,content_type:"subscription",content_category:"subscription",currency:m==null?void 0:m.currency,value:m==null?void 0:m.amount,num_items:1,country:m
1==null?void 0:m.countryCode,platform:"Web"};(0,zo.w_)("FB",tl.$8.ADD_TO_CART,Te,$e),(0,zo.w_)("PIXEL",tl.DD.ADD_TO_CART,Te,$e);let I={currency:m==null?void 0:m.currency,items:[{item_id:m==null?void 0:m.planId,item_name:m==null?void 0:m.title,price:m==null?void 0:m.amount,quantity:1}]};i().publish("user-analytics",{ename:"add_to_cart",data:I})};return e.createElement(e.Fragment,null,e.createElement("div",{className:"cta-container"},O!=null&&O.length?O==null?void 0:O.map((fe,he)=>{var b,we;let de="primary";he>0&&(de="secondary"),(fe==null?void 0:fe.type)==="more"&&(de="default");let Ze=!1;return((v==null?void 0:v.planId)===(fe==null?void 0:fe.planId)||(v==null?void 0:v.id)===(fe==null?void 0:fe.planId))&&(v==null||(b=v.type)===null||b===void 0?void 0:b.toLowerCase())===(fe==null||(we=fe.type)===null||we===void 0?void 0:we.toLowerCase())&&(Ze=!0),e.createElement(_i,{isActive:Ze,parentModuleData:t==null?void 0:t.parentModuleData,key:he,plan:fe,ctaStyleType:de,plans:R,contentDetails:S})}):e.createElement(e.Fragment,null)),t!=null&&t.featureListToShow?e.createElement(mi,{layoutSettings:u,subscriptionPopupFonts:t==null?void 0:t.subscriptionPopupFonts}):e.createElement(e.Fragment,null))},Hl=t=>{var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze,m,Ne,qe,ht,Ct,He,Pe,$e;const Te=(0,Rt.Zp)();let I=t==null||(a=t.moduleData)===null||a===void 0?void 0:a.metadataMap,et=!(t==null||(u=t.moduleData)===null||u===void 0||(p=u.contentData)===null||p===void 0)&&p.length?t==null||(S=t.moduleData)===null||S===void 0?void 0:S.contentData[0]:null,ce=t==null?void 0:t.checkoutModuleData,tt=ce==null||(O=ce.layout)===null||O===void 0?void 0:O.settings,At=t==null?void 0:t.monetisationCta,wt=(t==null?void 0:t.isVideoPage)||!1,Wt=(t==null?void 0:t.isSeriesPage)||!1,Ae=t==null?void 0:t.videoData,Ut=(R=window)===null||R===void 0||(z=R.app_data)===null||z===void 0?void 0:z.appcmsMain.monetizationConfig.allowBothSvodTveActivation,ee=Ae?Ae==null?void 0:Ae.plans:t==null||(ie=t.moduleData)===null||ie===void 0?void 0:ie.plans,xe=t==null||(k=t.checkoutModuleData)===null||k===void 0||(v=k.layout)===null||v===void 0?void 0:v.settings,We=(t==null?void 0:t.isTveLoggedIn)||!1,Me=(t==null||(re=t.moduleData)===null||re===void 0||(X=re.layout)===null||X===void 0||(C=X.settings)===null||C===void 0?void 0:C.showCreateAccount)||!1,ut=(t==null||(fe=t.moduleData)===null||fe===void 0||(Be=fe.layout)===null||Be===void 0||(oe=Be.settings)===null||oe===void 0?void 0:oe.showNoPlansCta)||!1;const{popupHeadingTitleFont:Oe,popupCtaTitleFont:lt,popupCtaSubTitleFont:Dt,popupPriceFont:Ve,popupDetailFont:Ge,ctaHeadingStyles:K,featureItemStyles:Qt,planBannerHeadingStyles:Zt,planBannerSubHeadingStyles:gt,planBannerPriceStyles:uo}=(0,c.getFontsStyles)((t==null||(b=t.moduleData)===null||b===void 0||(he=b.layout)===null||he===void 0?void 0:he.fontSetting)||(t==null||(de=t.checkoutModuleData)===null||de===void 0||(we=de.layout)===null||we===void 0?void 0:we.fontSetting));let D={popupHeadingTitleFont:Oe,popupCtaTitleFont:lt,popupCtaSubTitleFont:Dt,popupPriceFont:Ve,popupDetailFont:Ge,ctaHeadingStyles:K,featureItemStyles:Qt,planBannerHeadingStyles:Zt,planBannerSubHeadingStyles:gt,planBannerPriceStyles:uo};const[g,le]=(0,e.useState)([]),pe=(0,e.useRef)([]);let Ie=JSON.parse(sessionStorage.getItem("toShowTve")),Xe=!!(!((Ne=Ae||et)===null||Ne===void 0||(m=Ne.plans)===null||m===void 0||(Ze=m.filter(_=>(_==null?void 0:_.type)==="TVE"))===null||Ze===void 0)&&Ze.length&&!We);const[Et,mt]=(0,e.useState)(Xe),[ze,Ee]=(0,e.useState)([]),[Re,Qe]=(0,e.useState)(!1),[Fe,ct]=(0,e.useState)(!1),[Xt,Kt]=(0,e.useState)("");let{remainingPreviewTime:Bo}=(0,B.qL)();const Lo=({metadataMap:_,subscriptionPopupFonts:V})=>({title:(_==null?void 0:_.loginCtaTveProvideTitle)||"Login with TVE",subTitle:(_==null?void 0:_.loginCtaTveProviderDescription)||"Free access with your TV credentials",type:"TVE",subscriptionPopupFonts:V,planId:"TVE"});(0,e.useEffect)(()=>{pe.current=g},[g]),(0,e.useEffect)(()=>{i().publish("is-content-tve-available",Et)},[Et]);const wo=_=>{var V,nt;return(_==null?void 0:_.length)===1&&(((V=_[0])===null||V===void 0?void 0:V.planId)==="FREE_LOGIN"||((nt=_[0])===null||nt===void 0?void 0:nt.id)==="FREE_LOGIN")},De=_=>{_!=null&&_.length&&!wo(_)&&sessionStorage.setItem("current-associated-plans",JSON.stringify(_))},qt=async()=>{let _=ee;if(!_){const{plansDetail:V}=await(0,Al.m)();V!=null&&V.allPlans&&(_=V.allPlans)}return _},So=async()=>{var _;if(!((_=pe.current)===null||_===void 0)&&_.length&&!wo(pe.current))return pe.current;const V=await qt(),nt=(0,ko.O)(sessionStorage.getItem("current-associated-plans")),Lt=V!=null&&V.length?(0,je.fromulatePlanIds)(V):[],ot=_t
1=>{if(!(_t!=null&&_t.length))return!0;if(!(Lt!=null&&Lt.length))return!(V!=null&&V.length);const Po=_t.map(St=>(St==null?void 0:St.id)||(St==null?void 0:St.planId)).filter(Boolean);return Po.length>0&&Po.every(St=>Lt.includes(St))};return nt!=null&&nt.length&&!wo(nt)&&ot(nt)?nt:V!=null&&V.length?V:[]},Wo=(_,V)=>{if(!(V!=null&&V.length))return!1;if(!(_!=null&&_.length)||Ae)return!0;const nt=_.map(ot=>(ot==null?void 0:ot.id)||(ot==null?void 0:ot.planId)).join(","),Lt=V.map(ot=>(ot==null?void 0:ot.id)||(ot==null?void 0:ot.planId)).join(",");return nt!==Lt},J=()=>{let _=(0,s.js)();_!=null&&_.TVE&&(t!=null&&t.isCheckout||Xe)&&(mt(!0),Xe=!0),_!=null&&_.TVE&&Ie!=null&&Ie!=null&&!Ie&&mt(!1)},it=()=>{var _,V;const nt=((V=window)===null||V===void 0||(_=V.location)===null||_===void 0?void 0:_.search)||"",Lt=new URLSearchParams(nt),ot=Lt.get("user")==="registered",_t=!!Lt.get("tveCode");return ot||_t},xt=(_,V,nt)=>{let Lt=_==null?void 0:_.map(ot=>ot==null?void 0:ot.monetizationModel);return!!(nt&&V&&(nt=!1,mt(!1),Lt.length===1))},Tt=async()=>{try{var _,V;let Lt=await(0,je.fetchTveLoggedIn)(),{hba:ot}=await(0,s.CX)(),_t=ze!=null&&ze.length?wt||Wt?ze:[]:ee,Po=xt(_t,Lt,Xe);const St=await(0,je.fetchCurrentPlan)();if(Po){ct(!0),(0,w.publishAppLoading)(!1);return}De(_t);const Ht=JSON.parse(sessionStorage.getItem("locationCoords")||"{}");let Eo={latitude:ot?ot==null?void 0:ot.latitude:Ht==null?void 0:Ht.latitude,longitude:ot?ot==null?void 0:ot.longitude:Ht==null?void 0:Ht.longitude},so=(0,s.js)();if(Ae&&!(ze!=null&&ze.length)){let Mt=(0,je.formulateAllPlanIds)(Ae);Mt&&(_t=await(0,_l.gs)(Mt,Eo))}let yo=(0,G.Nc)((V=window)===null||V===void 0||(_=V.location)===null||_===void 0?void 0:_.href);if(yo){if(yo==="TVE"||yo==="tve"){let Mt=Lo({metadataMap:I,subscriptionPopupFonts:D});(0,Z.updateSelectedPlans)(Mt,[],et),le([Mt]),De([Mt]),J();return}if(t!=null&&t.isCheckout){let Mt=await(0,_l.jr)(yo,!0);if(Mt!=null&&Mt.length){let Gt=(0,je.structuredPlan)(Mt[0]);_t=Mt,(0,Z.updateSelectedPlans)(Gt,_t,et),le(_t),De(_t);return}}else{let Mt=ee==null?void 0:ee.filter(Gt=>(Gt==null?void 0:Gt.id)===yo);if(Mt!=null&&Mt.length){let Gt=(0,je.structuredPlan)(Mt[0]);(0,Z.updateSelectedPlans)(Gt,ee,et),le(_t),De(_t);return}}}else{const Mt=await _o();if(t!=null&&t.isCheckout||Mt){if(so!=null&&so.SVOD&&!it()){const Gt=sessionStorage.getItem("contentPlanIds");Gt!=="null"&&(_t=Gt&&Gt!="svodAll"?await(0,_l.jr)(Gt,!1,!0):await Pt())}J()}}if(_t!=null&&_t.length){let Mt=(0,je.fetchCurrentPlan)();const Gt=_t.filter(x=>(x==null?void 0:x.id)===(Mt==null?void 0:Mt.planId)||(x==null?void 0:x.id)===(Mt==null?void 0:Mt.id)),bt=(0,wl.Gx)();bt&&(0,wl.uT)();const eo=bt&&_t.find(x=>(x==null?void 0:x.monetizationModel)==="SVOD"||(x==null?void 0:x.type)==="SVOD");if(eo)(0,Z.updateSelectedPlans)((0,je.structuredPlan)(eo,D),_t,et),(0,cl.J)(!1);else if(Mt&&(Gt.length||(Mt==null?void 0:Mt.type)=="TVE"))(0,Z.updateSelectedPlans)(Mt,_t,et);else if(St.type==="FreeAccount")(0,Z.updateSelectedPlans)(St,_t);else{let x=(0,je.structuredPlan)(_t[0],D);(0,Z.updateSelectedPlans)(x,_t,et)}le(_t),De(_t)}else if(St.type==="FreeAccount")(0,Z.updateSelectedPlans)(St,_t);else{var nt;if(so!=null&&so.TVE&&Xe){mt(!0),(0,w.publishAppLoading)(!1);return}if((0,w.publishAppLoading)(!1),it()||!(so!=null&&so.SVOD)||Xe)return;(0,w.publishErrorUpdate)((ce==null||(nt=ce.metadataMap)===null||nt===void 0?void 0:nt.noPlansBody)||"Plans not available")}}catch(Lt){console.log(Lt)}finally{Qe(!0)}},Nt=async _=>{const V={isOpen:!1};if((_==null?void 0:_.planId)==="FREE_LOGIN"){sessionStorage.setItem("currentPlan",JSON.stringify(_)),(0,Zo.Dl)(!1),le([_]);return}if(!_)return;let nt=await So();(0,Z.updateSelectedPlans)(_,nt,et),(0,L.uJ)(V);let Lt=nt;if(Ae){const ot=(0,je.formulateAllPlanIds)(Ae);if(ot){const _t=await(0,_l.jr)(ot);_t!=null&&_t.length&&(Lt=_t)}}Wo(pe.current,Lt)&&(le(Lt),De(Lt))},po=_=>{_!=null&&_.length?Ee(_):Tt()},vo=async()=>{var _,V,nt,Lt,ot,_t,Po,St,Ht;let{hba:Eo}=await(0,s.CX)(),so=(Po=window)===null||Po===void 0||(_t=Po.app_data)===null||_t===void 0||(ot=_t.appcmsMain)===null||ot===void 0?void 0:ot.apiConfig;const yo=JSON.parse(sessionStorage.getItem("locationCoords")||"{}");let Mt={latitude:(_=(V=Eo==null?void 0:Eo.latitude)!==null&&V!==void 0?V:yo==null?void 0:yo.latitude)!==null&&_!==void 0?_:null,longitude:(nt=(Lt=Eo==null?void 0:Eo.longitude)!==null&&Lt!==void 0?Lt:yo==null?void 0:yo.longitude)!==null&&nt!==void 0?nt:null},Gt=(so==null?void 0:so.entitlementBaseUrl)+"/video/status",bt=await(0,s.gf)(x=>x),eo=Wt?Ae==null?void 0:Ae.id:et==null||(St=et.gist)===null||St===void 0?void 0:St.id;(Ht=(0,$.default)())===null||Ht===void 0||Ht.getEntitlementData(eo,bt,Gt,Mt).then(async x=>{var go,mo,jt,to,To;let oo=(x==null||(go=x.response)===null||go===void 0?void 0:go.plans)||(x==null||(mo=x.data)===null||mo===void 0?void 0:mo.plans),$o=(To=(x==null?void 0:x.response)||(x==null?void 0:x.data))===null||To===void 0||(to=To.video)===null||to===void 0||(jt=to.monetizationModels)===null||jt===void 0?void 0:jt.map(Co=>Co==null?void 0:Co.type);await(0,Z.checkForTveEntitlement)({monetizationModels:$o,entitlementResponse:(x==null?void 0:x.response)||(x==null?void 0:x.data),toTerminate:!1,playerInstance:{}}),oo!=null&&oo.length?Ee(oo):Tt()}).catch(async x=>{var go,mo,jt;let to=x==null||(mo=x.response)===null||mo===void 0||(go=mo.data)===null||go===void 0?void 0:go.plans,To=to==null?void 0:to.map(oo=>oo==null?void 0:oo.monetizationModel);await(0,Z.checkForTveEntitlement)({monetizationModels:To,entitlementResponse:x==null||(jt=x.response)===null||jt===void 0?void 0:jt.data,toTerminate:!1,playerInstance:{}}),to!=null&&to.length?Ee(to):Tt()})},vt=_=>{Te(0)};(0,e.useEffect)(()=>
1{if(i().subscribe("reRender",vt),(0,Zo.PG)(Nt),(0,Zo.zS)(po),!wt&&!Wt)Tt();else{var _,V,nt,Lt;let ot=(Lt=window)===null||Lt===void 0||(nt=Lt.app_data)===null||nt===void 0||(V=nt.appcmsMain)===null||V===void 0||(_=V.features)===null||_===void 0?void 0:_.free_preview;(!(ot!=null&&ot.isFreePreview)||Bo<2)&&vo()}return i().subscribe("authz-failed",ot=>{ot.success||(ct(!0),Kt(ot))}),()=>sessionStorage.removeItem("current-associated-plans")},[]),(0,e.useEffect)(()=>{if((wt||Wt)&&ze!=null&&ze.length){var _;Xe=!!(!(ze==null||(_=ze.filter(V=>(V==null?void 0:V.type)==="TVE"||(V==null?void 0:V.monetizationModel)==="TVE"))===null||_===void 0)&&_.length),mt(Xe),Tt()}},[ze]);const bo=_=>{let V=!1;return(_==null?void 0:_.length)>0&&(V=(0,je.isTveModelOnly)(_==null?void 0:_.map(nt=>(nt==null?void 0:nt.monetizationModel)||(nt==null?void 0:nt.type)))),V},_o=async()=>await(0,je.fetchTveLoggedIn)()?!bo(ze):!1,Oo=bo(g!=null&&g.length?g:ee);(0,e.useEffect)(()=>{Fe&&Oo&&(0,cl.J)(!0)},[Fe]);const xo=((g==null?void 0:g.length)||Et||Me||ut)&&Re&&(Ut&&Oo?!Fe:!0),ao=(0,G.Nc)((ht=window)===null||ht===void 0||(qe=ht.location)===null||qe===void 0?void 0:qe.href),Mo=typeof window!="undefined"&&new URLSearchParams((He=window)===null||He===void 0||(Ct=He.location)===null||Ct===void 0?void 0:Ct.search).get("device")==="roku_box";return e.createElement(e.Fragment,null,!ao&&e.createElement(e.Fragment,null,e.createElement("div",{className:"plans-wrapper-container"},e.createElement("div",{style:K},(t==null||(Pe=t.localisation)===null||Pe===void 0?void 0:Pe.getAccessText)||(I==null?void 0:I.getAccessText)),(tt==null?void 0:tt.showComparePlanCta)===!1||Mo?null:e.createElement("div",{onClick:()=>{var _,V;let nt=ze!=null&&ze.length?ze:ee,Lt=(0,je.fromulatePlanIds)(nt),ot=((_=location)===null||_===void 0?void 0:_.pathname)+((V=location)===null||V===void 0?void 0:V.search);(0,ft.setStorageItem)("isRedirected",{path:ot,redirect:!0,isDetailPage:!0,isCheckout:t==null?void 0:t.isCheckout}),Lt!=null&&Lt.length&&sessionStorage.setItem("contentPlanIds",Lt),(0,w.publishRedirect)(xe==null?void 0:xe.comparePlanPagePath),(0,w.publishAppLoading)(!0)},className:"compare-plans"},t==null||($e=t.localisation)===null||$e===void 0?void 0:$e.comparePlansText)),e.createElement("div",{className:"tve-error-message"},Fe?Xt||(tt==null?void 0:tt.notAuthorizeTVEText)||"You are not authorize to watch this content with current TV provider":e.createElement(e.Fragment,null))),xo?e.createElement(yi,{featureListToShow:t==null?void 0:t.featureListToShow,parentModuleData:t==null?void 0:t.parentModuleData,isCheckout:t==null?void 0:t.isCheckout,layoutSettings:xe,plans:g,metadataMap:I,subscriptionPopupFonts:D,moneisationCta:At,isTvePlan:Et,contentData:et,isRokuBox:Mo}):e.createElement(e.Fragment,null))};var hi=o(14546);const wi=()=>{var t,a,p,u,S,O;const[z,R]=(0,e.useState)(!1),ie=k=>{R(k),setTimeout(()=>{R(!1)},1e4)};let v=((O=window)===null||O===void 0||(S=O.app_data)===null||S===void 0||(u=S.appcmsMain)===null||u===void 0||(p=u.brand)===null||p===void 0||(a=p.cta)===null||a===void 0||(t=a.primary)===null||t===void 0?void 0:t.textColor)||"#FFFFFF";return(0,e.useEffect)(()=>{(0,w.subscribeErrorUpdate)(ie)},[]),e.createElement(e.Fragment,null,z?e.createElement("div",{className:"error-wrapper site-cta-background-color site-cta-color",style:{whiteSpace:"pre-line"}},(0,n.$A)(v)," ",z):e.createElement(e.Fragment,null))};var Ei=o(29180);const Si=t=>e.createElement(Ei.A,t),bi=(0,_e.A)(Si);var yl=o(76846),vl=o(76910),El=o(10513),Rl=o(23823);const Pi=1e4,Ci=200;function Di({providers:t,regCode:a,skipBtnText:p,ctaBackgroundColor:u,chooseProviderTxt:S,chooseProviderDescription:O,mvpdBgColor:z="#fff",hideTvProviderCta:R=!1}){var ie,v,k,C,X,re,oe,Be,fe,he,b,we;const de=(0,Rt.Zp)(),[Ze,m]=(0,e.useState)("");let Ne=window.app_data.appcmsPlatform.tveSettings.urlScheme,qe=window.app_data.appcmsPlatform.tveSettings.requestorID;const ht=((C=window)===null||C===void 0||(k=C.app_data)===null||k===void 0||(v=k.appcmsPlatform)===null||v===void 0||(ie=v.tveSettings)===null||ie===void 0?void 0:ie.version)||"v1",Ct=((Be=window)===null||Be===void 0||(oe=Be.app_data)===null||oe===void 0||(re=oe.appcmsPlatform)===null||re===void 0||(X=re.tveSettings)===null||X===void 0?void 0:X.tveProvider)||"adobe",He=ce=>{for(let tt=0;tt<t.length;tt++)if(ce.identifier==t[tt].ID||ce.identifier==t[tt].id)return!0;return!1},Pe=ce=>{const tt=window.app_data.countryCode;for(let At=0;At<t.length;At++)if(tt==t[At].countryCode){for(let wt=0;wt<t[At].idp.length;wt++)if(ce.identifier==t[At].idp[wt].shortName)return!0}return!1},$e=async()=>{const ce=Date.now()+Pi;for(;!(0,Jt.DC)()&&Date.now()<ce;)await new Promise(tt=>setTimeout(tt,Ci))},Te=async ce=>{var tt,At;!a&&Ct=="toolbox"&&i().publish("apploading",!0),R&&(i().publish("beforeTveConnectionUserCreated",!0),await $e());let Wt=(At=window)===null||At===void 0||(tt=At.location)===null||tt===void 0?void 0:tt.host;Wt.includes("www.")&&(Wt=Wt.replace("www.",""));const Ae=new URLSearchParams;if(Ae.append("mvpd",ce),Ae.append("domainName",Wt),a){var Ut,ee;const Me=U.default.get("Tve_Access_token");let ut={requestor_id:qe,mso_id:ce,reg_code:a,noflash:!0,domain_name:Wt,redirect_url:encodeURI((ee=window)===null||ee===void 0||(Ut=ee.location)===null||Ut===void 0?void 0:Ut.origin)};if(ht=="v1"){const Oe=new URLSearchParams(ut);window.open(`${Ne}/api/v1/authenticate?${Oe}`,"tvelogin","popup"),de("/")}else{const Oe=`${Ne}/api/v2/${qe}/sessions/${a}`,lt=new URLSearchParams(window.location.search).get("device")==="roku_box";lt&&sessionStorage.setItem("isRokuBox","tve");let Dt;return lt?Dt=`${window.location.origin}/thankyou`:Dt=`${window.location.origin}${window.location.pathname}?isTveUser=Authenticated`,Ae.append("redirectUrl",encodeURI(Dt)),(0,r.A)({method:"post",url:Oe,headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Bearer ${Me}`},data:Ae}).then(Ve=>{if(Ve.data.actionName=="authenticate"&&Ve.data.reasonType=="none"){const Ge=Ve.data.url;window.location.href=`${Ne}${Ge}`}else Ve.data.actionName=="authorize"&&Ve.data.reasonType=="authenticated"&&de("/")}
1).catch(Ve=>{if(Ve.response){var Ge,K;logger("Error Message GET Session TVE Dialog:"+((K=Ve.response)===null||K===void 0||(Ge=K.data)===null||Ge===void 0?void 0:Ge.message),"info"),logger("Error Code GET Session TVE Dialog:"+Ve.response.status,"info"),logger("Error Data GET Session TVE Dialog:"+JSON.stringify(Ve.response.data),"info")}else Ve.request?logger("No response received GET Session TVE Dialog:"+Ve.request,"info"):logger("Axios Error GET Session TVE Dialog:"+Ve.message,"info")})}}else{if(Ct=="adobe")if(ht=="v1"){var xe,We;const Me=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let ut={pageUrl:Me==null?void 0:Me.pageUrl,mvpdProvider:ce};m(ce),(We=window)===null||We===void 0||(xe=We.AE)===null||xe===void 0||xe.setSelectedProvider(ce);let Oe={ename:E.ANALYTICSEVENTS.TVE_LOGIN_INITIATE,data:ut};i().publish("user-analytics",Oe)}else{localStorage.setItem("selectedMvpdId",ce);const Me=new URLSearchParams(window.location.search).get("device")==="roku_box";Me&&sessionStorage.setItem("isRokuBox","tve");let ut;Me?ut=`${window.location.origin}/thankyou`:ut=`${window.location.origin}${window.location.pathname}?isTveUser=Authenticated`,Ae.append("redirectUrl",ut),(0,vl.$A)(Ae,ce)}if(Ct=="toolbox"){m(ce),sessionStorage.setItem("toolboxSelectedMvpdId",ce),(0,Rl.$X)("TVE_PROVIDER_SELECTED",ce),(0,Rl.$X)("TVE_LOGIN_INITIATE",ce);const Me=(0,Rl.Ul)(),ut=window.app_data.countryCode;(0,El.$u)(ce,Me,ut)}}};let I=(we=window)===null||we===void 0||(b=we.app_data)===null||b===void 0||(he=b.appcmsPlatform)===null||he===void 0||(fe=he.tveSettings)===null||fe===void 0?void 0:fe.providers;const et=async()=>{if((0,Jt.DC)()){const tt=document.getElementById("tveProviderSecureWall"),At=document.getElementById("initiateTveBtn");tt&&(tt.style.display="none"),At&&(At.style.display="none")}};return(0,e.useEffect)(()=>(et(),i().subscribe("showTveData",et),()=>{i().unsubscribe("showTveData",et)}),[]),e.createElement("div",{className:"providersWrapper"},e.createElement("div",{className:"providerList"},t.length>0&&(I==null?void 0:I.map(ce=>{if(Ct=="adobe"?He(ce):Pe(ce))return e.createElement("div",{tabIndex:0,className:Ze==ce.identifier?"providerItem selected":"providerItem",onClick:()=>{Te(ce.identifier)},style:{backgroundColor:z}},e.createElement("div",{className:Ze==ce.identifier?"tick tick-select":"tick"},(0,n.Vw)()),e.createElement("div",{style:{margin:"auto"}},e.createElement("img",{tabIndex:0,src:ce.imageUrl,alt:ce.title})))})),e.createElement("div",{className:"disable-overlay",id:"tveProviderSecureWall"})))}const Ti=Di;var Kl=o(21272),Ii=o(69330),Fl=o(47317),Gl=o(37435),Ai=o(47311),Ni=o(54011),Li=o(46054);function Mi(t){var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze;let m=window.app_data.appcmsPlatform.tveSettings.urlScheme,Ne=window.app_data.appcmsPlatform.tveSettings.softwareStatement,qe=window.app_data.appcmsPlatform.tveSettings.requestorID,ht=t==null||(a=t.module)===null||a===void 0?void 0:a.metadataMap,Ct=t==null||(S=t.module)===null||S===void 0||(u=S.layout)===null||u===void 0||(p=u.settings)===null||p===void 0?void 0:p.activeCTAColor,He=t==null||(R=t.module)===null||R===void 0||(z=R.layout)===null||z===void 0||(O=z.settings)===null||O===void 0?void 0:O.mvpdBgColor,Pe=(v=window)===null||v===void 0||(ie=v.app_data)===null||ie===void 0?void 0:ie.appcmsPlatform.tveSettings.resourceIds;const[$e,Te]=(0,e.useState)([]),[I,et]=(0,e.useState)(!1),[ce,tt]=(0,e.useState)([]),[At,wt]=(0,e.useState)(!1),[Wt,Ae]=(0,e.useState)(!1),[Ut,ee]=(0,e.useState)(""),xe=(0,e.useRef)({}),We=(0,Rt.Zp)(),Me=window.location.pathname.includes("checkout")?"/":window.location.pathname,ut=(re=window)===null||re===void 0||(X=re.app_data)===null||X===void 0||(C=X.appcmsPlatform)===null||C===void 0||(k=C.tveSettings)===null||k===void 0?void 0:k.userMetadataEnabled,Oe=((he=window)===null||he===void 0||(fe=he.app_data)===null||fe===void 0||(Be=fe.appcmsPlatform)===null||Be===void 0||(oe=Be.tveSettings)===null||oe===void 0?void 0:oe.version)||"v1",lt=((Ze=window)===null||Ze===void 0||(de=Ze.app_data)===null||de===void 0||(we=de.appcmsPlatform)===null||we===void 0||(b=we.tveSettings)===null||b===void 0?void 0:b.tveProvider)||"adobe",Dt=async()=>{let g=new URLSearchParams(window.location.search).get("user"),le=localStorage.getItem("entitlementToken"),pe=JSON.parse(le),Ie=(pe==null?void 0:pe.canAuthenticate)||null;if(g==="registered"||Ie){var Xe,Et,mt;Ie&&setTimeout(()=>{Dt()},4e3),et(!0),(Et=window)===null||Et===void 0||(Xe=Et.AE)===null||Xe===void 0||Xe.getAuthentication();let ct=(0,Fl.DC)();!(ct==null||(mt=ct.tveMetadata)===null||mt===void 0)&&mt.userId&&Ie&&et(!1)}else{var ze;if(!((ze=window)===null||ze===void 0)&&ze.AE){var Ee,Re,Qe,Fe;(Fe=window)===null||Fe===void 0||(Qe=Fe.AE)===null||Qe===void 0||Qe.getAuthentication(`${(Re=window)===null||Re===void 0||(Ee=Re.location)===null||Ee===void 0?void 0:Ee.origin}${window.location.pathname}?user=registered`)}else{async function ct(){let Xt=(0,Fl.DC)();if(Xt!=null&&Xt.userId&&(0,s.js)().TVE)(0,Kl.default)().then(Kt=>{et(!1),Kt&&Dt()});else return}et(!1),ct()}}},Ve=async()=>{const D=U.default.get("tveFlagInQueryAuth");let le=new URLSearchParams(window.location.search).get("isTveUser");const pe=localStorage.getItem("selectedMvpdId");if(le=="Authenticated"&&pe||D){et(!0);try{var Ie,Xe,Et,mt;const Fe=await(0,vl.lO)(),ct=(mt=window)===null||mt===void 0||(Et=mt.app_data)===null||Et===void 0||(Xe=Et.appcmsPlatform)===null||Xe===void 0||(Ie=Xe.tveSettings)===null||Ie===void 0?void 0:Ie.resourceIds;if(pe===Fe.data.existingParameters.mvpd)try{const Kt=(await(0,vl.Ls)()).data.profiles[pe].attributes;if((0,ft.setStorageItem)("tveProfileResponse",Kt),ct&&ct.length>0){var ze,Ee;const Lo=(await(0,vl.K)(pe)||[]).filter(wo=>wo&&wo.authorized).map(wo=>wo.resource);await(0,yl.i)({tveUserId:(Kt==null||(ze=Kt.userID)===null||ze===void 0?void 0:ze.value)||"",mvpd:pe,encryptedZip:(Kt==null||(Ee=Kt.zip)===null||Ee===void 0?void 0:Ee.value)||"",path:Me,resourceIds:Lo})}else{var Re,Qe;await(0,yl.i)({tveUserId:(Kt==null||(Re=Kt.userID)===null||Re===void 0?void 0:Re.value)||"",mvpd:pe,encryptedZip:(Kt==null||(Qe=Kt.zip)===null||Qe===void 0?void 0:Qe.value)||"",path:Me,setIsLoading:et})}U.default.remove("tveFlagInQueryAuth")}catch(Xt){et(!1),Xt.response?((0,y.A)("Error Code GET Profile:"+Xt.response.status,"info",!0),(0,y.A)("Error Message GET Profile:"+Xt.response.statusText,"info",!0),(0,y.A)("Error Data GET Profile:"+Xt.response.data,"info",!0)):Xt.request?(0,y.A)("No response received GET Profile:"+Xt.request,"info",!0):(0,y.A)("Axios Error GET Profile:"+Xt.message,"info",!0),U.default.remove("tveFlagInQueryAuth")}}catch(Fe){et(!1),Fe.response?((0,y.A)("Error Code GET Authentication error:"+Fe.response.status,"info",!0),(0,y.A)("Error Message GET Authentication error:"+Fe.response.statusText,"info",!0),(0,y.A)("Error Data GET Authentication error:"+Fe.response.data,"info",!0)):Fe.request?(0,y.A)("No response received GET Authentication error:"+Fe.request,"info",!0):(0,y.A)("Axios Error GET Authentication error:"+Fe.message,"info",!0),U.default.remove("tveFlagInQueryAuth")}}};(0,e.useEffect)(()=>{var D;!((D=window)===null||D===void 0)&&D.app_data.appcmsPlatform.tveSettings.accessEnabler&&(0,s.js)().TVE&&Oe=="v1"&&(0,Kl.default)().then(le=>{le?window.accessEnablerDidLoad():console.log("error loading sdk")}),lt=="adobe"&&Oe=="v2"&&Ve(),lt=="toolbox"&&(0,Li.handleToolboxAuth)({fallbackPath:Me,setIsLoading:et}),i().subscribe("registerTVE",K)},[]);const Ge=(D,g)=>{var le,pe,Ie,Xe;D&&D.preventDefault();const Et=btoa((0,Ni.A)()),mt=U.default.get("Tve_Access_token"),ze=((Xe=window)===null||Xe===void 0||(Ie=Xe.app_data)===null||Ie===void 0||(pe=Ie.appcmsPlatform)===null||pe===void 0||(le=pe.tveSettings)===null||le===void 0?void 0:le.version)||"v1";D&&(g=D.target[0].value),ze=="v1"?(0,r.A)({method:"GET",url:`${m}/api/v1/config/${qe}`,params:{}}).then(Ee=>{var Re,Qe,Fe;Te(Ee==null||(Fe=Ee.data)===null||Fe===void 0||(Qe=Fe.requestor)===null||Qe===void 0||(Re=Qe.mvpds)===null||Re===void 0?void 0:Re.mvpd)}).catch(()=>{alert("Error Occurred")}):(0,r.A)({method:"GET",url:`${m}/api/v2/${qe}/configuration`,headers:{Authorization:`Bearer ${mt}`,"AP-Device-Identifier":`fingerprint ${Et}`}}).then(Ee=>{var Re,Qe;Te(Ee==null||(Qe=Ee.data)===null||Qe===void 0||(Re=Qe.requestor)===null||Re===void 0?void 0:Re.mvpds)}).catch(Ee=>{if(Ee.response){var Re,Qe;(0,y.A)("Error Code GET Config Flow:"+Ee.response.status,"info"),(0,y.A)("Error Message GET Config Flow:"+((Qe=Ee.response)===null||Qe===void 0||(Re=Qe.data)===null||Re===void 0?void 0:Re.message),"info"),(0,y.A)("Error Data GET Config Flow:"+JSON.stringify(Ee.response.data),"info")}else Ee.request?(0,y.A)("No response received GET Config Flow:"+Ee.request,"info"):(0,y.A)("Axios Error GET Config Flow:"+Ee.message,"info")})};(0,e.useEffect)(()=>{var D,g,le,pe,Ie;let Xe=window.location.search;const mt=new URLSearchParams(Xe).get("tveCode"),ze=((pe=window)===null||pe===void 0||(le=pe.app_data)===null||le===void 0||(g=le.appcmsPlatform)===null||g===void 0||(D=g.tveSettings)===null||D===void 0?void 0:D.tveProvider)||"adobe",Ee=(0,ft.getStorageItem)("AuthenticationStore");let Re=Ee==null?void 0:Ee.user,Qe=(Re==null?void 0:Re.tveProvider)||(Re==null||(Ie=Re.tveMetadata)===null||Ie===void 0?void 0:Ie.tveProvider);mt&&ze=="adobe"&&(0,Gl.M)().then(Fe=>{(0,Gl.l)({...Fe.data}).then(()=>{Ge(null,mt),ee(mt)}),i().publish("apploading",!1)}).catch(Fe=>{console.log(Fe),i().publish("apploading",!1)}),mt&&ze=="toolbox"&&Qe?(localStorage.setItem("toolboxCtvActivationCode",mt),(0,El.du)(mt).then(()=>{We("/")})):mt&&ze=="toolbox"&&localStorage.setItem("toolboxCtvActivationCode",mt)},[]);const K=D=>{let g=window.location.search,le=new URLSearchParams(g);const pe=le.get("auth"),Ie=le.get("email"),Xe=le.get("tveCode");pe&&Ie&&Xe||(window.location.href=D)};if(Oe=="v1"){let D;window.accessEnablerDidLoad=()=>{var g;let le=Ne;!((g=window)===null||g===void 0)&&g.AccessEnabler?(window.AE=new window.AccessEnabler.AccessEnabler(le),window.entitlementLoaded()):(et(!0),D=setTimeout(()=>{window.accessEnablerDidLoad()},3e3))},window.entitlementLoaded=()=>
1{if(qe)try{var g;(g=window.AE)===null||g===void 0||g.setRequestor(qe),window.setConfig()}catch(le){console.log("Error Occurred",le),setTimeout(()=>{window.entitlementLoaded()},1e3)}else et(!1)},window.setConfig=async g=>{et(!1),Dt()},window.setMetadataStatus=(g,le,pe)=>{xe.current[g]=pe,(g==="householdID"||g==="hba_status")&&U.default.set(g,pe),xe.current.hasOwnProperty("userID")&&xe.current.hasOwnProperty("zip")&&xe.current.hasOwnProperty("encryptedZip")&&((0,w.publishUserCreated)({status:!0}),Ae(!0))},window.displayProviderDialog=g=>(et(!1),Te(g),new Promise((le,pe)=>(g==null?void 0:g.length)>0?le(g):pe())),window.setAuthenticationStatus=(g,le)=>{if(g==1){if(ut){var pe,Ie,Xe,Et,mt,ze,Ee,Re,Qe,Fe;(Ie=window)===null||Ie===void 0||(pe=Ie.AE)===null||pe===void 0||pe.getMetadata("zip"),(Et=window)===null||Et===void 0||(Xe=Et.AE)===null||Xe===void 0||Xe.getMetadata("userID"),(ze=window)===null||ze===void 0||(mt=ze.AE)===null||mt===void 0||mt.getMetadata("encryptedZip"),(Re=window)===null||Re===void 0||(Ee=Re.AE)===null||Ee===void 0||Ee.getMetadata("hba_status"),(Fe=window)===null||Fe===void 0||(Qe=Fe.AE)===null||Qe===void 0||Qe.getMetadata("householdID")}if((Pe==null?void 0:Pe.length)>0){var ct,Xt;(Xt=window)===null||Xt===void 0||(ct=Xt.AE)===null||ct===void 0||ct.checkPreauthorizedResources(Pe)}}else g==0&&et(!1)},window.preauthorizedResources=g=>{tt(g),localStorage.setItem("resourceIds",JSON.stringify(g)),wt(!0)}}const Qt=()=>{var D;let g=(xe==null||(D=xe.current)===null||D===void 0?void 0:D.zip)||null;return g&&typeof g=="object"&&g.length>0&&(g=JSON.stringify(g)),g},Zt=async()=>{var D;let g=localStorage.getItem("entitlementToken"),le=JSON.parse(g),pe=(le==null?void 0:le.mvpd)||null,Ie=At&&localStorage.getItem("resourceIds")&&JSON.parse(localStorage.getItem("resourceIds")),Xe=(0,Fl.DC)();le!=null&&le.canAuthenticate&&(!(Xe==null||(D=Xe.tveMetadata)===null||D===void 0)&&D.userId)||((Ie==null?void 0:Ie.length)>0&&ut&&Wt?(0,yl.i)({tveUserId:xe.current.userID,mvpd:pe,zip:Qt(),encryptedZip:xe.current.encryptedZip,path:Me,resourceIds:Ie||[],setIsLoading:et}):((Ie==null?void 0:Ie.length)==0||Ie==!1)&&ut&&Wt?(0,yl.i)({tveUserId:xe.current.userID,mvpd:pe,zip:Qt(),encryptedZip:xe.current.encryptedZip,path:Me,setIsLoading:et}):Ie?(0,yl.i)({mvpd:pe,path:Me,resourceIds:Ie||[],setIsLoading:et}):console.log("No user meta data or resource id"))};(0,e.useEffect)(()=>{Oe=="v1"&&Zt()},[At,Wt,ce]),(0,e.useEffect)(()=>{const D=U.default.get("TveAccessToken"),g=window.localStorage.getItem("fingerprintDeviceId");lt=="adobe"&&Oe=="v2"&&(!D||!g?gt():(0,vl.D0)().then(le=>{Te(le)})),lt=="toolbox"&&uo()},[]);const gt=()=>{(0,vl.R1)().then(D=>{(0,vl.m8)({...D.data}).then(()=>{(0,vl.D0)().then(g=>{Te(g)})})})},uo=()=>{(0,El.pH)().then(D=>Te(D.data))};return e.createElement("div",{className:"Tve-V2-container"},e.createElement("div",{className:"connectTveLogin site-color"},I&&e.createElement("div",{className:"tve-loader"},e.createElement(Ii.A,null)),e.createElement(Ti,{providers:$e,regCode:Ut,chooseProviderTxt:ht==null?void 0:ht.chooseProviderTxt,chooseProviderDescription:ht==null?void 0:ht.chooseProviderDescription,skipBtnText:ht==null?void 0:ht.skipBtn,ctaBackgroundColor:Ct,mvpdBgColor:He,hideTvProviderCta:t==null?void 0:t.hideTvProviderCta})))}const Oi=Mi,Ri=t=>t!=null&&t.isTveEnabledInService?e.createElement(Oi,t):null,Fi=(0,_e.A)(Ri);var zl=o(83707),kl=o(23438);const ki=({offerData:t,getFonts:a})=>{var p,u;const{mediaUrl:S,heading:O,subtitle:z,offerType:R,offerDiscount:ie,strikeThroughPrice:v,offerPrice:k,ctaButtonText:C}=t,{mainContainerBgColor:X,headingColor:re,subtitleColor:oe,offerTextColor:Be,offerDiscountColor:fe,strikeThroughPriceColor:he,offerBoxColor:b,offerTypeColor:we,offerPriceColor:de,ctaButtonBgColor:Ze,ctaButtonTextColor:m,planId:Ne,promocode:qe}=t,ht={planId:Ne,promocode:qe},{offerCodeBannerDescriptionFont:Ct,offerCodeBannerPlanOffFont:He,offerCodeBannerPlanTitleFont:Pe,offerCodeBannerTitleFont:$e}=a;return e.createElement("div",{className:"offer-slide",style:{backgroundColor:X!=null?X:"#0D1D41"}},e.createElement("div",{className:"offer-leftside"},e.createElement("img",{src:S,alt:"checkout offer"})),e.createElement("div",{className:"offer-rightside"},e.createElement("div",{className:"offer-details"},e.createElement("h2",{className:"heading",style:{color:re!=null?re:"#FFFFFF",...$e}},O),e.createElement("p",{className:"sub-heading",style:{color:oe!=null?oe:"#FFFFFF",...Ct}},z)),e.createElement("div",{className:"offer-widget",style:{backgroundColor:b!=null?b:"#1A4392"}},e.createElement("h3",{className:"offer-title",style:{color:we!=null?we:"#FFFFFF",...Pe,borderColor:X!=null?X:"#0D1D41"}},R),e.createElement("div",{className:"offer-widget-detail"},e.createElement("p",{className:"offer-discount",style:{color:fe!=null?fe:"#FFFFFF",...He}},`${ie}% Off`),e.createElement("div",{className:"offer-price"},e.createElement("p",{style:{color:he!=null?he:"#FFFFFF",opacity:.5,...Pe,textDecoration:"line-through"}},`$${v}/${!(R==null||(p=R.toLowerCase())===null||p===void 0)&&p.includes("annual")?"year":"month"}`),e.createElement("p",{style:{color:de!=null?de:"#FFFFFF",...Pe}},`$${k}
1/${!(R==null||(u=R.toLowerCase())===null||u===void 0)&&u.includes("annual")?"year":"month"}`)),e.createElement("div",{className:"offer-cta"},e.createElement("button",{"aria-label":"Apply Offer Code",onClick:()=>{(0,L.Fb)(ht),(0,w.publishScrollIntoView)()},style:{background:Ze!=null?Ze:"#~",color:m!=null?m:"#FFFFFF"}},C))))))};kl.Ay.use([kl.dK]);const Bi=({offers:t,getFonts:a})=>{const p=(0,e.useRef)(null),u=(0,e.useRef)(null);return e.createElement(e.Fragment,null,e.createElement("div",{className:"offer-carousel-wrapper"},e.createElement(zl.RC,{spaceBetween:10,className:"my-swiper",modules:[kl.dF],pagination:{clickable:!0},onInit:S=>{S.params.navigation.prevEl=p.current,S.params.navigation.nextEl=u.current,S.navigation.init(),S.navigation.update()}},t==null?void 0:t.map(S=>e.createElement(zl.qr,null," ",e.createElement(ki,{offerData:S,getFonts:a}))))))},xi=({offers:t,getFonts:a})=>e.createElement("div",{className:"checkout-offers"},e.createElement("div",{className:"carousel"},e.createElement(Bi,{offers:t,getFonts:a})));var Ui=o(58689);const Vi=()=>{const[t,a]=(0,e.useState)(!1),p=u=>{let S=u==null?void 0:u.message;a(S),setTimeout(()=>{a(!1)},1e4)};return(0,e.useEffect)(()=>{(0,w.subscribeNotificationUpdate)(p)},[]),e.createElement(e.Fragment,null,t?e.createElement("div",{className:"notification-wrapper"},t):e.createElement(e.Fragment,null))};var $i=o(60195),Wi=o(10059),Hi=o(63534),Ki=o(41139),Gi=o(93289);const Jl="content-countdown",zi=t=>{var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we;let de=`vl-player-${t.moduleData.id}-${(t==null||(a=t.videoData)===null||a===void 0?void 0:a.id)||(t==null||(S=t.moduleData)===null||S===void 0||(u=S.contentData)===null||u===void 0||(p=u[0])===null||p===void 0?void 0:p.id)}`;const{gamePlayerpreviewTitleStyles:Ze,gamePlayerpreviewDescriptionStyles:m}=(0,c.getFontsStyles)(t==null||(z=t.moduleData)===null||z===void 0||(O=z.layout)===null||O===void 0?void 0:O.fontSetting);let Ne=t==null||(ie=t.moduleData)===null||ie===void 0||(R=ie.layout)===null||R===void 0?void 0:R.settings,qe=t==null||(v=t.moduleData)===null||v===void 0?void 0:v.layout,ht=!0,Ct="vl-video-container",He=(0,$.default)(),Pe=t.videoData||(t==null||(C=t.moduleData)===null||C===void 0||(k=C.contentData)===null||k===void 0?void 0:k[0]),$e=Pe==null?void 0:Pe.id,{remainingPreviewTime:Te,previewRestriction:I}=(0,B.qL)($e),et=Te,ce=t==null||(X=t.moduleData)===null||X===void 0?void 0:X.plans;const{popupHeadingTitleFont:tt,popupCtaTitleFont:At,popupCtaSubTitleFont:wt,popupPriceFont:Wt,popupDetailFont:Ae,timerTitleFont:Ut,timerValueFont:ee}=(0,c.getFontsStyles)(t==null||(oe=t.moduleData)===null||oe===void 0||(re=oe.layout)===null||re===void 0?void 0:re.fontSetting);let xe={popupHeadingTitleFont:tt,popupCtaTitleFont:At,popupCtaSubTitleFont:wt,popupPriceFont:Wt,popupDetailFont:Ae};const[We,Me]=(0,e.useState)({isLoading:!0,playerError:!1}),[ut,Oe]=(0,e.useState)({show:!1,target:null}),[lt,Dt]=(0,e.useState)(!1);let Ve={},Ge=t==null?void 0:t.videoData,K=t==null||(Be=t.moduleData)===null||Be===void 0?void 0:Be.metadataMap;(0,e.useEffect)(()=>(i().subscribe(Jl,D=>Oe(g=>({...g,show:D}))),i().subscribe("authz-failed",D=>{D&&Qt(!0)}),()=>{var D;if(i().unsubscribe(Jl),!((D=(0,$.default)())===null||D===void 0)&&D.isPlayerInitialised(de)){var g,le,pe;(g=(0,$.default)())===null||g===void 0||g.dispose(de);const Ie=(le=(0,ft.getStorageItem)("AuthenticationStore"))===null||le===void 0?void 0:le.user;let Xe={video_id:Pe==null?void 0:Pe.id,content_title:Pe==null?void 0:Pe.title,content_type:Pe==null||(pe=Pe.gist)===null||pe===void 0?void 0:pe.contentType,user_id:(Ie==null?void 0:Ie.userId)||"guest_user"};(0,N.trackBrazeEvents)("exit_video_playback",Xe)}}),[]);const Qt=D=>{if(D&&(Me({isLoading:!0,playerError:!0}),He!=null&&He.isPlayerInitialised(de))){He==null||He.dispose(de);let g=document.createElement("video");g.style.visibility="hidden",g.style.position="absolute",g.id=de,g.classList.add("video-js"),g.classList.add("videoEl");let le=document.querySelector(".video-container");le&&(le==null||le.appendChild(g))}},Zt=D=>{if(D<0||!$e)return;(0,A.fc)($e,D);const g=(0,A.S1)($e);if(g.remaining<=0||g.isLoop&&D>=g.remaining){if((0,A.gl)($e).action==="LOOP"){var le;const Ie=(0,A.S1)($e);M(Ie.remaining),(le=(0,$.default)())===null||le===void 0||le.seekToTimeStamp(de,0,()=>{});return}M({haultTimer:!0}),i().publish("block-preview",!0);return}M(g.isLoop?Math.max(0,g.remaining-Math.floor(D)):g.remaining)};(0,e.useEffect)(()=>(i().subscribe("block-preview",Qt),i().subscribe("update-preview-time",Zt),uo(),()=>{i().unsubscribe("update-preview-time",Zt),i().unsubscribe("block-preview",Qt),$e&&(0,A.gj)($e)}),[]),(0,e.useEffect)(()=>{var D;if((0,B.B8)(t)&&(!(qe==null||(D=qe.settings)===null||D===void 0)&&D.showCountdown)){var g,le,pe,Ie,Xe,Et;let ze=t.isSeriesPage?(le=t.videoData)===null||le===void 0||(g=le.gist)===null||g===void 0?void 0:g.scheduleStartDate:((pe=t.moduleData)===null||pe===void 0?void 0:pe.contentData)&&((Et=t.moduleData)===null||Et===void 0||(Xe=Et.contentData[0])===null||Xe===void 0||(Ie=Xe.gist)===null||Ie===void 0?void 0:Ie.scheduleStartDate);
1Oe({show:!0,target:ze});return}i().subscribe("paywall",gt);const mt=document.getElementById(de);return mt&&(mt.style.visibility="hidden"),()=>{He!=null&&He.isPlayerInitialised(de)&&(He==null||He.dispose(de))}},[]);const gt=D=>Me(D?{isLoading:!1,playerError:!0}:{isLoading:!1,playerError:!1}),uo=async()=>{var D,g,le,pe,Ie,Xe,Et,mt,ze,Ee,Re,Qe,Fe,ct,Xt,Kt;(0,w.publishAppLoading)(!0);const Bo=(Ie=window)===null||Ie===void 0||(pe=Ie.app_data)===null||pe===void 0||(le=pe.appcmsMain)===null||le===void 0||(g=le.features)===null||g===void 0||(D=g.free_preview)===null||D===void 0?void 0:D.isFreePreview,Lo=(0,B.B8)(t)&&(qe==null||(Xe=qe.settings)===null||Xe===void 0?void 0:Xe.showCountdown);Lo&&i().publish("content-countdown",!0);let wo=(t==null||(Et=t.videoData)===null||Et===void 0?void 0:Et.id)||(t==null||(Ee=t.moduleData)===null||Ee===void 0||(ze=Ee.contentData)===null||ze===void 0||(mt=ze[0])===null||mt===void 0?void 0:mt.id);const De=(t==null||(Qe=t.videoData)===null||Qe===void 0||(Re=Qe.gist)===null||Re===void 0?void 0:Re.title)||(t==null||(Kt=t.moduleData)===null||Kt===void 0||(Xt=Kt.contentData)===null||Xt===void 0||(ct=Xt[0])===null||ct===void 0||(Fe=ct.gist)===null||Fe===void 0?void 0:Fe.title)||"";if(Bo&&!Lo&&et<2&&wo){M(0),(0,w.publishAppLoading)(!1);return}const qt=await(0,s.CX)();let So=await(0,s.QZ)(),Wo=So&&await(0,s.HW)(So),J=await(0,me.ye)(),it=await(0,s.h)();const xt=await(0,s.LH)(),Tt=await(0,s.sv)();(0,s.gf)().then(Nt=>{var po,vo,vt,bo,_o,Oo,xo,ao,Mo,_,V,nt,Lt,ot,_t,Po,St,Ht,Eo,so,yo,Mt;let Gt={debugStats:!0,videoId:wo,playerId:de,experimentalBufferBasedABR:!0,token:Nt,enableAdvertisements:!1,skin:"minimalist",analyticsCb:N.trackBrazeEvents,analyticsEventParams:{video_id:Pe==null?void 0:Pe.id,content_title:Pe==null?void 0:Pe.title,content_type:Pe==null||(po=Pe.gist)===null||po===void 0?void 0:po.contentType,user_id:(qt==null?void 0:qt.userId)||"guest_user"},refreshToken:(0,s.ve)(),autoplay:!0,drmLibrary:!0,chromecastReceiverId:(_o=window)===null||_o===void 0||(bo=_o.app_data)===null||bo===void 0||(vt=bo.appcmsMain)===null||vt===void 0||(vo=vt.features)===null||vo===void 0?void 0:vo.customReceiverId,debugConfig:(0,s.bu)(),convivaConfig:{...(0,N.W4)(qt==null?void 0:qt.user)},airplay:!0,tvProviderLogoUrl:Wo,apiBaseUrl:(Mo=window)===null||Mo===void 0||(ao=Mo.app_data)===null||ao===void 0||(xo=ao.appcmsMain)===null||xo===void 0||(Oo=xo.apiConfig)===null||Oo===void 0?void 0:Oo.apiBaseUrl,customData:{overrideEntitlementBaseUrl:(_=(0,s._S)())===null||_===void 0?void 0:_.overrideEntitlementBaseUrl,entitlement:{hba_status:U.default.get("hba_status"),householdID:U.default.get("householdID")},beacon:{url:(ot=window)===null||ot===void 0||(Lt=ot.app_data)===null||Lt===void 0||(nt=Lt.appcmsMain)===null||nt===void 0||(V=nt.apiConfig)===null||V===void 0?void 0:V.playerBeaconUrl,params:{...Tt,...De&&{title:De}}},macros:xt,subscription:{...it},...Ve},analytics:{gaId:(Ht=window)===null||Ht===void 0||(St=Ht.app_data)===null||St===void 0||(Po=St.appcmsPlatform)===null||Po===void 0||(_t=Po.analytics)===null||_t===void 0?void 0:_t.googleAnalyticsId}};J!=null&&J.byCoordinates&&(Gt.customData.entitlement={latitude:J==null?void 0:J.latitude,longitude:J==null?void 0:J.longitude});let bt=!(t==null||(Eo=t.moduleData)===null||Eo===void 0)&&Eo.contentData.length?t==null||(Mt=t.moduleData)===null||Mt===void 0||(yo=Mt.contentData[0])===null||yo===void 0||(so=yo.plans)===null||so===void 0?void 0:so.filter(x=>(x==null?void 0:x.type)==="TVE"):[];(bt==null?void 0:bt.length)===0?bt=!1:bt=!0;let eo="other";if(wo)He.init(Gt).then(async x=>{var go,mo,jt,to,To,oo,$o,Co,lo,Uo,Qo,ho,Jo,qo,nl,sl;(0,$.default)().onVideoEnded(de,Ko=>{if(Ko){var rl;let Cl={video_id:Pe==null?void 0:Pe.id,content_title:Pe==null?void 0:Pe.title,content_type:Pe==null||(rl=Pe.gist)===null||rl===void 0?void 0:rl.contentType,user_id:(qt==null?void 0:qt.userId)||"guest_user"};(0,N.trackBrazeEvents)("completed_video_playback",Cl)}});const ol=document.getElementById(de),Ro=document.getElementsByTagName("video"),al=Array.from(document.getElementsByClassName("video-js"));al.length&&(al[0].classList.remove("abs-pos"),al[0].style.position="relative");let Fo=!(x==null||(mo=x.response)===null||mo===void 0||(go=mo.plans)===null||go===void 0)&&go.length?x.response.plans:!1;(0,Zo.Os)(Fo);let hl=[];x==null||(To=x.response)===null||To===void 0||(to=To.video)===null||to===void 0||(jt=to.plans)===null||jt===void 0||jt.forEach(Ko=>{var rl;hl=[...hl||[],...(Ko==null?void 0:Ko.planIds)||(0,Ki.formulateAllPlanIdsArray)(x==null||(rl=x.response)===null||rl===void 0?void 0:rl.video)||[]]});let Sl=hl,ml=x==null||(Co=x.response)===null||Co===void 0||($o=Co.video)===null||$o===void 0||(oo=$o.monetizationModels)===null||oo===void 0?void 0:oo.map(Ko=>Ko==null?void 0:Ko.type);const bl=(x==null||(ho=x.response)===null||ho===void 0||(Qo=ho.plans)===null||Qo===void 0||(Uo=Qo.filter(Ko=>Sl.includes(Ko.id))[0])===null||Uo===void 0||(lo=Uo.featureSetting)===null||lo===void 0?void 0:lo.isLoginRequired)||!1;bl?Qt(!0):al[0].classList.remove("abs-pos");let Bl=x==null||(Jo=x.response)===null||Jo===void 0?void 0:Jo.playable,Pl="video-container",xl=(qt==null||(nl=qt.user)===null||nl===void 0||(qo=nl.tveMetadata)===null||qo===void 0?void 0:qo.tveProvider)||(qt==null||(sl=qt.user)===null||sl===void 0?void 0:sl.tveProvider),fl;ml!=null&&ml.includes("TVE")&&xl&&(fl=await(0,Z.checkForTveEntitlement)({monetizationModels:ml,entitlementResponse:x==null?void 0:x.response,toTerminate:!0,playerInstance:{VLPlayerCore:$.default,playerId:de,containerClass:Pl}}));let gl=!!(fl!=null&&fl.errorMessage);Dt(gl),(0,ue.$)({VLPlayerCore:He,playerId:Gt.playerId,metadataMap:K,isPlayable:Bl,detailPageClass:Ct,isLoginRequired:bl,containerClass:Pl,contentDetails:Ge,videoType:eo,isCheckoutCombination:ht,isAuthzError:gl}
1),Array.from(Ro).forEach(function(Ko){Ko.style.visibility="visible"}),ol&&(ol.style.visibility="visible")}).catch(async x=>{var go,mo,jt,to,To,oo,$o,Co;(0,w.publishVideoError)(!0);let lo=(x==null||(mo=x.response)===null||mo===void 0||(go=mo.response)===null||go===void 0?void 0:go.data)||(x==null?void 0:x.response),Uo=!(lo==null||(jt=lo.plans)===null||jt===void 0)&&jt.length?lo.plans:ce!=null&&ce.length?ce:[],Qo=!(lo==null||(to=lo.plans)===null||to===void 0)&&to.length?lo.plans:!1;(0,Zo.Os)(Qo);let ho=Uo==null?void 0:Uo.map(Fo=>Fo==null?void 0:Fo.monetizationModel);(bt||!(lo==null||(To=lo.models)===null||To===void 0)&&To.includes("TVE"))&&ho.push("TVE");let Jo=Uo==null?void 0:Uo.map(Fo=>Fo==null?void 0:Fo.id),qo=lo==null?void 0:lo.playable,nl=Jo,sl="video-thumbnail",ol={errorCode:lo==null?void 0:lo.errorCode,errorMessage:lo==null?void 0:lo.errorMessage},Ro=null;ol!=null&&ol.errorCode||(Ro=x==null?void 0:x.msg),(0,w.publishErrorUpdate)(Ro||(lo==null?void 0:lo.errorMessage));let al=(qt==null||($o=qt.user)===null||$o===void 0||(oo=$o.tveMetadata)===null||oo===void 0?void 0:oo.tveProvider)||(qt==null||(Co=qt.user)===null||Co===void 0?void 0:Co.tveProvider);if(ho!=null&&ho.includes("TVE")&&al){let Fo=await(0,Z.checkForTveEntitlement)({monetizationModels:ho,entitlementResponse:lo,toTerminate:!1,playerInstance:{}});Fo!=null&&Fo.success||(ol=Fo==null?void 0:Fo.errorDetails,Ro=Fo==null?void 0:Fo.errorMessage)}(0,ue.$)({VLPlayerCore:$.default,playerId:Gt.playerId,metadataMap:K,monetizationModels:ho,plans:Uo,contentPlanIds:nl,isPlayable:qo,containerClass:sl,detailPageClass:Ct,monetisationPlansIds:Jo,errorDetails:ol,errorMsg:Ro,contentDetails:Ge,isCheckoutCombination:ht})});else if(ce!=null&&ce.length||bt){let x=ce==null?void 0:ce.map(Co=>Co==null?void 0:Co.monetizationModel);bt&&x.push("TVE");let go=ce==null?void 0:ce.map(Co=>Co==null?void 0:Co.id),mo=!1,jt=go,to="video-thumbnail",To=document.querySelector(`.${to}`);To&&(To.style.position="relative");let oo={errorCode:"",errorMessage:""};(0,ue.$)({VLPlayerCore:$.default,playerId:Gt.playerId,metadataMap:K,monetizationModels:x,plans:ce,contentPlanIds:jt,isPlayable:mo,containerClass:to,detailPageClass:Ct,monetisationPlansIds:go,errorDetails:oo,errorMsg:null,contentDetails:Ge})}else Me({isLoading:!1,playerError:!0})}).catch(Nt=>{Me({isLoading:!1,playerError:!0}),(0,w.publishAppLoading)(!1)})};return e.createElement("div",{className:"video-player-container"},e.createElement(H.A,{metadataMap:K,subscriptionPopupFonts:xe}),e.createElement("div",{className:"video-thumbnail video-container"},e.createElement("video",{id:de,style:{width:"100%",height:"100%",position:"absolute"},className:"video-js videoEl abs-pos"}),((We==null?void 0:We.isLoading)||(We==null?void 0:We.playerError))&&e.createElement("div",{className:"game-thumbnail"},e.createElement("img",{src:(0,Le.by)("16*9",Pe),className:"landscape",alt:"Tray Item Icon",style:{width:"100%"}})),ut.show&&ut.target&&(!(qe==null||(fe=qe.settings)===null||fe===void 0)&&fe.showCountdown)?e.createElement(Gi.A,{targetDate:ut.target,metadataMap:K,containerStyles:{background:qe==null||(he=qe.settings)===null||he===void 0?void 0:he.gameCountDownBackgroundColor,color:qe==null||(b=qe.settings)===null||b===void 0?void 0:b.gameCountDownTextColor},labelStyles:Ut,valueStyles:ee}):null,e.createElement(Q,{contentType:Pe==null||(we=Pe.gist)===null||we===void 0?void 0:we.contentType,videoData:Pe,layoutSettings:qe,brandColors:Ne,metadataMap:K,styles:{gamePlayerpreviewTitleStyles:Ze,gamePlayerpreviewDescriptionStyles:m},isAuthzError:lt})))};var Ji=o(47472);const ji="Director",Yi="Starring",jl=(t,a)=>t==null?void 0:t.find(p=>(p==null?void 0:p.title)===a),Xi=t=>{var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze;const[m,Ne]=(0,e.useState)(!1),[qe,ht]=(0,e.useState)(!1),[Ct,He]=(0,e.useState)(!1),Pe=(0,e.useRef)(null),{detailPageTitleInfo:$e,detailPageDescriptionInfo:Te}=(0,c.getFontsStyles)(t==null||(p=t.moduleData)===null||p===void 0||(a=p.layout)===null||a===void 0?void 0:a.fontSetting),I=t==null||(S=t.moduleData)===null||S===void 0||(u=S.contentData)===null||u===void 0?void 0:u[0],et=I==null||(z=I.gist)===null||z===void 0||(O=z.imageGist)===null||O===void 0?void 0:O.r16x9,ce=!!(t!=null&&t.isSeriesPage),tt=t==null||(ie=t.moduleData)===null||ie===void 0||(R=ie.layout)===null||R===void 0?void 0:R.settings,At=t==null||(v=t.moduleData)===null||v===void 0?void 0:v.metadataMap,wt=(tt==null?void 0:tt.showAdditionalMetadata)||!1,Wt=(tt==null?void 0:tt.showPrimaryCategoryOnly)||!1,Ae=(tt==null?void 0:tt.enableTvRating)||!1,Ut=(tt==null?void 0:tt.showCategoryList)||!1,ee=I==null?void 0:I.parentalRating,xe=(0,s.Kg)(I==null||(k=I.gist)===null||k===void 0?void 0:k.primaryCategory,I==null?void 0:I.categories),We=Wt?I==null||(X=I.gist)===null||X===void 0||(C=X.primaryCategory)===null||C===void 0?void 0:C.title:xe,Me=(wt||Ae)&&!!ee,ut=(wt||Ut)&&!!We,Oe=(I==null||(re=I.seasons)===null||re===void 0?void 0:re.length)||0,lt=(0,s.sH)(Oe),Dt=(0,s.PA)(I==null?void 0:I.runtime),Ve=I==null?void 0:I.year,Ge=At==null?void 0:At.audioMetaDataLabel,K=At==null?void 0:At.subt
1itleMetaDataLabel,Qt=((I==null||(oe=I.audioSubtitleMetadataBlock)===null||oe===void 0?void 0:oe.audioMetadata)||[]).filter(Boolean).join(", "),Zt=((I==null||(Be=I.audioSubtitleMetadataBlock)===null||Be===void 0?void 0:Be.subtitleMetadata)||[]).filter(Boolean).join(", "),gt=[jl(I==null?void 0:I.creditBlocks,ji),jl(I==null?void 0:I.creditBlocks,Yi)].filter(Boolean),uo=I==null||(fe=I.gist)===null||fe===void 0?void 0:fe.description,D=(de=window)===null||de===void 0||(we=de.app_data)===null||we===void 0||(b=we.appcmsMain)===null||b===void 0||(he=b.genericMessages)===null||he===void 0?void 0:he.moreInfoText;(0,e.useEffect)(()=>{const pe=Pe.current;pe&&He(pe.scrollHeight>pe.clientHeight+1)},[m,uo]);const g=!!D&&(wt||Ct),le=()=>{Ne(!m)};return e.createElement("div",null,e.createElement("div",{className:`series-detail-info-small ${m?"expand":""} `,onClick:()=>le()},e.createElement("div",{className:"banner-image"},e.createElement("img",{src:et,alt:"series icon"})),e.createElement("div",{className:"series-info-container"},e.createElement("div",{className:"series-info",style:Te},e.createElement("p",{className:"series-name",style:{fontFamily:$e==null?void 0:$e.fontFamily}},I==null||(Ze=I.gist)===null||Ze===void 0?void 0:Ze.title),e.createElement(Ji.h,{rating:Me?ee:void 0,runtime:ce?void 0:Dt,year:ce?void 0:Ve,seasons:ce?lt:void 0,categories:ut?We:void 0})),e.createElement("div",{className:"arrow-btn"},e.createElement("div",{className:m?"arrow-up":"arrow-down"}))),e.createElement("div",{className:`series-desc${qe?" full":""}`,ref:Pe,style:{fontFamily:Te==null?void 0:Te.fontFamily}},uo),g&&!qe&&e.createElement("button",{type:"button",className:"see-all-details-cta","aria-label":D,onClick:pe=>{pe.stopPropagation(),ht(!0)}},D),qe&&wt&&e.createElement("div",{className:"series-credits",style:Te},gt.map((pe,Ie)=>{const Xe=pe==null?void 0:pe.title,Et=((pe==null?void 0:pe.credits)||[]).map(mt=>mt==null?void 0:mt.title).filter(Boolean).join(", ");return!Xe||!Et?null:e.createElement("p",{key:`${Xe}-${Ie}`,className:"additional-metadata-row"},e.createElement("span",{className:"additional-metadata-label"},Xe,":")," ",Et)}),Ge&&Qt&&e.createElement("p",{className:"additional-metadata-row"},e.createElement("span",{className:"additional-metadata-label"},Ge,":")," ",Qt),K&&Zt&&e.createElement("p",{className:"additional-metadata-row"},e.createElement("span",{className:"additional-metadata-label"},K,":")," ",Zt))))};var Qi=o(36165),Zi=o(95291);const qi=t=>{var a,p,u,S,O,z,R,ie,v,k,C,X,re,oe,Be,fe,he,b,we,de,Ze,m,Ne,qe,ht,Ct,He,Pe,$e,Te,I,et,ce,tt,At,wt,Wt,Ae,Ut,ee,xe,We,Me,ut,Oe,lt,Dt,Ve,Ge,K,Qt,Zt,gt,uo,D,g,le,pe,Ie,Xe,Et,mt,ze,Ee,Re,Qe,Fe,ct,Xt,Kt;const Bo=(0,s.Ln)(),[Lo,wo]=(0,e.useState)(Bo||null),[De,qt]=(0,e.useState)(),[So,Wo]=(0,e.useState)(),[J,it]=(0,e.useState)(!1),[xt,Tt]=(0,e.useState)(!1),[Nt,po]=(0,e.useState)(window.innerWidth),[vo,vt]=(0,e.useState)(!1),[bo,_o]=(0,e.useState)(!0),[Oo,xo]=(0,e.useState)(!1),[ao,Mo]=(0,e.useState)(!1),[_,V]=(0,e.useState)(!1),[nt,Lt]=(0,e.useState)(!1),[ot,_t]=(0,e.useState)(!1),Po=sessionStorage.getItem("tveAuthenticated"),St=JSON.parse(Po),Ht=window==null||(p=window.app_data)===null||p===void 0||(a=p.appcmsMain)===null||a===void 0?void 0:a.checkoutOffers,Eo=(0,e.useRef)(null),so=(0,e.useRef)(null),yo=(0,Rt.Zp)();let Mt;const Gt=t==null?void 0:t.isGamePage,bt=t==null?void 0:t.isSeriesPage,eo=t==null?void 0:t.isVideoPage,x=De==null||(u=De.moduleData)===null||u===void 0?void 0:u.metadataMap,{planBannerHeadingStyles:go,planBannerSubHeadingStyles:mo,planBannerPriceStyles:jt,trayTitle:to,trayItem:To}=(0,c.getFontsStyles)(t==null||(O=t.moduleData)===null||O===void 0||(S=O.layout)===null||S===void 0?void 0:S.fontSetting,t==null||(R=t.moduleData)===null||R===void 0||(z=R.layout)===null||z===void 0?void 0:z.settings),oo=t==null||(k=t.moduleData)===null||k===void 0||(v=k.contentData)===null||v===void 0||(ie=v[0])===null||ie===void 0?void 0:ie.trailers,$o=t==null||(X=t.moduleData)===null||X===void 0||(C=X.metadataMap)===null||C===void 0?void 0:C.trailersTrayTitle,Co=`vl-player-${t==null||(re=t.moduleData)===null||re===void 0?void 0:re.id}-${(t==null||(oe=t.videoData)===null||oe===void 0?void 0:oe.id)||(t==null||(he=t.moduleData)===null||he===void 0||(fe=he.contentData)===null||fe===void 0||(Be=fe[0])===null||Be===void 0?void 0:Be.id)}`;let lo=(t==null||(b=t.videoData)===null||b===void 0?void 0:b.monetizationModels)||(t==null||(de=t.moduleData)===null||de===void 0||(we=de.contentData)===null||we===void 0?void 0:we.length)&&((m=t.moduleData.contentData[0])===null||m===void 0||(Ze=m.monetizationModels)===null||Ze===void 0?void 0:Ze.length)&&((Ne=t.moduleData.contentData[0])===null||Ne===void 0?void 0:Ne.monetizationModels),Qo=!!((lo==null?void 0:lo.filter(no=>(no==null?void 0:no.type)=="FREE"))||[]).length,ho=window==null||(Ct=window.app_data)===null||Ct===void 0||(ht=Ct.appcmsMain)===null||ht===void 0||(qe=ht.security)===null||qe===void 0?void 0:qe.reCaptchaKeys;const Jo=ho==null?void 0:ho.siteKey;let qo=new URLSearchParams(window.location.search);const nl=qo.get("SubType"),sl=qo.get("tveCode"),ol=(De==null||($e=De.moduleData)===null||$e===void 0||(Pe=$e.layout)===null||Pe===void 0||(He=Pe.settings)===null||He===void 0?void 0:He.mergeForm)||!1,Ro=(0,s.js)(),al=Ro==null?void 0:Ro.TVE;let Fo=parseInt((ho==null?void 0:ho.thresholdValue)||0);const hl="checkout",{executeRecaptcha:Sl}=(0,$i.A)(Jo,hl),ml=async()=>{var no,Go,jo;if((0,w.publishAppLoading)(!0),(t==null||(no=t.moduleData)===null||no===void 0?void 0:no.moduleType)==="CheckoutModule"){var ul,Dl;it(!0),qt({moduleData:t.moduleData});let dn=t==null||(Dl=t.moduleData)===null||Dl===void 0||(ul=Dl.layout)===null||ul===void 0?void 0:ul.settings;Wo(dn);return}let Tl=await(0,hi.j)("CheckoutModule");qt(Tl);let an=Tl==null||(jo=Tl.moduleData)===null||jo===void 0||(Go=jo.layout)===null||Go===void 0?void 0:Go.settings;Wo(an)},bl=no=>{Mo(!1),Tt(no)},Bl=no=>{Tt(!no),(0,w.publishAppLoading)(!1),Mo(!1)},Pl=no=>{Lt(no)};(0,e.useEffect)(()=>{Lo&&qo.get("magiclink")==="success"&&wo(null)},[]),(0,e.useEffect)(()=>{(async()=>{let no=await(0,Wi.$)(Sl,Fo);_o(!!no)})()},[Sl]);const xl=()=>{var no;Eo==null||(no=Eo.current)===null||no===void 0||no.scrollIntoView({behavior:"smooth"})},fl=no=>{Tt(!1),Mo(no),(0,w.publishAppLoading)(!1)};(0,e.useLayoutEffect)(()=>
1{if(typeof window!="undefined"){let no=window.location.search,Go=new URLSearchParams(no);const jo=Go.get("device")==="roku_box",ul=Go.get("email");jo&&ul&&_t(!0)}},[]);async function gl(){const no=await(0,ft.getStorageItem)("AuthenticationStore");no!=null&&no.user&&V(!0)}const Ko=async()=>{let no=JSON.parse(localStorage.getItem("profile-authenticated")||"false"),Go=window.location.search;if(new URLSearchParams(Go).get("auth"))no?(gl(),i().publish("showTveData",!0)):Mt=setInterval(()=>{JSON.parse(localStorage.getItem("profile-authenticated")||"false")?(clearInterval(Mt),i().publish("showTveData",!0),gl(),i().publish("showTveData",!0)):Ko()},100);else{gl();return}},rl=async()=>{const{tveProvider:no}=await(0,B.fetchAuthenticationStoreData)();xo(no)};(0,e.useEffect)(()=>{var no;let Go=window.location.search;new URLSearchParams(Go).get("user")=="registered"&&Tt(!1),(0,Zo.G0)(bl),(0,cl.Q)(Bl),(0,w.subscribeScrollIntoView)(xl),rl(),Ko(),i().subscribe("is-content-tve-available",Pl),i().subscribe("showFreePlan",fl),so==null||(no=so.current)===null||no===void 0||no.scrollIntoView({behavior:"smooth"}),(0,Z.handleStatusGaCalls)({eventName:"checkout_init",subSection:null,type:"initiate",reason:"initiate",status:null,action:"Init",paymentStatus:null,eventCategory:"Checkout",section:"checkout",additionalLabel:null})},[]);const Cl=()=>{po(window.innerWidth)};(0,e.useEffect)(()=>(window.addEventListener("resize",Cl),()=>window.removeEventListener("resize",Cl)),[]),(0,e.useEffect)(()=>{ml(),(nl=="tve"||sl)&&Tt(!1)},[]),(0,e.useEffect)(()=>{(St==null?void 0:St.isUserValid)==!1&&vt(!0),ln()},[]);const ln=async()=>{const Go=new URLSearchParams(window.location.search).get("tveCode"),{tveProvider:jo}=await(0,B.fetchAuthenticationStoreData)();Go&&jo&&(0,El.du)(Go).then(ul=>{console.log(ul,"Device Activated"),yo("/")})},nn=()=>{const Go=new URLSearchParams(window.location.search).get("planId");let jo="checkout-container-left";return Nt>1030?Qo?jo="checkout-container-left w-75":jo="checkout-container-left":Go?jo="w-100":jo="checkout-container-left w-100",jo};return e.createElement(e.Fragment,null,Lo?e.createElement(e.Fragment,null):e.createElement(e.Fragment,null,De?e.createElement("div",{className:"checkout-container",ref:so},e.createElement(Zi.A,null),e.createElement("div",{className:nn()},Gt?e.createElement(h,t):e.createElement(e.Fragment,null),bt||eo?e.createElement(zi,t):e.createElement(e.Fragment,null),J?e.createElement(H.A,{metadataMap:De==null||(Te=De.moduleData)===null||Te===void 0?void 0:Te.metadataMap,subscriptionPopupFonts:{popupCtaTitleFont:go,popupCtaSubTitleFont:mo,popupPriceFont:jt}}):e.createElement(e.Fragment,null),Nt<1030?e.createElement(Hl,{parentModuleData:t==null?void 0:t.moduleData,isCheckout:J,...t,monetisationCta:De==null||(ce=De.moduleData)===null||ce===void 0||(et=ce.layout)===null||et===void 0||(I=et.settings)===null||I===void 0?void 0:I.monetisationCTA,localisation:De==null||(tt=De.moduleData)===null||tt===void 0?void 0:tt.metadataMap,checkoutModuleData:De==null?void 0:De.moduleData,isVideoPage:eo,isSeriesPage:bt}):e.createElement(e.Fragment,null),(Ht==null?void 0:Ht.isActive)&&(Ht==null||(At=Ht.offers)===null||At===void 0?void 0:At.length)>0&&J&&xt&&e.createElement(xi,{offers:Ht==null?void 0:Ht.offers,getFonts:(0,c.getFontsStyles)(De==null||(Wt=De.moduleData)===null||Wt===void 0||(wt=Wt.layout)===null||wt===void 0?void 0:wt.fontSetting)}),e.createElement(wi,null)," ",e.createElement(Vi,null)," ",e.createElement("div",{className:J?`module-container ${ol?"merge-form":""}`:"module-container m-top",style:{backgroundColor:De==null||(ee=De.moduleData)===null||ee===void 0||(Ut=ee.layout)===null||Ut===void 0||(Ae=Ut.settings)===null||Ae===void 0?void 0:Ae.moduleSecondaryBgColor}},e.createElement("div",{ref:Nt<768?Eo:null},!Lo&&qo.get("magiclink")!=="success"&&!_&&!ot&&e.createElement(bi,{...t,index:"1.",showTvProviderBtn:!xt&&al&&nt,checkoutModuleData:De,isCheckout:!0,type:"AuthenticationModule",title:De==null||(We=De.moduleData)===null||We===void 0||(xe=We.metadataMap)===null||xe===void 0?void 0:xe.createAccountTitle,sectionTextColor:De==null||(Oe=De.moduleData)===null||Oe===void 0||(ut=Oe.layout)===null||ut===void 0||(Me=ut.settings)===null||Me===void 0?void 0:Me.sectionTextColor,continueWithoutSubscription:So==null?void 0:So.continueWithoutSubscription,continueWithoutSubscriptionLabel:De==null||(Dt=De.moduleData)===null||Dt===void 0||(lt=Dt.metadataMap)===null||lt===void 0?void 0:lt.continueWithoutSubscriptionCtaLabel,isFreeLogin:ao})),!xt&&al&&!ao&&nt&&e.createElement(Fi,{isFreeLogin:ao,index:"2.",...t,type:"TveModule",title:De==null||(Ge=De.moduleData)===null||Ge===void 0||(Ve
1=Ge.metadataMap)===null||Ve===void 0?void 0:Ve.chooseProviderTitle,sectionTextColor:De==null||(Zt=De.moduleData)===null||Zt===void 0||(Qt=Zt.layout)===null||Qt===void 0||(K=Qt.settings)===null||K===void 0?void 0:K.sectionTextColor,isTveEnabledInService:al,hideTvProviderCta:(So==null?void 0:So.hideTvProviderCta)||!1}),xt?e.createElement(pi,{index:_?"":"2.",...t,checkoutModuleData:De,subscriberPolicyDisclaimer:So==null?void 0:So.subscriberPolicyDisclaimer,type:"SubscriptionModule",title:De==null||(uo=De.moduleData)===null||uo===void 0||(gt=uo.metadataMap)===null||gt===void 0?void 0:gt.paymentTitle,sectionTextColor:De==null||(le=De.moduleData)===null||le===void 0||(g=le.layout)===null||g===void 0||(D=g.settings)===null||D===void 0?void 0:D.sectionTextColor}):e.createElement(e.Fragment,null),e.createElement(Bt,{type:"LocateModule",checkoutMetaData:x,continueWithoutSubscription:So==null?void 0:So.continueWithoutSubscription}))),Nt>1030?e.createElement("div",{className:Qo?"hide-container":"checkout-container-right"},bt||eo?e.createElement(Xi,{parentModuleData:t==null?void 0:t.moduleData,isCheckout:J,...t,monetisationCta:De==null||(Xe=De.moduleData)===null||Xe===void 0||(Ie=Xe.layout)===null||Ie===void 0||(pe=Ie.settings)===null||pe===void 0?void 0:pe.monetisationCTA,localisation:De==null||(Et=De.moduleData)===null||Et===void 0?void 0:Et.metadataMap,checkoutModuleData:De==null?void 0:De.moduleData}):e.createElement(e.Fragment,null),e.createElement(Hl,{parentModuleData:t==null?void 0:t.moduleData,isCheckout:J,...t,monetisationCta:De==null||(Ee=De.moduleData)===null||Ee===void 0||(ze=Ee.layout)===null||ze===void 0||(mt=ze.settings)===null||mt===void 0?void 0:mt.monetisationCTA,localisation:De==null||(Re=De.moduleData)===null||Re===void 0?void 0:Re.metadataMap,checkoutModuleData:De==null?void 0:De.moduleData,featureListToShow:Nt>768,isVideoPage:eo,isSeriesPage:bt,isTveLoggedIn:Oo})):e.createElement(e.Fragment,null)):e.createElement(e.Fragment,null),(bt||eo)&&!(!(t==null||(ct=t.moduleData)===null||ct===void 0||(Fe=ct.layout)===null||Fe===void 0||(Qe=Fe.settings)===null||Qe===void 0)&&Qe.hideTrailers)&&(oo==null?void 0:oo.length)>0&&e.createElement("div",{className:"trailers-section"},e.createElement(Qi.A,{data:oo,trayStyles:{trayTitle:to,trayItem:To},layoutSettings:t==null||(Kt=t.moduleData)===null||Kt===void 0||(Xt=Kt.layout)===null||Xt===void 0?void 0:Xt.settings,title:$o,mainPlayerId:Co})),vo&&!(St!=null&&St.isUserValid)&&e.createElement(Ui.default,{show:vo,enableBtns:!1,cancelHandler:()=>yo("/"),confirmHandler:()=>{},title:(x==null?void 0:x.accountLoginRequiredTitle)||"Account Login Required",contentExtraPadding:!0,contentAlignment:"center",description:(x==null?void 0:x.accountLoginRequiredDescription)||`Logged in with a different account. Please log out and sign in with ${(St==null?void 0:St.email)||(St==null?void 0:St.phone)}`}),e.createElement(Hi.A,null)))};var en=o(37505),tn=o(89467);const Yl=t=>{var a;const[p,u]=(0,e.useState)(!1);let S=t==null||(a=t.moduleData)===null||a===void 0?void 0:a.metadataMap;async function O(){var z,R,ie,v;const{isSubscribed:k,user:C}=await(0,s.CX)();let X=!!(0,Ai.a)(C),re=window.location.search,oe=new URLSearchParams(re);const Be=oe.get("auth"),fe=oe.get("email");let he=(0,G.Nc)((R=window)===null||R===void 0||(z=R.location)===null||z===void 0?void 0:z.href),b=(0,je.fetchCurrentPlan)();const we=(0,s.Ln)();if(t!=null&&t.isSeriesPage||t!=null&&t.isVideoPage){var de;let He=(0,ft.getStorageItem)("isRedirected");const Pe=(He==null?void 0:He.path)||(He==null||(de=He.contentSubscriptionFlow)===null||de===void 0?void 0:de.path)||`${window.location.pathname||""}${window.location.search||""}`;(0,ft.setStorageItem)("isRedirected",{...He,redirect:!1,isDetailPage:!0,path:Pe})}let Ze=C==null||(v=C.subscription)===null||v===void 0||(ie=v.subscriptionInfo)===null||ie===void 0?void 0:ie.planId,m=he||(b==null?void 0:b.planId)||(b==null?void 0:b.id);const Ne=(0,ft.getStorageItem)("transactionData"),qe=["Rent","Buy"].includes(b==null?void 0:b.type)||["Rent","Buy"].includes(Ne==null?void 0:Ne.purchaseType),ht=!!(C&&k&&m&&(m==null?void 0:m.toLowerCase())!=="tve"&&m!==Ze);
1if(!we&&m&&(m==null?void 0:m.toLowerCase())!=="tve"&&C&&k&&!qe)return m!==Ze?u(!0):(0,w.publishRedirect)("/");if(!Be&&!fe&&oe.get("magiclink")!=="success"){var Ct;let He=(t==null||(Ct=t.moduleData)===null||Ct===void 0?void 0:Ct.moduleType)==="CheckoutModule";(0,tn.checkUserServiceWithMonetisation)({user:C,isSubscribed:k,isTveLoggedIn:X,isCheckout:He,isPurchasingDifferentPlan:ht})}}return(0,e.useEffect)(()=>{O()},[]),e.createElement(e.Fragment,null,e.createElement(qi,{...t,isUpgrade:p}),p?e.createElement(en.default,{metadataMap:S,isViewplans:!1}):e.createElement(e.Fragment,null))},on=Yl},78344(Ao,yt,o){"use strict";o.r(yt),o.d(yt,{default:()=>r});var e=o(96540),w=o(73851),$=o(47767),s=o(43543),Ue=o(77869),i=o(70493),Le=o(51612);const U=({data:E,metadataMap:y,layoutSettings:ne,handleRedirection:ke,fontSettings:j})=>{var Se,d,se,f;const[be,q]=(0,e.useState)(null),Ke=(0,$.Zp)(),Je=(0,Ue.getFontsStyles)(j),{comparePlansHeading:T,planBoxTitle:at,planBoxDescription:Yt,planBoxAmount:Pt,swipeToInfo:G}=Je||{},je=((f=window)===null||f===void 0||(se=f.app_data)===null||se===void 0||(d=se.appcmsMain)===null||d===void 0||(Se=d.monetizationConfig)===null||Se===void 0?void 0:Se.showPlanFromPlanInfo)||!1,Z=ye=>{const te=ye===be?null:ye;if(q(te),te===null)sessionStorage.removeItem("currentPlan");else{let pt=(0,w.structuredPlan)(E[te]);sessionStorage.setItem("selectedPlan",te.toString()),sessionStorage.setItem("currentPlan",JSON.stringify(pt))}};(0,e.useEffect)(()=>{const ye=sessionStorage.getItem("selectedPlan");if(ye!==null)q(parseInt(ye));else{let te=(0,w.fetchCurrentPlan)();
1E==null||E.forEach((pt,Vt)=>{(pt==null?void 0:pt.id)===(te==null?void 0:te.planId)&&q(Vt)})}},[]);const ft=[y==null?void 0:y.planHeadingTitle],Ce=E==null?void 0:E.reduce((ye,te)=>{var pt,Vt,ro,io,ae,ve,kt,l,$t,Ot;return ft.push({title:je&&(!(te==null||(Vt=te.planDetails)===null||Vt===void 0||(pt=Vt[0])===null||pt===void 0)&&pt.title)?te==null||(io=te.planDetails)===null||io===void 0||(ro=io[0])===null||ro===void 0?void 0:ro.title:te.name,description:je&&(!(te==null||(ve=te.planDetails)===null||ve===void 0||(ae=ve[0])===null||ae===void 0)&&ae.description)?te==null||(l=te.planDetails)===null||l===void 0||(kt=l[0])===null||kt===void 0?void 0:kt.description:te.description,price:te.planDetails[0].recurringPaymentAmount,duration:te.renewalCycleType,renewalCyclePeriodMultiplier:te==null?void 0:te.renewalCyclePeriodMultiplier,currency:te.planDetails[0].recurringPaymentCurrencyCode,displayStrikeThroughPrice:te.planDetails[0].displayStrikeThroughPrice,strikeThroughPrice:te.planDetails[0].strikeThroughPrice}),te==null||(Ot=te.planDetails[0])===null||Ot===void 0||($t=Ot.featureDetails)===null||$t===void 0||$t.forEach(zt=>{zt.textToDisplay&&(ye.includes(zt.textToDisplay)||ye.push(zt.textToDisplay))}),ye},[]),Ye=Ce==null?void 0:Ce.map(ye=>{const te=[ye];
1return E==null||E.forEach(pt=>{var Vt,ro;let io;const ae=pt==null||(ro=pt.planDetails[0])===null||ro===void 0||(Vt=ro.featureDetails)===null||Vt===void 0?void 0:Vt.some(ve=>ve.value==="N"?!1:ve.textToDisplay===ye?(io=ve.value==="Y"?"\u2713":ve.value,!0):!1);te.push(ae?io:"X")}),te}),Ft=ye=>{const te=document.getElementById("scroll-container");te==null||te.scrollBy({left:ye,behavior:"smooth"}),setTimeout(()=>{(0,i.yV)(te)},300)},rt=ye=>({fontFamily:ye==null?void 0:ye.fontFamily,fontSize:ye==null?void 0:ye.fontSize});return e.createElement("div",{className:"container-wrapper",style:{color:ne==null?void 0:ne.planBoxTextColor}},e.createElement("div",{className:"button-arrow"},(ft==null?void 0:ft.length)>2?e.createElement(e.Fragment,null,e.createElement("div",{className:"left-arrow disabled",onClick:()=>Ft(-380)},(0,Le.RZ)("#ffffff")),e.createElement("div",{className:"arrow-text",style:{...rt(G)}},(y==null?void 0:y.arrowsForMorePlans)||"Click arrows to see more plans"),e.createElement("div",{className:"right-arrow",onClick:()=>Ft(380)},(0,Le.EB)("#ffffff"))):""),e.createElement("div",{className:"table-wrapper",id:"scroll-container"},e.createElement("div",{className:"scrollable-content"},e.createElement("div",{className:"header-wrapper"},ft.map((ye,te)=>e.createElement("div",{key:te,onClick:()=>te!==0&&Z(te-1),className:`${te!==0?"cursor-pointer":""}`,id:`${be===te-1?"selected-column-header":""}`,style:be===te-1?{background:ne==null?void 0:ne.planBoxPrimaryBgColor,border:`3px solid ${ne==null?void 0:ne.planBoxSelectedBorderColor}`}:{background:te!==0?ne==null?void 0:ne.planBoxSecondaryBgColor:{}}},ye.title?e.createElement("section",{className:"bill-container"},e.createElement("section",{className:"bill-plan"},e.createElement("span",{style:{...rt(at)}},ye.title),e.createElement("span",{style:{...rt(Yt)}},ye.description)),ye!=null&&ye.displayStrikeThroughPrice&&(ye!=null&&ye.strikeThroughPrice)?e.createElement("section",{className:"striked-plan"},e.createElement("section",{className:"striked bill-price",style:{...rt(Pt)}},`${(0,s.Qn)(ye.currency)}${ye.price}/${(0,s.ps)(ye.duration,ye.renewalCyclePeriodMultiplier)}`),e.createElement("section",{className:"bill-price",style:{...rt(Pt)}},`${(0,s.Qn)(ye.currency)}${ye.strikeThroughPrice}/${(0,s.ps)(ye.duration,ye.renewalCyclePeriodMultiplier)}`)):e.createElement(e.Fragment,null,ye.price?e.createElement("section",{className:"bill-price",style:{...rt(Pt)}},`${(0,s.Qn)(ye.currency)}${ye.price}/${(0,s.ps)(ye.duration,ye.renewalCyclePeriodMultiplier)}`):null)):e.createElement("span",{style:{...rt(T)}},ye)))),e.createElement("div",{className:"body-wrapper"},Ye.map((ye,te)=>e.createElement("div",{className:"row-wrapper",key:te},ye.map((pt,Vt)=>{var ro,io;return e.createElement("div",{style:be===Vt-1?{background:ne==null?void 0:ne.planBoxSelectedColor}:{background:ne==null?void 0:ne.PlanBoxUnSelectedColor,fontFamily:Je==null||(ro=Je.planFeatures)===null||ro===void 0?void 0:ro.fontFamily,fontSize:Je==null||(io=Je.planFeatures)===null||io===void 0?void 0:io.fontSize},key:Vt,className:`${be===Vt-1?"selected-column":""}`},pt)})))),be!==null&&e.createElement("div",{className:"subscription-button-wrapper"},e.createElement("div",{className:"subscription-button"},e.createElement("div",null),E.map((ye,te)=>e.createElement("div",{key:te,style:be===te?{background:ne==null?void 0:ne.planBoxSelectedColor}:{},className:`${be===te?"selected-column":""}`},be===te&&e.createElement(e.Fragment,null,e.createElement("button",{"aria-label":"Subscribe",onClick:()=>ke(E[be]),style:{background:ne==null?void 0:ne.planBoxCtaBgColor},className:"subscribe-button"},y==null?void 0:y.susbcribeCtatext),e.createElement("div",{onClick:()=>Ke((y==null?void 0:y.termsApplyPermalink)||"/tos"),className:"terms-apply-permalink"},(y==null?void 0:y.termsApplyTitle)||"Terms Apply")))))))))};var me=o(88909);const B=({data:E,metadataMap:y,layoutSettings:ne,handleRedirection:ke})=>{const[j,Se]=(0,e.useState)(null),d=E.reduce((f,be)=>(be.planDetails[0].featureDetails.forEach(q=>{q.textToDisplay&&(f.includes(q.textToDisplay)||f.push(q.textToDisplay))}),f),[]),se=E.map(f=>{const be=[];return be.push({title:f.name,description:f.description,price:f.planDetails[0].recurringPaymentAmount,duration:f.renewalCycleType,renewalCyclePeriodMultiplier:f==null?void 0:f.renewalCyclePeriodMultiplier,currency:f.planDetails[0].recurringPaymentCurrencyCode,displayStrikeThroughPrice:f.planDetails[0].displayStrikeThroughPrice,strikeThroughPrice:f.planDetails[0].strikeThroughPrice}),d.forEach(q=>{let Ke;const Je=f.planDetails[0].featureDetails.some(T=>T.value==="N"?!1:T.textToDisplay===q?(Ke=T.value==="Y"?"\u2713":T.value,!0):!1);be.push({value:Je?Ke:"X",feature:q})}),be});return(0,e.useEffect)(()=>{const f=sessionStorage.getItem("selectedPlan");if(f!==null)Se(parseInt(f));else{let be=(0,w.fetchCurrentPlan)();
1E==null||E.forEach((q,Ke)=>{(q==null?void 0:q.id)===(be==null?void 0:be.planId)&&Se(Ke)})}},[]),e.createElement("div",{className:"mobile-table-wrapper"},se.map((f,be)=>{var q,Ke,Je;return e.createElement("div",{key:be,className:"column"},e.createElement("div",{className:"column-header",style:j===be?{background:ne==null?void 0:ne.planBoxPrimaryBgColor,border:`3px solid ${ne==null?void 0:ne.planBoxSelectedBorderColor}`}:{}},e.createElement("section",{className:"bill-container"},e.createElement("section",{className:"bill-plan"},e.createElement("span",null,f[0].title),e.createElement("span",null,f[0].description)),!((Ke=f[0])===null||Ke===void 0)&&Ke.displayStrikeThroughPrice&&(!((Je=f[0])===null||Je===void 0)&&Je.strikeThroughPrice)?e.createElement("section",{className:"striked-plan"},e.createElement("section",{className:"striked bill-price"},`${(0,s.Qn)(f[0].currency)}${f[0].price}/${(0,s.ps)(f[0].duration,f[0].renewalCyclePeriodMultiplier)}`),e.createElement("section",{className:"bill-price"},`${(0,s.Qn)(f[0].currency)}${f[0].strikeThroughPrice}/${(0,s.ps)(f[0].duration,f[0].renewalCyclePeriodMultiplier)}`)):e.createElement("section",{className:"bill-price"},`${(0,s.Qn)(f[0].currency)}${f[0].price}/${(0,s.ps)(f[0].duration,f[0].renewalCyclePeriodMultiplier)}`))),e.createElement("div",{className:"feature-wrapper"},f.slice(1).map((T,at)=>e.createElement("div",{key:at,className:"feature-detail"},e.createElement("span",{className:"feature"},T.value),e.createElement("span",{className:"feature"},T.feature)))),e.createElement("div",{className:"sub-btn-container"},e.createElement("button",{"aria-label":"Select a plan",onClick:()=>{let T=(0,w.structuredPlan)(E[be]);sessionStorage.setItem("currentPlan",JSON.stringify(T)),ke(E[j])},className:"sub-btn"},(q=y==null?void 0:y.susbcribeCtatext)!==null&&q!==void 0?q:"Select")))}))};var A=o(47281),c=o(753),ge=o(61171),n=o.n(ge),L=o(30832),W=o(37505),M=o(30209),Y=o(12308),P=o(92857);const H=({metadataMap:E})=>{const y=(0,$.Zp)(),ne=async()=>{var ke,j,Se;let d=(0,Y.getStorageItem)("routeState"),se=(0,Y.getStorageItem)("isRedirected")||{redirect:!1,path:""},f=!0,be=(j=window)===null||j===void 0||(ke=j.location)===null||ke===void 0?void 0:ke.pathname;if(se!=null&&se.redirect){y(se==null?void 0:se.path);return}let q=await(0,P.e)(d,(Se=location)===null||Se===void 0?void 0:Se.pathname,f,!1,be);y(q)};return e.createElement("div",{className:"no-plans-container"},e.createElement("div",{className:"no-plans-content"},e.createElement("p",{className:"no-plans-heading"},E==null?void 0:E.noPlansHeading),e.createElement("p",{className:"no-plans-description"},E==null?void 0:E.noPlansBody),e.createElement("button",{className:"site-cta-color no-plan-continue-btn",onClick:()=>ne()},(E==null?void 0:E.withoutSubscriptionText)||"Continue without a subscription"),e.createElement("div",{className:"faq-description",onClick:()=>y("/faq")},(E==null?void 0:E.faqText)||"For more information, visit our FAQs")))};var N=o(50316),h=o(48220);const r=E=>{var y,ne,ke,j,Se;const[d,se]=(0,e.useState)([]),[f,be]=(0,e.useState)(!1);let q=E==null||(y=E.moduleData)===null||y===void 0?void 0:y.metadataMap;const[Ke,Je]=(0,e.useState)(window.innerWidth);let T=E==null||(ke=E.moduleData)===null||ke===void 0||(ne=ke.layout)===null||ne===void 0?void 0:ne.settings,at=E==null||(Se=E.moduleData)===null||Se===void 0||(j=Se.layout)===null||j===void 0?void 0:j.fontSetting;const Yt=async()=>{var G,je;be(!0);let Z=(0,Y.getStorageItem)("isRedirected"),ft=Z==null?void 0:Z.isCheckout,Ce=(0,i.Nc)((je=window)===null||je===void 0||(G=je.location)===null||G===void 0?void 0:G.href);if((Z!=null&&Z.redirect||Ce)&&!ft){let Ye=sessionStorage.getItem("contentPlanIds"),Ft=sessionStorage.getItem("currentPlan"),rt=await(0,me.jr)(Ce||Ye,Ce,!0);!Ft&&(rt!=null&&rt.length)&&sessionStorage.setItem("currentPlan",JSON.stringify(rt[0])),se(rt),be(!1)}else{let Ye=await(0,me.wQ)();se(Ye),be(!1)}},Pt=async(G,je=!1)=>{var Z,ft;const Ce=(0,Y.getStorageItem)("AuthenticationStore"),Ye=Ce==null?void 0:Ce.user,Ft=(0,h.sm)()&&!(0,h.gM)()&&(Ye==null||(ft=Ye.subscription)===null||ft===void 0||(Z=ft.subscriptionPlanInfo)===null||Z===void 0?void 0:Z.renewable);let rt=(0,w.fetchCurrentPlan)();if(G){let pt={planId:rt==null?void 0:rt.planId,planName:rt==null?void 0:rt.title,planType:rt==null?void 0:rt.cycleType,planDesc:rt==null?void 0:rt.description},Vt=(0,w.fetchCurrentPlan)();
1if(Vt){let ve={ename:c.ANALYTICSEVENTS.PLAN_UPDATE,data:pt};n().publish("user-analytics",ve),(0,s.iR)({eventName:"plan_update",subSection:null,type:"plan",reason:Vt==null?void 0:Vt.title,status:rt==null?void 0:rt.title,additionalLabel:null,action:"Update Plan",paymentStatus:null,eventCategory:"Subscription",section:"viewplans"})}else{let ve={ename:c.ANALYTICSEVENTS.PLAN_SELECTION,data:pt};n().publish("user-analytics",ve),(0,s.iR)({eventName:"plan_selection",subSection:null,type:"plan",reason:rt==null?void 0:rt.title,status:null,additionalLabel:null,action:"Plan Selection",paymentStatus:null,eventCategory:"Subscription",section:"viewplans"})}let ro=await(0,L.nf)(),io={item_id:G==null?void 0:G.id,item_name:G==null?void 0:G.name,price:G&&G.planDetails&&G.planDetails[0]&&G.planDetails[0].recurringPaymentAmount,quantity:1},ae={ecommerce:{currency:G&&G.planDetails&&G.planDetails[0]&&G.planDetails[0].recurringPaymentCurrencyCode,value:(G==null?void 0:G.planDetails)&&(G==null?void 0:G.planDetails[0])&&(G==null?void 0:G.planDetails[0].recurringPaymentAmount),items:[{...io,...ro}]}};(0,L.Ay)("begin_checkout",ae,null),(0,L.Ay)("add_to_cart",ae,null),(0,L.Ay)("view_item",ae,null),(0,L.Ay)("view_cart",ae,null),n().publish("user-analytics",{ename:"add_to_cart",data:ae})}const ye=(0,s.Pl)();if(je&&ye){var te;(0,s.t8)({moduleDataLayout:E==null||(te=E.moduleData)===null||te===void 0?void 0:te.layout,currentPlan:rt,pageType:"Plan Page",stepsCompleted:["auth-verified","plan-selection","plan-upgrade-cancel"]}),(0,A.publishRedirect)(ye)}else{let pt=(0,Y.getStorageItem)("isRedirected");if(pt!=null&&pt.isMultiview&&!je){(0,Y.setStorageItem)("isRedirected",{...pt,isMultiview:!1}),(0,A.publishRedirect)("/checkout");return}if(!je&&(pt!=null&&pt.isUpgradePlan||Ft)){(0,M.dr)(!0);return}if(pt!=null&&pt.redirect){(0,A.publishRedirect)(pt==null?void 0:pt.path);return}let{userId:Vt}=await(0,s.CX)();if(Vt){if(je){const ro=(pt==null?void 0:pt.path)||"/";(0,Y.setStorageItem)("isRedirected",{...pt||{},path:ro}),(0,A.publishRedirect)(ro);return}if(!(pt!=null&&pt.redirect))return(0,A.publishRedirect)("/checkout");(0,i.OZ)()}else(0,A.publishRedirect)("/checkout")}};return(0,e.useEffect)(()=>{Yt();const G=()=>Je(window.innerWidth);return window.addEventListener("resize",G),()=>window.removeEventListener("resize",G)},[]),e.createElement(e.Fragment,null,e.createElement("div",{className:Ke>768?"plans-container":"plans-container mobile-plans-container"},e.createElement(W.default,{metadataMap:q,isViewplans:!0}),e.createElement("div",{className:"cross",onClick:()=>Pt(null,!0)},(0,Le.$A)("#fff")),f?e.createElement(N.A,null):e.createElement(e.Fragment,null,d!=null&&d.length?Ke>768?e.createElement(U,{metadataMap:q,layoutSettings:T,data:d,handleRedirection:Pt,fontSettings:at}):e.createElement(B,{handleRedirection:Pt,metadataMap:q,layoutSettings:T,data:d}):e.createElement(H,{metadataMap:q}))))}},51108(Ao,yt,o){"use strict";var e=o(96540);const w=()=>e.createElement("svg",{width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M23.9062 35.814L32.0937 44L48.0937 28",stroke:"#007F06",strokeWidth:"5",strokeLinecap:"round"}),e.createElement("rect",{x:"1.5",y:"1.5",width:"69",height:"69",rx:"34.5",stroke:"#007F06",strokeWidth:"3"})),$=()=>e.createElement("svg",{width:"72",height:"72",viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M25.3918 46.6066C24.6107 45.8256 24.6107 44.5592 25.3918 43.7782L43.7765 25.3934C44.5576 24.6124 45.8239 24.6123 46.605 25.3934C47.386 26.1744 47.386 27.4408 46.605 28.2218L28.2202 46.6066C27.4391 47.3877 26.1728 47.3876 25.3918 46.6066Z",fill:"#CF0A2C"}),e.createElement("path",{d:"M46.605 46.6066C45.8239 47.3877 44.5576 47.3876 43.7765 46.6066L25.3918 28.2218C24.6107 27.4408 24.6107 26.1744 25.3918 25.3934C26.1728 24.6124 27.4391 24.6123 28.2202 25.3934L46.605 43.7782C47.386 44.5592 47.386 45.8256 46.605 46.6066Z",fill:"#CF0A2C"}),e.createElement("rect",{x:"1.5",y:"1.5",width:"69",height:"69",rx:"34.5",stroke:"#CF0A2C",strokeWidth:"3"})),s=()=>e.createElement("svg",{width:"500",height:"52",viewBox:"0 0 500 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"}
1,e.createElement("path",{d:"M474 26L462 38M462 26L474 38",stroke:"#FDFDFD",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}));o.d(yt,["ie",0,$,"rv",0,w,"sk",0,s])},76846(Ao,yt,o){"use strict";var e=o(61171),w=o.n(e),$=o(44561),s=o(43543),Ue=o(3088),i=o(92857),Le=o(18987),st=o(23823),U=o(12308),me=o(48220),ue,B,A,c;const ge=(c=window)===null||c===void 0||(A=c.app_data)===null||A===void 0||(B=A.appcmsMain)===null||B===void 0||(ue=B.apiConfig)===null||ue===void 0?void 0:ue.apiBaseUrl,n=window.app_data.appcmsPlatform.tveSettings.tveProvider,L=`mutation ($site: String!, $input: SignInTveInput!) {
2    identitySignInTve(site: $site, input: $input) {
3      userId
4      tveUserId
5      provider
6      providers
7      idpName
8      idpLogo
9      planId
10    }
11  }`,W=({tveUserId:M=null,mvpd:Y,zip:P=null,encryptedZip:Q=null,path:H="/",resourceIds:N,setIsLoading:h,toolboxAccessToken:_e})=>{var F,r,E;if(window.cancel)return;window.cancel=!0;const y=se=>{const f=be=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return f()+f()+"-"+f()+"-"+f()+"-"+f()+"-"+f()+f()+f()};let ne=(0,s.IP)(),ke=`${ge}/graphql`;const j=(0,U.getStorageItem)("AuthenticationStore");let Se=j==null?void 0:j.user,d={site:((E=window)===null||E===void 0||(r=E.app_data)===null||r===void 0||(F=r.site)===null||F===void 0?void 0:F.siteInternalName)||null,input:{mvpdProvider:Y,provider:Y,userId:Se==null?void 0:Se.userId,idpName:Y,email:(Se==null?void 0:Se.email)||"",platform:"web_browser",device:"web_browser",deviceName:"WEB",deviceId:ne,channelIds:N,tveUserId:M||(Se==null?void 0:Se.userId),toolboxAccessToken:_e}};(P!==null||P!==void 0)&&(d.input.adobeMetadata={zip:P}),(Q!==null||Q!==void 0)&&(d.input.adobeMetadata={...d.input.adobeMetadata,encryptedZip:Q}),(0,s.gf)(se=>{var f;let be={"x-api-key":(f=window)===null||f===void 0?void 0:f.xApiKey,authorization:se};if(!_e){var q,Ke,Je,T;(0,st.$X)("TVE_LOGIN_SUCCESS"),(0,st.$X)("TVE_VL_LOGIN_INIT",Y),(0,s.iR)({eventName:"tve_vl_login_init",subSection:null,type:"tve",reason:Y,status:null,additionalLabel:null,action:"VL Login Init",paymentStatus:null,eventCategory:"Authentication",section:"checkout"}),(0,s.iR)({eventName:"tve_provider_selected",tveProvider:(T=window)===null||T===void 0||(Je=T.app_data)===null||Je===void 0||(Ke=Je.appcmsPlatform)===null||Ke===void 0||(q=Ke.tveSettings)===null||q===void 0?void 0:q.tveProvider,type:"tve",eventCategory:"Authentication",section:"checkout"})}(0,$.Ay)(ke,L,d,be).then(at=>{var Yt,Pt,G,je;window.cancel=!1;const Z=JSON.parse(sessionStorage.getItem("checkoutInitPageData"));let ft=localStorage.getItem("entitlementToken"),Ce=JSON.parse(ft),Ye=(Ce==null?void 0:Ce.mvpd)||null,Ft={pageUrl:Z==null?void 0:Z.pageUrl,mvpdProvider:Ye,tveProvider:(je=window)===null||je===void 0||(G=je.app_data)===null||G===void 0||(Pt=G.appcmsPlatform)===null||Pt===void 0||(Yt=Pt.tveSettings)===null||Yt===void 0?void 0:Yt.tveProvider};(0,st.$X)("TVE_VL_LOGIN_SUCCESS"),(0,s.iR)({eventName:"tve_vl_login_success",subSection:null,type:"tve",reason:Ft==null?void 0:Ft.mvpdProvider,status:null,additionalLabel:null,action:"VL Login Success",paymentStatus:null,eventCategory:"Authentication",section:"checkout"});let rt=Le.default.get("token")&&JSON.parse(Le.default.get("token"));const ye=(0,U.getStorageItem)("AuthenticationStore");(0,Ue.updateAuthorisationStore)({userdetails:{...at==null?void 0:at.identitySignInTve,...Ce,authorizationToken:rt==null?void 0:rt.authorizationToken,isSubscribed:(0,me.sm)()}}).then(()=>{w().publish("registerTVE",H)})}).catch(at=>{var Yt,Pt,G,je;console.log(at),(0,st.$X)("TVE_VL_LOGIN_FAILURE"),(0,s.iR)({eventName:"tve_vl_login_failure",subSection:null,type:"tve",reason:(je=window)===null||je===void 0||(G=je.app_data)===null||G===void 0||(Pt=G.appcmsPlatform)===null||Pt===void 0||(Yt=Pt.tveSettings)===null||Yt===void 0?void 0:Yt.tveProvider,status:null,additionalLabel:null,action:"VL Login Failure",paymentStatus:null,eventCategory:"Authentication",section:"checkout"}),window.cancel=!1,h==null||h(!1),w().publish("apploading",!1),w().publish("update-error-message","error while connecting to TVE")})})};o.d(yt,["i",0,W])},64707(Ao,yt,o){"use strict";o.d(yt,{A:()=>ft});var e=o(96540),w,$,s,Ue,i,Le,st,U,me,ue,B,A,c,ge,n,L,W,M,Y,P,Q,H,N,h,_e,F,r,E,y,ne,ke,j,Se,d,se,f,be,q,Ke,Je;let T=(Ue=window)===null||Ue===void 0||(s=Ue.app_data)===null||s===void 0||($=s.appcmsMain)===null||$===void 0||(w=$.brand)===null||w===void 0?void 0:w.monetizationCta,at={backgroundColor:T==null||(i=T.primary)===null||i===void 0?void 0:i.backgroundColor,color:T==null||(Le=T.primary)===null||Le===void 0?void 0:Le.textColor,border:`${T==null||(U=T.primary)===null||U===void 0||(st=U.border)===null||st===void 0?void 0:st.width} solid ${T==null||(ue=T.primary)===null||ue===void 0||(me=ue.border)===null||me===void 0?void 0:me.color}`},Yt={backgroundColor:T==null||(B=T.primaryHover)===null||B===void 0?void 0:B.backgroundColor,color:T==null||(A=T.primaryHover)===null||A===void 0?void 0:A.textColor,border:`${T==null||(ge=T.primaryHover)===null||ge===void 0||(c=ge.border)===null||c===void 0?void 0:c.width} solid ${T==null||(L=T.primaryHover)===null||L===void 0||(n=L.border)===null||n===void 0?void 0:n.color}`},Pt={backgroundColor:T==null||(W=T.secondary)===null||W===void 0?void 0:W.backgroundColor,color:T==null||(M=T.secondary)===null||M===void 0?void 0:M.textColor,border:`${T==null||(P=T.secondary)===null||P===void 0||(Y=P.border)===null||Y===void 0?void 0:Y.width} solid ${T==null||(H=T.secondary)===null||H===void 0||(Q=H.border)===null||Q===void 0?void 0:Q.color}`},G={backgroundColor:T==null||(N=T.secondaryHover)===null||N===void 0?void 0:N.backgroundColor,color:T==null||(h=T.secondaryHover)===null||h===void 0?void 0:h.textColor,border:`${T==null||(F=T.secondaryHover)===null||F===void 0||(_e=F.border)===null||_e===void 0?void 0:_e.width} solid ${T==null||(E=T.secondaryHover)===null||E===void 0||(r=E.border)===null||r===void 0?void 0:r.color}`},je={backgroundColor:T==null||(y=T.option)===null||y===void 0?void 0:y.backgroundColor,color:T==null||(ne=T.option)===null||ne===void 0?void 0:ne.textColor,border:`${T==null||(j=T.option)===null||j===void 0||(ke=j.border)===null||ke===void 0?void 0:ke.width} solid ${T==null||(d=T.option)===null||d===void 0||(Se=d.border)===null||Se===void 0?void 0:Se.color}`},Z={backgroundColor:T==null||(se=T.optionHover)===null||se===void 0?void 0:se.backgroundColor,color:T==null||(f=T.optionHover)===null||f===void 0?void 0:f.textColor,border:`${T==null||(q=T.optionHover)===null||q===void 0||(be=q.border)===null||be===void 0?void 0:be.width} solid ${T==null||(Je=T.optionHover)===null||Je===void 0||(Ke=Je.border)===null||Ke===void 0?void 0:Ke.color}`};function ft(Ce){return function(Ye){const[Ft,rt]=(0,e.useState)({});return(0,e.useEffect)(()=>{let ye=Ye==null?void 0:Ye.ctaStyleType,te={cta:at,ctaHover:Yt};ye=="secondary"&&(te.cta=Pt,te.ctaHover=G),ye=="default"&&(te.cta=je,te.ctaHover=Z),rt(te)},[]),e.createElement(Ce,{...Ye,ctaStyles:Ft})}}},37505(Ao,yt,o){"use strict";o.r(yt);
11var e=o(96540),w=o(61171),$=o.n(w),s=o(58689),Ue=o(26878),i=o(30209),Le=o(47281),st=o(753),U=o(48620),me=o(73851),ue=o(43543),B=o(88909),A=o(12308);const ge=({metadataMap:n,isViewplans:L})=>{var W,M,Y,P,Q,H,N,h;const _e=new URLSearchParams(window.location.search),F=(0,me.fetchCurrentPlan)(),r=_e.get("offer"),E=_e.get("planId"),[y,ne]=(0,e.useState)(F),[ke,j]=(0,e.useState)(r),[Se,d]=(0,e.useState)({}),[se,f]=(0,e.useState)(""),[be,q]=(0,e.useState)(""),[Ke,Je]=(0,e.useState)(!1),[T,at]=(0,e.useState)(null),[Yt,Pt]=(0,e.useState)(null),[G,je]=(0,e.useState)(null),[Z,ft]=(0,e.useState)({upgrade:{title:(n==null?void 0:n.upgradeSubscriptionPopupTitle)||"Upgrade Subscription?",modalState:!1,description:(n==null?void 0:n.upgradeDescriptionText)||"Are you sure want to upgrade your subscription."},status:{title:(n==null?void 0:n.successText)||"Success",modalState:!1,description:(n==null?void 0:n.upgradeSuccessMessage)||"Subscription has been upgraded"}}),[Ce,Ye]=(0,e.useState)(!1),Ft="rgba(255, 255, 255, 0.3)",rt="var(--siteCtaBackgroundColor)",ye=Object.keys(Se).length,te=y==null||(W=y.plansDetail)===null||W===void 0?void 0:W.recurringPaymentAmount,pt=y==null||(M=y.plansDetail)===null||M===void 0?void 0:M.recurringPaymentCurrencyCode,Vt=((N=window)===null||N===void 0||(H=N.app_data)===null||H===void 0||(Q=H.appcmsMain)===null||Q===void 0||(P=Q.brand)===null||P===void 0||(Y=P.cta)===null||Y===void 0?void 0:Y.rounded)||!1,ro=async()=>{var dt,Rt,No;const Bt=(0,A.getStorageItem)("AuthenticationStore");let Io=Bt==null?void 0:Bt.user;(0,Le.publishAppLoading)(!0),ft({...Z,upgrade:{...Z.upgrade,modalState:!1}});let ko={site:(No=window)===null||No===void 0||(Rt=No.app_data)===null||Rt===void 0||(dt=Rt.site)===null||dt===void 0?void 0:dt.siteInternalName,req:{stripe:{planId:y==null?void 0:y.planId,planIdentifier:y==null?void 0:y.identifier,platform:"web_browser",subscription:"stripe",appliedOffers:sessionStorage.getItem("offerCode")?[sessionStorage.getItem("offerCode")]:null,userId:Io==null?void 0:Io.userId}}};(0,U.fG)(ko)},io=dt=>{if((0,Le.publishAppLoading)(!1),!dt)Ye(!0),ft({...Z,status:{...Z.status,modalState:!0,title:(n==null?void 0:n.upgradeFailedText)||"upgrade Failed",description:(n==null?void 0:n.upgradeFailedMessage)||"unable to upgrade the subscription"}});else{let Rt={planId:y==null?void 0:y.planId,planName:y==null?void 0:y.title,planType:y==null?void 0:y.type};$().publish("user-analytics",{ename:st.ANALYTICSEVENTS.PLAN_UPDATE,data:Rt}),ft({...Z,status:{...Z.status,modalState:!0}})}},ae=async()=>{if(E&&!y){const dt=await(0,B.jr)(E,!0);if(dt&&(dt!=null&&dt.length)){const Rt=(0,me.structuredPlan)(dt[0]);ne(Rt),sessionStorage.setItem("currentPlan",JSON.stringify(Rt))}}},ve=async()=>{try{const[dt]=await(0,ue.nm)(E);return!!(dt&&(dt!=null&&dt.renewable))}catch(dt){return!1}},kt=async()=>{if(E&&!await ve())return(0,Le.publishRedirect)("/");(0,i.eL)(dt=>{ft({...Z,upgrade:{...Z.upgrade,modalState:!0}});const Rt=(0,me.fetchCurrentPlan)();ne(Rt)}),(0,i.Yr)(io),L||ft({...Z,upgrade:{...Z.upgrade,modalState:!0}}),r&&(sessionStorage.setItem("offerCode",r),$t())};(0,e.useEffect)(()=>{kt(),ae()},[]);const l=async()=>{const dt={id:y==null?void 0:y.planId,offerCode:ke==null?void 0:ke.toUpperCase()};try{const Rt=await(0,Ue.do)(dt);Rt&&Rt.data&&(at(Rt.data.pretaxAmount||Rt.data.amount),Pt(Rt.data.taxAmount),je(Rt.data.amount),f((n==null?void 0:n.promoValidatingSuccess)||"Promo Code Applied Successfully"),setTimeout(()=>f(!1),5e3)),(0,Le.publishAppLoading)(!1)}catch(Rt){(0,Le.publishAppLoading)(!1);let No=Rt.response&&Rt.response.data&&Rt.response.data.code,Bt=n[No]||(n==null?void 0:n.promoValidatingError)||"The Offer Code is already used";No==="OFFER_ALREADY_USED"&&(sessionStorage.removeItem("offerCode"),sessionStorage.removeItem("promoCode")),q(Bt)}},$t=async dt=>{var Rt,No,Bt;dt==null||dt.stopPropagation(),dt==null||dt.preventDefault(),$().publish("user-analytics",{ename:st.ANALYTICSEVENTS.APPLY_COUPON,data:{promotionCode:Io}}),Je(!0),(0,Le.publishAppLoading)(!0);const Io=ke==null?void 0:ke.toUpperCase();if(sessionStorage.setItem("offerCode",Io),ye){Je(!1),(0,Le.publishAppLoading)(!1);return}const ko={offerCode:Io,subscriptionPlanId:(y==null?void 0:y.planId)||E||"",site:(Bt=window)===null||Bt===void 0||(No=Bt.app_data)===null||No===void 0||(Rt=No.site)===null||Rt===void 0?void 0:Rt.siteInternalName},co=await(0,Ue.wy)(ko);
11!co.isError&&co.data&&co.data.id?(Je(!1),d({displayName:co.data.displayName,name:co.data.name,code:Io}),j(`${co.data.displayName||co.data.name||""}`),l()):(Je(!1),(0,Le.publishAppLoading)(!1),sessionStorage.removeItem("offerCode",Io),sessionStorage.removeItem("promoCode"),q((n==null?void 0:n.promoValidatingError)||"Invalid Promo Code"),setTimeout(()=>q(""),5e3))},Ot=()=>{(0,Le.publishAppLoading)(!0),_e.delete("offer"),sessionStorage.removeItem("offerCode"),sessionStorage.removeItem("promoCode"),d({}),j(""),at(null),Pt(null),je(null),q(""),(0,Le.publishAppLoading)(!1)},zt=()=>{const dt=(0,ue.Pl)();if(dt)(0,ue.t8)({currentPlan:y,pageType:"Upgrade Subscription",stepsCompleted:["auth-verified","plan-selection","plan-upgrade-cancel"]}),(0,Le.publishRedirect)(dt);else{let Rt=(0,A.getStorageItem)("isRedirected");$().publish("hide-upgrade-popup",!0),(0,Le.publishRedirect)((Rt==null?void 0:Rt.path)||"/")}},Jt=async()=>{const dt=(0,ue.Pl)();Ce||(await(0,Ue.Q3)(),(0,Le.publishAppLoading)(!1)),dt&&(0,ue.t8)({currentPlan:y,pageType:"Upgrade Subscription",stepsCompleted:["auth-verified","plan-selection","plan-upgraded"]}),$().publish("hide-upgrade-popup",!0),(0,Le.publishRedirect)(dt||"/")};return e.createElement(e.Fragment,null,e.createElement("div",{className:"upgrade-wrapper"},e.createElement(s.default,{show:Z.upgrade.modalState,enableBtns:!0,cancelHandler:()=>zt(),confirmHandler:()=>ro(),title:Z.upgrade.title,contentExtraPadding:!0,contentAlignment:"center",description:Z.upgrade.description,confirmCTA:(n==null?void 0:n.confirmText)||"Confirm",cancelCTA:(n==null?void 0:n.cancelText)||"Cancel"},e.createElement("div",{className:"offer-container-upgrade-popup"},se&&e.createElement("div",{className:"success-msg"},se),be&&e.createElement("div",{className:"err-msg"},be),e.createElement("div",{className:"plan-details"},e.createElement("h4",null,y==null||(h=y.plansDetail)===null||h===void 0?void 0:h.title),T?e.createElement("div",{className:"price-container"},e.createElement("span",{className:"original-price strike-through"},(0,ue.Qn)(pt)," ",te),e.createElement("span",{className:"discounted-price"},(0,ue.Qn)(pt)," ",T)):e.createElement("span",null,(0,ue.Qn)(pt),te)),e.createElement("div",{className:"coupon-input"},e.createElement("input",{className:`offer-code-input ${ye>0?"applied-code":""}`,placeholder:(n==null?void 0:n.addPromoPlaceholder)||"Add Promo",onChange:dt=>{j(dt.target.value),q("")},onKeyPress:dt=>{dt.key==="Enter"&&ke&&$t(dt)},value:ke,style:{background:"transparent",color:"#000"}}),ye>0&&e.createElement("button",{"aria-label":"cancel",className:"remove-code-btn site-cta-color site-cta-background-color",onClick:Ot,style:{...Vt&&{borderRadius:"30px"}}},(n==null?void 0:n.cancelPromo)||"Remove"),!se&&ye===0&&e.createElement("button",{disabled:!ke,style:{...ke?{background:rt}:{background:`${Ft}`},...Vt&&{borderRadius:"30px"}},"aria-label":"apply",className:`apply site-cta-color ${Ke?"processing":""}`,onClick:dt=>$t(dt)},Ke?(n==null?void 0:n.processingTxt)||"Processing":(n==null?void 0:n.applyCode)||"Apply")))),e.createElement(s.default,{show:Z.status.modalState,enableBtns:!0,confirmHandler:Jt,cancelHandler:zt,title:Z.status.title,contentExtraPadding:!0,contentAlignment:"center",confirmCTA:"Continue",description:Z.status.description,options:{deleteConfig:{isDelete:!0,isMessage:!0}}})))};o.d(yt,["default",0,ge])},37435(Ao,yt,o){"use strict";var e=o(19324),w=o(18987),$,s,Ue,i;let Le=window.app_data.appcmsPlatform.tveSettings.urlScheme,U=(((i=window)===null||i===void 0||(Ue=i.app_data)===null||Ue===void 0||(s=Ue.appcmsPlatform)===null||s===void 0||($=s.tveSettings)===null||$===void 0?void 0:$.version)||"v1")=="v1"?window.app_data.appcmsPlatform.tveSettings.softwareStatement:window.app_data.appcmsPlatform.tveSettings.softwareStatementV2;const me={osName:"web",version:navigator.appVersion,model:navigator.userAgent||"",os:navigator.platform||"",browser:navigator.userAgent||""},ue=btoa(JSON.stringify(me)),B=()=>{const c=`${Le}/o/client/register`;return(0,e.A)({method:"post",url:c,headers:{"Content-Type":"application/json","X-Device-Info":ue},data:{software_statement:U}})},A=({grant_types:c,client_id:ge,client_secret:n})=>{const L=`${Le}/o/client/token`;return(0,e.A)({method:"post",url:L,headers:{"Content-Type":"application/x-www-form-urlencoded","X-Device-Info":ue},data:{grant_type:c[0],client_id:ge,client_secret:n}}).then(W=>(w.default.set("Tve_Access_token",W.data.access_token),!0))};o.d(yt,["M",0,B,"l",0,A])},95291(Ao,yt,o){"use strict";var e=o(96540),w=o(14546),$=o(63479),s=o(61171),Ue=o.n(s);const Le=st=>
11{const[U,me]=(0,e.useState)(),[ue,B]=(0,e.useState)(!1),A=async()=>{let{moduleData:ge}=await(0,w.j)("LocateModule");me(ge)},c=ge=>{B(ge)};return(0,e.useEffect)(()=>{A(),Ue().subscribe("showHbaFlow",c)},[ue]),e.createElement(e.Fragment,null,ue&&e.createElement("div",{className:"geoLocation-overlay"},e.createElement("div",{className:"overlay__backdrop",onClick:()=>Ue().publish("showHbaFlow",!1)}),e.createElement("div",{className:"overlay__content"},e.createElement($.A,{module:U,NoPlans:!0}))))};o.d(yt,["A",0,Le])},10513(Ao,yt,o){"use strict";var e,w=o(19324),$=o(43543),s=o(6765),Ue=o(23823),i,Le,st,U;const me=window.app_data.appcmsPlatform.tveSettings.urlScheme,ue=window.app_data.appcmsPlatform.tveSettings.toolboxUrl,B=window.app_data.appcmsPlatform.tveSettings.contentProvider,A=(U=window)===null||U===void 0||(st=U.app_data)===null||st===void 0||(Le=st.appcmsMain)===null||Le===void 0||(i=Le.genericMessages)===null||i===void 0?void 0:i.toolboxErrorMessage,c=()=>new URLSearchParams(window.location.search).get("toolbox_user_token"),ge=()=>{const H=`${ue}/v2/auth/${B}/mso.json`;return(0,w.A)({method:"get",url:H}).then(N=>N)},n=()=>{const H=`${ue}/v2/auth/${B}/status.json`;return e({method:"get",url:H}).then(N=>N)},L=(H,N,h)=>{const _e=new URLSearchParams({client_id:B,idp:H,return:N,country:h,response_type:"code"}),F=`${ue}/v2/auth/${B}/login.html?${_e.toString()}`;window.location.href=F},W=async H=>{const N=`${me}/v2/UserServices/device/${H}`,h=await(0,$.gf)();return(0,w.A)({method:"get",url:N,headers:{Authorization:h}}).then(_e=>_e)},M=async()=>{const H=await JSON.parse(localStorage.getItem("toolboxUserData")),N=window.app_data.appcmsPlatform.tveSettings.resourceID,h=`${me}/v2/UserServices/device/${H.token}/hasAccessTo`,_e=await(0,$.gf)();return(0,w.A)({method:"get",url:h,params:{urn:N,action:"view",ip:window.ip},headers:{Authorization:_e}}).then(F=>F).catch(F=>{(F.status==410&&F.response.data.error.errorCode=="CP-006"||F.status==404&&F.response.data.error.errorCode=="CP-004")&&(0,$.hO)().then(r=>{localStorage.removeItem("toolboxUserData"),(0,$.gf)(async E=>{let y=(0,s.A)(E),ne=y==null?void 0:y.userId;(0,$.Sk)(ne,E).then(ke=>{var j;(j=location)===null||j===void 0||j.reload()})})})})},Y=()=>new Promise((H,N)=>{M().then(h=>{if(h.data.access&&((0,Ue.cB)("TVE_AUTHZ_SUCCESS",{mvpdProvider:(0,Ue.GW)()}),H(h)),!h.data.access){var _e,F,r,E,y;const ne=A||h.data.reason;(0,Ue.cB)("TVE_AUTHZ_FAILURE",{mvpdProvider:(0,Ue.GW)(),error:(_e=(F=(r=h.data)===null||r===void 0?void 0:r.errorCode)!==null&&F!==void 0?F:(y=h.data)===null||y===void 0||(E=y.error)===null||E===void 0?void 0:E.errorCode)!==null&&_e!==void 0?_e:null,message:ne!=null?ne:null}),N(ne)}}).catch(h=>{var _e,F,r,E,y,ne,ke,j,Se;const d=A||(h==null||(y=h.response)===null||y===void 0||(E=y.data)===null||E===void 0||(r=E.error)===null||r===void 0?void 0:r.message),se={mvpdProvider:(0,Ue.GW)(),error:(_e=h==null||(j=h.response)===null||j===void 0||(ke=j.data)===null||ke===void 0||(ne=ke.error)===null||ne===void 0?void 0:ne.errorCode)!==null&&_e!==void 0?_e:!(h==null||(Se=h.response)===null||Se===void 0)&&Se.status?String(h.response.status):null,message:(F=d!=null?d:h==null?void 0:h.message)!==null&&F!==void 0?F:null};(0,Ue.cB)("TVE_AUTHZ_FAILURE",se),(0,Ue.cB)("TVE_VL_LOGIN_FAILURE",se),N(d)})}),P=async()=>{const H=await JSON.parse(localStorage.getItem("toolboxUserData")),N=`${me}/v2/UserServices/device/${H.token}`,h=await(0,$.gf)();return(0,w.A)({method:"delete",url:N,headers:{Authorization:h}}).then(_e=>(localStorage.removeItem("toolboxUserData"),_e)).catch(()=>(localStorage.removeItem("toolboxUserData"),!0))},Q=async(H,N)=>{const h=await JSON.parse(localStorage.getItem("toolboxUserData")),_e=`${me}/v2/DeviceServices/activateDevice`,F=await(0,$.gf)();return(0,w.A)({method:"post",url:_e,params:{code:H,userToken:N||h.token},headers:{Authorization:F}}).then(r=>(localStorage.removeItem("toolboxCtvActivationCode"),r)).catch(r=>r)};o.d(yt,["$u",0,L,"NW",0,W,"U3",0,c,"du",0,Q,"fQ",0,P,"oW",0,Y,"pH",0,ge])},46054(Ao,yt,o){"use strict";var e=o(61171),w=o.n(e),$=o(12308),s=o(76846),Ue=o(23823),i=o(10513),Le=o(23870);const st="toolboxAuthZResponse",U="toolboxAuthZDialogDismissed",me="/";let ue=!1;const B=P=>{try{return new URL(P,window.location.origin).pathname}
11catch(Q){return P}},A=()=>window.location.pathname.includes("checkout"),c=P=>P||(A()?me:window.location.pathname),ge=P=>{const Q=(0,$.getStorageItem)("isRedirected");return Q!=null&&Q.redirect&&(Q!=null&&Q.path)?Q.path:c(P)},n=P=>A()?me:P,L=()=>{const P=new URL(window.location.href);P.searchParams.has("toolbox_user_token")&&(P.searchParams.delete("toolbox_user_token"),window.history.replaceState({},"",P.toString()))},W=(P,Q={})=>{const H=P||window.location.pathname;if(B(H)===window.location.pathname){if(Q.keepLoading){ue=!1;return}window.location.replace(H);return}window.location.href=H},M=async(P={})=>{if(typeof window=="undefined"||!(0,Le.o6)())return!1;const Q=(0,i.U3)();if(!Q||ue)return!1;ue=!0;const H=ge(P.fallbackPath),N=n(H);return L(),sessionStorage.removeItem(U),w().publish("apploading",!0),(0,i.NW)(Q).then(async h=>{var _e,F,r;const E=h==null||(r=h.data)===null||r===void 0||(F=r.customer)===null||F===void 0||(_e=F.idp)===null||_e===void 0?void 0:_e.code;(0,Ue.$X)("TVE_LOGIN_SUCCESS",E),(0,Ue.$X)("TVE_VL_LOGIN_INIT",E),localStorage.setItem("toolboxUserData",JSON.stringify(h.data));const y=localStorage.getItem("toolboxCtvActivationCode");return y&&(0,i.du)(decodeURIComponent(y),Q),(0,i.oW)().then(ne=>{var ke,j;sessionStorage.setItem(st,JSON.stringify(ne.data)),w().publish("toolbox-authz-updated"),(0,s.i)({tveUserId:h==null||(j=h.data)===null||j===void 0||(ke=j.customer)===null||ke===void 0?void 0:ke.id,mvpd:E,path:H,setIsLoading:P.setIsLoading||(()=>{}),toolboxAccessToken:Q})}).catch(async ne=>{sessionStorage.setItem(st,JSON.stringify({access:!1,error:typeof ne=="string"?ne:"Toolbox authorization failed"})),await(0,i.fQ)(),w().publish("toolbox-authz-updated"),W(N,{keepLoading:!0})})}).catch(()=>{(0,Ue.$X)("TVE_LOGIN_FAILURE"),(0,Ue.$X)("TVE_VL_LOGIN_FAILURE"),w().publish("apploading",!1),ue=!1}),!0},Y=P=>{const Q=new URLSearchParams(window.location.search),H=Q.get("auth"),N=Q.get("email"),h=Q.get("tveCode");H&&N&&h||W(P)};o.d(yt,["handleRegisterTveNavigation",0,Y,"handleToolboxAuth",0,M])},57293(Ao,yt,o){"use strict";var e=o(96540),w=o(51612);const $=(({className:s,to:Ue,onClick:i,isArticlePage:Le})=>e.createElement("button",{"aria-label":Ue,type:"button",onClick:i,className:`button button--text button--icon ${s}`},Le?(0,w.nG)():(0,w.D6)()));o.dn($),o.d(yt,["A",0,$])},21272(Ao,yt,o){"use strict";var e=o(61171),w=o.n(e),$=o(18987),s=o(51354),Ue,i,Le;let st=(Ue=window)===null||Ue===void 0?void 0:Ue.app_data.appcmsPlatform.tveSettings.requestorID,U=(i=window)===null||i===void 0?void 0:i.app_data.appcmsPlatform.tveSettings.softwareStatement,me=(Le=window)===null||Le===void 0?void 0:Le.app_data.appcmsPlatform.tveSettings.accessEnabler;const ue=c=>new Promise((ge,n)=>{if(document.querySelector(`script[src="${c}"]`))return ge();const L=document.createElement("script");L.src=`${c}`,L.onload=()=>ge(),L.onerror=W=>n(W),document.body.appendChild(L)});window.accessEnablerDidLoad=()=>{let c=U;if(window&&"AccessEnabler"in window){var ge;window.AE=new window.AccessEnabler.AccessEnabler(c),(ge=window)===null||ge===void 0||ge.entitlementLoaded()}},window.entitlementLoaded=()=>{var c;window.AE.setRequestor(st),(c=window)===null||c===void 0||c.setConfig()},window.setConfig=c=>{var ge,n;(n=window)===null||n===void 0||(ge=n.AE)===null||ge===void 0||ge.checkAuthentication()},window.setAuthenticationStatus=(c,ge)=>{if(c==1){var n,L,W,M,Y,P;(L=window)===null||L===void 0||(n=L.AE)===null||n===void 0||n.getMetadata("zip"),(M=window)===null||M===void 0||(W=M.AE)===null||W===void 0||W.getMetadata("householdID"),(P=window)===null||P===void 0||(Y=P.AE)===null||Y===void 0||Y.getMetadata("hba_status")}else c==0&&(0,s.A)(`user none ${ge}`)},window.setMetadataStatus=(c,ge,n)=>{(c==="householdID"||c==="hba_status")&&$.default.set(c,n)},window.displayProviderDialog=c=>!0,window.setToken=(c,ge)=>{w().publish("tveAuthz",{inRequestedResourceID:c,inToken:ge})},window.tokenRequestFailed=(c,ge,n)=>{w().publish("tveAuthz",{inRequestedResourceID:c,inRequestErrorCode:ge,inRequestDetailedErrorMessage:n})},window.sendTrackingData=(c,ge)=>{};const A=()=>{let c=me;return c?ue(c).then(()=>(console.log("sdk loaded"),window.accessEnablerDidLoad(),!0)):!1};o.d(yt,["default",0,A])},89467(Ao,yt,o){"use strict";o.r(yt);var e=o(43543),w=o(47281);const $=({user:s,isSubscribed:Ue,isTveLoggedIn:i,isCheckout:Le,isPurchasingDifferentPlan:st})=>{const U=(0,e.js)();Le&&(!st&&(U!=null&&U.SVOD&&(U!=null&&U.TVE)?s&&Ue&&i:U!=null&&U.SVOD&&!(U!=null&&U.TVE)?s&&Ue:!(U!=null&&U.SVOD)&&(U!=null&&U.TVE)&&s&&i))&&(0,w.publishRedirect)("/")};o.d(yt,["checkUserServiceWithMonetisation",0,$])},41139(Ao,yt,o){"use strict";o.r(yt),o.d(yt,{attachSeriesWatchProgress:()=>i,getEpisodeNumber:()=>Le,getQueryParams:()=>$,getSeasonNumber:()=>st});var e=o(19324),w=o(43543);function $(U){let me={isEpisodic:!1,vId:null},ue=(U==null?void 0:U.split("?").length)>0?U==null?void 0:U.split("?")[1]:null;if(ue){let A=ue.split("&")||[ue];for(let c=0;c<A.length;c++){var B;let ge=(B=A[c])===null||B===void 0?void 0:B.split("=");(ge.includes("vid")||ge.includes("vId"))&&(me={isEpisodic:!0,vId:ge[1]})}}return me}const s=U=>{var me;let ue=JSON.parse(localStorage.getItem("planGroupList")),B=U==null||(me=U.plans)===null||me===void 0?void 0:me.filter(n=>(n==null?void 0:n.type)==="FREE"||(n==null?void 0:n.type)==="SVOD"||(n==null?void 0:n.monetizationModel)==="SVOD"),A=B==null?void 0:B.map(n=>(n==null?void 0:n.planIds)||(n==null?void 0:n.id)),c=B==null?void 0:B.map(n=>n==null?void 0:n.planGroupIds);
11return c==null||c.forEach(n=>{n&&A.push(ue==null?void 0:ue[n])}),A?A.filter(n=>n!=null):[]},Ue=async U=>{var me,ue,B,A;let ge=`${(A=window)===null||A===void 0||(B=A.app_data)===null||B===void 0||(ue=B.appcmsMain)===null||ue===void 0||(me=ue.apiConfig)===null||me===void 0?void 0:me.apiBaseUrl}/v2/user/history/series/${U}`,L={headers:{Authorization:await(0,w.gf)()}};return e.A.get(ge,L)};function i(U,me){if(!(U!=null&&U.length)||!Array.isArray(me))return U;const ue=new Map;return me.forEach(B=>{(B==null?void 0:B.videoId)!=null&&B.watchedPercentage!=null&&ue.set(B.videoId,B.watchedPercentage)}),U.forEach(B=>{(B.episodes||[]).forEach(A=>{var c,ge;const n=(c=ue.get(A==null||(ge=A.gist)===null||ge===void 0?void 0:ge.id))!==null&&c!==void 0?c:ue.get(A==null?void 0:A.id);n!=null&&(A.watchedPercentage=n)})}),U}function Le(U){if(typeof U!="string")return!1;const me=U.match(/E(\d+)/i);return me?Number(me[1]):!1}function st(U){if(typeof U!="string")return!1;const me=U.match(/S(\d+)/i);return me?Number(me[1]):!1}o.d(yt,["formulateAllPlanIdsArray",0,s,"getUserSeriesData",0,Ue])},80542(){}}]);})();

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.