(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,590238,e=>{"use strict";var t=e.i(537989),o=e.i(827049),i=e.i(695203),a=e.i(604323),r=e.i(797770),n=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,n.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[o.pageLocaleAtom,e.pageLocale],[i.deviceClassAtom,e.deviceClass],[a.metricsArticleDataAtom,e.metricsArticleData],[r.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},855602,e=>{"use strict";var t=e.i(648198),o=e.i(539922),i=e.i(1567),a=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:r,moduleKey:n,variant:l="frontend",children:s})=>{let c=(0,o.useRef)(null),[d,u]=(0,o.useState)(!1),m=(0,o.useRef)(null),h=(0,i.useTrackModuleViewed)();return"admin"===l?(0,t.jsx)(t.Fragment,{children:s}):((0,o.useEffect)(()=>{if(d||!a.default||!c.current)return;let t=c.current,o=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?m.current||(m.current=setTimeout(()=>{h({moduleId:e,modulePosition:r}),u(!0),m.current=null},2e3)):m.current&&(clearTimeout(m.current),m.current=null)})},{threshold:1});o.observe(t);let i=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,l=window.innerWidth||document.documentElement.clientWidth;return i.top>=0&&i.left>=0&&i.bottom{h({moduleId:e,modulePosition:r}),u(!0),m.current=null},2e3)),()=>{m.current&&clearTimeout(m.current),o.disconnect()}},[d,e,r,h]),(0,t.jsx)("div",{ref:c,className:"hide-empty","data-module-id":e,"data-module-key":n,"data-item-position":r,children:s}))}])},670279,e=>{"use strict";var t=e.i(648198),o=e.i(539922),i=e.i(13155),a=e.i(204782);let r=({pageTemplate:e,pageDashboard:r})=>{let n=(0,a.default)();return((0,o.useEffect)(()=>{n&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),r&&window._newsroom.push({pageDashboard:r}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[n,e,r]),n&&e)?(0,t.jsx)(i.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"beforeInteractive",id:"newsroom_loader_script"}):null};e.s(["Newsroom",0,r,"default",0,r])},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),o=e.i(539922),i=e.i(13155),a=e.i(475566),r=e.i(547100),n=e.i(671525),l=e.i(901351),s=e.i(310847),c=e.i(776169),d=e.i(422825),u=e.i(143851),m=e.i(703123),h=e.i(404893),g=e.i(367810),f=e.i(792461);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:p=!0,isUserLoggedIn:x}){let w=(0,r.useTranslations)("GoogleLogin"),b=(0,a.useSetAtom)(h.googleLoginInitilizedAtom),{loginWithGoogle:v,error:j,clearError:y}=function(){let e=(0,r.useTranslations)("GoogleLogin"),[t,i]=(0,o.useState)(null),h=(0,a.useSetAtom)(s.userHasLoggedInBeforeAtom),g=(0,a.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:f}=(0,d.useEmailPreferences)(),{refresh:p}=(0,n.usePageNavigation)(),{syncPreferencesFromUpsx:x}=(0,c.usePreferences)(),{authSuccess:w,authRedirect:b}=(0,u.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 w({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:a,onYourRadar:r,marketing:n,alwaysSubscribe:s}=g||{};return(t||s)&&await f({newsletter:i,weekly:a,onYourRadar:r,marketing:n}).catch(e=>{console.error("Failed to update email subscriptions",e)}),b(),!0}catch(t){console.error("Failed to login with Google",t);try{let o=t?.data,a=o?.messageCode;if(!a)throw Error("No Error Message");switch(a){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}},[h,x,p,w,b,f,g]),error:t,clearError:(0,o.useCallback)(()=>{i(null)},[])}}(),N=(0,f.useRefMemo)(v),k=(0,o.useRef)(null);j&&(k.current=j);let C=k.current;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=>{N.current?.(e)}}),b(!0)),e?.(),!x&&p&&t?.prompt()},id:"google-gsi-script"}),C&&(0,t.jsx)(g.Dialog,{open:!!j,onOpenChange:e=>!e&&y(),children:(0,t.jsx)(g.BasicDialog,{showCloseButton:!1,title:C.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:C.body||""}}),primaryAction:{label:w("cancel"),onClick:y}})})]})}],874905)},499746,e=>{"use strict";var t=e.i(648198),o=e.i(539922),i=e.i(475566),a=e.i(405052),r=e.i(427309),n=e.i(147732),l=e.i(381477),s=e.i(240058),c=e.i(316078),d=e.i(180193),u=e.i(368847),m=e.i(889951),h=e.i(343277),g=e.i(674885),f=e.i(617874),p=e.i(25681),x=e.i(693796),w=e.i(526456),b=e.i(222127);let v=({identifier:e})=>{let o=(0,p.useParams)(),a=o?.locale||"en-US",r=(0,i.useAtomValue)(g.userUnitPreferenceAtom),n=(0,f.unitsSystemByName)(r)?.code,{fromLocationPoint:v}=(0,x.useLocationData)(),j=e.geocode?["/v3/location/point/geocode",e.geocode,a]:e.placeId?["/v3/location/point/placeId",e.placeId,a]:null,{data:y,isLoading:N}=(0,l.default)(j,()=>e.geocode?(0,h.getLocationPointByGeocode)(e.geocode,a):e.placeId?(0,h.getLocationPointByPlaceId)(e.placeId,a):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),k=y?v(y):void 0,{data:C,isLoading:I}=(0,l.default)(k&&["currentObservations",k.geocode,n,a],([e,t,o,i])=>(0,m.getCurrentObservations)({geocode:t,units:o,language:i}),{revalidateOnFocus:!1,dedupingInterval:6e4}),A=y?.location?.placeId??e.placeId,{path:L,isGeolocationLoading:S}=(0,b.default)(A||""),G=N||I||!k||S,_=C?.temperature,B=C?.wxPhraseLong,P=C?.iconCode??-1,T=e.name||k?.name||k?.city||k?.displayName,E=(0,t.jsxs)("div",{className:"default-hover-box-shadow box-border w-fit max-w-90 cursor-pointer rounded-2xl border border-[#0000001a] transition-[box-shadow,border] hover:border-transparent","aria-label":T?`${T} weather`:"Location weather",children:[(0,t.jsxs)("div",{className:"flex h-16 flex-col justify-center px-3 md:hidden",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)(u.default,{isLoading:G,skeletonClassName:"h-5 w-28",className:"flex items-center leading-[1.4] font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(w.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:T})]}),(0,t.jsx)(c.WxIcon,{isLoading:G,loadingIconClassName:"h-6 w-6 shrink-0",iconCode:P,className:"h-6 w-6 shrink-0","aria-hidden":"true",iconTheme:"lightBG"})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)(u.default,{isLoading:G,skeletonClassName:"h-4 w-6 shrink-0",className:"shrink-0 text-sm leading-normal",color:"secondary",children:(0,t.jsx)(d.Temperature,{value:_})})," ",(G||B)&&(0,t.jsx)(u.default,{isLoading:G,skeletonClassName:"h-4 w-22",color:"secondary",className:"truncate text-sm leading-normal",children:B})]})]}),(0,t.jsxs)("div",{className:"hidden h-20 items-center px-3 pl-4 md:flex",children:[(0,t.jsxs)("div",{className:"mr-2 flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsxs)(u.default,{isLoading:G,skeletonClassName:"h-5 w-28",className:"flex items-center text-xl leading-normal font-bold",children:[e?.isGeoIPLocation&&(0,t.jsx)(w.CurrentLocationFilled,{className:"mr-2 h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:T})]}),(G||B)&&(0,t.jsx)(u.default,{isLoading:G,skeletonClassName:"h-4 w-24",color:"secondary",className:"truncate text-sm leading-normal",children:B})]}),(0,t.jsx)(c.WxIcon,{isLoading:G,loadingIconClassName:"mr-1 h-12 w-12 shrink-0",iconCode:P,className:"mr-1 h-12 w-12 shrink-0","aria-hidden":"true",iconTheme:"lightBG"}),(0,t.jsx)(u.default,{isLoading:G,skeletonClassName:"h-8 w-12 shrink-0",className:"shrink-0 text-[40px] leading-none font-extrabold",children:(0,t.jsx)(d.Temperature,{value:_})})]})]});return L?(0,t.jsx)(s.default,{href:L,className:"no-underline md:block md:w-full",children:E}):E};var j=e.i(523084),y=e.i(47524),N=e.i(632137);let k={left:j.ChevronLeft,right:y.ChevronRight},C=({buttonClassName:e,containerClassName:i,onClick:a,tabIndex:r,direction:n,...l})=>{let[s,c]=(0,o.useState)(!1),d=k[n];return(0,t.jsx)("div",{className:(0,N.cn)("absolute",i),children:(0,t.jsx)("button",{className:(0,N.cn)("group/scroll-button absolute flex h-11 w-11 transform-[translate(-50%,-50%)] cursor-pointer items-center justify-center rounded-full bg-black opacity-80 transition-[opacity,height,width] duration-75 ease-linear hover:h-12 hover:w-12 hover:opacity-100",s&&"!h-11 !w-11"),onClick:()=>{c(!0),setTimeout(()=>c(!1),75),a?.()},tabIndex:r,...l,children:(0,t.jsx)(d,{className:(0,N.cn)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",s&&"!h-6 !w-6")})})})},I=({locationIdentifiers:e,showScrollButtons:i})=>{let[a,r]=(0,o.useState)(!1),[l,s]=(0,o.useState)(!1),c=(0,o.useRef)(null),d=(0,o.useRef)(null),u=(0,o.useRef)(!1),m=(0,o.useCallback)(()=>{let e=c.current;if(!e||!i){r(!1),s(!1);return}let{scrollLeft:t,offsetWidth:o,scrollWidth:a}=e,n=Math.abs(t),l=n>0,d=n+o(0,n.debounce)(m,150),[m]);(0,o.useEffect)(()=>{let e=c.current;return e&&(u.current="rtl"===getComputedStyle(e).direction),m(),window.addEventListener("resize",h),()=>{null!==d.current&&cancelAnimationFrame(d.current),h.cancel(),window.removeEventListener("resize",h)}},[m,h]);let g=(0,o.useCallback)(()=>{null===d.current&&(d.current=requestAnimationFrame(()=>{m(),d.current=null}))},[m]),f=(0,o.useCallback)(()=>{c.current?.scrollBy({left:-200,behavior:"smooth"})},[]),p=(0,o.useCallback)(()=>{c.current?.scrollBy({left:200,behavior:"smooth"})},[]);return 0===e.length?null:(0,t.jsxs)("div",{className:"relative -mt-2 -mb-4 overflow-hidden",children:[i&&(0,t.jsx)(C,{containerClassName:(0,N.cn)("absolute top-[50%] -left-14.5 transition-[left] md:-left-13.5",{"left-9.5 md:left-11":a}),onClick:f,tabIndex:a?0:-1,"aria-hidden":!a,"aria-label":"Scroll left",direction:"left"}),(0,t.jsx)("div",{className:"scrollbar-hide flex gap-2 overflow-x-auto p-4 py-6",role:"list","data-testid":"forecast-module",onScroll:g,ref:c,children:e.map((e,o)=>(0,t.jsx)("div",{role:"listitem",children:(0,t.jsx)(v,{identifier:e})},e.placeId??e.geocode??o))}),i&&(0,t.jsx)(C,{containerClassName:(0,N.cn)("absolute top-[50%] -right-14.5 transition-[right] md:-right-13.5",{"right-9.5 md:right-11":l}),onClick:p,tabIndex:l?0:-1,"aria-hidden":!l,"aria-label":"Scroll right",direction:"right"})]})};var A=e.i(663333),L=e.i(145651);let S=()=>{let e=(0,i.useAtomValue)(r.geoipGeocode),{favoriteLocations:n,recentLocations:l}=(0,L.default)(),s=(0,i.useAtomValue)(A.deviceClassAtom),c=(0,o.useMemo)(()=>{let t=[],o=new Set;if(e){let i=(0,a.formatGeocode)(e);t.push({geocode:i,isGeoIPLocation:!0}),o.add(i)}for(let e of n){if(t.length>=5)break;if(!e.coordinate)continue;let i=(0,a.formatGeocode)(e.coordinate);o.has(i)||(t.push({geocode:i,placeId:e.placeID??void 0,name:e.name??void 0}),o.add(i))}for(let e of l.filter(e=>!n.some(t=>t.placeID===e))){if(t.length>=5)break;t.push({placeId:e})}return t},[n,l,e]);return 0===c.length?null:(0,t.jsx)(I,{locationIdentifiers:c,showScrollButtons:"mobile"!==s&&"tablet"!==s})};e.s(["ForecastModule",0,S,"default",0,S],499746)},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)))}]);