(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 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)},752496,e=>{"use strict";var t=e.i(592121),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}])},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 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))}])},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])},185312,(e,t,r)=>{t.exports=e.r(16129)},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")}`}},i=Symbol((r.env?r.env.MODE:void 0)!=="production"?"RESET":""),n=e=>"function"==typeof(null==e?void 0:e.then);function o(e=()=>{try{return window.localStorage}catch(e){(r.env?r.env.MODE:void 0)!=="production"&&"u">typeof window&&console.warn(e);return}},t){var i;let a,s,l,u,c={getItem:(r,i)=>{var o,l;let u=e=>{if(a!==(e=e||"")){try{s=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return i}a=e}return s},c=null!=(l=null==(o=e())?void 0:o.getItem(r))?l:null;return n(c)?c.then(u):u(c)},setItem:(r,i)=>{var n;return null==(n=e())?void 0:n.setItem(r,JSON.stringify(i,null==t?void 0:t.replacer))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};try{l=null==(i=e())?void 0:i.subscribe}catch(e){}return!l&&"u">typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(l=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};let i=i=>{i.storageArea===e()&&i.key===t&&r(i.newValue)};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}}),l&&(u=l,c.subscribe=(e,t,r)=>u(e,e=>{let i;try{i=JSON.parse(e||"")}catch(e){i=r}t(i)})),c}let a=o(),s=new WeakMap,l={state:"loading"};e.s(["RESET",0,i,"atomWithStorage",0,function(e,o,s=a,l){let u=null==l?void 0:l.getOnInit,c=(0,t.atom)(u?s.getItem(e,o):o);return(r.env?r.env.MODE:void 0)!=="production"&&(c.debugPrivate=!0),c.onMount=t=>{let r;return t(s.getItem(e,o)),s.subscribe&&(r=s.subscribe(e,t,o)),r},(0,t.atom)(e=>e(c),(t,r,a)=>{let l="function"==typeof a?a(t(c)):a;return l===i?(r(c,o),s.removeItem(e)):n(l)?l.then(t=>(r(c,t),s.setItem(e,t))):(r(c,l),s.setItem(e,l))})},"createJSONStorage",0,o,"loadable",0,function(e){let i;return i=()=>{let i=new WeakMap,n=(0,t.atom)([()=>{},0]);n.unstable_onInit=e=>{e.set(n,([,t])=>[()=>e.set(n,([e,t])=>[e,t+1]),t])},(r.env?r.env.MODE:void 0)!=="production"&&(n.debugPrivate=!0);let o=(0,t.atom)(t=>{let r,o,[a]=t(n);try{r=t(e)}catch(e){return{state:"hasError",error:e}}if("function"!=typeof(null==(o=r)?void 0:o.then))return{state:"hasData",data:r};let s=r,u=i.get(s);return u?u:(s.then(e=>{i.set(s,{state:"hasData",data:e}),a()},e=>{i.set(s,{state:"hasError",error:e}),a()}),i.get(s)||(i.set(s,l),l))});return(r.env?r.env.MODE:void 0)!=="production"&&(o.debugPrivate=!0),(0,t.atom)(e=>e(o))},(s.has(e)?s:s.set(e,i())).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),i=(0,t.atomWithStorage)("wx-source-module",null,r);e.s(["sourceModuleAtom",0,i])},608201,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),i=(0,t.atomWithStorage)("wx-source-page",null,r);e.s(["sourcePageAtom",0,i])},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])},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)(),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)})}])},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,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)(),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.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])}])},912555,e=>{"use strict";e.s(["AMPLITUDE_VARIANTS_COOKIE",0,"amplitude-variants","SUBS_OFFER_LAYOUT_FLAG_KEY",0,"subs-offer-page-hero-section"])},562209,e=>{"use strict";var t=e.i(546584),r=e.i(553329);let i="production"!==t.default.env.VERCEL_TARGET_ENV,n=new Set;e.s(["resetTrackedExposures",0,function(){n.clear()},"trackAmplitudeExposure",0,function({exposure:e,userId:t,deviceId:o}){if(!e.experiment_key){i&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!o){i&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let a=`${e.flag_key}::${e.variant??""}`;if(n.has(a)){i&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${a}`);return}n.add(a);let s={api_key:"bb1117981ed2a95dc4fa64b75661d681",events:[{event_type:"$exposure",user_id:t,device_id:o,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:i?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:n}=await (0,r.tryCatch)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),keepalive:!0}));return n?console.error("[Experiment] Failed to send exposure to Amplitude HTTP API:",n):t&&!t.ok?console.error(`[Experiment] Amplitude HTTP API returned ${t.status}`):i&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}])},283366,e=>{"use strict";e.s(["getExposureVariantOverride",()=>g,"resetExposures",()=>v,"useExposure",()=>E]);var t=e.i(592121),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=>{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{}},m=e=>{if(0===l.size)return;let t=c(e);for(let e of l)t.add(e);d(e,t),l.clear()},p=e=>{let t=u();return t?(m(t),c(t).has(e)):l.has(e)},f=new Map;function g(e){return f.get(e)}function v(){l.clear(),f.clear();let e=u();if(e)try{localStorage.removeItem(s+e)}catch{}}function E(e,r){let n=void 0!==r,s=r?.variant,g=(0,t.useContext)(o.ExperimentContext);(0,t.useEffect)(()=>{if(!i.default||!g||p(e)||n&&void 0===s)return;let{client:t}=g;if(!t)return;let r=()=>{if(!p(e)){(e=>{let t=u();if(!t)return l.add(e);m(t);let r=c(t);r.add(e),d(t,r)})(e),void 0!==s&&f.set(e,s);try{t.exposure(e)}catch(e){a.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",()=>E,"ExperimentProvider",()=>x,"default",()=>S,"useExperimentContext",()=>y],742436);var t=e.i(546584),r=e.i(699173),i=e.i(592121),n=e.i(185312),o=e.i(333350),a=e.i(310847),s=e.i(546446),l=e.i(328343),u=e.i(158662),c=e.i(528600),d=e.i(646341),m=e.i(912555),p=e.i(562209),f=e.i(283366);let g="client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV",v="production"!==t.default.env.VERCEL_TARGET_ENV,E=(0,i.createContext)(null),x=({children:e,scriptSrc:t})=>{let x=(0,s.useAtomValue)(a.wxuUserAnonymousIdAtom),y=(0,l.useEnrolledInExperimentEvent)(),S=(0,s.useSetAtom)(u.experimentJoinListAtom),{user:h}=(0,c.useUser)(),[w,b]=(0,i.useState)(!1),[A,k]=(0,i.useState)(!1),[,_]=(0,i.useState)(0),I=(0,i.useRef)(void 0),O=(0,i.useRef)(void 0),C=(0,d.getCookie)("ANON_C")?.toString();I.current=h.userID||void 0,O.current=C||x;let D=(0,i.useRef)(new Set),P=(0,i.useCallback)(e=>{let t=(0,f.getExposureVariantOverride)(e.flag_key),r=void 0!==t?{...e,variant:t}:e,i=`${r.flag_key}::${r.variant??""}`;D.current.has(i)||(D.current.add(i),y(r),(0,p.trackAmplitudeExposure)({exposure:r,userId:I.current,deviceId:O.current}))},[y]),[T,N]=(0,i.useState)({});(0,i.useEffect)(()=>{if(o.default){let e=(0,d.getCookie)(m.AMPLITUDE_VARIANTS_COOKIE);if(e)try{let t=JSON.parse(e.toString());N(t),v&&Object.keys(t).length>0&&console.debug("[Experiment] Loaded server variants from cookie:",Object.keys(t))}catch(e){console.error("[Experiment] Failed to parse variants cookie:",e)}}},[]),(0,i.useEffect)(()=>{0===Object.keys(T).length?S(null):S(JSON.stringify(Object.entries(T).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",i=Math.floor(Date.now()/1e3);return`${e},${r},${i}`})))},[T,S]);let R=function(e,t,r){let n=(0,i.useRef)(null),[a,s]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!a&&o.default&&g&&t){if(!window.Experiment)return void console.error("Amplitude Experiment SDK not loaded. Script may still be loading.");try{let t=Object.keys(r).length>0;n.current=window.Experiment.initialize(g,{debug:v,fetchTimeoutMillis:5e3,retryFetchOnFailure:!0,fetchOnStart:!1,automaticExposureTracking:!1,exposureTrackingProvider:{track:t=>{try{e(t),v&&console.debug("[Experiment] Exposure tracked:",t)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}}},initialVariants:t?r:void 0,source:t?"initialVariants":"localStorage"}),s(!0),v&&(t?console.debug("[Experiment] SDK initialized with server variants:",Object.keys(r)):console.debug("[Experiment] SDK initialized (will fetch from API)"))}catch(e){console.error("Failed to initialize Amplitude Experiment SDK:",e)}}},[a,t,e,r]),n.current}(P,w,T);return(0,i.useEffect)(()=>{(async()=>{if(!R)return;let e=(0,d.getCookie)("ANON_C")?.toString()||x;if(!e&&!h.userID){v&&console.debug("[Experiment] No user identifier available"),k(!0);return}let t={device_id:e,...h.userID?{user_id:h.userID}:{},user_properties:{}};v&&console.debug("[Experiment] Fetching experiments from API for user:",t);try{await R.fetch(t)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{k(!0)}})()},[R,x,h.userID]),(0,i.useEffect)(()=>{D.current.clear(),(0,p.resetTrackedExposures)(),(0,f.resetExposures)(),_(e=>e+1)},[h.userID]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t,strategy:"afterInteractive",onLoad:()=>{b(!0),v&&console.debug("Amplitude Experiment script loaded")},onError:e=>{console.error("Failed to load Amplitude Experiment script:",e)}}),(0,r.jsx)(E.Provider,{value:{client:R,variant:(e,t)=>{if(!R)return t;let r=R.variant(e,t);return v&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!R)return Promise.resolve();if(!e){let e=(0,d.getCookie)("ANON_C")?.toString()||x;if(e||h.userID){let t={device_id:e,...h.userID?{user_id:h.userID}:{},user_properties:{}};return R.fetch(t)}}return R.fetch(e)},isFetchComplete:A},children:e})]})},y=()=>{let e=(0,i.useContext)(E);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e},S=x},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},630986,e=>{"use strict";var t=e.i(546446),r=e.i(604323);e.s(["useCMSAttributes",0,()=>(0,t.useAtomValue)(r.metricsArticleDataAtom)])},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])},49893,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["adsKillswitchAtom",0,t])},21121,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["showVelvetcakeModuleAtom",0,t])}]);