"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4998],{2631:(e,t,l)=>{l.d(t,{y:()=>r});var a=l(43641),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||""}},12207:(e,t,l)=>{l.d(t,{default:()=>r});var a=l(93486);l(35550);var n=l(37140);let r=()=>(0,a.jsx)(n.A,{})},17499:(e,t,l)=>{l.d(t,{default:()=>r});var a=l(93486),n=l(35550);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})}},21051:(e,t,l)=>{l.d(t,{default:()=>s});var a=l(93486);l(35550);var n=l(68133),r=l(52331),o=l(96322),i=l(67146);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}},22015:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(35550),n=l(52493),r=l(76075),o=l(43646);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)}},29717:(e,t,l)=>{l.d(t,{bt:()=>a});function a(e){return"object"==typeof e&&null!==e&&"url"in e}},42123:(e,t,l)=>{l.d(t,{default:()=>i});var a=l(93486);l(35550);var n=l(52003),r=l(29717),o=l(4478);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:()=>{}})}},42894:(e,t,l)=>{l.d(t,{default:()=>Z});var a=l(93486),n=l(35550),r=l(67146),o=l(55265),i=l(49807),s=l(49255),d=l(1087);let c=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 u(a);n?t.playAd(n):t.play()},u=async e=>{let t;if(!g())return null;let l=v(e),a=m({},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){d.debugLogger.error("Ad Utils","Error updating IABC parameters",e)}try{t=await p()}catch(e){t=null,d.debugLogger.error("Video Block","Error getting ad tag",e)}return window.__Helios.emit("UPDATE_AD_UNIT_PATH",l),t},m=(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]=m(l[e]||{},t[e]):l[e]=t[e];return l},v=e=>{let t=e.collectionAdZone||e.adzone||"video";return"".concat("/7646","/").concat("").concat("web_weather_us","/").concat(t)},p=async()=>{let e=[];try{var t;e=await (null==(t=window)?void 0:t.__Helios.video.requestVideoBids())}catch(e){d.debugLogger.error("Ad Utils","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}},f=e=>!!e.viewable,x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https";return e.replace(/^\/\//,"".concat(t,"://"))},h=e=>e?e.split("&").reduce((e,t)=>{let[l,a]=t.split("=");return l&&a&&(e[l]||(e[l]=[]),e[l].push(a)),e},{}):{},b=e=>{let{collectionId:t,videoIndex:l,videoId:a}=e||{};return{videoCount:l,videoId:a,collectionId:t}},y=e=>{let{adSystem:t,adId:l,adWrapperSystems:a,adWrapperIds:n}={adSystem:"",adId:"",adWrapperSystems:[],adWrapperIds:[],...e};if(w(t))return l;let r=a.findIndex(w);return r>=0&&r"GDFP"===e||"AdSense/AdX"===e;l(18673);var j=l(37811);function N(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,{...k(t,"meta.")})}catch(e){d.debugLogger.error(e instanceof Error?e.message:String(e),"New Relic: sendReumEvent error")}}j.env.NEW_RELIC_RUM_ACCOUNT_ID,j.env.NEW_RELIC_RUM_APP_ID,j.env.NEW_RELIC_RUM_LICENSE_KEY;let k=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]}))},_=new Set(["amznbid","crt_pb","hb_pb"]),A=[{eventName:"ready",callback:e=>{let{event:t}=e;N("videoReady",{isViewable:f(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(),N("videoBeforePlay",{...b(i),isViewable:f(l),playReason:l.playReason}),a.stop(),await c({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=b(r);try{let e=x(l.tag||""),t=new URL(e).searchParams.get("cust_params"),a=h(t);for(let e of Object.keys(a))_.has(e)&&(o["".concat("kv_").concat(e)]="".concat(a[e]))}catch(e){d.debugLogger.error("VideoBlock","Error parsing cust_params",e)}N("videoAdRequest",{...i,isViewable:f(l),roll:l.adposition,...o})}},{eventName:"adStarted",callback:e=>{var t,l,a,n,r,o;let{event:i,player:s}=e,c=s.getPlaylistItem(),u=null==c||null==(t=c.custom)?void 0:t.ctx,{duration:m,adposition:v}=i,p=b(u),g="";try{let e=null==(o=i.ima)||null==(r=o.ad)?void 0:r.data;e&&(g=y(e))}catch(e){d.debugLogger.error("VideoBlock","Error parsing ima ad data",e)}let x=!!(null==(n=i.ima)||null==(a=n.ad)||null==(l=a.data)?void 0:l.skippable);N("videoAdStart",{...p,isViewable:f(i),duration:m,roll:v,lineItemId:g,isSkippable:x})}},{eventName:"firstFrame",callback:e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem();N("videoStart",{...b(null==n||null==(t=n.custom)?void 0:t.ctx),isViewable:f(l),loadTime:l.loadTime})}},{eventName:"complete",callback:e=>{var t;let{player:l}=e,a=l.getPlaylistItem();N("videoComplete",{...b(null==a||null==(t=a.custom)?void 0:t.ctx)})}},{eventName:"adSkipped",callback:e=>{var t;let{player:l}=e,a=l.getPlaylistItem();N("videoAdSkip",{...b(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 c({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();N("videoAdError",{...b(null==n||null==(t=n.custom)?void 0:t.ctx),message:l.message,code:l.code,vastCode:l.vastCode,roll:l.adposition}),d.debugLogger.error("VideoBlock","Ad error occurred",l),a.play()}},{eventName:"error",callback:async e=>{var t;let{event:l,player:a}=e,n=a.getPlaylistItem();N("videoError",{...b(null==n||null==(t=n.custom)?void 0:t.ctx),message:l.message,code:l.code}),d.debugLogger.error("VideoBlock","Video Player error",l)}},{eventName:"setupError",callback:e=>{let{event:t}=e;N("videoSetupError",{message:t.message,code:t.code})}}],P="",E="",I=1,C=0,S=0,T={adImpression:!1,videoAttempt:!1,videoPlayed:!1,videoStarted:!1,videoCompleted:!1,videoEnd:!1};function R(){Object.keys(T).map(e=>{T[e]=!1}),C=0,S=0}let U=[{eventName:"ready",callback:e=>{let{player:t,trackVideoEvent:l}=e;window.addEventListener("beforeunload",()=>{T.videoStarted&&!T.videoEnd&&(l({eventName:"video-end",currentVideo:t.getPlaylistItem(),jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,contentWatchedSeconds:C,playReason:"",videoView:I}}),T.videoEnd=!0)})}},{eventName:"adImpression",callback:async e=>{let{event:t,player:l,trackVideoEvent:a}=e,n=l.getPlaylistItem();R(),console.debug("JW Player callback - adImpression eventSentFlags:",T),P=null==t?void 0:t.adtitle,T.adImpression=!0,n&&!T.videoAttempt&&a&&(a({eventName:"video-attempt",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}),T.videoAttempt=!0),n&&!T.videoPlayed&&a&&(a({eventName:"video-played",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}),T.videoPlayed=!0)}},{eventName:"viewable",callback:async e=>{let{event:t}=e;I=null==t?void 0:t.viewable}},{eventName:"playlistItem",callback:async e=>{let{player:t,trackVideoEvent:l}=e;if(T.videoStarted&&!T.videoCompleted&&!T.videoEnd){let e=t.getPlaylistIndex();l({eventName:"video-end",currentVideo:t.getPlaylistItem(e-1),jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,contentWatchedSeconds:C,playReason:"",videoView:I}}),T.videoEnd=!0}}},{eventName:"playAttempt",callback:async e=>{let{player:t,trackVideoEvent:l}=e,a=t.getPlaylistItem();T.adImpression||R(),E="",console.debug("JW Player callback - playAttempt eventSentFlags:",T),a&&!T.videoAttempt&&l&&(T.videoAttempt=!0,l({eventName:"video-attempt",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}))}},{eventName:"firstFrame",callback:async e=>{let{player:t,trackVideoEvent:l}=e;console.debug("JW Player callback - firstFrame eventSentFlags:",T);let a=t.getPlaylistItem();a&&!T.videoPlayed&&l&&(l({eventName:"video-played",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}),T.videoPlayed=!0),a&&!T.videoStarted&&l&&(l({eventName:"video-started",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}),T.videoStarted=!0)}},{eventName:"complete",callback:async e=>{let{player:t,trackVideoEvent:l}=e,a=t.getPlaylistItem();console.debug("JW Player callback - complete eventSentFlags:",T),a&&!T.videoCompleted&&l&&(l({eventName:"video-completed",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}}),T.videoCompleted=!0),T.videoStarted&&!T.videoEnd&&(l({eventName:"video-end",currentVideo:a,jwPlayer:t,eventAttributes:{adtitle:P,errorMessage:E,contentWatchedSeconds:C,playReason:"",videoView:I}}),T.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:",T),P=null==t?void 0:t.adtitle,n&&a&&a({eventName:"ad-started",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}})}},{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:P,errorMessage:E,playReason:"",videoView:I}})}},{eventName:"adComplete",callback:async e=>{let{event:t,player:l,trackVideoEvent:a}=e,n=l.getPlaylistItem();console.debug("JW Player callback - adComplete eventSentFlags:",T),P=null==t?void 0:t.adtitle,n&&a&&a({eventName:"ad-complete",currentVideo:n,jwPlayer:l,eventAttributes:{adtitle:P,errorMessage:E,playReason:"",videoView:I}})}},{eventName:"adError",callback:async e=>{let{event:t}=e;console.error("Video ad error:",t)}},{eventName:"error",callback:async e=>{let{event:t}=e;E=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-S;C+=e,S=t.position}}},{eventName:"seek",callback:e=>{let{event:t}=e;"number"==typeof(null==t?void 0:t.offset)&&(S=t.offset)}}];var L=l(37353),F=l(51694),D=l(95228),M=l(38107),B=l(50667),V=l(717);let O=()=>{let e=(0,V.q)(),t=(0,F.N)({effectiveLocation:e}),l=(0,B.A)(),a=(0,D.usePathname)();return(0,n.useCallback)(e=>{var n,r,o,i,s,d,c,u,m,v,p,g,f,x,h,b,y,w,j,N,k,_,A,P,E,I,C,S,T,R,U,F,D,B,V;let{eventName:O,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,M.EY)(null!=(B=null==z||null==(s=z.custom)||null==(i=s.ctx)?void 0:i.assetName)?B:""),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,M.X$)(null!=(V=null==z||null==(f=z.custom)||null==(g=f.ctx)?void 0:g.entitlements)?V:[]),iabContent:(0,M.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,M.X$)(null==z||null==(T=z.custom)||null==(S=T.ctx)?void 0:S.tagsGeo),tagsKeyword:(0,M.X$)(null==z||null==(U=z.custom)||null==(R=U.ctx)?void 0:R.tagsKeyword),tagsStorm:(0,M.X$)(null==z||null==(D=z.custom)||null==(F=D.ctx)?void 0:F.tagsStorm),teaserTitle:"",title:"",...t,...W,url:a?(0,M.EY)(a):""};try{L.A.logEvent(O,L.A.EventType.Other,$),console.debug('MParticle: Video Event tracked - "'.concat(O,'"'),$)}catch(e){console.error('MParticle: Failed to track Video Event - "'.concat(O,'"'),e)}},[null==l?void 0:l.author,null==l?void 0:l.contentId,t,a])};var z=l(25129),J=l(4478),W=l(60896),$=l(76075);let H=async e=>{let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch video data from ".concat(e));return t.json()},Z=e=>{var t;let{file:l,image:d,title:c,description:u,tracks:m=[],playlist:v,custom:p={},playerSettings:g,descriptionAttributes:f,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,$.J)())?void 0:t.user)||{},{data:N,error:k}=(0,r.Ay)(x&&"string"==typeof x?"/api/payload/videos/".concat(x):null,H,{revalidateOnFocus:!1,dedupingInterval:3e5}),_=O(),P=(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]),E=(0,n.useMemo)(()=>N&&Object.keys(N).length>0||x&&"string"!=typeof x,[N,x]),I=(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 E&&(null==I||null==(t=I.content)||null==(e=t.videoFormatUrls)?void 0:e.length)>0?(null==I||null==(n=I.content)||null==(a=n.defaultFormat)?void 0:a.url)?null==I||null==(d=I.content)||null==(s=d.defaultFormat)?void 0:s.url:null==I||null==(i=I.content)||null==(o=i.videoFormatUrls)||null==(r=o[0])?void 0:r.url:l},[E,I,l]),S=(0,n.useMemo)(()=>{if(E){var e;return(null==I||null==(e=I.content)?void 0:e.keyFrameImage)||d}return d},[E,I,d]),T=(0,n.useMemo)(()=>E&&(null==I?void 0:I.title)||c,[E,I,c]),R=(0,n.useMemo)(()=>(E&&(null==I||I.description),u),[E,I,u]),L=(0,n.useMemo)(()=>{if(w.current&&JSON.stringify({file:C,image:S,title:T,description:R,tracks:P,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:P,custom:p};return w.current=t,t},[C,S,T,R,P,v,p]),F=(0,n.useMemo)(()=>{var e,t,l,a;let n=[];return v&&(n=(0,s.K)(v,L)||[]),h&&h.length,E&&(null==I||null==(e=I.content)?void 0:e.playlists)&&Array.isArray(null==I||null==(t=I.content)?void 0:t.playlists)&&(null==I||null==(a=I.content)||null==(l=a.playlists)||l.length),n.length>0?n:[L]},[v,L,h,I,E]);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=[...A,...U].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)(z.DebugCollector,{componentName:"VideoBlock",data:{props:{file:l,image:d,title:c,description:u,tracksCount:(0,J.J)(P),hasPlaylist:!!v&&v.length>0,custom:p},state:{videoObject:L,playlistItems:F.length,isFirstPlay:y.current,events:D.map(e=>e.eventName)},performance:{}}}),(0,a.jsx)(o.h,{playlist:F,events:D},b),(null==g?void 0:g.showDescriptions)&&(0,a.jsx)("p",{...f,className:(0,W.cn)("my-2 text-sm",null==f?void 0:f.className),children:L.title})]})}},43646:(e,t,l)=>{l.d(t,{W:()=>i,default:()=>d});var a=l(93486),n=l(18673),r=l(60675),o=l(13601);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})}},48448:(e,t,l)=>{l.d(t,{default:()=>M});var a=l(93486),n=l(35550),r=l(17976),o=l(33454),i=l(7144),s=l(40749),d=l(43043),c=l(67146),u=l(57207),m=l(16717),v=l(14098),p=l(84472),g=l(60896);function f(e){let{className:t,...l}=e;return(0,a.jsx)(v.uB,{"data-slot":"command",className:(0,g.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,g.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,g.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,g.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,g.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(91210);var w=l(36624);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,g.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)(f,{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(91046);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(46748);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(26907),T=l(49561),R=l(52331);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 L=l(76075),F=l(9935);let D=()=>{var e,t;let{userProfile:l}=(0,L.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:g,error:f}=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 g({email:d,location:u,isAnonymous:!(null==l?void 0:l.email)})},[g,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)(F.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"})]})})]}),f&&(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:f.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,{})]})};D.displayName="MorningBriefBlock";let M=D},49561:(e,t,l)=>{t.p_=o;let a=l(77149),n=l(58238),r=l(70067);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)}},50667:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(52493),n=l(38107),r=l(85643),o=l(35550);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])}},52931:(e,t,l)=>{l.d(t,{default:()=>n});var a=l(93486);l(35550);let n=()=>(0,a.jsx)("div",{children:"Live Blog Entries"})},55518:(e,t,l)=>{l.d(t,{default:()=>c});var a=l(93486),n=l(35550),r=l(46748),o=l(60896),i=l(9935);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:g,imageAttributes:f}=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:g,...f}),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:g,linkUrl:f}=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:g});return f?(0,a.jsx)(r.default,{href:f,target:"_blank",rel:"noopener noreferrer nofollow",children:j}):j}},57207:(e,t,l)=>{l.d(t,{A:()=>o,d:()=>r});var a=l(35550),n=l(64669);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},58419:(e,t,l)=>{l.d(t,{default:()=>i});var a=l(93486);l(35550);var n=l(86039),r=l(46748),o=l(29717);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}},70067:(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"}}},85851:(e,t,l)=>{l.d(t,{default:()=>o});var a=l(93486);l(35550);var n=l(63326),r=l(46748);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})})})}},91046:(e,t,l)=>{l.d(t,{p:()=>r});var a=l(93486);l(35550);var n=l(60896);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})}},91210:(e,t,l)=>{l.d(t,{Cf:()=>c,L3:()=>u,LC:()=>d,ZJ:()=>s,lG:()=>i});var a=l(93486);l(35550);var n=l(75561),r=l(41428),o=l(60896);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})}},99451:(e,t,l)=>{l.d(t,{default:()=>p});var a=l(93486),n=l(35550),r=l(95228),o=l(2631),i=l(25129),s=l(22015),d=l(18673);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(60896);let p=e=>{let{placements:t,pageType:l,className:d=""}=e,p=(0,s.A)(),g=(0,r.usePathname)(),[f,x]=(0,n.useState)(!1),h="//cdn.taboola.com/libtrc/theweatherchannel/loader.js";(0,n.useEffect)(()=>{if(p&&h)return x(!1),()=>{m()}},[p,h]);let b=(0,n.useMemo)(()=>{let e=(0,o.y)();return"".concat(e).concat(g||"")},[g]);return p&&h?(0,a.jsxs)("section",{className:(0,v.cn)("@container",d),children:[p&&h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c,{url:h,scriptId:"tb_loader_script"}),(0,a.jsx)(u,{pageType:l,placements:t,pageUrl:b})]}),(0,a.jsx)(i.DebugCollector,{componentName:"TaboolaBlock",data:{props:{placements:t,loaderUrl:h,pageType:l,className:d},state:{loaded:f}}})]}):null}}}]);