(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,698674,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getWeatherInsights=r;let a=e.r(449802),n=e.r(678651),i=e.r(414655);async function r(e){let t=(0,a.getSunV3WeatherInsightsUrlConfig)(e),l=(0,n.urlFrom)(t),r=await fetch(l,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return(0,i.handleFetchResponse)(r)}},474245,(e,t,l)=>{"use strict";var a,n;Object.defineProperty(l,"__esModule",{value:!0}),l.InsightType=void 0,(n=a||(l.InsightType=a={})).ALL="all",n.BREAKING_VIDEO_INSIGHT="breakingVideoInsight",n.CHANCE_PRECIP_INSIGHT="chancePrecipInsight",n.SUNNY_DAY_INSIGHT="sunnyDayInsight",n.POLLEN_INSIGHT="pollenInsight",n.ALLERGY_AGGRAVATOR_INSIGHT="allergyAggravatorInsight",n.TEMPERATURE_CHANGE_INSIGHT="temperatureChangeInsight",n.TRENDING_TEMPERATURE_INSIGHT="trendingTemperatureInsight",n.SUN_INSIGHT="sunInsight",n.SHORT_TERM_PRECIP_INSIGHT="shortTermPrecipInsight",n.THUNDERSTORM_SOON_INSIGHT="thunderstormSoonInsight",n.SEVERE_STORM_INSIGHT="severeStormInsight",n.PRECIP_INSIGHT="precipInsight"},449802,(e,t,l)=>{"use strict";e.i(288906),Object.defineProperty(l,"__esModule",{value:!0}),l.getSunV3WeatherInsightsUrlConfig=function({geocode:e,placeId:t,postalKey:l,insightType:n=a.InsightType.ALL,units:i,language:r,par:s,cscCountryCode:o}){let d={format:"json",units:i,language:r,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061",insightType:n,par:s,cscCountryCode:o};return e?d.geocode=e:t?d.placeid=t:l&&(d.postalKey=l),{host:"api.weather.com",protocol:"https",pathname:"/v3/insights",query:d}};let a=e.r(474245)},550008,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getPollenDaypart=r,l.getPollenForecastDaily=s,l.getPollenObservations=o,l.getPollenHistoricalMonthlySummary=d;let a=e.r(65755),n=e.r(678651),i=e.r(414655);async function r(e){let t=(0,a.getPollenDaypartUrlConfig)(e),l=(0,n.urlFrom)(t),r=await fetch(l,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return await (0,i.handleFetchResponse)(r)}async function s(e){let t=await fetch((0,n.urlFrom)((0,a.getPollenForecastDailyUrlConfig)(e)),{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300}});return(0,i.handleFetchResponse)(t)}async function o(e){let t=await fetch((0,n.urlFrom)((0,a.getPollenObservationsUrlConfig)(e)),{headers:{"Accept-Encoding":"gzip"},next:{revalidate:3600}});return(0,i.handleFetchResponse)(t)}async function d(e){let t=await fetch((0,n.urlFrom)((0,a.getPollenHistoricalMonthlySummaryUrlConfig)(e)),{headers:{"Accept-Encoding":"gzip"},next:{revalidate:86400}});return(0,i.handleFetchResponse)(t)}},45776,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.getPollenRiskLevel=function(e){return null==e||""===e?null:a[Number(e)]??null},l.getPollenObservationByType=function(e,t){return e?.pollenobservation.find(e=>e.pollen_type===t)};let a={1:"low",2:"moderate",3:"high",4:"veryHigh"}},65755,(e,t,l)=>{"use strict";e.i(288906),Object.defineProperty(l,"__esModule",{value:!0}),l.getPollenDaypartUrlConfig=function({geocode:e,language:t,duration:l="3day"}){return{host:"api.weather.com",protocol:"https",pathname:`/v2/indices/pollen/daypart/${l}`,query:{geocode:e,format:"json",language:t,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},l.getPollenForecastDailyUrlConfig=function({geocode:e,language:t}){return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/indices/pollen/forecast/daily/5day",query:{geocode:e,format:"json",language:t,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},l.getPollenObservationsUrlConfig=function({geocode:e,language:t}){let[l="",n=""]=e.split(",").map(e=>e.trim());return{host:"api.weather.com",protocol:"https",pathname:`/v1/geocode/${l}/${n}/observations/pollen.json`,query:{language:a.includes(t)?t:"en-US",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}},l.getPollenHistoricalMonthlySummaryUrlConfig=function({geocode:e,language:t}){return{host:"api.weather.com",protocol:"https",pathname:"/v3/wx/pollen/historical/monthlySummary",query:{geocode:e,format:"json",language:t,apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"}}};let a=["en-US","es-ES","es-US"]},512620,e=>{"use strict";var t=e.i(902875),l=e.i(247865),a=e.i(747961);let n=(0,l.forwardRef)(({title:e,titleId:l,desc:a,descId:n,...i},r)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:r,"aria-labelledby":l,"aria-describedby":n,...i,children:[a?(0,t.jsx)("desc",{id:n,children:a}):null,void 0===e?(0,t.jsx)("title",{id:l,children:"Information"}):e?(0,t.jsx)("title",{id:l,children:e}):null,(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M8.5 11V7h-2v1h1v3H6v1h4v-1zM8 4a.75.75 0 1 0 0 1.5A.75.75 0 0 0 8 4"}),(0,t.jsx)("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2"})]})]})),i=l.default.forwardRef((e,l)=>(0,t.jsx)(a.BaseIcon,{ref:l,icon:n,...e}));i.displayName="Information",e.s(["Information",0,i])},749097,e=>{"use strict";var t=e.i(902875),l=e.i(64412),a=e.i(181462),n=e.i(247865),i=e.i(546446),r=e.i(730921),s=e.i(611540),o=e.i(498076),d=e.i(409846),c=e.i(16838),u=e.i(5397),h=e.i(731947),g=e.i(588896),p=e.i(495406),f=e.i(581014),m=e.i(380993),x=e.i(512620),y=e.i(240058),v=e.i(924707),b=e.i(429745),I=e.i(677691),w=e.i(738426),j=e.i(598513),N=e.i(200359);let P="allergy-species",_=({className:e})=>{let l=(0,f.useTranslations)("Pollen"),[a,i]=(0,n.useState)(!1),{href:r}=(0,I.useAppInstallLink)(P,P),s=(0,w.useTrackInstallPromptClick)(P),o=(0,j.useSendInteractionEvent)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.PollenFilterChips,{selected:"all",onSelect:e=>{"all"!==e&&(o({moduleId:"allergy-species-gate",interactionType:"click",interactionElement:e,featureFocus:"species-pollen-counts"},{flushImmediately:!0}),i(!0))},label:l("speciesFilterLabel"),className:e}),(0,t.jsx)(b.InstallPromptSheet,{open:a,onOpenChange:i,title:l("appGateTitle"),headline:l("appGateHeadline"),description:l("appGateDescription"),getAppHref:r,getAppLabel:l("getTheApp"),onGetAppClick:()=>s("get-the-app"),closeLabel:l("close")})]})};var S=e.i(180663);let L=({today:e,insight:l,changeFromYesterday:a,location:n,serverLocationDisplayName:i,locationHeading:r,formattedTime:s,learnMoreHref:o,spotlight:d,showSpeciesGate:c=!1,isLoading:u=!1,hasError:h=!1})=>{let g=(0,f.useTranslations)("PollenBreakdown"),p=n?.displayName||n?.name||n?.city||n?.presentationName||i||"",b=p?g("locationTitle",{displayName:p}):g("title"),I=!u&&!h&&!!e;return(0,t.jsxs)(m.Card,{"data-testid":"PollenBreakdownModule","aria-label":b,"aria-busy":u||void 0,children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3 pb-8",children:[(0,t.jsx)(v.LocationTimeHeadingClient,{title:b,location:n,formattedTime:s,expectsTimeStamp:!h,headingLevel:r?.level,presentationName:r?.presentationName,promotePresentationName:r?.ownsHeading,hideLocationMeta:!r?.ownsHeading,hideAffordance:!0,className:"min-w-0 flex-auto"}),d]})}),(0,t.jsxs)(m.CardContent,{className:"flex flex-col gap-4",children:[c&&(0,t.jsx)(_,{}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("p",{className:"text-lg font-bold text-gray-900",children:g("todaysPollenLevel")}),(0,t.jsxs)(y.default,{href:o,className:"inline-flex items-center gap-1 text-sm font-bold text-gray-900 hover:underline focus-visible:underline",children:[g("learnMore"),(0,t.jsx)(x.Information,{className:"h-4 w-4","aria-hidden":"true"})]})]}),u&&(0,t.jsx)(T,{}),I&&e&&(0,t.jsx)(S.PollenTodaySummary,{risk:e.risk,average:e.count,peak:e.peak,changeFromYesterday:a,insight:l})]})]})},T=()=>(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"h-10 w-48 animate-pulse rounded bg-gray-200"}),(0,t.jsx)("div",{className:"flex gap-6",children:Array.from({length:3},(e,l)=>(0,t.jsx)("div",{className:"h-10 w-20 animate-pulse rounded bg-gray-200"},l))})]}),E=({config:e})=>{let{blockType:l,...a}=e,n=function(e){if("object"==typeof e.adSlot&&e.adSlot){for(let t of e.adSlot.adSlotSizes??[])if("object"==typeof t&&"text"!==t.sizeType&&"number"==typeof t.width&&"number"==typeof t.height)return{width:t.width,height:t.height}}}(e);return(0,t.jsx)("div",{className:"shrink-0 empty:hidden [&_[data-testid$='-container']>div]:w-full",style:n&&{minWidth:n.width,minHeight:n.height},children:(0,t.jsx)(p.AdBlock,{...a})})},R=({location:e,serverLocationDisplayName:l,locationHeading:a,spotlightAd:p})=>{let f=(0,r.useLocale)(),m=(0,o.useIsMobile)(),{data:x,error:y,isPending:v}=(0,h.usePollenForecast)(e),b=(0,g.useAllergyInsight)(e,x?.days[0]?.count),I=(0,i.useAtomValue)(u.showAdminHeaderAtom),w=function(e,t,l){let[a,i]=(0,n.useState)();return(0,n.useEffect)(()=>{l&&i((0,d.formatTime)(new Date().toISOString(),e,t))},[e,t,l]),a}(f,e?.ianaTimeZone,!!x);return a?.ownsHeading||v||!y&&x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.DebugCollector,{componentName:"PollenBreakdown",data:{props:{location:e},state:{data:x,error:y,componentState:y&&"error"||v&&"loading"||"ready"}},enabled:I}),(0,t.jsx)(L,{today:x?.days[0],insight:b,changeFromYesterday:x?.changeFromYesterday??null,location:e,serverLocationDisplayName:l,locationHeading:a,spotlight:p&&(0,t.jsx)(E,{config:p}),formattedTime:w,learnMoreHref:(0,s.interpolateUrl)(s.URLS.allergyLearnMore,{locale:f}),showSpeciesGate:m,isLoading:v,hasError:!!y})]}):null},A=({globalPageProps:e,headingLevel:n,adBlocks:i})=>{let{location:r}=(0,l.useLocation)(),s=(0,a.getServerLocationDisplayName)(e),o=(0,a.resolveLocationHeadingContext)(e,n);return(0,t.jsx)(R,{location:r,serverLocationDisplayName:s,locationHeading:o,spotlightAd:i?.[0]})};e.s(["PollenBreakdownBlockClient",0,A,"default",0,A],749097)},69917,function(e){e.n(e.i(749097))},200359,e=>{"use strict";var t=e.i(902875),l=e.i(581014),a=e.i(632137);let n=["all",...e.i(175424).POLLEN_SPECIES];e.s(["PollenFilterChips",0,({selected:e,onSelect:i,label:r,className:s})=>{let o=(0,l.useTranslations)("Pollen");return(0,t.jsx)("div",{role:"group","aria-label":r,className:(0,a.cn)("flex flex-wrap gap-2",s),children:n.map(l=>{let n=l===e;return(0,t.jsx)("button",{type:"button","aria-pressed":n,onClick:()=>i(l),className:(0,a.cn)("inline-flex h-8 cursor-pointer items-center rounded-2xl px-3 text-sm font-semibold whitespace-nowrap transition-colors","focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 focus-visible:outline-none",n?"bg-gray-900 text-white":"bg-[#f2f2f2] text-gray-900 hover:bg-gray-200"),children:o(l)},l)})})}])},175424,e=>{"use strict";e.s(["POLLEN_COUNT_UNIT",0,"/m³","POLLEN_RISK_BARS",0,{low:1,moderate:2,high:3,veryHigh:4},"POLLEN_RISK_COLORS",0,{low:"#4ed07b",moderate:"#ffb900",high:"#ff4c00",veryHigh:"#ba0d00"},"POLLEN_RISK_LABEL_KEYS",0,{low:"riskLow",moderate:"riskModerate",high:"riskHigh",veryHigh:"riskVeryHigh"},"POLLEN_RISK_LEVELS",0,["low","moderate","high","veryHigh"],"POLLEN_SPECIES",0,["tree","grass","ragweed"],"PRECIP_ACCENT_THRESHOLD",0,30])},588896,180663,e=>{"use strict";var t=e.i(730921),l=e.i(474245),a=e.i(11697);e.s(["useAllergyInsight",0,function(e,n){let i=(0,t.useLocale)(),{data:r}=(0,a.useGetWeatherInsights)({key:"allergy-aggravator-insight",geoCode:e?.geocode??null,insightType:l.InsightType.ALLERGY_AGGRAVATOR_INSIGHT,locale:i});if(!n||ne.insightType===l.InsightType.ALLERGY_AGGRAVATOR_INSIGHT);return s?.insightText?.[0]||void 0}],588896);var n=e.i(902875),i=e.i(581014),r=e.i(247865),s=e.i(747961);let o=(0,r.forwardRef)(({title:e,titleId:t,desc:l,descId:a,...i},r)=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:r,"aria-labelledby":t,"aria-describedby":a,...i,children:[l?(0,n.jsx)("desc",{id:a,children:l}):null,void 0===e?(0,n.jsx)("title",{id:t,children:"Arrow Down Right"}):e?(0,n.jsx)("title",{id:t,children:e}):null,(0,n.jsx)("path",{fill:"currentColor",d:"M6.11 12.875a.499.499 0 0 1 0-.998l4.865-.003-6.778-6.777a.5.5 0 0 1 .707-.708l6.778 6.778.003-4.865a.499.499 0 0 1 .997 0v5.573a1 1 0 0 1-1 1z"})]})),d=r.default.forwardRef((e,t)=>(0,n.jsx)(s.BaseIcon,{ref:t,icon:o,...e}));d.displayName="ArrowDownRight";let c=(0,r.forwardRef)(({title:e,titleId:t,desc:l,descId:a,...i},r)=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:r,"aria-labelledby":t,"aria-describedby":a,...i,children:[l?(0,n.jsx)("desc",{id:a,children:l}):null,void 0===e?(0,n.jsx)("title",{id:t,children:"Arrow Up Right"}):e?(0,n.jsx)("title",{id:t,children:e}):null,(0,n.jsx)("path",{fill:"currentColor",d:"M6.11 4.097a.499.499 0 0 0 0 .997l4.865.003-6.778 6.778a.5.5 0 0 0 .707.707l6.778-6.778.003 4.865a.499.499 0 0 0 .997 0V5.097a1 1 0 0 0-1-1z"})]})),u=r.default.forwardRef((e,t)=>(0,n.jsx)(s.BaseIcon,{ref:t,icon:c,...e}));u.displayName="ArrowUpRight";var h=e.i(632137),g=e.i(175424);let p=({value:e,children:t})=>(0,n.jsxs)("span",{className:"inline-flex items-baseline gap-1 whitespace-nowrap",children:[t,(0,n.jsx)("span",{className:"text-xl font-bold text-gray-900",children:e}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:g.POLLEN_COUNT_UNIT})]}),f=({value:e,label:t,mobileLabel:l})=>(0,n.jsxs)("div",{className:"flex flex-col items-start gap-0.5 @xl/pollen-today:items-center",children:[e,(0,n.jsx)("span",{className:"text-xs text-gray-500 uppercase @xl/pollen-today:hidden",children:l}),(0,n.jsx)("span",{className:"hidden text-xs text-gray-500 @xl/pollen-today:inline",children:t})]});e.s(["PollenTodaySummary",0,({risk:e,average:t,peak:l,changeFromYesterday:a,insight:r,className:s})=>{let o=(0,i.useTranslations)("Pollen"),c=e?g.POLLEN_RISK_COLORS[e]:void 0,m=null===a?null:0===a?(0,n.jsx)("span",{className:"text-xl font-bold text-gray-900","aria-hidden":"true",children:"="}):(0,n.jsxs)(p,{value:Math.abs(a),children:[a>0?(0,n.jsx)(u,{className:"h-4 w-4 self-center text-gray-900","aria-hidden":"true"}):(0,n.jsx)(d,{className:"h-4 w-4 self-center text-gray-900","aria-hidden":"true"}),(0,n.jsx)("span",{className:"sr-only",children:o(a>0?"increase":"decrease")})]});return(0,n.jsx)("div",{className:(0,h.cn)("@container/pollen-today",s),children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 @xl/pollen-today:flex-row @xl/pollen-today:items-end @xl/pollen-today:justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-7",children:[e&&(0,n.jsx)("p",{className:"text-4xl leading-tight font-extrabold tracking-tight",style:{color:c},children:o(g.POLLEN_RISK_LABEL_KEYS[e])}),r&&(0,n.jsx)("p",{className:"max-w-md text-base text-gray-900",children:r})]}),(0,n.jsxs)("div",{className:"flex gap-6 border-t border-gray-200 pt-4 @xl/pollen-today:border-t-0 @xl/pollen-today:pt-0 @xl/pollen-today:[&>*+*]:border-l @xl/pollen-today:[&>*+*]:border-gray-200 @xl/pollen-today:[&>*+*]:pl-6",children:[null!==t&&(0,n.jsx)(f,{value:(0,n.jsx)(p,{value:t}),label:o("todaysAverage"),mobileLabel:o("average")}),null!==l&&(0,n.jsx)(f,{value:(0,n.jsx)(p,{value:l}),label:o("todaysPeak"),mobileLabel:o("peak")}),m&&(0,n.jsx)(f,{value:m,label:o(0===a?"sameAsYesterday":"fromYesterday"),mobileLabel:o(0===a?"sameAsYesterday":"vsYesterday")})]})]})})}],180663)},731947,e=>{"use strict";var t=e.i(381477),l=e.i(730921),a=e.i(550008),n=e.i(45776),i=e.i(175424);let r={tree:"tree",grass:"grass",ragweed:"weed"},s=(e,t)=>e?.[t]??null;e.s(["usePollenForecast",0,function(e){let o=(0,l.useLocale)(),d=e?.geocode,{data:c,error:u}=(0,t.default)(d?["pollenForecastDaily",d,o]:null,([,e,t])=>(0,a.getPollenForecastDaily)({geocode:e,language:t}),{revalidateOnFocus:!1,dedupingInterval:6e4}),{data:h,error:g}=(0,t.default)(d?["pollenObservations",d,o]:null,([,e,t])=>(0,a.getPollenObservations)({geocode:e,language:t}),{revalidateOnFocus:!1,dedupingInterval:6e4}),p=!!(h||g);return{data:c&&p?function(e,t){let l=(e.validTimeLocal??[]).map((t,l)=>{let a={};for(let t of i.POLLEN_SPECIES){let i=r[t];a[t]={count:s(e[`${i}PollenCountMean`],l),risk:(0,n.getPollenRiskLevel)(s(e[`${i}PollenIndexMean`],l))}}return{validTimeLocal:t,count:s(e.totalPollenCountMean,l),peak:s(e.totalPollenCountMax,l),risk:(0,n.getPollenRiskLevel)(s(e.totalPollenIndexMean,l)),species:a}});if(!l.length)return null;let a=function(e){if(!e)return null;let t=(0,n.getPollenRiskLevel)(e.total_pollen_idx);return null!==e.total_pollen_cnt||t?{count:e.total_pollen_cnt,risk:t}:null}(t?.pollenobservations?.[0]),o=l[0]?.count??null,d=null!==o&&a?.count!=null?o-a.count:null;return{days:l,yesterday:a,changeFromYesterday:d}}(c,h):null,observations:h??null,error:u,isPending:!u&&(!c||!p)}}])},11697,e=>{"use strict";var t=e.i(381477),l=e.i(698674),a=e.i(546446),n=e.i(674885),i=e.i(617874);let r={revalidateOnFocus:!1,dedupingInterval:6e4};e.s(["useGetWeatherInsights",0,({key:e="get-weather-insights",geoCode:s,insightType:o,locale:d,par:c="twc",cscCountryCode:u})=>{let h=(0,a.useAtomValue)(n.userUnitPreferenceAtom),g=((0,i.unitsSystemByName)(h)||i.imperial).code;return(0,t.default)(s?[e,o,s,g,c,d]:null,([e,t,a,n,i,r])=>(0,l.getWeatherInsights)({geocode:a,units:n,language:r,insightType:t,par:i,cscCountryCode:"KR"===u?"KR":void 0}),r)}])},409846,e=>{"use strict";var t=e.i(873598);e.s(["formatTime",0,(e,l,a)=>{if(!e)return"";try{let n=new Date(e),i={hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short",...a?{timeZone:(0,t.getCompatibleTimezone)(a)}:{}};if(!l)return n.toLocaleTimeString("en-US",i);return n.toLocaleTimeString(l,i)}catch(e){return console.error("Error formatting time:",e),""}}])}]);