(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,806262,e=>{"use strict";e.i(247865);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,i){var s;let a,n=(0,t.useStore)(i),o=(s=n,(a=r.get(s))||(a=new WeakSet,r.set(s,a)),a);for(let[t,...r]of e)(!o.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(o.add(t),n.set(t,...r))}])},949920,e=>{"use strict";var t=e.i(381477);let r=(0,e.i(66396).withMiddleware)(t.default,e=>(t,r,i)=>(i.revalidateOnFocus=!1,i.revalidateIfStale=!1,i.revalidateOnReconnect=!1,e(t,r,i)));e.s(["default",0,r])},990033,e=>{"use strict";let t,r="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i=new Uint8Array(16),s=[];for(let e=0;e= 16");if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,a){if((u=u||0)a.length)throw RangeError(`UUID byte range ${u}:${u+15} is out of buffer bounds`);for(let e=0;e{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},604323,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["metricsArticleDataAtom",0,t])},513539,e=>{"use strict";var t=e.i(981030);let r=(0,t.atom)(null),i=(0,t.atom)(null);e.s(["activeEventAtom",0,i,"layoutStateAtom",0,r])},236433,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["pageAtomsPathnameAtom",0,t])},122124,e=>{"use strict";var t=e.i(388706);let r=Object.fromEntries(t.PAGE_TYPE_CONFIG.map(e=>[e.suffix,e.urlType])),i=RegExp(`^(?/[a-z]{2}-[A-Z]{2})?/.+/(?:city|locality|neighborhood|postcode|poi|ski|airport)/[^/]+/(?${t.SUFFIX_ALTERNATION})(?:/day-[1-9][0-9]*)?$`);e.s(["getAnonymizedPath",0,function(e){var t,s;let a,n,o,u,c,l=(a=e,n=e?.indexOf?.("?"),o=e?.indexOf?.("#"),n>-1?a=a.substring(0,n):o>-1&&(a=a.substring(0,o)),a);if(t=l,u=i.exec(t)?.groups,s=l=(c=u?.suffix?r[u.suffix]:void 0)?`${u?.locale??""}/${c}/l`:t,"/index.html"===(l=s?.replace?.(/\/l\/[^/]+/gi,"/l"))||"/"===l||""===l)l="/";else{let e=l?.split("/")||[],t=e.length-1,r=e[t]??"";"news"!==(t>0?e[t-1]:"")&&(r.match(/[A-Z]/)||r.match(/[0-9]/)||r.match(/[@#$%&!*:]/)||""===r)&&e.pop(),l=e.join("/")}return l},"stripLastPartOfSlug",0,(e="")=>{let t=e.split("/");return t?.[t.length-1]===""&&t.pop(),t.slice(0,t.length-1).join("/")}])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},947118,221085,e=>{"use strict";let t;var r=e.i(247865);let i=new Set,s=0,a=()=>"function"==typeof window.mParticle?.init,n=()=>{void 0!==t&&(clearInterval(t),t=void 0)},o=()=>{if(!a()||(n(),0===i.size))return;let e=[...i];for(let t of(i.clear(),e))t()},u=()=>{void 0===t&&(s=0,t=setInterval(()=>{s+=100,o(),s>=3e4&&n()},100))},c=e=>(i.add(e),u(),()=>{i.delete(e)}),l=e=>a()?(e(),()=>{}):c(e),d=e=>a()?()=>{}:c(e),m=()=>!1;e.s(["subscribeSdkLoaded",0,l,"useIsSdkLoaded",0,()=>(0,r.useSyncExternalStore)(d,a,m),"watchForSdkLoad",0,e=>{if("u"{};if(a())return o(),()=>{};u();let t=Array.from(document.scripts).find(t=>t.getAttribute("src")===e);if(!t)return()=>{};let r=()=>o();return t.addEventListener("load",r),()=>{t.removeEventListener("load",r)}}],221085);let p=e=>"function"==typeof window.mParticle?.ready?(window.mParticle?.ready?.(e),()=>{}):l(()=>{window.mParticle?.ready?.(e),e()}),f=()=>!!window.mParticle?.isInitialized?.(),g=()=>!1;e.s(["useIsInitialized",0,()=>(0,r.useSyncExternalStore)(p,f,g)],947118)},491240,e=>{"use strict";let t=(0,e.i(695881).createLogger)("MParticleIdentity");e.s(["truncateIdentityValue",0,e=>"string"==typeof e&&e.length>256?(t.warn(`identity value exceeded 256 chars (${e.length}); truncating`),e.slice(0,256)):e])},678651,(e,t,r)=>{"use strict";function i(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))void 0!==i&&t.append(r,i);return t}Object.defineProperty(r,"__esModule",{value:!0}),r.queryStringToSearchParams=i,r.urlFrom=function({host:e,...t}){if(!e)throw Error("Host is missing");let r=new URL(`https://${e}`);return Object.assign(r,{...t,hostname:e}),t.query&&(r.search=i(t.query).toString()),r}},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},763886,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["partnerAtom",0,t])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},752496,e=>{"use strict";var t=e.i(247865),r=e.i(609858);let i=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:s,page:a,onUpdateData:n,onSetPageData:o}){let{updateComponentData:u,setPageData:c}=(0,r.useDebugSystem)(),l=(0,t.useRef)(!1),d=n||u,m=o||c;return(0,t.useEffect)(()=>{if(s)return i.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(s),hasPerformance:!!s.performance,hasContext:!!s.context}),d(e,{...s,_collectedAt:new Date().toISOString()}),()=>{i.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,s,d]),(0,t.useEffect)(()=>{a&&!l.current&&(i.lifecycle("Setting page metadata",{title:a.title,assetName:a.assetName,collection:a.collection}),m({...a,_updatedAt:new Date().toISOString()}),l.current=!0)},[a,m]),null}])},609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(247865);let i=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,i],674339),e.s(["useDebugSystem",0,function(){let[e,s]=(0,t.useAtom)(i),a=(0,r.useCallback)((e,t)=>{s(r=>{let i=r?.[e]||{},s="object"==typeof t&&null!==t&&"object"==typeof i?{...i,...t}:t;return{...r,[e]:s}})},[s]),n=(0,r.useCallback)((e,t)=>{s(r=>{let i=r||{timestamp:new Date().toISOString()},s=i.components||{};if(null===t){let t={...s};return delete t[e],{...i,components:t}}return{...i,components:{...s,[e]:t}}})},[s]),o=(0,r.useCallback)(e=>{a("page",e)},[a]),u=(0,r.useCallback)(e=>{a("route",e)},[a]),c=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&a(e,t)})},[a]);return{debugData:e,updateSection:a,updateComponentData:n,setPageData:o,clearAllDebugData:(0,r.useCallback)(()=>{s({timestamp:new Date().toISOString()})},[s]),updateRouteInfo:u,updatePageDebug:c}}],609858)},394481,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["privacyRegimeAtom",0,t])},725296,e=>{"use strict";var t,r=e.i(965586),i=((t={}).CA="ca",t.CA_QC="ca-qc",t.EXEMPT="exempt",t.GDPR="gdpr",t.JP="jp",t.KR="kr",t.LATAM_CO="latam-co",t.LATAM_DO="latam-do",t.LATAM_PE="latam-pe",t.LGPD="lgpd",t.PIPL="pipl",t.TR_KVKK="tr-kvkk",t.USA="usa",t.USA_CCPA="usa-ccpa",t.USA_CO="usa-co",t.USA_CT="usa-ct",t.USA_VA="usa-va",t);Object.values(i);let s={"usa-ut":"usa"},a=e=>e?s[e]??e:void 0;e.s(["RESTRICTIVE_REGIMES",0,["ca-qc","gdpr","latam-co","latam-do","latam-pe","lgpd","pipl","tr-kvkk"],"Regime",()=>i,"US_REGIMES",0,["usa","usa-ccpa","usa-co","usa-ct","usa-va"],"default",0,i,"getRegime",0,()=>(()=>{let e=(0,r.getCookie)("ci")?.toString();if(e)for(let t of e.split("&")){let e=t.indexOf("=");if(e>-1&&"TWC-Privacy"===t.slice(0,e))return a(t.slice(e+1))}})()??a((0,r.getCookie)("twc-privacy")?.toString())??"exempt"])},617874,e=>{"use strict";let t="Imperial",r="Metric",i="Hybrid",s={code:"e",name:t,temp:"F",speed:"mph",distance:"mi",accumulation:"in",precip:"in",pressure:"in"},a={code:"m",name:r,temp:"C",speed:"km/h",distance:"km",accumulation:"cm",precip:"mm",pressure:"mb"},n={code:"h",name:i,temp:"C",speed:"mph",distance:"mi",accumulation:"in",precip:"in",pressure:"mb"};e.s(["UNITS_COOKIE_KEY",0,"unitOfMeasurement","UNIT_HYBRID",0,i,"UNIT_IMPERIAL",0,t,"UNIT_METRIC",0,r,"imperial",0,s,"unitsSystemByCode",0,function(e){switch(e?.toLowerCase()){case"e":case"f":return s;case"m":case"c":return a;case"h":return n;default:return null}},"unitsSystemByName",0,function(e=""){switch(e.toLowerCase()){case"imperial":case"Imperial":return s;case"metric":case"Metric":return a;case"hybrid":case"Hybrid":return n;default:return null}}])},45846,e=>{"use strict";e.i(288906);let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},378869,e=>{"use strict";let t=(0,e.i(284007).atomWithStorage)("wxu-web/keyval:emailSubscriptions",null,void 0,{getOnInit:!0});e.s(["emailPreferencesAtom",0,t])},889753,301904,e=>{"use strict";var t=e.i(284007),r=e.i(617874),i=e.i(990033),s=e.i(981030),a=e.i(543512);let n={animationSpeed:1,autoplay:!0,opacity:90,roadOverlay:"default",style:"default"};e.s(["DEFAULT_MAP_SETTINGS",0,n],301904);let o=(0,s.atom)(a.UserSubscriptionTiers.none),u=(0,t.atomWithStorage)("userProfile",null,void 0,{getOnInit:!0}),c=(0,t.atomWithStorage)("userPreferences",{userID:(0,i.v4)(),unit:r.UNIT_IMPERIAL,locations:[],locale:"en_US",mapSettings:n,favoriteWeatherComponents:[],favoriteActivityComponents:[],dashboard:[]},void 0,{getOnInit:!0});e.s(["userPreferencesAtom",0,c,"userProfileAtom",0,u,"userTierAtom",0,o],889753)},905059,e=>{"use strict";let t=(0,e.i(284007).atomWithStorage)("wx-next/user:mapLayerOrder",null,void 0,{getOnInit:!0});e.s(["mapLayerOrderAtom",0,t])},739971,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["subscriptionsEnabledAtom",0,t])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),s=e.i(905059),a=e.i(901351),n=e.i(310847),o=e.i(528600),u=e.i(617874),c=e.i(540768),l=e.i(553329),d=e.i(247865),m=e.i(245943);let p=(0,e.i(695881).createLogger)("useMapSettings");e.s(["WEB_MAP_SETTINGS_PLATFORM",0,"twc","useMapSettings",0,function(e="twc"){let{user:{isUserLoggedIn:r}}=(0,o.useUser)(),i=(0,t.useSetAtom)(s.mapLayerOrderAtom),n=(0,d.useCallback)(async t=>{if(!r)return!1;let{error:i}=await (0,l.tryCatch)(a.upsxClient.preference.updateMapSettings(e,t));if(!i)return!0;if(i instanceof m.APIError&&404===i.code){let{error:r}=await (0,l.tryCatch)(a.upsxClient.preference.createMapSettings(e,t));return!r||(p.warn("Failed to create map settings",r),!1)}return p.warn("Failed to update map settings",i),!1},[r,e]),u=(0,d.useCallback)((e,t)=>{i(e?.layerOrder??t)},[i]),c=(0,d.useCallback)(async t=>{if(!r||0===t.length)return!1;i(t);let{data:s,error:n}=await (0,l.tryCatch)(a.upsxClient.preference.reorderMapSettingsLayers(e,{order:t}));if(!n)return u(s,t),!0;if(n instanceof m.APIError&&404===n.code){let{data:r,error:i}=await (0,l.tryCatch)(a.upsxClient.preference.createMapSettings(e,{layerOrder:t}));if(!i)return u(r,t),!0;if(i instanceof m.APIError&&409===i.code){let{data:r,error:i}=await (0,l.tryCatch)(a.upsxClient.preference.reorderMapSettingsLayers(e,{order:t}));return i?(p.warn("Failed to reorder map layers after create",i),!1):(u(r,t),!0)}return p.warn("Failed to create map settings layer order",i),!1}return p.warn("Failed to reorder map layers",n),!1},[r,e,u,i]),f=(0,d.useCallback)(async(t,s,n)=>{if(!r)return!1;i(n);let{data:o,error:d}=await (0,l.tryCatch)(a.upsxClient.preference.moveMapSettingsLayer(e,t,{placement:s}));return d?d instanceof m.APIError&&(404===d.code||400===d.code)?c(n):(p.warn("Failed to move map layer",d),!1):(u(o,n),!0)},[r,e,u,c,i]);return{saveMapSettings:n,saveLayerOrder:c,moveLayer:f}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,o.useUser)(),[d,m]=(0,t.useAtom)(r.userPreferencesAtom),[p,f]=(0,t.useAtom)(n.wxuUserPreferenceAtom),g=(0,t.useSetAtom)(s.mapLayerOrderAtom),y=async()=>{let{data:e,error:t}=await (0,l.tryCatch)(a.upsxClient.preference.getMapSettings("twc"));if(t)return{ok:!1,mapSettings:null,layerOrder:null};if(!e)return{ok:!0,mapSettings:null,layerOrder:null};let{animationSpeed:r,autoplay:i,opacity:s,roadOverlay:n,style:o}=e,u={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==s&&{opacity:s},...void 0!==n&&{roadOverlay:n},...void 0!==o&&{style:o}};return{ok:!0,mapSettings:Object.keys(u).length>0?u:null,layerOrder:e.layerOrder?.length?e.layerOrder:null}},S=async e=>{try{await a.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},A=async(t,r=!0)=>{try{let i,s=(i={...d,...t},m(i),f({...p,...t,locations:i.locations}),i);if(t?.unit){let e=(0,u.unitsSystemByName)(t.unit),r=e?.code||"e";(0,c.setCookie)(u.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await S(s),{success:!0}}catch(e){return console.error("Failed to update preferences:",e),{success:!1,error:e instanceof Error?e.message:"Failed to update preferences"}}};return{syncPreferencesFromUpsx:async()=>{try{let[e,t]=await Promise.all([a.upsxClient.preference.getPreference(),y()]);if(!e?.userID)return null;let{mapSettings:r,layerOrder:s,ok:n}=t;n&&g(s);let{mapSettings:o,...u}=e,c={...u,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...r}};return A(c,!1),c}catch{return null}},updatePreferences:A}}],776169)},528600,e=>{"use strict";let t;var r=e.i(247865),i=e.i(546446),s=e.i(949920),a=e.i(889753),n=e.i(901351),o=e.i(310847),u=e.i(543512),c=e.i(990033),l=e.i(333350),d=e.i(495110),m=e.i(513513),p=e.i(960576);e.s(["useUser",0,function(){let[e,f]=(0,i.useAtom)(a.userProfileAtom),[g,y]=(0,i.useAtom)(o.wxuUserAnonymousIdAtom),[S,A]=(0,i.useAtom)(o.wxuUserAccountUserAccountResponseAtom),[h,w]=(0,r.useState)(!1),b=(0,i.useSetAtom)(o.wxuLoginRedirectPageAtom),I=(0,d.useIsHydratingRender)();l.default&&!h&&(b(window.location.href),w(!0));let v=(0,i.useAtomValue)(a.userTierAtom),C=(0,m.isUserLoggedIn)(v),P=g;!P&&l.default&&(t||(t=(0,p.readEarlyAnonId)()??(0,c.v4)()),P=t),l.default&&!g&&P&&y(P),!e&&S&&f(S);let U=(0,s.default)(C?"upsx/id":null,()=>n.upsxClient.account.getAccountId(),{shouldRetryOnError:e=>"APIError"!==e.name}),{userID:E=""}=U?.data||{},T=E&&e?.userID!==E,O=(0,s.default)(T?"upsx/account":null,()=>n.upsxClient.account.getAccount(),{shouldRetryOnError:e=>"APIError"!==e.name,onSuccess:e=>{f(e),A(e)}});return{user:{anonId:P,userID:E,isUserLoggedIn:C,subscriptionTier:v,isUserPremium:(0,m.isUserTierPremium)(v),isUserAdFree:v===u.UserSubscriptionTiers.adFree},userProfile:I?null:e,isUserIdLoading:U.isLoading,profileError:O.error}}])},543512,e=>{"use strict";var t,r=((t={})[t.none=-1]="none",t[t.standard=0]="standard",t[t.premium=1]="premium",t[t.adFree=2]="adFree",t[t.premiumWithAd=3]="premiumWithAd",t);let i=Object.entries(r).reduce((e,[t,r])=>(e[r]=t,e),{});Object.entries(r).reduce((e,[t,r])=>(e[r.toString()]=r,e),{}),e.s(["UserSubscriptionPremiumTiers",0,[1,2,3],"UserSubscriptionTierKeysMap",0,i,"UserSubscriptionTiers",()=>r,"UserSubscriptionTiersMap",0,{standard:0,tier0:1,tier1:1,"ad-free-v2":2,tier3:3}])},960576,e=>{"use strict";let t="wxu-exp-anon-id";e.s(["clearEarlyAnonId",0,function(){try{window.localStorage.removeItem(t)}catch{}},"readEarlyAnonId",0,function(){let e=window.__wxExperimentDeviceId;if("string"==typeof e&&e)return e;try{return window.localStorage.getItem(t)||void 0}catch{return}}])},513513,e=>{"use strict";var t=e.i(543512);t.UserSubscriptionTiers.none,t.UserSubscriptionTiers.standard,t.UserSubscriptionTiers.adFree,t.UserSubscriptionTiers.premium,t.UserSubscriptionTiers.premiumWithAd,e.s(["hasRadarFeature",0,function(e){return void 0!==e&&t.UserSubscriptionPremiumTiers.includes(e)},"isUserLoggedIn",0,function(e){return void 0!==e&&e>t.UserSubscriptionTiers.none},"isUserTierPremium",0,function(e){return t.UserSubscriptionPremiumTiers.includes(e)}],513513)},892504,e=>{"use strict";let t="upsx-purchase-checked-at";e.s(["clearPurchaseChecked",0,()=>{try{localStorage.removeItem(t)}catch{}},"markPurchaseChecked",0,()=>{try{localStorage.setItem(t,String(Date.now()))}catch{}},"purchaseCheckedRecently",0,()=>{try{let e=localStorage.getItem(t);if(!e)return!1;let r=Number(e);if(!Number.isFinite(r))return!1;return Date.now()-r{"use strict";e.i(288906);let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},991511,e=>{"use strict";var t=e.i(247865),r=e.i(806262),i=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let s=(0,i.useStore)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)s.get(e)!==t&&s.set(e,t)})}])},553329,e=>{"use strict";async function t(e){try{return{data:await e,error:null}}catch(e){return{data:null,error:e}}}e.s(["tryCatch",0,t])}]);