(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,248064,e=>{"use strict";var t=e.i(991511),r=e.i(763886),i=e.i(458001),a=e.i(394481),s=e.i(663333),o=e.i(849177),n=e.i(889753),l=e.i(5397),c=e.i(21121);e.i(647872);var u=e.i(494889),d=e.i(928083),m=e.i(624432),g=e.i(739971),p=e.i(688070),A=e.i(647292);e.s(["FlagsBoundaryClient",0,({params:e})=>((0,t.useRehydrateAtoms)([[r.partnerAtom,e.partner],[i.cscCountryCodeAtom,e.cscCountryCode],[a.privacyRegimeAtom,e.privacyRegime],[s.deviceClassAtom,e.deviceClass],[n.userTierAtom,e.userTier],[o.adsDisabledAtom,e.adsDisabled],[l.showAdminHeaderAtom,e.showAdminHeader],[c.showVelvetcakeModuleAtom,e.showVelvetcakeModule],[u.newsHubEnabledAtom,e.newsHubEnabled],[d.activityHubMenuEnabledAtom,e.activityHubMenuEnabled],[m.contentSearchUniversalAtom,e.contentSearchUniversal],[g.subscriptionsEnabledAtom,e.subscriptionsEnabled],[A.webViewPlatformAtom,e.webViewPlatform],[p.isWebViewOnlyAtom,e.isWebViewOnly]]),null)])},147732,e=>{"use strict";e.s(["debounce",0,function(e,t,{signal:r,edges:i}={}){let a,s=null,o=null!=i&&i.includes("leading"),n=null==i||i.includes("trailing"),l=()=>{null!==s&&(e.apply(a,s),a=void 0,s=null)},c=null,u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,n&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),a=void 0,s=null},m=function(...e){if(r?.aborted)return;a=this,s=e;let t=null==c;u(),o&&t&&l()};return m.schedule=u,m.cancel=d,m.flush=()=>{l()},r?.addEventListener("abort",d,{once:!0}),m}])},232598,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={callServer:function(){return s.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let s=e.r(276247),o=e.r(788443),n=e.r(955011)},866137,723469,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["adBlockAtom",0,t],866137);var r=e.i(247865),i=e.i(725287),a=e.i(546446),s=e.i(540768),o=e.i(682142),n=e.i(782937),l=e.i(695881),c=e.i(333350),u=e.i(64412),d=e.i(950771),m=e.i(537989),g=e.i(695203),p=e.i(158662),A=e.i(358273),f=e.i(122124),S=e.i(777638),C=e.i(924776),w=e.i(409628),b=e.i(605781);let h=(0,l.createLogger)("useTrackString");e.s(["useTrackString",0,()=>{let e=(0,a.useAtomValue)(m.pageIdAtom),t=(0,a.useAtomValue)(d.pageLocaleAtom),l=(0,a.useAtomValue)(g.deviceClassAtom),v=(0,a.useAtomValue)(p.experimentJoinListAtom),y=(0,i.usePathname)(),{location:E}=(0,u.useLocation)(),k=(0,C.useIsHightouchReady)(),I=(0,r.useCallback)(r=>{let i=(0,o.getCICookie)(),a=i?.["TWC-GeoIP-Country"]??(0,s.getCookie)("twc-location-country"),c=i?.["TWC-GeoIP-Region"]??(0,s.getCookie)("twc-location-region"),u=i?.["TWC-Privacy"]??(0,s.getCookie)("twc-privacy"),d=window.DprSdk?.getGdprConsentOptInsString()??"",m=window.DprSdk?.getCcpaSaleOptInString()??"",g=window.navigator?.globalPrivacyControl??!1,p=d?.includes("functional-technology")??!1,C=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,b=window.DprSdk?.getUserConsent("interest-based-ads")!==!1,h=String(window.DprSdk?.getUserConsent("sale-of-data")!==!1),k=String(window.DprSdk?.getUserConsent("sensitive-data")!==!1),I=navigator?.cookieEnabled??!1,P=(0,s.getCookie)("partner")||"",T=(0,n.getPartnerByPattern)(P)??P,_=(0,A.getMetricsSession)(),D=_?.sessionId||"",O=new Date(_?.sessionStartTime||0).toISOString(),R=new Date,U=R.getHours(),M=w.WEEK_DAYS[R.getDay()]??"",L="article"===e||"video"===e?(0,f.stripLastPartOfSlug)(y??""):(0,f.getAnonymizedPath)(y??"");return{trackString:r,pageId:e??"",schemaVersion:"nextgen",url:L,referrer:document.referrer,locale:t,deviceClass:l,partner:T,sessionId:D,sessionStartTime:O,siteMode:"normal",dayOfWeek:M,hourOfDay:U,regime:u??"",cookiesEnabled:I,gpcSignalOptOut:g,functionalTechnologies:p,geographicallyRelevantAds:C,interestBasedAds:b,priv:d,privProducts:m,saleOfData:h,saleOfDataAuthorization:h,sensitiveDataAuthorization:k,campaign:(0,S.getCampaign)(),experimentJoinList:v,weatherMode:"normal",physicalCountry:a??"",physicalState:c??"",wlocCity:E?.city??null,wlocCountry:E?.countryCode??null,wlocState:E?.adminDistrictCode??null,wlocDMA:E?.dmaCd??null,samsungVersion:(0,S.getSamsungVersion)(),appVersion:"c6fbd5a7980e55c71a4aafe9ccdf49dfaf7d97a9".slice(0,10)}},[e,t,l,v,y,E]);return(0,r.useCallback)(e=>{if(c.default&&e){if(!k)return void h.warn('Hightouch: Event "track-string" skipped - SDK not ready');try{(0,b.trackTrackString)(I(e)),h.info('Hightouch: Event "track-string" tracked',{trackString:e})}catch(e){h.error('Hightouch: Event "track-string" failed',{error:e})}}},[k,I])}],723469)},800462,50727,e=>{"use strict";var t=e.i(284007);let r=(0,t.atomWithStorage)("wx-from-search-result",null);e.s(["fromSearchResultAtom",0,r],800462);let i=(0,t.atomWithStorage)("wx-ht-from-search-result",null);e.s(["fromSearchResultAtom",0,i],50727)},128541,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])},647292,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["webViewPlatformAtom",0,t])},320209,e=>{"use strict";e.i(288906);var t=e.i(247865),r=e.i(725287),i=e.i(546446),a=e.i(540768),s=e.i(682142),o=e.i(782937),n=e.i(695881),l=e.i(333350),c=e.i(64412),u=e.i(950771),d=e.i(537989),m=e.i(695203),g=e.i(158662),p=e.i(358273),A=e.i(122124),f=e.i(777638),S=e.i(924776),C=e.i(409628),w=e.i(605781);let b=(0,n.createLogger)("useTrackAssetViewed"),h=[],v=null;function y(e){try{(0,w.trackAssetViewed)(e),b.info(`Hightouch: Event "asset-viewed" tracked - ${e.contentId}`)}catch(e){b.error('Hightouch: Event "asset-viewed" failed',e)}}e.s(["trackHightouchAssetViewed",0,function(e){try{v?.(e)}catch(e){b.error('Hightouch: Event "asset-viewed" failed',e)}},"useRegisterAssetViewedTracker",0,()=>{let e=(()=>{let e=(0,r.usePathname)(),n=(0,i.useAtomValue)(d.pageIdAtom),w=(0,i.useAtomValue)(u.pageLocaleAtom),b=(0,i.useAtomValue)(m.deviceClassAtom),v=(0,i.useAtomValue)(g.experimentJoinListAtom),{location:E}=(0,c.useLocation)(),k=(0,S.useIsHightouchReady)(),I=(0,t.useCallback)(({moduleId:t,contentId:r,assetMediaType:i,title:l,pos:c,tagsKeyword:u})=>{let d=(0,s.getCICookie)(),m=d?.["TWC-GeoIP-Country"]??(0,a.getCookie)("twc-location-country"),g=d?.["TWC-GeoIP-Region"]??(0,a.getCookie)("twc-location-region"),S=d?.["TWC-Privacy"]??(0,a.getCookie)("twc-privacy"),h=window.DprSdk?.getGdprConsentOptInsString()??"",y=window.DprSdk?.getCcpaSaleOptInString()??"",k=window.navigator?.globalPrivacyControl??!1,I=h?.includes("functional-technology")??!1,P=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,T=window.DprSdk?.getUserConsent("interest-based-ads")!==!1,_=navigator?.cookieEnabled??!1,D=(0,a.getCookie)("partner")||"",O=(0,o.getPartnerByPattern)(D)??D,R=(0,p.getMetricsSession)(),U=R?.sessionId||"",M=new Date(R?.sessionStartTime||0).toISOString(),L=new Date,N=L.getHours(),V=C.WEEK_DAYS[L.getDay()]??"",x="article"===n||"video"===n?(0,A.stripLastPartOfSlug)(e??""):(0,A.getAnonymizedPath)(e??"");return{moduleId:t,contentId:r,assetMediaType:i,title:l,pos:String(c),tagsKeyword:u??null,pageId:n??"",url:x,referrer:document.referrer,locale:w,deviceClass:b,partner:O,sessionId:U,sessionStartTime:M,siteMode:"normal",dayOfWeek:V,hourOfDay:N,regime:S??"",cookiesEnabled:_,gpcSignalOptOut:k,functionalTechnologies:I,geographicallyRelevantAds:P,interestBasedAds:T,priv:h,privProducts:y,campaign:(0,f.getCampaign)(),experimentJoinList:v,weatherMode:"normal",physicalCountry:m??"",physicalState:g??"",wlocCity:E?.city??null,wlocCountry:E?.countryCode??null,wlocState:E?.adminDistrictCode??null,wlocDMA:E?.dmaCd??null,samsungVersion:(0,f.getSamsungVersion)(),appVersion:"c6fbd5a7980e55c71a4aafe9ccdf49dfaf7d97a9".slice(0,10)}},[e,n,w,b,v,E]);return(0,t.useEffect)(()=>{if(!k||0===h.length)return;let e=h;h=[],e.forEach(y)},[k]),(0,t.useCallback)(e=>{if(!l.default)return;let t=I(e);k?y(t):h.push(t)},[k,I])})();(0,t.useEffect)(()=>(v=e,()=>{v===e&&(v=null)}),[e])}])},915044,e=>{"use strict";e.i(288906);var t=e.i(247865),r=e.i(947118),i=e.i(546446),a=e.i(293163),s=e.i(160317),o=e.i(382602),n=e.i(540768),l=e.i(310847),c=e.i(333350),u=e.i(528600);e.s(["useUserAttributes",0,()=>{let e=(0,r.useIsInitialized)(),{user:{isUserLoggedIn:d,isUserPremium:m,subscriptionTier:g}}=(0,u.useUser)(),[p,A]=(0,t.useState)(!1),[f,S]=(0,t.useState)(!1),C=m??!1,w=(0,s.getSubscriptionTierKey)(g),b=(0,i.useAtomValue)(o.userFirstNameAtom),h=(0,i.useAtomValue)(o.userGenderAtom),v=(0,i.useAtomValue)(l.wxuUserAnonymousIdAtom),y=(0,i.useAtomValue)(l.userHasLoggedInBeforeAtom),E=c.default?window?.DprSdk?.getUserConsent("sale-of-data")!==!1:void 0,k=c.default?window?.DprSdk?.getUserConsent("sensitive-data")!==!1:void 0,I=(0,n.getCookie)("subscription")??"",{productID:P=null,expirationDateTime:T=null,transactionDateTime:_=null,firstTransactionDateTime:D=null,autoRenew:O=null,price:R=null,productName:U=null}=(0,a.jwtDecoder)(I)||{},M=(0,t.useMemo)(()=>({premium:C,premiumProductTier:w,premiumExpiration:T,premiumStart:_,premiumFirstTransactionDate:D,premiumProductId:P,premiumProductAutoRenew:O,premiumPrice:R,premiumProductName:U,isRegisteredUser:d||y||!1,isLoggedIn:d,"Amplitude.device_id":v,$Gender:h,$FirstName:b,saleOfDataAuthorization:E,sensitiveDataAuthorization:k,devUser:!1}),[C,w,T,_,D,P,O,R,U,v,d,y,b,h,E,k]);(0,t.useEffect)(()=>{(0,a.areObjectValuesDefined)(M)&&!p&&A(!0)},[M,p]);let L=(0,t.useCallback)(()=>{for(let e in M)void 0===M[e]&&delete M[e];if(e&&p&&!f){let e=window.mParticle?.Identity?.getCurrentUser?.();if(!e)return void console.warn("MParticle: No current user");e.setUserAttributes(M),S(!0),console.debug("MParticle: User attributes set - ",M)}},[e,M,p,f]);return{userAttributes:M,setUserAttribute:(0,t.useCallback)((t,r)=>{if(!e)return void console.warn("MParticle is not initialized");let i=window.mParticle?.Identity?.getCurrentUser?.();i?(i.setUserAttribute(t,r),console.debug(`MParticle: User attribute set - ${t}`)):console.warn("MParticle: No current user")},[e]),setUserAttributes:L,removeUserAttribute:(0,t.useCallback)(t=>{if(!e)return void console.warn("MParticle is not initialized");let r=window.mParticle?.Identity?.getCurrentUser?.();r?(r.removeUserAttribute(t),console.debug(`MParticle: User attribute removed - ${t}`)):console.warn("MParticle: No current user")},[e])}}])},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])},663333,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["deviceClassAtom",0,t])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",0,t])},647872,494889,928083,624432,e=>{"use strict";var t=e.i(981030);(0,t.atom)({});let r=(0,t.atom)(!1);e.s(["newsHubEnabledAtom",0,r],494889);let i=(0,t.atom)(!1);e.s(["activityHubMenuEnabledAtom",0,i],928083);let a=(0,t.atom)(!1);e.s(["contentSearchUniversalAtom",0,a],624432),e.s([],647872)},849177,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["adsDisabledAtom",0,t])},458001,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["cscCountryCodeAtom",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")}])},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},21121,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["showVelvetcakeModuleAtom",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:a,page:s,onUpdateData:o,onSetPageData:n}){let{updateComponentData:l,setPageData:c}=(0,r.useDebugSystem)(),u=(0,t.useRef)(!1),d=o||l,m=n||c;return(0,t.useEffect)(()=>{if(a)return i.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(a),hasPerformance:!!a.performance,hasContext:!!a.context}),d(e,{...a,_collectedAt:new Date().toISOString()}),()=>{i.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,a,d]),(0,t.useEffect)(()=>{s&&!u.current&&(i.lifecycle("Setting page metadata",{title:s.title,assetName:s.assetName,collection:s.collection}),m({...s,_updatedAt:new Date().toISOString()}),u.current=!0)},[s,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,a]=(0,t.useAtom)(i),s=(0,r.useCallback)((e,t)=>{a(r=>{let i=r?.[e]||{},a="object"==typeof t&&null!==t&&"object"==typeof i?{...i,...t}:t;return{...r,[e]:a}})},[a]),o=(0,r.useCallback)((e,t)=>{a(r=>{let i=r||{timestamp:new Date().toISOString()},a=i.components||{};if(null===t){let t={...a};return delete t[e],{...i,components:t}}return{...i,components:{...a,[e]:t}}})},[a]),n=(0,r.useCallback)(e=>{s("page",e)},[s]),l=(0,r.useCallback)(e=>{s("route",e)},[s]),c=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&s(e,t)})},[s]);return{debugData:e,updateSection:s,updateComponentData:o,setPageData:n,clearAllDebugData:(0,r.useCallback)(()=>{a({timestamp:new Date().toISOString()})},[a]),updateRouteInfo:l,updatePageDebug:c}}],609858)},394481,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["privacyRegimeAtom",0,t])},313983,e=>{"use strict";var t,r=((t={}).ESSENTIAL_TECHNOLOGY="essential-technology",t.FUNCTIONAL_TECHNOLOGY="functional-technology",t.GEOGRAPHICALLY_RELEVANT_ADVERTISING="geographically-relevant-advertising",t.INTERNATIONAL_TRANSFER="international-transfer",t.SALE_OF_DATA="sale-of-data",t.SENSITIVE_DATA="sensitive-data",t.SELECT_PERSONALISED_CONTENT="Select personalised content",t.SELECT_PERSONALISED_ADS="Select personalised ads",t.SELECT_BASIC_ADS="Select basic ads",t.CREATE_A_PERSONALISED_ADS_PROFILE="Create a personalised ads profile",t.CREATE_A_PERSONALISED_CONTENT_PROFILE="Create a personalised content profile",t.MEASURE_AD_PERFORMANCE="Measure ad performance",t.APPLY_MARKET_RESEARCH_TO_GENERATE_AUDIENCE_INSIGHTS="Apply market research to generate audience insights",t.DEVELOP_AND_IMPROVE_PRODUCTS="Develop and improve products",t.STORE_AND_OR_ACCESS_INFORMATION_ON_A_DEVICE="Store and/or access information on a device",t.MEASURE_CONTENT_PERFORMANCE="Measure content performance",t);e.s(["Purpose",()=>r])},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 a={"usa-ut":"usa"},s=e=>e?a[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 s(t.slice(e+1))}})()??s((0,r.getCookie)("twc-privacy")?.toString())??"exempt"])},7150,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["pushlyPromptSuppressedAtom",0,t])},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])},382602,e=>{"use strict";var t=e.i(981030),r=e.i(889753);let i=(0,t.atom)(e=>e(r.userProfileAtom)?.email),a=(0,t.atom)(e=>e(r.userProfileAtom)?.firstName),s=(0,t.atom)(e=>e(r.userProfileAtom)?.gender);(0,t.atom)(e=>e(r.userProfileAtom)?.emailVerified),e.s(["userEmailAtom",0,i,"userFirstNameAtom",0,a,"userGenderAtom",0,s])},739971,e=>{"use strict";let t=(0,e.i(981030).atom)(null);e.s(["subscriptionsEnabledAtom",0,t])},249725,e=>{"use strict";var t=e.i(546446),r=e.i(247865),i=e.i(726249),a=e.i(310847);let s=Object.freeze({});function o(){let e=(0,t.useSetAtom)(a.wxuUserLocationFeatureIdsAtom);return(0,r.useCallback)((t,r)=>{let a=[];t.placeId&&a.push(t.placeId),t.geocode&&!r?.startsWith("address.")&&a.push((0,i.formatGeocode)(t.geocode)),0!==a.length&&e(e=>{let t=e??{};if(!a.some(e=>!(e in t)||t[e]!==r))return t;let i={...t};for(let e of a)i[e]=r;return i})},[e])}e.s(["useLocationFeatureIds",0,function(){let e=(0,t.useAtomValue)(a.wxuUserLocationFeatureIdsAtom)??s,n=(0,r.useCallback)(t=>{if(t.placeId){let r=e[t.placeId];if(r)return r}if(t.geocode){let r=e[(0,i.formatGeocode)(t.geocode)];if(r)return r}},[e]),l=(0,r.useCallback)(t=>t in e,[e]);return{featureIds:e,resolveFeatureId:n,hasResolvedPlaceId:l,recordFeatureId:o()}},"useRecordFeatureId",0,o])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),a=e.i(901351),s=e.i(310847),o=e.i(528600),n=e.i(617874),l=e.i(540768),c=e.i(553329),u=e.i(247865),d=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,u.useCallback)(async r=>{if(!t)return!1;let{error:i}=await (0,c.tryCatch)(a.upsxClient.preference.updateMapSettings(e,r));if(!i)return!0;if(i instanceof d.APIError&&404===i.code){let{error:t}=await (0,c.tryCatch)(a.upsxClient.preference.createMapSettings(e,r));return!t||(m.warn("Failed to create map settings",t),!1)}return m.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),[m,g]=(0,t.useAtom)(s.wxuUserPreferenceAtom),p=async()=>{let{data:e,error:t}=await (0,c.tryCatch)(a.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:i,opacity:s,roadOverlay:o,style:n}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==s&&{opacity:s},...void 0!==o&&{roadOverlay:o},...void 0!==n&&{style:n}};return Object.keys(l).length>0?l:null},A=async e=>{try{await a.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},f=async(t,r=!0)=>{try{let i,a=(i={...u,...t},d(i),g({...m,...t,locations:i.locations}),i);if(t?.unit){let e=(0,n.unitsSystemByName)(t.unit),r=e?.code||"e";(0,l.setCookie)(n.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await A(a),{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(),p()]);if(!e?.userID)return null;let{mapSettings:r,...s}=e,o={...s,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...t}};return f(o,!1),o}catch{return null}},updatePreferences:f}}],776169)},145651,579310,e=>{"use strict";var t=e.i(546446),r=e.i(776169),i=e.i(981030),a=e.i(889753);let s=(0,e.i(174960).focusAtom)(a.userPreferencesAtom,e=>e.prop("locations")),o=(0,i.atom)(e=>e(a.userPreferencesAtom)?.locations||[]);(0,i.atom)(e=>{let t=e(o);return t?.find(e=>0===e.position)||t?.[0]||null}),(0,i.atom)(e=>(e(o)?.length||0)>0),e.s(["userLocationsAtom",0,s,"userLocationsGetAtom",0,o],579310);var n=e.i(310847),l=e.i(247865);let c=Object.freeze([]),u=Object.freeze([]);e.s(["default",0,()=>{let{updatePreferences:e}=(0,r.usePreferences)(),i=(0,t.useAtomValue)(s),a=(0,l.useMemo)(()=>i?[...i].sort((e,t)=>e.position-t.position):c,[i]),[o,d]=(0,t.useAtom)(n.wxuUserRecentLocationsAtom),[,m]=(0,t.useAtom)(n.wxuUserRecentAddressesAtom),g=(0,l.useCallback)(t=>{let r={...t,position:Math.max(...a.map(e=>e.position),0)+1};e({locations:[...a,r]})},[a,e]),p=(0,l.useCallback)(t=>{e({locations:a.filter(e=>e.placeID!==t)})},[a,e]),A=(0,l.useCallback)(e=>{d(t=>[e,...(t||[]).filter(t=>t!==e)].slice(0,5))},[d]),f=(0,l.useCallback)(e=>{d(t=>(t||[]).filter(t=>t!==e))},[d]),S=(0,l.useCallback)(()=>{d([])},[d]),C=(0,l.useCallback)(e=>{m(t=>(t||[]).filter(t=>t.placeId!==e))},[m]),w=(0,l.useCallback)(e=>{p(e),f(e),C(e)},[p,f,C]);return{addFavoriteLocation:g,removeFavoriteLocation:p,addRecentLocation:A,removeRecentLocation:f,removeRecentAddress:C,clearRecentLocations:S,deleteLocation:w,recentLocations:o||u,favoriteLocations:a}}],145651)},160317,e=>{"use strict";var t=e.i(543512);e.s(["getSubscriptionTierKey",0,function(e){return t.UserSubscriptionTierKeysMap[e]??t.UserSubscriptionTierKeysMap[t.UserSubscriptionTiers.none]}])},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.s(["hasLength",0,e=>Array.isArray(e)&&e.length>0])}]);