(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,905447,e=>{"use strict";var t=e.i(694914),r=e.i(477716),a=e.i(375570);function i(){return false}function n(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function o(e){(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(a.current)e.route&&a.current(e.route);else{let r=function(e={}){var t;if(!("u">typeof window)||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let r=e.scriptSrc?e.scriptSrc:i()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let a=document.createElement("script");return a.src=r,a.defer=!0,a.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),a.dataset.sdkv="1.3.1",e.sampleRate&&(a.dataset.sampleRate=e.sampleRate.toString()),e.route&&(a.dataset.route=e.route),e.endpoint?a.dataset.endpoint=e.endpoint:e.basePath&&(a.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(a.dataset.dsn=e.dsn),i()&&!1===e.debug&&(a.dataset.debug="false"),a.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(a),{setRoute:e=>{a.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});r&&(a.current=r.setRoute)}},[e.route]),null}function s(e){let i=(()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)()||new URLSearchParams,r=(0,a.usePathname)();if(!e)return null;let i=Object.keys(e).length?e:Object.fromEntries(t.entries());if(!r||!i)return r;let o=r;try{let e=Object.entries(i);for(let[t,r]of e)if(!Array.isArray(r)){let e=n(r);e.test(o)&&(o=o.replace(e,`/[${t}]`))}for(let[t,r]of e)if(Array.isArray(r)){let e=n(r.join("/"));e.test(o)&&(o=o.replace(e,`/[...${t}]`))}return o}catch(e){return r}})();return r.default.createElement(o,{route:i,...e,framework:"next",basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function l(e){return r.default.createElement(r.Suspense,{fallback:null},r.default.createElement(s,{...e}))}e.s(["SpeedInsights",()=>l])},901417,e=>{"use strict";var t,r=e.i(694914),a={scriptHostname:("u">typeof r.default?r.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof r.default?r.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof r.default?r.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof r.default?r.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_BRANCH:void 0,deploymentId:"u">typeof r.default?"dpl_CbjLwasykQ6YezayZA9gqnqjQdwJ":void 0},i=e.i(477716),n=!1;function o({shouldMount:e,nonce:r}){return(0,i.useEffect)(()=>(e&&n&&function(e={}){if(typeof window>"u"||null===document.querySelector("vercel-live-feedback")){Object.assign(a,e);let r=document.createElement("script");for(let[i,n]of(r.src=`${a.scriptHostname}/_next-live/feedback/feedback.js`,r.setAttribute("data-explicit-opt-in","true"),e.nonce&&r.setAttribute("nonce",e.nonce),Object.entries((a.ownerId&&a.projectId?{"data-owner-id":a.ownerId,"data-project-id":a.projectId,"data-branch":t??a.branch}:a.deploymentId?{"data-deployment-id":a.deploymentId}:void 0)??{})))n&&r.setAttribute(i,n);(document.head||document.documentElement).appendChild(r)}}({nonce:r}),n=!0,()=>{(typeof window>"u"?void 0:window.__vercel_toolbar)?.unmount()}),[]),null}e.s(["UnmountController",()=>o],901417)},127498,e=>{"use strict";var t=e.i(862336),r=e.i(297647);function a({locale:e,...a}){if(!e)throw Error(void 0);return(0,r.jsx)(t.IntlProvider,{locale:e,...a})}e.s(["default",()=>a])},248064,e=>{"use strict";var t=e.i(991511),r=e.i(394481),a=e.i(663333),i=e.i(49893),n=e.i(889753),o=e.i(5397),s=e.i(369159),l=e.i(751931);(0,l.atom)({});var c=e.i(584799);let u=(0,l.atom)(!1);var d=e.i(41385);e.s(["FlagsBoundaryClient",0,({params:e})=>((0,t.useRehydrateAtoms)([[r.privacyRegimeAtom,e.privacyRegime],[a.deviceClassAtom,e.deviceClass],[n.userTierAtom,e.userTier],[i.adsKillswitchAtom,e.adsKillswitch],[o.showAdminHeaderAtom,e.showAdminHeader],[s.shouldConsolidateForecastAtom,e.shouldConsolidateForecast],[c.subsCTAVariantAtom,e.subsCTAVariant],[d.mobileWebSubnavVariantAtom,e.mobileWebSubnavVariant],[u,e.showOpenWebComments]]),null)],248064)},792302,e=>{"use strict";var t=e.i(297647),r=e.i(929993),a=e.i(475566),i=e.i(5397),n=e.i(477716),o=e.i(538107),s=e.i(674339),l=e.i(375570),c=e.i(695881),u=e.i(609858);let d=(0,c.createLogger)("AtomDebugHydrationBoundaries"),f=({debugData:e})=>{let{updateSection:t}=(0,u.useDebugSystem)(),r=(0,l.usePathname)();return d.info("Initial props received",{hasDebugData:!!e,currentPath:r}),(0,o.useHydrateAtoms)([[s.debugDataAtom,e||{timestamp:new Date().toISOString()}]]),(0,n.useEffect)(()=>{d.lifecycle("Path changed",r);let a=sessionStorage.getItem("lastPath"),i=!a||a===r;d.info("Navigation type",i?"Direct load/refresh":"Client-side navigation"),t("route",r),i&&!e?t("meta",{dataState:"stale",lastConfirmedPath:a||null,currentPath:r,isDirectLoad:!0,timestamp:new Date().toISOString()}):(t("components",{}),e&&(d.info("Updating with new debug data for path",r),e.page&&t("page",e.page),e.match&&t("match",e.match),e.timestamp&&t("timestamp",e.timestamp),e.headers&&t("headers",e.headers),e.environment&&t("environment",e.environment),e.location&&t("location",{...e.location,source:"server-hydration",_updatedAt:new Date().toISOString()}),t("meta",{dataState:"fresh",lastConfirmedPath:r,currentPath:r,isDirectLoad:i,timestamp:new Date().toISOString()}))),sessionStorage.setItem("lastPath",r??"")},[r,e,t]),d.lifecycle("Hydration complete",{debugData:e,pathname:r}),null};var p=e.i(842096);let m=(0,p.createServerReference)("405800a097cccfa9f28a5419eb01084a1bc1148480",p.callServer,void 0,p.findSourceMapURL,"translateDebugDataAction");var w=e.i(472737);let g=(0,c.createLogger)("LocationCollector"),h=(0,c.createLogger)("DataCollector");function v({pageProps:e,userRoles:t}){let r=(0,l.usePathname)(),a=(0,l.useSearchParams)(),{updateSection:i}=(0,u.useDebugSystem)(),o=(0,n.useRef)(!1);!function(){let{updateSection:e}=(0,u.useDebugSystem)(),{effectiveLocation:t,isLocationLoading:r}=(0,w.useLocationSource)({});(0,n.useEffect)(()=>{t&&!r&&(g.info("Location data updated",t.displayName),e("location",{...t,_observedFrom:"useLocationSource",_collectedBy:"LocationCollector",_updatedAt:new Date().toISOString()}))},[t,r,e])}(),(0,n.useEffect)(()=>{if(t&&t.length>0){let e=Array.isArray(t)?t:[];i("userRoles",e),h.info("DataCollector","User roles updated",e)}},[t,i]);let s=(0,n.useCallback)(async()=>{try{h.info("DataCollector","Collecting data for route:",{path:r,paramsCount:a?Array.from(a.keys()).length:0});let t={};a?.forEach((e,r)=>{t[r]=e}),h.lifecycle("DataCollector","Calling translateDebugDataAction");let n=await m({route:r??"",params:t,pageProps:e});n&&(h.info("DataCollector","Debug data received",{route:n.route,hasPage:!!n.page,hasMatch:!!n.match,hasHeaders:!!n.headers,hasEnvironment:!!n.environment}),n.route&&(i("route",n.route),h.info("DataCollector","Route updated",n.route)),n.page&&(i("page",n.page),h.info("DataCollector","Page data updated",{title:n.page.title,id:n.page.id}),i("meta",{dataState:"fresh",lastConfirmedPath:r,currentPath:r,isDirectLoad:!1,timestamp:new Date().toISOString()})),n.match&&(i("match",n.match),h.info("DataCollector","Match data updated",{hasMatch:!0,matchKeys:Object.keys(n.match||{})})),n.headers&&(i("headers",n.headers),h.info("DataCollector","Headers updated",{headerCount:Object.keys(n.headers||{}).length})),n.environment&&(i("environment",n.environment),h.info("DataCollector","Environment data updated",{envVarCount:Object.keys(n.environment||{}).length})),i("timestamp",new Date().toISOString()))}catch(e){h.error("DataCollector","Error collecting debug data:",e),i("errors",{dataCollection:{message:e.message,timestamp:new Date().toISOString()}})}},[r,a,e,i]);return(0,n.useEffect)(()=>{h.lifecycle("DataCollector","Setting up data collection for path",r),o.current||(o.current=!0);let e=setTimeout(()=>{s()},200);return()=>{clearTimeout(e),h.lifecycle("DataCollector","Cleanup for path",r)}},[s,r]),null}function y({children:e,pageProps:r}){return(0,t.jsxs)(a.Provider,{children:[(0,t.jsx)(f,{debugData:null}),(0,t.jsx)(v,{pageProps:r}),e]})}let S=(0,r.default)(()=>e.A(186044).then(e=>({default:e.FrontendAdminHeader})),{loadableGenerated:{modules:[451309]},ssr:!1,loading:()=>null});function b({children:e}){return(0,a.useAtomValue)(i.showAdminHeaderAtom)?(0,t.jsxs)(y,{children:[(0,t.jsx)(S,{}),e]}):(0,t.jsx)(t.Fragment,{children:e})}e.s(["AdminHeaderWrapper",()=>b],792302)},569579,e=>{"use strict";var t=e.i(297647),r=e.i(358273),a=e.i(333350);if(a.default){let e=(0,r.getMetricsSession)();(!e||(0,r.checkSessionTimestampExpired)())&&(0,r.setIsNewMestricsSession)(),(0,r.setMetricsSession)(e)}let i=()=>null;var n=e.i(241722),o=e.i(477716);e.i(694914);var s=e.i(475566),l=e.i(947118),c=e.i(310847),u=e.i(382602),d=e.i(528600),f=e.i(915044),p=e.i(959194),m=e.i(737801),w=e.i(375570),g=e.i(800462),h=e.i(608201),v=e.i(236593),y=e.i(472737),S=e.i(630986),b=e.i(147732);let I=new Date().getTime(),E=(0,b.debounce)(()=>{window.scrollY>P&&(P=window.scrollY)},250);a.default&&window.addEventListener("scroll",E);let P=a.default&&window.innerHeight>0?window.innerHeight:0,A=({scriptSrc:e})=>{let i;(()=>{let e="us2-fb061d169ced8343850163112c402d41",t=(0,l.useIsInitialized)(),a=(0,o.useRef)(t),{user:{isUserLoggedIn:i,userID:n}}=(0,d.useUser)(),f=(0,s.useAtomValue)(u.userEmailAtom),p=i?n:null,m=i?f:"",w=(0,s.useAtomValue)(c.wxuUserAnonymousIdAtom),g=(({hasInvokedMPInit:e,apiKey:t,isUserLoggedIn:r,customerid:a,email:i,other:n})=>!e&&t&&n&&(r&&a&&i||!r))({hasInvokedMPInit:a.current,apiKey:e,isUserLoggedIn:i,customerid:p,email:m,other:w});(0,o.useEffect)(()=>{if(g){a.current=!0;let t={isDevelopmentMode:!1,logLevel:"warning",identifyRequest:{userIdentities:{email:m,customerid:p,other:w}},v1SecureServiceUrl:"mparticle.weather.com/webevents/v1/JS/",v2SecureServiceUrl:"mparticle.weather.com/webevents/v2/JS/",v3SecureServiceUrl:"mparticle.weather.com/webevents/v3/JS/",configUrl:"mparticle.weather.com/tags/JS/v2/",identityUrl:"mparticle.weather.com/identity/v1/",aliasUrl:"mparticle.weather.com/webevents/v1/identity/",dataPlan:{planId:"weather_web",planVersion:2},identityCallback:e=>{if(e?.getUser()){let t=e.getUser().getMPID();t&&(console.debug("MParticle: Identity callback triggered",t),(e=>{try{let t=JSON.parse(localStorage.getItem("wxu-web/keyval:mparticleUser")||"{}"),a=t?.value?.mpid;a&&a!==e&&((0,r.setIsNewMestricsSession)(),(0,r.setMetricsSession)(null))}catch(e){console.error("Error in resetMetricSessionWhenMparticleIdChange",e)}})(t),localStorage.setItem("wxu-web/keyval:mparticleUser",JSON.stringify({value:{mpid:t},updatedAt:Date.now()})))}}};console.debug("Mparticle initialized with config:",t),window.mParticle?.init?.(e,t)}},[g,e,!1,p,m,w])})();let{setUserAttributes:b}=(0,f.useUserAttributes)(),E=(()=>{let e=(0,l.useIsInitialized)(),t=(0,m.useEventAttributes)(),[a,i]=(0,o.useState)(!1),n=(0,o.useRef)(!1),s=(0,o.useMemo)(()=>({...t}),[t]);return(0,o.useEffect)(()=>{(0,p.areObjectValuesDefined)(s)&&!a&&i(!0)},[s,a]),(0,o.useCallback)(async()=>{if((0,r.isNewMetricsSession)()&&e&&a&&!n.current)try{window.mParticle?.logEvent?.("session-start",window.mParticle?.EventType?.Other,s),n.current=!0,(0,r.deleteIsNewMestricsSession)(),console.debug(`MParticle: Event "session-start" tracked - sessionId: ${s.sessionId}`)}catch(e){console.error('MParticle: Event "session-start" failed',e)}},[e,s,a])})(),A=(()=>{let e=(0,l.useIsInitialized)(),t=(0,w.usePathname)(),r=(0,m.useEventAttributes)(),a=(0,S.useCMSAttributes)(),[i,n]=(0,o.useState)(!1),s=(0,o.useRef)(!1),c=(0,o.useMemo)(()=>({author:a?.author||"",contentId:a?.contentId,publishDate:a?.publishDate,provider:a?.provider,collection:a?.collection,entitlements:a?.entitlements,createdDate:a?.createdDate,...r,url:t?(0,p.stripLastPartOfSlug)(t):""}),[r,a,t]);return(0,o.useEffect)(()=>{(0,p.areObjectValuesDefined)(c)&&!i&&n(!0)},[c,i]),(0,o.useCallback)(async()=>{if(c?.pageId==="article"&&e&&i&&!s.current)try{window.mParticle?.logEvent?.("article-viewed",window.mParticle?.EventType?.Other,c),console.debug(`MParticle: Event "article-viewed" tracked - ${c?.pageId}`),s.current=!0}catch(e){console.error('MParticle: Event "article-viewed" failed',e)}},[e,c,i])})(),C=(()=>{let e=(0,l.useIsInitialized)(),t=(0,m.useEventAttributes)(),i=t.pageId,n=a.default&&!["video","article"].includes(i)?window.location.href:"",[c,u]=(0,o.useState)(!1),d=(0,o.useRef)(!1),f=(0,o.useRef)(void 0),[S,b]=(0,s.useAtom)(g.fromSearchResultAtom),[I,E]=(0,s.useAtom)(h.sourcePageAtom),[P,A]=(0,s.useAtom)(v.sourceModuleAtom),C=(0,y.useLocationSource)({}),D=C?.effectiveLocation,R=function(e){try{let t=(e.startsWith("http")?new URL(e).pathname:e.split("?")[0]??"").split("/"),r=t.indexOf("l");if(-1!==r&&r({...t,...R&&{wlocId:R},...D?.presentationName&&{wlocPresentationName:D?.presentationName},...D?.type&&{wlocType:D?.type},...S&&{fromSearchResult:S},...I&&{sourcePage:I},...P&&{sourceModule:P},fullUrl:n}),[t,R,D,S,I,P,n]);return(0,o.useEffect)(()=>{(0,p.areObjectValuesDefined)(_)&&!c&&u(!0)},[_,c]),(0,o.useCallback)(async()=>{if(f.current!==_.pageId&&(d.current=!1,f.current=_.pageId),e&&c&&!d.current)try{window.mParticle?.logEvent?.("page-viewed",window.mParticle?.EventType?.Other,_),d.current=!0,S&&b(null),I&&E(null),P&&A(null),(0,r.incrementMetricsSessionCount)(),console.debug(`MParticle: Event "page-viewed" tracked - ${_.pageId}`)}catch(e){console.error('MParticle: Event "page-viewed" failed',e)}},[e,_,c,S,b,I,E,P,A])})(),D=(()=>{let{effectiveLocation:e}=(0,y.useLocationSource)({}),t=(0,l.useIsInitialized)(),i=(0,m.useEventAttributes)(),[n,s]=(0,o.useState)(!1),c=(0,o.useRef)(!1),u=(0,o.useRef)(void 0);(0,o.useEffect)(()=>{e?.geocode&&(u.current=e.geocode)},[e?.geocode]);let d=e?.geocode?.split?.(","),f=d?.[0]?parseFloat(d[0]):void 0,w=d?.[1]?parseFloat(d[1]):void 0,g=a.default&&(0,r.isNewMetricsSession)(),h=(0,o.useMemo)(()=>({...i,latitude:f,longitude:w}),[i,f,w]);return(0,o.useEffect)(()=>{(0,p.areObjectValuesDefined)(h)&&!n&&s(!0)},[h,n]),(0,o.useCallback)(async()=>{let r=h.latitude,a=h.longitude;if(t&&n&&!c.current&&r&&a&&g)try{window.mParticle?.logEvent?.("location-viewed",window.mParticle?.EventType?.Other,h),c.current=!0,console.debug(`MParticle: Event "location-viewed" tracked - ${e?.displayName||"Unknown location"}`)}catch(e){console.error('MParticle: Event "location-viewed" failed',e)}},[t,h,n,e,g])})();return i=(0,m.useEventAttributes)(),(0,o.useEffect)(()=>{let e=()=>{if(window.mParticle?.isInitialized?.()){let e,t,r,a=(new Date().getTime()-I)/1e3,n=(e=document.documentElement.scrollHeight,t=window.innerHeight,P=P||window.scrollY,(r=e===t?100:Math.round(P/(e-t)*100))>100?r=100:r{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[i]),(0,o.useEffect)(()=>{b()},[b]),(0,o.useEffect)(()=>{E()},[E]),(0,o.useEffect)(()=>{A()},[A]),(0,o.useEffect)(()=>{C()},[C]),(0,o.useEffect)(()=>{D()},[D]),(0,t.jsx)(n.default,{src:e,strategy:"beforeInteractive"})},C=({scriptSrc:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{}),(0,t.jsx)(A,{scriptSrc:e})]});e.s(["Analytics",0,C,"default",0,C],569579)},987070,e=>{"use strict";var t=e.i(297647),r=e.i(477716),a=e.i(381477),i=e.i(521350);e.s(["SWRProvider",0,({children:e,fallback:n={}})=>{let[o]=(0,r.useState)(()=>new Map);return(0,r.useEffect)(()=>{if(!(0,i.isLocalStorageAvailable)())return;try{let e=localStorage.getItem("app-cache");if(e){let t=JSON.parse(e);Array.isArray(t)&&t.forEach(([e,t])=>{o.get(e)||o.set(e,t)})}}catch(e){console.error("Failed to load cache from localStorage:",e)}let e=()=>{if((0,i.isLocalStorageAvailable)())try{let e=Array.from(o.entries());localStorage.setItem("app-cache",JSON.stringify(e))}catch(e){console.error("Failed to persist cache to localStorage:",e)}};window.addEventListener("beforeunload",e);let t=setInterval(e,3e4);return()=>{window.removeEventListener("beforeunload",e),clearInterval(t)}},[o]),(0,t.jsx)(a.SWRConfig,{value:{provider:()=>o,fallback:n},children:e})}])},85617,e=>{"use strict";var t=e.i(477716),r=e.i(528600),a=e.i(45846),i=e.i(436028),n=e.i(694914),o=e.i(725296),s=e.i(521350),l=e.i(313983);let c=async()=>{try{let e=await f();await p({upsxConsentResponse:e}),await h({upsxConsentResponse:e})}catch(e){console.log(e)}},u=({purpose:e,upsxConsentResponse:t})=>{let r=t?.find?.(t=>t?.purpose===e);return r?.consent},d=async({purpose:e,value:t,setByUser:r})=>{let i={purpose:e,consent:t,setByUser:r,consentDateTime:new Date().toISOString()};await a.upsxClient.consent.createUserConsent(i)},f=async()=>await a.upsxClient.consent.getUserConsent(),p=async({upsxConsentResponse:e})=>{let t=u({purpose:"sale-of-data",upsxConsentResponse:e}),{localSaleOfDataConsent:r,setByUser:a}=m();w({localSaleOfDataConsent:r,upsxSaleOfDataConsent:t}),g({upsxSaleOfDataConsent:t})&&await d({purpose:"sale-of-data",value:r,setByUser:a})},m=()=>{let e=window.DprSdk,t=e?.getUserConsent("sale-of-data"),r="boolean"==typeof t;return{localSaleOfDataConsent:r?t:e?.getRegimePurposeDefaultValue("sale-of-data")??!0,setByUser:r}},w=({localSaleOfDataConsent:e,upsxSaleOfDataConsent:t})=>{let r=window.DprSdk,a=window.navigator.globalPrivacyControl,i=(0,s.isLocalStorageAvailable)()?localStorage.getItem("saleOfDataConflict"):null,n=!0===t&&!1===e&&!a;n&&!i?(0,s.isLocalStorageAvailable)()&&localStorage.setItem("saleOfDataConflict","true"):!n&&i&&(0,s.isLocalStorageAvailable)()&&localStorage.removeItem("saleOfDataConflict"),!1===t&&!0===e&&r?.setUserConsents({"sale-of-data":!1},{skipLogUserConsent:!0})},g=({upsxSaleOfDataConsent:e})=>{let t=!1,r=window.navigator.globalPrivacyControl;return("boolean"!=typeof e||r&&!0===e)&&(t=!0),t},h=async({upsxConsentResponse:e})=>{if((0,o.getRegime)()!==o.Regime.USA_CCPA)return;let t=u({purpose:l.Purpose.SENSITIVE_DATA,upsxConsentResponse:e}),{localSensitiveDataConsent:r}=v();y({localSensitiveDataConsent:r,upsxSensitiveDataConsent:t}),function({upsxSensitiveDataConsent:e}){let t=!1;return"boolean"!=typeof e&&(t=!0),t}({upsxSensitiveDataConsent:t})&&await d({purpose:l.Purpose.SENSITIVE_DATA,value:!0,setByUser:!1})},v=()=>{let{DprSdk:e}=window,t=e?.getUserConsent(l.Purpose.SENSITIVE_DATA),r="boolean"==typeof t;return{localSensitiveDataConsent:r?t:e?.getRegimePurposeDefaultValue(l.Purpose.SENSITIVE_DATA)??!0,setByUser:r}},y=async({localSensitiveDataConsent:e,upsxSensitiveDataConsent:t})=>{let{DprSdk:r}=window;"boolean"==typeof t&&t!==e&&r?.setUserConsents({[l.Purpose.SENSITIVE_DATA]:t},{skipLogUserConsent:!0})};e.s(["UserAuthSync",0,()=>(!function(){let[e,l]=(0,t.useState)(!1),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(!1),f=(0,o.getRegime)(),{user:{isUserLoggedIn:p,userID:m,anonId:w}}=(0,r.useUser)(),g=(0,t.useCallback)(async(e={})=>{if(m){l(!0),u(null);try{let t,r,s,l,c,u=await a.upsxClient.applications.getApplications(e.appId||"twc-web-registered",e.endpointId||m),g=u?.partners||[],h=(t=[],(r=n.default.env.NEXT_PUBLIC_OMNITURE_ID||null)&&t.push({name:"omniture",id:r}),(s=function({upsxId:e,anonId:t}){return e||t||null}({upsxId:m,anonId:w}))&&(t.push({name:"amplitude",id:s}),t.push({name:"airlytics",id:s})),(l=n.default.env.NEXT_PUBLIC_MPARTICLE_ID||null)&&t.push({name:"mParticle",id:l}),!p&&l&&t.push({name:"braze",id:l}),p&&m&&(t.push({name:"zuora",id:m}),t.push({name:"braze",id:m})),c=n.default.env.NEXT_PUBLIC_SOURCEPOINT_DSR_ID||null,o.RESTRICTIVE_REGIMES.includes(f)&&c&&t.push({name:"sourcepoint",id:c}),t),v=(0,i.hasLength)(g)?h.filter(e=>{let t=g.find(t=>t.name===e.name);return!t||t.id!==e.id}):h;return v.length&&(u?await a.upsxClient.applications.addPartner(e.appId||"twc-web-registered",e.endpointId||m,{partners:v,version:"1.0.0"}):await a.upsxClient.applications.createApplication({appId:e.appId||"twc-web-registered",endpointId:e.endpointId||m,partners:v,version:"1.0.0"})),d.current=!0,{success:!0,addedOrUpdated:v}}catch(t){let e=t instanceof Error?t:Error("Unknown error occurred");return u(e),{success:!1,error:e.message}}finally{l(!1),(0,s.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","false")}}},[m]);(0,t.useEffect)(()=>{if(!(0,s.isLocalStorageAvailable)())return;let e=localStorage.getItem("PARTNERS_SYNC"),t=e&&JSON.parse(e);p&&m&&t&&!d.current&&(async()=>{await g()})()},[m,p,g])}(),!function(){let e=(0,t.useRef)(!1),{user:{isUserLoggedIn:a}}=(0,r.useUser)();(0,t.useEffect)(()=>{a&&!e.current&&(c(),e.current=!0)},[a])}(),null)],85617)},231457,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["pushlyInitializedAtom",0,t])},959377,e=>{"use strict";var t=e.i(477716),r=e.i(475566),a=e.i(231457);function i(e){let{domainKey:i,serviceWorkerPath:n,enabled:o=!1}=e,[s,l]=(0,r.useAtom)(a.pushlyInitializedAtom);return(0,t.useEffect)(()=>{if(o)try{window.PushlySDK=window.PushlySDK||[],window.pushly=window.pushly||function(...e){window.PushlySDK.push(e)},window.pushly("load",{domainKey:i,sw:n}),l(!0)}catch(e){console.error("Failed to initialize Pushly SDK:",e)}},[i,n,o,l]),{isInitialized:s}}e.s(["useInitializeSdk",()=>i])},330871,e=>{"use strict";var t=e.i(477716),r=e.i(475566),a=e.i(231457);function i(e){let{isPremium:t,isUserLoggedIn:r,userHasLoggedInBefore:a,locationData:i,upsUserId:n}=e;return{is_premium:t,is_registered_user:a||r,place_id:i?.placeId,twc_latitude:i?.latitude,twc_longitude:i?.longitude,twc_postal_code:i?.postalCode,...r&&n&&{upsx_id:n}}}function n(e){let n=(0,t.useRef)(!1),o=(0,t.useRef)(e),s=(0,r.useAtomValue)(a.pushlyInitializedAtom);(0,t.useEffect)(()=>{o.current=e},[e]),(0,t.useEffect)(()=>{if(!s||!window.pushly||!e)return;let{mParticleId:t}=e,r=i(e);try{window.pushly("profile",r),t&&window.pushly("external_id",t),n.current||(n.current=!0,window.pushly("on_permission_allowed",()=>{let e=o.current;if(!e||!window.pushly)return;let t=i(e);window.pushly("profile",t),e.mParticleId&&window.pushly("external_id",e.mParticleId)}))}catch(e){console.error("Failed to set Pushly profile:",e)}},[e,s])}e.s(["usePushlyProfile",()=>n])},369769,e=>{"use strict";e.i(694914);var t=e.i(297647),r=e.i(241722),a=e.i(477716),i=e.i(959377),n=e.i(330871),o=e.i(528600),s=e.i(475566),l=e.i(310847),c=e.i(472737);e.i(186316);let u=()=>{let e=window?.mParticle?.Identity?.getCurrentUser?.()?.getMPID?.();return e||null},d=()=>{let{user:e}=(0,o.useUser)(),t=(0,s.useAtomValue)(l.userHasLoggedInBeforeAtom),{effectiveLocation:r}=(0,c.useLocationSource)({}),[i,d]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e;(e=u())&&e!==i&&d(e);let t=setInterval(()=>{let e=u();e&&(d(e),clearInterval(t))},1e3);return()=>clearInterval(t)},[i]);let{latitude:f,longitude:p}=(e=>{if(!e)return{latitude:void 0,longitude:void 0};let[t,r]=e.split(",");return{latitude:t?parseFloat(t):void 0,longitude:r?parseFloat(r):void 0}})(r?.geocode);return(0,n.usePushlyProfile)({isPremium:e.isUserPremium,isUserLoggedIn:e.isUserLoggedIn,userHasLoggedInBefore:t??!1,locationData:r?{placeId:r.placeId,latitude:f,longitude:p,postalCode:r.postalCode}:void 0,upsUserId:e.userID||void 0,mParticleId:i||void 0}),null},f="samsung_widget",p="en-US";e.s(["Pushly",0,({serviceWorkerPath:e,partner:n,locale:o="en-US"})=>{let[s,l]=(0,a.useState)(!1),c="XJe7TqRv7lQ0gyF5biuPnAchWgRhgAjeQc0h";return((0,i.useInitializeSdk)({domainKey:c||"",serviceWorkerPath:e,enabled:s&&n!==f&&o===p&&!!c}),n===f||o!==p)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{src:`https://cdn.p-n.io/pushly-sdk.min.js?domain_key=${c}`,strategy:"afterInteractive",onLoad:()=>{console.log("Pushly SDK loaded"),l(!0)},onError:e=>{console.error("Failed to load Pushly SDK:",e)}}),(0,t.jsx)(d,{})]})}],369769)},157725,e=>{"use strict";var t=e.i(477716),r=e.i(475566),a=e.i(528600),i=e.i(776169),n=e.i(310847);e.s(["UserPreferenceSync",0,()=>(!function(){let{user:{isUserLoggedIn:e,userID:o},userProfile:s}=(0,a.useUser)(),{updatePreferences:l}=(0,i.usePreferences)(),c=(0,r.useAtomValue)(n.wxuUserPreferenceAtom),u=(0,t.useRef)(!1);(0,t.useEffect)(()=>{(async()=>{if(e&&s&&o&&!u.current){u.current=!0;try{c&&await l(c,!1)}catch(e){console.error("Failed to sync user preferences:",e),u.current=!1}}})()},[e,s,o,l,c])}(),null)],157725)},599827,e=>{"use strict";var t=e.i(477716),r=e.i(186316),a=e.i(528600),i=e.i(543512),n=e.i(901351);function o(){let e=new URLSearchParams(window.location.search),t=e.get("re");e.delete("re"),window.history.replaceState({},"",window.location.href.replace(`${0==[...e].length?"?":""}re=${t}`,"")),t||(e.set("re",Date.now().toString()),window.location.search=e.toString())}e.s(["PurchaseTokenRefresh",0,()=>{let{user:e}=(0,a.useUser)();return(0,t.useEffect)(()=>{let t=e.subscriptionTier===i.UserSubscriptionTiers.standard,a=(0,r.getCookie)("premium"),s=!1;if(a&&"string"==typeof a){let e=a.split(".")[1];if(e)try{let{expirationDateTime:t,iat:r,premium:a}=JSON.parse(atob(e))||{};if(a){let e=new Date(t);e.setDate(e.getDate()-1);let a=new Date,i=new Date(1e3*r);i.setDate(i.getDate()+1),s=a>=i&&a>=e}}catch(e){console.error("Failed to parse premium cookie JWT:",e)}}(t||s)&&(async()=>{try{let e=await n.upsxClient.purchase.getPurchaseToken();t&&e?.premium&&o()}catch(e){console.error("Failed to refresh purchase token:",e)}})()},[e.subscriptionTier]),null},"reloadPageWithLoopCheck",()=>o])},520362,e=>{"use strict";var t=e.i(297647),r=e.i(477716);let a=e=>{let{apiRoute:t,depth:a,refresh:i,serverURL:n}=e,o=(0,r.useRef)(!1),s=(0,r.useCallback)(e=>{e.origin===n&&e.data&&"object"==typeof e.data&&"payload-document-event"===e.data.type&&("function"==typeof i?i():console.error("You must provide a refresh function to `RefreshRouteOnSave`"))},[i,n]);return(0,r.useEffect)(()=>("u">typeof window&&window.addEventListener("message",s),o.current||(o.current=!0,(e=>{let{serverURL:t}=e;if("u">typeof window){let e=window?.opener||window?.parent;e?.postMessage({type:"payload-live-preview",ready:!0},t)}})({serverURL:n}),i()),()=>{"u">typeof window&&window.removeEventListener("message",s)}),[n,s,a,t,i]),null};var i=e.i(375570);e.s(["LivePreviewListener",0,e=>{let r=(0,i.useRouter)();return(0,t.jsx)(a,{...e,refresh:r.refresh})}],520362)}]);