(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,185945,e=>{"use strict";var t=e.i(288906),r=e.i(247865),n=e.i(725287);function i(){return false}function s(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 n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(n.current)e.route&&n.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 n=document.createElement("script");return n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.3.1",e.sampleRate&&(n.dataset.sampleRate=e.sampleRate.toString()),e.route&&(n.dataset.route=e.route),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(n.dataset.dsn=e.dsn),i()&&!1===e.debug&&(n.dataset.debug="false"),n.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(n),{setRoute:e=>{n.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&&(n.current=r.setRoute)}},[e.route]),null}function a(e){let i=(()=>{let e=(0,n.useParams)(),t=(0,n.useSearchParams)()||new URLSearchParams,r=(0,n.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=s(r);e.test(o)&&(o=o.replace(e,`/[${t}]`))}for(let[t,r]of e)if(Array.isArray(r)){let e=s(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}()})}e.s(["SpeedInsights",0,function(e){return r.default.createElement(r.Suspense,{fallback:null},r.default.createElement(a,{...e}))}])},538946,e=>{"use strict";var t,r=e.i(288906),n={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_CZtZzCiM5fnWqM8RDrQeB7FCU35c":void 0},i=e.i(247865),s=!1;e.s(["UnmountController",0,function({shouldMount:e,nonce:r}){return(0,i.useEffect)(()=>(e&&s&&function(e={}){if(typeof window>"u"||null===document.querySelector("vercel-live-feedback")){Object.assign(n,e);let r=document.createElement("script");for(let[i,s]of(r.src=`${n.scriptHostname}/_next-live/feedback/feedback.js`,r.setAttribute("data-explicit-opt-in","true"),e.nonce&&r.setAttribute("nonce",e.nonce),Object.entries((n.ownerId&&n.projectId?{"data-owner-id":n.ownerId,"data-project-id":n.projectId,"data-branch":t??n.branch}:n.deploymentId?{"data-deployment-id":n.deploymentId}:void 0)??{})))s&&r.setAttribute(i,s);(document.head||document.documentElement).appendChild(r)}}({nonce:r}),s=!0,()=>{(typeof window>"u"?void 0:window.__vercel_toolbar)?.unmount()}),[]),null}],538946)},147732,e=>{"use strict";e.s(["debounce",0,function(e,t,{signal:r,edges:n}={}){let i,s=null,o=null!=n&&n.includes("leading"),a=null==n||n.includes("trailing"),l=()=>{null!==s&&(e.apply(i,s),i=void 0,s=null)},u=null,c=()=>{null!=u&&clearTimeout(u),u=setTimeout(()=>{u=null,a&&l(),d()},t)},d=()=>{null!==u&&(clearTimeout(u),u=null),i=void 0,s=null},f=function(...e){if(r?.aborted)return;i=this,s=e;let t=null==u;c(),o&&t&&l()};return f.schedule=c,f.cancel=d,f.flush=()=>{l()},r?.addEventListener("abort",d,{once:!0}),f}])},232598,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(276247),o=e.r(788443),a=e.r(955011)},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 n=(0,t.atomWithStorage)("wx-ht-from-search-result",null);e.s(["fromSearchResultAtom",0,n],50727)},128541,e=>{"use strict";var t=e.i(284007);let r=(0,t.createJSONStorage)(()=>sessionStorage),n=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,n])},647292,e=>{"use strict";let t=(0,e.i(981030).atom)("");e.s(["webViewPlatformAtom",0,t])},915044,e=>{"use strict";e.i(288906);var t=e.i(247865),r=e.i(947118),n=e.i(546446),i=e.i(959194),s=e.i(160317),o=e.i(382602),a=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:f,subscriptionTier:p}}=(0,c.useUser)(),[m,g]=(0,t.useState)(!1),[b,w]=(0,t.useState)(!1),A=f??!1,h=(0,s.getSubscriptionTierKey)(p),v=(0,n.useAtomValue)(o.userFirstNameAtom),S=(0,n.useAtomValue)(o.userGenderAtom),E=(0,n.useAtomValue)(l.wxuUserAnonymousIdAtom),C=(0,n.useAtomValue)(l.userHasLoggedInBeforeAtom),y=u.default?window?.DprSdk?.getUserConsent("sale-of-data")!==!1:void 0,_=u.default?window?.DprSdk?.getUserConsent("sensitive-data")!==!1:void 0,I=(0,a.getCookie)("subscription")??"",{productID:R=null,expirationDateTime:P=null,transactionDateTime:k=null,firstTransactionDateTime:T=null,autoRenew:O=null,price:L=null,productName:N=null}=(0,i.jwtDecoder)(I)||{},U=(0,t.useMemo)(()=>({premium:A,premiumProductTier:h,premiumExpiration:P,premiumStart:k,premiumFirstTransactionDate:T,premiumProductId:R,premiumProductAutoRenew:O,premiumPrice:L,premiumProductName:N,isRegisteredUser:d||C||!1,isLoggedIn:d,"Amplitude.device_id":E,$Gender:S,$FirstName:v,saleOfDataAuthorization:y,sensitiveDataAuthorization:_,devUser:!1}),[A,h,P,k,T,R,O,L,N,E,d,C,v,S,y,_]);(0,t.useEffect)(()=>{(0,i.areObjectValuesDefined)(U)&&!m&&g(!0)},[U,m]);let D=(0,t.useCallback)(()=>{for(let e in U)void 0===U[e]&&delete U[e];if(e&&m&&!b){let e=window.mParticle?.Identity?.getCurrentUser?.();if(!e)return void console.warn("MParticle: No current user");e.setUserAttributes(U),w(!0),console.debug("MParticle: User attributes set - ",U)}},[e,U,m,b]);return{userAttributes:U,setUserAttribute:(0,t.useCallback)((t,r)=>{if(!e)return void console.warn("MParticle is not initialized");let n=window.mParticle?.Identity?.getCurrentUser?.();n?(n.setUserAttribute(t,r),console.debug(`MParticle: User attribute set - ${t}`)):console.warn("MParticle: No current user")},[e]),setUserAttributes:D,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])},37423,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["dprSdkIsInitializedAtom",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")}])},520362,e=>{"use strict";var t=e.i(902875),r=e.i(247865);let n=e=>{let{apiRoute:t,depth:n,refresh:i,serverURL:s}=e,o=(0,r.useRef)(!1),a=(0,r.useCallback)(e=>{e.origin===s&&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,s]);return(0,r.useEffect)(()=>("u">typeof window&&window.addEventListener("message",a),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:s}),i()),()=>{"u">typeof window&&window.removeEventListener("message",a)}),[s,a,n,t,i]),null};var i=e.i(725287);let s=(0,e.i(695881).createLogger)("BlockHighlightOverlay"),o={position:"absolute",pointerEvents:"none",border:"2px solid #5B9BD5",backgroundColor:"rgba(91, 155, 213, 0.04)",borderRadius:"8px",boxShadow:"0 0 8px rgba(91, 155, 213, 0.3)",zIndex:"9999",transition:"opacity 150ms ease"},a=e=>{let r=(0,i.useRouter)();return(0,t.jsx)(n,{...e,refresh:r.refresh})};e.s(["LivePreviewListener",0,a],346267),e.i(346267),e.s(["BlockHighlightOverlay",0,()=>{let e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,r.useRef)(null),i=(0,r.useRef)(null),a=(0,r.useRef)(null),l=(0,r.useCallback)(()=>{if("u"{let r=t.current,i=e.current;if(!r||!i)return;if(!r.isConnected){t.current=null,i.style.opacity="0",n.current?.disconnect();return}let s=r.getBoundingClientRect();i.style.top=`${s.top+window.scrollY}px`,i.style.left=`${s.left+window.scrollX}px`,i.style.width=`${s.width}px`,i.style.height=`${s.height}px`,i.style.opacity="1"},[]),c=(0,r.useCallback)(()=>{t.current=null,a.current=null,e.current&&(e.current.style.opacity="0"),n.current?.disconnect()},[]),d=(0,r.useCallback)(()=>{t.current&&null===i.current&&(i.current=requestAnimationFrame(()=>{i.current=null,u()}))},[u]),f=(0,r.useCallback)(e=>{if(e===a.current)return;let r=document.querySelector(`[data-block-id="${CSS.escape(e)}"]`);if(!r)return void s.debug("No element found for block ID",{blockId:e});let i=(e=>{let t=e,r=t.getBoundingClientRect();for(let e=0;e{let t=e=>{var t;(e=>{if(e===window.location.origin)return!0;try{let{hostname:t}=new URL(e);return"weather.com"===t||t.endsWith(".weather.com")}catch{return!1}})(e.origin)&&"object"==typeof(t=e.data)&&null!==t&&"type"in t&&("wx:block-highlight-clear"===t.type||"wx:block-highlight"===t.type&&"blockId"in t&&"string"==typeof t.blockId)&&("wx:block-highlight"===e.data.type?f(e.data.blockId):c())};return window.addEventListener("message",t),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d,{passive:!0}),()=>{window.removeEventListener("message",t),window.removeEventListener("scroll",d),window.removeEventListener("resize",d),null!==i.current&&cancelAnimationFrame(i.current),n.current?.disconnect(),e.current?.remove()}},[f,c,d]),null},"LivePreviewListener",0,a],520362)},5397,e=>{"use strict";let t=(0,e.i(981030).atom)();e.s(["showAdminHeaderAtom",0,t])},752496,e=>{"use strict";var t=e.i(247865),r=e.i(609858);let n=(0,e.i(695881).createLogger)("DebugCollector");e.s(["DebugCollectorClient",0,function({componentName:e,data:i,page:s,onUpdateData:o,onSetPageData:a}){let{updateComponentData:l,setPageData:u}=(0,r.useDebugSystem)(),c=(0,t.useRef)(!1),d=o||l,f=a||u;return(0,t.useEffect)(()=>{if(i)return n.lifecycle(`Collecting component data for ${e}`,{dataKeys:Object.keys(i),hasPerformance:!!i.performance,hasContext:!!i.context}),d(e,{...i,_collectedAt:new Date().toISOString()}),()=>{n.lifecycle(`Cleaning up data for ${e}`),d(e,null)}},[e,i,d]),(0,t.useEffect)(()=>{s&&!c.current&&(n.lifecycle("Setting page metadata",{title:s.title,assetName:s.assetName,collection:s.collection}),f({...s,_updatedAt:new Date().toISOString()}),c.current=!0)},[s,f]),null}])},609858,674339,e=>{"use strict";var t=e.i(546446),r=e.i(247865);let n=(0,e.i(981030).atom)({timestamp:new Date().toISOString()});e.s(["debugDataAtom",0,n],674339),e.s(["useDebugSystem",0,function(){let[e,i]=(0,t.useAtom)(n),s=(0,r.useCallback)((e,t)=>{i(r=>{let n=r?.[e]||{},i="object"==typeof t&&null!==t&&"object"==typeof n?{...n,...t}:t;return{...r,[e]:i}})},[i]),o=(0,r.useCallback)((e,t)=>{i(r=>{let n=r||{timestamp:new Date().toISOString()},i=n.components||{};if(null===t){let t={...i};return delete t[e],{...n,components:t}}return{...n,components:{...i,[e]:t}}})},[i]),a=(0,r.useCallback)(e=>{s("page",e)},[s]),l=(0,r.useCallback)(e=>{s("route",e)},[s]),u=(0,r.useCallback)(e=>{Object.entries(e).forEach(([e,t])=>{t&&s(e,t)})},[s]);return{debugData:e,updateSection:s,updateComponentData:o,setPageData:a,clearAllDebugData:(0,r.useCallback)(()=>{i({timestamp:new Date().toISOString()})},[i]),updateRouteInfo:l,updatePageDebug:u}}],609858)},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),n=((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(n);let i={"usa-ut":"usa"},s=e=>e?i[e]??e:void 0;e.s(["RESTRICTIVE_REGIMES",0,["ca-qc","gdpr","latam-co","latam-do","latam-pe","lgpd","pipl","tr-kvkk"],"Regime",()=>n,"US_REGIMES",0,["usa","usa-ccpa","usa-co","usa-ct","usa-va"],"default",0,n,"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"])},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 n=(0,t.atom)(e=>e(r.userProfileAtom)?.email),i=(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,n,"userFirstNameAtom",0,i,"userGenderAtom",0,s])},249725,e=>{"use strict";var t=e.i(546446),r=e.i(247865),n=e.i(726249),i=e.i(310847);let s=Object.freeze({});function o(){let e=(0,t.useSetAtom)(i.wxuUserLocationFeatureIdsAtom);return(0,r.useCallback)((t,r)=>{let i=[];t.placeId&&i.push(t.placeId),t.geocode&&!r?.startsWith("address.")&&i.push((0,n.formatGeocode)(t.geocode)),0!==i.length&&e(e=>{let t=e??{};if(!i.some(e=>!(e in t)||t[e]!==r))return t;let n={...t};for(let e of i)n[e]=r;return n})},[e])}e.s(["useLocationFeatureIds",0,function(){let e=(0,t.useAtomValue)(i.wxuUserLocationFeatureIdsAtom)??s,a=(0,r.useCallback)(t=>{if(t.placeId){let r=e[t.placeId];if(r)return r}if(t.geocode){let r=e[(0,n.formatGeocode)(t.geocode)];if(r)return r}},[e]),l=(0,r.useCallback)(t=>t in e,[e]);return{featureIds:e,resolveFeatureId:a,hasResolvedPlaceId:l,recordFeatureId:o()}},"useRecordFeatureId",0,o])},776169,809991,e=>{"use strict";var t=e.i(546446),r=e.i(889753),n=e.i(301904),i=e.i(901351),s=e.i(310847),o=e.i(528600),a=e.i(617874),l=e.i(540768),u=e.i(553329),c=e.i(247865),d=e.i(245943);let f=(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,c.useCallback)(async r=>{if(!t)return!1;let{error:n}=await (0,u.tryCatch)(i.upsxClient.preference.updateMapSettings(e,r));if(!n)return!0;if(n instanceof d.APIError&&404===n.code){let{error:t}=await (0,u.tryCatch)(i.upsxClient.preference.createMapSettings(e,r));return!t||(f.warn("Failed to create map settings",t),!1)}return f.warn("Failed to update map settings",n),!1},[t,e])}}],809991),e.s(["usePreferences",0,function(){let{user:{isUserLoggedIn:e}}=(0,o.useUser)(),[c,d]=(0,t.useAtom)(r.userPreferencesAtom),[f,p]=(0,t.useAtom)(s.wxuUserPreferenceAtom),m=async()=>{let{data:e,error:t}=await (0,u.tryCatch)(i.upsxClient.preference.getMapSettings("twc"));if(t||!e)return null;let{animationSpeed:r,autoplay:n,opacity:s,roadOverlay:o,style:a}=e,l={...void 0!==r&&{animationSpeed:r},...void 0!==n&&{autoplay:n},...void 0!==s&&{opacity:s},...void 0!==o&&{roadOverlay:o},...void 0!==a&&{style:a}};return Object.keys(l).length>0?l:null},g=async e=>{try{await i.upsxClient.preference.updatePreference(e)}catch(e){return console.error("Failed to sync preferences with server:",e),null}},b=async(t,r=!0)=>{try{let n,i=(n={...c,...t},d(n),p({...f,...t,locations:n.locations}),n);if(t?.unit){let e=(0,a.unitsSystemByName)(t.unit),r=e?.code||"e";(0,l.setCookie)(a.UNITS_COOKIE_KEY,r,{domain:"weather.com"})}return r&&e&&await g(i),{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([i.upsxClient.preference.getPreference(),m()]);if(!e?.userID)return null;let{mapSettings:r,...s}=e,o={...s,mapSettings:{...n.DEFAULT_MAP_SETTINGS,...t}};return b(o,!1),o}catch{return null}},updatePreferences:b}}],776169)},145651,579310,e=>{"use strict";var t=e.i(546446),r=e.i(776169),n=e.i(981030),i=e.i(889753);let s=(0,e.i(174960).focusAtom)(i.userPreferencesAtom,e=>e.prop("locations")),o=(0,n.atom)(e=>e(i.userPreferencesAtom)?.locations||[]);(0,n.atom)(e=>{let t=e(o);return t?.find(e=>0===e.position)||t?.[0]||null}),(0,n.atom)(e=>(e(o)?.length||0)>0),e.s(["userLocationsAtom",0,s,"userLocationsGetAtom",0,o],579310);var a=e.i(310847),l=e.i(247865);let u=Object.freeze([]),c=Object.freeze([]);e.s(["default",0,()=>{let{updatePreferences:e}=(0,r.usePreferences)(),n=(0,t.useAtomValue)(s),i=(0,l.useMemo)(()=>n?[...n].sort((e,t)=>e.position-t.position):u,[n]),[o,d]=(0,t.useAtom)(a.wxuUserRecentLocationsAtom),[,f]=(0,t.useAtom)(a.wxuUserRecentAddressesAtom),p=(0,l.useCallback)(t=>{let r={...t,position:Math.max(...i.map(e=>e.position),0)+1};e({locations:[...i,r]})},[i,e]),m=(0,l.useCallback)(t=>{e({locations:i.filter(e=>e.placeID!==t)})},[i,e]),g=(0,l.useCallback)(e=>{d(t=>[e,...(t||[]).filter(t=>t!==e)].slice(0,5))},[d]),b=(0,l.useCallback)(e=>{d(t=>(t||[]).filter(t=>t!==e))},[d]),w=(0,l.useCallback)(()=>{d([])},[d]),A=(0,l.useCallback)(e=>{f(t=>(t||[]).filter(t=>t.placeId!==e))},[f]),h=(0,l.useCallback)(e=>{m(e),b(e),A(e)},[m,b,A]);return{addFavoriteLocation:p,removeFavoriteLocation:m,addRecentLocation:g,removeRecentLocation:b,removeRecentAddress:A,clearRecentLocations:w,deleteLocation:h,recentLocations:o||c,favoriteLocations:i}}],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])}]);