PageSourceSearch

https://www.metoffice.gov.uk/forecast/static/be983da151212a38ad70c…/js/forecast-common/forecast-common.js

js metoffice.gov.uk collected 2026-10-01 07:16:49 UTC 32,126 bytes, 61 lines download raw bytes

1Array.from(document.getElementsByClassName("accordion")).forEach(d=>{const f=d.querySelector(".accordion-header button");f?.addEventListener("click",()=>{var g=f.getAttribute("aria-expanded")==="true";f.setAttribute("aria-expanded",!g);g=d.querySelector(".accordion-panel");const h=g.getAttribute("aria-hidden")==="true";g.classList.toggle("collapsed");g.setAttribute("aria-hidden",!h);f.querySelector(".accordion-icon").classList.toggle("collapsed")})});
2document.querySelectorAll("[data-init-accordions-expanded]")?.forEach(d=>{const f=d.dataset.initAccordionsExpanded.toLowerCase()==="true";d.querySelectorAll(".accordion-icon, .accordion-panel")?.forEach(g=>{f?g.classList.remove("collapsed"):g.classList.add("collapsed")})});
3(()=>{if(document.getElementById("beach-safety-tips")){var d=document.getElementById("beachSafetyTipsHeading"),f=document.getElementById("beachSafetyTipsBody"),g=d.querySelector(".accordion-icon");d.addEventListener("click",()=>{const h=d.getAttribute("aria-expanded")==="true";window.localStorage.setItem("accordionState",JSON.stringify({"beach-safety-tips-accordion":{beachSafetyTipsBody:h}}));window.metoffice.storage.setItem("accordionState",{"beach-safety-tips-accordion":{beachSafetyTipsBody:h}})});
4document.addEventListener("DOMContentLoaded",()=>{var h=JSON.parse(window.metoffice.storage.getItem("accordionState"));h&&h["beach-safety-tips-accordion"]&&(h=h["beach-safety-tips-accordion"].beachSafetyTipsBody,d.setAttribute("aria-expanded",String(h)),f.setAttribute("aria-hidden",String(!h)),h?(f.classList.remove("collapsed"),g.classList.remove("collapsed")):(f.classList.add("collapsed"),g.classList.add("collapsed")))})}})();
5(()=>{const d=document.querySelector("#use-current-location"),f=document.querySelector("#error-messages"),g=document.querySelector("#suggested-results-container"),h=document.querySelector("#recent-locations"),k=document.querySelector("#aria-live-notification"),a=document.querySelector("#location-search-input");if(d){const e=()=>{f.innerHTML="\x3ch3\x3eGeolocation error\x3c/h3\x3e\x3cp\x3eSorry, we cannot find your current location. Please enter a place name in the search bar.\x3c/p\x3e";f.classList.remove("hidden");
6g.classList.add("hidden");h.classList.add("hidden");k.innerText="Geolocation error. Sorry, we cannot find your current location. Please enter a place name in the search bar.";a.setAttribute("aria-expanded","false")},m=()=>{const q=document.createElement("script");q.src="https://cdn.jsdelivr.net/npm/[email protected]/latlon-geohash.min.js";q.type="module";q.crossorigin="anonymous";q.defer=!0;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>document.body.appendChild(q)):
7document.body.appendChild(q);q.onload=()=>{const u=document.createElement("script");u.type="module";u.textContent="import GeoHash from 'https://cdn.jsdelivr.net/npm/[email protected]/latlon-geohash.min.js';window.GeoHash\x3dGeoHash;";document.body.appendChild(u)};d.addEventListener("click",()=>navigator.geolocation.getCurrentPosition(u=>{const {latitude:z,longitude:A}=u.coords;var x=globalThis.GeoHash.encode(z,A,9);if(x!==void 0){u=location;{const l=globalThis.metoffice.forecasts.config;x=l.searchBehaviour===
8"observations"?`${l.subdomainHost}/${l.climateAveragesDetailPath}/${x}`:l.searchBehaviour==="climate"?`${l.climateAveragesDetailPath}/${x}`:`${l.subdomainHost}/forecast/${x}`}u.href=`${x}#?nearestTo=your%20detected%20location`}else e()},e))};"geolocation"in navigator&&(d.classList.remove("hidden"),m())}})();
9(()=>{function d(l,n,y){const v=n.parentElement,B=v.id;Array.from(l).forEach(t=>{t.parentElement.classList.remove("active")});v.classList.add("active");const C=Array.from(l).indexOf(n);Array.from(document.getElementsByClassName("day-warnings")).forEach(t=>{t.id===`day-warnings-${C}`?t.classList.remove("hidden"):t.classList.add("hidden")});y||(y=v.dataset.date);Array.from(document.getElementsByClassName("day-highlight")).forEach(t=>{t.id===`dayTab-Highlight-${y}`?(t.ariaHidden="false",t.classList.remove("hidden")):
10(t.ariaHidden="true",t.classList.add("hidden"))});B==="dayTab0"&&g();f(n.id.split("dayTab-")[1]);navigator.userAgent.toLowerCase().includes("chrome")?n.scrollIntoView(q):(l=document.getElementById("dayTabs"),n=v.id.slice(-1),l.scrollTo({left:v.offsetWidth*(n-(n==0?0:1)),behavior:"smooth"}))}function f(l){Array.from(document.querySelectorAll(".tide-day[data-chart-id]")).forEac
10h(n=>{n.getAttribute("data-chart-id")===l?n.classList.remove("hidden"):n.classList.add("hidden")})}function g(){const l=document.getElementsByClassName("beach-safety-advice").length>
110;m.getHashParameter("forecastChoice")==="beach"&&l?(document.querySelector("#highlightsContainer .summary-text").classList.add("hidden"),document.querySelector("#dayTab0 .summary-text").classList.add("hidden"),Array.from(e).forEach(n=>{n.classList.remove("hidden")})):(Array.from(e).forEach(n=>{n.classList.add("hidden")}),Array.from(document.querySelectorAll(".summary-text")).forEach(n=>{n.classList.remove("hidden")}))}function h(){let l=m.getHashParameter("date");if(l){l=l.toString();var n=document.getElementById(`dayTab-${l}`);
12l.match(/^\d{4}-\d{2}-\d{2}$/)&&n?d(k,n,l):m.replaceHashParameter("date",a)}}const k=document.querySelectorAll(".day-tab-link:not(.daily-outlooks-link)"),a=document.querySelector("#dayTab0 a.day-tab-link")?.hash?.split("#?date\x3d")[1],e=document.querySelectorAll(".beach-summary-text"),m=window.metoffice.hash,q={behavior:"smooth",container:"nearest",block:"nearest",inline:"center"};(()=>{Array.from(k).forEach(l=>l.addEventListener("click",n=>{n.preventDefault();history.replaceState(null,null,l.href);
13d(k,l)}))})();addEventListener("DOMContentLoaded",()=>{m.getHashParameter("date")?h():a&&m.replaceHashParameter("date",a)});addEventListener("hashchange",h);const u=Array.from(document.getElementsByClassName("nearest-place-button")),z=Array.from(document.getElementsByClassName("beach-location-results")),A=document.querySelector(".day-tabs-container"),x=document.querySelector(".forecast-table-content");u.forEach(l=>l.addEventListener("click",()=>{l.setAttribute("aria-expanded",l.getAttribute("aria-expanded")===
14"true"?"false":"true");z.forEach(n=>{n.classList.contains("hidden")?(n.ariaHidden="false",n.classList.remove("hidden")):(n.ariaHidden="true",n.classList.add("hidden"))})}));Array.from(document.querySelectorAll(".day-tab, .day-highlight")).forEach(l=>{const n=l.querySelector(".day-tab-link"),y=l.querySelector(".nearest-place-button"),v=l.querySelector(".beach-location-results");v&&(l=()=>{const {left:B,bottom:C,width:t}=y.getBoundingClientRect();v.style.left=`${B}px`;v.style.top=`${C}px`;v.style.width=
15`${t}px`},n&&(n.addEventListener("click",l),x.addEventListener("scroll",l)),window.addEventListener("resize",l),document.addEventListener("scroll",l),A.addEventListener("scroll",l),y.addEventListener("click",l))})})();
16window.addEventListener("DOMContentLoaded",()=>{const d=()=>Array.from(document.getElementsByClassName("internal-beta-banner")).forEach(k=>{k.classList.add("hidden");window.localStorage.setItem("showInternalBetaBanner","false")}),f=()=>Array.from(document.getElementsByClassName("improver-banner")).forEach(k=>{k.classList.add("hidden");window.localStorage.setItem("showImproverBanner","false")}),g=JSON.parse(window.localStorage.getItem("showInternalBetaBanner")),h=JSON.parse(window.localStorage.getItem("showImproverBanner"));
17g===!1&&d();h===!1&&f();document.getElementById("internal-beta-hide")?.addEventListener("click",d);document.getElementById("improver-live-hide")?.addEventListener("click",f);document.getElementById("hide")?.addEventListener("click",d)});
18(()=>{window.dataLayer=window.dataLayer||{};const d=Array.from(document.querySelectorAll("li.preview-block-component")),f=Array.from(document.querySelectorAll("ul.day-tabs \x3e li"));d.forEach((g,h)=>{g.addEventListener("click",()=>{window.dataLayer.push({event:"previewBlockClick",previewBlockPosition:h,previewBlockTitle:g.querySelector("a h3").textContent,contentType:g.querySelector("a div.imagetag").textContent})})});f.forEach((g,h)=>{g.addEventListener("click",()=>{window.dataLayer.push({event:"dayTabClick",
19dayIndex:h})})})})();
20document.addEventListener("DOMContentLoaded",()=>{const d=document.getElementById("hub-map-slot");if(d&&"IntersectionObserver"in window){const f=document.createElement("script");f.src="https://unpkg.com/[email protected]/dist/leaflet.js";f.integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo\x3d";f.async=!1;f.crossOrigin="anonymous";if(!window.metoffice.forecasts.config.location.domestic){const a=document.createElement("script");a.src="https://unpkg.com/[email protected]/dist/leaflet.markercluster.js";a.async=
21!1;a.crossOrigin="anonymous";f.addEventListener("load",()=>document.body.appendChild(a))}const g=document.createElement("link");g.rel="stylesheet";g.href="https://unpkg.com/[email protected]/dist/leaflet.css";g.integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY\x3d";g.crossOrigin="anonymous";const h=document.createElement("script");h.src=`/forecast/static/${window.metoffice.forecasts.config.staticResourcePrefix}/js/forecast-common/individual/${window.metoffice.forecasts.config.location.domestic?
22"uk":"international"}-map.js`;const k=new IntersectionObserver(a=>
22{a.forEach(e=>{e.isIntersecting&&(document.body.appendChild(f),document.body.appendChild(g),document.body.appendChild(h),k.unobserve(e.target))})});k.observe(d)}});
23(()=>{const d=document.querySelector("#location-search-input");if(d){const {config:g}=globalThis.metoffice.forecasts,h=g.subdomainHost;let k;const a=document.querySelector("#location-search");var f=a.querySelector("#location-search-form");const e=a.querySelector(".search-results-container"),m=a.querySelector("#suggested-results-container"),q=m.querySelector("#suggested-results-container ul"),u=a.querySelector("#recent-locations"),z=a.querySelector("#recent-locations ul"),A=b=>{typeof globalThis.__tcfapi==
24"undefined"?setTimeout(()=>A(b),100):globalThis.__tcfapi("addEventListener",2,(c,r)=>{r&&c.eventStatus==="useractioncomplete"&&c.purpose.consents["1"]&&b()})},x=b=>A(()=>{if(b.name!=="United Kingdom"&&b.type?.toLowerCase()!=="mountain"&&b.type?.toLowerCase()!=="region"&&b.type?.toLowerCase()!=="country"){var c=globalThis.metoffice.storage.getItem("moLocationSearchHistory");b.geohash!=void 0?(c=c?JSON.parse(c).filter(r=>r.geohash!==b.geohash):[],c.length>=3&&c.shift(),c.push(b),globalThis.metoffice.storage.setItem("moLocationSearchHistory",
25c)):console.error("Location not defined for page")}}),l=b=>{for(;b.length>1&&b.endsWith("/");)b=b.slice(0,-1);return b||"/"},n=b=>{const c=document.createElement("li"),r=document.createElement("a");var p=document.createElement("span");const D=document.createElement("span");var w="";switch(b?.type?.toLowerCase()){case "mountain":w="(Mountain region)";break;case "region":w="(Region)";break;case "summits":b.name=b.name.replace("Summit","").trim();w=b.area&&["Beinn Tarsuinn","High Seat","Beinn A' Chaorainn"].includes(b.name)?
26`(${b.area}) (Summit)`:"(Summit)";break;default:b.area&&(w=`(${b.area})`)}w=`${b.name} ${w}`.trim();D.innerText=w;p.className="icon";p.dataset.type="location-type";switch(b.type?.toLowerCase()){case "beaches":w="beach";break;case "mountain":w="mountain";break;case "summits":w="summit";break;default:w="pin"}p.dataset.value=w;p.ariaLabel=`${w} icon`;p.role="img";r.appendChild(p);r.appendChild(D);p=g.searchBehaviour;p=b?.name==="United Kingdom"?`${h}/forecast/uk`:b?.type?.toLowerCase()==="mountain"?
27`${h}/specialist-forecasts/mountain/${b.path}`:b?.type?.toLowerCase()==="region"?`${h}/forecast/regional/${b.path}`:b?.type?.toLowerCase()==="country"?`${h}/world/${b.path}`:p==="climate"?`${g.climateAveragesDetailPath}/${b.geohash}`:p==="observations"?`${h}/observations/${b.geohash}`:`${h}/forecast/${b.geohash}`;r.href=p;r.classList.add("search-result-link");c.appendChild(r);c.dataset.name=b.name;c.dataset.geohash=b.geohash;c.dataset.domestic=b.domestic;c.dataset.latitude=b.latitude;c.dataset.longitude=
28b.longitude;c.dataset.area=b.area;c.dataset.type=b.type;c.role="menuitem";c.tabIndex=-1;return c};a.addEventListener("keydown",b=>{var c=Array.from(a.querySelectorAll(".search-result-link"));e.classList.remove("hidden");b.key==="ArrowDown"?(b.preventDefault(),b=c.indexOf(b.target),c=c[(b+1)%c.length],c.focus(),c.id!=="useCurrentLocationSearchResultLink"&&(d.value=c.innerText)):b.key==="ArrowUp"&&c.includes(b.target)?(b.preventDefault(),b=c.indexOf(b.target),b>0?(c=c[b-1],c.focus(),c.id!=="useCurrentLocationSearchResultLink"&&
29(d.value=c.innerText)):d.focus()):b.key==="Escape"&&(b.preventDefault(),b.target===d?e.classList.add("hidden"):d.focus())});const y=()=>{const b=a.querySelector("#error-messages");b.innerHTML="";b.classList.add("hidden")};d.addEventListener("input",async b=>{b=b.target.value;b.length>=2?(k&&k.abort(),k=new AbortController,await fetch(`${h}/forecast/location-search?searchTerm=${b}&filter=${g.locationSearchFilter||"exclude-marine-offshore"}`,{signal:k.signal}).then(c=>c.json()).then(c=>{y();const r=
30a.querySelector("#aria-live-notification");if(c.length>0){var p=c.map(n);q.replaceChildren(...p);m.classList.remove("hidden");c=c.map(D=>`${D.name},${D.area}`);r.innerText=c.length>1?p.length+" suggested locations listed below. "+c.slice(0,-1).join("; ")+"; And "+c[c.length-1]+";":"1 suggested location listed below. "+c[0]+";"}else q.replaceChildren(),m.classList.add("hidden"),p=document.createElement("p"),p.textContent="Sorry we don't have any matches for that. Please re-enter your place, postcode or country above.",
31c=a.querySelector("#error-messages"),c.appendChild(p),c.classList.remove("hidden"),r.innerText="Sorry we don't have any matches for that. Please re-enter your place, postcode or country above. 0 suggested locations listed below."}).catch(c=>{c.name!=="AbortError"&&console.error("Error fetching locations:",c)})):m.classList.add("hidden")});d.addEventListener("focus",()=>{A(()=>{var b=globalThis.metoffice.storage.getItem("moLocationSearchHistory");b&&(b=JSON.parse(b).map(n).reverse(),z.replaceChildren(...b),
32b.length>0&&u.classList.remove("hidden"))})});d.addEventListener("mousedown",()=>d.classList.add("unhighlighted"));d.addEventListener("blur",()=>{y();d.classList.remove("unhighlighted")});const v=b=>{b&&b.preventDefault();if(b=q.getElementsByTagName("li")[0])b=b.getElementsByTagName("a")[0],globalThis.location.href=b.href},B=b=>{var c=document.getElementsByClassName("hub-hero");c.length>0&&(c[0].classList.remove("hub-hero-domestic-location"),c[0].classList.add("hub-hero-domestic-location-overlay"));
33c=document.title.slice(0,-12);document.title=c+"- "+b.innerText+"  - Met Office";document.getElementById("page-header").innerText=c+"- "+b.innerText};f.addEventListener("submit",v);f=()=>{var b=document.getElementById("nearest-forecast-hint"),c=document.getElementById("nearest-place-hint"),r=globalThis.metoffice.hash.getHashParameter("nearestTo");var p=(p=g.searchLandingPath)?l(globalThis.location.pathname)===l(p):document.URL.substring(0,document.URL.length-1).split("//")[1].split("/?")[0].split("/").length===
341;p||(r==="your%20detected%20location"?(b.classList.remove("hidden"),B(b)):c?(c.classList.remove("hidden"),B(c)):r&&(document.referrer.startsWith(globalThis.location.origin)||document.referrer.startsWith(globalThis.metoffice.forecasts.config.cmsHost))&&(b=document.createElement("div"),b.id="nearest-place-hint",b.classList.add("nearest-place-hint"),c=document.createElement("span"),r=decodeURIComponent(r),c.textContent=`${g.nearestResultLabel||"Nearest forecast to"} ${r}`,b.innerHTML="",b.appendChild(c),
35a.appendChild(b),B(b)));g.location&&x(g.location)};document.readyState==="loading"?addEventListener("DOMContentLoaded",f):f();f=document.getElementById("location-search-submit");const C=document.getElementById("forecast-location-search-submit"),t=b=>{if(b.key==="Enter"||b.key===" "){var c=q.getElementsByTagName("li")[0];c&&(c=c.getAttribute("data-geohash"),globalThis.location.href.includes(c)||v());b.preventDefault();e.classList.remove("hidden");d.focus()}};f?.addEventListener("keydown",t);C?.addEventListener("keydown",
36t)}})();
37window.addEventListener("DOMContentLoaded",()=>{const d=document.getElementById("btnFold"),f=document.getElementById("pnlFoldable");f&&d&&(d.addEventListener("click",function(){f.style.display==="none"?(f.style.display="block",d.classList.add("less-detail-control"),d.setAttribute("aria-pressed","true"),d.setAttribute("aria-label","Less detail"),d.title="Less detail",d.querySelector("span").textContent=d.title,f.tabIndex=0,toggleTabIndex(0)):(f.style.display="none",d.classList.remove("less-detail-control"),d.setAttribute("aria-pressed",
38"false"),d.setAttribute("aria-label","More detail"),d.title="More detail",d.querySelector("span").textContent=d.title,toggleTabIndex(-1))}),d.addEventListener("keydown",function(g){if(g.code===13||g.code===32)g.preventDefault(),d.click()}),d.click())});function toggleTabIndex(d){const f=document.getElementById("pnlFoldable");Array.from(document.getElementsByClassName("collapsible")).forEac
38h(g=>{g.tabIndex=d});f.tabIndex=-1}
39window.addEventListener("DOMContentLoaded",()=>{window.addEventListener("beforeprint",()=>{Array.from(document.getElementsByClassName("forecast-table-section")).forEach(d=>{const f=d.querySelector(".forecast-table");if(Array.from(f.querySelectorAll("tr.step-time td")).length>12){const g=f.cloneNode(!0);f.insertAdjacentElement("afterend",g);Array.from(f.getElementsByTagName("tr")).forEach(h=>{Array.from(h.getElementsByTagName("td")).slice(12).forEach(k=>k.classList.add("hidden"))});Array.from(g.getElementsByTagName("tr")).forEach(h=>
40{Array.from(h.getElementsByTagName("td")).slice(0,12).forEach(k=>k.classList.add("hidden"))});window.addEventListener("afterprint",()=>{g&&d.removeChild(g);Array.from(f.getElementsByTagName("tr")).forEach(h=>{Array.from(h.getElementsByTagName("td")).forEach(k=>k.classList.remove("hidden"))})})}})})});
41(()=>{function d(a){f(a);var e=document.getElementById("tooltip"),m=document.getElementById("tooltip-content");const q=a.dataset.name.replace(/-/g," ");document.getElementById("tooltip-heading").innerText=(q!=="Beach wind direction and speed"?q:"Wind direction and speed").replace("enhanced","").trim();e.setAttribute("aria-description",q+" information pop-up");m.innerHTML="";m.appendChild(g[q]());e=document.getElementById("tooltip");m=document.querySelector(".forecast-table-container");const {left:u,
42top:z,width:A,height:x}=a.getBoundingClientRect(),{left:l,top:n,width:y}=m.getBoundingClientRect();window.matchMedia("only screen and (max-width: 719px)").matches?(document.getElementById("modal-background").style.display="block",e.style="",e.style.left="50%",e.style.top=z+x-n+10+"px",e.style.transform="translateX(-50%)"):(e.style="",e.style.float="right",e.style.left=u+A-l+15+"px",e.style.top=z-n+"px",a.classList.contains("right-aligned-tooltip")&&(e.style.left=y-260-85+"px",e.style.top=z-n+24+"px"));
43e.style.display="grid";e.ariaHidden="false";document.getElementById("tooltip-button").focus()}function f(a){var e=document.querySelectorAll(".tooltip");for(let m=0;m<e.length;m++)e[m].setAttribute("aria-description","Information pop-up closed"),e[m].style.display="none",e[m].ariaHidden="true";if(e=document.getElementById("modal-background"))e.style.display="none";a.focus()}const g={"Weather symbols":()=>{const a=document.createElement("p");a.textContent="Our weather symbols tell you the weather conditions for any given hour in the day or night. This means that the symbol for 9am shows you what you will see from 9am to 10am.";
44return a},Temperature:()=>{const a=document.createElement("p");a.textContent="This number shows the air temperature for the time period. You can see the temperature in Celsius or Fahrenheit by using the dropdown menu.";return a},"Temperature enhanced":()=>{const a=document.createElement("p");a.textContent="This number shows the air temperature at the time shown. You can see the temperature in Celsius or Fahrenheit by using the dropdown menu.";return a},"Wind direction and speed":()=>{const a=document.createElement("div");
45a.innerHTML="The arrow shows the direction the wind is blowing. The letters show the direction the wind is blowing from (on a standard 16-point compass).\x3cbr\x3e\x3cbr\x3eThe number represents the average wind speed expected at that time.";return a},"Wind direction and speed enhanced":()=>{const a=document.createElement("div");a.innerHTML="The arrow shows the direction the wind is blowing. The letters show the direction the wind is blowing from (on a standard 16-point compass).\x3cbr\x3e\x3cbr\x3eThe number represents the typical wind speed expected at that time.";
46return a},"Feels like temperature":()=>{const a=document.createElement("p");a.textContent="Feels like temperature considers other factors, such as wind speed and humidity. This gives you a better idea of how the temperature will actually feel at the time.";return a},"Wind gust":()=>{const a=document.createElement("div");a.innerHTML="Wind gust shows the highest wind speed that you should encounter at that time, as winds peak and lull.\x3cbr\x3e\x3cbr\x3eStrong winds are shown in bold for speeds of 29 mph or more.";
47return a}
47,"Wind gust enhanced":()=>{const a=document.createElement("div");a.innerHTML="Wind gust shows the highest wind speed that you should encounter in the period between the time shown and the next time, as winds peak and lull.\x3cbr\x3e\x3cbr\x3eStrong winds are shown in bold for speeds of 29 mph or more.";return a},"Chance of precipitation":()=>{const a=document.createElement("p");a.textContent="Chance of precipitation represents how likely it is that rain (or other types of precipitation, such as sleet, snow, hail and drizzle) will fall from the sky at a certain time.";
48return a},"Chance of precipitation enhanced":()=>{const a=document.createElement("p");a.textContent="Chance of precipitation represents how likely it is that rain (or other types of precipitation, such as sleet, snow, hail and drizzle) will fall in the period between the time shown and the next time.";return a},Visibility:()=>{const a=document.createElement("div");a.innerHTML="Visibility measures the distance at which an object can be clearly seen.\x3cbr\x3e\x3cbr\x3e\x3ctable\x3e\x3ctr\x3e\x3ctd\x3eVP (Very Poor)\x3c/td\x3e\x3ctd\x3eLess than 1 km\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eP (Poor)\x3c/td\x3e\x3ctd\x3e1.1 km to 4 km\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eM (Moderate)\x3c/td\x3e\x3ctd\x3e4.1 km to 10 km\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eG (Good)\x3c/td\x3e\x3ctd\x3e10.1 km to 20 km\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eVG (Very Good)\x3c/td\x3e\x3ctd\x3e20.1 km to 40 km\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eE (Excellent)\x3c/td\x3e\x3ctd\x3eGreater than 40 km\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e";
49return a},"Height of waves offshore":()=>{const a=document.createElement("div");a.innerHTML="This is the average height of the waves, 1-2 miles out to sea. The height of the waves can vary. The individual waves out to sea or at the beach can be higher than this number. If you are close to the water, keep an eye on the waves to stop you or your belongings being swept away.\x3cbr\x3e\x3cbr\x3e\x3cspan class\x3d'link-paragraph'\x3eRead more about \x3ca id\x3d'wave-height-link' href\x3d'https://weather.metoffice.gov.uk/guides/coast-and-sea/beach-and-tide-times#waveheight'\x3ecalculating the expected height of the waves at the beach.\x3c/a\x3e\x3c/span\x3e";
50return a},"Period of waves offshore":()=>{const a=document.createElement("div");a.innerHTML="This is the average number of seconds between one wave and the next, 1-2 miles out to sea. A long wave period (more than 10 seconds) means the waves at the beach may be more powerful. Lifeguards can give you advice on waves if you\u2019re planning to go into the water.\x3cbr\x3e\x3cbr\x3e\x3cspan class\x3d'link-paragraph'\x3eRead more about the\x3ca id\x3d'wave-period-link' href\x3d'https://weather.metoffice.gov.uk/guides/coast-and-sea/beach-and-tide-times#waveperiod'\x3e period of waves.\x3c/a\x3e\x3c/span\x3e";
51return a},"Beach wind direction and speed":()=>{const a=document.createElement("div");a.innerHTML="The arrow shows the direction of the wind (up is north). If the arrow points from land to sea, the wind will be blowing out to sea (\u2018offshore\u2019). The number is the average wind speed.\x3cbr\x3e\x3cbr\x3eBeware of offshore winds if you are using inflatables, paddle boards or kayaks. These winds can blow you out to sea. \x3cspan\x3eRead more about \x3ca id\x3d'beach-wind-direction-and-speed-link' href\x3d'https://weather.metoffice.gov.uk/guides/coast-and-sea/beach-and-tide-times#winddirection'\x3ehow wind will affect you at the beach.\x3c/a\x3e\x3c/span\x3e";
52return a},"Wave direction offshore":()=>{const a=document.createElement("div");a.innerHTML="The arrow shows the average direction of the waves 1-2 miles out to sea. It indicates how sheltered the beach will be from these waves. If the arrow points towards land, most of the waves\u2019 power will reach the beach. If the arrow is parallel to or pointing away from land, the wave height is likely to be lower on the beach than it is offshore. \x3cbr\x3e\x3cbr\x3e Lifeguards can give you advice on waves if you\u2019re planning to go into the water.";
53return a},Humidity:()=>{const a=document.createElement("p");a.textContent="Humidity is the amount of water vapor in the air. If there is a lot of water vapour, the humidity will be high. The higher the percentage of humidity, the wetter it will feel outside.";return a},UV:()=>{const a=document.createElement("div");a.innerHTML='\n              \x3cp\x3eUV exposure index and the protection required to help keep you safe:\x3c/p\x3e\n              \x3cp class\x3d"uv-tooltip-grid"\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"-" data-value\x3d"0" title\x3d"No risk of UV"\x3e-\x3c/span\x3e\n                \x3cspan\x3e\x3cstrong\x3eNo risk of UV\x3c/strong\x3e - It\u2019s safe to stay outside.\x3c/span\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"L" data-value\x3d"1" title\x3d"Low UV"\x3e1-2\x3c/span\x3e\n                \x3cspan\x3e\x3cspan aria-label\x3d"Low UV"\x3e\x3cstrong aria-hidden\x3d"true"\x3eLow\x3c/strong\x3e\x3c/span\x3e - You can safely stay outside. Consider sunscreen in direct sunlight.\x3c/span\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"M" data-value\x3d"M" title\x3d"Moderate UV"\x3e3-5\x3c/span\x3e\n                \x3cspan\x3e\x3cspan aria-label\x3d"Moderate UV"\x3e\x3cstrong aria-hidden\x3d"true"\x3eModerate\x3c/strong\x3e\x3c/span\x3e - Take care during midday hours and do not spend too much time in the sun unprotected. Sunscreen advised.\x3c/span\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"H" data-value\x3d"H" title\x3d"High UV"\x3e6-7\x3c/span\x3e\n                \x3cspan\x3e\x3cspan aria-label\x3d"High UV"\x3e\x3cstrong aria-hidden\x3d"true"\x3eHigh\x3c/strong\x3e\x3c/span\x3e - Seek shade during midday hours, cover up and wear sunscreen.\x3c/span\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"VH" data-value\x3d"VH" title\x3d"Very High UV"\x3e8-10\x3c/span\x3e\n                \x3cspan\x3e\x3cspan aria-label\x3d"Very High UV"\x3e\x3cstrong aria-hidden\x3d"true"\x3eVery high\x3c/strong\x3e\x3c/span\x3e - Spend time in the shade between 11am and 3pm. Shirt, sunscreen and hat are essential.\x3c/span\x3e\n                \x3cspan class\x3d"icon" aria-hidden\x3d"true" role\x3d"img" data-type\x3d"uv" data-category\x3d"Ex" data-value\x3d"Ex" title\x3d"Extreme UV"\x3e11\x3c/span\x3e\n                \x3cspan\x3e\x3cspan aria-label\x3d"Extreme UV"\x3e\x3cstrong aria-hidden\x3d"true"\x3eExtreme\x3c/strong\x3e\x3c/span\x3e - Avoid being outside during midday hours. Shirt, sunscreen and hat essential.\x3c/span\x3e\n              \x3c/p\x3e\n            ';
54return a},"Probable temperatures":()=>{const a=document.createElement("div");a.innerHTML='\n              \x3cp\x3eWe provide four temperature values to help you plan your day and night.\x3c/p\x3e\n              \x3cspan class\x3d"possible-temperatures"\x3e\x3cstrong\x3eMost likely temperatures:\x3c/strong\x3e these are the temperatures you can expect during the hottest part of the day and the coldest part of the night. They represent the most probable temperatures.\x3c/span\x3e\n              \x3cspan class\x3d"possible-temperatures"\x3e\x3cstrong\x3eHighest probable (beta):\x3c/strong\x3e it shows how hot it might get during the day in rare cases.\x3c/span\x3e\n              \x3cspan class\x3d"possible-temperatures"\x3e\x3cstrong\x3eLowest probable (beta):\x3c/strong\x3e it shows how cold it might get during the night in rare cases.\x3c/span\x3e\n            ';
55return a},"Water quality":()=>{const a=document.createElement("p");a.textContent="The Environment Agency makes a daily pollution risk forecast at this site based on the effects of rain, wind and seasonality on bathing water quality. When these factors comb
55ine to make short term pollution likely the Environment Agency issue a pollution risk warning advising against bathing at the bathing water. After a short-term pollution event, levels of bacteria typically return to normal after a day or so but it\u2019s possible to have several warning days in a row.";
56return a}};let h=null,k=null;(function(){document.querySelectorAll(".tooltip-header").forEach(a=>{const e=a.querySelector(".tooltip-trigger");e.style.display="inline-block";e.addEventListener("click",()=>{d(e);h=a;k=e});e.addEventListener("keydown",m=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),d(e),h=a,k=e});document.querySelector("#tooltip .close").addEventListener("click",m=>{f(m.target);k.focus({focusVisible:!0})})});window.addEventListener("click",function(a){h&&!h.querySelector(".tooltip-trigger").contains(a.target)&&
57(h.querySelector(".tooltip-trigger").focus({focusVisible:!0}),h=null)});document.addEventListener("keydown",a=>{if(!a.defaultPrevented)switch(a.key){case "Esc":case "Escape":f(a.target),h&&h.querySelector(".tooltip-trigger").focus({focusVisible:!0})}});document.getElementById("modal-background")?.addEventListener("click",a=>{f(a.target)});document.querySelectorAll(".tooltip").forEach(a=>{document.body.addEventListener("click",e=>{!a||a.contains(e.target)||e.target.classList.contains("tooltip-trigger")||
58a.style.display!=="grid"||e.target.tagName==="SELECT"||f(e.target)})})})()})();window.metoffice=window.metoffice||{};
59window.metoffice.units=(()=>{const d={temperature:{c:"degrees Celsius",f:"degrees Fahrenheit"},windSpeed:{mph:"miles per hour",kph:"kilometres per hour",kts:"nautical miles per hour",mps:"metres per second",bft:"Beaufort"},visibility:{text:"visible",km:"kilometres"}},f=(k,a)=>(k=d[k])?(k=Object.keys(k),k.includes(a)?a:k[0]):null,g=(k,a)=>{const e=f(k,a);e&&(Array.from(document.querySelectorAll(`[data-measure=${k}]`)).forEach(m=>m.value=e),Array.from(document.querySelectorAll(`[data-unit=${k}]`)).forEach(m=>
60{typeof m.dataset[e]!=="undefined"&&(m.dataset.keepContent||(m.innerText=m.dataset[e]),m.dataset.titleFormat&&(m.title=m.dataset.titleFormat.replace("{value}",m.dataset[e]).replace("{description}",d[k][e])),m.dataset.ariaLabelFormat&&(m.ariaLabel=m.dataset.ariaLabelFormat.replace("{value}",m.dataset[e]).replace("{description}",d[k][e])))}))},h=()=>Object.entries(readUnitsFromStorage()).forEach(([k,a])=>g(k,a));return{init:()=>{Array.from(document.querySelectorAll("[data-measure]")).forEach(k=>{const a=
61k.dataset.measure;k.addEventListener("change",()=>{const e=readUnitsFromStorage();e[a]=k.value;saveUnitsToStorage(e);h()})});h()},updateAllUnits:h}})();window.addEventListener("DOMContentLoaded",window.metoffice.units.init);

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.