(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(592121);let a=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,a],674339),e.s(["useDebugSystem",0,function(){let[e,s]=(0,t.useAtom)(a),n=(0,r.useCallback)((e,t)=>{s(r=>{let a=r?.[e]||{},s="object"==typeof t&&null!==t&&"object"==typeof a?{...a,...t}:t;return{...r,[e]:s}})},[s]),o=(0,r.useCallback)((e,t)=>{s(r=>{let a=r||{timestamp:new Date().toISOString()},s=a.components||{};if(null===t){let t={...s};return delete t[e],{...a,components:t}}return{...a,components:{...s,[e]:t}}})},[s]),i=(0,r.useCallback)(e=>{n("page",e)},[n]),u=(0,r.useCallback)(e=>{n("route",e)},[n]),c=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&n(e,t)})},[n]);return{debugData:e,updateSection:n,updateComponentData:o,setPageData:i,clearAllDebugData:(0,r.useCallback)(()=>{s({timestamp:new Date().toISOString()})},[s]),updateRouteInfo:u,updatePageDebug:c}}],609858)},752496,e=>{"use strict";var t=e.i(592121),r=e.i(609858);let a=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:s,page:n,onUpdateData:o,onSetPageData:i}){let{updateComponentData:u,setPageData:c}=(0,r.useDebugSystem)(),l=(0,t.useRef)(!1),p=o||u,m=i||c;return(0,t.useEffect)(()=>{if(s)return a.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(s),hasPerformance:!!s.performance,hasContext:!!s.context}),p(e,{...s,_collectedAt:new Date().toISOString()}),()=>{a.lifecycle(`Cleaning up data for ${e}`),p(e,null)}},[e,s,p]),(0,t.useEffect)(()=>{n&&!l.current&&(a.lifecycle("Setting page metadata",{title:n.title,assetName:n.assetName,collection:n.collection}),m({...n,_updatedAt:new Date().toISOString()}),l.current=!0)},[n,m]),null}])},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,a){var s;let n,o=(0,t.useStore)(a),i=(s=o,(n=r.get(s))||(n=new WeakSet,r.set(s,n)),n);for(let[t,...r]of e)(!i.has(t)||(null==a?void 0:a.dangerouslyForceHydrate))&&(i.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),a=(0,t.atom)(null);e.s(["activeEventAtom",0,a,"layoutStateAtom",0,r])},991511,e=>{"use strict";var t=e.i(592121),r=e.i(806262),a=e.i(546446);e.s(["useRehydrateAtoms",0,e=>{(0,r.useHydrateAtoms)(e);let s=(0,a.useStore)(),n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{for(let[e,t]of n.current)s.get(e)!==t&&s.set(e,t)})}])},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},284007,e=>{"use strict";var t=e.i(981030);let r={get url(){return`file://${e.P("node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected]/node_modules/jotai/esm/vanilla/utils.mjs")}`}},a=Symbol((r.env?r.env.MODE:void 0)!=="production"?"RESET":""),s=e=>"function"==typeof(null==e?void 0:e.then);function n(e=()=>{try{return window.localStorage}catch(e){(r.env?r.env.MODE:void 0)!=="production"&&"u">typeof window&&console.warn(e);return}},t){var a;let o,i,u,c,l={getItem:(r,a)=>{var n,u;let c=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return a}o=e}return i},l=null!=(u=null==(n=e())?void 0:n.getItem(r))?u:null;return s(l)?l.then(c):c(l)},setItem:(r,a)=>{var s;return null==(s=e())?void 0:s.setItem(r,JSON.stringify(a,null==t?void 0:t.replacer))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};try{u=null==(a=e())?void 0:a.subscribe}catch(e){}return!u&&"u">typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(u=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};let a=a=>{a.storageArea===e()&&a.key===t&&r(a.newValue)};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}}),u&&(c=u,l.subscribe=(e,t,r)=>c(e,e=>{let a;try{a=JSON.parse(e||"")}catch(e){a=r}t(a)})),l}let o=n(),i=new WeakMap,u={state:"loading"};e.s(["RESET",0,a,"atomWithStorage",0,function(e,n,i=o,u){let c=null==u?void 0:u.getOnInit,l=(0,t.atom)(c?i.getItem(e,n):n);return(r.env?r.env.MODE:void 0)!=="production"&&(l.debugPrivate=!0),l.onMount=t=>{let r;return t(i.getItem(e,n)),i.subscribe&&(r=i.subscribe(e,t,n)),r},(0,t.atom)(e=>e(l),(t,r,o)=>{let u="function"==typeof o?o(t(l)):o;return u===a?(r(l,n),i.removeItem(e)):s(u)?u.then(t=>(r(l,t),i.setItem(e,t))):(r(l,u),i.setItem(e,u))})},"createJSONStorage",0,n,"loadable",0,function(e){let a;return a=()=>{let a=new WeakMap,s=(0,t.atom)([()=>{},0]);s.unstable_onInit=e=>{e.set(s,([,t])=>[()=>e.set(s,([e,t])=>[e,t+1]),t])},(r.env?r.env.MODE:void 0)!=="production"&&(s.debugPrivate=!0);let n=(0,t.atom)(t=>{let r,n,[o]=t(s);try{r=t(e)}catch(e){return{state:"hasError",error:e}}if("function"!=typeof(null==(n=r)?void 0:n.then))return{state:"hasData",data:r};let i=r,c=a.get(i);return c?c:(i.then(e=>{a.set(i,{state:"hasData",data:e}),o()},e=>{a.set(i,{state:"hasError",error:e}),o()}),a.get(i)||(a.set(i,u),u))});return(r.env?r.env.MODE:void 0)!=="production"&&(n.debugPrivate=!0),(0,t.atom)(e=>e(n))},(i.has(e)?i:i.set(e,a())).get(e)}])},537989,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["pageIdAtom",0,t])},236593,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),a=(0,t.atomWithStorage)("wx-source-module",null,r);e.s(["sourceModuleAtom",0,a])},608201,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),a=(0,t.atomWithStorage)("wx-source-page",null,r);e.s(["sourcePageAtom",0,a])},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),a=e.i(301904),s=e.i(901351),n=e.i(310847),o=e.i(528600),i=e.i(617874),u=e.i(858040),c=e.i(553329),l=e.i(592121),p=e.i(245943);let m=(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,l.useCallback)(async r=>{if(!t)return!1;let{error:a}=await (0,c.tryCatch)(s.upsxClient.preference.updateMapSettings(e,r));if(!a)return!0;if(a instanceof p.APIError&&404===a.code){let{error:t}=await (0,c.tryCatch)(s.upsxClient.preference.createMapSettings(e,r));return!t||(m.warn("Failed to create map settings",t),!1)}return m.warn("Failed to update map settings",a),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,o.useUser)(),[l,p]=(0,t.useAtom)(r.userPreferencesAtom),[m,d]=(0,t.useAtom)(n.wxuUserPreferenceAtom),g=async()=>{let{data:e,error:t}=await (0,c.tryCatch)(s.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:a,opacity:n,roadOverlay:o,style:i}=e,u={...void 0!==r&&{animationSpeed:r},...void 0!==a&&{autoplay:a},...void 0!==n&&{opacity:n},...void 0!==o&&{roadOverlay:o},...void 0!==i&&{style:i}};return Object.keys(u).length>0?u:null},f=async e=>{try{await s.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},h=async(t,r=!0)=>{try{let a,s=(a={...l,...t},p(a),d({...m,...t,locations:a.locations}),a);if(t?.unit){let e=(0,i.unitsSystemByName)(t.unit),r=e?.code||"e";(0,u.setCookie)(i.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await f(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([s.upsxClient.preference.getPreference(),g()]);if(!e?.userID)return null;let{mapSettings:r,...n}=e,o={...n,mapSettings:{...a.DEFAULT_MAP_SETTINGS,...t}};return h(o,!1),o}catch{return null}},updatePreferences:h}}],776169)},682142,e=>{"use strict";var t=e.i(858040),r=e.i(333350);let a=null;e.s(["getCICookie",0,function(){if(!r.default)return null;if(a)return a;let e=(0,t.getCookie)("ci")||"";return e?a=e.split("&").reduce((e,t)=>{let r=t.split("=");return r[0]&&"string"==typeof r[1]&&(e[r[0]]=r[1]),e},{}):null}])},947118,e=>{"use strict";var t=e.i(592121);let r=e=>(window.mParticle?.ready?.(e),()=>{}),a=()=>!!window.mParticle?.isInitialized?.(),s=()=>!1;e.s(["useIsInitialized",0,()=>(0,t.useSyncExternalStore)(r,a,s)])},132084,e=>{"use strict";var t,r=((t={}).APPLE="apple_widget",t.SAMSUNG="samsung_widget",t.OPPO="oppo_widget",t.TRANSSION="transsion",t.ONEPLUS="oneplus",t.TIKTOK="tiktok_search",t);Object.values(r),e.s(["Partner",()=>r,"SAMSUNG_VIETNAM_PARTNER",0,"samsungVietnam","partnersByPattern",0,{weatherapptodaywidget:"apple_widget",apple_:"apple_widget",samsung:"samsung_widget",oppo_:"oppo_widget","oppo-":"oppo_widget",transsion:"transsion",oneplus:"oneplus",tiktok_:"tiktok_search"}])},831826,e=>{"use strict";var t=e.i(132084);e.s(["getPartnerByPattern",0,function(e){for(let[r,a]of Object.entries(t.partnersByPattern))if(e.toLowerCase().includes(r))return a;return null},"isSamsungVietnamPartner",0,function(e){return e.toLowerCase().replace(/[_-]/g,"").includes("samsungvsc")}])},959194,896363,e=>{"use strict";var t=e.i(333350),r=e.i(831826),a=e.i(132084),s=e.i(682142),n=e.i(858040);let o=e=>{if(!e)return"";let t="[";return Array.isArray(e)&&e.forEach((r,a)=>{t+=`'${r}'${a!==e.length-1?",":""}`}),t+="]"};e.s(["parseArrayToString",0,o],896363);let i=()=>t.default?Object.fromEntries(new URLSearchParams(window.location.search.replace("+","%2B")).entries()):{};(0,s.getCICookie)()?.["TWC-GeoIP-DMA"],e.s(["WEEK_DAYS",0,["SUN","MON","TUE","WED","THU","FRI","SAT"],"areObjectValuesDefined",0,e=>Object.keys(e).every(t=>void 0!==e[t]),"getAnonymizedPath",0,function(e){var t;let r,a,s,n=(r=e,a=e?.indexOf?.("?"),s=e?.indexOf?.("#"),a>-1?r=r.substring(0,a):s>-1&&(r=r.substring(0,s)),r);if(t=n,"/index.html"===(n=t?.replace?.(/\/l\/[^/]+/gi,"/l"))||"/"===n||""===n)n="/";else{let e=n?.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(),n=e.join("/")}return n},"getCampaign",0,()=>{let e=i(),t=null,r=!0,a=[];return e.cm_ven&&a.push(e.cm_ven),e.cm_date&&a.push(e.cm_date),e.cm_cat&&a.push(e.cm_cat),e.cm_pla&&a.push(e.cm_pla),e.cm_ite&&a.push(e.cm_ite),a.length>0?t=a.join(":"):(t=(0,n.getCookie)("campaign-values")||null,r=!1),r&&t&&(0,n.setCookie)("campaign-values",t,{domain:".weather.com",path:"/",maxAge:1800}),t},"getLinkReferral",0,()=>i()?.traffic_source||null,"getPartner",0,()=>{let e=(0,n.getCookie)("partner")||"";return(0,r.getPartnerByPattern)(e)??e},"getSamsungVietnamPartner",0,()=>{let e=(0,n.getCookie)("partner")||"";return(0,r.isSamsungVietnamPartner)(e)?a.SAMSUNG_VIETNAM_PARTNER:""},"getTimezoneOffsetInHours",0,function(e,t=new Date){if(!e)throw Error("Invalid timeZone provided.");try{let r=t.getTime(),a=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"}).formatToParts(t).reduce((e,t)=>{if("literal"!==t.type){let r=parseInt(t.value,10);"hour"===t.type&&24===r&&(r=0),e[t.type]=r}return e},{});return(Date.UTC(a.year??0,(a.month??1)-1,a.day??1,a.hour??0,a.minute??0,a.second??0)-r)/36e5}catch(e){return e instanceof Error&&console.error(e.message),0}},"getTpcc",0,()=>{let e=i()?.tpcc||(0,n.getCookie)("tpcc")||null;return e&&(0,n.setCookie)("tpcc",e,{path:"/",domain:".weather.com",maxAge:1800}),e},"jwtDecoder",0,function(e){if(!e)return{};let t=e.split("."),r=(Array.isArray(t)&&t.length>=2&&t[1]||"").replace("-","+").replace("_","/");try{return JSON.parse(window.atob(r))||{}}catch{return{}}},"mapIabTagsToIabContent",0,e=>{let t=[];return e?.v1&&t.push(e.v1),e?.v2&&t.push(e.v2),e?.v3&&t.push(e.v3),o(t)},"stripLastPartOfSlug",0,(e="")=>{let t=e.split("/");return t?.[t.length-1]===""&&t.pop(),t.slice(0,t.length-1).join("/")}],959194)},725296,e=>{"use strict";var t,r=e.i(530102),a=((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.USA_UT="usa-ut",t);let s=Object.values(a);e.s(["PRIVACY_REGIMES",0,s,"RESTRICTIVE_REGIMES",0,["ca-qc","gdpr","latam-co","latam-do","latam-pe","lgpd","pipl","tr-kvkk"],"Regime",()=>a,"US_REGIMES",0,["usa","usa-ccpa","usa-co","usa-ct","usa-va"],"default",0,a,"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 t.slice(e+1)||void 0}})()||(0,r.getCookie)("twc-privacy")||"exempt"])},678651,(e,t,r)=>{"use strict";function a(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))void 0!==a&&t.append(r,a);return t}Object.defineProperty(r,"__esModule",{value:!0}),r.queryStringToSearchParams=a,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=a(t.query).toString()),r}},414655,(e,t,r)=>{"use strict";async function a(e){if(!e.ok)switch(e.status){case 401:throw Error("Unauthorized (status 401)");case 403:throw Error("Forbidden (status 403)");case 404:throw Error("Not found (status 404)");case 400:throw Error("Bad Request (status 400)");default:if(e.status>=500)throw Error(`Server error (status ${e.status})`);throw Error(`Unhandled error (status ${e.status})`)}try{if(204===e.status)return null;return await e.json()}catch(e){throw Error(`Invalid JSON response: ${e.message}`)}}async function s(e){if(!e.ok)switch(e.status){case 401:throw Error("Unauthorized (status 401)");case 403:throw Error("Forbidden (status 403)");case 404:throw Error("Not found (status 404)");case 400:throw Error("Bad Request (status 400)");default:if(e.status>=500)throw Error(`Server error (status ${e.status})`);throw Error(`Unhandled error (status ${e.status})`)}try{if(204===e.status)return"";return await e.text()}catch(e){throw Error(`Invalid text response: ${e.message}`)}}Object.defineProperty(r,"__esModule",{value:!0}),r.handleFetchResponse=a,r.handleFetchTextResponse=s},763886,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["partnerAtom",0,t])},394481,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["privacyRegimeAtom",0,t])},739971,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["subscriptionsEnabledAtom",0,t])},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 a=Number(t);if(!Number.isFinite(a))return!1;return Date.now()-at,"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])},491045,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),a=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,a])},185312,(e,t,r)=>{t.exports=e.r(16129)},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])}]);