(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),n=e.i(901351),a=e.i(310847),o=e.i(528600),s=e.i(617874),l=e.i(858040),c=e.i(553329),u=e.i(592121),d=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:t}}=(0,o.useUser)();return{saveMapSettings:(0,u.useCallback)(async r=>{if(!t)return!1;let{error:i}=await (0,c.tryCatch)(n.upsxClient.preference.updateMapSettings(e,r));if(!i)return!0;if(i instanceof d.APIError&&404===i.code){let{error:t}=await (0,c.tryCatch)(n.upsxClient.preference.createMapSettings(e,r));return!t||(p.warn("Failed to create map settings",t),!1)}return p.warn("Failed to update map settings",i),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,o.useUser)(),[u,d]=(0,t.useAtom)(r.userPreferencesAtom),[p,m]=(0,t.useAtom)(a.wxuUserPreferenceAtom),f=async()=>{let{data:e,error:t}=await (0,c.tryCatch)(n.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:i,opacity:a,roadOverlay:o,style:s}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==a&&{opacity:a},...void 0!==o&&{roadOverlay:o},...void 0!==s&&{style:s}};return Object.keys(l).length>0?l:null},g=async e=>{try{await n.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},h=async(t,r=!0)=>{try{let i,n=(i={...u,...t},d(i),m({...p,...t,locations:i.locations}),i);if(t?.unit){let e=(0,s.unitsSystemByName)(t.unit),r=e?.code||"e";(0,l.setCookie)(s.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await g(n),{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([n.upsxClient.preference.getPreference(),f()]);if(!e?.userID)return null;let{mapSettings:r,...a}=e,o={...a,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...t}};return h(o,!1),o}catch{return null}},updatePreferences:h}}],776169)},491045,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),i=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,i])},185312,(e,t,r)=>{t.exports=e.r(16129)},318849,e=>{"use strict";let t=!1,r="upsx-recent-purchase-at";e.s(["SWR_CACHE_LEGACY_STORAGE_KEY",0,"app-cache","SWR_CACHE_STORAGE_KEY",0,"wxu-swr-cache-v1","disableSwrPersist",0,()=>{t=!0},"hasRecentPurchase",0,e=>{try{let t=localStorage.getItem(r);if(!t)return!1;let i=Number(t);if(!Number.isFinite(i))return!1;return Date.now()-it,"markRecentPurchase",0,()=>{try{localStorage.setItem(r,String(Date.now()))}catch{}}])},45846,e=>{"use strict";let t=new(e.i(245943)).UPSXClient({baseUrl:"https://upsx.weather.com"});e.s(["upsxClient",0,t])},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])},806262,e=>{"use strict";e.i(592121);var t=e.i(546446);e.i(284007),e.i(981030);let r=new WeakMap;e.s(["useHydrateAtoms",0,function(e,i){var n;let a,o=(0,t.useStore)(i),s=(n=o,(a=r.get(n))||(a=new WeakSet,r.set(n,a)),a);for(let[t,...r]of e)(!s.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(s.add(t),o.set(t,...r))}])},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])},991511,e=>{"use strict";var t=e.i(592121),r=e.i(806262),i=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let n=(0,i.useStore)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)n.get(e)!==t&&n.set(e,t)})}])},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},688070,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["isWebViewOnlyAtom",0,t])},328343,562209,e=>{"use strict";var t=e.i(592121),r=e.i(546446),i=e.i(737801),n=e.i(688070);e.s(["useEnrolledInExperimentEvent",0,()=>{let e=(0,i.useEventAttributes)(),a=(0,r.useAtomValue)(n.isWebViewOnlyAtom);return(0,t.useCallback)((t,r={})=>{if(a)return void console.debug("Skipping enrolled-in-experiment in webview mode");if(!window.mParticle?.isInitialized?.())return void console.warn("MParticle is not initialized");if(!t)return void console.warn("No exposure data provided to trackEnrolledInExperiment");if(!t.experiment_key)return void console.debug(`[Experiment] Skipping exposure tracking for ${t.flag_key} - no experiment_key (feature flag only)`);try{let i={...e,newVariant:t.variant||"",newExperiment:t.flag_key,newExperimentKey:t.experiment_key,newExperimentReceivedAt:Date.now()};window.mParticle?.logEvent?.("enrolled-in-experiment",window.mParticle?.EventType?.Other,i,r),console.debug(`MParticle: Event tracked - enrolled-in-experiment for ${t.flag_key||"unknown"}:${t.variant}`)}catch(e){console.error("MParticle: Failed to track event",e)}},[e,a])}],328343);var a=e.i(546584),o=e.i(553329);let s="production"!==a.default.env.VERCEL_TARGET_ENV,l=new Set;e.s(["resetTrackedExposures",0,function(){l.clear()},"trackAmplitudeExposure",0,function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){s&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){s&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let i=`${e.flag_key}::${e.variant??""}`;if(l.has(i)){s&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${i}`);return}l.add(i);let n={api_key:"bb1117981ed2a95dc4fa64b75661d681",events:[{event_type:"$exposure",user_id:t,device_id:r,ip:"$remote",event_properties:{flag_key:e.flag_key,variant:e.variant,experiment_key:e.experiment_key,platform:"web",app_name:"wx-next-web",environment:s?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,o.tryCatch)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0}));return r?console.error("[Experiment] Failed to send exposure to Amplitude HTTP API:",r):t&&!t.ok?console.error(`[Experiment] Amplitude HTTP API returned ${t.status}`):s&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}],562209)},283366,e=>{"use strict";e.s(["getExposureVariantOverride",()=>g,"resetExposures",()=>h,"useExposure",()=>y]);var t=e.i(592121),r=e.i(695881),i=e.i(333350),n=e.i(358273),a=e.i(742436);let o=(0,r.createLogger)("useExposure"),s="wxu-exp-exposed:",l=new Set,c=()=>{try{return(0,n.getMetricsSession)()?.sessionId||null}catch{return null}},u=e=>{try{let t=localStorage.getItem(s+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},d=(e,t)=>{try{for(let t=localStorage.length-1;t>=0;t--){let r=localStorage.key(t);r?.startsWith(s)&&r!==s+e&&localStorage.removeItem(r)}localStorage.setItem(s+e,JSON.stringify([...t]))}catch{}},p=e=>{if(0===l.size)return;let t=u(e);for(let e of l)t.add(e);d(e,t),l.clear()},m=e=>{let t=c();return t?(p(t),u(t).has(e)):l.has(e)},f=new Map;function g(e){return f.get(e)}function h(){l.clear(),f.clear();let e=c();if(e)try{localStorage.removeItem(s+e)}catch{}}function y(e,r){let n=void 0!==r,s=r?.variant,g=(0,t.useContext)(a.ExperimentContext);(0,t.useEffect)(()=>{if(!i.default||!g||m(e)||n&&void 0===s)return;let{client:t}=g;if(!t)return;let r=()=>{if(!m(e)){(e=>{let t=c();if(!t)return l.add(e);p(t);let r=u(t);r.add(e),d(t,r)})(e),void 0!==s&&f.set(e,s);try{t.exposure(e)}catch(e){o.error("Failed to track exposure:",e)}}};window.mParticle?.isInitialized?.()?r():window.mParticle?.ready?.(r)},[g,e,n,s])}},742436,e=>{"use strict";e.s(["ExperimentContext",()=>f,"ExperimentProvider",()=>g,"default",()=>y,"useExperimentContext",()=>h],742436);var t=e.i(546584),r=e.i(699173),i=e.i(592121),n=e.i(185312),a=e.i(333350),o=e.i(546446),s=e.i(328343),l=e.i(158662),c=e.i(528600),u=e.i(562209),d=e.i(283366);let p="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",m="production"!==t.default.env.VERCEL_TARGET_ENV,f=(0,i.createContext)(null),g=({children:e,scriptSrc:t})=>{let g=(0,s.useEnrolledInExperimentEvent)(),h=(0,o.useSetAtom)(l.experimentJoinListAtom),{user:y}=(0,c.useUser)(),[x,v]=(0,i.useState)(!1),[w,S]=(0,i.useState)(!1),[,E]=(0,i.useState)(0),A=(0,i.useRef)(void 0),k=(0,i.useRef)(void 0);A.current=y.userID||void 0,k.current=y.anonId||void 0;let C=(0,i.useRef)(new Set),b=(0,i.useRef)({}),_=function(e,t){let r=(0,i.useRef)(null),[n,o]=(0,i.useState)(!1),s=(0,i.useRef)(e);return s.current=e,(0,i.useEffect)(()=>{if(!n&&a.default&&p&&t){if(!window.Experiment)return void console.error("Amplitude Experiment SDK not loaded. Script may still be loading.");try{r.current=window.Experiment.initialize(p,{debug:m,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:e=>{try{s.current(e),m&&console.debug("[Experiment] Exposure tracked:",e)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}}},source:"localStorage"}),o(!0),m&&console.debug("[Experiment] SDK initialized (will fetch from API)")}catch(e){console.error("Failed to initialize Amplitude Experiment SDK:",e)}}},[n,t]),r.current}((0,i.useCallback)(e=>{let t=(0,d.getExposureVariantOverride)(e.flag_key),r=void 0!==t?{...e,variant:t}:e,i=`${r.flag_key}::${r.variant??""}`;if(C.current.has(i))return;C.current.add(i);let[n]=JSON.parse(JSON.stringify(Object.entries({[r.flag_key]:{key:r.variant}}).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",i=Math.floor(Date.now()/1e3);return`${e},${r},${i}`})));n&&(b.current={...b.current,[r.flag_key]:n},h(JSON.stringify(Object.values(b.current)))),g(r),(0,u.trackAmplitudeExposure)({exposure:r,userId:A.current,deviceId:k.current})},[g,h]),x);return(0,i.useEffect)(()=>{(async()=>{if(!_)return;let e=y.anonId;if(!e&&!y.userID){m&&console.debug("[Experiment] No user identifier available"),S(!0);return}let t={device_id:e,...y.userID?{user_id:y.userID}:{},user_properties:{}};m&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await _.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{S(!0)}})()},[_,y.anonId,y.userID]),(0,i.useEffect)(()=>{C.current.clear(),(0,u.resetTrackedExposures)(),(0,d.resetExposures)(),b.current={},h(null),E(e=>e+1)},[y.userID,h]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t,strategy:"afterInteractive",onLoad:()=>{v(!0),m&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(f.Provider,{value:{client:_,variant:(e,t)=>{if(!_)return t;let r=_.variant(e,t);return m&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!_)return Promise.resolve();if(!e){let e=y.anonId;if(e||y.userID){let t={device_id:e,...y.userID?{user_id:y.userID}:{},user_properties:{}};return _.fetch(t)}}return _.fetch(e)},isFetchComplete:w},children:e})]})},h=()=>{let e=(0,i.useContext)(f);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},y=g},647292,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["webViewPlatformAtom",0,t])},456215,e=>{"use strict";e.s(["isSnowCastWebView",0,function(e){return"snowcast"===e||e.startsWith("snowcast-")},"isWebViewIos",0,function(e){return"ios"===e||e.endsWith("-ios")}])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},436028,e=>{"use strict";e.s(["hasLength",0,e=>Array.isArray(e)&&e.length>0])},458001,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["cscCountryCodeAtom",0,t])},849177,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["adsDisabledAtom",0,t])},21121,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["showVelvetcakeModuleAtom",0,t])},919101,e=>{"use strict";e.s(["getAddressForLocationData",0,(e,t)=>{if(!e||!Array.isArray(t))return e;let r=t.find(t=>t.placeId===e.placeId);return r?{...e,displayName:r.address,address:r.address}:e}])},935807,e=>{"use strict";function t(e,r=[],n=!1,a="US",o){let s,l=r.find(t=>t.placeID===e.placeId);if(l&&n){let t=l.userTag||l.name;if(t&&"Other"!==t){let r=e.displayName,n=i(e,a,""),o="address"===e.type?e.address:void 0;if(t!==r&&t!==n&&t!==o)return t}}if(e?.disputedCountries)s=e.displayName||"";else{switch(e?.type){case"address":s=e?.address?.split(",")[0]?.trim()||"";break;case"city":s=e?.locale?.locale2||"";break;case"locality":s=e?.locale?.locale3||"";break;case"neighborhood":s=e?.locale?.locale4||"";break;case"airport":s=e?.airportName||"";break;case"postal":{let t=e?.locale?.locale4||e?.locale?.locale3||e?.locale?.locale2||"",r=e?.postalCode||"";s=o?`${t} ${r}`.trim():`${t}`.trim();break}default:s=e?.displayName||""}0===s.length&&(s=e?.displayName||"")}return s}function r(e,t=[],n=!1,a="US",o){let s,l=t.find(t=>t.placeID===e.placeId);if(l&&n){let t=l.userTag||l.name;if(t&&"Other"!==t){let r=e.displayName,n=i(e,a,"");if(t!==r&&t!==n)return function(e,t="US"){if(e?.disputedCountries)return e?.displayName||"";let r=t===e?.countryCode?"":e?.country||"";switch(e?.type){case"city":{let t=e?.adminDistrict||"";return[e?.locale?.locale2||"",t,r].filter(Boolean).join(", ")}case"locality":{let t=e?.adminDistrict||e?.locale?.locale2||"";return[e.locale?.locale3||"",t,r].filter(Boolean).join(", ")}case"neighborhood":{let t=e?.adminDistrict||"";return[e?.locale?.locale4||"",e?.locale?.locale3||e?.locale?.locale2||"",t,r].filter(Boolean).join(", ")}case"postal":{let t=e?.adminDistrict||"",i=e?.postalCode||"";return[e?.locale?.locale4||e?.locale?.locale3||e?.locale?.locale2||"",`${t} ${i}`.trim(),r].filter(Boolean).join(", ")}default:{let t=e?.adminDistrict||"";return[e?.locale?.locale2||"",t,r].filter(Boolean).join(", ")}}}(e,a)}}if(e?.disputedCountries)s=e?.displayName||"";else{let t=a===e?.countryCode?"":e?.country||"",r=e?.adminDistrict||"",i=e?.postalCode||"",n=e.city||"";switch(e?.type){case"address":s=[n,r,t].filter(Boolean).join(", ");break;case"city":default:s=[r,t].filter(Boolean).join(", ");break;case"locality":s=[e?.locale?.locale2||"",r,t].filter(Boolean).join(", ");break;case"neighborhood":s=[e?.locale?.locale3||e?.locale?.locale2||"",r,t].filter(Boolean).join(", ");break;case"postal":{let n=r||e?.locale?.locale2||"";s=[o?`${n} ${i}`.trim():n,t].filter(Boolean).join(", ")}}}return s}function i(e,t,r){let{displayName:i,adminDistrictCode:n,adminDistrict:a,countryCode:o,disputedArea:s,country:l}=e,c=[];return i&&c.push(i),"IL"!==t&&(n?c.push(n):a&&c.push(a)),o!==t&&!1===s&&l&&c.push(l),c.join(r)}e.s(["getLocationContext",0,r,"getLocationName",0,t,"getLocationPresentationName",0,function(e,i=[],n=!1,a="US"){let o=t(e,i,n,a,!1),s=r(e,i,n,a,!0),l=e?.separator?e?.separator:o&&s?", ":"";return`${o}${l}${s}`.trim()}])},718043,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getCMSCollectionsUrlConfig=function({collectionId:e,locale:t="en_US"}){return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/collections/${t}/${e}`}},r.getCMSAssetByIDUrlConfig=function({language:e,assetId:t}){return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/a/${e}/${t}`}},r.getCMSOrderedCollectionsUrlConfig=function({collectionId:e,language:t="en_US"}){return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/ordered-collections/${t}/${e}`}},r.getCMSOrderedListUrlConfig=function({collectionId:e,language:t,collectionType:r}){return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/orderedlist/${t}/${r}/${e}`}},r.getCMSAssetsUrlConfig=function({language:e="en_US",query:t={},skip:r=0,limit:a=10,sort:o="-publishdate"}){let s={q:Object.keys(t).reduce((e,r)=>{let i=t[r];return i instanceof Array?[...e,...i.map(e=>n(r,e))]:[...e,n(r,i)]},[]).join(";"),pg:`${r},${a}`,format:"json",sort:o},l=(0,i.queryStringToSearchParams)(s).toString();return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/assets/${e}`,search:`?${l}`}},r.getCMSAssetsRawQueryUrlConfig=function({language:e="en_US",query:t="",skip:r=0,limit:n=10,sort:a="-publishdate"}){let o={q:t,pg:`${r},${n}`,format:"json",sort:a},s=(0,i.queryStringToSearchParams)(o).toString();return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/v4/assets/${e}`,search:`?${s}`}},r.getCMSAssetsSlideshowUrlConfig=function({offset:e=0,assetId:t,limit:r=500}){return{host:"dsx.weather.com",protocol:"https",pathname:`/cms/assets/slideshow/${t}/${e},${r}`}},r.getCMSQuickNavUrlConfig=function(){return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/settings/en_US/web/quick_nav"}};let i=e.r(678651);function n(e,t){let r=`'${t.$in}'`;return t.$in instanceof Array&&(r=t.$in.map(e=>`'${e}'`).join(",")),`${e}:$in(${r})`}},427977,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getQuickNav=void 0;let i=e.r(414655),n=e.r(678651),a=e.r(718043);r.getQuickNav=async()=>{let e=(0,n.urlFrom)((0,a.getCMSQuickNavUrlConfig)()),t=await fetch(e,{headers:{"Accept-Encoding":"gzip"}});return await (0,i.handleFetchResponse)(t)}}]);