1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2071,649],{85881:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/reactivate",function(){return t(93056)}])},68723:function(e,a,t){"use strict";t.d(a,{L:function(){return u},l:function(){return d}});var r=t(85893),i=t(66095),n=t(96700),s=t(30591),o=t(85067),l=t(17287),c=t(42781);let d=e=>a=>{let{user:t,...s}=a,{data:o,mutate:l,error:c}=(0,i.aF)();return o?(0,r.jsx)(e,{user:o,onUpdateUser:l,userError:c,...s}):(0,r.jsx)(n.ZP,{})},u=e=>{let{roles:a}=e,t=(0,c.YB)();return a.includes(s.u["user.read"])?(0,r.jsx)(o.n,{meta:{title:"Account - Forbidden"},title:"Sorry, this page cannot be viewed.",lead:"Please sign in as the account holder to continue",breadcrumbs:{to:"/account",label:t.formatMessage({id:"web:accounts:breadcrumbs_link_back"})}}):(0,r.jsx)(l._Z,{roles:a})}},68869:function(e,a,t){"use strict";t.d(a,{O:function(){return s}});var r=t(85893),i=t(76411),n=t(7266);let s=e=>{let{breadcrumbs:a}=e;return(0,r.jsx)("div",{className:"pt-3 tablet:pt-5 laptop:pt-8",children:(0,r.jsx)(i.Z,{href:a.to,children:(0,r.jsxs)("span",{className:"uppercase",children:[(0,r.jsx)(n.Z,{className:"inline-block mr-2 mb-1 transform rotate-180",style:{height:"0.74rem"}}),a.label]})})})}},85067:function(e,a,t){"use strict";t.d(a,{C:function(){return m},n:function(){return p}});var r=t(85893),i=t(94482),n=t(1107),s=t(84847),o=t(48767),l=t(27746),c=t(81768),d=t(68869);let u=e=>{let{title:a,lead:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.X,{variant:"xl",as:"h1",children:a}),t&&(0,r.jsx)("div",{className:"max-w-3xl",children:(0,r.jsx)(c.x,{variant:"lead",children:t})})]})},h=e=>{let{wide:a,children:t,testId:i}=e;return a?t:(0,r.jsx)(s.kz,{testId:i,children:t})}
1,p=e=>{let{breadcrumbs:a,meta:t={},title:s,lead:l,primaryContent:c,variants:p=[],testId:m}=e;(0,i.kJ)(p)||(p=[p]);let _=p.includes("fullWidth");return(0,r.jsxs)(h,{testId:m,wide:_,children:[(0,r.jsx)(o.Z,{...t}),(0,r.jsxs)(h,{wide:!_,children:[a&&(0,r.jsx)(d.O,{breadcrumbs:a}),(s||l)&&(0,r.jsx)("section",{className:(0,n.b)(a?"pt-3 tablet:pt-5 laptop:pt-8":"pt-6 tablet:pt-10 laptop:pt-16","pb-6 laptop:pb-16"),children:(0,r.jsx)(u,{title:s,lead:l})})]}),c]})},m=e=>{let{testId:a,breadcrumbs:t,meta:i={},containedTitle:l,title:c,lead:h,primaryContent:p}=e;return(0,r.jsxs)(s.z8,{testId:a,children:[(0,r.jsx)(o.Z,{...i}),t&&(0,r.jsx)(d.O,{breadcrumbs:t}),(c||h)&&(0,r.jsx)("section",{className:(0,n.b)(t?"pt-3 tablet:pt-5 laptop:pt-8":"pt-6 tablet:pt-10 laptop:pt-16","pb-6 laptop:pb-16",l&&"max-w-3xl"),children:(0,r.jsx)(u,{title:c,lead:h})}),p]})}},51543:function(e,a,t){"use strict";t.d(a,{e:function(){return u}});var r=t(85893),i=t(67294);function n(e,a){return(n=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e})(e,a)}var s=function(e){var a=document.createElement("script");a.async=!0,a.defer=!0,a.src=e,document.head&&document.head.appendChild(a)},o=/(http|https):\/\/(www)?.+\/recaptcha/,l=["sitekey","theme","size","badge","tabindex","hl","isolated"],c=function(e){function a(){for(var a,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return(a=e.call.apply(e,[this].concat(r))||this).container=void 0,a.timer=void 0,a.state={instanceKey:Date.now(),ready:!1,rendered:!1,invisible:"invisible"===a.props.size},a._isAvailable=function(){var e;return!!(null==(e=window.grecaptcha)?void 0:e.ready)},a._inject=function(){a.props.inject&&!Array.from(document.scripts).reduce(function(e,a){return e||o.test(a.src)},!1)&&s("https://recaptcha.net/recaptcha/api.js?render=explicit"+(a.props.hl?"&hl="+a.props.hl:""))},a._prepare=function(){var e=a.props,t=e.explicit,r=e.onLoad;window.grecaptcha.ready(function(){a.setState({ready:!0},function(){t||a.renderExplicitly(),r&&r()})})},a._renderRecaptcha=function(e,a){return window.grecaptcha.render(e,a)},a._resetRecaptcha=function(){return window.grecaptcha.reset(a.state.instanceId)},a._executeRecaptcha=function(){return window.grecaptcha.execute(a.state.instanceId)},a._getResponseRecaptcha=function(){return window.grecaptcha.getResponse(a.state.instanceId)},a._onVerify=function(e){return a.props.onVerify(e)},a._onExpire=function(){return a.props.onExpire&&a.props.onExpire()},a._onError=function(){return a.props.onError&&a.props.onError()},a._stopTimer=function(){a.timer&&clearInterval(a.timer)},a.componentDidMount=function(){a._inject(),a._isAvailable()?a._prepare():a.timer=window.setInterval(function(){a._isAvailable()&&(a._prepare(),a._stopTimer())},500)},a.componentWillUnmount=function(){a._stopTimer()},a.renderExplicitly=function(){return new Promise(function(e,t){if(a.state.rendered)return t(Error("This recaptcha instance has been already rendered."));if(!a.state.ready||!a.container)return t(Error("Recaptcha is not ready for rendering yet."));var r=a._renderRecaptcha(a.container,{sitekey:a.props.sitekey,theme:a.props.theme,size:a.props.size,badge:a.state.invisible?a.props.badge:void 0,tabindex:a.props.tabindex,callback:a._onVerify,"expired-callback":a._onExpire,"error-callback":a._onError,isolated:a.state.invisible?a.props.isolated:void 0,hl:a.state.invisible?void 0:a.props.hl});a.setState({instanceId:r,rendered:!0},function(){a.props.onRender&&a.props.onRender(),e()})})},a.reset=function(){return new Promise(function(e,t){if(a.state.rendered)return a._resetRecaptcha(),e();t(Error("This recaptcha instance did not render yet."))})},a.execute=function(){return new Promise(function(e,t){return a.state.invisible?(a.state.rendered&&(a._executeRecaptcha(),e()),t(Error("This recaptcha instance did not render yet."))):t(Error("Manual execution is only available for invisible size."))})},a.getResponse=function(){return new Promise(function(e,t){if(a.state.rendered)return e(a._getResponseRecaptcha());t(Error("This recaptcha instance did not render yet."))})},a.render=function(){var e=i.createElement("div",{key:a.state.instanceKey,id:a.props.id,className:a.props.className,ref:function(e){return a.container=e}});return a.props.children?a.props.children({renderExplicitly:a.renderExplicitly,reset:a.reset,execute:a.execute,getResponse:a.getResponse,recaptchaComponent:e}):e},a}return a.prototype=Object.create(e.prototype),a.prototype.constructor=a,n(a,e),a.getDerivedStateFromProps=function(e,a){var t="invisible"===e.size;return t!==a.invisible?{invisible:t}:null},a.prototype.componentDidUpdate=function(e){var a=this;l.reduce(function(t,r){return a.props[r]!==e[r]?[].concat(t,[r]):t},[]).length>0&&this.setState({instanceKey:Date.now(),rendered:!1},function(){a.props.explicit||a.renderExplicitly()})},a}(i.Component);
1c.defaultProps={id:"",className:"g-recaptcha",theme:"light",size:"normal",badge:"bottomright",tabindex:0,explicit:!1,inject:!0,isolated:!1,hl:""};var d=t(47207);let u=e=>{let{recaptcha:a,sitekey:t="6LdK9rsUAAAAAEvk9Q5nRE7ndkIaVXq1eSEfGW7H"}=e;return(0,d.Gm)().has(d.J.recaptchaMock)?(a.verify=()=>Promise.resolve("mock-token"),null):(0,r.jsx)(c,{ref:e=>a.setRef(e),sitekey:t,size:"invisible",onVerify:a.onVerify})}},93056:function(e,a,t){"use strict";t.r(a),t.d(a,{ReactivationPage:function(){return eD},__N_SSP:function(){return eW},default:function(){return eL}});var r=t(85893),i=t(89211),n=t(11163),s=t(67294),o=t(68723),l=t(48767),c=t(5068),d=t(54663),u=t(48974),h=t(907),p=t(11718),m=t.n(p);let _=e=>"/v1/media/".concat(e),v=function(e,a){let{format:t="webp",width:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;for(let o of a){var i,n,s;let a=null===(i=e[o])||void 0===i?void 0:i[0];if(a&&!a.missing&&(null===(n=a.location)||void 0===n?void 0:n.host)&&(null===(s=a.location)||void 0===s?void 0:s.id))return(0,u.n)(a,{format:t,width:r})}return null},x=e=>(0,d.ZP)(e).then(e=>{let a=(null==e?void 0:e.data)||e;return a?{id:a.id,title:a.title,description:a.description,background:v(a.image_assets,["featured_hero"],{format:"webp"}),titleArt:v(a.image_assets,["featured_title"],{format:"webp"})}:null}),g=e=>{let{size:a=12}=e;return(0,r.jsx)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:(0,r.jsx)("polyline",{points:"9,5 16,12 9,19"})})},f=e=>e?"â¢â¢â¢â¢ ".concat(e):null,b=e=>{let{mediaId:a=10976,eyebrow:t="Featured this week",ctaLabel:i="Unlock & Watch",cardLastFour:n,onCtaClick:s}=e,{minWidth:o}=(0,h.k)(),l=!!o(1024),{data:d,error:u}=(0,c.ZP)(_(a),x,{revalidateOnFocus:!1});if(u)return null;let p=null==d?void 0:d.background,v=null==d?void 0:d.titleArt,b=null==d?void 0:d.title,y=null==d?void 0:d.description;return(0,r.jsx)("section",{className:m().section,"aria-label":b||"Featured",children:(0,r.jsxs)("div",{className:m().frame,children:[p?(0,r.jsx)("img",{src:p,alt:"","aria-hidden":"true",className:m().bgImage,loading:"lazy"}):(0,r.jsx)("div",{className:"".concat(m().bgImage," ").concat(m().bgFallback)}),(0,r.jsx)("div",{className:m().scrim}),(0,r.jsx)("div",{className:m().content,children:(0,r.jsxs)("div",{className:m().copy,children:[(0,r.jsxs)("div",{className:m().eyebrow,children:[(0,r.jsx)("span",{className:m().eyebrowDot}),t]}),v?(0,r.jsx)("img",{src:v,alt:b||"",className:m().titleArt,loading:"lazy"}):b?(0,r.jsx)("h3",{className:m().titleText,children:b}):null,y&&(0,r.jsx)("p",{className:m().description,children:y}),(0,r.jsxs)("button",{type:"button",className:m().cta,onClick:s,children:[i," ",(0,r.jsx)(g,{})]}),(0,r.jsxs)("p",{className:m().microNote,children:[l?"Clicking":"Tapping"," this reactivates your account instantly.",n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),"Charged to ",f(n)," â no other steps needed."]})]})]})})]})})};var y=t(47494),j=t.n(y);let k=e=>(0,d.ZP)(e).then(e=>(Array.isArray(null==e?void 0:e.data)?e.data:[]).map(e=>{let a=e.primary_category,t=("string"==typeof a?a:null==a?void 0:a.name)||e.type||"";return{id:e.id,title:e.title,category:t,poster:e.image_movie||e.image_large||e.image_medium,isOriginal:!!e.is_original}})),N=e=>{let{item:a,titleFs:t}=e;return(0,r.jsxs)("div",{className:j().card,"aria-label":a.title,children:[(0,r.jsxs)("div",{className:j().poster,children:[a.poster?(0,r.jsx)("img",{src:a.poster,alt:a.title,className:j().posterImage,loading:"lazy"}):(0,r.jsx)("div",{className:j().posterFallback}),a.isOriginal&&(0,r.jsxs)("div",{className:j().originalBadge,children:[(0,r.jsx)("span",{className:j().originalDot}),"Curiosity Original"]})]}),(0,r.jsx)("div",{className:j().title,style:{fontSize:t},children:a.title}),a.category&&(0,r.jsx)("div",{className:j().category,children:a.category})]})},R=()=>(0,r.jsxs)("div",{className:j().card,"aria-hidden":"true",children:[(0,r.jsx)("div",{className:"".concat(j().poster," ").concat(j().posterFallback)}),(0,r.jsx)("div",{className:"".concat(j().title," ").concat(j().skeletonLine)}),(0,r.jsx)("div",{className:"".concat(j().category," ").concat(j().skeletonLine)})]}),C=()=>{let{minWidth:e}=(0,h.k)(),a=!!e(1024),{data:t,error:i}=(0,c.ZP)("/v1/media?page=1&filterBy=playlist&term=19&collections=true&limit=8",k,{revalidateOnFocus:!1}),n=a?6:4,s=t&&!i?t.slice(0,n):Array.from({length:n});return(0,r.jsxs)("section",{className:j().section,children:[(0,r.jsxs)("div",{className:j().eyebrowRow,children:[(0,r.jsx)("span",{className:j().eyebrowDot}),(0,r.jsx)("span",{className:j().eyebrow,children:"Curiosity Originals"})]}),(0,r.jsx)("h2",{className:j().heading,style:{fontSize:a?32:24},children:"Made by us. Only here."}),(0,r.jsx)("div",{className:j().grid,style:{gridTemplateColumns:"repeat(".concat(a?6:2,", 1fr)")},children:s.map((e,t)=>e?(0,r.jsx)(N,{item:e,titleFs:a?15:14},e.id):(0,r.jsx)(R,{},"ph-".concat(t)))})]})};var w=t(9912),H=t(51543),O=t(23356),I=t(11356),S=t(78192),P=t(11799),F=t.n(P);let T=e=>{let{size:a=28}=e;return(0,r.jsx)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",children:(0,r.jsx)("polyline",{points:"5,12 10,17 19,7"})})},E=e=>{let{size:a=14}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:[(0,r.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,r.jsx)("polyline",{points:"13,5 20,12 13,19"})]})},B=e=>{let{size:a=12}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M8 11V8a4 4 0 0 1 8 0v3"})]})},W=()=>(0,r.jsx)("div",{className:F().spinner,"aria-label":"Loading"}),D=e=>{var a,t,r,i;return(null==e?void 0:null===(a=e.error)||void 0===a?void 0:a.code)==="card_error"||(null==e?void 0:null===(r=e.message)||void 0===r?void 0:null===(t=r.error)||void 0===t?void 0:t.code)==="card_error"||(null==e?void 0:null===(i=e.message)||void 0===i?void 0:i.code)==="card_error"},A=e=>{var a,t,r,i;return(null==e?void 0:null===(a=e.error)||void 0===a?void 0:a.code)||(null==e?void 0:null===(r=e.message)||void 0===r?void 0:null===(t=r.error)||void 0===t?void 0:t.code)||(null==e?void 0:null===(i=e.message)||void 0===i?void 0:i.code)||null},L=(e,a)=>{var t,r,i;return"string"==typeof(null==e?void 0:null===(t=e.error)||void 0===t?void 0:t.message)&&e.error.message||"string"==typeof(null==e?void 0:null===(i=e.message)||void 0===i?void 0:null===(r=i.error)||void 0===r?void 0:r.message)&&e.message.error.message||"string"==typeof(null==e?void 0:e.message)&&e.message||a},z=e=>{var a;let{open:t,offer:i,planId:o,userName:l="there",cardLastFour:c,onClose:u,onSuccess:h,onPaymentUpdateRequired:p,onPaymentUpdateSubmitted:m,onPaymentUpdateSuccess:_,onPaymentUpdateFail:v,onWatchNowCtaClick:x}=e,g=(0,n.useRouter)(),f=(0,S.Z)(),b=(0,I.Bj)({requiredFieldGroups:{[I._7.name]:!0,[I._7.address]:!0,[I._7.card]:!0}}
1),[y,j]=(0,s.useState)("processing"),[k,N]=(0,s.useState)(null),[R,C]=(0,s.useState)(!1),[P,z]=(0,s.useState)(!1),U=(0,s.useRef)(!1),M=(0,s.useCallback)(async()=>{if(!o)return N("Couldn't find a plan to reactivate."),j("error"),!1;N(null);try{return await (0,d.ZP)("/v1/subscriptions/update",{method:"post",body:JSON.stringify({offer:null==i?void 0:i.uuid,plan:o,platform:"stripe"})}),j("success"),!0}catch(e){if(D(e))return null==p||p({reason:c?"card_error":"missing_payment_method",errorCode:A(e)}),N(L(e,"Your card was declined. Update your payment to continue.")),j("declined"),!1;return N(L(e,"We couldn't reactivate your plan. Please try again, or contact support if the problem persists.")),j("error"),!1}},[c,i,p,o]);(0,s.useEffect)(()=>{if(!t){U.current=!1;return}if(!U.current){if(U.current=!0,j("processing"),N(null),C(!1),z(!1),!c&&o){null==p||p({reason:"missing_payment_method"}),j("declined");return}M()}},[t]),(0,s.useEffect)(()=>{"success"!==y||P||(z(!0),null==h||h())},[y,P,h]);let Z=(0,s.useCallback)(async()=>{if(!b.form.isValid||R)return;let e=c?"card_error":"missing_payment_method";null==m||m({reason:e}),C(!0),N(null);try{let[a,t]=await Promise.all([f.verify(),b.createPaymentToken()]);await (0,d.ZP)("/user/update_card",{method:"post",body:JSON.stringify({recaptchaToken:a,stripeToken:t})}),null==_||_({reason:e})}catch(a){C(!1),null==v||v({reason:e,errorCode:A(a)}),N(L(a,"Couldn't update that card. Double-check the details.")),j("declined");return}j("processing"),await M(),C(!1)},[c,b,f,R,v,m,_,M]),V=(0,s.useCallback)(()=>{null==x||x(),null==u||u(),g.push("/home")},[u,x,g]),q=(0,s.useCallback)(()=>{null==u||u(),g.push("/home")},[u,g]);return t?(0,r.jsx)("div",{className:F().scrim,role:"dialog","aria-modal":"true",children:(0,r.jsxs)("div",{className:F().frame,children:["processing"!==y&&(0,r.jsx)("button",{type:"button",className:F().frameCloseButton,onClick:"success"===y?q:u,"aria-label":"Close","data-testid":"modal-close",children:(0,r.jsx)(O.Z,{className:F().frameCloseIcon})}),"processing"===y&&(0,r.jsxs)("div",{className:"".concat(F().modalCard," ").concat(F().modalCardCentered),children:[(0,r.jsx)(W,{}),(0,r.jsx)("div",{className:F().eyebrow,children:"One moment"}),(0,r.jsx)("h2",{className:F().headline,children:"Confirming your planâ¦"}),(0,r.jsx)("p",{className:F().subtle,children:c?"Authorizing the card ending â¢â¢â¢â¢ ".concat(c):"Authorizing your payment"})]}),"error"===y&&(0,r.jsxs)("div",{className:"".concat(F().modalCard," ").concat(F().modalCardCentered),children:[(0,r.jsx)("div",{className:F().errorBadge,children:"!"}),(0,r.jsx)("div",{className:F().errorEyebrow,children:"Something went wrong"}),(0,r.jsx)("h2",{className:F().headline,children:"We couldnât reactivate your plan"}),(0,r.jsx)("p",{className:F().body,children:k||"Please try again, or reach out to support if the problem persists."}),(0,r.jsxs)("a",{href:"https://help.curiositystream.com/hc/en-us",target:"_blank",rel:"noopener noreferrer",className:F().cta,onClick:u,children:["Contact support ",(0,r.jsx)(E,{})]})]}),"success"===y&&(0,r.jsxs)("div",{className:"".concat(F().modalCard," ").concat(F().modalCardCentered),children:[(0,r.jsx)("div",{className:F().successBadge,children:(0,r.jsx)(T,{size:28})}),(0,r.jsx)("div",{className:F().eyebrow,children:"Youâre back"}),(0,r.jsxs)("h2",{className:F().headline,children:["Welcome back, ",l,"."]}),(0,r.jsx)("p",{className:F().body,children:"Your plan is active. Weâve queued up a few new arrivals based on what you watched before."}),(0,r.jsxs)("button",{type:"button",className:F().cta,onClick:V,children:["Start watching ",(0,r.jsx)(E,{})]}),i&&(0,r.jsxs)("div",{className:F().footnote,children:["Charged ",i.totalWithTax," today",i.hasTax&&" (incl. ".concat(i.taxAmount," tax)")," \xb7 renews after ",i.termPhrase," at ",i.thenLabel," plus tax"]})]}),"declined"===y&&(0,r.jsxs)("div",{className:"".concat(F().modalCard," ").concat(F().declined),children:[(0,r.jsxs)("div",{className:F().declinedHeader,children:[(0,r.jsx)("div",{className:F().declinedIcon,children:"!"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:F().declinedEyebrow,children:"Payment c
1ouldnât be processed"}),(0,r.jsx)("div",{className:F().declinedSubtle,children:k||(c?"Your card ending â¢â¢â¢â¢ ".concat(c," was declined."):"Add a payment method to reactivate your account.")})]})]}),(0,r.jsx)("h3",{className:F().declinedTitle,children:"Update your payment method"}),(0,r.jsxs)("p",{className:F().declinedBody,children:["Add a card to claim ",null==i?void 0:i.termPhrase," for ",null==i?void 0:i.total," â youâll be watching in seconds."]}),(0,r.jsxs)("div",{className:F().cardForm,children:[(0,r.jsx)(w.aB,{fieldGroups:[I._7.name,I._7.address,I._7.card],creditCard:b,onChangeField:()=>N(null),disabled:R}),(0,r.jsx)(H.e,{recaptcha:f})]}),(0,r.jsxs)("button",{type:"button",className:F().cta,onClick:Z,disabled:!b.form.isValid||R,children:["Update & reactivate ",(0,r.jsx)(E,{})]}),(0,r.jsxs)("div",{className:F().secureLine,children:[(0,r.jsx)(B,{})," Secure \xb7 ",null!==(a=null==i?void 0:i.totalWithTax)&&void 0!==a?a:null==i?void 0:i.total," today, then ",null==i?void 0:i.thenLabel," plus tax"]})]})]})}):null};var U=t(90457),M=t.n(U);let Z={countdown:!1,dOfferStatus:"active",dHero:"montage",dHeroCopy:"offer",dHeroSub:"range",dOfferCard:"premium",dPerks:"editorial",dPayment:"valid"},V=e=>{let{size:a=14}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:[(0,r.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,r.jsx)("polyline",{points:"13,5 20,12 13,19"})]})},q=e=>e?"â¢â¢â¢â¢ ".concat(e):null,X=e=>{let{tweaks:a=Z,offer:t,cardLastFour:i,onConfirm:n,onSeeAllPlans:s}=e,{minWidth:o}=(0,h.k)(),l=!!o(1024);if(!t)return null;let c="expired"===a.dOfferStatus;return(0,r.jsxs)("section",{className:M().section,children:[(0,r.jsx)("h2",{className:M().heading,children:c?"Ready to find your plan?":"Ready to dive back in?"}),(0,r.jsx)("p",{className:M().sub,children:c?(0,r.jsxs)(r.Fragment,{children:["This welcome-back offer has ended â choose a plan from"," ",t.thenLabel," and pick up where you left off."]}):(0,r.jsxs)(r.Fragment,{children:[t.total,t.taxNote?" ".concat(t.taxNote):""," for ",t.termPhrase,", then just ",t.thenLabel,". Cancel any time."]})}),c?(0,r.jsxs)("button",{type:"button",className:M().cta,onClick:s,children:["See all plans ",(0,r.jsx)(V,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:M().cta,onClick:n,children:[l?"One click to reactivate":"One tap to reactivate"," ",(0,r.jsx)(V,{})]}),(0,r.jsxs)("p",{className:M().microNote,children:[l?"Clicking":"Tapping"," this reactivates your account instantly.",i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),"Charged to ",q(i)," â no other steps needed."]})]})]})]})},K={awaiting:{chip:"Welcome back, {name}",h1a:"Your shelf has been",h1b:"waiting on you.",mobileH1a:"Your shelf has been",mobileH1b:"waiting on you.",sub:"Come back for $1 â 3 months of the Standard plan. Pick up where you left off, or start with whatâs trending right now."},curious:{chip:"Welcome back, {name}",h1a:"While you were out,",h1b:"things got interesting.",mobileH1a:"While you were out,",mobileH1b:"things got interesting.",sub:"New series, fresh originals, the worldâs strangest stories. 3 months for $1 â start with whatâs trending."},saved:{chip:"{name}, we saved your seat",h1a:"Right back into",h1b:"the good stuff.",mobileH1a:"Right back into",mobileH1b:"the good stuff.",sub:"Your watchlist, the new arrivals, this weekâs top 5 â all one tap away. 3 months for just $1."}},Y={range:"Science, history, nature and beyond â New originals. New obsessions waiting.",pyramids:"From the pyramids to the edge of the universe â thousands of titles and Curiosity Originals waiting for you.",ideas:"Big ideas, true stories and award-winning Originals â your library is still here.",curious:"Everything that made you curious in the first place â still here, still waiting."},G={chip:"Welcome back, {name}",h1a:"letâs find",h1b:"your plan.",mobileH1a:"letâs find",mobileH1b:"your plan.",sub:"This reactivation offer has ended â but your library is still here. Pick a plan and jump right back in."};var J=t(12050),Q=t.n(J);let $="linear-gradient(147.14deg, #ecc334 6.95%, #eb8b4c 93.05%)",ee=e=>String(e).padStart(2,"0"),ea=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e,et=e=>{let a=()=>
1{if(!e)return 0;let a=new Date(e).getTime();return Number.isFinite(a)?Math.max(0,Math.floor((a-Date.now())/1e3)):0},[t,r]=(0,s.useState)(0);return(0,s.useEffect)(()=>{if(r(a()),!e)return;let t=setInterval(()=>r(a()),1e3);return()=>clearInterval(t)},[e]),{d:Math.floor(t/86400),h:Math.floor(t%86400/3600),m:Math.floor(t%3600/60),s:t%60}},er=e=>{let{size:a=14}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",children:[(0,r.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,r.jsx)("polyline",{points:"13,5 20,12 13,19"})]})},ei=e=>{let{size:a=12}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("rect",{x:"5",y:"11",width:"14",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M8 11V8a4 4 0 0 1 8 0v3"})]})},en=e=>{let{size:a=18}=e;return(0,r.jsxs)("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("polyline",{points:"12,7 12,12 16,14"})]})},es=e=>{let{template:a}=e,t=a.replace("{name}","").replace(/^[\s,]+/,"").replace(/[\s,]+$/,"").trim()||"Welcome back";return(0,r.jsx)("div",{className:Q().chip,children:t})},eo=e=>{let{name:a,h1a:t,h1b:i,fontSize:n,br:s}=e;return(0,r.jsxs)("h1",{className:Q().headline,style:{fontSize:n},children:[(0,r.jsxs)("span",{className:Q().headlineName,children:[a,","]})," ",ea(t),s?(0,r.jsx)("br",{}):" ",(0,r.jsx)("span",{className:Q().headlineAccent,children:i})]})},el=e=>e?"â¢â¢â¢â¢ ".concat(e):null,ec=e=>{let{desktop:a,offer:t,showCountdown:i,styleKey:n="premium",floating:s=!1,cardLastFour:o,onConfirm:l}=e,{d:c,h:d,m:u,s:h}=et(t.dateExpires);return"dark"===n?(0,r.jsxs)("div",{className:Q().offerCardDark,style:{background:s?"radial-gradient(120% 90% at 80% 0%, rgba(236,195,52,0.12) 0%, rgba(12,17,30,0) 55%), linear-gradient(180deg, #20211f 0%, #161616 100%)":"radial-gradient(120% 90% at 80% 0%, rgba(236,195,52,0.10) 0%, rgba(29,29,29,0) 52%), linear-gradient(180deg, #232220 0%, #181818 100%)",backdropFilter:s?"blur(22px) saturate(140%)":void 0,WebkitBackdropFilter:s?"blur(22px) saturate(140%)":void 0,padding:a?"22px 22px 20px":"18px 16px 16px"},children:[(0,r.jsx)("div",{className:Q().darkTopBar,style:{background:$}}),(0,r.jsx)("div",{className:Q().darkHeaderRow,children:(0,r.jsx)("div",{className:Q().darkBadge,style:{background:$},children:"Welcome-back offer"})}),i&&(0,r.jsxs)("div",{className:Q().endsIn,children:[(0,r.jsx)("span",{className:Q().endsInDot}),"Ends in",(0,r.jsxs)("span",{className:Q().endsInTime,children:[(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(c),(0,r.jsx)("span",{className:Q().endsInUnit,children:"d"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(d),(0,r.jsx)("span",{className:Q().endsInUnit,children:"h"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(u),(0,r.jsx)("span",{className:Q().endsInUnit,children:"m"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(h),(0,r.jsx)("span",{className:Q().endsInUnit,children:"s"})]})]})]}),(0,r.jsxs)("div",{className:Q().darkPlanRow,style:{fontSize:a?24:22},children:[(0,r.jsx)("span",{style:{fontWeight:500},children:t.plan}),(0,r.jsx)("span",{style:{color:"#b9b9b9",fontWeight:400},children:" plan"})]}),(0,r.jsxs)("div",{className:Q().darkPriceRow,children:[(0,r.jsx)("span",{className:Q().darkPrice,style:{fontSize:a?72:58,background:$,WebkitBackgroundClip:"text",backgroundClip:"text"},children:t.total}),t.taxNote&&(0,r.jsx)("span",{className:Q().darkTaxNote,children:t.taxNote}),(0,r.jsxs)("span",{className:Q().darkPriceFor,children:["for ",t.termPhrase]})]}),(0,r.jsxs)("div",{className:Q().darkThen,children:["Then just ",t.thenLabel,". Cancel any time."]}),(0,r.jsxs)("button",{type:"button",className:Q().cta,onClick:l,children:[a?"One click to reactivate":"One tap to reactivate"," ",(0,r.jsx)(er,{})]}),(0,r.jsx)("div",{className:Q().darkDivider}),(0,r.jsxs)("div",{className:Q().darkBills,children:[(0,r.jsx)(ei,{}),(0,r.jsxs)("span",{children:[a?"Clicking":"Tapping"," this reactivates your account instantly.",o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),"Charged to ",el(o)," â no other steps needed."]})]})]})]}):(0,r.jsxs)("div",{className:Q().offerCard,style:{background:"linear-gradient(147.14deg, #2563EB 6.95%, #6600CC 93.05%)",padding:a?"".concat(50,"px 22px 20px"):"".concat(46,"px 16px 14px"),boxShadow:s?"0 22px 60px rgba(38,99,235,0.55), 0 0 0 1px rgba(255,255,255,0.05) inset, 0 2px 0 rgba(255,255,255,0.12) inset":"0 14px 36px rgba(38,99,235,0.35)"},children:[(0,r.jsx)("div",{className:Q().ribbon,style:{height:32,background:$},children:(0,r.jsx)("span",{children:"Welcome-back offer"})}),i&&(0,r.jsxs)("div",{className:Q().endsIn,children:[(0,r.jsx)("span",{className:Q().endsInDot}),"Ends in",(0,r.jsxs)("span",{className:Q().endsInTime,children:[(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(c),(0,r.jsx)("span",{className:Q().endsInUnit,children:"d"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(d),(0,r.jsx)("span",{className:Q().endsInUnit,children:"h"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(u),(0,r.jsx)("span",{className:Q().endsInUnit,children:"m"})]}),(0,r.jsxs)("span",{className:Q().endsInChunk,children:[ee(h),(0,r.jsx)("span",{className:Q().endsInUnit,children:"s"})]})]})]}),(0,r.jsxs)("div",{style:{fontSize:a?26:22,fontWeight:300,lineHeight:1.15,marginBottom:a?16:12},children:[(0,r.jsx)("span",{style:{fontWeight:500},children:t.plan})," plan"]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:4,flexWrap:"wrap"},children:[(0,r.jsx)("span",{style:{fontSize:a?68:54,fontWeight:300,lineHeight:1},children:t.total}),t.taxNote&&(0,r.jsx)("span",{style:{fontSize:18,color:"rgba(255,255,255,0.7)",fontWeight:500},children:t.taxNote}),(0,r.jsxs)("span",{style:{fontSize:18,color:"rgba(255,255,255,0.82)"},children:["for ",t.termPhrase]})]}),(0,r.jsxs)("div",{style:{fontSize:14,color:"rgba(255,255,255,0.78)",marginBottom:a?16:12},children:["Then just ",t.thenLabel,". Cancel any time."]}),(0,r.jsxs)("button",{type:"button",className:"".concat(Q().cta," ").concat(Q().ctaWhite),onClick:l,children:[a?"One click to reactivate":"One tap to reactivate"," ",(0,r.jsx)(er,{})]}),(0,r.jsxs)("div",{className:Q().billsLine,children:[a?"Clicking":"Tapping"," this reactivates your account instantly.",o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),"Charged to ",el(o)," â no other steps needed."]})]})]})},ed=e=>{let{desktop:a,offer:t,onClick:i}=e;return(0,r.jsxs)("div",{className:Q().expiredCard,style:{padding:a?"24px 24px 20px":"20px 18px 18px"},children:[(0,r.jsx)("div",{className:Q().expiredTopBar}),(0,r.jsxs)("div",{className:Q().expiredHeader,children:[(0,r.jsx)("div",{className:Q().expiredIcon,children:(0,r.jsx)(en,{})}),(0,r.jsx)("div",{className:Q().expiredEyebrow,children:"Offer expired"})]}),(0,r.jsx)("div",{className:Q().expiredTitle,style:{fontSize:a?22:19},children:"Your welcome-back offer has ended"}),(0,r.jsxs)("p",{className:Q().expiredBody,children:["The ",t.total,"annual"===t.kind?" annual":" \xb7 3-month"," deal is no longer available â but your library is still here. Choose a plan and pick up right where you left off."]}),(0,r.jsxs)("button",{type:"button",className:Q().cta,onClick:i,children:["See all plans ",(0,r.jsx)(er,{})]}),(0,r.jsxs)("div",{className:Q().expiredFootnote,children:["Plans from ",t.thenLabel," \xb7 cancel whenever you like"]})]})},eu=e=>{let{desktop:a,chipTemplate:t,name:i,copy:n,offer:s,showCountdown:o,expired:l,offerStyle:c,cardLastFour:d,onConfirm:u,onSeeAllPlans:h}=e;return(0,r.jsxs)("section",{className:Q().hero,children:[(0,r.jsx)("div",{className:Q().bgImage}),(0,r.jsx)("div",{className:Q().scrim,style:{background:a?"linear-gradient(90deg, rgba(2,7,19,0.97) 0%, rgba(2,7,19,0.9) 34%, rgba(2,7,19,0.55) 58%, rgba(2,7,19,0.72) 100%)":"linear-gradient(180deg, rgba(2,7,19,0.74) 0%, rgba(2,7,19,0.82) 48%, rgba(2,7,19,0.98) 88%, rgba(2,7,19,1) 100%)"}}),(0,r.jsx)("div",{className:Q().edgeBlend}),(0,r.jsx)("div",{className:Q().bottomMask}),(0,r.jsxs)("div",{className:Q().content,style:{minHeight:a?660:700,padding:a?"72px 5% 64px":"20px 20px 56px",display:a?"grid":"flex",flexDirection:a?void 0:"column",justifyContent:a?void 0:"flex-end",gridTemplateColumns:a?"1.04fr 0.96fr":void 0,gap:a?48:0},children:[(0,r.jsxs)("div",{className:Q().copyColumn,children:[(0,r.jsx)(es,{template:t}),(0,r.jsx)(eo,{name:i,h1a:a?n.h1a:n.mobileH1a,h1b:a?n.h1b:n.mobileH1b,fontSize:a?64:38,br:
1a}),(0,r.jsx)("p",{className:Q().supporting,style:{fontSize:a?19:16},children:n.sub})]}),(0,r.jsx)("div",{className:Q().offerColumn,style:{marginTop:a?0:24,justifyContent:a?"flex-end":"stretch"},children:l?(0,r.jsx)(ed,{desktop:a,offer:s,onClick:h}):(0,r.jsx)(ec,{desktop:a,offer:s,showCountdown:o,styleKey:c,floating:!0,cardLastFour:d,onConfirm:u})})]})]})},eh=e=>(0,d.ZP)(e).then(e=>[...Array.isArray(null==e?void 0:e.data)?e.data:[]].sort((e,a)=>{var t,r,i,n;return(null!==(i=null==e?void 0:null===(t=e.trending)||void 0===t?void 0:t.rank)&&void 0!==i?i:1e6)-(null!==(n=null==a?void 0:null===(r=a.trending)||void 0===r?void 0:r.rank)&&void 0!==n?n:1e6)}).slice(0,5).map(e=>{var a;let t=e.primary_category,r=("string"==typeof t?t:null==t?void 0:t.name)||e.type||"Featured";return{id:e.id,title:e.title,blurb:e.description,category:r,isOriginal:!!e.is_original,rank:null===(a=e.trending)||void 0===a?void 0:a.rank,poster:e.image_movie||e.image_large||e.image_medium}})),ep=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3500,[t,r]=(0,s.useState)(0),[i,n]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!e||i)return;let t=setInterval(()=>r(a=>(a+1)%e),a);return()=>clearInterval(t)},[e,a,i]),(0,s.useEffect)(()=>{e&&t>=e&&r(0)},[e,t]),{i:t,setI:r,setPaused:n}},em=e=>{var a;let{items:t,i,setI:n,onPauseChange:s}=e;if(!t.length)return(0,r.jsx)("div",{className:Q().carouselPosterWrap,children:(0,r.jsx)("div",{className:"".concat(Q().carouselPoster," ").concat(Q().carouselFallback),"aria-busy":"true"})});let o=t[i];return(0,r.jsxs)("div",{className:Q().carouselPosterWrap,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,r.jsxs)("div",{className:Q().carouselPoster,children:[t.map((e,a)=>(0,r.jsx)("div",{className:Q().carouselFrame,style:{opacity:a===i?1:0,pointerEvents:a===i?"auto":"none"},children:e.poster?(0,r.jsx)("img",{src:e.poster,alt:e.title,className:Q().carouselImage,loading:"eager"}):(0,r.jsx)("div",{className:Q().carouselFallback})},e.id)),(0,r.jsx)("div",{className:Q().carouselDots,children:t.map((e,a)=>(0,r.jsx)("button",{type:"button","aria-label":"Show featured ".concat(a+1),onClick:()=>n(a),className:Q().carouselDot,style:{width:a===i?18:6,background:a===i?"#eea83d":"rgba(255,255,255,0.45)"}},a))})]}),(0,r.jsxs)("div",{className:Q().carouselCaption,children:[(0,r.jsxs)("div",{className:Q().carouselTag,children:[(0,r.jsx)("span",{className:Q().carouselTagDot}),o.isOriginal?"CURIOSITY ORIGINAL":"TRENDING",(0,r.jsx)("span",{className:Q().carouselTagSep}),(0,r.jsxs)("span",{className:Q().carouselRank,children:["#",null!==(a=o.rank)&&void 0!==a?a:i+1," trending in ",o.category]})]}),o.blurb&&(0,r.jsx)("div",{className:Q().carouselBlurb,children:o.blurb},"b"+i)]})]})},e_=e=>{let{items:a}=e;return a.length?(0,r.jsxs)("div",{className:Q().trendingRail,children:[(0,r.jsxs)("div",{className:Q().trendingHeader,children:[(0,r.jsx)("span",{className:Q().trendingDot}),(0,r.jsx)("span",{className:Q().trendingLabel,children:"Trending now"})]}),(0,r.jsx)("div",{className:Q().trendingScroller,children:a.map(e=>(0,r.jsx)("div",{className:Q().trendingItem,"aria-label":e.title,children:(0,r.jsx)("div",{className:Q().trendingPoster,children:e.poster?(0,r.jsx)("img",{src:e.poster,alt:e.title,className:Q().trendingImage,loading:"lazy"}):(0,r.jsx)("div",{className:Q().carouselFallback})})},e.id))})]}):null},ev=e=>{let{desktop:a,chipTemplate:t,name:i,copy:n,offer:s,showCountdown:o,expired:l,offerStyle:d,cardLastFour:u,onConfirm:h,onSeeAllPlans:p}=e,{data:m=[]}=(0,c.ZP)("/v1/media?page=1&filterBy=playlist&term=195&collections=true&limit=20",eh,{revalidateOnFocus:!1}),{i:_,setI:v,setPaused:x}=ep(m.length);return a?(0,r.jsx)("section",{className:Q().carouselHero,children:(0,r.jsxs)("div",{className:Q().carouselContent,children:[(0,r.jsxs)("div",{className:Q().copyColumn,children:[(0,r.jsx)(es,{template:t}),(0,r.jsx)(eo,{name:i,h1a:n.h1a,h1b:n.h1b,fontSize:56,br:!0}),(0,r.jsx)("p",{className:Q().supporting,style:{fontSize:18,marginBottom:22},children:n.sub}),l?(0,r.jsx)(ed,{desktop:!0,offer:s,onClick:p}):(0,r.jsx)(ec,{desktop:!0,offer:s,showCountdown:o,styleKey:d,cardLastFour:u,onConfirm:h})]}),(0,r.jsx)("div",{children:(0,r.jsx)(em,{items:m,i:_,setI:v,onPauseChange:x})})]})}):(0,r.jsxs)("section",{className:Q().carouselHeroMobile,children:[(0,r.jsxs)("div",{className:Q().mobileCopy,children:[(0,r.jsx)(es,{template:t}),(0,r.jsx)(eo,{name:i,h1a:n.mobileH1a,h1b:n.mobileH1b,fontSize:30,br:!1})]}),(0,r.jsx)("div",{className:Q().mobileOffer,children:l?(0,r.jsx)(ed,{desktop:!1,offer:s,onClick:p}):(0,r.jsx)(ec,{desktop:!1,offer:s,showCountdown:o,styleKey:d,floating:!0,cardLastFour:u,onConfirm:h})}),(0,r.jsx)(e_,{items:m})]})},ex={name:"Sarah"},eg=(e,a,t)=>{if(t)return G;let r=K[e.dHeroCopy]?e.dHeroCopy:"offer";if("offer"!==r)return K[r];let i="monthly"===a.kind&&Y[e.dHeroSub]||a.heroSub;return{chip:a.heroChip,h1a:a.heroH1a,h1b:a.heroH1b,mobileH1a:a.heroH1a,mobileH1b:a.heroH1b,sub:i}},ef=e=>{let{tweaks:a=Z,user:t=ex,offer:i,cardLastFour:n,onConfirm:s,onSeeAllPlans:o}=e,{breakpoint:l,minWidth:c}=(0,h.k)(),d=!!c(1024);if(!i)return null;let u="expired"===a.dOfferStatus,p=eg(a,i,u),m={h1a:p.h1a,h1b:p.h1b,mobileH1a:p.mobileH1a||p.h1a,mobileH1b:p.mobileH1b||p.h1b,sub:p.sub},_=p.chip,v="dark"===a.dOfferCard?"dark":"premium",x="carousel"===a.dHero?"carousel":"montage",g=!1!==a.countdown,f={desktop:d,chipTemplate:_,name:t.name,copy:m,offer:i,showCountdown:g,expired:u,offerStyle:v,cardLastFour:n,onConfirm:s,onSeeAllPlans:o};return(0,r.jsx)("div",{children:"carousel"===x?(0,r.jsx)(ev,{...f}):(0,r.jsx)(eu,{...f})},l)};var eb=t(7400),ey=t.n(eb);let ej=[{title:"Thousands of titles",sub:"Documentaries, series & originals"},{title:"Award-winning Originals",sub:"Emmy, Webby & Telly honored"},{title:"Every screen you own",sub:"TV, mobile, Roku, Apple TV"},{title:"Ad-free, always",sub:"No interruptions, ever"}],ek=e=>String(e).padStart(2,"0"),eN=()=>(0,r.jsx)("section",{className:ey().section,"aria-label":"Why come back",children:(0,r.jsx)("div",{className:ey().grid,children:ej.map((e,a)=>(0,r.jsxs)("div",{className:ey().item,children:[(0,r.jsx)("div",{className:ey().number,children:ek(a+1)}),(0,r.jsx)("div",{className:ey().title,children:e.title}),(0,r.jsx)("div",{className:ey().sub,children:e.sub})]},e.title))})}),eR={HDS:{heroChip:"Welcome back, {name}",heroH1a:"Itâs all back.",heroH1b:"Yours for {total}.",heroSub:"Science, history, nature and beyond â thousands of titles and Curiosity Originals. Your next {term} for less than a dollar."},HDS_12:{heroChip:"Welcome back, {name}",heroH1a:"A whole year.",heroH1b:"Just {total}.",heroSub:"Science, history, nature and beyond â thousands of titles and Curiosity Originals. A full year of everything for less than a few months out."}},eC=e=>/year/i.test(e||""),ew=(e,a)=>"".concat(e,"/").concat(eC(a)?"year":"month"),eH=e=>"year"===e?"a full year":e,eO=(e,a)=>Object.entries(a).reduce((e,a)=>{let[t,r]=a;return e.replace(RegExp("\\{".concat(t,"\\}"),"g"),r)},e),eI=(e,a)=>{if(!Array.isArray(e))return null;for(let o of e){var t,r,i,n,s;let e=null===(t=o.offers)||void 0===t?void 0:t.find(e=>e.uuid===a);if(!e)continue;let{plan:l}=e,c=l.price.sale_price.formatted,d=l.schedule.term,u=eH(d),h=l.price.original_price.formatted,p=ew(h,d),m=eC(d)?"annual"
1:"monthly",_=null===(r=l.price)||void 0===r?void 0:r.tax,v=(null==_?void 0:null===(i=_.taxes)||void 0===i?void 0:i.formatted)||null,x=(null==_?void 0:null===(n=_.total_price_with_tax)||void 0===n?void 0:n.formatted)||c,g=!!(null==_?void 0:_.tax_calculated)&&!(null==_?void 0:_.is_tax_inclusive)&&parseFloat((null==_?void 0:null===(s=_.taxes)||void 0===s?void 0:s.amount)||"0")>0,f=g?"+ tax":"",b=eR[l.id]||eR.HDS,y={total:c,term:u};return{uuid:a,planId:l.id,kind:m,plan:"Standard",total:c,totalWithTax:x,taxAmount:v,taxNote:f,hasTax:g,term:d,termPhrase:u,thenAmount:h,thenLabel:p,dateExpires:o.date_expires,timeRemainingSeconds:o.time_remaining_in_seconds,headerText:o.header_text,ctaText:e.cta_text,heroChip:b.heroChip,heroH1a:b.heroH1a,heroH1b:eO(b.heroH1b,y),heroSub:eO(b.heroSub,y),raw:e}}return null},eS=e=>{let{data:a,error:t,isLoading:r}=(0,c.ZP)("/user/offers?type=on_plan_change",{shouldRetryOnError:!1}),i=null==a?void 0:a.offer_groups;return{offer:e&&i?eI(i,e):null,offerGroups:i,isLoading:r&&!a&&!t,error:t}};var eP=t(24965),eF=t(96700),eT=t(17287),eE=t(30591),eB=t(11976),eW=!0;let eD=e=>{let{user:a}=e,{query:t,replace:o,isReady:c}=(0,n.useRouter)(),{client:d}=(0,i.useStatsigClient)(),u="string"==typeof t.offer?t.offer:void 0,{offer:h,offerGroups:p,isLoading:m,error:_}=eS(u),v=!m&&(p||_);(0,s.useEffect)(()=>{if(c){if(!u){o("/account");return}v&&!h&&o("/account")}},[c,u,v,h,o]);let x={name:(null==a?void 0:a.first_name)||"there"},g=(null==a?void 0:a.credit_card_last_four)||null,[f,y]=(0,s.useState)(!1),[j,k]=(0,s.useState)(!1),N=(0,s.useRef)(null),R=(0,s.useCallback)(()=>y(!0),[]),w=(0,s.useCallback)(()=>y(!1),[]),H=(0,s.useCallback)(()=>o("/account/manage-plan"),[o]),O=(0,s.useCallback)(function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(j&&u)try{null==d||d.logEvent(e,null,(0,eB.qr)(u,eB.L$,a))}catch(e){}},[j,u,d]);(0,s.useEffect)(()=>{k((0,eB.O8)({userId:null==a?void 0:a.external_id,offerId:u}))},[u,null==a?void 0:a.external_id]),(0,s.useEffect)(()=>{if(!h||!j||!u)return;let e="".concat(eB.L$,":").concat(u);N.current!==e&&(N.current=e,O(eB.ef))},[j,O,h,u]);let I=(0,s.useCallback)(()=>{O(eB.qn,{source:"hero"}),R()},[O,R]),S=(0,s.useCallback)(()=>{O(eB.gl,{source:"featured_program"}),R()},[O,R]),P=(0,s.useCallback)(()=>{O(eB.F2,{source:"final_cta"}),R()},[O,R]),F=(0,s.useCallback)(function(){let{reason:e,errorCode:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(eB.X$,{reason:e,...a?{error_code:a}:{}})},[O]),T=(0,s.useCallback)(function(){let{reason:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(eB.fM,{reason:e})},[O]),E=(0,s.useCallback)(function(){let{reason:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(eB.S1,{reason:e})},[O]),B=(0,s.useCallback)(function(){let{reason:e,errorCode:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(eB.qZ,{reason:e,...a?{error_code:a}:{}})},[O]),W=(0,s.useCallback)(()=>{O(eB.gl,{source:"success_overlay"})},[O]),D=(0,s.useCallback)(()=>{if(j){try{null==d||d.logEvent(eB.gL,null,(0,eB.xC)(u,eB.L$))}catch(e){}(0,eB.Up)({userId:null==a?void 0:a.external_id,offerId:u}),k(!1)}},[j,u,d,null==a?void 0:a.external_id]);return m||!h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{title:"Welcome back â Curiosity Stream"}),(0,r.jsx)("div",{className:"flex h-screen justify-center items-center",children:(0,r.jsx)(eF.Fu,{})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{title:"Welcome back â Curiosity Stream"}),(0,r.jsx)(ef,{tweaks:Z,offer:h,user:x,cardLastFour:g,onConfirm:I,onSeeAllPlans:H}),(0,r.jsx)(C,{}),(0,r.jsx)(b,{cardLastFour:g,onCtaClick:S}),(0,r.jsx)(eN,{}),(0,r.jsx)(X,{tweaks:Z,offer:h,cardLastFour:g,onConfirm:P,onSeeAllPlans:H}),(0,r.jsx)(z,{open:f,offer:h,planId:h.planId,userName:x.name,cardLastFour:g,onClose:w,onSuccess:D,onPaymentUpdateRequired:F,onPaymentUpdateSubmitted:T,onPaymentUpdateSuccess:E,onPaymentUpdateFail:B,onWatchNowCtaClick:W})]})},eA=(0,o.l)(eD);(eA=(0,eT.m6)(eA,eE.u["subscription.update"],{FallbackComponent:o.L})).getLayout=e=>(0,r.jsx)(eP.IE,{navigation:{variants:["minimal"]},children:e});var eL=eA},78192:function(e,a,t){"use strict";t.d(a,{Z:function(){return i}});var r=t(67294);let i=()=>{let e=(0,r.useRef)(),a=(0,r.useRef)();return{onVerify:a=>{e.current&&e.current(a)},verify:()=>
1{if(!a.current)throw"Recaptcha not loaded";return e.current=null,a.current.reset(),new Promise((t,r)=>{e.current=e=>t(e),a.current.execute()})},setRef:e=>{a.current=e}}}},11718:function(e){e.exports={section:"FeaturedProgramHighlight_section__7R_Ui",frame:"FeaturedProgramHighlight_frame__r4YkU",bgImage:"FeaturedProgramHighlight_bgImage__D9TsL",bgFallback:"FeaturedProgramHighlight_bgFallback__t6Sny",scrim:"FeaturedProgramHighlight_scrim__xpAf6",content:"FeaturedProgramHighlight_content__Z5P74",copy:"FeaturedProgramHighlight_copy__W20f6",eyebrow:"FeaturedProgramHighlight_eyebrow__6dPeJ",eyebrowDot:"FeaturedProgramHighlight_eyebrowDot__ENOXK",titleArt:"FeaturedProgramHighlight_titleArt__IbTHO",titleText:"FeaturedProgramHighlight_titleText__V5wAd",description:"FeaturedProgramHighlight_description__SEAKX",cta:"FeaturedProgramHighlight_cta__yVOXx",microNote:"FeaturedProgramHighlight_microNote__tX79h"}},47494:function(e){e.exports={section:"OriginalsRail_section__m5SL_",eyebrowRow:"OriginalsRail_eyebrowRow__1NgYC",eyebrowDot:"OriginalsRail_eyebrowDot__FfuFI",eyebrow:"OriginalsRail_eyebrow__HFf_O",heading:"OriginalsRail_heading__cL3LW",grid:"OriginalsRail_grid__kIGjX",card:"OriginalsRail_card__vBzhp",poster:"OriginalsRail_poster__3RZVa",posterImage:"OriginalsRail_posterImage__lT271",posterFallback:"OriginalsRail_posterFallback__SUgvx",originalBadge:"OriginalsRail_originalBadge__DV05T",originalDot:"OriginalsRail_originalDot___bqHn",title:"OriginalsRail_title__b8JOo",category:"OriginalsRail_category__IMYyG",skeletonLine:"OriginalsRail_skeletonLine__0ftRN"}},11799:function(e){e.exports={scrim:"ReactivateOverlay_scrim___xUXu",rxFadeIn:"ReactivateOverlay_rxFadeIn__x1510",frame:"ReactivateOverlay_frame__iaERr",rxRise:"ReactivateOverlay_rxRise__fqLkW",frameCloseButton:"ReactivateOverlay_frameCloseButton__crq7e","focus-visible":"ReactivateOverlay_focus-visible__wsGjr",frameCloseIcon:"ReactivateOverlay_frameCloseIcon___TfJ0",modalCard:"ReactivateOverlay_modalCard__He_W_",modalCardCentered:"ReactivateOverlay_modalCardCentered__9Ax_h",centered:"ReactivateOverlay_centered__S4IMt",eyebrow:"ReactivateOverlay_eyebrow__8VOY9",headline:"ReactivateOverlay_headline__hlazu",body:"ReactivateOverlay_body__18uqY",subtle:"ReactivateOverlay_subtle__8fDSg",footnote:"ReactivateOverlay_footnote__v30zM",spinner:"ReactivateOverlay_spinner__mlmQl",rxSpin:"ReactivateOverlay_rxSpin__unjxv",successBadge:"ReactivateOverlay_successBadge__ugiIH",errorBadge:"ReactivateOverlay_errorBadge___QS_1",errorEyebrow:"ReactivateOverlay_errorEyebrow__OExA5",cta:"ReactivateOverlay_cta___A0Nl",declined:"ReactivateOverlay_declined__JOvgr",declinedHeader:"ReactivateOverlay_declinedHeader__KcXpo",rxShake:"ReactivateOverlay_rxShake__Gqf_a",declinedIcon:"ReactivateOverlay_declinedIcon__e6GX5",declinedEyebrow:"ReactivateOverlay_declinedEyebrow__XGnvC",declinedSubtle:"ReactivateOverlay_declinedSubtle__xq2U9",declinedTitle:"ReactivateOverlay_declinedTitle__aVxQ5",declinedBody:"ReactivateOverlay_declinedBody__EoxLS",cardForm:"ReactivateOverlay_cardForm__l1jAy",secureLine:"ReactivateOverlay_secureLine__kn_sF"}},90457:function(e){e.exports={section:"ReactivationFinalCTA_section___OCUg",heading:"ReactivationFinalCTA_heading__CSPle",sub:"ReactivationFinalCTA_sub__DzaWr",cta:"ReactivationFinalCTA_cta__mBDwf",microNote:"ReactivationFinalCTA_microNote__rGjOs"}},12050:function(e){e.exports={chip:"ReactivationHero_chip__Ivedm",headline:"ReactivationHero_headline__lCe22",headlineName:"ReactivationHero_headlineName__g_Urm",headlineAccent:"ReactivationHero_headlineAccent__Xsn9Z",supporting:"ReactivationHero_supporting__Oj8DU",copyColumn:"ReactivationHero_copyColumn__8zKeT",rxFadeUp:"ReactivationHero_rxFadeUp__DbWRK",cta:"ReactivationHero_cta__2fa9O",ctaWhite:"ReactivationHero_ctaWhite__hLW7P",hero:"ReactivationHero_hero__5pb_N",bgImage:"ReactivationHero_bgImage__d0Og6",rxDrift:"ReactivationHero_rxDrift__sgMVn",scrim:"ReactivationHero_scrim__925UJ",edgeBlend:"ReactivationHero_edgeBlend___GKWb",bottomMask:"ReactivationHero_bottomMask__bIAKI",content:"ReactivationHero_content__JP__j",offerColumn:"ReactivationHero_offerColumn__307PP",offerCard:"ReactivationHero_offerCard__Tus8h",ribbon:"ReactivationHero_ribbon__f2QIL",endsIn:"ReactivationHero_endsIn__E4cLx",endsInDot:"ReactivationHero_endsInDot__eRLAI",endsInTime:"ReactivationHero_endsInTime__BiTHX",endsInChunk:"ReactivationHero_endsInChunk__DgjIW",endsInUnit:"ReactivationHero_endsInUnit__go_vq",billsLine:"ReactivationHero_billsLine__UkrIE",offerCardDark:"ReactivationHero_offerCardDark__BOc_y",darkTopBar:"ReactivationHero_darkTopBar__bMO2L",darkHeaderRow:"ReactivationHero_darkHeaderRow__sk25T",darkBadge:"ReactivationHero_darkB
1adge__A0whg",darkPlanRow:"ReactivationHero_darkPlanRow__oWTyq",darkPriceRow:"ReactivationHero_darkPriceRow__4eQtR",darkPrice:"ReactivationHero_darkPrice___33_Q",darkPriceFor:"ReactivationHero_darkPriceFor__dDYuR",darkTaxNote:"ReactivationHero_darkTaxNote__s_u3L",darkThen:"ReactivationHero_darkThen__ixIH3",darkDivider:"ReactivationHero_darkDivider__RNVhx",darkBills:"ReactivationHero_darkBills__aKQyS",expiredCard:"ReactivationHero_expiredCard__XoZg_",expiredTopBar:"ReactivationHero_expiredTopBar__B6peS",expiredHeader:"ReactivationHero_expiredHeader__NO6Ef",expiredIcon:"ReactivationHero_expiredIcon__CZzZU",expiredEyebrow:"ReactivationHero_expiredEyebrow__5cmnC",expiredTitle:"ReactivationHero_expiredTitle__VkyRO",expiredBody:"ReactivationHero_expiredBody__gqxSC",expiredFootnote:"ReactivationHero_expiredFootnote__hdNxT",carouselHero:"ReactivationHero_carouselHero__u1yqq",carouselContent:"ReactivationHero_carouselContent__nawVq",carouselPosterWrap:"ReactivationHero_carouselPosterWrap__xT4m7",carouselPoster:"ReactivationHero_carouselPoster__8h25w",carouselFrame:"ReactivationHero_carouselFrame__35wK_",carouselImage:"ReactivationHero_carouselImage__ear7D",carouselFallback:"ReactivationHero_carouselFallback__Hde86",carouselDots:"ReactivationHero_carouselDots__u2sTt",carouselDot:"ReactivationHero_carouselDot__UN13n",carouselCaption:"ReactivationHero_carouselCaption__sp7Vp",carouselTag:"ReactivationHero_carouselTag__LRoMJ",carouselTagDot:"ReactivationHero_carouselTagDot__aOH9d",carouselTagSep:"ReactivationHero_carouselTagSep__8PHXy",carouselRank:"ReactivationHero_carouselRank__GKzub",carouselBlurb:"ReactivationHero_carouselBlurb__LkrHH",carouselHeroMobile:"ReactivationHero_carouselHeroMobile__ci9nJ",mobileCopy:"ReactivationHero_mobileCopy__GRh4K",mobileOffer:"ReactivationHero_mobileOffer__YxtCP",trendingRail:"ReactivationHero_trendingRail__Qz0HU",trendingHeader:"ReactivationHero_trendingHeader__d7eIX",trendingDot:"ReactivationHero_trendingDot__h7SPK",trendingLabel:"ReactivationHero_trendingLabel__i2leq",trendingScroller:"ReactivationHero_trendingScroller__ypG6o",trendingItem:"ReactivationHero_trendingItem__ChR9m",trendingPoster:"ReactivationHero_trendingPoster__Rs7UP",trendingImage:"ReactivationHero_trendingImage__hjqfO"}},7400:function(e){e.exports={section:"ReactivationPerks_section___VQHC",grid:"ReactivationPerks_grid__5hmGe",item:"ReactivationPerks_item__SN0zX",number:"ReactivationPerks_number__Efo5T",title:"ReactivationPerks_title__Uofzn",sub:"ReactivationPerks_sub__9BCMT"}}},function(e){e.O(0,[3871,8323,4320,3962,9299,9315,3621,1591,6958,2776,8990,9912,2888,9774,179],function(){return e(e.s=85881)}),_N_E=e.O()}]);
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.