"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1345],{861:(e,t,l)=>{l.d(t,{default:()=>i});var a=l(21291);l(85659);var n=l(5430),r=l(65203),o=l(81716);let i=e=>{let{slides:t=[],settings:l={},id:i}=e;if(!(0,o.J)(t))return null;let s=[];for(let e of t){var d,c;if(!e.imageAsset){console.error("Slide missing imageAsset:",e);continue}let t=(0,r.bt)(e.imageAsset)?e.imageAsset:null;if(!t||!t.url){console.error("Invalid imageAsset or missing URL:",t);continue}let l={...t,seo:{...t.seo,caption:e.imageCaption||(null==(d=t.seo)?void 0:d.caption)||"",altText:e.imageTitle&&""!==e.imageTitle.trim()?e.imageTitle:(null==(c=t.seo)?void 0:c.altText)||""},...!e.imageTitle||""===e.imageTitle.trim()||/\.(jpg|jpeg|png|gif|webp|bmp|tiff|svg)$/i.test(e.imageTitle)||/^[A-Z0-9_]+\d*\.[a-zA-Z]+$/i.test(e.imageTitle)||/^[a-zA-Z0-9_-]+\d+$/i.test(e.imageTitle)||/[._][0-9]+/i.test(e.imageTitle)||/^[A-Z0-9_]+$/i.test(e.imageTitle)?{}:{filename:e.imageTitle}};s.push(l)}return 0===s.length?(console.error("SlideshowBlock - No valid assets after transformation"),(0,a.jsx)("div",{className:"text-center text-red-500",children:"Error: Could not load images for the slideshow."})):(0,a.jsx)(n.A,{id:i||"slideshow-".concat(Math.random().toString(36).substring(2,9)),assets:s.slice(0,20),allSlides:s,totalAssets:s.length,rounded:(null==l?void 0:l.rounded)||!1,blockType:"Slideshow",slides:t,settings:l,sendTrackString:()=>{}})}},6333:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getEmailPreferencesStatusUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/status"}},t.getEmailPreferencesSetUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/set"}},t.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:"weather.com",protocol:"https",pathname:"/api/v1/email-preferences/change-email"}}},17613:(e,t,l)=>{l.d(t,{default:()=>L});var a=l(21291),n=l(85659),r=l(85674),o=l(62016),i=l(17198),s=l(79343),d=l(18609),c=l(40776),u=l(24105),m=l(96477),v=l(73907),p=l(97166),f=l(82622);function g(e){let{className:t,...l}=e;return(0,a.jsx)(v.uB,{"data-slot":"command",className:(0,f.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...l})}function x(e){let{className:t,...l}=e;return(0,a.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,a.jsx)(p.A,{className:"size-4 shrink-0 opacity-50"}),(0,a.jsx)(v.uB.Input,{"data-slot":"command-input",className:(0,f.cn)("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",t),...l})]})}function h(e){let{className:t,...l}=e;return(0,a.jsx)(v.uB.List,{"data-slot":"command-list",className:(0,f.cn)("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",t),...l})}function b(e){let{className:t,...l}=e;return(0,a.jsx)(v.uB.Group,{"data-slot":"command-group",className:(0,f.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...l})}function y(e){let{className:t,...l}=e;return(0,a.jsx)(v.uB.Item,{"data-slot":"command-item",className:(0,f.cn)("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...l})}l(38156);var w=l(98738);function j(e){var t;let{label:l,placeholder:r,className:i,location:v,onChangeLocation:p}=e,[j,N]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),{isLoading:A,data:P}=function(e){let t=e.trim().length>0,{isLoading:l,data:a,error:n}=(0,c.Ay)(t?["search/locations",encodeURIComponent(e)]:null,async()=>await (0,d.SK)(e));return{isLoading:l,data:a,error:n}}((0,u.A)(k,300));return(0,a.jsxs)(m.AM,{open:j,onOpenChange:N,children:[(0,a.jsx)(m.Wv,{asChild:!0,children:(0,a.jsxs)(s.$n,{variant:"outline",role:"combobox",className:(0,f.cn)("text-muted-foreground flex w-full text-nowrap bg-white px-2",i),children:[(0,a.jsx)("div",{children:A?(0,a.jsx)(o.A,{className:"animate-spin"}):(0,a.jsx)(w.A,{})}),(0,a.jsx)("div",{className:"flex flex-1 px-2 text-start",children:null!=(t=null==v?void 0:v.displayName)?t:l})]})}),(0,a.jsx)(m.hl,{className:"w-[var(--radix-popover-trigger-width)]",showArrow:!1,children:(0,a.jsxs)(g,{shouldFilter:!1,children:[(0,a.jsx)(x,{placeholder:r,value:k,onValueChange:_}),(0,a.jsx)(h,{children:(0,a.jsx)(b,{children:null==P?void 0:P.map(e=>(0,a.jsx)(y,{value:e.locId,onSelect:()=>{null==p||p(e),N(!1)},children:e.address},e.locId))})})]})})]})}var N=l(18395);function k(e){let{label:t,error:l,className:n,...r}=e;return(0,a.jsxs)("div",{className:"w-full",children:[t&&(0,a.jsx)("label",{className:"text-sm",children:t}),(0,a.jsx)(N.p,{...r,className:l?"".concat(n," border-red-500"):n})]})}var _=l(91902);let A={"{{terms}}":{text:"Terms",url:"https://".concat("weather.com","/legal")},"{{privacy}}":{text:"Privacy Policy",url:"https://".concat("weather.com","/en-US/twc/privacy-policy")}},P=/\{\{(.*?)\}\}/g;function E(){return(0,a.jsx)("div",{className:"mt-4 text-xs",children:"By signing up you agree to the {{terms}} & {{privacy}}. Unsubscribe at any time.".split(P).map((e,t)=>{let l=A["{{".concat(e,"}}")];return l?(0,a.jsx)(_.default,{href:l.url,className:"underline",children:l.text},t):(0,a.jsx)("span",{children:e},t)})})}let I={src:"/_next/static/media/morning-brief-logo.73126316.svg"},C={src:"/_next/static/media/ellipse.b0c8befa.png"};var S=l(49161),T=l(68835),R=l(41761);async function U(e,t){let{arg:l}=t,{email:a,location:n,isAnonymous:r}=l,{location:o}=await (0,R.$M)(n.placeId).catch(()=>({location:null})),i={subscriptions:[{subscriptionGroupName:e,isSubscribed:!0,attributes:{location:n.placeId,latitude:n.latitude,longitude:n.longitude,dmaCode:(null==o?void 0:o.dmaCd)||null,adminDistrict:n.adminDistrict,adminDistrictCode:n.adminDistrictCode||null,postalCode:n.postalCode}}]};return r&&(i.email=a),(0,T.p_)(i)}var F=l(35853),D=l(54881);let M=()=>{var e,t;let{userProfile:l}=(0,F.J)(),[d,c]=(0,n.useState)(null!=(e=null==l?void 0:l.email)?e:""),[u,m]=(0,n.useState)(null),{data:v,loading:p,onSubmit:f,error:g}=function(){let{isMutating:e,trigger:t,data:l,error:a,reset:r}=(0,S.A)("daily-newsletters-1",U);return{loading:e,error:a,data:l,onSubmit:(0,n.useCallback)(async e=>{await t(e)},[t]),onReset:r}}(),x=(0,n.useCallback)(async e=>{e.preventDefault(),!p&&d.trim()&&u&&await f({email:d,location:u,isAnonymous:!(null==l?void 0:l.email)})},[f,d,u,p,null==l?void 0:l.email]);return(0,a.jsxs)("div",{style:{backgroundImage:'url("'.concat(C.src,'")'),backgroundPosition:"right top",backgroundRepeat:"no-repeat",backgroundSize:"70px"},className:"my-4 space-y-2 rounded-xl bg-white py-5 pl-5 pr-[30px] shadow-[0_3px_20px_0_rgba(181,171,162,0.5)]",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:gap-3",children:[(0,a.jsx)(D.A,{src:I.src,alt:"",className:"w-37.5 m-0",rounded:!1}),(0,a.jsx)("div",{className:"mb-1.5 hidden min-h-[24px] min-w-[2px] bg-black sm:block"}),(0,a.jsx)("div",{className:"text-lg font-semibold",children:"Weather in your inbox"})]}),(null==v?void 0:v.status)==="success"?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.A,{className:"h-6 w-6 text-green-500"}),(0,a.jsx)("div",{className:"text-sm text-gray-700",children:(0,a.jsx)("p",{children:"You are subscribed to the Morning Brief newsletter."})})]}):(0,a.jsxs)("form",{onSubmit:x,className:"flex flex-1 flex-col items-end gap-4 pt-4 lg:flex-row",children:[(0,a.jsx)(k,{id:"email",required:!0,type:"email",placeholder:"Email",className:"h-12",value:d,onChange:e=>c(e.target.value),error:!!(null==v?void 0:v.emailError),disabled:!!(null==l?void 0:l.email)}),(0,a.jsx)(j,{label:"Forecast Location",placeholder:"Search City or Zip Code",className:"h-12 items-center text-sm",location:u,onChangeLocation:m}),(0,a.jsx)("div",{children:(0,a.jsxs)(s.$n,{type:"submit",variant:"primary",className:"flex h-12 items-center gap-1 text-nowrap",disabled:p||!(d&&u),children:[(0,a.jsx)("span",{children:"Sign Up"}),p&&(0,a.jsx)(o.A,{className:"animate-spin"})]})})]}),g&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-500",children:[(0,a.jsx)(i.A,{className:"h-6 w-6 text-red-500"}),(0,a.jsx)("div",{className:"text-sm",children:g.message})]}),(null==v?void 0:v.status)==="error"&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-500",children:[(0,a.jsx)(i.A,{className:"h-6 w-6 text-red-500"}),(0,a.jsx)("div",{className:"text-sm",children:null!=(t=v.emailError)?t:v.error})]}),(0,a.jsx)(E,{})]})};M.displayName="MorningBriefBlock";let L=M},18395:(e,t,l)=>{l.d(t,{p:()=>r});var a=l(21291);l(85659);var n=l(82622);function r(e){let{className:t,type:l,...r}=e;return(0,a.jsx)("input",{type:l,"data-slot":"input",className:(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...r})}},23109:(e,t,l)=>{l.d(t,{default:()=>o});var a=l(21291);l(85659);var n=l(99012),r=l(91902);let o=e=>{let{label:t,url:l,variant:o="bg-gray-900",inline:i=!1,isAffiliate:s=!0}=e;return(0,a.jsx)("div",{className:i?"inline-block":"block",children:(0,a.jsx)(r.default,{href:l,target:"_blank",rel:s?"nofollow noopener noreferrer":"noopener",children:(0,a.jsx)(n.$n,{variant:o,inline:!1,className:"cursor-pointer whitespace-nowrap",children:t})})})}},24105:(e,t,l)=>{l.d(t,{A:()=>o,d:()=>r});var a=l(85659),n=l(80441);function r(e,t){let[l,r]=(0,a.useState)(e);return(0,a.useEffect)(()=>{let l=(0,n.s)(e=>{r(e)},t);return l(e),()=>{l.cancel()}},[e,t]),l}let o=r},26929:(e,t,l)=>{l.d(t,{default:()=>r});var a=l(21291);l(85659);var n=l(98140);let r=()=>(0,a.jsx)(n.A,{})},27117:(e,t,l)=>{l.d(t,{default:()=>n});var a=l(21291);l(85659);let n=()=>(0,a.jsx)("div",{children:"Live Blog Entries"})},28313:(e,t,l)=>{l.d(t,{default:()=>G});var a=l(21291),n=l(85659),r=l(40776),o=l(63594),i=l(71321),s=l(30145),d=l(93677);let c=(0,d.h)("AdUtils"),u=async e=>{let{player:t,user:l,ctx:a={}}=e;if(!t)return;if(null==l?void 0:l.isUserPremium)return void t.play();let n=await m(a);n?t.playAd(n):t.play()},m=async e=>{let t;if(!g())return null;let l=p(e),a=v({},e.iab);window.__Helios.emit("UPDATE_AD_UNIT_PATH",l);try{var n,r,o;null==(o=window.__Helios.modules)||null==(r=o.iabc)||null==(n=r.update)||n.call(r,{page:a,site:{v1:["IAB15-10_Weather"],v3:["390_Weather"]}})}catch(e){c.error("Error updating IABC parameters",e)}try{t=await f()}catch(e){t=null,c.error("Error getting ad tag",e)}return window.__Helios.emit("UPDATE_AD_UNIT_PATH",l),t},v=(e,t)=>{let l={...e};for(let e in t)Array.isArray(t[e])?(l[e]=[...l[e]||[],...t[e]],l[e]=[...new Set(l[e])]):"object"==typeof t[e]&&null!==t[e]?l[e]=v(l[e]||{},t[e]):l[e]=t[e];return l},p=e=>{let t=e.collectionAdZone||e.adzone||"video";return"".concat("/7646","/").concat("").concat("web_weather_us","/").concat(t)},f=async()=>{let e=[];try{var t;e=await (null==(t=window)?void 0:t.__Helios.video.requestVideoBids())}catch(e){c.error("Error getting video bids",e)}return await window.__Helios.modules.videoTag.createAdTag(e)},g=()=>{try{var e,t,l,a,n;return"function"==typeof(null==(t=window.__Helios)||null==(e=t.video)?void 0:e.requestVideoBids)&&"function"==typeof(null==(n=window.__Helios)||null==(a=n.modules)||null==(l=a.videoTag)?void 0:l.createAdTag)}catch(e){return!1}},x=e=>!!e.viewable,h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https";return e.replace(/^\/\//,"".concat(t,"://"))},b=e=>e?e.split("&").reduce((e,t)=>{let[l,a]=t.split("=");return l&&a&&(e[l]||(e[l]=[]),e[l].push(a)),e},{}):{},y=e=>{let{collectionId:t,videoIndex:l,videoId:a}=e||{};return{videoCount:l,videoId:a,collectionId:t}},w=e=>{let{adSystem:t,adId:l,adWrapperSystems:a,adWrapperIds:n}={adSystem:"",adId:"",adWrapperSystems:[],adWrapperIds:[],...e};if(j(t))return l;let r=a.findIndex(j);return r>=0&&r"GDFP"===e||"AdSense/AdX"===e;l(16466);var N=l(37811);let k=(0,d.h)("NewRelic");function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var l,a,n;null==(n=window)||null==(a=n.NREUM)||null==(l=a.addPageAction)||l.call(a,e,{...A(t,"meta.")})}catch(e){k.error("New Relic: sendReumEvent error",e instanceof Error?e.message:String(e))}}N.env.NEW_RELIC_RUM_ACCOUNT_ID,N.env.NEW_RELIC_RUM_APP_ID,N.env.NEW_RELIC_RUM_LICENSE_KEY;let A=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.fromEntries(Object.entries(e).map(e=>{let[l,a]=e;return["".concat(t).concat(l),a]}))},P=(0,d.h)("AdEvents"),E=new Set(["amznbid","crt_pb","hb_pb"]),I=[{eventName:"ready",callback:e=>{let{event:t}=e;_("videoReady",{isViewable:x(t),setupTime:t.setupTime})}},{eventName:"beforePlay",callback:async e=>{var t;let{event:l,player:a,isFirstPlayRef:n,user:r}=e;if(!(null==n?void 0:n.current))return;let o=a.getPlaylistItem(),i=null==o||null==(t=o.custom)?void 0:t.ctx;i.videoIndex=a.getPlaylistIndex(),_("videoBeforePlay",{...y(i),isViewable:x(l),playReason:l.playReason}),a.stop(),await u({player:a,user:r,ctx:i}),n.current=!1}},{eventName:"adRequest",callback:e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem(),r=null==n||null==(t=n.custom)?void 0:t.ctx,o={},i=y(r);try{let e=h(l.tag||""),t=new URL(e).searchParams.get("cust_params"),a=b(t);for(let e of Object.keys(a))E.has(e)&&(o["".concat("kv_").concat(e)]="".concat(a[e]))}catch(e){P.error("Error parsing cust_params",e)}_("videoAdRequest",{...i,isViewable:x(l),roll:l.adposition,...o})}},{eventName:"adStarted",callback:e=>{var t,l,a,n,r,o;let{event:i,player:s}=e,d=s.getPlaylistItem(),c=null==d||null==(t=d.custom)?void 0:t.ctx,{duration:u,adposition:m}=i,v=y(c),p="";try{let e=null==(o=i.ima)||null==(r=o.ad)?void 0:r.data;e&&(p=w(e))}catch(e){P.error("Error parsing ima ad data",e)}let f=!!(null==(n=i.ima)||null==(a=n.ad)||null==(l=a.data)?void 0:l.skippable);_("videoAdStart",{...v,isViewable:x(i),duration:u,roll:m,lineItemId:p,isSkippable:f})}},{eventName:"firstFrame",callback:e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem();_("videoStart",{...y(null==n||null==(t=n.custom)?void 0:t.ctx),isViewable:x(l),loadTime:l.loadTime})}},{eventName:"complete",callback:e=>{var t;let{player:l}=e,a=l.getPlaylistItem();_("videoComplete",{...y(null==a||null==(t=a.custom)?void 0:t.ctx)})}},{eventName:"adSkipped",callback:e=>{var t;let{player:l}=e,a=l.getPlaylistItem();_("videoAdSkip",{...y(null==a||null==(t=a.custom)?void 0:t.ctx)})}},{eventName:"playlistItem",callback:async e=>{var t;let{event:l,player:a,isFirstPlayRef:n,user:r}=e;if(null==n?void 0:n.current)return;let{item:o}=l,i=null==o||null==(t=o.custom)?void 0:t.ctx;i.videoIndex=a.getPlaylistIndex(),a.stop(),await u({player:a,user:r,ctx:i})}},{eventName:"adComplete",callback:async e=>{let{player:t}=e;t.play()}},{eventName:"adError",callback:async e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem();_("videoAdError",{...y(null==n||null==(t=n.custom)?void 0:t.ctx),message:l.message,code:l.code,vastCode:l.vastCode,roll:l.adposition}),P.error("Ad error occurred",l),a.play()}},{eventName:"error",callback:async e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem();_("videoError",{...y(null==n||null==(t=n.custom)?void 0:t.ctx),message:l.message,code:l.code}),P.error("Video Player error",l)}},{eventName:"setupError",callback:e=>{let{event:t}=e;_("videoSetupError",{message:t.message,code:t.code})}}],C="",S="",T=1,R=0,U=0,F={adImpression:!1,videoAttempt:!1,videoPlayed:!1,videoStarted:!1,videoCompleted:!1,videoEnd:!1};function D(){Object.keys(F).map(e=>{F[e]=!1}),R=0,U=0}let M=[{eventName:"ready",callback:e=>{let{player:t,trackVideoEvent:l}=e;window.addEventListener("beforeunload",()=>{F.videoStarted&&!F.videoEnd&&(l({eventName:"video-end",currentVideo:t.getPlaylistItem(),jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,contentWatchedSeconds:R,playReason:"",videoView:T}}),F.videoEnd=!0)})}},{eventName:"adImpression",callback:async e=>{let{event:t,player:l,trackVideoEvent:a}=e,n=l.getPlaylistItem();D(),console.debug("JW Player callback - adImpression eventSentFlags:",F),C=null==t?void 0:t.adtitle,F.adImpression=!0,n&&!F.videoAttempt&&a&&(a({eventName:"video-attempt",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}),F.videoAttempt=!0),n&&!F.videoPlayed&&a&&(a({eventName:"video-played",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}),F.videoPlayed=!0)}},{eventName:"viewable",callback:async e=>{let{event:t}=e;T=null==t?void 0:t.viewable}},{eventName:"playlistItem",callback:async e=>{let{player:t,trackVideoEvent:l}=e;if(F.videoStarted&&!F.videoCompleted&&!F.videoEnd){let e=t.getPlaylistIndex();l({eventName:"video-end",currentVideo:t.getPlaylistItem(e-1),jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,contentWatchedSeconds:R,playReason:"",videoView:T}}),F.videoEnd=!0}}},{eventName:"playAttempt",callback:async e=>{let{player:t,trackVideoEvent:l}=e,a=t.getPlaylistItem();F.adImpression||D(),S="",console.debug("JW Player callback - playAttempt eventSentFlags:",F),a&&!F.videoAttempt&&l&&(F.videoAttempt=!0,l({eventName:"video-attempt",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}))}},{eventName:"firstFrame",callback:async e=>{let{player:t,trackVideoEvent:l}=e;console.debug("JW Player callback - firstFrame eventSentFlags:",F);let a=t.getPlaylistItem();a&&!F.videoPlayed&&l&&(l({eventName:"video-played",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}),F.videoPlayed=!0),a&&!F.videoStarted&&l&&(l({eventName:"video-started",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}),F.videoStarted=!0)}},{eventName:"complete",callback:async e=>{let{player:t,trackVideoEvent:l}=e,a=t.getPlaylistItem();console.debug("JW Player callback - complete eventSentFlags:",F),a&&!F.videoCompleted&&l&&(l({eventName:"video-completed",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}}),F.videoCompleted=!0),F.videoStarted&&!F.videoEnd&&(l({eventName:"video-end",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,contentWatchedSeconds:R,playReason:"",videoView:T}}),F.videoEnd=!0)}},{eventName:"adStarted",callback:async e=>{let{event:t,player:l,trackVideoEvent:a}=e,n=l.getPlaylistItem();console.debug("JW Player callback - adStarted eventSentFlags:",F),C=null==t?void 0:t.adtitle,n&&a&&a({eventName:"ad-started",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}})}},{eventName:"adSkipped",callback:async e=>{let{player:t,trackVideoEvent:l}=e,a=t.getPlaylistItem();a&&l&&l({eventName:"ad-skipped",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}})}},{eventName:"adComplete",callback:async e=>{let{event:t,player:l,trackVideoEvent:a}=e,n=l.getPlaylistItem();console.debug("JW Player callback - adComplete eventSentFlags:",F),C=null==t?void 0:t.adtitle,n&&a&&a({eventName:"ad-complete",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:C,errorMessage:S,playReason:"",videoView:T}})}},{eventName:"adError",callback:async e=>{let{event:t}=e;console.error("Video ad error:",t)}},{eventName:"error",callback:async e=>{let{event:t}=e;S=null==t?void 0:t.message,console.error("Video Player error:",t)}},{eventName:"time",callback:e=>{let{event:t}=e;if("number"==typeof(null==t?void 0:t.position)){let e=t.position-U;R+=e,U=t.position}}},{eventName:"seek",callback:e=>{let{event:t}=e;"number"==typeof(null==t?void 0:t.offset)&&(U=t.offset)}}];var L=l(60009),O=l(1524),B=l(68639),V=l(35729),z=l(84849),J=l(1679);let W=()=>{let e=(0,J.q)(),t=(0,O.N)({effectiveLocation:e}),l=(0,z.A)(),a=(0,B.usePathname)();return(0,n.useCallback)(e=>{var n,r,o,i,s,d,c,u,m,v,p,f,g,x,h,b,y,w,j,N,k,_,A,P,E,I,C,S,T,R,U,F,D,M,O;let{eventName:B,currentVideo:z,jwPlayer:J,eventAttributes:W={}}=e;if(!L.A.isInitialized())return void console.warn("MParticle is not initialized");let $={adBlock:J.getAdBlock(),adsMetricsUnitAndZone:null==z||null==(r=z.custom)||null==(n=r.ctx)?void 0:n.adzone,aspectRatio:null==J||null==(o=J.getConfig())?void 0:o.aspectratio,assetName:(0,V.EY)(null!=(M=null==z||null==(s=z.custom)||null==(i=s.ctx)?void 0:i.assetName)?M:""),author:(null==l?void 0:l.author)||"",collection:null==z||null==(c=z.custom)||null==(d=c.ctx)?void 0:d.pcollid,collectionId:null==z||null==(m=z.custom)||null==(u=m.ctx)?void 0:u.pcollid,contentId:(null==l?void 0:l.contentId)||(null==z||null==(p=z.custom)||null==(v=p.ctx)?void 0:v.id),entitlements:(0,V.X$)(null!=(O=null==z||null==(g=z.custom)||null==(f=g.ctx)?void 0:f.entitlements)?O:[]),iabContent:(0,V.IA)((null==z||null==(h=z.custom)||null==(x=h.ctx)?void 0:x.iab)||{}),id:null==z||null==(y=z.custom)||null==(b=y.ctx)?void 0:b.id,duration:null==z||null==(j=z.custom)||null==(w=j.ctx)?void 0:w.duration,lastmodifieddate:null==z||null==(k=z.custom)||null==(N=k.ctx)?void 0:N.lastmodifieddate,muted:J.getMute(),premiumContent:null==z||null==(A=z.custom)||null==(_=A.ctx)?void 0:_.premium,publishdate:null==z||null==(E=z.custom)||null==(P=E.ctx)?void 0:P.publishdate,providerName:null==z||null==(C=z.custom)||null==(I=C.ctx)?void 0:I.providername,tagsGeo:(0,V.X$)(null==z||null==(T=z.custom)||null==(S=T.ctx)?void 0:S.tagsGeo),tagsKeyword:(0,V.X$)(null==z||null==(U=z.custom)||null==(R=U.ctx)?void 0:R.tagsKeyword),tagsStorm:(0,V.X$)(null==z||null==(D=z.custom)||null==(F=D.ctx)?void 0:F.tagsStorm),teaserTitle:"",title:"",...t,...W,url:a?(0,V.EY)(a):""};try{L.A.logEvent(B,L.A.EventType.Other,$),console.debug('MParticle: Video Event tracked - "'.concat(B,'"'),$)}catch(e){console.error('MParticle: Failed to track Video Event - "'.concat(B,'"'),e)}},[null==l?void 0:l.author,null==l?void 0:l.contentId,t,a])};var $=l(13487),H=l(81716),Z=l(82622),q=l(35853);let X=async e=>{let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch video data from ".concat(e));return t.json()},G=e=>{var t;let{file:l,image:d,title:c,description:u,tracks:m=[],playlist:v,custom:p={},playerSettings:f,descriptionAttributes:g,videoReference:x,playlistsReference:h=[]}=e,b="video-player-".concat((0,n.useId)()),y=(0,n.useRef)(!0),w=(0,n.useRef)(null),j=(null==(t=(0,q.J)())?void 0:t.user)||{},{data:N,error:k}=(0,r.Ay)(x&&"string"==typeof x?"/api/payload/videos/".concat(x):null,X,{revalidateOnFocus:!1,dedupingInterval:3e5}),_=W(),A=(0,n.useMemo)(()=>{let e=[];return!Array.isArray(m)&&(null==m?void 0:m.file)?e.push(m):Array.isArray(m)&&e.push(...m),e},[m]),P=(0,n.useMemo)(()=>N&&Object.keys(N).length>0||x&&"string"!=typeof x,[N,x]),E=(0,n.useMemo)(()=>N&&Object.keys(N).length>0?N:x&&"string"!=typeof x?x:null,[N,x]),C=(0,n.useMemo)(()=>{var e,t,a,n,r,o,i,s,d;return P&&(null==E||null==(t=E.content)||null==(e=t.videoFormatUrls)?void 0:e.length)>0?(null==E||null==(n=E.content)||null==(a=n.defaultFormat)?void 0:a.url)?null==E||null==(d=E.content)||null==(s=d.defaultFormat)?void 0:s.url:null==E||null==(i=E.content)||null==(o=i.videoFormatUrls)||null==(r=o[0])?void 0:r.url:l},[P,E,l]),S=(0,n.useMemo)(()=>{if(P){var e;return(null==E||null==(e=E.content)?void 0:e.keyFrameImage)||d}return d},[P,E,d]),T=(0,n.useMemo)(()=>P&&(null==E?void 0:E.title)||c,[P,E,c]),R=(0,n.useMemo)(()=>(P&&(null==E||E.description),u),[P,E,u]),U=(0,n.useMemo)(()=>{if(w.current&&JSON.stringify({file:C,image:S,title:T,description:R,tracks:A,playlist:v,custom:p})===JSON.stringify(w.current))return w.current;let e=S||(C?(0,i.e)(C):null)||"/placeholder.jpg",t={file:C,image:e,title:T,description:R,tracks:A,custom:p};return w.current=t,t},[C,S,T,R,A,v,p]),F=(0,n.useMemo)(()=>{var e,t,l,a;let n=[];return v&&(n=(0,s.K)(v,U)||[]),h&&h.length,P&&(null==E||null==(e=E.content)?void 0:e.playlists)&&Array.isArray(null==E||null==(t=E.content)?void 0:t.playlists)&&(null==E||null==(a=E.content)||null==(l=a.playlists)||l.length),n.length>0?n:[U]},[v,U,h,E,P]);if((0,n.useEffect)(()=>{y.current=!0},[F]),x&&"string"==typeof x&&!N&&!k)return(0,a.jsx)("div",{className:"flex h-32 items-center justify-center bg-gray-100",children:(0,a.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-b-2 border-t-2 border-gray-900"})});if(k)return(0,a.jsx)("div",{className:"flex h-32 items-center justify-center bg-red-100 text-red-800",children:(0,a.jsx)("span",{children:"Failed to load video data"})});if(!C)return null;let D=[...I,...M].map(e=>{let{eventName:t,callback:l}=e;return{eventName:t,callback:e=>{let{event:t,player:a}=e;return l({event:t,player:a,isFirstPlayRef:y,user:j,trackVideoEvent:_})}}});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($.DebugCollector,{componentName:"VideoBlock",data:{props:{file:l,image:d,title:c,description:u,tracksCount:(0,H.J)(A),hasPlaylist:!!v&&v.length>0,custom:p},state:{videoObject:U,playlistItems:F.length,isFirstPlay:y.current,events:D.map(e=>e.eventName)},performance:{}}}),(0,a.jsx)(o.h,{playlist:F,events:D},b),(null==f?void 0:f.showDescriptions)&&(0,a.jsx)("p",{...g,className:(0,Z.cn)("my-2 text-sm",null==g?void 0:g.className),children:U.title})]})}},32325:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(85659),n=l(54591),r=l(35853),o=l(87836);let i=()=>{try{var e,t,l,a;if(void 0!==(null==(e=window)?void 0:e.DprSdk)){let e=null==(l=window)||null==(t=l.DprSdk)?void 0:t.getFeatureFlags();return null==(a=null==e?void 0:e.taboola)||a}return!0}catch(e){return!0}},s=function(){let{DISCONNECTED_user:e}=(0,r.J)(),[t,l]=(0,a.useState)(!1),s=(0,n.md)(o.W);return(0,a.useEffect)(()=>{s&&l(i())},[s]),t&&!(null==e?void 0:e.isUserPremium)}},38156:(e,t,l)=>{l.d(t,{Cf:()=>c,L3:()=>u,LC:()=>d,ZJ:()=>s,lG:()=>i});var a=l(21291);l(85659);var n=l(73335),r=l(5506),o=l(82622);function i(e){let{...t}=e;return(0,a.jsx)(n.bL,{"data-slot":"dialog",...t})}function s(e){let{...t}=e;return(0,a.jsx)(n.ZL,{"data-slot":"dialog-portal",...t})}function d(e){let{className:t,...l}=e;return(0,a.jsx)(n.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...l})}function c(e){let{className:t,children:l,...i}=e;return(0,a.jsxs)(s,{"data-slot":"dialog-portal",children:[(0,a.jsx)(d,{}),(0,a.jsxs)(n.UC,{"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[l,(0,a.jsxs)(n.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[(0,a.jsx)(r.A,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function u(e){let{className:t,...l}=e;return(0,a.jsx)(n.hE,{"data-slot":"dialog-title",className:(0,o.cn)("text-lg font-semibold leading-none",t),...l})}},61226:(e,t,l)=>{l.d(t,{A:()=>n});let a="atmosphere/reviews";function n(e){var t;return!!(null==e||null==(t=e.category)?void 0:t.value)&&("string"==typeof e.category.value?e.category.value===a:e.category.value.id===a)}},65203:(e,t,l)=>{l.d(t,{bt:()=>a});function a(e){return"object"==typeof e&&null!==e&&"url"in e}},68835:(e,t,l)=>{t.p_=o;let a=l(94987),n=l(19352),r=l(6333);async function o(e){let t=(0,r.getEmailPreferencesSetUrlConfig)(),l=(0,a.urlFrom)(t),o=JSON.stringify(function(e){let{subscriptions:t,email:l,mParticleId:a}=e,n={};return t&&(n.subscriptions=t),l&&(n.email=l),a&&(n.mParticleId=a),n}(e)),i=await fetch(l,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:o});if(200===i.status||400===i.status){let e=await i.json();return console.log({json:e}),e}return(0,n.handleFetchResponse)(i)}},74101:(e,t,l)=>{l.d(t,{default:()=>r});var a=l(21291),n=l(85659);let r=e=>{let{entryMethod:t,tweetURL:l,tweetId:r,showThread:o}=e,i=(0,n.useRef)(null),s=(0,n.useCallback)(()=>"id"===t&&r?"https://twitter.com/i/status/".concat(r):"url"===t&&l?l.replace("x.com","twitter.com"):null,[t,r,l]);return(0,n.useEffect)(()=>{let e=s();if(e)if(i.current&&(i.current.innerHTML='\n

\n \n
\n ')),window.twttr&&window.twttr.widgets)window.twttr.widgets.load(i.current);else{let e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",e.async=!0,document.body.appendChild(e),e.onload=()=>window.twttr.widgets.load(i.current)}},[s,r,l,t,o]),(0,a.jsx)("div",{className:"flex items-center",ref:i})}},75316:(e,t,l)=>{l.r(t),l.d(t,{TaboolaBlock:()=>f,default:()=>g});var a=l(21291),n=l(85659),r=l(68639),o=l(81717),i=l(13487),s=l(32325),d=l(16466);function c(e){let{url:t,scriptId:l}=e;return window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("tbl_ic"),(0,a.jsx)(d.default,{async:!0,id:l,src:t})}function u(e){let{pageType:t,placements:l,pageUrl:a}=e;return(0,n.useEffect)(()=>{window._taboola=window._taboola||[],window._taboola.push({[t]:"auto",url:a}),l.forEach(e=>{window._taboola.push({...e})}),window._taboola.push({flush:!0})},[t,a,l]),null}let m=()=>{window._taboola&&window._taboola.push({notify:"newPageLoad"})};var v=l(82622),p=l(61226);let f=e=>{let{placements:t,pageType:l,className:d="",article:f}=e,g=(0,s.A)(),x=(0,r.usePathname)(),h=(0,p.A)(f),b="//cdn.taboola.com/libtrc/theweatherchannel/loader.js";(0,n.useEffect)(()=>{if(!h&&g&&b)return()=>{m()}},[g,b,h]);let y=(0,n.useMemo)(()=>{let e=(0,o.y)();return"".concat(e).concat(x||"")},[x]);return!h&&g&&b?(0,a.jsxs)("section",{className:(0,v.cn)("@container",d),children:[g&&b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c,{url:b,scriptId:"tb_loader_script"}),(0,a.jsx)(u,{pageType:l,placements:t,pageUrl:y})]}),(0,a.jsx)(i.DebugCollector,{componentName:"TaboolaBlock",data:{props:{placements:t,loaderUrl:b,pageType:l,className:d}}})]}):null},g=f},76229:(e,t,l)=>{l.d(t,{default:()=>i});var a=l(21291);l(85659);var n=l(90302),r=l(91902),o=l(65203);let i=e=>{let{title:t,image:l,subtitle:i,bodyText:s,ctaButton:d}=e,c=(null==d?void 0:d.url)&&/^https?:\/\//i.test(d.url),u=(0,o.bt)(l)?l:null;return t||u&&(null==u?void 0:u.url)||i||s||d?(0,a.jsxs)("div",{className:"overflow-hidden rounded-lg bg-white",children:[t&&(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)("h3",{className:"text-xl font-semibold text-gray-900",children:t})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(null==u?void 0:u.url)?(0,a.jsx)("div",{className:"relative aspect-[42/13] w-full overflow-hidden bg-white px-4 pt-4",children:(0,a.jsx)("div",{className:"relative h-full w-full overflow-hidden rounded-lg",children:(0,a.jsx)("a",{href:d&&d.url||"#",children:(0,a.jsx)(n.default,{src:u.url,alt:t||"Promo image",fill:!0,className:"object-cover"})})})}):null,(i||s||d)&&(0,a.jsxs)("div",{className:"p-4",children:[i&&(0,a.jsx)("a",{href:d&&d.url||"#",children:(0,a.jsx)("h4",{className:"mb-2 text-base font-bold",children:i})}),s&&(0,a.jsx)("a",{href:d&&d.url||"#",children:(0,a.jsx)("p",{className:"mb-4 text-base",children:s})}),d&&(0,a.jsx)("div",{className:"flex justify-end",children:c?(0,a.jsx)("a",{href:d.url||"#",target:d.openInNewTab?"_blank":"_self",rel:d.openInNewTab?"noopener noreferrer":"",className:"inline-block max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap rounded-lg bg-black px-4 py-2 text-base font-normal text-white",children:d.text}):(0,a.jsx)(r.default,{href:d.url||"#",target:d.openInNewTab?"_blank":"_self",className:"inline-block max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap rounded-lg bg-black px-4 py-2 text-base font-normal text-white",children:d.text})})]})]})]}):null}},79421:(e,t,l)=>{l.d(t,{default:()=>s});var a=l(21291);l(85659);var n=l(29680),r=l(41761),o=l(46163),i=l(40776);let s=e=>{let{locationProvider:t,locationEntry:l}=e,s=e=>(0,r.PT)(e),{data:d,error:c,isLoading:u}=(0,i.Ay)("specified"===t&&l?["specified-location-data",l]:null,()=>l?s(l):null,{revalidateOnFocus:!1,dedupingInterval:3e5});return"specified"===t&&u?(0,a.jsx)("div",{children:"Loading location data..."}):"specified"===t&&c?(0,a.jsxs)("div",{children:["Error loading location data: ",c.message]}):"specified"===t&&d&&l?(0,a.jsx)(n.default,{location:(0,o.I)(d)}):"specified"!==t?(0,a.jsx)(n.default,{}):null}},81717:(e,t,l)=>{l.d(t,{y:()=>r});var a=l(19515),n=l(37811);let r=()=>{if(a.A){let e=window.location.protocol,t=window.location.hostname,l=window.location.port;return"".concat(e,"//").concat(t).concat(l?":".concat(l):"")}return n.env.VERCEL_PROJECT_PRODUCTION_URL?"production"===n.env.VERCEL_ENV?"https://weather.com":"https://".concat(n.env.VERCEL_PROJECT_PRODUCTION_URL):n.env.NEXT_PUBLIC_SERVER_URL||""}},84849:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(54591),n=l(35729),r=l(27357),o=l(85659);let i=()=>{var e,t;let l=(0,a.md)(r.$);return(0,o.useMemo)(()=>{var e,t,a,r,o,i,s;return{author:(0,n.FU)(null==l?void 0:l.authors),createdDate:null==l||null==(t=l.createdAt)||null==(e=t.substr)?void 0:e.call(t,0,10),contentId:null==l?void 0:l.id,collection:null==l||null==(a=l.category)?void 0:a.value,teaserTitle:"",publishDate:null==l||null==(o=l.publishDate)||null==(r=o.substr)?void 0:r.call(o,0,10),entitlements:(0,n.X$)(null!=(s=null==l||null==(i=l.coreMetadata)?void 0:i.entitlements)?s:[]),title:"",seoTitle:""}},[null==l?void 0:l.authors,null==l||null==(e=l.category)?void 0:e.value,null==l||null==(t=l.coreMetadata)?void 0:t.entitlements,null==l?void 0:l.createdAt,null==l?void 0:l.id,null==l?void 0:l.publishDate])}},85881:(e,t,l)=>{l.d(t,{default:()=>c});var a=l(21291),n=l(85659),r=l(91902),o=l(82622),i=l(54881);let s=n.forwardRef((e,t)=>{let{src:l,alt:n,caption:r,credit:s,width:d=320,height:c=180,shadow:u=!0,rounded:m=!0,className:v,sizes:p,priority:f,imageAttributes:g}=e,x=!!(r||s);return(0,a.jsxs)("figure",{ref:t,className:(0,o.cn)(v),children:[(0,a.jsx)(i._,{src:l,alt:n,width:d,height:c,shadow:u,rounded:m,sizes:p,priority:f,...g}),x&&(0,a.jsxs)("figcaption",{className:"mt-2 text-sm leading-tight",children:[r&&(0,a.jsx)("p",{className:"",children:r}),s&&(0,a.jsxs)("p",{className:"text-gray-500",children:["(",s,")"]})]})]})});s.displayName="Figure";let d=e=>"object"==typeof e&&null!==e&&"url"in e,c=e=>{var t,l,n;let{imageType:i,internalImageId:c,externalImageUrl:u,controls:m,altText:v,isPriorityImage:p,imageAttributes:f,linkUrl:g}=e;if(!i||!c&&!u)return(0,a.jsx)("div",{className:"text-center text-red-500",children:"Error: Missing data for the image block."});let x="internal"===i&&d(c),h=x?(null==c?void 0:c.url)||"":u||"",b=x?(null==c||null==(t=c.seo)?void 0:t.altText)||"":v||"",y="",w="";(null==m?void 0:m.showCaption)&&((!x||(null==m?void 0:m.useImageCaption))&&"external"!==i?x&&(y=(null==c||null==(l=c.seo)?void 0:l.caption)||"",w=(null==c||null==(n=c.seo)?void 0:n.credit)||""):(y=(null==m?void 0:m.caption)||"",w=(null==m?void 0:m.credit)||""));let j=(0,a.jsx)(s,{src:h,alt:b,caption:y,credit:w,priority:!!p,className:(0,o.cn)("my-4 flex flex-col",{"max-w-[480px]":(null==m?void 0:m.width)==="half"}),sizes:"(max-width: 767px) 91vw, (max-width: 1280px) 64vw, 800px",imageAttributes:f});return g?(0,a.jsx)(r.default,{href:g,target:"_blank",rel:"noopener noreferrer nofollow",children:j}):j}},87836:(e,t,l)=>{l.d(t,{W:()=>i,default:()=>d});var a=l(21291),n=l(16466),r=l(78785),o=l(70555);let i=(0,o.eU)(!1);function s(){if(window.top===window.self)window.DprSdk&&(window.DprSdk.init({getApplicationInfo:()=>({id:"weather.com",version:"2.0.0"}),getUserRegime:()=>(0,r.getCookie)("twc-privacy")}),(0,o.zp)().set(i,!0));else try{var e;(null==(e=window.top)?void 0:e.DprSdk)&&(window.DprSdk=window.top.DprSdk)}catch(e){}}function d(){return(0,a.jsx)(n.default,{async:!0,src:"https://weather.com/api/v1/script/dprSdkScript.js",onLoad:s})}}}]);