1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[134],{50134:function(e,t,a){a.r(t),a.d(t,{default:function(){return Z}});var r=a(92809),n=a(67294),l=a(93633),c=a(92811),i=a(35944);var s=e=>{const{day:t,description:a,date:r,temperature:n,degree:l,icon:s="01n",isLast:o}=e;return(0,i.BX)(c.Flex,{className:`flex flex-1 flex-col text-center ${o?"ltr:mr-0 rtl:ml-0":"ltr:mr-3 rtl:ml-3"} overflow-hidden`,themeNameSpaces:["_weather._body._card"],children:[(0,i.tZ)(c.Flex,{className:"items-center justify-center py-3",ariaHidden:"true",themeNameSpaces:["_weather._body._card._iconWrapper"],children:(0,i.tZ)(c.Text,{as:"i",className:`font-semi leading-none weather__icon weather__icon--${s}`,themeNameSpaces:["_weather._body._card._iconWrapper._icon"],children:"\u200b"})}),(0,i.BX)(c.Flex,{className:"flex-col justify-start flex-grow p-3",themeNameSpaces:["_weather._body._card._contentWrapper"],children:[(0,i.tZ)(c.Text,{as:"h3",className:"weather__day",themeNameSpaces:["_weather._body._card._contentWrapper._day"],children:t}),(0,i.tZ)(c.Text,{className:"weather__description",themeNameSpaces:["_weather._body._card._contentWrapper._description"],children:a}),(0,i.BX)(c.Flex,{className:"flex-grow flex-col justify-end",children:[(0,i.tZ)(c.Text,{as:"span",className:"weather__temperature",themeNameSpaces:["_weather._body._card._contentWrapper._temperature"],children:"Celsius"===l?`${n}\xb0C`:`${n}\xb0F`}),(0,i.tZ)(c.Text,{className:"weather__date",themeNameSpaces:["_weather._body._card._contentWrapper._date"],children:r})]})]})]})};var o=e=>{const{day:t,description:a,date:r,temperature:n,degree:l,icon:s="01n"}=e;return(0,i.BX)(c.Flex,{className:"flex w-full items-center mb-3 overflow-hidden",themeNameSpaces:["_global._panelFirstFloor","_weather._body._card"],children:[(0,i.tZ)(c.Flex,{className:"items-center justify-center px-4 self-stretch",themeNameSpaces:["_weather._body._card._iconWrapper"],children:(0,i.tZ)(c.Text,{as:"i",className:`font-semi leading-none weather__icon weather__icon--${s}`,themeNameSpaces:["_weather._body._card._iconWrapper._icon"],children:"\u200b"})}),(0,i.BX)(c.Flex,{className:"flex-1 justify-between items-center px-3 py-6",themeNameSpaces:["_weather._body._card._contentWrapper","_weather._body._card._contentWrapper._mobile"],children:[(0,i.BX)(c.Flex,{className:"flex-col flex-1 ltr:text-left rtl:text-right w-1/2",children:[(0,i.tZ)(c.Text,{as:"h3",className:"weather__day",themeNameSpaces:["_weather._body._card._contentWrapper._dayMobile"],children:t}),(0,i.tZ)(c.Text,{className:"weather__description",themeNameSpaces:["_weather._body._card._contentWrapper._descriptionMobile"],children:a})]}),(0,i.BX)(c.Flex,{className:"flex flex-col ltr:text-right rtl:text-left w-1/2",children:[(0,i.tZ)(c.Text,{className:"weather__temperature",themeNameSpaces:["_weather._body._card._contentWrapper._temperatureMobile"],children:"Celsius"===l?`${n}\xb0C`:`${n}\xb0F`}),(0,i.tZ)(c.Text,{className:"weather__date",themeNameSpaces:["_weather._body._card._contentWrapper._dateMobile"],children:r})]})]})]})};const d=e=>Math.round(5*(e-32)/9),h=e=>Math.round(9*e/5+32);var p=e=>{const{weekData:t,degree:a,unit:r,deviceType:l}=e,c="Fahrenheit"===a?h:d;return t.map(((e,d)=>{let{day:h,description:p,date:_,temperature:m,icon:u}=e;return m=a===r?Math.round(m):c(m),(0,i.tZ)(n.Fragment,{children:"desktop"===l?(0,i.tZ)(s,{day:h,description:p,date:_,temperature:m,degree:a,icon:u,isLast:d===t.length-1},d):(0,i.tZ)(o,{day:h,description:p,date:_,temperature:m,degree:a,icon:u},d)},d)}))},_=a(50959),m=a(75882);const u=a(91642).Ps` 2 query GetWeather($page: PageInput!, $params: JSON!) { 3 weather(page:$page, params:$params){ 4 weekData{ 5 temperature 6 weather 7 day 8 date 9 description 10 icon 11 } 12 location 13 unit 14 } 15} 16`;var w=a(46323),f=a(47428),y=a(7067),x=a(95573);function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}const N=({page:{tenant:e,slug:t,siteEdition:a,deviceType:r}})=>({tenant:e,slug:t,siteEdition:a,deviceType:r}),g=({title:e,labels:t,unit:a,weekData:r,deviceType:l})=>{const{0:s,1:o}
16=(0,n.useState)(a),d=(0,n.useRef)(null),h=(0,n.useRef)(!1);return r.length?((0,n.useEffect)((()=>{h.current?d.current&&d.current.focus():h.current=!0}),[s]),(0,i.BX)(c.Flex,{className:"flex-col flex-wrap py-3",children:[(0,i.tZ)(m.Z,{}),(0,i.tZ)(c.Text,{as:"h2",className:"weather_title text-3xl",themeNameSpaces:["_weather._title"],children:e}),(0,i.BX)(c.Flex,{className:"justify-end items-center",themeNameSpaces:["_weather._header"],children:[(0,i.BX)(c.Text,{as:"label",ariaHidden:"true",htmlFor:"weather-unit-select",themeNameSpaces:["_weather._header._label"],children:[null===t||void 0===t?void 0:t["weather-unit--label"],":"]}),(0,i.tZ)(c.Flex,{className:"w-full md:w-40",children:(0,i.tZ)(c.Select,{name:"weather-unit-select",ariaLabel:(null===t||void 0===t?void 0:t["weather-unit--aria-label"])||"Weather unit",liveRegionMessages:{selected:(e,a)=>`${e} ${(null===t||void 0===t?void 0:t["weather-unit-option"])||"option"} ${a} ${(null===t||void 0===t?void 0:t["weather-unit-selected"])||"Selected"}`,noValue:(e,t)=>`${e} ${t}`},className:"w-full",themeNameSpace:"_weather._header._select",rightIcon:"keyboard_arrow_down",onChange:({value:e})=>o(e),value:s,ref:d,inputId:"weather-unit-select",options:[{label:null===t||void 0===t?void 0:t["weather-unit--celsius"],value:"Celsius"},{label:null===t||void 0===t?void 0:t["weather-unit--farenheit"],value:"Fahrenheit"}]})})]}),(0,i.tZ)(c.Flex,{className:"w-full flex-col md:flex-row",themeNameSpaces:["_weather._body"],children:(0,i.tZ)(p,{deviceType:l,weekData:r,degree:s,unit:a})}),(0,i.BX)(c.Text,{as:"p",className:"text-xs mt-4",themeNameSpaces:["_weather._footer"],children:[null===t||void 0===t?void 0:t["disclaimer--weather-module"],": OpenWeatherMap.org"]})]})):((0,x.Z)("Weather",{week:{hasData:!!r}},{isMissingData:!0}),null)},v=({title:e,params:t})=>{const{payload:a}=t||{},{data:r,loading:c,error:s}=(0,l.a)(_.wn),{data:o,loading:d,error:h}=(0,l.a)(u,{skip:!r,ssr:!1,variables:{page:r&&N(r),params:a}}),{pageInfo:{deviceType:p}}=(0,n.useContext)(f.Z),m=(0,y.L)();if(c||d)return null;if(s||h||!o){const e=!s&&!h&&!o,t={page:{error:s,hasData:!!r},weather:{error:h,hasData:!!o}};return(0,x.Z)("Weather",t,{isMissingData:e}),null}const{weather:{location:b,unit:v,weekData:Z}}=o||{};return(0,i.tZ)(w.Z,{children:(0,i.tZ)(g,{title:e,labels:m,location:b,unit:v,weekData:Z,deviceType:p})})};var Z=e=>(0,i.tZ)(v,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(Object(a),!0).forEach((function(t){(0,r.Z)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},e))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.