(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,499239,e=>{"use strict";var t=e.i(144683),i=e.i(74492);(0,t.g)("auth");let r=(0,t.g)(null);(0,t.g)(null);let n=(0,t.g)(!1),a=(0,t.g)(null),o=(0,i.N)("wxu-web/keyval:cart","",void 0,{getOnInit:!0}),s=(0,i.N)("wxu-web/keyval:cartIds",null,void 0,{getOnInit:!0}),l=(0,t.g)(""),u=(0,t.g)(null),c=(0,i.N)("wxu-web/keyval:eventChainId","",void 0,{getOnInit:!0}),d=(0,t.g)("idle");e.s(["O",0,r,"N",0,u,"E",0,s,"A",0,o,"u",0,d,"C",0,c,"Q",0,a,"k",0,n,"P",0,l])},145473,e=>{"use strict";var t=e.i(458201),i=e.i(538167),r=e.i(526932),n=e.i(282446),a=e.i(789422),o=e.i(901351),s=e.i(422825),l=e.i(837879),u=e.i(725296),c=e.i(394481),d=e.i(576816),f=e.i(539353),p=e.i(553329),g=e.i(695881),m=e.i(143851),b=e.i(703123),y=e.i(61284);let w=(0,g.createLogger)("useGoogleLogin");var h=e.i(404893),v=e.i(367810),E=e.i(792461);e.s(["GoogleAuthScriptClient",0,function({onLoad:e,prompt:g=!0,isUserLoggedIn:S,redirectToCheckoutOnSignup:I,oneTapOnly:C=!1}){let O=(0,a.r)("GoogleLogin"),P=(0,n.F)(h.f),{loginWithGoogle:_,error:A,clearError:k}=function(e=!1){let t=(0,a.r)("GoogleLogin"),[r,g]=(0,i.useState)(null),h=(0,n.y)(b.f),{updateEmailSubscriptions:v}=(0,s.f)({skipStatus:!0}),{authSuccess:E,authRedirect:S}=(0,m.f)(),I=(0,l.f)(),C=(0,n.y)(c.f)??u.U.EXEMPT,O=I&&u.D.includes(C)&&C!==u.U.USA_CCPA,{newsletter:P,weekly:_}=h,A=O||h.onYourRadar,k=O||h.marketing,R=(0,d.f)({formVariant:"account page google",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),T=(0,f.f)({formVariant:"account page google",loginMethod:"Google",marketingOptedIn:!0===k}),G=(0,i.useCallback)(async t=>{let i=await o.f.auth.loginWithGoogle({google_id_token:t}),r=!!i.isFirstLogin;if(await E({email:i.email,userID:i.userID,type:r?"signup":"login"},!1,{skipSignupCompleteEvent:r}),!r)return S(),!0;let{error:n}=await (0,p.f)(R());return n&&w.warn("Failed to track signup-complete for Google signup",n),T(),await v({newsletter:P,weekly:_,onYourRadar:A,marketing:k}).catch(e=>{w.error("Failed to update email subscriptions",e)}),e&&I?S(y.f):S(),!0},[E,S,R,T,v,P,_,A,k,e,I]);return{loginWithGoogle:(0,i.useCallback)(async({credential:e})=>{g(null);let{data:i,error:r}=await (0,p.f)(G(e));if(i)return!0;w.error("Failed to login with Google",r);let{messageCode:n}=r?.data??{};switch(n){case 1e3:case 1026:case 1033:g({header:t("emailAlreadyUsedGoogleHeader"),body:t.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:g({header:t("emailAlreadyRegisteredGoogleHeader"),body:t("emailAlreadyRegisteredGoogleBody")});break;default:g({header:t("somethingWentWrong")})}return!1},[G,t]),error:r,clearError:(0,i.useCallback)(()=>g(null),[])}}(I),R=(0,E.f)(_),T=(0,i.useRef)(null);A&&(T.current=A);let G=T.current;return(0,t.jsxs)(t.Fragment,{children:[!(C&&S)&&(0,t.jsx)(r.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{R.current?.(e)}}),P(!0)),e?.(),!S&&g&&t?.prompt()},id:"google-gsi-script",strategy:C?"lazyOnload":"afterInteractive"}),G&&(0,t.jsx)(v.N,{open:!!A,onOpenChange:e=>!e&&k(),children:(0,t.jsx)(v.J,{showCloseButton:!1,title:G.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:G.body||""}}),primaryAction:{label:O("cancel"),onClick:k}})})]})}],145473)},642588,e=>{"use strict";e.i(138276);let t="stripeCart",i=/^[a-z0-9-]{1,64}$/;function r(e){return"string"==typeof e&&i.test(e)}let n=/^[A-Za-z0-9-]{1,64}$/;function a(e,t,i){"u">typeof document&&(document.cookie=`${e}=${t}; domain=.weather.com; path=/; samesite=lax; secure; max-age=${i}`)}let o="zuoraCart",s=/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/;function l(e){return"string"==typeof e&&s.test(e)}e.s(["Z",0,function(){a(t,"",0)},"e",0,function(){a(o,"",0)},"b",0,function(e){return"string"==typeof e&&n.test(e)},"i",0,r,"h",0,l,"B",0,function(e){let i=e.trim();r(i)&&a(t,i,1800)},"_",0,function(e){let t=e.trim();l(t)&&a(o,t,1800)}])},138276,e=>{"use strict";let t={"f42d0603-2f6f-454f-aa1f-8a293b8a82a2":{plan:"twc-premium-monthly"},"e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb":{plan:"twc-premium-annual"},"f42d0603-2f6f-454f-aa1f-8a293b8a86ma":{plan:"twc-premium-annual",offer:"ep2qejazaqea"},"ab383695-a1b9-4d39-86e0-90e63b0cb9fb":{plan:"twc-premium-annual",offer:"56e9u62z6c92"},"f7e53b80-9d8c-4733-a31e-d0f97aa917c8":{plan:"twc-premium-annual-100"},"9c2d8ad5-51a4-464e-9d8a-12c0f248ceea":{plan:"twc-premium-6month"},"7218a4c4-1a0a-4e31-b047-b05a4c7a1a7d":{plan:"twc-standard-monthly"},"44b324df-0b83-4b95-b4ab-77803026ee07":{plan:"twc-standard-annual"},"43ea0710-b055-4ab5-ba39-bbfd0bc5d5ce":{plan:"wu-adfree-annual"},"15730354-c91f-4343-a792-a83b16dd183b":{plan:"wu-adfree-monthly"},"55883fb6-c39b-440b-b964-0b96155851e5":{plan:"wu-premium-annual"},"7a808b48-a174-417b-aa4d-c8561cf430ea":{plan:"wu-premium-monthly"}};function i(e){let i;return(!(i=e?.trim().toLowerCase())||!Object.hasOwn(t,i)?null:t[i]??null)?.plan??null}let r=new Map(Object.entries(t).filter(([,e])=>!e.offer).map(([e,{plan:t}])=>[t,e]));e.s(["e",0,i,"B",0,function(e){let t=e?.trim().toLowerCase();return t&&r.get(t)||null},"l",0,function(e){return i(e)?.startsWith("wu-")??!1}])},502491,e=>{"use strict";var t=e.i(458201),i=e.i(538167);e.s(["default",0,function({candidate:e,failedMessage:r="Authentication failed. Please try again.",protectMessage:n="Remove your adblocker.",fetch:a,refresh:o,getCustomAccountInfo:s}){let[l,u]=(0,i.useState)(""),[c,d]=(0,i.useState)(!1),[f,p]=(0,i.useState)(!1),[g,m]=(0,i.useState)(!1),b=(0,i.useRef)([]);(0,i.useEffect)(()=>{e.id!==b.current[0]&&(b.current=[e.id],e.transactIDs&&b.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let y=(0,i.useCallback)(()=>{try{a("/?adm_get_token=1").then(e=>{e.ok&&o()}).catch(()=>{u(r)})}catch{u(r)}},[a,r,o]),w=(0,i.useMemo)(()=>"u">typeof window?window:{admiral:{}},[]);return(0,i.useEffect)(()=>{typeof window>"u"||(w.admiral=w.admiral||function(...e){(w.admiral.q=w.admiral.q||[]).push(e)},w.admiral("after","measure.detected",function(t){if("abr"==e.requirement)t.adblocking?(u(n),d(!0)):m(!0);else if("account"==e.requirement||"benefits"==e.requirement){let t=!!s;w.admiral("after","visitor.latest",function(i){var r;if("account"===e.requirement)(t?s().registered:i.status.registered)||f||(u(n),d(!0));else if("benefits"===e.requirement){let i=[];if(t)i=s().benefits;else{let e=document.cookie.split(";");e&&(i=(null==(r=e.find(e=>e.startsWith("admbenefits=")))?void 0:r.split(","))??[])}if(i){let t=e.benefits??[];if(0==t.length)return void m(!0);let r=!1;for(let e of t)i.includes(e)&&(r=!0);r?m(!0):(u(n),d(!0))}else u(n),d(!0)}})}}))},[]),(0,i.useEffect)(()=>{g&&(m(!1),y())},[g,y]),(0,i.useEffect)(()=>{f||!c||(p(!0),w.admiral("targeting","force",{candidateIDs:b.current}))},[f,c,b,w]),(0,t.jsxs)("div",{children:[l||null," "]})}])},899507,e=>{"use strict";e.s(["f",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["f",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["f",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["f",0,function(e){return"__proto__"===e}],355200)},590238,e=>{"use strict";var t=e.i(935251),i=e.i(537989);e.i(609717);var r=e.i(950771),n=e.i(695203),a=e.i(604323),o=e.i(797770),s=e.i(236433),l=e.i(513539),u=e.i(991511);e.s(["AnalyticsBoundary",0,e=>{let c=(0,t.usePathname)();return(0,u.f)([[i.f,e.pageId],[r.f,e.pageLocale],[n.f,e.deviceClass],[a.f,e.metricsArticleData],[o.f,e.adsMetricsUnitAndZone??"non_monetized"],[l.D,e.layoutState??null],[l.M,e.activeEvent??null],[s.f,c]]),null}])},539353,e=>{"use strict";e.i(199690);var t=e.i(538167),i=e.i(282446),r=e.i(201542),n=e.i(682142),a=e.i(782937),o=e.i(695881),s=e.i(333350),l=e.i(64412),u=e.i(950771),c=e.i(537989),d=e.i(695203),f=e.i(158662),p=e.i(358273),g=e.i(777638),m=e.i(727365),b=e.i(896363),y=e.i(924776),w=e.i(24638),h=e.i(963722),v=e.i(313983),E=e.i(605781);let S=(0,o.createLogger)("useSignupComplete"),I=["SUN","MON","TUE","WED","THU","FRI","SAT"],C=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),O=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),P=["appVersion","cookiesEnabled","dayOfWeek","deviceClass","formVariant","functionalTechnologies","genderFilled","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","loginMethod","marketingOptedIn","newsletterOptedIn","pageId","partner","physicalCountry","physicalState","priv","regime","sessionId","sessionStartTime","url","wlocCity","wlocCountry","wlocDMA","wlocState"];e.s(["f",0,(e={})=>{let o=(0,i.y)(c.f),_=(0,i.y)(u.f),A=(0,i.y)(d.f),{location:k}=(0,l.f)(),R=(0,i.y)(f.f),T=(0,w.f)(),G=(0,y.f)()&&void 0!==T,D=(0,t.useRef)(!1),{formVariant:N,url:U,loginMethod:L,newsletterOptedIn:M,marketingOptedIn:F,sourcePage:j,sourceModule:x,sourceElement:W,sourcePosition:B}=e,z=(0,t.useMemo)(()=>{if(!s.default)return null;let e=(0,n.f)(),t=e?.["TWC-GeoIP-Country"]??(0,r.getCookie)("twc-location-country"),i=e?.["TWC-GeoIP-Region"]??(0,r.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,r.getCookie)("twc-privacy"),u=window.DprSdk?.getGdprConsentOptInsString()??"",c=window.DprSdk?.getCcpaSaleOptInString()??"",d=window.navigator?.globalPrivacyControl??!1,f=(0,h.u)(v.f.FUNCTIONAL_TECHNOLOGY,T),y=(0,h.u)(v.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING,T),w=navigator?.cookieEnabled??!1,E=(0,r.getCookie)("partner")||"",S=(0,a.i)(E)??E,P=(0,p.N)(),G=P?.sessionId||"",D=P?.sessionStartTime||0,z=new Date,V=z.getHours(),H=I[z.getDay()]??"",Y=-z.getTimezoneOffset()/60,Z=document.referrer,$=(0,m.f)(k?.type),q=k?.featureSource??null;return{formVariant:N??"",url:U??"",loginMethod:L??"Regular",newsletterOptedIn:M??!1,marketingOptedIn:F??!1,genderFilled:!1,sourcePage:j??null,sourceModule:x??null,sourceElement:W??null,sourcePosition:B??null,pageId:o??"",locale:_,deviceClass:A,sessionId:G,sessionStartTime:D,partner:S,wlocCity:k?.city??null,wlocCountry:k?.countryCode??null,wlocState:k?.adminDistrictCode??null,wlocDMA:k?.dmaCd??null,wlocId:k?.placeId??null,wlocFeatureSource:null!=q&&O.has(q)?q:void 0,wlocTags:k?.tags?.length?(0,b.f)(k.tags):null,wlocType:null!==$&&C.has($)?$:void 0,wlocFeatureId:k?.featureId??null,dayOfWeek:H,regime:l??"",cookiesEnabled:w,gpcSignalOptOut:d,functionalTechnologies:f,geographicallyRelevantAds:y,priv:u,privProducts:c,referrer:Z,deviceTimeZone:Y,hourOfDay:V,physicalCountry:t??"",physicalState:i??"",interestBasedAds:T?.[v.f.INTEREST_BASED_ADS]??null,campaign:(0,g.s)()??void 0,tpcc:(0,g.J)(),linkReferral:(0,g.W)(),experimentJoinList:R,weatherMode:"normal",samsungVersion:(0,g.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)}},[N,U,L,M,F,j,x,W,B,o,_,A,k,R,T]),V=G&&null!==z&&P.every(e=>void 0!==z[e]);return(0,t.useCallback)(()=>{if(z&&V&&!D.current)try{(0,E.e)(z),D.current=!0,S.info('Hightouch: Event "signup-complete" tracked')}catch(e){S.error('Hightouch: Event "signup-complete" failed',{error:e})}},[z,V])}])},592188,e=>{"use strict";e.i(199690);var t=e.i(538167),i=e.i(282446),r=e.i(201542),n=e.i(682142),a=e.i(782937),o=e.i(695881),s=e.i(333350),l=e.i(64412),u=e.i(950771),c=e.i(537989),d=e.i(695203),f=e.i(358273),p=e.i(158662),g=e.i(777638),m=e.i(924776),b=e.i(24638),y=e.i(963722),w=e.i(313983),h=e.i(409628),v=e.i(605781);let E=(0,o.createLogger)("useUserLoggedIn");e.s(["f",0,(e={})=>{let o=(0,i.y)(c.f),S=(0,i.y)(u.f),I=(0,i.y)(d.f),C=(0,i.y)(p.f),{location:O}=(0,l.f)(),P=(0,b.f)(),_=(0,m.f)()&&void 0!==P,{url:A}=e;return(0,t.useCallback)(()=>{if(!s.default||!_)return;let e=(0,n.f)(),t=e?.["TWC-GeoIP-Country"]??(0,r.getCookie)("twc-location-country"),i=e?.["TWC-GeoIP-Region"]??(0,r.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,r.getCookie)("twc-privacy"),u=window.DprSdk?.getGdprConsentOptInsString()??"",c=window.DprSdk?.getCcpaSaleOptInString()??"",d=window.navigator?.globalPrivacyControl??!1,p=(0,y.u)(w.f.FUNCTIONAL_TECHNOLOGY),m=(0,y.u)(w.f.GEOGRAPHICALLY_RELEVANT_ADVERTISING),b=navigator?.cookieEnabled??!1,P=(0,r.getCookie)("partner")||"",k=(0,a.i)(P)??P,R=(0,f.N)(),T=R?.sessionId||"",G=R?.sessionStartTime||0,D=new Date,N=D.getHours(),U=h.f[D.getDay()]??"",L=-D.getTimezoneOffset()/60,M=document.referrer,F={url:A??window.location.pathname,referrer:M,privProducts:c,deviceTimeZone:L,pageId:o??"",locale:S,deviceClass:I,sessionId:T,sessionStartTime:G,partner:k,wlocCity:O?.city??null,wlocCountry:O?.countryCode??null,wlocState:O?.adminDistrictCode??null,wlocDMA:O?.dmaCd??null,dayOfWeek:U,regime:l??"",cookiesEnabled:b,gpcSignalOptOut:d,functionalTechnologies:p,geographicallyRelevantAds:m,priv:u,hourOfDay:N,physicalCountry:t??"",physicalState:i??"",campaign:(0,g.s)()??void 0,tpcc:(0,g.J)(),linkReferral:(0,g.W)(),experimentJoinList:C,weatherMode:"normal",samsungVersion:(0,g.L)(),appVersion:"6bbd4204dd7437768dd9e31d47333d570221fb89".slice(0,10)};try{(0,v.M)(F),E.info('Hightouch: Event "user-loggedin" tracked')}catch(e){E.error('Hightouch: Event "user-loggedin" failed',{error:e})}},[A,o,S,I,C,O,_])}])},576816,703123,e=>{"use strict";var t=e.i(538167),i=e.i(293163),r=e.i(947118),n=e.i(737801);e.s(["f",0,(e={})=>{let a=(0,r.f)(),o=(0,n.f)(),[s,l]=(0,t.useState)(!1),u=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let t={...o,formVariant:e.formVariant,sensitiveDataAuthorization:e.sensitiveDataAuthorization,deviceTimeZone:e.deviceTimeZone,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0===t.formVariant&&delete t.formVariant,void 0===t.sensitiveDataAuthorization&&delete t.sensitiveDataAuthorization,void 0===t.deviceTimeZone&&delete t.deviceTimeZone,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,t},[o,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,i.k)(c)&&!s&&l(!0)},[c,s]),(0,t.useCallback)(async()=>{if((a||window.mParticle?.isInitialized?.())&&s&&!u.current)try{window.mParticle?.logEvent?.("signup-complete",window.mParticle?.EventType?.Other,c),u.current=!0,console.debug(`MParticle: Event "signup-complete" tracked - ${c.pageId}`)}catch(e){console.error('MParticle: Event "signup-complete" failed',e)}},[a,c,s])}],576816);let a=(0,e.i(144683).g)({});e.s(["f",0,a],703123)},952582,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_SUBSCRIPTIONS=i.ON_YOUR_RADAR_GROUP=i.MARKETING_EMAILS_GROUP=i.WEEKLY_BRIEF_GROUP=i.DAILY_NEWSLETTERS_GROUP=void 0,i.DAILY_NEWSLETTERS_GROUP="daily-newsletters-1",i.WEEKLY_BRIEF_GROUP="weekly-brief",i.MARKETING_EMAILS_GROUP="marketing-emails-1",i.ON_YOUR_RADAR_GROUP="on-your-radar",i.DEFAULT_SUBSCRIPTIONS=[{subscriptionGroupName:i.DAILY_NEWSLETTERS_GROUP,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:i.WEEKLY_BRIEF_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:i.MARKETING_EMAILS_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:i.ON_YOUR_RADAR_GROUP,subscriptionGroupId:"",isSubscribed:!1}]},451086,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getEmailPreferencesStatus=o;let r=e.r(678651),n=e.r(414655),a=e.r(370220);async function o(){let e=(0,a.getEmailPreferencesStatusUrlConfig)(),t=(0,r.urlFrom)(e),i=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,n.handleFetchResponse)(i)}},454307,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.setEmailPreferences=o,i.updateSubscription=s;let r=e.r(678651),n=e.r(414655),a=e.r(370220);async function o(e){let t=(0,a.getEmailPreferencesSetUrlConfig)(),i=(0,r.urlFrom)(t),o=JSON.stringify(function(e){let{subscriptions:t,email:i,mParticleId:r}=e,n={};return t&&(n.subscriptions=t),i&&(n.email=i),r&&(n.mParticleId=r),n}(e)),s=await fetch(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:o});return 200===s.status||400===s.status?await s.json():(0,n.handleFetchResponse)(s)}async function s(e,t,i){return o({subscriptions:[{subscriptionGroupName:e,isSubscribed:t,...i&&{attributes:i}}]})}},370220,(e,t,i)=>{"use strict";e.i(199690),Object.defineProperty(i,"__esModule",{value:!0}),i.getEmailPreferencesStatusUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/status"}},i.getEmailPreferencesSetUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/set"}},i.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:r,protocol:"https",pathname:"/api/v1/email-preferences/change-email"}};let r="weather.com"},383216,(e,t,i)=>{"use strict";var r=e.i(199690);Object.defineProperty(i,"__esModule",{value:!0}),i.getSubscriptionHost=function(){return(0,n.resolveWxHost)(r.default.env.NEXT_PUBLIC_SUBSCRIPTION_WX_HOST||"weather.com")};let n=e.r(336410)},404893,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},143851,e=>{"use strict";var t=e.i(282446),i=e.i(245943),r=e.i(45846),n=e.i(310847),a=e.i(776169),o=e.i(671525),s=e.i(652517),l=e.i(658547),u=e.i(18358),c=e.i(592188),d=e.i(539353),f=e.i(521350),p=e.i(529603),g=e.i(543512),m=e.i(160317),b=e.i(756227),y=e.i(553329),w=e.i(358273),h=e.i(459598),v=e.i(695881),E=e.i(735526);let S=(0,v.createLogger)("useUserLogin"),I=/^(?:\/[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,4})?)?\/subscribe\/checkout\/?$/;e.s(["f",0,function(){let e=(0,t.F)(n.m),v=(0,b.f)(),C=(0,t.y)(n.C),O=(0,t.y)(n.E),{syncPreferencesFromUpsx:P,updatePreferences:_}=(0,a.f)(),{navigate:A}=(0,o.U)(),{login:k}=(0,l.f)(),R=(0,u.f)(),T=(0,c.f)(),G=(0,d.f)({url:window.location.pathname}),D=e=>{(0,w.m)(),(0,h.w)(),(0,h.M)();let t=new URLSearchParams(window.location.search).get("ref"),i=I.test(window.location.pathname)?`${window.location.pathname}${window.location.search}`:null,r=e??i??(t&&`https://${t}`)??C;r===i?(0,s.Q)(()=>A(r)):A(r)},N=async(t,i=!0,n={})=>{v(),t?.type==="signup"&&(0,E.q)(),(0,f.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),e(!0),await P()||await _({});let a=null;try{a=await r.f.purchase.getPurchaseToken()}catch(e){console.error("Failed to get UPSX token:",e)}if(t?.userID){let{error:e}=await (0,y.f)(k({email:t.email,customerid:t.userID,other:O}));e&&S.error("Failed to establish mParticle identity:",e);let i=a?.premium&&g.j[a.product]||g.H.standard;(0,p.E)({isLoggedIn:!0,isRegisteredUser:!0,upsxId:t.userID,registeredEmail:t.email,premium:g.L.includes(i),premiumProductTier:(0,m.f)(i)});let r="signup"===t.type,o=r&&n.skipSignupCompleteEvent;o||R(r?"signup-complete":"user-loggedin",{url:window.location.pathname}),r&&!o&&G(),r||T()}i&&D()};return{login:async(e,t)=>{try{let i=await r.f.auth.login({email:e,password:t});if(!i)return{success:!1,error:{}};return await N({email:i.email,userID:i.userID,type:"login"}),{success:!0}}catch(e){if(console.error("Failed to login",e),e instanceof i.APIError){let t=e.data;return{success:!1,error:{code:e.code,...t}}}return{success:!1,error:{}}}},authSuccess:N,authRedirect:D}}])},61284,e=>{"use strict";e.s(["f",0,"/subscribe/checkout?products=e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb&promoCode=5OFF&tpcc=mktg-5OFF-reg"])},422825,e=>{"use strict";var t=e.i(282446),i=e.i(794120),r=e.i(899507),n=e.i(449928),a=e.i(760430);function o(e){if((0,n.f)(e))return e;if(Array.isArray(e)||(0,a.f)(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){let t=new i(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let t=new i(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}var s=e.i(355200);function l(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function u(e,t,i){let r=Object.keys(t);for(let n=0;n"boolean"==typeof e?{isSubscribed:e}:e;e.s(["f",0,({forceSubs:e,skipStatus:n}={})=>{let[a,s]=(0,t.q)(f.f),{user:w}=(0,p.f)(),h=(0,b.f)()||e,v=w?.userID||null,E=(0,m.useCallback)(e=>{if(v){var t;let i,r;s({userId:v,expiry:Date.now()+9e5,subscriptions:(t=a?.subscriptions,i=t?.length?t:g.DEFAULT_SUBSCRIPTIONS,r={},e?(i?.forEach(e=>{r[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=r[e.subscriptionGroupName]||{};r[e.subscriptionGroupName]=u(o(t),e,function e(t,i){if(Array.isArray(i))if(Array.isArray(t))return u(o(t),i,e);else return u([],i,e);if(l(i))if(l(t))return u(o(t),i,e);else return u({},i,e)})}),Object.values(r)):i)})}},[v,s,a?.subscriptions]),S=a&&a.userId===v&&a.expiry&&a.expiry>Date.now(),I=h&&v&&!S,{isLoading:C}=(0,i.U)(!n&&I?`getEmailPreferencesStatus/${v}`:void 0,d.getEmailPreferencesStatus,{shouldRetryOnError:e=>!(e instanceof Error&&/\(status 40[14]\)/.test(e.message)),revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{v&&e&&E(e.subscriptions)}}),O=(0,m.useCallback)(async e=>{if(!h)return{status:"error",error:"Subscription is not enabled!"};let t=await (0,c.setEmailPreferences)({subscriptions:e});return"success"===t.status&&E(e),t},[E,h,a?.subscriptions]),P=(0,m.useCallback)(async({newsletter:e,weekly:t,onYourRadar:i,marketing:n})=>{let a=[!(0,r.f)(e)&&{subscriptionGroupName:"daily-newsletters-1",...y(e)},!(0,r.f)(t)&&{subscriptionGroupName:"weekly-brief",...y(t)},!(0,r.f)(i)&&{subscriptionGroupName:"on-your-radar",...y(i)},!(0,r.f)(n)&&{subscriptionGroupName:"marketing-emails-1",...y(n)}].filter(Boolean);return await O(a)},[O]);return{emailSubscriptions:S?a.subscriptions:null,updateEmailSubscriptions:P,updateEmailPreference:O,isLoadingPreferences:C}}],422825)}]);