(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4036],{73:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>r});let r={src:"/_next/static/media/apple-icon-114x114.46b335fc.png",height:114,width:114,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAHlBMVEUAMZgzW61igcBDaLQPP599lstwjMUeSqVNcLilttsQcWCRAAAACXBIWXMAARlAAAEZQAGA43XUAAAAMElEQVR4nDXIxxEAIAzEwAtO9N8wD4NeOwJ+EQ9McY9n4SNVFtHykNNwSVISTZp2XA/JAJeZDGRwAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},925:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>r});let r={src:"/_next/static/media/apple-icon-152x152.7dd6518b.png",height:152,width:152,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAHlBMVEUAMZg6YbBkgsFHbLVTdbocSaQtV6t2kcgMPZ6Sp9OJ9+/PAAAACXBIWXMAARlAAAEZQAGA43XUAAAAMElEQVR4nDXGQQ4AIAgDsI0xwP9/2Gi0pwLfzEt18sZ60YpcHQW3JKbBjKPgokh6AxNmAKXMzsRIAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},1349:(e,l,t)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getCMSCollectionsUrlConfig=function(e){let{collectionId:l,locale:t="en_US"}=e;return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/collections/".concat(t,"/").concat(l)}},l.getCMSAssetByIDUrlConfig=function(e){let{language:l,assetId:t}=e;return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/a/".concat(l,"/").concat(t)}},l.getCMSOrderedCollectionsUrlConfig=function(e){let{collectionId:l,language:t="en_US"}=e;return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/ordered-collections/".concat(t,"/").concat(l)}},l.getCMSOrderedListUrlConfig=function(e){let{collectionId:l,language:t,collectionType:r}=e;return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/orderedlist/".concat(t,"/").concat(r,"/").concat(l)}},l.getCMSAssetsUrlConfig=function(e){let{language:l="en_US",query:t={},skip:n=0,limit:i=10,sort:s="-publishdate"}=e,o={q:Object.keys(t).reduce((e,l)=>{let r=t[l];return r instanceof Array?[...e,...r.map(e=>a(l,e))]:[...e,a(l,r)]},[]).join(";"),pg:"".concat(n,",").concat(i),format:"json",sort:s},c=(0,r.queryStringToSearchParams)(o).toString();return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/assets/".concat(l),search:"?".concat(c)}},l.getCMSAssetsRawQueryUrlConfig=function(e){let{language:l="en_US",query:t="",skip:a=0,limit:n=10,sort:i="-publishdate"}=e,s={q:t,pg:"".concat(a,",").concat(n),format:"json",sort:i},o=(0,r.queryStringToSearchParams)(s).toString();return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/assets/".concat(l),search:"?".concat(o)}},l.getCMSAssetsSlideshowUrlConfig=function(e){let{offset:l=0,assetId:t,limit:r=500}=e;return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/assets/slideshow/".concat(t,"/").concat(l,",").concat(r)}},l.getCMSQuickNavUrlConfig=function(){return{host:"dsx.weather.com",protocol:"https",pathname:"/cms/v4/settings/en_US/web/quick_nav"}};let r=t(24640);function a(e,l){let t="'".concat(l.$in,"'");return l.$in instanceof Array&&(t=l.$in.map(e=>"'".concat(e,"'")).join(",")),"".concat(e,":$in(").concat(t,")")}},3339:(e,l,t)=>{"use strict";l.O=i;let r=t(78821),a=t(24640),n=t(65725);async function i(e,l,t){let i=(0,a.urlFrom)((0,n.getMediaAssetsByIdUrlConfig)({assetId:e,limit:t,language:l})),s=await fetch(i,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300,tags:[e]}});return await (0,r.handleFetchResponse)(s)}},8818:(e,l,t)=>{"use strict";t.d(l,{SWRProvider:()=>i});var r=t(56707),a=t(9251),n=t(88180);let i=e=>{let{children:l,fallback:t={}}=e,[i]=(0,a.useState)(()=>new Map);return(0,a.useEffect)(()=>{try{let e=localStorage.getItem("app-cache");if(e){let l=JSON.parse(e);Array.isArray(l)&&l.forEach(e=>{let[l,t]=e;i.get(l)||i.set(l,t)})}}catch(e){console.error("Failed to load cache from localStorage:",e)}let e=()=>{try{let e=Array.from(i.entries());localStorage.setItem("app-cache",JSON.stringify(e))}catch(e){console.error("Failed to persist cache to localStorage:",e)}};window.addEventListener("beforeunload",e);let l=setInterval(e,3e4);return()=>{window.removeEventListener("beforeunload",e),clearInterval(l)}},[i]),(0,r.jsx)(n.BE,{value:{provider:()=>i,fallback:t},children:l})}},12630:e=>{e.exports={leftArrowGradient:"SavedLocationsBar_leftArrowGradient__soBkY",rightArrowGradient:"SavedLocationsBar_rightArrowGradient__gE4Zm"}},15836:(e,l,t)=>{"use strict";t.d(l,{B:()=>s});var r=t(56707),a=t(9251),n=t(74874);let i=(0,a.forwardRef)((e,l)=>{let{title:t,titleId:a,desc:n,descId:i,...s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":a,"aria-describedby":i,...s,children:[n?(0,r.jsx)("desc",{id:i,children:n}):null,void 0===t?(0,r.jsx)("title",{id:a,children:"Star"}):t?(0,r.jsx)("title",{id:a,children:t}):null,(0,r.jsx)("path",{fill:"currentColor",d:"M8 1 5.727 5.61.64 6.345l3.68 3.59L3.45 15 8 12.61 12.55 15l-.87-5.065 3.68-3.585-5.085-.74z"})]})}),s=a.forwardRef((e,l)=>(0,r.jsx)(n.h,{ref:l,icon:i,...e}));s.displayName="StarFilled"},20312:(e,l,t)=>{"use strict";t.d(l,{G:()=>s});var r=t(56707),a=t(9251),n=t(74874);let i=(0,a.forwardRef)((e,l)=>{let{title:t,titleId:a,desc:n,descId:i,...s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",ref:l,"aria-labelledby":a,"aria-describedby":i,...s,children:[n?(0,r.jsx)("desc",{id:i,children:n}):null,void 0===t?(0,r.jsx)("title",{id:a,children:"External Link"}):t?(0,r.jsx)("title",{id:a,children:t}):null,(0,r.jsx)("path",{d:"m19.395 3.83-6.82.145c-.423.009-.759-.327-.75-.75s.359-.774.783-.783l8.67-.184a.73.73 0 0 1 .75.75l-.184 8.67c-.009.423-.359.774-.783.783s-.759-.327-.75-.75l.145-6.82-8.625 8.625c-.306.306-.791.316-1.084.023s-.283-.778.023-1.084z"}),(0,r.jsx)("path",{d:"M2.614 7.334h8.966c.857 0 .857 1.348 0 1.348H3.954V20.06h11.657v-5.798c0-.921 1.337-.921 1.337 0v7.143H2.614z"})]})}),s=a.forwardRef((e,l)=>(0,r.jsx)(n.h,{ref:l,icon:i,...e}));s.displayName="ExternalLink"},20578:(e,l,t)=>{"use strict";t.d(l,{e:()=>m});var r=t(9251),a=t(10782),n=t(9933),i=t(77882),s=t(19981),o=t(63485),c=t(76279),d=t(95112),u=t(78628),h=t(58544);let m=()=>{var e,l,t,m,f;let v=(0,a.G)(),{user:{isUserLoggedIn:x,isUserPremium:p,subscriptionTier:w}}=(0,h.J)(),[g,A]=(0,r.useState)(!1),[b,y]=(0,r.useState)(!1),j=null!=p&&p,C=function(e){var l;return null!=(l=s.pj[e])?l:s.pj[s.C0.none]}(w),N=(0,n.md)(o.Mu),E=(0,n.md)(o.cc),R=(0,n.md)(d.pX),S=(0,n.md)(d.P9),M=u.A?(null==(l=window)||null==(e=l.DprSdk)?void 0:e.getUserConsent("sale-of-data"))!==!1:void 0,P=u.A?(null==(m=window)||null==(t=m.DprSdk)?void 0:t.getUserConsent("sensitive-data"))!==!1:void 0,U=null!=(f=(0,c.getCookie)("subscription"))?f:"",{productID:B=null,expirationDateTime:I=null,transactionDateTime:D=null,firstTransactionDateTime:k=null,autoRenew:T=null,price:L=null,productName:V=null}=(0,i.mT)(U)||{},z=(0,r.useMemo)(()=>({premium:j,premiumProductTier:C,premiumExpiration:I,premiumStart:D,premiumFirstTransactionDate:k,premiumProductId:B,premiumProductAutoRenew:T,premiumPrice:L,premiumProductName:V,isRegisteredUser:x||S||!1,isLoggedIn:x,"Amplitude.device_id":R,$Gender:E,$FirstName:N,saleOfDataAuthorization:M,sensitiveDataAuthorization:P,devUser:!1}),[j,C,I,D,k,B,T,L,V,R,x,S,N,E,M,P]);(0,r.useEffect)(()=>{(0,i.Js)(z)&&!g&&A(!0)},[z,g]);let H=(0,r.useCallback)(()=>{for(let e in z)void 0===z[e]&&delete z[e];if(v&&g&&!b){var e,l,t;let r=null==(t=window.mParticle)||null==(l=t.Identity)||null==(e=l.getCurrentUser)?void 0:e.call(l);if(!r)return void console.warn("MParticle: No current user");r.setUserAttributes(z),y(!0),console.debug("MParticle: User attributes set - ",z)}},[v,z,g,b]);return{userAttributes:z,setUserAttribute:(0,r.useCallback)((e,l)=>{var t,r,a;if(!v)return void console.warn("MParticle is not initialized");let n=null==(a=window.mParticle)||null==(r=a.Identity)||null==(t=r.getCurrentUser)?void 0:t.call(r);if(!n)return void console.warn("MParticle: No current user");n.setUserAttribute(e,l),console.debug("MParticle: User attribute set - ".concat(e))},[v]),setUserAttributes:H,removeUserAttribute:(0,r.useCallback)(e=>{var l,t,r;if(!v)return void console.warn("MParticle is not initialized");let a=null==(r=window.mParticle)||null==(t=r.Identity)||null==(l=t.getCurrentUser)?void 0:l.call(t);if(!a)return void console.warn("MParticle: No current user");a.removeUserAttribute(e),console.debug("MParticle: User attribute removed - ".concat(e))},[v])}}},23989:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>r});let r={src:"/_next/static/media/favicon-32x32.bbf0a733.png",height:32,width:32,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJFBMVEUCNJo9ZLI2Xq8cSaRlg8JMb7hdfb8AK5VwjMYxWa2AmcymuNvf8HwwAAAACXBIWXMAARlAAAEZQAGA43XUAAAANklEQVR4nEXGSQ4AMQwCQTB4S/7/35Fymb5UA3/djz2Od2It0EBe+8ws5EwyhXBV1QQUzCD1ARoaANnqff9JAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},25047:(e,l,t)=>{"use strict";l.p=void 0;let r=t(78821),a=t(24640),n=t(1349);l.p=async()=>{let e=(0,a.urlFrom)((0,n.getCMSQuickNavUrlConfig)()),l=await fetch(e,{headers:{"Accept-Encoding":"gzip"}});return await (0,r.handleFetchResponse)(l)}},25993:(e,l,t)=>{"use strict";t.d(l,{A:()=>n,b:()=>a});var r=t(1068);let a=()=>{let e=(0,r.useRouter)();return{navigate:function(l){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mpa:r=!0,replace:a=!1}=t;r?a?window.location.replace(l):window.location.href=l:a?e.replace(l):e.push(l)},refresh:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{mpa:t=!0}=l;t?window.location.reload():e.refresh()},router:e}},n=a},27739:(e,l,t)=>{"use strict";t.d(l,{f:()=>s});var r=t(56707),a=t(9251),n=t(74874);let i=(0,a.forwardRef)((e,l)=>{let{title:t,titleId:a,desc:n,descId:i,...s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":a,"aria-describedby":i,...s,children:[n?(0,r.jsx)("desc",{id:i,children:n}):null,void 0===t?(0,r.jsx)("title",{id:a,children:"Facebook"}):t?(0,r.jsx)("title",{id:a,children:t}):null,(0,r.jsx)("g",{clipPath:"url(#a)",children:(0,r.jsx)("path",{fill:"currentColor",d:"M8 0a8 8 0 0 0-1.932 15.765v-5.32h-1.65V8h1.65V6.947c0-2.723 1.232-3.985 3.905-3.985.507 0 1.382.1 1.74.198v2.216c-.19-.02-.518-.03-.925-.03-1.312 0-1.818.498-1.818 1.79V8h2.613l-.45 2.445H8.97v5.496A8 8 0 0 0 8 0"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"a",children:(0,r.jsx)("path",{fill:"currentColor",d:"M0 0h16v16H0z"})})})]})}),s=a.forwardRef((e,l)=>(0,r.jsx)(n.h,{ref:l,icon:i,...e}));s.displayName="Facebook"},27801:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>r});let r={src:"/_next/static/media/apple-icon-57x57.6d7d6f74.png",height:57,width:57,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAIVBMVEUBM5ligcA4X68rVKpGa7UAK5UWRaJ0j8eBmcxSdLmgs9lKEzI+AAAACXBIWXMAARlAAAEZQAGA43XUAAAAM0lEQVR4nEXGuREAIAzEwPtsA/0XzAwJSlbAr+rhRb/r0EABOeSaMcxI2g2R5B6jpUjpCxLXAK1UT5hqAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},28547:(e,l,t)=>{"use strict";t.d(l,{u:()=>r});let r=(0,t(28449).eU)("")},31194:(e,l,t)=>{"use strict";t.d(l,{default:()=>u});var r=t(56707),a=t(9251),n=t(77746),i=t(38098),s=t(13609),o=t(80068),c=t(73656),d=t(80637);let u=e=>{let{isUserLoggedIn:l,regime:t,privacyPolicyLink:u,deviceClass:h,experience:m,isPremiumUser:f}=e,v=(0,n.c3)("PrivacyConsentModal"),[x,p]=(0,a.useState)(!1),[w,g]=(0,a.useState)(!1),[A,b]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!d.Eq.includes(t)||f)return;let e=localStorage.getItem("gpcConflict"),r=localStorage.getItem("saleOfDataConflict");e?(g(!0),p(!0)):l&&r&&(b(!0),p(!0))},[t,f,l]);let y=async e=>{try{let l={purpose:e.purpose,consent:e.value,setByUser:!0};await o._.consent.createUserConsent(l),e.refreshAfterUpdate&&window.location.reload()}catch(e){console.error("Failed to update UPSX consent:",e)}},j=e=>{let t=window,r=window.top,a=t.DprSdk||(null==r?void 0:r.DprSdk);if(!a)return void console.error("Unable to fix conflict, missing DprSdk.");a.setUserConsents({[c.nb.SALE_OF_DATA]:e}),l&&y({purpose:c.nb.SALE_OF_DATA,value:e,refreshAfterUpdate:!0}),w?(localStorage.removeItem("gpcConflict"),l||window.location.reload()):A&&localStorage.removeItem("saleOfDataConflict"),p(!1)},C="",N="";if(w?(C="gpcConflictHeader",N="gpcConflictParagraph",t===d.uV.USA_CCPA&&(N+="_usa-ccpa")):A&&(C="saleOfDataConflictHeader",N="saleOfDataConflictParagraph",t===d.uV.USA_CCPA&&(N+="_usa-ccpa")),N)return(0,r.jsx)(s.lG,{open:x,onOpenChange:p,children:(0,r.jsxs)(s.Cf,{className:"text-center ".concat("desktop"!==h?"h-screen w-screen max-w-none rounded-none":"max-w-lg"," ").concat("wu"===m?"wu-theme":""," "),onEscapeKeyDown:e=>{(A||w)&&e.preventDefault()},onPointerDownOutside:e=>{e.preventDefault()},showCloseButton:!1,children:[C&&(0,r.jsx)(s.c7,{children:(0,r.jsx)(s.L3,{className:"text-xl font-semibold",children:v(C)})}),(0,r.jsx)("div",{className:"py-4",children:(0,r.jsx)("p",{className:"text-sm leading-relaxed",children:v.rich(N,{privacyPolicyLink:e=>(0,r.jsx)("a",{href:u,target:"_top",className:"text-blue-600 underline hover:text-blue-800",children:e})})})}),(0,r.jsxs)(s.Es,{className:"flex w-fit flex-col gap-3 justify-self-center",children:[(0,r.jsx)(i.$n,{onClick:()=>{j(!0)},variant:"default",className:"w-full sm:w-auto",children:v("optInButtonText")}),(0,r.jsx)(i.$n,{onClick:()=>{j(!1)},variant:"secondary",className:"w-full sm:w-auto",children:v("optOutButtonText")})]})]})})}},32403:(e,l,t)=>{"use strict";t.d(l,{default:()=>v});var r=t(56707),a=t(9251),n=t(53961);function i(e){var l;let{firstName:t,isPremium:a}=e,i=null==t||null==(l=t.charAt(0))?void 0:l.toUpperCase();return(0,r.jsxs)("div",{className:(0,n.cn)("relative flex h-8 w-8 items-center justify-center rounded-full border-1 border-gray-900 md:h-12 md:w-12"),children:[(0,r.jsx)("span",{className:(0,n.cn)("text-sm font-bold text-gray-900 md:text-base",{"translate-y-[-2.5px] md:translate-y-[-3px]":a}),children:i}),a&&(0,r.jsx)("span",{className:(0,n.cn)("absolute bottom-[-1px] left-[-1px] h-[9px] w-8 bg-white text-[6.25px] uppercase md:h-[13px] md:w-12 md:text-[10px]"),children:"Premium"})]})}var s=t(4414),o=t(49257),c=t(8082),d=t(38098),u=t(58544),h=t(9933),m=t(95112),f=t(59839);function v(){let{user:e,userProfile:l}=(0,u.J)(),t=(0,f.h)(),n=(0,h.md)(m.P9),{isUserLoggedIn:v,isUserPremium:x}=e,[p,w]=(0,a.useState)(!1);return(0,r.jsx)("div",{"data-testid":"header-profile",children:v?(0,r.jsxs)(c.AM,{trigger:"hover",openDelay:100,closeDelay:300,open:p,onOpenChange:w,children:[(0,r.jsx)(c.Wv,{asChild:!0,children:(0,r.jsx)("button",{className:"flex cursor-pointer bg-transparent","data-testid":"header-profile-button",children:(0,r.jsx)(i,{firstName:null==l?void 0:l.firstName,isPremium:x})})}),(0,r.jsx)(c.hl,{className:"z-2000001 p-0",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(o.default,{href:"/member/settings","data-testid":"header-profile-account",children:(0,r.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,r.jsx)(i,{firstName:null==l?void 0:l.firstName,isPremium:x}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(s.Ay,{variant:"Body.S",children:null==l?void 0:l.firstName}),(0,r.jsx)(s.Ay,{className:"text-sm text-gray-500 hover:text-gray-700","data-testid":"header-profile-account",children:"Manage Account"})]})]})}),!x&&(0,r.jsxs)("div",{className:"flex flex-col gap-3 border-t border-gray-200 p-4",children:[(0,r.jsx)(s.Ay,{variant:"Body.L",className:"font-semibold",children:"Unlock our full potential"}),(0,r.jsx)(s.Ay,{children:"Try our best radar and forecasting features for weather planning."}),(0,r.jsx)(o.default,{href:"/subscribe?tpcc=mktg-today-mainmenu-flyout",children:(0,r.jsx)(d.$n,{variant:"default",children:"Go Premium"})})]})]}),(0,r.jsx)("div",{className:"border-t border-gray-200 p-2",children:(0,r.jsx)(d.$n,{variant:"link",onClick:t,"data-testid":"header-profile-signout",children:"Sign Out"})})]})})]}):(0,r.jsx)(o.default,{href:n?"/login":"/signup",children:(0,r.jsx)(d.$n,{variant:"default",className:"whitespace-nowrap text-sm md:text-base py-0 px-3 md:px-4 h-8 md:h-12 font-bold bg-gray-900",children:n?"Sign in":"Sign up"})})})}},32469:(e,l,t)=>{"use strict";t.d(l,{default:()=>U});var r=t(56707),a=t(9251),n=t(74874);let i=(0,a.forwardRef)((e,l)=>{let{title:t,titleId:a,desc:n,descId:i,...s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":a,"aria-describedby":i,...s,children:[n?(0,r.jsx)("desc",{id:i,children:n}):null,void 0===t?(0,r.jsx)("title",{id:a,children:"Arrow Left"}):t?(0,r.jsx)("title",{id:a,children:t}):null,(0,r.jsx)("path",{fill:"currentColor",d:"M6.44 12.855a.499.499 0 0 0 .706-.705L3.708 8.707h9.585a.5.5 0 1 0 0-1H3.708l3.438-3.442a.499.499 0 0 0-.706-.705L2.5 7.5a1 1 0 0 0 0 1.415z"})]})}),s=a.forwardRef((e,l)=>(0,r.jsx)(n.h,{ref:l,icon:i,...e}));s.displayName="ArrowLeft";let o=(0,a.forwardRef)((e,l)=>{let{title:t,titleId:a,desc:n,descId:i,...s}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":a,"aria-describedby":i,...s,children:[n?(0,r.jsx)("desc",{id:i,children:n}):null,void 0===t?(0,r.jsx)("title",{id:a,children:"Arrow Right"}):t?(0,r.jsx)("title",{id:a,children:t}):null,(0,r.jsx)("path",{fill:"currentColor",d:"M9.56 3.56a.499.499 0 0 0-.706.705l3.438 3.443H2.707a.5.5 0 0 0 0 1h9.585L8.854 12.15a.499.499 0 0 0 .706.705l3.94-3.94a1 1 0 0 0 0-1.415z"})]})}),c=a.forwardRef((e,l)=>(0,r.jsx)(n.h,{ref:l,icon:o,...e}));c.displayName="ArrowRight";var d=t(58544),u=t(53961),h=t(12630),m=t.n(h),f=t(1419),v=t.n(f),x=t(15836),p=t(73184),w=t(52467),g=t(56414),A=t(25993),b=t(77860),y=t(53035),j=t(20877),C=t(9933),N=t(1068);let E=e=>{let{isFavorite:l,placeId:t,name:a,coordinate:n}=e,{user:i}=(0,d.J)(),{isUserLoggedIn:s}=i,{navigate:o}=(0,A.A)(),c=(e=>{let{effectiveLocation:l}=(0,j.s)({}),t=(null==l?void 0:l.placeId)||"",r=(0,N.usePathname)(),a=(0,C.md)(b.X),n=(0,y.n)({key:"today",interpolationArgs:{locId:e,locale:a}});return r.includes(e)?r.replace(t,e):n})(t),{addFavoriteLocation:u,removeFavoriteLocation:h,removeRecentLocation:m}=(0,g.A)();return(0,r.jsxs)("div",{className:"flex h-full max-w-75 shrink-[0] items-center gap-3 border-r-1 border-[#2524221A] px-3 text-nowrap",children:[(0,r.jsx)(v(),{href:c,children:a}),l?(0,r.jsx)("button",{className:"contents cursor-pointer",onClick:()=>h(t),children:(0,r.jsx)(x.B,{className:"h-[18px] w-[18px] text-[#fdc107]"})}):(0,r.jsx)("button",{className:"contents cursor-pointer",onClick:()=>{s?u({name:a,coordinate:n,placeID:t}):o("/signup")},children:(0,r.jsx)(p.F,{className:"h-[18px] w-[18px]"})}),(0,r.jsx)(R,{onDelete:()=>{h(t),m(t)}})]})};function R(e){let{onDelete:l}=e,t=(0,a.useRef)(null),[n,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e;return n&&(e=e=>{var l;(null==(l=t.current)?void 0:l.contains(e.target))?e.stopPropagation():i(!1)},document.addEventListener("click",e)),()=>{e&&document.removeEventListener("click",e)}},[n]),(0,r.jsxs)("div",{className:"relative flex items-center",children:[(0,r.jsx)("button",{className:"flex cursor-pointer items-center justify-center",onClick:e=>{e.stopPropagation(),i(!0)},children:(0,r.jsx)(w.C,{className:"h-5 w-5"})}),(0,r.jsx)("button",{ref:t,className:(0,u.cn)("bg-brand-400 invisible absolute -top-full -right-full !m-0 h-10 cursor-pointer rounded-lg border border-[#1b4de4] px-[14px] py-[6px] text-sm font-medium text-nowrap text-white opacity-0 transition-[right,opacity] duration-300 ease-out hover:bg-white hover:text-black",n&&"visible top-1/2 right-[10px] -translate-y-1/2 opacity-100"),onClick:l,children:"Delete"})]})}var S=t(31282),M=t(88180);let P=e=>{let{placeId:l}=e,t=(0,C.md)(b.X),{data:a}=(0,M.Ay)(l?["location-data",l]:null,()=>(0,S.$M)(l,t),{revalidateOnFocus:!1,dedupingInterval:3e5});if(!a)return null;let{city:n,latitude:i,longitude:s}=a.location;return(0,r.jsx)(E,{placeId:l,name:n,coordinate:"".concat(i,",").concat(s)})},U=()=>{let{user:e}=(0,d.J)(),{isUserLoggedIn:l}=e,{favoriteLocations:t,recentLocations:n}=(0,g.A)(),i=l?n:n.slice(0,1);i=i.filter(e=>!t.some(l=>{let{placeID:t}=l;return t===e}));let{effectiveLocation:o}=(0,j.s)({}),[h,f]=(0,a.useState)(0),v=(0,a.useRef)(null),x=(0,a.useRef)(null),p=((e,l)=>{if(!e.current)return 0;let t=Array.from(e.current.children);return 0===t.length?0:t[l].offsetLeft})(v,h),[,w]=(0,a.useState)(0),A=()=>w(e=>e+1);(0,a.useEffect)(()=>(window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)),[]),(0,a.useEffect)(()=>{A(),f(0)},[i.length,t.length]);let b=v.current&&x.current&&x.current.clientWidth+p