(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,26752,e=>{"use strict";e.i(538167);var t=e.i(282446);e.i(74492),e.i(144683);let r=new WeakMap;e.s(["f",0,function(e,n){var i;let a,o=(0,t.f)(n),s=(i=o,(a=r.get(i))||(a=new WeakSet,r.set(i,a)),a);for(let[t,...r]of e)(!s.has(t)||(null==n?void 0:n.dangerouslyForceHydrate))&&(s.add(t),o.set(t,...r))}])},74492,e=>{"use strict";var t=e.i(144683);let r=Symbol(""),n=e=>"function"==typeof(null==e?void 0:e.then);function i(e=()=>{try{return window.localStorage}catch(e){return}},t){var r;let a,o,s,l,u={getItem:(r,i)=>{var s,l;let u=e=>{if(a!==(e=e||"")){try{o=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return i}a=e}return o},c=null!=(l=null==(s=e())?void 0:s.getItem(r))?l:null;return n(c)?c.then(u):u(c)},setItem:(r,n)=>{var i;return null==(i=e())?void 0:i.setItem(r,JSON.stringify(n,null==t?void 0:t.replacer))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};try{s=null==(r=e())?void 0:r.subscribe}catch(e){}return!s&&"u">typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};let n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),s&&(l=s,u.subscribe=(e,t,r)=>l(e,e=>{let n;try{n=JSON.parse(e||"")}catch(e){n=r}t(n)})),u}let a=i(),o=new WeakMap,s={state:"loading"};e.s(["s",0,r,"N",0,function(e,i,o=a,s){let l=null==s?void 0:s.getOnInit,u=(0,t.g)(l?o.getItem(e,i):i);return u.onMount=t=>{let r;return t(o.getItem(e,i)),o.subscribe&&(r=o.subscribe(e,t,i)),r},(0,t.g)(e=>e(u),(t,a,s)=>{let l="function"==typeof s?s(t(u)):s;return l===r?(a(u,i),o.removeItem(e)):n(l)?l.then(t=>(a(u,t),o.setItem(e,t))):(a(u,l),o.setItem(e,l))})},"j",0,i,"y",0,function(e){let r;return r=()=>{let r=new WeakMap,n=(0,t.g)([()=>{},0]);n.unstable_onInit=e=>{e.set(n,([,t])=>[()=>e.set(n,([e,t])=>[e,t+1]),t])};let i=(0,t.g)(t=>{let i,a,[o]=t(n);try{i=t(e)}catch(e){return{state:"hasError",error:e}}if("function"!=typeof(null==(a=i)?void 0:a.then))return{state:"hasData",data:i};let l=i,u=r.get(l);return u?u:(l.then(e=>{r.set(l,{state:"hasData",data:e}),o()},e=>{r.set(l,{state:"hasError",error:e}),o()}),r.get(l)||(r.set(l,s),s))});return(0,t.g)(e=>e(i))},(o.has(e)?o:o.set(e,r())).get(e)}])},797770,e=>{"use strict";let t=(0,e.i(144683).g)("");e.s(["f",0,t])},604323,e=>{"use strict";let t=(0,e.i(144683).g)();e.s(["f",0,t])},513539,e=>{"use strict";var t=e.i(144683);let r=(0,t.g)(null),n=(0,t.g)(null);e.s(["M",0,n,"D",0,r])},236433,e=>{"use strict";let t=(0,e.i(144683).g)(null);e.s(["f",0,t])},537989,e=>{"use strict";let t=(0,e.i(144683).g)();e.s(["f",0,t])},608201,236593,e=>{"use strict";var t=e.i(74492);let r={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function n(){try{return window.sessionStorage}catch{return r}}let i=(0,t.j)(n),a=(0,t.N)("wx-source-page",null,i,{getOnInit:!0});e.s(["f",0,a],608201);let o=(0,t.j)(n),s=(0,t.N)("wx-source-module",null,o,{getOnInit:!0});e.s(["f",0,s],236593)},736677,220126,e=>{"use strict";var t=e.i(74492);let r=(0,t.j)(()=>sessionStorage),n=(0,t.N)("wx-ht-source-page",null,r);e.s(["f",0,n],736677);let i=(0,t.j)(()=>sessionStorage),a=(0,t.N)("wx-ht-source-module",null,i);e.s(["f",0,a],220126)},529603,e=>{"use strict";let t=null,r=null,n=e=>{if(t&&e.event.context){let n={...t,...r};e.event.context.traits=e.event.userId?{...n,twcId:String(e.event.userId)}:n}return e};e.s(["p",0,()=>r,"k",0,e=>{t=e},"E",0,e=>{r=e},"Y",0,{name:"traits-plugin",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:n,page:n}])},658547,e=>{"use strict";var t=e.i(538167),r=e.i(839315),n=e.i(491240);let i=(e,t)=>{let n,i=Date.now()+2e3;return(n=!1,Promise.race([new Promise(e=>{let t=()=>{if(!n){if(window.mParticle?.ready)return void window.mParticle.ready(()=>e());setTimeout(t,50)}};t()}),new Promise((e,t)=>{setTimeout(()=>{t(Error("MParticle did not become ready in time"))},2e3)})]).finally(()=>{n=!0})).then(()=>new Promise(n=>{let a=setTimeout(n,Math.max(0,i-Date.now()));window.mParticle?.Identity?.[e]?.(t,e=>{clearTimeout(a);let t=e?.getUser?.()?.getMPID?.();t&&(0,r._)(t),n()})}))};e.s(["f",0,()=>{let e=(0,t.useCallback)(e=>i("identify",{userIdentities:{customerid:e.customerid,email:e.email,other:(0,n.f)(e.other)}}),[]);return{identify:e,login:(0,t.useCallback)(e=>i("login",{userIdentities:{customerid:e.customerid,email:e.email,facebook:e.facebook,facebookcustomaudienceid:e.facebookcustomaudienceid,google:e.google,microsoft:e.microsoft,other:(0,n.f)(e.other),other2:(0,n.f)(e.other2),other3:(0,n.f)(e.other3),other4:(0,n.f)(e.other4),twitter:e.twitter,yahoo:e.yahoo}}),[]),logout:(0,t.useCallback)(()=>i("logout",{userIdentities:{}}),[])}}])},678651,(e,t,r)=>{"use strict";function n(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))void 0!==n&&t.append(r,n);return t}Object.defineProperty(r,"__esModule",{value:!0}),r.queryStringToSearchParams=n,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=n(t.query).toString()),r}},671525,e=>{"use strict";var t=e.i(935251),r=e.i(652517);let n=()=>{let e=(0,t.useRouter)();return{navigate:(t,r={})=>{let{mpa:n=!0,replace:i=!1}=r;n?i?window.location.replace(t):window.location.href=t:i?e.replace(t):e.push(t)},refresh:(t={})=>{let{mpa:n=!0}=t;n?(0,r.Q)():e.refresh()},router:e}};e.s(["U",0,n,"Z",0,n])},652517,e=>{"use strict";let t=null;e.s(["Q",0,function(e=()=>window.location.reload()){t?t(e):e()},"x",0,function(e){return t=e,()=>{t===e&&(t=null)}}])},756227,e=>{"use strict";var t=e.i(282446),r=e.i(74492),n=e.i(889753),i=e.i(905059),a=e.i(310847),o=e.i(960576),s=e.i(317298),l=e.i(839315),u=e.i(391174),c=e.i(735526),f=e.i(90543),d=e.i(529603);e.s(["f",0,function(){let e=(0,t.F)(n.Y),g=(0,t.F)(a.n),m=(0,t.F)(n.s),p=(0,t.F)(i.f);return()=>{(0,u.f)(),(0,s.n)(),e(r.s),g(null),m(r.s),p(r.s),(0,o.c)(),(0,c.K)(),(0,d.E)(null),(0,l.x)(),(0,f.$)()}}])},735526,e=>{"use strict";let t="wx-next/account-created";e.s(["K",0,function(){try{sessionStorage.removeItem(t)}catch{}},"q",0,function(){try{sessionStorage.setItem(t,"true")}catch{}},"$",0,function(){try{return"true"===sessionStorage.getItem(t)}catch{return!1}}])},90543,e=>{"use strict";var t=e.i(521350);let r="wxu-auth-epoch",n="wxu-rendered-tier";function i(e){return(0,t.isLocalStorageAvailable)()?localStorage.getItem(e):null}function a(e,r){(0,t.isLocalStorageAvailable)()&&localStorage.setItem(e,r)}e.s(["$",0,function(){a(r,String(Date.now()))},"T",0,function({renderedTier:e,recordedTier:t,epochAtLoad:r,currentEpoch:n}){return null!==t&&t!==e||void 0!==r&&r!==n},"R",0,function(){return i(r)},"J",0,function(){return i(n)},"K",0,function(e){a(n,e)}])},391174,184059,e=>{"use strict";var t=e.i(284981);e.s(["f",()=>t.j],184059);var t=t,r=e.i(892504);e.s(["f",0,()=>{(0,t.j)(e=>"string"==typeof e&&e.startsWith("upsx/"),void 0,{revalidate:!1}),(0,r.p)()}],391174)},45846,e=>{"use strict";e.i(199690);var t=e.i(245943),r=e.i(810564);let n=new t.UPSXClient({baseUrl:(0,r.Z)("https://upsx.weather.com")});e.s(["f",0,n])},143778,e=>{"use strict";let t=(0,e.i(74492).N)("wxu-web/keyval:emailSubscriptions",null,void 0,{getOnInit:!0});e.s(["f",0,t])},905059,e=>{"use strict";let t=(0,e.i(74492).N)("wx-next/user:mapLayerOrder",null,void 0,{getOnInit:!0});e.s(["f",0,t])},398444,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},776169,809991,e=>{"use strict";var t=e.i(282446),r=e.i(889753),n=e.i(301904),i=e.i(905059),a=e.i(901351),o=e.i(310847),s=e.i(528600),l=e.i(617874),u=e.i(201542),c=e.i(553329),f=e.i(538167),d=e.i(245943);let g=(0,e.i(695881).createLogger)("useMapSettings");e.s(["y",0,"twc","b",0,function(e="twc"){let{user:{isUserLoggedIn:r}}=(0,s.f)(),n=(0,t.F)(i.f),o=(0,f.useCallback)(async t=>{if(!r)return!1;let{error:n}=await (0,c.f)(a.f.preference.updateMapSettings(e,t));if(!n)return!0;if(n instanceof d.APIError&&404===n.code){let{error:r}=await (0,c.f)(a.f.preference.createMapSettings(e,t));return!r||(g.warn("Failed to create map settings",r),!1)}return g.warn("Failed to update map settings",n),!1},[r,e]),l=(0,f.useCallback)((e,t)=>{n(e?.layerOrder??t)},[n]),u=(0,f.useCallback)(async t=>{if(!r||0===t.length)return!1;n(t);let{data:i,error:o}=await (0,c.f)(a.f.preference.reorderMapSettingsLayers(e,{order:t}));if(!o)return l(i,t),!0;if(o instanceof d.APIError&&404===o.code){let{data:r,error:n}=await (0,c.f)(a.f.preference.createMapSettings(e,{layerOrder:t}));if(!n)return l(r,t),!0;if(n instanceof d.APIError&&409===n.code){let{data:r,error:n}=await (0,c.f)(a.f.preference.reorderMapSettingsLayers(e,{order:t}));return n?(g.warn("Failed to reorder map layers after create",n),!1):(l(r,t),!0)}return g.warn("Failed to create map settings layer order",n),!1}return g.warn("Failed to reorder map layers",o),!1},[r,e,l,n]),m=(0,f.useCallback)(async(t,i,o)=>{if(!r)return!1;n(o);let{data:s,error:f}=await (0,c.f)(a.f.preference.moveMapSettingsLayer(e,t,{placement:i}));return f?f instanceof d.APIError&&(404===f.code||400===f.code)?u(o):(g.warn("Failed to move map layer",f),!1):(l(s,o),!0)},[r,e,l,u,n]);return{saveMapSettings:o,saveLayerOrder:u,moveLayer:m}}],809991),e.s(["f",0,function(){let{user:{isUserLoggedIn:e}}=(0,s.f)(),[f,d]=(0,t.q)(r.u),[g,m]=(0,t.q)(o.o),p=(0,t.F)(i.f),w=async()=>{let{data:e,error:t}=await (0,c.f)(a.f.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:n,opacity:i,roadOverlay:o,style:s}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==n&&{autoplay:n},...void 0!==i&&{opacity:i},...void 0!==o&&{roadOverlay:o},...void 0!==s&&{style:s}};return{ok:!0,mapSettings:Object.keys(l).length>0?l:null,layerOrder:e.layerOrder?.length?e.layerOrder:null}},y=async e=>{try{await a.f.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},h=async(t,r=!0)=>{try{let n,i=(n={...f,...t},d(n),m({...g,...t,locations:n.locations}),n);if(t?.unit){let e=(0,l.H)(t.unit),r=e?.code||"e";(0,u.setCookie)(l.S,r,{domain:"weather.com"})}return r&&e&&await y(i),{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.f.preference.getPreference(),w()]);if(!e?.userID)return null;let{mapSettings:r,layerOrder:i,ok:o}=t;o&&p(i);let{mapSettings:s,...l}=e,u={...l,mapSettings:{...n.f,...r}};return h(u,!1),u}catch{return null}},updatePreferences:h}}],776169)},160317,e=>{"use strict";var t=e.i(543512);e.s(["f",0,function(e){return t.m[e]??t.m[t.H.none]}])},317298,e=>{"use strict";let t="wxu-next-session-intent",r=["fpdprobnsitop1intent","fpdprobnsitop2intent","fpdprobnsitop3intent"];e.s(["n",0,function(){try{localStorage.removeItem(t)}catch{}},"I",0,function(e){return!!e&&r.some(t=>{let r=e[t];return"string"==typeof r&&"radar"===r.trim().toLowerCase()})},"o",0,function(){try{let e=localStorage.getItem(t);if(!e)return null;let r=JSON.parse(e);if(r&&"object"==typeof r&&"promotesRadar"in r&&"boolean"==typeof r.promotesRadar)return{promotesRadar:r.promotesRadar};return null}catch{return null}},"d",0,function(e){try{localStorage.setItem(t,JSON.stringify({promotesRadar:e.promotesRadar}))}catch{}}])},839315,e=>{"use strict";var t=e.i(584169);let r="wxu-web/keyval:mparticleUser";e.s(["x",0,()=>{try{localStorage.removeItem(r)}catch{}},"S",0,({upsxId:e,anonId:t})=>{let r="wxu-web/keyval:airlyticsUserAttributes"in localStorage,n="wxu-web/keyval:airlyticsEventQueue"in localStorage;return r&&n?e?`user:${e}`:`devices:${t}`:null},"d",0,()=>{let e=(0,t.getCookie)("s_vi")?.toString();if(!e||"string"!=typeof e)return null;let r=e.split("|");return r&&Array.isArray(r)&&"string"==typeof r[1]&&r[1].split("[")[0]||null},"t",0,()=>{let e,r,n=(e=window?.top,(r=e?._sp_?.metricData?.propertyId)||null),i=window?.top,a=i?._sp_?.config?.authId||(0,t.getCookie)("consentUUID")?.toString();return a&&n?`${n}:${a}`:null},"N",0,()=>{try{let e=JSON.parse(localStorage.getItem(r)||"{}");return e?.value?.mpid||null}catch{return null}},"H",0,()=>window?.mParticle?.Identity?.getCurrentUser?.()?.getUserIdentities?.()?.userIdentities?.customerid||null,"u",0,()=>{let e=window?.mParticle?.Identity?.getCurrentUser?.()?.getMPID?.();return e||null},"_",0,e=>{try{localStorage.setItem(r,JSON.stringify({value:{mpid:e},updatedAt:Date.now()}))}catch{}}])},892504,e=>{"use strict";let t="upsx-purchase-checked-at";e.s(["p",0,()=>{try{localStorage.removeItem(t)}catch{}},"q",0,()=>{try{localStorage.setItem(t,String(Date.now()))}catch{}},"r",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";var t=e.i(553329),r=e.i(901351);async function n(e){let{data:n,error:i}=await (0,t.f)(r.f.identity.resolve(e));return i||"string"!=typeof n?.twcID||!n.twcID?{twcId:null,error:i??null}:{twcId:{twcID:n.twcID,hashedTwcID:n.hashedTwcID,expiresAt:n.expiresAt,manifestVersion:n.manifestVersion,installationID:e},error:null}}e.s(["f",0,n],74874);let i=(0,e.i(695881).createLogger)("MParticleIdentity");e.s(["f",0,e=>"string"==typeof e&&e.length>256?(i.warn(`identity value exceeded 256 chars (${e.length}); truncating`),e.slice(0,256)):e],491240)},991511,e=>{"use strict";var t=e.i(538167),r=e.i(26752),n=e.i(282446);e.s(["f",0,e=>{(0,r.f)(e);let i=(0,n.f)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)i.get(e)!==t&&i.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(["f",0,t])}]);