(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871546,e=>{"use strict";var t=e.i(862494),i=e.i(778235);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,c]=(0,i.useState)(""),[u,d]=(0,i.useState)(!1),[m,f]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),p=(0,i.useRef)([]);(0,i.useEffect)(()=>{e.id!==p.current[0]&&(p.current=[e.id],e.transactIDs&&p.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let b=(0,i.useCallback)(()=>{try{a("/?adm_get_token=1").then(e=>{e.ok&&o()}).catch(()=>{c(r)})}catch{c(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?(c(n),d(!0)):g(!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)||m||(c(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 g(!0);let r=!1;for(let e of t)i.includes(e)&&(r=!0);r?g(!0):(c(n),d(!0))}else c(n),d(!0)}})}}))},[]),(0,i.useEffect)(()=>{h&&(g(!1),b())},[h,b]),(0,i.useEffect)(()=>{m||!u||(f(!0),w.admiral("targeting","force",{candidateIDs:p.current}))},[m,u,p,w]),(0,t.jsxs)("div",{children:[l||null," "]})}])},899507,e=>{"use strict";e.s(["isNil",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["isPrimitive",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["isTypedArray",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["isUnsafeProperty",0,function(e){return"__proto__"===e}],355200)},370220,(e,t,i)=>{"use strict";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"},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}}]})}},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)}},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}]},422825,e=>{"use strict";var t=e.i(546446),i=e.i(381477),r=e.i(899507),n=e.i(449928),a=e.i(760430);function o(e){if((0,n.isPrimitive)(e))return e;if(Array.isArray(e)||(0,a.isTypedArray)(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 c(e,t,i){let r=Object.keys(t);for(let n=0;n"boolean"==typeof e?{isSubscribed:e}:e;e.s(["useEmailPreferences",0,(e=!1)=>{let[n,a]=(0,t.useAtom)(h),{user:s}=(0,g.useUser)(),m=(0,y.useSubscriptionsEnabled)()||e,f=s?.userID||null,w=s?.isUserLoggedIn||!1,v=(0,b.useCallback)(e=>{if(f){var t;let i,r;a({userId:f,expiry:Date.now()+9e5,subscriptions:(t=n?.subscriptions,i=t?.length?t:p.DEFAULT_SUBSCRIPTIONS,r={},e?(i?.forEach(e=>{r[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=r[e.subscriptionGroupName]||{};r[e.subscriptionGroupName]=c(o(t),e,function e(t,i){if(Array.isArray(i))if(Array.isArray(t))return c(o(t),i,e);else return c([],i,e);if(l(i))if(l(t))return c(o(t),i,e);else return c({},i,e)})}),Object.values(r)):i)})}},[f,a,n?.subscriptions]),A=n&&n.userId===f&&n.expiry&&n.expiry>Date.now(),P=m&&f&&w&&!A,{isLoading:E}=(0,i.default)(P?`getEmailPreferencesStatus/${f}`:void 0,()=>x(()=>(0,d.getEmailPreferencesStatus)()),{revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{f&&e&&v(e.subscriptions)}}),S=(0,b.useCallback)(async(e,t)=>{if(!m)return{status:"error",error:"Subscription is not enabled!"};let i=w?void 0:t,r=await x(()=>(0,u.setEmailPreferences)({subscriptions:e,email:i}));return"success"===r.status&&v(e),r},[v,m,w,n?.subscriptions]),N=(0,b.useCallback)(async({newsletter:e,weekly:t,onYourRadar:i,marketing:n})=>{let a=[!(0,r.isNil)(e)&&{subscriptionGroupName:"daily-newsletters-1",...I(e)},!(0,r.isNil)(t)&&{subscriptionGroupName:"weekly-brief",...I(t)},!(0,r.isNil)(i)&&{subscriptionGroupName:"on-your-radar",...I(i)},!(0,r.isNil)(n)&&{subscriptionGroupName:"marketing-emails-1",...I(n)}].filter(Boolean);return await S(a)},[S]);return{emailSubscriptions:f&&n?n.subscriptions:null,updateEmailSubscriptions:N,updateEmailPreference:S,isLoadingPreferences:E}}],422825)},143851,e=>{"use strict";var t=e.i(546446),i=e.i(250261),r=e.i(45846),n=e.i(310847),a=e.i(776169),o=e.i(671525),s=e.i(778235),l=e.i(947118),c=e.i(491240),u=e.i(737801),d=e.i(521350),m=e.i(391174),f=e.i(358273);e.s(["useUserLogin",0,function(){let e,h,g,p,b,w=(0,t.useSetAtom)(n.userHasLoggedInBeforeAtom),y=(0,t.useAtomValue)(n.wxuLoginRedirectPageAtom),v=(0,t.useAtomValue)(n.wxuUserAnonymousIdAtom),x=(0,i.useGetCookie)(),{syncPreferencesFromUpsx:I,updatePreferences:A}=(0,a.usePreferences)(),{navigate:P}=(0,o.default)(),{login:E}=(e=(0,l.useIsInitialized)(),h=(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let i={userIdentities:{customerid:t.customerid,email:t.email,other:(0,c.truncateIdentityValue)(t.other)}};return window.mParticle?.Identity?.identify?.(i)},[e]),{identify:h,login:(0,s.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let i={userIdentities:{customerid:t.customerid,email:t.email,facebook:t.facebook,facebookcustomaudienceid:t.facebookcustomaudienceid,google:t.google,microsoft:t.microsoft,other:(0,c.truncateIdentityValue)(t.other),other2:(0,c.truncateIdentityValue)(t.other2),other3:(0,c.truncateIdentityValue)(t.other3),other4:(0,c.truncateIdentityValue)(t.other4),twitter:t.twitter,yahoo:t.yahoo}};return window.mParticle?.Identity?.login?.(i)},[e]),logout:(0,s.useCallback)(()=>e?window.mParticle?.Identity?.logout?.({userIdentities:{}}):(console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"))),[e])}),S=(g=(0,l.useIsInitialized)(),p=(0,u.useEventAttributes)(),b=(0,s.useCallback)((e,t={})=>{let i={...p,...t};if(!g)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(e,window.mParticle.EventType.Other,i),console.debug(`MParticle: Event "${e}" tracked`,i)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}return b},[p,g])),N=async()=>{try{if(x("premium"))return null;return await r.upsxClient.purchase.getPurchaseToken(),!0}catch(e){return console.error("Failed to get UPSX token:",e),!1}},k=()=>{(0,f.regenerateMetricsSession)();let e=new URLSearchParams(window.location.search).get("ref");P((e&&`https://${e}`)??y)},j=async(e,t=!0)=>{(0,m.invalidateUpsxCache)(),(0,d.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),w(!0),await I()||await A({}),N(),e?.userID&&(E({email:e.email,customerid:e.userID,other:v}),S("login"===e.type?"user-loggedin":"signup-complete",{url:window.location.pathname})),t&&k()};return{login:async(e,t)=>{try{let i=await r.upsxClient.auth.login({email:e,password:t});return i&&await j({email:i.email,userID:i.userID,type:"login"}),!0}catch(e){return console.error("Failed to login",e),!1}},authSuccess:j,authRedirect:k}}],143851)},590238,e=>{"use strict";var t=e.i(537989),i=e.i(827049),r=e.i(695203),n=e.i(604323),a=e.i(797770),o=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,o.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[i.pageLocaleAtom,e.pageLocale],[r.deviceClassAtom,e.deviceClass],[n.metricsArticleDataAtom,e.metricsArticleData],[a.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},855602,e=>{"use strict";var t=e.i(862494),i=e.i(778235),r=e.i(1567),n=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:a,moduleKey:o,variant:s="frontend",children:l})=>{let c=(0,i.useRef)(null),[u,d]=(0,i.useState)(!1),m=(0,i.useRef)(null),f=(0,r.useTrackModuleViewed)();return"admin"===s?(0,t.jsx)(t.Fragment,{children:l}):((0,i.useEffect)(()=>{if(u||!n.default||!c.current)return;let t=c.current,i=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?m.current||(m.current=setTimeout(()=>{f({moduleId:e,modulePosition:a}),d(!0),m.current=null},2e3)):m.current&&(clearTimeout(m.current),m.current=null)})},{threshold:1});i.observe(t);let r=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return r.top>=0&&r.left>=0&&r.bottom{f({moduleId:e,modulePosition:a}),d(!0),m.current=null},2e3)),()=>{m.current&&clearTimeout(m.current),i.disconnect()}},[u,e,a,f]),(0,t.jsx)("div",{ref:c,className:"hide-empty","data-module-id":e,"data-module-key":o,"data-item-position":a,children:l}))}])},670279,e=>{"use strict";var t=e.i(862494),i=e.i(778235),r=e.i(708050),n=e.i(204782);let a=({pageTemplate:e,pageDashboard:a})=>{let o=(0,n.default)();return((0,i.useEffect)(()=>{o&&e&&(window._newsroom=window._newsroom||[],window._newsroom.push({pageTemplate:e}),a&&window._newsroom.push({pageDashboard:a}),window._newsroom.push("auditClicks"),window._newsroom.push("trackPage"))},[o,e,a]),o&&e)?(0,t.jsx)(r.default,{src:"//c2.taboola.com/nr/theweatherchannel/newsroom.js",strategy:"afterInteractive",id:"newsroom_loader_script"}):null};e.s(["Newsroom",0,a,"default",0,a])},703123,e=>{"use strict";let t=(0,e.i(981030).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(23084);var t=e.i(862494),i=e.i(778235),r=e.i(708050),n=e.i(546446),a=e.i(769441),o=e.i(671525),s=e.i(901351),l=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),m=e.i(703123),f=e.i(404893),h=e.i(367810),g=e.i(792461);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:p=!0,isUserLoggedIn:b}){let w=(0,a.useTranslations)("GoogleLogin"),y=(0,n.useSetAtom)(f.googleLoginInitilizedAtom),{loginWithGoogle:v,error:x,clearError:I}=function(){let e=(0,a.useTranslations)("GoogleLogin"),[t,r]=(0,i.useState)(null),f=(0,n.useSetAtom)(l.userHasLoggedInBeforeAtom),h=(0,n.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:g}=(0,u.useEmailPreferences)(),{refresh:p}=(0,o.usePageNavigation)(),{syncPreferencesFromUpsx:b}=(0,c.usePreferences)(),{authSuccess:w,authRedirect:y}=(0,d.useUserLogin)();return{loginWithGoogle:(0,i.useCallback)(async t=>{let{credential:i}=t;r(null);try{let e=await s.upsxClient.auth.loginWithGoogle({google_id_token:i}),t=e?.isFirstLogin;await w({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:r,weekly:n,onYourRadar:a,marketing:o,alwaysSubscribe:l}=h||{};return(t||l)&&await g({newsletter:r,weekly:n,onYourRadar:a,marketing:o}).catch(e=>{console.error("Failed to update email subscriptions",e)}),y(),!0}catch(t){console.error("Failed to login with Google",t);try{let i=t?.data,n=i?.messageCode;if(!n)throw Error("No Error Message");switch(n){case 1e3:case 1026:case 1033:r({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:r({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){r({header:e("somethingWentWrong")})}return!1}},[f,b,p,w,y,g,h]),error:t,clearError:(0,i.useCallback)(()=>{r(null)},[])}}(),A=(0,g.useRefMemo)(v),P=(0,i.useRef)(null);x&&(P.current=x);let E=P.current;return(0,t.jsxs)(t.Fragment,{children:[(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=>{A.current?.(e)}}),y(!0)),e?.(),!b&&p&&t?.prompt()},id:"google-gsi-script"}),E&&(0,t.jsx)(h.Dialog,{open:!!x,onOpenChange:e=>!e&&I(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:E.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:E.body||""}}),primaryAction:{label:w("cancel"),onClick:I}})})]})}],874905)},499746,e=>{"use strict";var t=e.i(862494),i=e.i(778235),r=e.i(546446),n=e.i(405052),a=e.i(427309),o=e.i(147732),s=e.i(381477),l=e.i(240058),c=e.i(316078),u=e.i(180193),d=e.i(368847),m=e.i(889951),f=e.i(343277),h=e.i(674885),g=e.i(617874),p=e.i(561762),b=e.i(693796),w=e.i(526456),y=e.i(222127);let v=({identifier:e})=>{let i=(0,p.useParams)(),n=i?.locale||"en-US",a=(0,r.useAtomValue)(h.userUnitPreferenceAtom),o=(0,g.unitsSystemByName)(a)?.code,{fromLocationPoint:v}=(0,b.useLocationData)(),x=e.geocode?["/v3/location/point/geocode",e.geocode,n]:e.placeId?["/v3/location/point/placeId",e.placeId,n]:null,{data:I,isLoading:A}=(0,s.default)(x,()=>e.geocode?(0,f.getLocationPointByGeocode)(e.geocode,n):e.placeId?(0,f.getLocationPointByPlaceId)(e.placeId,n):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),P=I?v(I):void 0,{data:E,isLoading:S}=(0,s.default)(P&&["currentObservations",P.geocode,o,n],([e,t,i,r])=>(0,m.getCurrentObservations)({geocode:t,units:i,language:r}),{revalidateOnFocus:!1,dedupingInterval:6e4}),N=I?.location?.placeId??e.placeId,{path:k,isGeolocationLoading:j}=(0,y.default)(N||""),C=A||S||!P||j,_=E?.temperature,R=E?.wxPhraseLong,L=E?.iconCode??-1,G=e.name||P?.name||P?.city||P?.displayName,O=(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":G?`${G} 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)(d.default,{isLoading:C,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:G})]}),(0,t.jsx)(c.WxIcon,{isLoading:C,loadingIconClassName:"h-6 w-6 shrink-0",iconCode:L,className:"h-6 w-6 shrink-0","aria-hidden":"true",iconTheme:"lightBG"})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)(d.default,{isLoading:C,skeletonClassName:"h-4 w-6 shrink-0",className:"shrink-0 text-sm leading-normal",color:"secondary",children:(0,t.jsx)(u.Temperature,{value:_})})," ",(C||R)&&(0,t.jsx)(d.default,{isLoading:C,skeletonClassName:"h-4 w-22",color:"secondary",className:"truncate text-sm leading-normal",children:R})]})]}),(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)(d.default,{isLoading:C,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:G})]}),(C||R)&&(0,t.jsx)(d.default,{isLoading:C,skeletonClassName:"h-4 w-24",color:"secondary",className:"truncate text-sm leading-normal",children:R})]}),(0,t.jsx)(c.WxIcon,{isLoading:C,loadingIconClassName:"mr-1 h-12 w-12 shrink-0",iconCode:L,className:"mr-1 h-12 w-12 shrink-0","aria-hidden":"true",iconTheme:"lightBG"}),(0,t.jsx)(d.default,{isLoading:C,skeletonClassName:"h-8 w-12 shrink-0",className:"shrink-0 text-[40px] leading-none font-extrabold",children:(0,t.jsx)(u.Temperature,{value:_})})]})]});return k?(0,t.jsx)(l.default,{href:k,className:"no-underline md:block md:w-full",children:O}):O};var x=e.i(523084),I=e.i(47524),A=e.i(632137);let P={left:x.ChevronLeft,right:I.ChevronRight},E=({buttonClassName:e,containerClassName:r,onClick:n,tabIndex:a,direction:o,...s})=>{let[l,c]=(0,i.useState)(!1),u=P[o];return(0,t.jsx)("div",{className:(0,A.cn)("absolute",r),children:(0,t.jsx)("button",{className:(0,A.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",l&&"!h-11 !w-11"),onClick:()=>{c(!0),setTimeout(()=>c(!1),75),n?.()},tabIndex:a,...s,children:(0,t.jsx)(u,{className:(0,A.cn)("text-white transition-[height,width] duration-75 group-hover/scroll-button:h-7 group-hover/scroll-button:w-7",l&&"!h-6 !w-6")})})})},S=({locationIdentifiers:e,showScrollButtons:r})=>{let[n,a]=(0,i.useState)(!1),[s,l]=(0,i.useState)(!1),c=(0,i.useRef)(null),u=(0,i.useRef)(null),d=(0,i.useRef)(!1),m=(0,i.useCallback)(()=>{let e=c.current;if(!e||!r){a(!1),l(!1);return}let{scrollLeft:t,offsetWidth:i,scrollWidth:n}=e,o=Math.abs(t),s=o>0,u=o+i(0,o.debounce)(m,150),[m]);(0,i.useEffect)(()=>{let e=c.current;return e&&(d.current="rtl"===getComputedStyle(e).direction),m(),window.addEventListener("resize",f),()=>{null!==u.current&&cancelAnimationFrame(u.current),f.cancel(),window.removeEventListener("resize",f)}},[m,f]);let h=(0,i.useCallback)(()=>{null===u.current&&(u.current=requestAnimationFrame(()=>{m(),u.current=null}))},[m]),g=(0,i.useCallback)(()=>{c.current?.scrollBy({left:-200,behavior:"smooth"})},[]),p=(0,i.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:[r&&(0,t.jsx)(E,{containerClassName:(0,A.cn)("absolute top-[50%] -left-14.5 transition-[left] md:-left-13.5",{"left-9.5 md:left-11":n}),onClick:g,tabIndex:n?0:-1,"aria-hidden":!n,"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:h,ref:c,children:e.map((e,i)=>(0,t.jsx)("div",{role:"listitem",children:(0,t.jsx)(v,{identifier:e})},e.placeId??e.geocode??i))}),r&&(0,t.jsx)(E,{containerClassName:(0,A.cn)("absolute top-[50%] -right-14.5 transition-[right] md:-right-13.5",{"right-9.5 md:right-11":s}),onClick:p,tabIndex:s?0:-1,"aria-hidden":!s,"aria-label":"Scroll right",direction:"right"})]})};var N=e.i(663333),k=e.i(145651);let j=()=>{let e=(0,r.useAtomValue)(a.geoipGeocode),{favoriteLocations:o,recentLocations:s}=(0,k.default)(),l=(0,r.useAtomValue)(N.deviceClassAtom),c=(0,i.useMemo)(()=>{let t=[],i=new Set;if(e){let r=(0,n.formatGeocode)(e);t.push({geocode:r,isGeoIPLocation:!0}),i.add(r)}for(let e of o){if(t.length>=5)break;if(!e.coordinate)continue;let r=(0,n.formatGeocode)(e.coordinate);i.has(r)||(t.push({geocode:r,placeId:e.placeID??void 0,name:e.name??void 0}),i.add(r))}for(let e of s.filter(e=>!o.some(t=>t.placeID===e))){if(t.length>=5)break;t.push({placeId:e})}return t},[o,s,e]);return 0===c.length?null:(0,t.jsx)(S,{locationIdentifiers:c,showScrollButtons:"mobile"!==l&&"tablet"!==l})};e.s(["ForecastModule",0,j,"default",0,j],499746)},711899,e=>{e.v(t=>Promise.all(["static/chunks/0y79.o95itu9g.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)))}]);