(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),n=e.i(394481),o=e.i(663333),a=e.i(849177),s=e.i(889753),l=e.i(5397),u=e.i(21121);e.i(647872);var c=e.i(494889),d=e.i(928083),m=e.i(624432),p=e.i(739971),g=e.i(688070),f=e.i(647292);e.s(["FlagsBoundaryClient",0,({params:e})=>((0,t.useRehydrateAtoms)([[r.partnerAtom,e.partner],[i.cscCountryCodeAtom,e.cscCountryCode],[n.privacyRegimeAtom,e.privacyRegime],[o.deviceClassAtom,e.deviceClass],[s.userTierAtom,e.userTier],[a.adsDisabledAtom,e.adsDisabled],[l.showAdminHeaderAtom,e.showAdminHeader],[u.showVelvetcakeModuleAtom,e.showVelvetcakeModule],[c.newsHubEnabledAtom,e.newsHubEnabled],[d.activityHubMenuEnabledAtom,e.activityHubMenuEnabled],[m.contentSearchUniversalAtom,e.contentSearchUniversal],[p.subscriptionsEnabledAtom,e.subscriptionsEnabled],[f.webViewPlatformAtom,e.webViewPlatform],[g.isWebViewOnlyAtom,e.isWebViewOnly]]),null)])},147732,e=>{"use strict";e.s(["debounce",0,function(e,t,{signal:r,edges:i}={}){let n,o=null,a=null!=i&&i.includes("leading"),s=null==i||i.includes("trailing"),l=()=>{null!==o&&(e.apply(n,o),n=void 0,o=null)},u=null,c=()=>{null!=u&&clearTimeout(u),u=setTimeout(()=>{u=null,s&&l(),d()},t)},d=()=>{null!==u&&(clearTimeout(u),u=null),n=void 0,o=null},m=function(...e){if(r?.aborted)return;n=this,o=e;let t=null==u;c(),a&&t&&l()};return m.schedule=c,m.cancel=d,m.flush=()=>{l()},r?.addEventListener("abort",d,{once:!0}),m}])},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 n;let o,a=(0,t.useStore)(i),s=(n=a,(o=r.get(n))||(o=new WeakSet,r.set(n,o)),o);for(let[t,...r]of e)(!s.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(s.add(t),a.set(t,...r))}])},232598,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={callServer:function(){return o.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let o=e.r(276247),a=e.r(788443),s=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),n=e.i(546446),o=e.i(540768),a=e.i(682142),s=e.i(782937),l=e.i(695881),u=e.i(333350),c=e.i(64412),d=e.i(950771),m=e.i(537989),p=e.i(695203),g=e.i(158662),f=e.i(358273),A=e.i(122124),S=e.i(777638),w=e.i(924776),y=e.i(409628),v=e.i(605781);let E=(0,l.createLogger)("useTrackString");e.s(["useTrackString",0,()=>{let e=(0,n.useAtomValue)(m.pageIdAtom),t=(0,n.useAtomValue)(d.pageLocaleAtom),l=(0,n.useAtomValue)(p.deviceClassAtom),C=(0,n.useAtomValue)(g.experimentJoinListAtom),h=(0,i.usePathname)(),{location:b}=(0,c.useLocation)(),k=(0,w.useIsHightouchReady)(),I=(0,r.useCallback)(r=>{let i=(0,a.getCICookie)(),n=i?.["TWC-GeoIP-Country"]??(0,o.getCookie)("twc-location-country"),u=i?.["TWC-GeoIP-Region"]??(0,o.getCookie)("twc-location-region"),c=i?.["TWC-Privacy"]??(0,o.getCookie)("twc-privacy"),d=window.DprSdk?.getGdprConsentOptInsString()??"",m=window.DprSdk?.getCcpaSaleOptInString()??"",p=window.navigator?.globalPrivacyControl??!1,g=d?.includes("functional-technology")??!1,w=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,v=window.DprSdk?.getUserConsent("interest-based-ads")!==!1,E=String(window.DprSdk?.getUserConsent("sale-of-data")!==!1),k=String(window.DprSdk?.getUserConsent("sensitive-data")!==!1),I=navigator?.cookieEnabled??!1,x=(0,o.getCookie)("partner")||"",_=(0,s.getPartnerByPattern)(x)??x,P=(0,f.getMetricsSession)(),T=P?.sessionId||"",D=new Date(P?.sessionStartTime||0).toISOString(),O=new Date,R=O.getHours(),V=y.WEEK_DAYS[O.getDay()]??"",M="article"===e||"video"===e?(0,A.stripLastPartOfSlug)(h??""):(0,A.getAnonymizedPath)(h??"");return{trackString:r,pageId:e??"",schemaVersion:"nextgen",url:M,referrer:document.referrer,locale:t,deviceClass:l,partner:_,sessionId:T,sessionStartTime:D,siteMode:"normal",dayOfWeek:V,hourOfDay:R,regime:c??"",cookiesEnabled:I,gpcSignalOptOut:p,functionalTechnologies:g,geographicallyRelevantAds:w,interestBasedAds:v,priv:d,privProducts:m,saleOfData:E,saleOfDataAuthorization:E,sensitiveDataAuthorization:k,campaign:(0,S.getCampaign)(),experimentJoinList:C,weatherMode:"normal",physicalCountry:n??"",physicalState:u??"",wlocCity:b?.city??null,wlocCountry:b?.countryCode??null,wlocState:b?.adminDistrictCode??null,wlocDMA:b?.dmaCd??null,samsungVersion:(0,S.getSamsungVersion)(),appVersion:"b1f2a8b9d69b0e3e05fe6d294ee6a35cce1a3921".slice(0,10)}},[e,t,l,C,h,b]);return(0,r.useCallback)(e=>{if(u.default&&e){if(!k)return void E.warn('Hightouch: Event "track-string" skipped - SDK not ready');try{(0,v.trackTrackString)(I(e)),E.info('Hightouch: Event "track-string" tracked',{trackString:e})}catch(e){E.error('Hightouch: Event "track-string" failed',{error:e})}}},[k,I])}],723469)},797770,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["adsMetricsUnitAndZoneAtom",0,t])},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)},688070,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["isWebViewOnlyAtom",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])},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),n=e.i(540768),o=e.i(682142),a=e.i(782937),s=e.i(695881),l=e.i(333350),u=e.i(64412),c=e.i(950771),d=e.i(537989),m=e.i(695203),p=e.i(158662),g=e.i(358273),f=e.i(122124),A=e.i(777638),S=e.i(924776),w=e.i(409628),y=e.i(605781);let v=(0,s.createLogger)("useTrackAssetViewed"),E=[],C=null;function h(e){try{(0,y.trackAssetViewed)(e),v.info(`Hightouch: Event "asset-viewed" tracked - ${e.contentId}`)}catch(e){v.error('Hightouch: Event "asset-viewed" failed',e)}}e.s(["trackHightouchAssetViewed",0,function(e){try{C?.(e)}catch(e){v.error('Hightouch: Event "asset-viewed" failed',e)}},"useRegisterAssetViewedTracker",0,()=>{let e=(()=>{let e=(0,r.usePathname)(),s=(0,i.useAtomValue)(d.pageIdAtom),y=(0,i.useAtomValue)(c.pageLocaleAtom),v=(0,i.useAtomValue)(m.deviceClassAtom),C=(0,i.useAtomValue)(p.experimentJoinListAtom),{location:b}=(0,u.useLocation)(),k=(0,S.useIsHightouchReady)(),I=(0,t.useCallback)(({moduleId:t,contentId:r,assetMediaType:i,title:l,pos:u,tagsKeyword:c})=>{let d=(0,o.getCICookie)(),m=d?.["TWC-GeoIP-Country"]??(0,n.getCookie)("twc-location-country"),p=d?.["TWC-GeoIP-Region"]??(0,n.getCookie)("twc-location-region"),S=d?.["TWC-Privacy"]??(0,n.getCookie)("twc-privacy"),E=window.DprSdk?.getGdprConsentOptInsString()??"",h=window.DprSdk?.getCcpaSaleOptInString()??"",k=window.navigator?.globalPrivacyControl??!1,I=E?.includes("functional-technology")??!1,x=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,_=window.DprSdk?.getUserConsent("interest-based-ads")!==!1,P=navigator?.cookieEnabled??!1,T=(0,n.getCookie)("partner")||"",D=(0,a.getPartnerByPattern)(T)??T,O=(0,g.getMetricsSession)(),R=O?.sessionId||"",V=new Date(O?.sessionStartTime||0).toISOString(),M=new Date,L=M.getHours(),N=w.WEEK_DAYS[M.getDay()]??"",U="article"===s||"video"===s?(0,f.stripLastPartOfSlug)(e??""):(0,f.getAnonymizedPath)(e??"");return{moduleId:t,contentId:r,assetMediaType:i,title:l,pos:String(u),tagsKeyword:c??null,pageId:s??"",url:U,referrer:document.referrer,locale:y,deviceClass:v,partner:D,sessionId:R,sessionStartTime:V,siteMode:"normal",dayOfWeek:N,hourOfDay:L,regime:S??"",cookiesEnabled:P,gpcSignalOptOut:k,functionalTechnologies:I,geographicallyRelevantAds:x,interestBasedAds:_,priv:E,privProducts:h,campaign:(0,A.getCampaign)(),experimentJoinList:C,weatherMode:"normal",physicalCountry:m??"",physicalState:p??"",wlocCity:b?.city??null,wlocCountry:b?.countryCode??null,wlocState:b?.adminDistrictCode??null,wlocDMA:b?.dmaCd??null,samsungVersion:(0,A.getSamsungVersion)(),appVersion:"b1f2a8b9d69b0e3e05fe6d294ee6a35cce1a3921".slice(0,10)}},[e,s,y,v,C,b]);return(0,t.useEffect)(()=>{if(!k||0===E.length)return;let e=E;E=[],e.forEach(h)},[k]),(0,t.useCallback)(e=>{if(!l.default)return;let t=I(e);k?h(t):E.push(t)},[k,I])})();(0,t.useEffect)(()=>(C=e,()=>{C===e&&(C=null)}),[e])}])},328343,680810,562209,e=>{"use strict";var t=e.i(247865),r=e.i(546446),i=e.i(737801),n=e.i(688070);e.s(["useEnrolledInExperimentEvent",0,()=>{let e=(0,i.useEventAttributes)(),o=(0,r.useAtomValue)(n.isWebViewOnlyAtom);return(0,t.useCallback)((t,r={})=>{if(o)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,o])}],328343);var o=e.i(288906),a=e.i(540768),s=e.i(682142),l=e.i(782937),u=e.i(695881),c=e.i(333350),d=e.i(64412),m=e.i(950771),p=e.i(537989),g=e.i(695203),f=e.i(358273),A=e.i(777638),S=e.i(924776),w=e.i(409628),y=e.i(605781);let v=(0,u.createLogger)("useTrackEnrolledInExperiment"),E=[];function C(e){try{(0,y.trackEnrolledInExperiment)(e),v.info(`Hightouch: Event "enrolled-in-experiment" tracked - ${e.newExperiment}:${e.newVariant}`)}catch(e){v.error("Hightouch: Failed to track enrolled-in-experiment",e)}}e.s(["useTrackEnrolledInExperiment",0,()=>{let e=(0,r.useAtomValue)(p.pageIdAtom),i=(0,r.useAtomValue)(m.pageLocaleAtom),o=(0,r.useAtomValue)(g.deviceClassAtom),u=(0,r.useAtomValue)(n.isWebViewOnlyAtom),{location:y}=(0,d.useLocation)(),v=(0,S.useIsHightouchReady)(),h=(0,t.useCallback)((t,r)=>{let n=(0,s.getCICookie)(),u=n?.["TWC-GeoIP-Country"]??(0,a.getCookie)("twc-location-country"),c=n?.["TWC-GeoIP-Region"]??(0,a.getCookie)("twc-location-region"),d=n?.["TWC-Privacy"]??(0,a.getCookie)("twc-privacy"),m=window.DprSdk?.getGdprConsentOptInsString()??"",p=window.DprSdk?.getCcpaSaleOptInString()??"",g=window.navigator?.globalPrivacyControl??!1,S=m?.includes("functional-technology")??!1,v=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,E=navigator?.cookieEnabled??!1,C=(0,a.getCookie)("partner")||"",h=(0,l.getPartnerByPattern)(C)??C,b=(0,f.getMetricsSession)(),k=b?.sessionId||"",I=b?.sessionStartTime||0,x=new Date,_=x.getHours(),P=w.WEEK_DAYS[x.getDay()]??"",T=-x.getTimezoneOffset()/60;return{newExperiment:t.flag_key,newVariant:t.variant||"",newExperimentReceivedAt:Date.now(),experimentJoinList:r,pageId:e??"",referrer:document.referrer,locale:i,deviceClass:o,partner:h,sessionId:k,sessionStartTime:I,dayOfWeek:P,hourOfDay:_,deviceTimeZone:T,regime:d??"",cookiesEnabled:E,gpcSignalOptOut:g,functionalTechnologies:S,geographicallyRelevantAds:v,priv:m,privProducts:p,campaign:(0,A.getCampaign)()??void 0,weatherMode:"normal",physicalCountry:u??"",physicalState:c??"",wlocCity:y?.city??null,wlocCountry:y?.countryCode??null,wlocState:y?.adminDistrictCode??null,wlocDMA:y?.dmaCd??null,samsungVersion:(0,A.getSamsungVersion)(),appVersion:"b1f2a8b9d69b0e3e05fe6d294ee6a35cce1a3921".slice(0,10)}},[e,i,o,y]);return(0,t.useEffect)(()=>{if(!v||0===E.length)return;let e=E;E=[],e.forEach(C)},[v]),(0,t.useCallback)((e,t)=>{if(!c.default||u||!e.experiment_key)return;let r=h(e,t);v?C(r):E.push(r)},[v,u,h])}],680810);var h=e.i(553329);let b="production"!==o.default.env.VERCEL_TARGET_ENV,k=new Set;e.s(["resetTrackedExposures",0,function(){k.clear()},"trackAmplitudeExposure",0,function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){b&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){b&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let i=`${e.flag_key}::${e.variant??""}`;if(k.has(i)){b&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${i}`);return}k.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:b?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,h.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}`):b&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}],562209)},915044,e=>{"use strict";e.i(288906);var t=e.i(247865),r=e.i(947118),i=e.i(546446),n=e.i(293163),o=e.i(160317),a=e.i(382602),s=e.i(540768),l=e.i(310847),u=e.i(333350),c=e.i(528600);e.s(["useUserAttributes",0,()=>{let e=(0,r.useIsInitialized)(),{user:{isUserLoggedIn:d,isUserPremium:m,subscriptionTier:p}}=(0,c.useUser)(),[g,f]=(0,t.useState)(!1),[A,S]=(0,t.useState)(!1),w=m??!1,y=(0,o.getSubscriptionTierKey)(p),v=(0,i.useAtomValue)(a.userFirstNameAtom),E=(0,i.useAtomValue)(a.userGenderAtom),C=(0,i.useAtomValue)(l.wxuUserAnonymousIdAtom),h=(0,i.useAtomValue)(l.userHasLoggedInBeforeAtom),b=u.default?window?.DprSdk?.getUserConsent("sale-of-data")!==!1:void 0,k=u.default?window?.DprSdk?.getUserConsent("sensitive-data")!==!1:void 0,I=(0,s.getCookie)("subscription")??"",{productID:x=null,expirationDateTime:_=null,transactionDateTime:P=null,firstTransactionDateTime:T=null,autoRenew:D=null,price:O=null,productName:R=null}=(0,n.jwtDecoder)(I)||{},V=(0,t.useMemo)(()=>({premium:w,premiumProductTier:y,premiumExpiration:_,premiumStart:P,premiumFirstTransactionDate:T,premiumProductId:x,premiumProductAutoRenew:D,premiumPrice:O,premiumProductName:R,isRegisteredUser:d||h||!1,isLoggedIn:d,"Amplitude.device_id":C,$Gender:E,$FirstName:v,saleOfDataAuthorization:b,sensitiveDataAuthorization:k,devUser:!1}),[w,y,_,P,T,x,D,O,R,C,d,h,v,E,b,k]);(0,t.useEffect)(()=>{(0,n.areObjectValuesDefined)(V)&&!g&&f(!0)},[V,g]);let M=(0,t.useCallback)(()=>{for(let e in V)void 0===V[e]&&delete V[e];if(e&&g&&!A){let e=window.mParticle?.Identity?.getCurrentUser?.();if(!e)return void console.warn("MParticle: No current user");e.setUserAttributes(V),S(!0),console.debug("MParticle: User attributes set - ",V)}},[e,V,g,A]);return{userAttributes:V,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:M,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])},742436,e=>{"use strict";e.s(["ExperimentContext",()=>f,"ExperimentProvider",()=>A,"default",()=>w,"useExperimentContext",()=>S],742436);var t=e.i(288906),r=e.i(902875),i=e.i(247865),n=e.i(533760),o=e.i(333350),a=e.i(546446),s=e.i(328343),l=e.i(680810),u=e.i(158662),c=e.i(528600),d=e.i(562209),m=e.i(283366);let p="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",g="production"!==t.default.env.VERCEL_TARGET_ENV,f=(0,i.createContext)(null),A=({children:e,scriptSrc:t})=>{let A=(0,s.useEnrolledInExperimentEvent)(),S=(0,l.useTrackEnrolledInExperiment)(),w=(0,a.useSetAtom)(u.experimentJoinListAtom),{user:y}=(0,c.useUser)(),[v,E]=(0,i.useState)(!1),[C,h]=(0,i.useState)(!1),[,b]=(0,i.useState)(0),k=(0,i.useRef)(void 0),I=(0,i.useRef)(void 0);k.current=y.userID||void 0,I.current=y.anonId||void 0;let x=(0,i.useRef)(new Set),_=(0,i.useRef)({}),P=function(e,t){let r=(0,i.useRef)(null),[n,a]=(0,i.useState)(!1),s=(0,i.useRef)(e);return s.current=e,(0,i.useEffect)(()=>{if(!n&&o.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:g,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:e=>{try{s.current(e),g&&console.debug("[Experiment] Exposure tracked:",e)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}}},source:"localStorage"}),a(!0),g&&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,m.getExposureVariantOverride)(e.flag_key),r=void 0!==t?{...e,variant:t}:e,i=`${r.flag_key}::${r.variant??""}`;if(x.current.has(i))return;x.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&&(_.current={..._.current,[r.flag_key]:n},w(JSON.stringify(Object.values(_.current))),(0,m.writeJoinListEntry)(r.flag_key,n)),A(r),(0,d.trackAmplitudeExposure)({exposure:r,userId:k.current,deviceId:I.current});let o=Object.values(_.current);S(r,o.length>0?JSON.stringify(o):null)},[A,S,w]),v);return(0,i.useEffect)(()=>{(async()=>{if(!P)return;let e=y.anonId;if(!e&&!y.userID){g&&console.debug("[Experiment] No user identifier available"),h(!0);return}let t={device_id:e,...y.userID?{user_id:y.userID}:{},user_properties:{}};g&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await P.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{h(!0)}})()},[P,y.anonId,y.userID]),(0,i.useEffect)(()=>{x.current.clear(),(0,d.resetTrackedExposures)(),(0,m.resetExposures)(),_.current={},w(null),b(e=>e+1);let e=(0,m.readJoinListEntries)();Object.keys(e).length>0&&(_.current=e,w(JSON.stringify(Object.values(e))))},[y.userID,w]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t,strategy:"afterInteractive",onLoad:()=>{E(!0),g&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(f.Provider,{value:{client:P,variant:(e,t)=>{if(!P)return t;let r=P.variant(e,t);return g&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!P)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 P.fetch(t)}}return P.fetch(e)},isFetchComplete:C},children:e})]})},S=()=>{let e=(0,i.useContext)(f);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},w=A},283366,e=>{"use strict";e.s(["getExposureVariantOverride",()=>y,"readJoinListEntries",()=>g,"resetExposures",()=>v,"useExposure",()=>E,"writeJoinListEntry",()=>f]);var t=e.i(247865),r=e.i(695881),i=e.i(333350),n=e.i(358273),o=e.i(742436);let a=(0,r.createLogger)("useExposure"),s="wxu-exp-exposed:",l=new Set,u=()=>{try{return(0,n.getMetricsSession)()?.sessionId||null}catch{return null}},c=(e,t)=>{for(let r=localStorage.length-1;r>=0;r--){let i=localStorage.key(r);i?.startsWith(e)&&i!==e+t&&localStorage.removeItem(i)}},d=e=>{try{let t=localStorage.getItem(s+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},m=(e,t)=>{try{c(s,e),localStorage.setItem(s+e,JSON.stringify([...t]))}catch{}},p="wxu-exp-joinlist:",g=()=>{let e=u();if(!e)return{};try{let t=localStorage.getItem(p+e);return t?JSON.parse(t):{}}catch{return{}}},f=(e,t)=>{let r=u();if(r)try{c(p,r);let i=g();localStorage.setItem(p+r,JSON.stringify({...i,[e]:t}))}catch{}},A=e=>{if(0===l.size)return;let t=d(e);for(let e of l)t.add(e);m(e,t),l.clear()},S=e=>{let t=u();return t?(A(t),d(t).has(e)):l.has(e)},w=new Map;function y(e){return w.get(e)}function v(){l.clear(),w.clear();let e=u();if(e)try{localStorage.removeItem(s+e)}catch{}}function E(e,r){let n=void 0!==r,s=r?.variant,c=(0,t.useContext)(o.ExperimentContext);(0,t.useEffect)(()=>{if(!i.default||!c||S(e)||n&&void 0===s)return;let{client:t}=c;if(!t)return;let r=()=>{if(!S(e)){(e=>{let t=u();if(!t)return l.add(e);A(t);let r=d(t);r.add(e),m(t,r)})(e),void 0!==s&&w.set(e,s);try{t.exposure(e)}catch(e){a.error("Failed to track exposure:",e)}}};window.mParticle?.isInitialized?.()?r():window.mParticle?.ready?.(r)},[c,e,n,s])}},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 n=(0,t.atom)(!1);e.s(["contentSearchUniversalAtom",0,n],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:n,page:o,onUpdateData:a,onSetPageData:s}){let{updateComponentData:l,setPageData:u}=(0,r.useDebugSystem)(),c=(0,t.useRef)(!1),d=a||l,m=s||u;return(0,t.useEffect)(()=>{if(n)return i.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(n),hasPerformance:!!n.performance,hasContext:!!n.context}),d(e,{...n,_collectedAt:new Date().toISOString()}),()=>{i.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,n,d]),(0,t.useEffect)(()=>{o&&!c.current&&(i.lifecycle("Setting page metadata",{title:o.title,assetName:o.assetName,collection:o.collection}),m({...o,_updatedAt:new Date().toISOString()}),c.current=!0)},[o,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,n]=(0,t.useAtom)(i),o=(0,r.useCallback)((e,t)=>{n(r=>{let i=r?.[e]||{},n="object"==typeof t&&null!==t&&"object"==typeof i?{...i,...t}:t;return{...r,[e]:n}})},[n]),a=(0,r.useCallback)((e,t)=>{n(r=>{let i=r||{timestamp:new Date().toISOString()},n=i.components||{};if(null===t){let t={...n};return delete t[e],{...i,components:t}}return{...i,components:{...n,[e]:t}}})},[n]),s=(0,r.useCallback)(e=>{o("page",e)},[o]),l=(0,r.useCallback)(e=>{o("route",e)},[o]),u=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&o(e,t)})},[o]);return{debugData:e,updateSection:o,updateComponentData:a,setPageData:s,clearAllDebugData:(0,r.useCallback)(()=>{n({timestamp:new Date().toISOString()})},[n]),updateRouteInfo:l,updatePageDebug:u}}],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 n={"usa-ut":"usa"},o=e=>e?n[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 o(t.slice(e+1))}})()??o((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),n=(0,t.atom)(e=>e(r.userProfileAtom)?.firstName),o=(0,t.atom)(e=>e(r.userProfileAtom)?.gender);(0,t.atom)(e=>e(r.userProfileAtom)?.emailVerified),e.s(["userEmailAtom",0,i,"userFirstNameAtom",0,n,"userGenderAtom",0,o])},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),n=e.i(310847);let o=Object.freeze({});function a(){let e=(0,t.useSetAtom)(n.wxuUserLocationFeatureIdsAtom);return(0,r.useCallback)((t,r)=>{let n=[];t.placeId&&n.push(t.placeId),t.geocode&&!r?.startsWith("address.")&&n.push((0,i.formatGeocode)(t.geocode)),0!==n.length&&e(e=>{let t=e??{};if(!n.some(e=>!(e in t)||t[e]!==r))return t;let i={...t};for(let e of n)i[e]=r;return i})},[e])}e.s(["useLocationFeatureIds",0,function(){let e=(0,t.useAtomValue)(n.wxuUserLocationFeatureIdsAtom)??o,s=(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:s,hasResolvedPlaceId:l,recordFeatureId:a()}},"useRecordFeatureId",0,a])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),i=e.i(301904),n=e.i(901351),o=e.i(310847),a=e.i(528600),s=e.i(617874),l=e.i(540768),u=e.i(553329),c=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,a.useUser)();return{saveMapSettings:(0,c.useCallback)(async r=>{if(!t)return!1;let{error:i}=await (0,u.tryCatch)(n.upsxClient.preference.updateMapSettings(e,r));if(!i)return!0;if(i instanceof d.APIError&&404===i.code){let{error:t}=await (0,u.tryCatch)(n.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,a.useUser)(),[c,d]=(0,t.useAtom)(r.userPreferencesAtom),[m,p]=(0,t.useAtom)(o.wxuUserPreferenceAtom),g=async()=>{let{data:e,error:t}=await (0,u.tryCatch)(n.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:i,opacity:o,roadOverlay:a,style:s}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==i&&{autoplay:i},...void 0!==o&&{opacity:o},...void 0!==a&&{roadOverlay:a},...void 0!==s&&{style:s}};return Object.keys(l).length>0?l:null},f=async e=>{try{await n.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,n=(i={...c,...t},d(i),p({...m,...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 f(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(),g()]);if(!e?.userID)return null;let{mapSettings:r,...o}=e,a={...o,mapSettings:{...i.DEFAULT_MAP_SETTINGS,...t}};return A(a,!1),a}catch{return null}},updatePreferences:A}}],776169)},145651,579310,e=>{"use strict";var t=e.i(546446),r=e.i(776169),i=e.i(981030),n=e.i(889753);let o=(0,e.i(174960).focusAtom)(n.userPreferencesAtom,e=>e.prop("locations")),a=(0,i.atom)(e=>e(n.userPreferencesAtom)?.locations||[]);(0,i.atom)(e=>{let t=e(a);return t?.find(e=>0===e.position)||t?.[0]||null}),(0,i.atom)(e=>(e(a)?.length||0)>0),e.s(["userLocationsAtom",0,o,"userLocationsGetAtom",0,a],579310);var s=e.i(310847),l=e.i(247865);let u=Object.freeze([]),c=Object.freeze([]);e.s(["default",0,()=>{let{updatePreferences:e}=(0,r.usePreferences)(),i=(0,t.useAtomValue)(o),n=(0,l.useMemo)(()=>i?[...i].sort((e,t)=>e.position-t.position):u,[i]),[a,d]=(0,t.useAtom)(s.wxuUserRecentLocationsAtom),[,m]=(0,t.useAtom)(s.wxuUserRecentAddressesAtom),p=(0,l.useCallback)(t=>{let r={...t,position:Math.max(...n.map(e=>e.position),0)+1};e({locations:[...n,r]})},[n,e]),g=(0,l.useCallback)(t=>{e({locations:n.filter(e=>e.placeID!==t)})},[n,e]),f=(0,l.useCallback)(e=>{d(t=>[e,...(t||[]).filter(t=>t!==e)].slice(0,5))},[d]),A=(0,l.useCallback)(e=>{d(t=>(t||[]).filter(t=>t!==e))},[d]),S=(0,l.useCallback)(()=>{d([])},[d]),w=(0,l.useCallback)(e=>{m(t=>(t||[]).filter(t=>t.placeId!==e))},[m]),y=(0,l.useCallback)(e=>{g(e),A(e),w(e)},[g,A,w]);return{addFavoriteLocation:p,removeFavoriteLocation:g,addRecentLocation:f,removeRecentLocation:A,removeRecentAddress:w,clearRecentLocations:S,deleteLocation:y,recentLocations:a||c,favoriteLocations:n}}],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])},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 n=(0,i.useStore)(),o=(0,t.useRef)(e);o.current=e,(0,t.useEffect)(()=>{for(let[e,t]of o.current)n.get(e)!==t&&n.set(e,t)})}])}]);