(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4002],{11936:e=>{e.exports={partnerByline:"ArticlePartnerDisclaimer_partnerByline__i9hhJ"}},13725:(e,t,n)=>{"use strict";n.d(t,{WeatherLocationTickerClientComponent:()=>p});var o=n(16852),a=n(77976),s=n(62468),r=n(69770),l=n(628),i=n(38038),c=n(66864),d=n(17690),u=n(47887),m=n(29590);function p(e){var t;let{node:n}=e,[p,h]=(0,a.useState)(null),[g,f]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),y=(0,i.md)(u.Yt),w=null==(t=(0,m.xP)(y))?void 0:t.code,{data:x,error:C}=(0,s.Ay)(n.geocode?["currentConditions",n.geocode,w]:null,async e=>{let[t,n,o]=e;try{return await (0,r.z)({geocode:n,units:o,language:"en-US"})}catch(e){return console.error("Error fetching weather:",e),null}},{revalidateOnFocus:!1,dedupingInterval:3e5});(0,a.useEffect)(()=>{x?(h(Math.round(x.temperature)),f(!1)):C&&(v(C),f(!1))},[x,C]);let S=n.placeId?"/weather/today/l/".concat(n.placeId):"#";return(0,o.jsxs)("a",{href:S,className:"inline-flex items-center gap-1",children:[(0,o.jsx)("span",{className:"border-b-2 border-dotted border-black",children:n.locationName}),g?(0,o.jsx)("span",{className:"text-gray-400",children:"..."}):b?(0,o.jsx)("span",{className:"text-gray-400",children:"!"}):(0,o.jsxs)("span",{className:"inline-flex items-center rounded-full bg-gray-100 px-2",children:[(null==x?void 0:x.iconCode)!==void 0&&(0,o.jsx)("span",{className:"flex items-center",children:"na"!==(l.ICON_CODE_MAP[x.iconCode]||"na")?(0,o.jsx)(c.WxIcon,{iconCode:x.iconCode,className:"lightBG","aria-label":l.ICON_CODE_MAP[x.iconCode]||"Weather condition ".concat(x.iconCode),iconTheme:"lightBG",size:"sm"}):(0,o.jsx)(d.Y,{className:"lightBG","aria-label":"Weather icon not available",size:"sm"})}),(0,o.jsxs)("span",{className:"font-medium",children:[p,"\xb0"]})]})]})}},21215:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});let o=(0,n(31887).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},44261:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var o=n(16852),a=n(77976);class s{async getAccount(e){let t=(null==e?void 0:e.maxRetries)||3,n=(null==e?void 0:e.delayMs)||500,o=null;for(let e=1;esetTimeout(e,t));continue}throw o}let l=await r.json();return console.log("OpenWebSdkClient - getAccount - Account found (attempt ".concat(e,"/").concat(t,"):"),l),l}catch(a){if(console.error("OpenWebSdkClient - getAccount - Error (attempt ".concat(e,"/").concat(t,"):"),a),a instanceof TypeError&&a.message.includes("fetch"))return console.log("OpenWebSdkClient - getAccount - Network error, treating as no account (attempt ".concat(e,"/").concat(t,")")),null;if(o=a instanceof Error?a:Error(String(a)),esetTimeout(e,t));continue}throw o}if(o)throw o;return null}async getCodeB(e,t,n,o){let a=(null==o?void 0:o.maxRetries)||2,s=(null==o?void 0:o.delayMs)||500,r=null,l=e?e.split("?")[0]:"";if(!l)throw Error("Invalid codeA: codeA is required to complete the SSO process");for(let e=1;esetTimeout(e,t));continue}throw r}let u=await d.json();return console.log("OpenWebSdkClient - getCodeB - Success, codeB received (attempt ".concat(e,"/").concat(a+1,"):"),u.codeB?"present":"missing"),u.codeB}catch(t){if(console.error("OpenWebSdkClient - getCodeB - Error (attempt ".concat(e,"/").concat(a+1,"):"),t),r=t instanceof Error?t:Error(String(t)),esetTimeout(e,t));continue}throw r}if(r)throw r;return""}constructor(){this.baseUrl="https://upsx.weather.com"}}let r=new s;var l=n(65659),i=n(1990);let c=(0,a.forwardRef)((e,t)=>{let{title:n,titleId:a,desc:s,descId:r,...l}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-label":"The Weather Company - Home",viewBox:"0 0 432.96 399.36",ref:t,"aria-labelledby":a,"aria-describedby":r,...l,children:[s?(0,o.jsx)("desc",{id:r,children:s}):null,void 0===n?(0,o.jsx)("title",{id:a,children:"The Weather Channel"}):n?(0,o.jsx)("title",{id:a,children:n}):null,(0,o.jsx)("path",{d:"M152.48 347.3c0 4.02 2.48 6.71 5.9 6.71 2.51 0 5.01-1.3 7.01-3.52l.21-11.03h-.62c-9.31 0-12.5 1.74-12.5 7.84M165.2 144c0-3.81-.4-5.81-1.61-7.72-1.3-1.99-3.2-3.01-5.9-3.01-5.12 0-8.04 4.02-8.04 11.13v.19h15.54V144zm7.82 109.49c0 4.01 2.52 6.72 5.94 6.72 2.5 0 5.01-1.32 7.01-3.52l.21-11.03h-.6c-9.34.01-12.56 1.73-12.56 7.83m-34.34-17.25c0-3.81-.41-5.8-1.6-7.7-1.32-2.02-3.22-3.03-5.94-3.03-5.11 0-8 4.03-8 11.14v.19h15.53v-.6zM316 319.32c-5.1 0-8.01 4.02-8.01 11.15v.19h15.54v-.59c0-3.82-.39-5.83-1.59-7.72-1.32-2.02-3.22-3.03-5.94-3.03"}),(0,o.jsx)("path",{d:"M372.65 228.54c-1.33-.7-2.41-1.01-3.91-1.01-3.02 0-5.74 1.4-8.21 4.3v36.3h-13.46v-34.3c0-6.9-.8-12.13-1.9-15.02l12.02-3.24c1.21 2.11 1.9 4.44 2.12 7.32 1.92-2.59 5.09-5.4 7.63-6.51 1.1-.49 2.9-.81 4.38-.81 2.02 0 2.92.2 5.03 1.11zM360.2 363.13c-5.73 0-10.32-2.69-11.94-7.03-1.01-2.59-1.21-4.18-1.21-11.5v-38.29c0-6.72-.19-10.82-.69-15.45l13.73-3.11c.5 2.81.71 6.14.71 13.33v40c0 8.82.1 10.02.88 11.42.5.89 1.62 1.39 2.72 1.39.5 0 .79 0 1.49-.18l2.3 8.02c-2.29.9-5.08 1.4-7.99 1.4m-22.42-116.48h-29.67v.44c0 7.91 3.91 12.41 10.83 12.41 4.61 0 8.92-1.71 13.03-5.11l5.21 8.04c-5.91 4.8-12.12 7.1-19.34 7.1-14.73 0-24.25-10.43-24.25-26.55 0-9.24 1.89-15.35 6.4-20.35 4.22-4.72 9.33-6.92 16.14-6.92 5.92 0 11.53 1.99 14.85 5.4 4.7 4.83 6.81 11.76 6.81 22.47v3.07zm-.32 93.83H307.8v.41c0 7.9 3.92 12.42 10.83 12.42 4.62 0 8.91-1.72 13.02-5.12l5.23 8.04c-5.92 4.8-12.13 7.1-19.35 7.1-14.74 0-24.26-10.43-24.26-26.55 0-9.23 1.9-15.35 6.4-20.35 4.22-4.73 9.33-6.92 16.14-6.92 5.9 0 11.53 2.01 14.84 5.42 4.71 4.8 6.81 11.73 6.81 22.43zm-50.78-72.34h-13.13v-34.5c0-5.09-1.4-7.01-5.21-7.01-3.31 0-7.63 2.01-10.62 4.73v36.78h-13.63v-59.35c0-4.82-.4-9.61-1-11.73l13.73-3.21c.59 2.81.9 7.61.9 12.52v10.22c0 1.61-.2 3.72-.2 4.32 3.51-3.31 9.31-5.52 14.54-5.52 6.51 0 11.72 2.81 13.33 7.31.99 2.94 1.3 4.63 1.3 9.54v35.9zm-2.73 93.8h-13.23v-33.38c0-5.81-1.01-7.52-4.51-7.52-2.7 0-6.22 1.82-9.31 4.62v36.28h-13.45v-37.19c0-4.41-.6-8.61-1.79-12.04l11.95-3.4c1.18 2.1 1.88 4.31 1.88 6.41 2.01-1.38 3.72-2.6 5.91-3.81 2.73-1.39 6.23-2.19 9.22-2.19 5.71 0 10.73 2.99 12.32 7.42.74 1.9 1.02 4.11 1.02 7.31v37.49zm-57.3-92.61c-6.81 0-12.23-2.99-13.83-7.52-.8-2.23-.9-3.23-.9-7.92v-27.88h-5.11v-9.21h5.11c0-5 0-8.34.5-12.13l13.64-3.4c-.5 4.69-.8 10.32-.8 15.54h12.04l-3.42 9.21h-8.61v25.78c0 6.51 1.19 8.22 5.81 8.22 1.2 0 2.41-.32 4.81-1.01l1.7 8.01c-3.94 1.61-7.43 2.31-10.94 2.31m4.99 92.61H218.4v-33.38c0-5.81-1.01-7.52-4.51-7.52-2.7 0-6.19 1.82-9.32 4.62v36.28h-13.44v-37.19c0-4.41-.58-8.61-1.77-12.04l11.92-3.4c1.2 2.1 1.91 4.31 1.91 6.41 1.99-1.38 3.69-2.6 5.9-3.81 2.7-1.39 6.21-2.19 9.21-2.19 5.72 0 10.74 2.99 12.33 7.42.71 1.9 1.02 4.11 1.02 7.31v37.49zm-55.28-91.9c-11.45 0-17.65-5.83-17.65-16.06 0-12.03 8.31-17.63 24.63-17.63 1.01 0 1.92 0 3.01.09v-2.11c0-5.69-1.09-7.61-6-7.61-4.3 0-9.32 2.13-14.83 5.85l-5.72-9.65c2.72-1.71 4.71-2.71 8.34-4.19 5-2.12 9.32-3.01 14.02-3.01 8.61 0 14.54 3.21 16.55 8.91.69 2.1.99 3.7.89 9.22l-.29 17.26v.9c0 5.5.89 7.58 4.8 10.51l-7.11 8.22c-3.11-1.31-5.92-3.59-7.22-6.22-1 .98-2.11 2.01-3.11 2.71-2.51 1.8-6.11 2.81-10.31 2.81m.06 94.51c-3.1-1.31-5.92-3.61-7.21-6.23-1.01 1.02-2.11 2.01-3.11 2.72-2.51 1.81-6.11 2.8-10.33 2.8-11.43 0-17.65-5.82-17.65-16.02 0-12.04 8.33-17.67 24.67-17.67 1 0 1.91 0 3.01.1v-2.08c0-5.74-1.1-7.63-6.03-7.63-4.32 0-9.34 2.11-14.83 5.82l-5.73-9.64c2.72-1.7 4.73-2.69 8.34-4.19 5.02-2.12 9.32-3.01 14.05-3.01 8.59 0 14.52 3.19 16.51 8.93.72 2.1 1.03 3.72.92 9.21l-.29 17.26v.89c0 5.52.9 7.6 4.82 10.52zM108.4 242.98c0-9.24 1.9-15.35 6.41-20.35 4.22-4.72 9.33-6.92 16.15-6.92 5.91 0 11.54 1.99 14.84 5.4 4.72 4.83 6.83 11.76 6.83 22.47v3.08h-29.68v.44c0 7.91 3.92 12.41 10.82 12.41 4.62 0 8.91-1.71 13.03-5.11l5.22 8.04c-5.92 4.8-12.14 7.1-19.36 7.1-14.73-.01-24.26-10.44-24.26-26.56m20.64 118.96H115.9v-34.5c0-5.1-1.4-7-5.2-7-3.31 0-7.63 1.99-10.63 4.71v36.79H86.44V302.6c0-4.83-.41-9.62-1.01-11.74l13.75-3.2c.58 2.82.89 7.62.89 12.56v10.19c0 1.6-.2 3.72-.2 4.33 3.5-3.32 9.32-5.53 14.53-5.53 6.52 0 11.71 2.81 13.32 7.33 1.01 2.92 1.32 4.61 1.32 9.54zm-69.54 1.19c-9.63 0-17.05-3.09-22.76-9.61-5.62-6.31-8.43-14.73-8.43-24.96 0-8.72 1.52-15.64 4.7-21.65 5.44-10.12 15.46-16.14 26.69-16.14 6.91 0 13.82 2.21 17.64 5.52l-6.32 9.51c-3.51-2.6-7.22-3.9-11.12-3.9-4.72 0-9.33 2.29-11.83 6.01-2.7 4-3.91 9.83-3.91 17.94 0 9.52.79 14.83 2.89 18.65 2.81 5.12 7.42 7.81 13.44 7.81 4.1 0 7.82-1.19 11.93-4.49l6.42 8.81c-5.52 4.49-11.41 6.5-19.34 6.5M40.56 198.45l6 27.48c2.81 13.04 3.72 22.95 3.72 22.95.29-2.7 1.5-12.64 3.59-22.25l6.21-28.18h15.35l6.44 31.19c1.3 6.51 3 18.45 3 18.45.19-2.22 2.39-16.36 3.8-23.18l5.72-26.47h14.73l-16.83 70.27H76.94l-6.23-28.36c-2.1-9.32-3.11-18.34-3.29-20.24 0 0-1.2 9.82-3.34 20.05l-5.8 28.55H42.36l-16.65-70.27h14.85zm-14.34-92.24h50.22l-2.3 11.64H57.5v58.04H43.25v-58.04H26.22zm69.95-4.61c.59 2.81.9 7.62.9 12.53v10.23c0 1.58-.21 3.71-.21 4.31 3.51-3.31 9.32-5.53 14.53-5.53 6.52 0 11.73 2.8 13.35 7.32 1 2.9 1.3 4.61 1.3 9.53v35.89H112.9V141.4c0-5.11-1.4-7.01-5.23-7.01-3.31 0-7.61 1.99-10.61 4.71v36.79H83.44v-59.35c0-4.82-.41-9.61-1.02-11.73zm45.17 28.78c4.21-4.72 9.32-6.94 16.14-6.94 5.9 0 11.52 2.03 14.84 5.44 4.71 4.82 6.81 11.71 6.81 22.45v3.11h-29.66v.41c0 7.92 3.9 12.42 10.81 12.42 4.6 0 8.92-1.69 13.03-5.12l5.23 8.04c-5.93 4.79-12.15 7.1-19.35 7.1-14.75 0-24.27-10.43-24.27-26.54.01-9.26 1.9-15.37 6.42-20.37M.82.04v399.28h399.26V.04z"}),(0,o.jsx)("path",{d:"M316.33 225.51c-5.11 0-8.03 4.03-8.03 11.14v.19h15.55v-.6c0-3.81-.41-5.8-1.61-7.7-1.3-2.02-3.21-3.03-5.91-3.03m101.57-211h2.16c1.87 0 3.69-.1 3.69-2.32 0-1.91-1.65-2.13-3.08-2.13h-2.77zm-2.09-6.16h5.21c3.27 0 4.83 1.3 4.83 3.94 0 2.51-1.59 3.56-3.65 3.78l3.97 6.1h-2.25l-3.75-5.94h-2.26v5.94h-2.09V8.35zm4.51 17.03c5.4 0 9.72-4.38 9.72-10.11 0-5.72-4.32-10.11-9.72-10.11-5.43 0-9.72 4.39-9.72 10.11 0 5.73 4.28 10.11 9.72 10.11m0-21.93c6.42 0 11.82 5.08 11.82 11.82s-5.4 11.82-11.82 11.82c-6.45 0-11.82-5.08-11.82-11.82 0-6.73 5.37-11.82 11.82-11.82"})]})}),d=a.forwardRef((e,t)=>(0,o.jsx)(i.h,{ref:t,icon:c,...e}));d.displayName="TWC";var u=n(66544),m=n(48774);function p(e){let{articleId:t,title:n,url:s,containerId:i="openweb-comments",spotId:c="sp_JZ9Z8fdb"}=e,[p,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),{user:y,userProfile:w}=(0,l.J)(),[x,C]=(0,a.useState)(!y.isUserLoggedIn),[S,I]=(0,a.useState)(null),[j,E]=(0,a.useState)(""),[k,N]=(0,a.useState)(!1),[A,_]=(0,a.useState)(null),[O,B]=(0,a.useState)(!1),[P,M]=(0,a.useState)(!0),[T,W]=(0,a.useState)(!0),[L,R]=(0,a.useState)(0),U=(0,a.useRef)(!1);(0,a.useEffect)(()=>{h(!0)},[]),(0,a.useEffect)(()=>(x&&!P||y.isUserLoggedIn&&!1===S&&!T?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[x,P,y.isUserLoggedIn,S,T]),(0,a.useEffect)(()=>{p&&C(!y.isUserLoggedIn)},[p,y.isUserLoggedIn,y.userID]),(0,a.useEffect)(()=>{if(p&&!y.isUserLoggedIn&&U.current&&window.SPOTIM)try{let e=window.SPOTIM;if("function"==typeof e.logout)e.logout();else{let e=document.getElementById(i);e&&(e.innerHTML="")}}catch(e){}},[p,y.isUserLoggedIn,U,i,t,c,n,s]),(0,a.useEffect)(()=>{U.current||function(){window.localStorage&&localStorage.removeItem("SPOTIM_ACCESS_TOKEN");let e=()=>{U.current=!0,f(!1),setTimeout(()=>{if(window.SPOTIM){let e=window.SPOTIM,o=document.getElementById(i);if(o&&0===o.innerHTML.length)try{if(!o)return;if(o.dataset.spotimModule||o.setAttribute("data-spotim-module","conversation"),o.dataset.postId||o.setAttribute("data-post-id",t.replace(/[^\w\s:.$~]/g,"-")),o.dataset.postUrl||o.setAttribute("data-post-url",s||window.location.href),"function"==typeof e.startConversation)e.startConversation(i,{spotId:c,postId:t.replace(/[^\w\s:.$~]/g,"-"),postUrl:s||window.location.href,title:n||document.title});else if("function"==typeof e.init)e.init();else if("function"==typeof e.loadConversation)e.loadConversation(i);else{let t=Object.keys(e).filter(e=>e.toLowerCase().includes("conversation")||e.toLowerCase().includes("load")||e.toLowerCase().includes("start")||e.toLowerCase().includes("init"));if(t.length>0){let n=t[0];if(n&&"function"==typeof e[n])try{e[n]()}catch(e){}}}}catch(e){}}},1e3)};document.addEventListener("spot-im-api-ready",e,!1);let o=Date.now(),a="https://launcher.spot.im/spot/".concat(c,"?cb=").concat(o),r=document.createElement("script");r.src=a,r.async=!0,r.setAttribute("data-post-id",t.replace(/[^\w\s:.$~]/g,"-")),r.onerror=()=>{v("Failed to load comments. Please try again later."),f(!1)},document.head.appendChild(r),()=>{document.head.removeChild(r),document.removeEventListener("spot-im-api-ready",e,!1)}}()},[c,t,i,n,s]),(0,a.useEffect)(()=>{if(p)if(y.isUserLoggedIn&&U.current){let e=setTimeout(()=>{r.getAccount().then(e=>{if(e){I(!0),B(!0);let o=e.displayName||y.userID;if(E(o),window.SPOTIM){let e=window.SPOTIM;try{["logout","clearSession","resetUser","clearUser","reset"].forEach(t=>{if("function"==typeof e[t])try{e[t]()}catch(e){}})}catch(e){}setTimeout(()=>{try{let a={userId:y.userID,spotId:c,articleId:t.replace(/[^\w\s:.$~]/g,"-"),url:s||window.location.href,title:n||document.title};e.startSSO({callback:(e,n)=>{r.getCodeB(e,o,t).then(e=>{n(e)}).catch(e=>{n("",e)})},...a})}catch(e){}},500)}}else I(!1),B(!1),E("")}).catch(e=>{var t;((null==e||null==(t=e.message)?void 0:t.includes("403"))||(null==e?void 0:e.status)===403)&&_("Authentication error. Please try refreshing the page or logging out and back in."),I(!1),B(!1)})},200);return()=>clearTimeout(e)}else B(!1)},[p,y.isUserLoggedIn,y.userID,U.current,w,t,c,n,s]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{g&&f(!1)},5e3);return()=>clearTimeout(e)},[g]);let z=(0,a.useCallback)((e,t)=>{let n="openweb-dynamic-styles",o=e.getElementById(n);o&&o.remove();let a=document.createElement("style");a.id=n,a.textContent='\n /* Base styles always present */\n [data-spot-im-class="registration-buttons"] {\n display: none !important;\n }\n \n /* Conditional styles based on interaction state */\n '.concat(t?'\n /* Enable interaction styles */\n button[class*="PostInput"],\n div[class*="PostInput-"],\n div[class*="CommentBox-"],\n div[contenteditable="true"],\n textarea,\n input[type="text"],\n span[class*="Button__contentWrapper"] {\n pointer-events: auto !important;\n opacity: 1 !important;\n cursor: auto !important;\n }\n \n /* Show send button and post input */\n button[class*="Button"][class*="primary"],\n button[aria-label*="Post"],\n button[aria-label*="Send"],\n button[class*="PostInput"],\n div[class*="PostInput-submitButton"] {\n display: block !important;\n }\n \n /* Show comment input areas */\n div[class*="PostInput-textArea"],\n div[class*="CommentBox-textArea"] {\n pointer-events: auto !important;\n opacity: 1 !important;\n }\n ':'\n /* Disable interaction styles */\n button[class*="PostInput"],\n div[class*="PostInput-"],\n div[class*="CommentBox-"],\n div[contenteditable="true"],\n textarea,\n input[type="text"],\n span[class*="Button__contentWrapper"] {\n pointer-events: none !important;\n opacity: 0.5 !important;\n cursor: not-allowed !important;\n }\n \n /* Hide send button and post input specifically */\n button[class*="Button"][class*="primary"],\n button[aria-label*="Post"],\n button[aria-label*="Send"],\n button[class*="PostInput"],\n div[class*="PostInput-submitButton"] {\n display: none !important;\n }\n \n /* Hide comment input areas */\n div[class*="PostInput-textArea"],\n div[class*="CommentBox-textArea"] {\n pointer-events: none !important;\n opacity: 0.3 !important;\n }\n ','\n \n /* General interactive elements that should trigger modal when !canInteract */\n button[aria-label*="Profile Image"],\n div[class*="MessageDetails-Username"],\n div[class*="MessageUserImage"],\n [data-spot-im-class="user-info-username"],\n .spcv_username-wrapper\n {\n pointer-events: none !important;\n cursor: default !important;\n }\n '),e.appendChild(a)},[]),D=(0,a.useCallback)(e=>{let t=Array.from(document.querySelectorAll("*")).find(e=>e.tagName.toLowerCase().startsWith("ow-")&&e.shadowRoot);(null==t?void 0:t.shadowRoot)&&z(t.shadowRoot,e);let n=document.querySelector("div[open-web-ui-components-menus]");(null==n?void 0:n.shadowRoot)&&z(n.shadowRoot,e);let o=(()=>{let e=document.querySelector("div#floating-ui-root");if(!e)return;let t=e.nextElementSibling;for(;t;){if(t.shadowRoot)return t;t=t.nextElementSibling}})();(null==o?void 0:o.shadowRoot)&&z(o.shadowRoot,e)},[z]);return((0,a.useEffect)(()=>{if(!U.current)return;D(O);let e=new MutationObserver(()=>{D(O)}),t=document.getElementById(i);return t?e.observe(t,{childList:!0,subtree:!0}):e.observe(document.body,{childList:!0,subtree:!1}),()=>e.disconnect()},[O,i,D]),(0,a.useEffect)(()=>{if(!U.current)return;let e=null,t=null,n=e=>{let t=e.target;if(t.closest('button[aria-label*="Profile Image"], div[class*="MessageDetails-Username"], div[class*="MessageUserImage"], [data-spot-im-class="user-info-username"], .spcv_username-wrapper')){e.preventDefault(),e.stopPropagation();return}if(t.closest('[data-spot-im-class="header-text"], [data-spot-im-class="comments-count"], [data-spot-im-class="message-text"]'))return void e.stopPropagation();!O&&(e.stopPropagation(),!y.isUserLoggedIn&&P?M(!1):y.isUserLoggedIn&&!1===S&&T&&W(!1))},o=e=>{e.querySelectorAll('span, button, a, div[role="button"], div[contenteditable="true"], div[class*="PostInput-"], div[class*="CommentBox-"], h2').forEach(e=>{e.__openWebClickListener||(e.addEventListener("click",n),e.__openWebClickListener=n)}),e.querySelectorAll('span[class*="Button__contentWrapper"]').forEach(e=>{if(e.textContent&&e.textContent.includes("Sign up to post")){e.style.display="none";let t=e.closest("button");t&&(t.style.display="none")}})},a=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1],o(e);let t=new MutationObserver(t=>{t.forEach(t=>{"childList"===t.type&&o(e)})});return t.observe(e,{childList:!0,subtree:!0}),t},s=()=>Array.from(document.querySelectorAll("*")).find(e=>e.tagName.toLowerCase().startsWith("ow-")&&e.shadowRoot),r=()=>document.querySelector("div[open-web-ui-components-menus]"),l=()=>{let e=document.querySelector("div#floating-ui-root");if(!e)return;let t=e.nextElementSibling;for(;t;){if(t.shadowRoot)return t;t=t.nextElementSibling}},c=()=>{let t=s();if(t&&t.shadowRoot){if(!t.shadowRoot.getElementById("openweb-shadow-custom-styles")){let e=document.createElement("style");e.id="openweb-shadow-custom-styles",e.textContent='\n [data-spot-im-class="registration-buttons"] {\n display: none !important;\n }\n /* General interactive elements that should trigger modal when !canInteract */\n button[aria-label*="Profile Image"],\n div[class*="MessageDetails-Username"],\n div[class*="MessageUserImage"],\n [data-spot-im-class="user-info-username"],\n .spcv_username-wrapper\n {\n pointer-events: none !important;\n cursor: default !important;\n }\n /* Add a visual cue when interaction is blocked, if needed */\n .comments-blocked-cursor * {\n cursor: not-allowed !important;\n }\n ',t.shadowRoot.appendChild(e)}e=a(t.shadowRoot)}},d=()=>{let e=r();if(e&&e.shadowRoot){if(!e.shadowRoot.getElementById("menu-shadow-custom-styles")){let t=document.createElement("style");t.id="menu-shadow-custom-styles",t.textContent='\n /* Disable pointer events on the hover menu list */\n div[class*="components-MessageActions-components-VoteButtons-partials-users-list-index__list"],\n div[class*="dropdown-menu-list"], /* Generic dropdown menus */\n div[class*="profile-menu-item"] /* Specific profile menu items if they are interactive */\n {\n pointer-events: none !important;\n cursor: default !important;\n }\n ',e.shadowRoot.appendChild(t)}t=a(e.shadowRoot,!0)}},u=()=>{let e=l();if(e&&e.shadowRoot&&!e.shadowRoot.getElementById("floating-ui-shadow-custom-styles")){let t=document.createElement("style");t.id="floating-ui-shadow-custom-styles",t.textContent='\n /* Delete Comment Modal Styling */\n /* Center align modal content */\n [class*="Modal__container"] {\n text-align: center;\n }\n\n /* Center the title */\n [class*="Modal__header"] > span {\n flex: 1;\n margin-left: 34px;\n }\n\n /* Modal close button */\n [class*="Modal__header"] > button {\n font-size: 10px !important;\n }\n\n /* Center body text */\n [class*="Modal__bodyContainer"] {\n text-align: center;\n }\n\n /* Stack buttons vertically */\n [class*="Modal__bottomActions"] {\n flex-direction: column !important;\n gap: 12px;\n }\n\n /* Style confirm button as full-width primary */\n [class*="Modal__bottomActions"] [class*="Button__primary"] {\n order: 1;\n margin-left: 0px !important;\n }\n\n /* Style No button as text link */\n [class*="Modal__bottomActions"] [class*="Button__secondary"] {\n background: none !important;\n border: none !important;\n color: #666 !important;\n order: 2;\n width: auto;\n padding: 8px 0 !important;\n }\n\n /* Additional styling for the cancel button hover state */\n [class*="Modal__bottomActions"] [class*="Button__secondary"]:hover {\n background: none !important;\n color: #333 !important;\n }\n ',e.shadowRoot.appendChild(t)}},m=new MutationObserver(n=>{n.forEach(n=>{"childList"===n.type&&(!e&&s()&&c(),!t&&r()&&d(),l()&&u())})}),p=document.getElementById(i);if(p)try{m.observe(p,{childList:!0,subtree:!0})}catch(e){console.warn("Failed to observe comments container, falling back to document.body:",e),m.observe(document.body,{childList:!0,subtree:!1})}else m.observe(document.body,{childList:!0,subtree:!1});return c(),d(),u(),()=>{m.disconnect(),e&&e.disconnect(),t&&t.disconnect();let n=s();if(n&&n.shadowRoot){let e=n.shadowRoot.getElementById("openweb-shadow-custom-styles");e&&e.remove()}let o=r();if(o&&o.shadowRoot){let e=o.shadowRoot.getElementById("menu-shadow-custom-styles");e&&e.remove()}}},[U.current,O,y.isUserLoggedIn,S,P,T,M,W,i]),g)?(0,o.jsx)("div",{className:"mt-8 border-t border-gray-200 pt-6",children:(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center p-8 text-center text-gray-500",children:[(0,o.jsx)("div",{className:"mb-4 h-9 w-9 animate-spin rounded-full border-4 border-gray-200 border-l-blue-500"}),(0,o.jsx)("p",{children:"Loading comments..."})]})}):b?(0,o.jsx)("div",{className:"mt-8 border-t border-gray-200 pt-6",children:(0,o.jsxs)("div",{className:"rounded-md border border-red-100 bg-red-50 p-6 text-center text-red-700",children:[(0,o.jsx)("p",{children:b}),(0,o.jsx)("button",{onClick:()=>window.location.reload(),className:"mt-4 rounded bg-red-600 px-4 py-2 font-medium text-white hover:bg-red-700",children:"Retry"})]})}):(0,o.jsx)("div",{className:"mt-8 border-t border-gray-200 pt-6",children:(0,o.jsxs)("div",{className:"relative",children:[x&&!P||y.isUserLoggedIn&&!1===S&&!T?(0,o.jsx)("div",{className:"fixed inset-0 z-[60] bg-black/50"}):null,x&&!P&&(0,o.jsx)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-4",children:(0,o.jsxs)("div",{className:"relative w-full max-w-sm rounded-lg bg-white p-6 pt-7 shadow-lg",children:[(0,o.jsx)("button",{onClick:()=>M(!0),className:"absolute right-2 top-2 flex h-6 w-6 items-center justify-center rounded-full text-xl text-gray-400 hover:bg-gray-100 hover:text-gray-600","aria-label":"Close banner",children:"\xd7"}),(0,o.jsx)("div",{className:"mb-4 mt-4 flex justify-center",children:(0,o.jsx)(d,{className:"h-10 w-auto text-blue-600"})}),(0,o.jsx)("h3",{className:"mb-4 text-center text-lg font-medium text-gray-900",children:"Sign in to join the conversation"}),(0,o.jsx)("button",{onClick:()=>{window.location.href="/login"},className:"w-full rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-white hover:bg-gray-800",children:"Sign in"})]})}),y.isUserLoggedIn&&!1===S&&!T&&(0,o.jsx)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-4",children:(0,o.jsxs)("div",{className:"relative w-full max-w-sm rounded-lg bg-white p-6 shadow-xl",children:[(0,o.jsx)("button",{onClick:()=>W(!0),className:"absolute right-2 top-2 flex h-6 w-6 items-center justify-center rounded-full text-xl text-gray-400 hover:bg-gray-100 hover:text-gray-600","aria-label":"Close dialog",children:"\xd7"}),(0,o.jsx)("div",{className:"mb-4 mt-4 flex justify-center",children:(0,o.jsx)(d,{className:"h-10 w-auto text-blue-600"})}),(0,o.jsx)("h2",{className:"mb-2 text-center text-xl font-semibold text-gray-900",children:"Create a display name"}),(0,o.jsx)("p",{className:"mb-6 text-left text-sm text-gray-600",children:"Your display name is the name others will see when you comment."}),(0,o.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),j.trim())if(N(!0),_(null),window.SPOTIM){let e=window.SPOTIM;try{["logout","clearSession","resetUser","clearUser","reset","clearAuth","signOut"].forEach(t=>{if("function"==typeof e[t])try{e[t]()}catch(e){}}),setTimeout(()=>{try{let o=!1,a=setTimeout(()=>{o||(console.error("OpenWeb SSO callback timeout - callback was never triggered"),_("Account creation timed out. Please try again or refresh the page."),N(!1))},15e3);e.startSSO({callback:(e,n)=>{o=!0,clearTimeout(a),r.getCodeB(e,j,t).then(e=>{if(!e||""===e.trim()){_("Failed to create account. Please try again."),N(!1);return}n(e),I(!0),B(!0),N(!1),setTimeout(()=>{R(e=>e+1)},500)}).catch(e=>{console.error("getCodeB failed:",e),_("Failed to create account. Please check your connection and try again."),N(!1)})},userId:y.userID,spotId:c,articleId:t.replace(/[^\w\s:.$~]/g,"-"),url:s||window.location.href,title:n||document.title,forceSSO:!0,ssoMode:!0,authMode:"sso"})}catch(e){console.error("SSO initialization failed:",e),_("Failed to initialize account creation. Please try again."),N(!1)}},100)}catch(e){console.error("Auth clearing failed:",e),_("Failed to initialize account creation. Please try again."),N(!1)}}else _("Comments system not ready. Please refresh the page and try again."),N(!1)},className:"space-y-4",children:[A&&(0,o.jsx)("div",{className:"rounded-md bg-red-50 p-3 text-sm text-red-700",children:A}),(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsx)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-gray-700",children:"Display Name"}),(0,o.jsx)(m.p,{id:"displayName",type:"text",value:j,onChange:e=>E(e.target.value),placeholder:"Enter your display name",required:!0,minLength:3,maxLength:30,className:"w-full"})]}),(0,o.jsx)(u.$n,{type:"submit",disabled:k||!j.trim(),className:"w-full bg-gray-900 text-white",size:"default",children:k?"Creating...":"Create"})]}),(0,o.jsxs)("p",{className:"mt-4 text-left text-xs text-gray-500",children:["Your email address is shared with OpenWeb, the commenting platform. By creating a display name, you agree to the OpenWeb"," ",(0,o.jsx)("a",{href:"https://www.openweb.com/legal-and-privacy/privacy/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-blue-600",children:"Privacy Policy"})," ","and"," ",(0,o.jsx)("a",{href:"https://www.openweb.com/legal-and-privacy/terms-of-use/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline hover:text-blue-600",children:"Terms of Use"}),"."]})]})}),(0,o.jsx)("div",{id:i,"data-spotim-module":"conversation","data-post-id":t.replace(/[^\w\s:.$~]/g,"-"),"data-post-url":s||window.location.href,"data-article-tags":"weather,news",className:"min-h-[200px]"})]})},L)}},56414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});let o={src:"/_next/static/media/atmosphereLogo.8b654638.svg",height:40,width:215,blurWidth:0,blurHeight:0}},99872:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});let o=(0,n(31887).A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])}}]);