(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1567,e=>{"use strict";var t=e.i(947118),i=e.i(737801),o=e.i(539922);e.s(["useTrackModuleViewed",0,()=>{let e="module-viewed",r=(0,t.useIsInitialized)(),n=(0,i.useEventAttributes)();return(0,o.useCallback)(({moduleId:t,modulePosition:i})=>{if(!r)return void console.warn("MParticle is not initialized");let o={module_id:t,module_position:i,...n};try{window.mParticle?.logEvent?.(e,window.mParticle?.EventType?.Other,o),console.debug(`MParticle: Event "${e}" tracked`,o)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}},[n,r])}])},670279,e=>{"use strict";var t=e.i(648198),i=e.i(539922),o=e.i(13155),r=e.i(204782);let n=({pageTemplate:e,pageDashboard:n})=>{let s=(0,r.default)();return((0,i.useEffect)(()=>{s&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),n&&window._newsroom.push({pageDashboard:n}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[s,e,n]),s&&e)?(0,t.jsx)(o.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"beforeInteractive",id:"newsroom_loader_script"}):null};e.s(["Newsroom",0,n,"default",0,n])},855602,e=>{"use strict";var t=e.i(648198),i=e.i(539922),o=e.i(1567),r=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:n,variant:s="frontend",children:l})=>{let a=(0,i.useRef)(null),[c,u]=(0,i.useState)(!1),d=(0,i.useRef)(null),m=(0,o.useTrackModuleViewed)();return"admin"===s?(0,t.jsx)(t.Fragment,{children:l}):((0,i.useEffect)(()=>{if(c||!r.default||!a.current)return;let t=a.current,i=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?d.current||(d.current=setTimeout(()=>{m({moduleId:e,modulePosition:n}),u(!0),d.current=null},2e3)):d.current&&(clearTimeout(d.current),d.current=null)})},{threshold:1});i.observe(t);let o=t.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,l=window.innerWidth||document.documentElement.clientWidth;return o.top>=0&&o.left>=0&&o.bottom{m({moduleId:e,modulePosition:n}),u(!0),d.current=null},2e3)),()=>{d.current&&clearTimeout(d.current),i.disconnect()}},[c,e,n,m]),(0,t.jsx)("div",{ref:a,className:"hide-empty","data-module-id":e,children:l}))}])},590238,e=>{"use strict";var t=e.i(537989),i=e.i(827049),o=e.i(695203),r=e.i(604323),n=e.i(797770),s=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,s.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[i.pageLocaleAtom,e.pageLocale],[o.deviceClassAtom,e.deviceClass],[r.metricsArticleDataAtom,e.metricsArticleData],[n.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},703123,e=>{"use strict";let t=(0,e.i(751931).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(426641);var t=e.i(648198),i=e.i(13155),o=e.i(539922),r=e.i(475566),n=e.i(547100),s=e.i(671525),l=e.i(901351),a=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),m=e.i(703123),g=e.i(404893),h=e.i(367810),w=e.i(251392);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:p=!0,isUserLoggedIn:f}){let A=(0,n.useTranslations)("GoogleLogin"),v=(0,r.useSetAtom)(g.googleLoginInitilizedAtom),{loginWithGoogle:y,error:b,clearError:_}=function(){let e=(0,n.useTranslations)("GoogleLogin"),[t,i]=(0,o.useState)(null),g=(0,r.useSetAtom)(a.userHasLoggedInBeforeAtom),h=(0,r.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:w}=(0,u.useEmailPreferences)(),{refresh:p}=(0,s.usePageNavigation)(),{syncPreferencesFromUpsx:f}=(0,c.usePreferences)(),{authSuccess:A,authRedirect:v}=(0,d.useUserLogin)();return{loginWithGoogle:(0,o.useCallback)(async t=>{let{credential:o}=t;i(null);try{let e=await l.upsxClient.auth.loginWithGoogle({google_id_token:o}),t=e?.isFirstLogin;await A({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:r,onYourRadar:n,marketing:s,alwaysSubscribe:a}=h||{};return(t||a)&&await w({newsletter:i,weekly:r,onYourRadar:n,marketing:s}).catch(e=>{console.error("Failed to update email subscriptions",e)}),v(),!0}catch(t){console.error("Failed to login with Google",t);try{let o=t?.data,r=o?.messageCode;if(!r)throw Error("No Error Message");switch(r){case 1e3:case 1026:case 1033:i({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:i({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){i({header:e("somethingWentWrong")})}return!1}},[g,f,p,A,v,w,h]),error:t,clearError:(0,o.useCallback)(()=>{i(null)},[])}}(),E=(0,w.useRefMemo)(y);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.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=>{E.current?.(e)}}),v(!0)),e?.(),!f&&p&&t?.prompt()},id:"google-gsi-script"}),(0,t.jsx)(h.Dialog,{open:!!b,onOpenChange:e=>!e&&_(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:b?.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:b?.body||""}}),primaryAction:{label:A("cancel")}})})]})}],874905)},711899,e=>{e.v(t=>Promise.all(["static/chunks/0ypuq.ev5a56~.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/0vd2x9hh4402h.js"].map(t=>e.l(t))).then(()=>t(72990)))}]);