From b48b9d8af3aee1d3026d176c12558804c7d00094 Mon Sep 17 00:00:00 2001 From: Lani Aung Date: Thu, 26 Jun 2025 07:42:55 -0700 Subject: [PATCH] Added daily and hourly styling at least --- src/styles.less | 53 ++++++++++++++++++++ src/weather.ts | 130 +++++++++++++++++++++++++++++++++--------------- www/index.html | 5 +- www/main.js | 107 +++++++++++++++++++++++++++------------ www/main.js.map | 2 +- www/styles.css | 51 +++++++++++++++++++ 6 files changed, 275 insertions(+), 73 deletions(-) diff --git a/src/styles.less b/src/styles.less index a3ab828..6278d80 100644 --- a/src/styles.less +++ b/src/styles.less @@ -51,7 +51,60 @@ body { #time { font-size: 3rem; + margin-bottom: 1rem; text-align: center; + + .material { + font-variation-settings: "FILL" 0, "wght" 700, "opsz" 24; + vertical-align: sub; + } + } + + #hourly { + display: flex; + font-size: .75rem; + margin: 1rem 0; + text-align: center; + } + + #daily { + display: flex; + + .daily-slot { + display: flex; + flex-direction: column; + + .range { + white-space: nowrap; + } + + .uv { + &.moderate { + color: yellow; + -webkit-text-fill-color: yellow; + } + + &.high { + color: orange; + -webkit-text-fill-color: orange; + } + + &.very-high { + color: red; + -webkit-text-fill-color: red; + } + + &.extreme { + color: purple; + -webkit-text-fill-color: purple; + } + } + } + } + + #current { + display: grid; + grid-template-columns: 1fr 1fr; } section header { diff --git a/src/weather.ts b/src/weather.ts index b7475b0..405ae7e 100644 --- a/src/weather.ts +++ b/src/weather.ts @@ -15,11 +15,11 @@ export default class Weather { constructor(latitude?: number, longitude?: number) { this.options = new WeatherOptions(latitude ?? 47.61002138071677, longitude ?? -122.17906310779568) - const time = document.getElementById("time") + const me = this + const time = document.getElementById("time-value") time.textContent = new Date().toLocaleTimeString("en-US", { hour12: false, timeStyle: "short" }) setInterval(() => time.textContent = new Date().toLocaleTimeString("en-US", { hour12: false, timeStyle: "short" }), 15000) - const me = this setInterval(() => me.fetchWeather().then(() => me.setDisplay()), 300000) me.fetchWeather().then(() => me.setDisplay()) } @@ -37,7 +37,7 @@ export default class Weather { const hourly = response.hourly() const daily = response.daily() - if (current != null) me.setCurrentData(current) + if (current != null) me.current = new CurrentWeather(current) if (hourly != null) me.setHourlyData(hourly) if (daily != null) me.setDailyData(daily) } @@ -80,20 +80,6 @@ export default class Weather { return false } - private setCurrentData(current: VariablesWithTime) { - this.current = { - time: new Date(Number(current.time()) * 1000), - temperature: current.variables(0)!.value(), - humidity: current.variables(1)!.value(), - feelsLike: current.variables(2)!.value(), - precipitation: current.variables(3)!.value(), - windSpeed: current.variables(4)!.value(), - windGusts: current.variables(5)!.value(), - windDirection: current.variables(6)!.value(), - cloudCoverage: current.variables(7)!.value() - } - } - private setHourlyData(hourly: VariablesWithTime) { const length = Number(hourly.timeEnd() - hourly.time()) / hourly.interval() const temperatures = hourly.variables(0)!.valuesArray() @@ -103,7 +89,7 @@ export default class Weather { for (let i = 0; i < length; i++) { this.hourly.push({ - time: new Date((Number(hourly.time()) + i * hourly.interval()) * 1000), + time: new Date(new Date().getTime() + i * 3600000), temperature: temperatures[i], precipitation: precipitationTotals[i], precipitationProbability: precipitationProbabilities[i] @@ -127,31 +113,65 @@ export default class Weather { this.daily.length = 0 for (let i = 0; i < length; i++) { - this.daily.push({ - time: new Date((Number(daily.time()) + i * daily.interval()) * 1000), - maxTemperature: maxTemperatures[i], - minTemperature: minTemperatures[i], - sunrise: new Date((Number(sunrise.valuesInt64(i))) * 1000), - sunset: new Date((Number(sunset.valuesInt64(i))) * 1000), - maxUV: maxUVs[i], - totalPrecipitation: precipitationTotals[i], - hoursOfPrecipitation: precipitationHours[i], - maxWindSpeed: maxWindSpeeds[i], - maxWindGusts: maxWindGusts[i], - prominentWindDirection: prominentWindDirections[i] - }) + const weather = new DailyWeather() + weather.time = new Date((Number(daily.time()) + i * daily.interval()) * 1000) + weather.maxTemperature = maxTemperatures[i] + weather.minTemperature = minTemperatures[i] + weather.sunrise = new Date((Number(sunrise.valuesInt64(i))) * 1000) + weather.sunset = new Date((Number(sunset.valuesInt64(i))) * 1000) + weather.maxUV = maxUVs[i] + weather.totalPrecipitation = precipitationTotals[i] + weather.hoursOfPrecipitation = precipitationHours[i] + weather.maxWindSpeed = maxWindSpeeds[i] + weather.maxWindGusts = maxWindGusts[i] + weather.prominentWindDirection = prominentWindDirections[i] + + this.daily.push(weather) } } private setDisplay() { + console.debug(this) const current = document.getElementById("current") - current.innerHTML = `
thermostat${Math.round(this.current.temperature)} (${Math.round(this.current.feelsLike)})
-
-
water_drop ${Math.round(this.current.humidity)}%
-
cloud ${Math.round(this.current.cloudCoverage)}%
-
weather_mix ${Math.round(this.current.precipitation)}%
-
air ${Math.round(this.current.windSpeed)} (${Math.round(this.current.windGusts)}) ${this.inCardinals(this.current.windDirection)}
-
` + current.innerHTML = `
thermostat${Math.round(this.current.temperature)} (${Math.round(this.current.feelsLike)})
+
humidity_percentage ${Math.round(this.current.humidity)}%
+
cloud ${Math.round(this.current.cloudCoverage)}%
+
weather_mix ${Math.round(this.current.precipitation)}%
+
air ${Math.round(this.current.windSpeed)} (${Math.round(this.current.windGusts)}) ${this.inCardinals(this.current.windDirection)}
` + if (!this.daily) return + + const icon = document.getElementById("time-icon") + icon.innerText = this.current.getCloudCoverageIcon(this.daily[0].sunrise, this.daily[0].sunset) + + const dailySlots: string[] = [] + for (const day of this.daily) { + dailySlots.push(`
+ ${day.time.getDate()} + ${Math.round(day.minTemperature)} - ${Math.round(day.maxTemperature)} + ${Math.round(day.maxUV)} + ${day.sunrise.toLocaleTimeString("en-US", { timeStyle: "short", hour12: false })} + ${day.sunset.toLocaleTimeString("en-US", { timeStyle: "short", hour12: false })} +
`) + } + + const daily = document.getElementById("daily") + daily.innerHTML = dailySlots.join("\r\n") + + if (!this.hourly) return + + const hourlySlots: string[] = [] + for (let i = 0; i < 12; i++) { + const hour = this.hourly[i] + hourlySlots.push(`
+ ${hour.time.getHours()} + ${Math.round(hour.temperature)} + ${hour.precipitation}" + ${hour.precipitationProbability}% +
`) + } + + const hourly = document.getElementById("hourly") + hourly.innerHTML = hourlySlots.join("\r\n") } private inCardinals(direction: number): string { @@ -174,6 +194,7 @@ class WeatherOptions { "wind_speed_unit" = "mph" "temperature_unit" = "fahrenheit" "precipitation_unit" = "inch" + "forecast_hours": 12 constructor(latitude: number, longitude: number, timezone = "America/Los_Angeles") { this.latitude = latitude @@ -182,7 +203,7 @@ class WeatherOptions { } } -interface CurrentWeather { +class CurrentWeather { time: Date temperature: number humidity: number @@ -192,9 +213,30 @@ interface CurrentWeather { windGusts: number windDirection: number cloudCoverage: number + + constructor(current: VariablesWithTime) { + this.time = new Date(Number(current.time()) * 1000) + this.temperature = current.variables(0)!.value() + this.humidity = current.variables(1)!.value() + this.feelsLike = current.variables(2)!.value() + this.precipitation = current.variables(3)!.value() + this.windSpeed = current.variables(4)!.value() + this.windGusts = current.variables(5)!.value() + this.windDirection = current.variables(6)!.value() + this.cloudCoverage = current.variables(7)!.value() + } + + getCloudCoverageIcon(sunrise?: Date, sunset?: Date): string { + if (this.cloudCoverage > 75 || !sunrise || !sunset) return "cloud" + + if (this.time.getTime() > sunrise.getTime() && this.time.getTime() < sunset.getTime()) + return this.cloudCoverage > 25 ? "partly_cloudy_day" : "clear_day" + + return this.cloudCoverage > 25 ? "partly_cloudy_night" : "bedtime" + } } -interface DailyWeather { +class DailyWeather { time: Date hoursOfPrecipitation: number totalPrecipitation: number @@ -206,6 +248,14 @@ interface DailyWeather { prominentWindDirection: number maxWindGusts: number maxWindSpeed: number + + uvRating(): string { + if (this.maxUV < 3) return "low" + if (this.maxUV < 6) return "moderate" + if (this.maxUV < 8) return "high" + if (this.maxUV < 11) return "very-high" + return "extreme" + } } interface HourlyWeather { diff --git a/www/index.html b/www/index.html index 1a7cfe8..70c0132 100644 --- a/www/index.html +++ b/www/index.html @@ -7,7 +7,10 @@
-
+
+ + +
diff --git a/www/main.js b/www/main.js index f8dcdaa..9d8cc52 100644 --- a/www/main.js +++ b/www/main.js @@ -2323,10 +2323,10 @@ var Weather = /** @class */ (function () { this.hourly = []; this.daily = []; this.options = new WeatherOptions(latitude !== null && latitude !== void 0 ? latitude : 47.61002138071677, longitude !== null && longitude !== void 0 ? longitude : -122.17906310779568); - var time = document.getElementById("time"); + var me = this; + var time = document.getElementById("time-value"); time.textContent = new Date().toLocaleTimeString("en-US", { hour12: false, timeStyle: "short" }); setInterval(function () { return time.textContent = new Date().toLocaleTimeString("en-US", { hour12: false, timeStyle: "short" }); }, 15000); - var me = this; setInterval(function () { return me.fetchWeather().then(function () { return me.setDisplay(); }); }, 300000); me.fetchWeather().then(function () { return me.setDisplay(); }); } @@ -2351,7 +2351,7 @@ var Weather = /** @class */ (function () { hourly = response.hourly(); daily = response.daily(); if (current != null) - me.setCurrentData(current); + me.current = new CurrentWeather(current); if (hourly != null) me.setHourlyData(hourly); if (daily != null) @@ -2396,19 +2396,6 @@ var Weather = /** @class */ (function () { } return false; }; - Weather.prototype.setCurrentData = function (current) { - this.current = { - time: new Date(Number(current.time()) * 1000), - temperature: current.variables(0).value(), - humidity: current.variables(1).value(), - feelsLike: current.variables(2).value(), - precipitation: current.variables(3).value(), - windSpeed: current.variables(4).value(), - windGusts: current.variables(5).value(), - windDirection: current.variables(6).value(), - cloudCoverage: current.variables(7).value() - }; - }; Weather.prototype.setHourlyData = function (hourly) { var length = Number(hourly.timeEnd() - hourly.time()) / hourly.interval(); var temperatures = hourly.variables(0).valuesArray(); @@ -2417,7 +2404,7 @@ var Weather = /** @class */ (function () { this.hourly.length = 0; for (var i = 0; i < length; i++) { this.hourly.push({ - time: new Date((Number(hourly.time()) + i * hourly.interval()) * 1000), + time: new Date(new Date().getTime() + i * 3600000), temperature: temperatures[i], precipitation: precipitationTotals[i], precipitationProbability: precipitationProbabilities[i] @@ -2438,24 +2425,45 @@ var Weather = /** @class */ (function () { var prominentWindDirections = daily.variables(9).valuesArray(); this.daily.length = 0; for (var i = 0; i < length; i++) { - this.daily.push({ - time: new Date((Number(daily.time()) + i * daily.interval()) * 1000), - maxTemperature: maxTemperatures[i], - minTemperature: minTemperatures[i], - sunrise: new Date((Number(sunrise.valuesInt64(i))) * 1000), - sunset: new Date((Number(sunset.valuesInt64(i))) * 1000), - maxUV: maxUVs[i], - totalPrecipitation: precipitationTotals[i], - hoursOfPrecipitation: precipitationHours[i], - maxWindSpeed: maxWindSpeeds[i], - maxWindGusts: maxWindGusts[i], - prominentWindDirection: prominentWindDirections[i] - }); + var weather = new DailyWeather(); + weather.time = new Date((Number(daily.time()) + i * daily.interval()) * 1000); + weather.maxTemperature = maxTemperatures[i]; + weather.minTemperature = minTemperatures[i]; + weather.sunrise = new Date((Number(sunrise.valuesInt64(i))) * 1000); + weather.sunset = new Date((Number(sunset.valuesInt64(i))) * 1000); + weather.maxUV = maxUVs[i]; + weather.totalPrecipitation = precipitationTotals[i]; + weather.hoursOfPrecipitation = precipitationHours[i]; + weather.maxWindSpeed = maxWindSpeeds[i]; + weather.maxWindGusts = maxWindGusts[i]; + weather.prominentWindDirection = prominentWindDirections[i]; + this.daily.push(weather); } }; Weather.prototype.setDisplay = function () { + console.debug(this); var current = document.getElementById("current"); - current.innerHTML = "
thermostat".concat(Math.round(this.current.temperature), " (").concat(Math.round(this.current.feelsLike), ")
\n
\n
water_drop ").concat(Math.round(this.current.humidity), "%
\n
cloud ").concat(Math.round(this.current.cloudCoverage), "%
\n
weather_mix ").concat(Math.round(this.current.precipitation), "%
\n
air ").concat(Math.round(this.current.windSpeed), " (").concat(Math.round(this.current.windGusts), ") ").concat(this.inCardinals(this.current.windDirection), "
\n
"); + current.innerHTML = "
thermostat".concat(Math.round(this.current.temperature), " (").concat(Math.round(this.current.feelsLike), ")
\n
humidity_percentage ").concat(Math.round(this.current.humidity), "%
\n
cloud ").concat(Math.round(this.current.cloudCoverage), "%
\n
weather_mix ").concat(Math.round(this.current.precipitation), "%
\n
air ").concat(Math.round(this.current.windSpeed), " (").concat(Math.round(this.current.windGusts), ") ").concat(this.inCardinals(this.current.windDirection), "
"); + if (!this.daily) + return; + var icon = document.getElementById("time-icon"); + icon.innerText = this.current.getCloudCoverageIcon(this.daily[0].sunrise, this.daily[0].sunset); + var dailySlots = []; + for (var _i = 0, _a = this.daily; _i < _a.length; _i++) { + var day = _a[_i]; + dailySlots.push("
\n ".concat(day.time.getDate(), "\n ").concat(Math.round(day.minTemperature), " - ").concat(Math.round(day.maxTemperature), "\n ").concat(Math.round(day.maxUV), "\n ").concat(day.sunrise.toLocaleTimeString("en-US", { timeStyle: "short", hour12: false }), "\n ").concat(day.sunset.toLocaleTimeString("en-US", { timeStyle: "short", hour12: false }), "\n
")); + } + var daily = document.getElementById("daily"); + daily.innerHTML = dailySlots.join("\r\n"); + if (!this.hourly) + return; + var hourlySlots = []; + for (var i = 0; i < 12; i++) { + var hour = this.hourly[i]; + hourlySlots.push("
\n ".concat(hour.time.getHours(), "\n ").concat(Math.round(hour.temperature), "\n ").concat(hour.precipitation, "\"\n ").concat(hour.precipitationProbability, "%\n
")); + } + var hourly = document.getElementById("hourly"); + hourly.innerHTML = hourlySlots.join("\r\n"); }; Weather.prototype.inCardinals = function (direction) { if (direction > 337.5 || direction <= 22.5) @@ -2492,6 +2500,43 @@ var WeatherOptions = /** @class */ (function () { } return WeatherOptions; }()); +var CurrentWeather = /** @class */ (function () { + function CurrentWeather(current) { + this.time = new Date(Number(current.time()) * 1000); + this.temperature = current.variables(0).value(); + this.humidity = current.variables(1).value(); + this.feelsLike = current.variables(2).value(); + this.precipitation = current.variables(3).value(); + this.windSpeed = current.variables(4).value(); + this.windGusts = current.variables(5).value(); + this.windDirection = current.variables(6).value(); + this.cloudCoverage = current.variables(7).value(); + } + CurrentWeather.prototype.getCloudCoverageIcon = function (sunrise, sunset) { + if (this.cloudCoverage > 75 || !sunrise || !sunset) + return "cloud"; + if (this.time.getTime() > sunrise.getTime() && this.time.getTime() < sunset.getTime()) + return this.cloudCoverage > 25 ? "partly_cloudy_day" : "clear_day"; + return this.cloudCoverage > 25 ? "partly_cloudy_night" : "bedtime"; + }; + return CurrentWeather; +}()); +var DailyWeather = /** @class */ (function () { + function DailyWeather() { + } + DailyWeather.prototype.uvRating = function () { + if (this.maxUV < 3) + return "low"; + if (this.maxUV < 6) + return "moderate"; + if (this.maxUV < 8) + return "high"; + if (this.maxUV < 11) + return "very-high"; + return "extreme"; + }; + return DailyWeather; +}()); var LastFetched = /** @class */ (function () { function LastFetched() { this.current = new Date(); diff --git a/www/main.js.map b/www/main.js.map index e338969..a589491 100644 --- a/www/main.js.map +++ b/www/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;AAAa;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB,mBAAmB,mBAAmB;;;;;;;;;;;ACnB5C;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,YAAY,aAAa,aAAa;;;;;;;;;;;ACvG1B;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW,YAAY,YAAY;;;;;;;;;;;ACjDvB;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,yBAAyB,mBAAO,CAAC,sEAAkB;AACnD,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,sBAAsB,mBAAO,CAAC,gEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;;;;;;;;;;ACxHb;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;;;;;;;;;;;AC5JnC;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,kCAAkC,mBAAO,CAAC,wFAA2B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;;;;;;;;;;AC9EZ;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,mBAAmB,mBAAO,CAAC,0DAAY;AACvC,iCAAiC,mBAAO,CAAC,sFAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;;;;;;;;;;;;;;;;ACnHoB;AACwD;AAC/F;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,uDAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU,MAAM;AAClC,iDAAiD,qDAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,mCAAmC;AACnC;AACA,uDAAuD,uDAAY;AACnE;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA,6BAA6B,uDAAY,EAAE,SAAS,KAAK,uDAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,6DAAkB;AAChE;AACA;AACA,qCAAqC,qDAAU;AAC/C,gBAAgB,iEAAsB;AACtC,0CAA0C,iEAAsB;AAChE;AACA,oBAAoB,iEAAsB;AAC1C;AACA,yBAAyB,iEAAsB,MAAM,QAAQ;AAC7D;AACA;AACA;AACA,iCAAiC,qDAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU;AAC5B,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACphBoE;AACC;AAC5B;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4CAAK;AACb,eAAe,8CAAO;AACtB;AACA;AACA,QAAQ,4CAAK,CAAC,qDAAc;AAC5B,QAAQ,4CAAK,CAAC,qDAAc;AAC5B,eAAe,8CAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAO;AACf,gCAAgC,4CAAK;AACrC;AACA;AACA,QAAQ,8CAAO;AACf,gCAAgC,4CAAK,CAAC,qDAAc;AACpD,oCAAoC,4CAAK,CAAC,qDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qDAAU;AAC5D,YAAY,iEAAsB;AAClC;AACA;AACA;AACA,wBAAwB,IAAI,iEAAsB,EAAE;AACpD,yEAAyE,qDAAU;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU;AAC5B;AACA,6BAA6B,kDAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,qDAAU,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iEAAsB;AAClD;AACA,gBAAgB,iEAAsB;AACtC;AACA,wBAAwB,IAAI,iEAAsB,EAAE;AACpD,uEAAuE,qDAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACtPO;AACA;AACA;AACA;;;;;;;;;;;;;;;ACHA;AACP;AACA;AACA;AACA,CAAC,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJiB;AACF;AACY;AACJ;AACiB;AAC5B;AACF;AACO;;;;;;;;;;;;;;;;;;ACPvC;AACA;AACA;AACA;;;;;;;;;;;ACHM;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,sBAAsB,mBAAO,CAAC,kEAAa;AAC3C,+BAA+B,mBAAO,CAAC,kGAAqC;AAC5E;AACA;AACA,iIAAiI;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,aAAa,gBAAgB;AACxC,aAAa;AACb;AACA;AACA,yIAAyI;AACzI;AACA;AACA,+CAA+C,IAAI,GAAG,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;;;;;ACnEA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACuB;AACxB;AACA;AACA,uBAAuB,4CAAG;AAC1B;AACA;AACA,wDAAwD,4BAA4B;AACpF;AACA;AACA;AACA,CAAC;AACiB;AAClB;AACA;AACA;AACA;AACA,wBAAwB,4CAAG;AAC3B,wBAAwB,4CAAG;AAC3B,yBAAyB,4CAAG;AAC5B,yBAAyB,4CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AACwB;AACzB;AACA;AACA;AACA;AACA,6BAA6B,4CAAG;AAChC;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB;AACA;AACA;AACA;AACA,yBAAyB,4CAAG;AAC5B,6BAA6B,4CAAG;AAChC,mCAAmC,4CAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACmB;AACpB;AACA;AACA;AACA;AACA,yBAAyB,4CAAG;AAC5B,wBAAwB,4CAAG;AAC3B,yBAAyB,4CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACiB;;;;;;;;;;;;;;;;AChIuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qDAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,YAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;AChDG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4CAAG;AAC9B;AACA;AACA,eAAe,4CAAG;AAClB;AACA;AACA,CAAC;AACD,iEAAe,GAAG,EAAC;;;;;;;;;;;;;;;AC7BnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,GAAG,EAAC;;;;;;;;;;;;;;;AC/CnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;ACxCC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA,iCAAiC,8CAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;ACpFrB;AAC4B;AAC8E;AAC1G;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA,yBAAyB,8CAAK;AAC9B;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA,kCAAkC,kDAAkD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yDAAa;AAC1C;AACA;AACA,6BAA6B,8DAAkB;AAC/C;AACA;AACA,6BAA6B,mDAAO;AACpC;AACA;AACA,6BAA6B,oDAAQ;AACrC;AACA;AACA,6BAA6B,kDAAM;AACnC;AACA;AACA,6BAA6B,qDAAS;AACtC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,SAAS,EAAC;;;;;;;;;;;;;;;;;ACrDzB,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,mBAAmB,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,6IAA6I,cAAc;AAC3J,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AAC4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,mCAAmC;AACvG,kCAAkC,mEAAmE,mCAAmC,IAAI;AAC5I;AACA,kCAAkC,4CAA4C,yBAAyB,IAAI;AAC3G,6CAA6C,yBAAyB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,6CAA6C,0DAAe;AAC5D;AACA;AACA,8DAA8D,yBAAyB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,OAAO,EAAC;AACvB;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;UClPD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACNoC;AACJ;AAChC,8BAA8B;AAC9B;AACA,QAAQ,kDAAS;AACjB;AACA;AACA,sBAAsB,gDAAO;AAC7B,KAAK;AACL,sBAAsB,gDAAO;AAC7B,KAAK;AACL,CAAC","sources":["webpack:///./node_modules/@openmeteo/sdk/aggregation.js","webpack:///./node_modules/@openmeteo/sdk/model.js","webpack:///./node_modules/@openmeteo/sdk/unit.js","webpack:///./node_modules/@openmeteo/sdk/variable-with-values.js","webpack:///./node_modules/@openmeteo/sdk/variable.js","webpack:///./node_modules/@openmeteo/sdk/variables-with-time.js","webpack:///./node_modules/@openmeteo/sdk/weather-api-response.js","webpack:///./node_modules/flatbuffers/mjs/builder.js","webpack:///./node_modules/flatbuffers/mjs/byte-buffer.js","webpack:///./node_modules/flatbuffers/mjs/constants.js","webpack:///./node_modules/flatbuffers/mjs/encoding.js","webpack:///./node_modules/flatbuffers/mjs/flatbuffers.js","webpack:///./node_modules/flatbuffers/mjs/utils.js","webpack:///./node_modules/openmeteo/lib/index.js","webpack:///./src/color-schemes.ts","webpack:///./src/crack.ts","webpack:///./src/hsl.ts","webpack:///./src/rgb.ts","webpack:///./src/sand-painter.ts","webpack:///./src/state.ts","webpack:///./src/substrate.ts","webpack:///./src/weather.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/launch.ts"],"sourcesContent":["\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Aggregation = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Aggregation;\n(function (Aggregation) {\n Aggregation[Aggregation[\"none\"] = 0] = \"none\";\n Aggregation[Aggregation[\"minimum\"] = 1] = \"minimum\";\n Aggregation[Aggregation[\"maximum\"] = 2] = \"maximum\";\n Aggregation[Aggregation[\"mean\"] = 3] = \"mean\";\n Aggregation[Aggregation[\"p10\"] = 4] = \"p10\";\n Aggregation[Aggregation[\"p25\"] = 5] = \"p25\";\n Aggregation[Aggregation[\"median\"] = 6] = \"median\";\n Aggregation[Aggregation[\"p75\"] = 7] = \"p75\";\n Aggregation[Aggregation[\"p90\"] = 8] = \"p90\";\n Aggregation[Aggregation[\"dominant\"] = 9] = \"dominant\";\n Aggregation[Aggregation[\"sum\"] = 10] = \"sum\";\n Aggregation[Aggregation[\"spread\"] = 11] = \"spread\";\n})(Aggregation || (exports.Aggregation = Aggregation = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Model = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Model;\n(function (Model) {\n Model[Model[\"undefined\"] = 0] = \"undefined\";\n Model[Model[\"best_match\"] = 1] = \"best_match\";\n Model[Model[\"gfs_seamless\"] = 2] = \"gfs_seamless\";\n Model[Model[\"gfs_global\"] = 3] = \"gfs_global\";\n Model[Model[\"gfs_hrrr\"] = 4] = \"gfs_hrrr\";\n Model[Model[\"meteofrance_seamless\"] = 5] = \"meteofrance_seamless\";\n Model[Model[\"meteofrance_arpege_seamless\"] = 6] = \"meteofrance_arpege_seamless\";\n Model[Model[\"meteofrance_arpege_world\"] = 7] = \"meteofrance_arpege_world\";\n Model[Model[\"meteofrance_arpege_europe\"] = 8] = \"meteofrance_arpege_europe\";\n Model[Model[\"meteofrance_arome_seamless\"] = 9] = \"meteofrance_arome_seamless\";\n Model[Model[\"meteofrance_arome_france\"] = 10] = \"meteofrance_arome_france\";\n Model[Model[\"meteofrance_arome_france_hd\"] = 11] = \"meteofrance_arome_france_hd\";\n Model[Model[\"jma_seamless\"] = 12] = \"jma_seamless\";\n Model[Model[\"jma_msm\"] = 13] = \"jma_msm\";\n Model[Model[\"jms_gsm\"] = 14] = \"jms_gsm\";\n Model[Model[\"jma_gsm\"] = 15] = \"jma_gsm\";\n Model[Model[\"gem_seamless\"] = 16] = \"gem_seamless\";\n Model[Model[\"gem_global\"] = 17] = \"gem_global\";\n Model[Model[\"gem_regional\"] = 18] = \"gem_regional\";\n Model[Model[\"gem_hrdps_continental\"] = 19] = \"gem_hrdps_continental\";\n Model[Model[\"icon_seamless\"] = 20] = \"icon_seamless\";\n Model[Model[\"icon_global\"] = 21] = \"icon_global\";\n Model[Model[\"icon_eu\"] = 22] = \"icon_eu\";\n Model[Model[\"icon_d2\"] = 23] = \"icon_d2\";\n Model[Model[\"ecmwf_ifs04\"] = 24] = \"ecmwf_ifs04\";\n Model[Model[\"metno_nordic\"] = 25] = \"metno_nordic\";\n Model[Model[\"era5_seamless\"] = 26] = \"era5_seamless\";\n Model[Model[\"era5\"] = 27] = \"era5\";\n Model[Model[\"cerra\"] = 28] = \"cerra\";\n Model[Model[\"era5_land\"] = 29] = \"era5_land\";\n Model[Model[\"ecmwf_ifs\"] = 30] = \"ecmwf_ifs\";\n Model[Model[\"gwam\"] = 31] = \"gwam\";\n Model[Model[\"ewam\"] = 32] = \"ewam\";\n Model[Model[\"glofas_seamless_v3\"] = 33] = \"glofas_seamless_v3\";\n Model[Model[\"glofas_forecast_v3\"] = 34] = \"glofas_forecast_v3\";\n Model[Model[\"glofas_consolidated_v3\"] = 35] = \"glofas_consolidated_v3\";\n Model[Model[\"glofas_seamless_v4\"] = 36] = \"glofas_seamless_v4\";\n Model[Model[\"glofas_forecast_v4\"] = 37] = \"glofas_forecast_v4\";\n Model[Model[\"glofas_consolidated_v4\"] = 38] = \"glofas_consolidated_v4\";\n Model[Model[\"gfs025\"] = 39] = \"gfs025\";\n Model[Model[\"gfs05\"] = 40] = \"gfs05\";\n Model[Model[\"CMCC_CM2_VHR4\"] = 41] = \"CMCC_CM2_VHR4\";\n Model[Model[\"FGOALS_f3_H_highresSST\"] = 42] = \"FGOALS_f3_H_highresSST\";\n Model[Model[\"FGOALS_f3_H\"] = 43] = \"FGOALS_f3_H\";\n Model[Model[\"HiRAM_SIT_HR\"] = 44] = \"HiRAM_SIT_HR\";\n Model[Model[\"MRI_AGCM3_2_S\"] = 45] = \"MRI_AGCM3_2_S\";\n Model[Model[\"EC_Earth3P_HR\"] = 46] = \"EC_Earth3P_HR\";\n Model[Model[\"MPI_ESM1_2_XR\"] = 47] = \"MPI_ESM1_2_XR\";\n Model[Model[\"NICAM16_8S\"] = 48] = \"NICAM16_8S\";\n Model[Model[\"cams_europe\"] = 49] = \"cams_europe\";\n Model[Model[\"cams_global\"] = 50] = \"cams_global\";\n Model[Model[\"cfsv2\"] = 51] = \"cfsv2\";\n Model[Model[\"era5_ocean\"] = 52] = \"era5_ocean\";\n Model[Model[\"cma_grapes_global\"] = 53] = \"cma_grapes_global\";\n Model[Model[\"bom_access_global\"] = 54] = \"bom_access_global\";\n Model[Model[\"bom_access_global_ensemble\"] = 55] = \"bom_access_global_ensemble\";\n Model[Model[\"arpae_cosmo_seamless\"] = 56] = \"arpae_cosmo_seamless\";\n Model[Model[\"arpae_cosmo_2i\"] = 57] = \"arpae_cosmo_2i\";\n Model[Model[\"arpae_cosmo_2i_ruc\"] = 58] = \"arpae_cosmo_2i_ruc\";\n Model[Model[\"arpae_cosmo_5m\"] = 59] = \"arpae_cosmo_5m\";\n Model[Model[\"ecmwf_ifs025\"] = 60] = \"ecmwf_ifs025\";\n Model[Model[\"ecmwf_aifs025\"] = 61] = \"ecmwf_aifs025\";\n Model[Model[\"gfs013\"] = 62] = \"gfs013\";\n Model[Model[\"gfs_graphcast025\"] = 63] = \"gfs_graphcast025\";\n Model[Model[\"ecmwf_wam025\"] = 64] = \"ecmwf_wam025\";\n Model[Model[\"meteofrance_wave\"] = 65] = \"meteofrance_wave\";\n Model[Model[\"meteofrance_currents\"] = 66] = \"meteofrance_currents\";\n Model[Model[\"ecmwf_wam025_ensemble\"] = 67] = \"ecmwf_wam025_ensemble\";\n Model[Model[\"ncep_gfswave025\"] = 68] = \"ncep_gfswave025\";\n Model[Model[\"ncep_gefswave025\"] = 69] = \"ncep_gefswave025\";\n Model[Model[\"knmi_seamless\"] = 70] = \"knmi_seamless\";\n Model[Model[\"knmi_harmonie_arome_europe\"] = 71] = \"knmi_harmonie_arome_europe\";\n Model[Model[\"knmi_harmonie_arome_netherlands\"] = 72] = \"knmi_harmonie_arome_netherlands\";\n Model[Model[\"dmi_seamless\"] = 73] = \"dmi_seamless\";\n Model[Model[\"dmi_harmonie_arome_europe\"] = 74] = \"dmi_harmonie_arome_europe\";\n Model[Model[\"metno_seamless\"] = 75] = \"metno_seamless\";\n Model[Model[\"era5_ensemble\"] = 76] = \"era5_ensemble\";\n Model[Model[\"ecmwf_ifs_analysis\"] = 77] = \"ecmwf_ifs_analysis\";\n Model[Model[\"ecmwf_ifs_long_window\"] = 78] = \"ecmwf_ifs_long_window\";\n Model[Model[\"ecmwf_ifs_analysis_long_window\"] = 79] = \"ecmwf_ifs_analysis_long_window\";\n Model[Model[\"ukmo_global_deterministic_10km\"] = 80] = \"ukmo_global_deterministic_10km\";\n Model[Model[\"ukmo_uk_deterministic_2km\"] = 81] = \"ukmo_uk_deterministic_2km\";\n Model[Model[\"ukmo_seamless\"] = 82] = \"ukmo_seamless\";\n Model[Model[\"ncep_gfswave016\"] = 83] = \"ncep_gfswave016\";\n Model[Model[\"ncep_nbm_conus\"] = 84] = \"ncep_nbm_conus\";\n Model[Model[\"ukmo_global_ensemble_20km\"] = 85] = \"ukmo_global_ensemble_20km\";\n Model[Model[\"ecmwf_aifs025_single\"] = 86] = \"ecmwf_aifs025_single\";\n Model[Model[\"jma_jaxa_himawari\"] = 87] = \"jma_jaxa_himawari\";\n Model[Model[\"eumetsat_sarah3\"] = 88] = \"eumetsat_sarah3\";\n Model[Model[\"eumetsat_lsa_saf_msg\"] = 89] = \"eumetsat_lsa_saf_msg\";\n Model[Model[\"eumetsat_lsa_saf_iodc\"] = 90] = \"eumetsat_lsa_saf_iodc\";\n Model[Model[\"satellite_radiation_seamless\"] = 91] = \"satellite_radiation_seamless\";\n Model[Model[\"kma_gdps\"] = 92] = \"kma_gdps\";\n Model[Model[\"kma_ldps\"] = 93] = \"kma_ldps\";\n Model[Model[\"kma_seamless\"] = 94] = \"kma_seamless\";\n Model[Model[\"italia_meteo_arpae_icon_2i\"] = 95] = \"italia_meteo_arpae_icon_2i\";\n})(Model || (exports.Model = Model = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Unit = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Unit;\n(function (Unit) {\n Unit[Unit[\"undefined\"] = 0] = \"undefined\";\n Unit[Unit[\"celsius\"] = 1] = \"celsius\";\n Unit[Unit[\"centimetre\"] = 2] = \"centimetre\";\n Unit[Unit[\"cubic_metre_per_cubic_metre\"] = 3] = \"cubic_metre_per_cubic_metre\";\n Unit[Unit[\"cubic_metre_per_second\"] = 4] = \"cubic_metre_per_second\";\n Unit[Unit[\"degree_direction\"] = 5] = \"degree_direction\";\n Unit[Unit[\"dimensionless_integer\"] = 6] = \"dimensionless_integer\";\n Unit[Unit[\"dimensionless\"] = 7] = \"dimensionless\";\n Unit[Unit[\"european_air_quality_index\"] = 8] = \"european_air_quality_index\";\n Unit[Unit[\"fahrenheit\"] = 9] = \"fahrenheit\";\n Unit[Unit[\"feet\"] = 10] = \"feet\";\n Unit[Unit[\"fraction\"] = 11] = \"fraction\";\n Unit[Unit[\"gdd_celsius\"] = 12] = \"gdd_celsius\";\n Unit[Unit[\"geopotential_metre\"] = 13] = \"geopotential_metre\";\n Unit[Unit[\"grains_per_cubic_metre\"] = 14] = \"grains_per_cubic_metre\";\n Unit[Unit[\"gram_per_kilogram\"] = 15] = \"gram_per_kilogram\";\n Unit[Unit[\"hectopascal\"] = 16] = \"hectopascal\";\n Unit[Unit[\"hours\"] = 17] = \"hours\";\n Unit[Unit[\"inch\"] = 18] = \"inch\";\n Unit[Unit[\"iso8601\"] = 19] = \"iso8601\";\n Unit[Unit[\"joule_per_kilogram\"] = 20] = \"joule_per_kilogram\";\n Unit[Unit[\"kelvin\"] = 21] = \"kelvin\";\n Unit[Unit[\"kilopascal\"] = 22] = \"kilopascal\";\n Unit[Unit[\"kilogram_per_square_metre\"] = 23] = \"kilogram_per_square_metre\";\n Unit[Unit[\"kilometres_per_hour\"] = 24] = \"kilometres_per_hour\";\n Unit[Unit[\"knots\"] = 25] = \"knots\";\n Unit[Unit[\"megajoule_per_square_metre\"] = 26] = \"megajoule_per_square_metre\";\n Unit[Unit[\"metre_per_second_not_unit_converted\"] = 27] = \"metre_per_second_not_unit_converted\";\n Unit[Unit[\"metre_per_second\"] = 28] = \"metre_per_second\";\n Unit[Unit[\"metre\"] = 29] = \"metre\";\n Unit[Unit[\"micrograms_per_cubic_metre\"] = 30] = \"micrograms_per_cubic_metre\";\n Unit[Unit[\"miles_per_hour\"] = 31] = \"miles_per_hour\";\n Unit[Unit[\"millimetre\"] = 32] = \"millimetre\";\n Unit[Unit[\"pascal\"] = 33] = \"pascal\";\n Unit[Unit[\"per_second\"] = 34] = \"per_second\";\n Unit[Unit[\"percentage\"] = 35] = \"percentage\";\n Unit[Unit[\"seconds\"] = 36] = \"seconds\";\n Unit[Unit[\"unix_time\"] = 37] = \"unix_time\";\n Unit[Unit[\"us_air_quality_index\"] = 38] = \"us_air_quality_index\";\n Unit[Unit[\"watt_per_square_metre\"] = 39] = \"watt_per_square_metre\";\n Unit[Unit[\"wmo_code\"] = 40] = \"wmo_code\";\n Unit[Unit[\"parts_per_million\"] = 41] = \"parts_per_million\";\n})(Unit || (exports.Unit = Unit = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VariableWithValues = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst aggregation_js_1 = require(\"./aggregation.js\");\nconst unit_js_1 = require(\"./unit.js\");\nconst variable_js_1 = require(\"./variable.js\");\nclass VariableWithValues {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsVariableWithValues(bb, obj) {\n return (obj || new VariableWithValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsVariableWithValues(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new VariableWithValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n variable() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : variable_js_1.Variable.undefined;\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : unit_js_1.Unit.undefined;\n }\n value() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n values(index) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readFloat32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;\n }\n valuesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n valuesArray() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? new Float32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;\n }\n valuesInt64(index) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);\n }\n valuesInt64Length() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n altitude() {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n aggregation() {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : aggregation_js_1.Aggregation.none;\n }\n pressureLevel() {\n const offset = this.bb.__offset(this.bb_pos, 18);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n depth() {\n const offset = this.bb.__offset(this.bb_pos, 20);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n depthTo() {\n const offset = this.bb.__offset(this.bb_pos, 22);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n ensembleMember() {\n const offset = this.bb.__offset(this.bb_pos, 24);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n previousDay() {\n const offset = this.bb.__offset(this.bb_pos, 26);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n}\nexports.VariableWithValues = VariableWithValues;\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Variable = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Variable;\n(function (Variable) {\n Variable[Variable[\"undefined\"] = 0] = \"undefined\";\n Variable[Variable[\"apparent_temperature\"] = 1] = \"apparent_temperature\";\n Variable[Variable[\"cape\"] = 2] = \"cape\";\n Variable[Variable[\"cloud_cover\"] = 3] = \"cloud_cover\";\n Variable[Variable[\"cloud_cover_high\"] = 4] = \"cloud_cover_high\";\n Variable[Variable[\"cloud_cover_low\"] = 5] = \"cloud_cover_low\";\n Variable[Variable[\"cloud_cover_mid\"] = 6] = \"cloud_cover_mid\";\n Variable[Variable[\"daylight_duration\"] = 7] = \"daylight_duration\";\n Variable[Variable[\"dew_point\"] = 8] = \"dew_point\";\n Variable[Variable[\"diffuse_radiation\"] = 9] = \"diffuse_radiation\";\n Variable[Variable[\"diffuse_radiation_instant\"] = 10] = \"diffuse_radiation_instant\";\n Variable[Variable[\"direct_normal_irradiance\"] = 11] = \"direct_normal_irradiance\";\n Variable[Variable[\"direct_normal_irradiance_instant\"] = 12] = \"direct_normal_irradiance_instant\";\n Variable[Variable[\"direct_radiation\"] = 13] = \"direct_radiation\";\n Variable[Variable[\"direct_radiation_instant\"] = 14] = \"direct_radiation_instant\";\n Variable[Variable[\"et0_fao_evapotranspiration\"] = 15] = \"et0_fao_evapotranspiration\";\n Variable[Variable[\"evapotranspiration\"] = 16] = \"evapotranspiration\";\n Variable[Variable[\"freezing_level_height\"] = 17] = \"freezing_level_height\";\n Variable[Variable[\"growing_degree_days\"] = 18] = \"growing_degree_days\";\n Variable[Variable[\"is_day\"] = 19] = \"is_day\";\n Variable[Variable[\"latent_heat_flux\"] = 20] = \"latent_heat_flux\";\n Variable[Variable[\"leaf_wetness_probability\"] = 21] = \"leaf_wetness_probability\";\n Variable[Variable[\"lifted_index\"] = 22] = \"lifted_index\";\n Variable[Variable[\"lightning_potential\"] = 23] = \"lightning_potential\";\n Variable[Variable[\"precipitation\"] = 24] = \"precipitation\";\n Variable[Variable[\"precipitation_hours\"] = 25] = \"precipitation_hours\";\n Variable[Variable[\"precipitation_probability\"] = 26] = \"precipitation_probability\";\n Variable[Variable[\"pressure_msl\"] = 27] = \"pressure_msl\";\n Variable[Variable[\"rain\"] = 28] = \"rain\";\n Variable[Variable[\"relative_humidity\"] = 29] = \"relative_humidity\";\n Variable[Variable[\"runoff\"] = 30] = \"runoff\";\n Variable[Variable[\"sensible_heat_flux\"] = 31] = \"sensible_heat_flux\";\n Variable[Variable[\"shortwave_radiation\"] = 32] = \"shortwave_radiation\";\n Variable[Variable[\"shortwave_radiation_instant\"] = 33] = \"shortwave_radiation_instant\";\n Variable[Variable[\"showers\"] = 34] = \"showers\";\n Variable[Variable[\"snow_depth\"] = 35] = \"snow_depth\";\n Variable[Variable[\"snow_height\"] = 36] = \"snow_height\";\n Variable[Variable[\"snowfall\"] = 37] = \"snowfall\";\n Variable[Variable[\"snowfall_height\"] = 38] = \"snowfall_height\";\n Variable[Variable[\"snowfall_water_equivalent\"] = 39] = \"snowfall_water_equivalent\";\n Variable[Variable[\"sunrise\"] = 40] = \"sunrise\";\n Variable[Variable[\"sunset\"] = 41] = \"sunset\";\n Variable[Variable[\"soil_moisture\"] = 42] = \"soil_moisture\";\n Variable[Variable[\"soil_moisture_index\"] = 43] = \"soil_moisture_index\";\n Variable[Variable[\"soil_temperature\"] = 44] = \"soil_temperature\";\n Variable[Variable[\"surface_pressure\"] = 45] = \"surface_pressure\";\n Variable[Variable[\"surface_temperature\"] = 46] = \"surface_temperature\";\n Variable[Variable[\"temperature\"] = 47] = \"temperature\";\n Variable[Variable[\"terrestrial_radiation\"] = 48] = \"terrestrial_radiation\";\n Variable[Variable[\"terrestrial_radiation_instant\"] = 49] = \"terrestrial_radiation_instant\";\n Variable[Variable[\"total_column_integrated_water_vapour\"] = 50] = \"total_column_integrated_water_vapour\";\n Variable[Variable[\"updraft\"] = 51] = \"updraft\";\n Variable[Variable[\"uv_index\"] = 52] = \"uv_index\";\n Variable[Variable[\"uv_index_clear_sky\"] = 53] = \"uv_index_clear_sky\";\n Variable[Variable[\"vapour_pressure_deficit\"] = 54] = \"vapour_pressure_deficit\";\n Variable[Variable[\"visibility\"] = 55] = \"visibility\";\n Variable[Variable[\"weather_code\"] = 56] = \"weather_code\";\n Variable[Variable[\"wind_direction\"] = 57] = \"wind_direction\";\n Variable[Variable[\"wind_gusts\"] = 58] = \"wind_gusts\";\n Variable[Variable[\"wind_speed\"] = 59] = \"wind_speed\";\n Variable[Variable[\"vertical_velocity\"] = 60] = \"vertical_velocity\";\n Variable[Variable[\"geopotential_height\"] = 61] = \"geopotential_height\";\n Variable[Variable[\"wet_bulb_temperature\"] = 62] = \"wet_bulb_temperature\";\n Variable[Variable[\"river_discharge\"] = 63] = \"river_discharge\";\n Variable[Variable[\"wave_height\"] = 64] = \"wave_height\";\n Variable[Variable[\"wave_period\"] = 65] = \"wave_period\";\n Variable[Variable[\"wave_direction\"] = 66] = \"wave_direction\";\n Variable[Variable[\"wind_wave_height\"] = 67] = \"wind_wave_height\";\n Variable[Variable[\"wind_wave_period\"] = 68] = \"wind_wave_period\";\n Variable[Variable[\"wind_wave_peak_period\"] = 69] = \"wind_wave_peak_period\";\n Variable[Variable[\"wind_wave_direction\"] = 70] = \"wind_wave_direction\";\n Variable[Variable[\"swell_wave_height\"] = 71] = \"swell_wave_height\";\n Variable[Variable[\"swell_wave_period\"] = 72] = \"swell_wave_period\";\n Variable[Variable[\"swell_wave_peak_period\"] = 73] = \"swell_wave_peak_period\";\n Variable[Variable[\"swell_wave_direction\"] = 74] = \"swell_wave_direction\";\n Variable[Variable[\"pm10\"] = 75] = \"pm10\";\n Variable[Variable[\"pm2p5\"] = 76] = \"pm2p5\";\n Variable[Variable[\"dust\"] = 77] = \"dust\";\n Variable[Variable[\"aerosol_optical_depth\"] = 78] = \"aerosol_optical_depth\";\n Variable[Variable[\"carbon_monoxide\"] = 79] = \"carbon_monoxide\";\n Variable[Variable[\"nitrogen_dioxide\"] = 80] = \"nitrogen_dioxide\";\n Variable[Variable[\"ammonia\"] = 81] = \"ammonia\";\n Variable[Variable[\"ozone\"] = 82] = \"ozone\";\n Variable[Variable[\"sulphur_dioxide\"] = 83] = \"sulphur_dioxide\";\n Variable[Variable[\"alder_pollen\"] = 84] = \"alder_pollen\";\n Variable[Variable[\"birch_pollen\"] = 85] = \"birch_pollen\";\n Variable[Variable[\"grass_pollen\"] = 86] = \"grass_pollen\";\n Variable[Variable[\"mugwort_pollen\"] = 87] = \"mugwort_pollen\";\n Variable[Variable[\"olive_pollen\"] = 88] = \"olive_pollen\";\n Variable[Variable[\"ragweed_pollen\"] = 89] = \"ragweed_pollen\";\n Variable[Variable[\"european_aqi\"] = 90] = \"european_aqi\";\n Variable[Variable[\"european_aqi_pm2p5\"] = 91] = \"european_aqi_pm2p5\";\n Variable[Variable[\"european_aqi_pm10\"] = 92] = \"european_aqi_pm10\";\n Variable[Variable[\"european_aqi_nitrogen_dioxide\"] = 93] = \"european_aqi_nitrogen_dioxide\";\n Variable[Variable[\"european_aqi_ozone\"] = 94] = \"european_aqi_ozone\";\n Variable[Variable[\"european_aqi_sulphur_dioxide\"] = 95] = \"european_aqi_sulphur_dioxide\";\n Variable[Variable[\"us_aqi\"] = 96] = \"us_aqi\";\n Variable[Variable[\"us_aqi_pm2p5\"] = 97] = \"us_aqi_pm2p5\";\n Variable[Variable[\"us_aqi_pm10\"] = 98] = \"us_aqi_pm10\";\n Variable[Variable[\"us_aqi_nitrogen_dioxide\"] = 99] = \"us_aqi_nitrogen_dioxide\";\n Variable[Variable[\"us_aqi_ozone\"] = 100] = \"us_aqi_ozone\";\n Variable[Variable[\"us_aqi_sulphur_dioxide\"] = 101] = \"us_aqi_sulphur_dioxide\";\n Variable[Variable[\"us_aqi_carbon_monoxide\"] = 102] = \"us_aqi_carbon_monoxide\";\n Variable[Variable[\"sunshine_duration\"] = 103] = \"sunshine_duration\";\n Variable[Variable[\"convective_inhibition\"] = 104] = \"convective_inhibition\";\n Variable[Variable[\"shortwave_radiation_clear_sky\"] = 105] = \"shortwave_radiation_clear_sky\";\n Variable[Variable[\"global_tilted_irradiance\"] = 106] = \"global_tilted_irradiance\";\n Variable[Variable[\"global_tilted_irradiance_instant\"] = 107] = \"global_tilted_irradiance_instant\";\n Variable[Variable[\"ocean_current_velocity\"] = 108] = \"ocean_current_velocity\";\n Variable[Variable[\"ocean_current_direction\"] = 109] = \"ocean_current_direction\";\n Variable[Variable[\"cloud_base\"] = 110] = \"cloud_base\";\n Variable[Variable[\"cloud_top\"] = 111] = \"cloud_top\";\n Variable[Variable[\"mass_density\"] = 112] = \"mass_density\";\n Variable[Variable[\"boundary_layer_height\"] = 113] = \"boundary_layer_height\";\n Variable[Variable[\"formaldehyde\"] = 114] = \"formaldehyde\";\n Variable[Variable[\"glyoxal\"] = 115] = \"glyoxal\";\n Variable[Variable[\"non_methane_volatile_organic_compounds\"] = 116] = \"non_methane_volatile_organic_compounds\";\n Variable[Variable[\"pm10_wildfires\"] = 117] = \"pm10_wildfires\";\n Variable[Variable[\"peroxyacyl_nitrates\"] = 118] = \"peroxyacyl_nitrates\";\n Variable[Variable[\"secondary_inorganic_aerosol\"] = 119] = \"secondary_inorganic_aerosol\";\n Variable[Variable[\"residential_elementary_carbon\"] = 120] = \"residential_elementary_carbon\";\n Variable[Variable[\"total_elementary_carbon\"] = 121] = \"total_elementary_carbon\";\n Variable[Variable[\"pm2_5_total_organic_matter\"] = 122] = \"pm2_5_total_organic_matter\";\n Variable[Variable[\"sea_salt_aerosol\"] = 123] = \"sea_salt_aerosol\";\n Variable[Variable[\"nitrogen_monoxide\"] = 124] = \"nitrogen_monoxide\";\n Variable[Variable[\"thunderstorm_probability\"] = 125] = \"thunderstorm_probability\";\n Variable[Variable[\"rain_probability\"] = 126] = \"rain_probability\";\n Variable[Variable[\"freezing_rain_probability\"] = 127] = \"freezing_rain_probability\";\n Variable[Variable[\"ice_pellets_probability\"] = 128] = \"ice_pellets_probability\";\n Variable[Variable[\"snowfall_probability\"] = 129] = \"snowfall_probability\";\n Variable[Variable[\"carbon_dioxide\"] = 130] = \"carbon_dioxide\";\n Variable[Variable[\"methane\"] = 131] = \"methane\";\n Variable[Variable[\"sea_level_height_msl\"] = 132] = \"sea_level_height_msl\";\n Variable[Variable[\"sea_surface_temperature\"] = 133] = \"sea_surface_temperature\";\n Variable[Variable[\"invert_barometer_height\"] = 134] = \"invert_barometer_height\";\n Variable[Variable[\"hail\"] = 135] = \"hail\";\n Variable[Variable[\"albedo\"] = 136] = \"albedo\";\n Variable[Variable[\"precipitation_type\"] = 137] = \"precipitation_type\";\n Variable[Variable[\"convective_cloud_base\"] = 138] = \"convective_cloud_base\";\n Variable[Variable[\"convective_cloud_top\"] = 139] = \"convective_cloud_top\";\n Variable[Variable[\"snow_depth_water_equivalent\"] = 140] = \"snow_depth_water_equivalent\";\n Variable[Variable[\"secondary_swell_wave_height\"] = 141] = \"secondary_swell_wave_height\";\n Variable[Variable[\"secondary_swell_wave_period\"] = 142] = \"secondary_swell_wave_period\";\n Variable[Variable[\"secondary_swell_wave_peak_period\"] = 143] = \"secondary_swell_wave_peak_period\";\n Variable[Variable[\"secondary_swell_wave_direction\"] = 144] = \"secondary_swell_wave_direction\";\n Variable[Variable[\"tertiary_swell_wave_height\"] = 145] = \"tertiary_swell_wave_height\";\n Variable[Variable[\"tertiary_swell_wave_period\"] = 146] = \"tertiary_swell_wave_period\";\n Variable[Variable[\"tertiary_swell_wave_peak_period\"] = 147] = \"tertiary_swell_wave_peak_period\";\n Variable[Variable[\"tertiary_swell_wave_direction\"] = 148] = \"tertiary_swell_wave_direction\";\n})(Variable || (exports.Variable = Variable = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VariablesWithTime = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst variable_with_values_js_1 = require(\"./variable-with-values.js\");\nclass VariablesWithTime {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsVariablesWithTime(bb, obj) {\n return (obj || new VariablesWithTime()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsVariablesWithTime(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new VariablesWithTime()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n time() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n timeEnd() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n interval() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n variables(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new variable_with_values_js_1.VariableWithValues()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n variablesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n}\nexports.VariablesWithTime = VariablesWithTime;\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WeatherApiResponse = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst model_js_1 = require(\"./model.js\");\nconst variables_with_time_js_1 = require(\"./variables-with-time.js\");\nclass WeatherApiResponse {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsWeatherApiResponse(bb, obj) {\n return (obj || new WeatherApiResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsWeatherApiResponse(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new WeatherApiResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n latitude() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n longitude() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n elevation() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n generationTimeMilliseconds() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n locationId() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n model() {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : model_js_1.Model.undefined;\n }\n utcOffsetSeconds() {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n timezone(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 18);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n timezoneAbbreviation(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 20);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n current(obj) {\n const offset = this.bb.__offset(this.bb_pos, 22);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n daily(obj) {\n const offset = this.bb.__offset(this.bb_pos, 24);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n hourly(obj) {\n const offset = this.bb.__offset(this.bb_pos, 26);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n minutely15(obj) {\n const offset = this.bb.__offset(this.bb_pos, 28);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n sixHourly(obj) {\n const offset = this.bb.__offset(this.bb_pos, 30);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n}\nexports.WeatherApiResponse = WeatherApiResponse;\n","import { ByteBuffer } from \"./byte-buffer.js\";\nimport { SIZEOF_SHORT, SIZE_PREFIX_LENGTH, SIZEOF_INT, FILE_IDENTIFIER_LENGTH } from \"./constants.js\";\nexport class Builder {\n /**\n * Create a FlatBufferBuilder.\n */\n constructor(opt_initial_size) {\n /** Minimum alignment encountered so far. */\n this.minalign = 1;\n /** The vtable for the current table. */\n this.vtable = null;\n /** The amount of fields we're actually using. */\n this.vtable_in_use = 0;\n /** Whether we are currently serializing a table. */\n this.isNested = false;\n /** Starting offset of the current struct/table. */\n this.object_start = 0;\n /** List of offsets of all vtables. */\n this.vtables = [];\n /** For the current vector being built. */\n this.vector_num_elems = 0;\n /** False omits default values from the serialized data */\n this.force_defaults = false;\n this.string_maps = null;\n this.text_encoder = new TextEncoder();\n let initial_size;\n if (!opt_initial_size) {\n initial_size = 1024;\n }\n else {\n initial_size = opt_initial_size;\n }\n /**\n * @type {ByteBuffer}\n * @private\n */\n this.bb = ByteBuffer.allocate(initial_size);\n this.space = initial_size;\n }\n clear() {\n this.bb.clear();\n this.space = this.bb.capacity();\n this.minalign = 1;\n this.vtable = null;\n this.vtable_in_use = 0;\n this.isNested = false;\n this.object_start = 0;\n this.vtables = [];\n this.vector_num_elems = 0;\n this.force_defaults = false;\n this.string_maps = null;\n }\n /**\n * In order to save space, fields that are set to their default value\n * don't get serialized into the buffer. Forcing defaults provides a\n * way to manually disable this optimization.\n *\n * @param forceDefaults true always serializes default values\n */\n forceDefaults(forceDefaults) {\n this.force_defaults = forceDefaults;\n }\n /**\n * Get the ByteBuffer representing the FlatBuffer. Only call this after you've\n * called finish(). The actual data starts at the ByteBuffer's current position,\n * not necessarily at 0.\n */\n dataBuffer() {\n return this.bb;\n }\n /**\n * Get the bytes representing the FlatBuffer. Only call this after you've\n * called finish().\n */\n asUint8Array() {\n return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());\n }\n /**\n * Prepare to write an element of `size` after `additional_bytes` have been\n * written, e.g. if you write a string, you need to align such the int length\n * field is aligned to 4 bytes, and the string data follows it directly. If all\n * you need to do is alignment, `additional_bytes` will be 0.\n *\n * @param size This is the of the new element to write\n * @param additional_bytes The padding size\n */\n prep(size, additional_bytes) {\n // Track the biggest thing we've ever aligned to.\n if (size > this.minalign) {\n this.minalign = size;\n }\n // Find the amount of alignment needed such that `size` is properly\n // aligned after `additional_bytes`\n const align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);\n // Reallocate the buffer if needed.\n while (this.space < align_size + size + additional_bytes) {\n const old_buf_size = this.bb.capacity();\n this.bb = Builder.growByteBuffer(this.bb);\n this.space += this.bb.capacity() - old_buf_size;\n }\n this.pad(align_size);\n }\n pad(byte_size) {\n for (let i = 0; i < byte_size; i++) {\n this.bb.writeInt8(--this.space, 0);\n }\n }\n writeInt8(value) {\n this.bb.writeInt8(this.space -= 1, value);\n }\n writeInt16(value) {\n this.bb.writeInt16(this.space -= 2, value);\n }\n writeInt32(value) {\n this.bb.writeInt32(this.space -= 4, value);\n }\n writeInt64(value) {\n this.bb.writeInt64(this.space -= 8, value);\n }\n writeFloat32(value) {\n this.bb.writeFloat32(this.space -= 4, value);\n }\n writeFloat64(value) {\n this.bb.writeFloat64(this.space -= 8, value);\n }\n /**\n * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int8` to add the buffer.\n */\n addInt8(value) {\n this.prep(1, 0);\n this.writeInt8(value);\n }\n /**\n * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int16` to add the buffer.\n */\n addInt16(value) {\n this.prep(2, 0);\n this.writeInt16(value);\n }\n /**\n * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int32` to add the buffer.\n */\n addInt32(value) {\n this.prep(4, 0);\n this.writeInt32(value);\n }\n /**\n * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int64` to add the buffer.\n */\n addInt64(value) {\n this.prep(8, 0);\n this.writeInt64(value);\n }\n /**\n * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `float32` to add the buffer.\n */\n addFloat32(value) {\n this.prep(4, 0);\n this.writeFloat32(value);\n }\n /**\n * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `float64` to add the buffer.\n */\n addFloat64(value) {\n this.prep(8, 0);\n this.writeFloat64(value);\n }\n addFieldInt8(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt8(value);\n this.slot(voffset);\n }\n }\n addFieldInt16(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt16(value);\n this.slot(voffset);\n }\n }\n addFieldInt32(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt32(value);\n this.slot(voffset);\n }\n }\n addFieldInt64(voffset, value, defaultValue) {\n if (this.force_defaults || value !== defaultValue) {\n this.addInt64(value);\n this.slot(voffset);\n }\n }\n addFieldFloat32(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat32(value);\n this.slot(voffset);\n }\n }\n addFieldFloat64(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat64(value);\n this.slot(voffset);\n }\n }\n addFieldOffset(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addOffset(value);\n this.slot(voffset);\n }\n }\n /**\n * Structs are stored inline, so nothing additional is being added. `d` is always 0.\n */\n addFieldStruct(voffset, value, defaultValue) {\n if (value != defaultValue) {\n this.nested(value);\n this.slot(voffset);\n }\n }\n /**\n * Structures are always stored inline, they need to be created right\n * where they're used. You'll get this assertion failure if you\n * created it elsewhere.\n */\n nested(obj) {\n if (obj != this.offset()) {\n throw new TypeError('FlatBuffers: struct must be serialized inline.');\n }\n }\n /**\n * Should not be creating any other object, string or vector\n * while an object is being constructed\n */\n notNested() {\n if (this.isNested) {\n throw new TypeError('FlatBuffers: object serialization must not be nested.');\n }\n }\n /**\n * Set the current vtable at `voffset` to the current location in the buffer.\n */\n slot(voffset) {\n if (this.vtable !== null)\n this.vtable[voffset] = this.offset();\n }\n /**\n * @returns Offset relative to the end of the buffer.\n */\n offset() {\n return this.bb.capacity() - this.space;\n }\n /**\n * Doubles the size of the backing ByteBuffer and copies the old data towards\n * the end of the new buffer (since we build the buffer backwards).\n *\n * @param bb The current buffer with the existing data\n * @returns A new byte buffer with the old data copied\n * to it. The data is located at the end of the buffer.\n *\n * uint8Array.set() formally takes {Array|ArrayBufferView}, so to pass\n * it a uint8Array we need to suppress the type check:\n * @suppress {checkTypes}\n */\n static growByteBuffer(bb) {\n const old_buf_size = bb.capacity();\n // Ensure we don't grow beyond what fits in an int.\n if (old_buf_size & 0xC0000000) {\n throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');\n }\n const new_buf_size = old_buf_size << 1;\n const nbb = ByteBuffer.allocate(new_buf_size);\n nbb.setPosition(new_buf_size - old_buf_size);\n nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);\n return nbb;\n }\n /**\n * Adds on offset, relative to where it will be written.\n *\n * @param offset The offset to add.\n */\n addOffset(offset) {\n this.prep(SIZEOF_INT, 0); // Ensure alignment is already done.\n this.writeInt32(this.offset() - offset + SIZEOF_INT);\n }\n /**\n * Start encoding a new object in the buffer. Users will not usually need to\n * call this directly. The FlatBuffers compiler will generate helper methods\n * that call this method internally.\n */\n startObject(numfields) {\n this.notNested();\n if (this.vtable == null) {\n this.vtable = [];\n }\n this.vtable_in_use = numfields;\n for (let i = 0; i < numfields; i++) {\n this.vtable[i] = 0; // This will push additional elements as needed\n }\n this.isNested = true;\n this.object_start = this.offset();\n }\n /**\n * Finish off writing the object that is under construction.\n *\n * @returns The offset to the object inside `dataBuffer`\n */\n endObject() {\n if (this.vtable == null || !this.isNested) {\n throw new Error('FlatBuffers: endObject called without startObject');\n }\n this.addInt32(0);\n const vtableloc = this.offset();\n // Trim trailing zeroes.\n let i = this.vtable_in_use - 1;\n // eslint-disable-next-line no-empty\n for (; i >= 0 && this.vtable[i] == 0; i--) { }\n const trimmed_size = i + 1;\n // Write out the current vtable.\n for (; i >= 0; i--) {\n // Offset relative to the start of the table.\n this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);\n }\n const standard_fields = 2; // The fields below:\n this.addInt16(vtableloc - this.object_start);\n const len = (trimmed_size + standard_fields) * SIZEOF_SHORT;\n this.addInt16(len);\n // Search for an existing vtable that matches the current one.\n let existing_vtable = 0;\n const vt1 = this.space;\n outer_loop: for (i = 0; i < this.vtables.length; i++) {\n const vt2 = this.bb.capacity() - this.vtables[i];\n if (len == this.bb.readInt16(vt2)) {\n for (let j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {\n if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {\n continue outer_loop;\n }\n }\n existing_vtable = this.vtables[i];\n break;\n }\n }\n if (existing_vtable) {\n // Found a match:\n // Remove the current vtable.\n this.space = this.bb.capacity() - vtableloc;\n // Point table to existing vtable.\n this.bb.writeInt32(this.space, existing_vtable - vtableloc);\n }\n else {\n // No match:\n // Add the location of the current vtable to the list of vtables.\n this.vtables.push(this.offset());\n // Point table to current vtable.\n this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);\n }\n this.isNested = false;\n return vtableloc;\n }\n /**\n * Finalize a buffer, poiting to the given `root_table`.\n */\n finish(root_table, opt_file_identifier, opt_size_prefix) {\n const size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;\n if (opt_file_identifier) {\n const file_identifier = opt_file_identifier;\n this.prep(this.minalign, SIZEOF_INT +\n FILE_IDENTIFIER_LENGTH + size_prefix);\n if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {\n throw new TypeError('FlatBuffers: file identifier must be length ' +\n FILE_IDENTIFIER_LENGTH);\n }\n for (let i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {\n this.writeInt8(file_identifier.charCodeAt(i));\n }\n }\n this.prep(this.minalign, SIZEOF_INT + size_prefix);\n this.addOffset(root_table);\n if (size_prefix) {\n this.addInt32(this.bb.capacity() - this.space);\n }\n this.bb.setPosition(this.space);\n }\n /**\n * Finalize a size prefixed buffer, pointing to the given `root_table`.\n */\n finishSizePrefixed(root_table, opt_file_identifier) {\n this.finish(root_table, opt_file_identifier, true);\n }\n /**\n * This checks a required field has been set in a given table that has\n * just been constructed.\n */\n requiredField(table, field) {\n const table_start = this.bb.capacity() - table;\n const vtable_start = table_start - this.bb.readInt32(table_start);\n const ok = field < this.bb.readInt16(vtable_start) &&\n this.bb.readInt16(vtable_start + field) != 0;\n // If this fails, the caller will show what field needs to be set.\n if (!ok) {\n throw new TypeError('FlatBuffers: field ' + field + ' must be set');\n }\n }\n /**\n * Start a new array/vector of objects. Users usually will not call\n * this directly. The FlatBuffers compiler will create a start/end\n * method for vector types in generated code.\n *\n * @param elem_size The size of each element in the array\n * @param num_elems The number of elements in the array\n * @param alignment The alignment of the array\n */\n startVector(elem_size, num_elems, alignment) {\n this.notNested();\n this.vector_num_elems = num_elems;\n this.prep(SIZEOF_INT, elem_size * num_elems);\n this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.\n }\n /**\n * Finish off the creation of an array and all its elements. The array must be\n * created with `startVector`.\n *\n * @returns The offset at which the newly created array\n * starts.\n */\n endVector() {\n this.writeInt32(this.vector_num_elems);\n return this.offset();\n }\n /**\n * Encode the string `s` in the buffer using UTF-8. If the string passed has\n * already been seen, we return the offset of the already written string\n *\n * @param s The string to encode\n * @return The offset in the buffer where the encoded string starts\n */\n createSharedString(s) {\n if (!s) {\n return 0;\n }\n if (!this.string_maps) {\n this.string_maps = new Map();\n }\n if (this.string_maps.has(s)) {\n return this.string_maps.get(s);\n }\n const offset = this.createString(s);\n this.string_maps.set(s, offset);\n return offset;\n }\n /**\n * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed\n * instead of a string, it is assumed to contain valid UTF-8 encoded data.\n *\n * @param s The string to encode\n * @return The offset in the buffer where the encoded string starts\n */\n createString(s) {\n if (s === null || s === undefined) {\n return 0;\n }\n let utf8;\n if (s instanceof Uint8Array) {\n utf8 = s;\n }\n else {\n utf8 = this.text_encoder.encode(s);\n }\n this.addInt8(0);\n this.startVector(1, utf8.length, 1);\n this.bb.setPosition(this.space -= utf8.length);\n this.bb.bytes().set(utf8, this.space);\n return this.endVector();\n }\n /**\n * Create a byte vector.\n *\n * @param v The bytes to add\n * @returns The offset in the buffer where the byte vector starts\n */\n createByteVector(v) {\n if (v === null || v === undefined) {\n return 0;\n }\n this.startVector(1, v.length, 1);\n this.bb.setPosition(this.space -= v.length);\n this.bb.bytes().set(v, this.space);\n return this.endVector();\n }\n /**\n * A helper function to pack an object\n *\n * @returns offset of obj\n */\n createObjectOffset(obj) {\n if (obj === null) {\n return 0;\n }\n if (typeof obj === 'string') {\n return this.createString(obj);\n }\n else {\n return obj.pack(this);\n }\n }\n /**\n * A helper function to pack a list of object\n *\n * @returns list of offsets of each non null object\n */\n createObjectOffsetList(list) {\n const ret = [];\n for (let i = 0; i < list.length; ++i) {\n const val = list[i];\n if (val !== null) {\n ret.push(this.createObjectOffset(val));\n }\n else {\n throw new TypeError('FlatBuffers: Argument for createObjectOffsetList cannot contain null.');\n }\n }\n return ret;\n }\n createStructOffsetList(list, startFunc) {\n startFunc(this, list.length);\n this.createObjectOffsetList(list.slice().reverse());\n return this.endVector();\n }\n}\n","import { FILE_IDENTIFIER_LENGTH, SIZEOF_INT } from \"./constants.js\";\nimport { int32, isLittleEndian, float32, float64 } from \"./utils.js\";\nimport { Encoding } from \"./encoding.js\";\nexport class ByteBuffer {\n /**\n * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)\n */\n constructor(bytes_) {\n this.bytes_ = bytes_;\n this.position_ = 0;\n this.text_decoder_ = new TextDecoder();\n }\n /**\n * Create and allocate a new ByteBuffer with a given size.\n */\n static allocate(byte_size) {\n return new ByteBuffer(new Uint8Array(byte_size));\n }\n clear() {\n this.position_ = 0;\n }\n /**\n * Get the underlying `Uint8Array`.\n */\n bytes() {\n return this.bytes_;\n }\n /**\n * Get the buffer's position.\n */\n position() {\n return this.position_;\n }\n /**\n * Set the buffer's position.\n */\n setPosition(position) {\n this.position_ = position;\n }\n /**\n * Get the buffer's capacity.\n */\n capacity() {\n return this.bytes_.length;\n }\n readInt8(offset) {\n return this.readUint8(offset) << 24 >> 24;\n }\n readUint8(offset) {\n return this.bytes_[offset];\n }\n readInt16(offset) {\n return this.readUint16(offset) << 16 >> 16;\n }\n readUint16(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8;\n }\n readInt32(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;\n }\n readUint32(offset) {\n return this.readInt32(offset) >>> 0;\n }\n readInt64(offset) {\n return BigInt.asIntN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));\n }\n readUint64(offset) {\n return BigInt.asUintN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));\n }\n readFloat32(offset) {\n int32[0] = this.readInt32(offset);\n return float32[0];\n }\n readFloat64(offset) {\n int32[isLittleEndian ? 0 : 1] = this.readInt32(offset);\n int32[isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);\n return float64[0];\n }\n writeInt8(offset, value) {\n this.bytes_[offset] = value;\n }\n writeUint8(offset, value) {\n this.bytes_[offset] = value;\n }\n writeInt16(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n }\n writeUint16(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n }\n writeInt32(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n }\n writeUint32(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n }\n writeInt64(offset, value) {\n this.writeInt32(offset, Number(BigInt.asIntN(32, value)));\n this.writeInt32(offset + 4, Number(BigInt.asIntN(32, value >> BigInt(32))));\n }\n writeUint64(offset, value) {\n this.writeUint32(offset, Number(BigInt.asUintN(32, value)));\n this.writeUint32(offset + 4, Number(BigInt.asUintN(32, value >> BigInt(32))));\n }\n writeFloat32(offset, value) {\n float32[0] = value;\n this.writeInt32(offset, int32[0]);\n }\n writeFloat64(offset, value) {\n float64[0] = value;\n this.writeInt32(offset, int32[isLittleEndian ? 0 : 1]);\n this.writeInt32(offset + 4, int32[isLittleEndian ? 1 : 0]);\n }\n /**\n * Return the file identifier. Behavior is undefined for FlatBuffers whose\n * schema does not include a file_identifier (likely points at padding or the\n * start of a the root vtable).\n */\n getBufferIdentifier() {\n if (this.bytes_.length < this.position_ + SIZEOF_INT +\n FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: ByteBuffer is too short to contain an identifier.');\n }\n let result = \"\";\n for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {\n result += String.fromCharCode(this.readInt8(this.position_ + SIZEOF_INT + i));\n }\n return result;\n }\n /**\n * Look up a field in the vtable, return an offset into the object, or 0 if the\n * field is not present.\n */\n __offset(bb_pos, vtable_offset) {\n const vtable = bb_pos - this.readInt32(bb_pos);\n return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;\n }\n /**\n * Initialize any Table-derived type to point to the union at the given offset.\n */\n __union(t, offset) {\n t.bb_pos = offset + this.readInt32(offset);\n t.bb = this;\n return t;\n }\n /**\n * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.\n * This allocates a new string and converts to wide chars upon each access.\n *\n * To avoid the conversion to string, pass Encoding.UTF8_BYTES as the\n * \"optionalEncoding\" argument. This is useful for avoiding conversion when\n * the data will just be packaged back up in another FlatBuffer later on.\n *\n * @param offset\n * @param opt_encoding Defaults to UTF16_STRING\n */\n __string(offset, opt_encoding) {\n offset += this.readInt32(offset);\n const length = this.readInt32(offset);\n offset += SIZEOF_INT;\n const utf8bytes = this.bytes_.subarray(offset, offset + length);\n if (opt_encoding === Encoding.UTF8_BYTES)\n return utf8bytes;\n else\n return this.text_decoder_.decode(utf8bytes);\n }\n /**\n * Handle unions that can contain string as its member, if a Table-derived type then initialize it,\n * if a string then return a new one\n *\n * WARNING: strings are immutable in JS so we can't change the string that the user gave us, this\n * makes the behaviour of __union_with_string different compared to __union\n */\n __union_with_string(o, offset) {\n if (typeof o === 'string') {\n return this.__string(offset);\n }\n return this.__union(o, offset);\n }\n /**\n * Retrieve the relative offset stored at \"offset\"\n */\n __indirect(offset) {\n return offset + this.readInt32(offset);\n }\n /**\n * Get the start of data of a vector whose offset is stored at \"offset\" in this object.\n */\n __vector(offset) {\n return offset + this.readInt32(offset) + SIZEOF_INT; // data starts after the length\n }\n /**\n * Get the length of a vector whose offset is stored at \"offset\" in this object.\n */\n __vector_len(offset) {\n return this.readInt32(offset + this.readInt32(offset));\n }\n __has_identifier(ident) {\n if (ident.length != FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: file identifier must be length ' +\n FILE_IDENTIFIER_LENGTH);\n }\n for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {\n if (ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)) {\n return false;\n }\n }\n return true;\n }\n /**\n * A helper function for generating list for obj api\n */\n createScalarList(listAccessor, listLength) {\n const ret = [];\n for (let i = 0; i < listLength; ++i) {\n const val = listAccessor(i);\n if (val !== null) {\n ret.push(val);\n }\n }\n return ret;\n }\n /**\n * A helper function for generating list for obj api\n * @param listAccessor function that accepts an index and return data at that index\n * @param listLength listLength\n * @param res result list\n */\n createObjList(listAccessor, listLength) {\n const ret = [];\n for (let i = 0; i < listLength; ++i) {\n const val = listAccessor(i);\n if (val !== null) {\n ret.push(val.unpack());\n }\n }\n return ret;\n }\n}\n","export const SIZEOF_SHORT = 2;\nexport const SIZEOF_INT = 4;\nexport const FILE_IDENTIFIER_LENGTH = 4;\nexport const SIZE_PREFIX_LENGTH = 4;\n","export var Encoding;\n(function (Encoding) {\n Encoding[Encoding[\"UTF8_BYTES\"] = 1] = \"UTF8_BYTES\";\n Encoding[Encoding[\"UTF16_STRING\"] = 2] = \"UTF16_STRING\";\n})(Encoding || (Encoding = {}));\n","export { SIZEOF_SHORT } from './constants.js';\nexport { SIZEOF_INT } from './constants.js';\nexport { FILE_IDENTIFIER_LENGTH } from './constants.js';\nexport { SIZE_PREFIX_LENGTH } from './constants.js';\nexport { int32, float32, float64, isLittleEndian } from './utils.js';\nexport { Encoding } from './encoding.js';\nexport { Builder } from './builder.js';\nexport { ByteBuffer } from './byte-buffer.js';\n","export const int32 = new Int32Array(2);\nexport const float32 = new Float32Array(int32.buffer);\nexport const float64 = new Float64Array(int32.buffer);\nexport const isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchWeatherApi = fetchWeatherApi;\nconst flatbuffers_1 = require(\"flatbuffers\");\nconst weather_api_response_1 = require(\"@openmeteo/sdk/weather-api-response\");\nconst sleep = (ms) => new Promise(r => setTimeout(r, ms));\nfunction fetchRetried(url_1) {\n return __awaiter(this, arguments, void 0, function* (url, retries = 3, backoffFactor = 0.5, backoffMax = 2, fetchOptions = {}) {\n const statusToRetry = [500, 502, 504];\n const statusWithJsonError = [400, 429];\n let currentTry = 0;\n let response = yield fetch(url, fetchOptions);\n while (statusToRetry.includes(response.status)) {\n currentTry++;\n if (currentTry >= retries) {\n throw new Error(response.statusText);\n }\n const sleepMs = Math.min(backoffFactor * Math.pow(2, currentTry), backoffMax) * 1000;\n yield sleep(sleepMs);\n response = yield fetch(url, fetchOptions);\n }\n if (statusWithJsonError.includes(response.status)) {\n const json = yield response.json();\n if ('reason' in json) {\n throw new Error(json.reason);\n }\n throw new Error(response.statusText);\n }\n return response;\n });\n}\n/**\n * Retrieve data from the Open-Meteo weather API\n *\n * @param {string} url Server and endpoint. E.g. \"https://api.open-meteo.com/v1/forecast\"\n * @param {any} params URL parameter as an object\n * @param {number} [retries=3] Number of retries in case of an server error\n * @param {number} [backoffFactor=0.2] Exponential backoff factor to increase wait time after each retry\n * @param {number} [backoffMax=2] Maximum wait time between retries\n * @param {RequestInit} [fetchOptions={}] Additional fetch options such as headers, signal, etc.\n * @returns {Promise}\n */\nfunction fetchWeatherApi(url_1, params_1) {\n return __awaiter(this, arguments, void 0, function* (url, params, retries = 3, backoffFactor = 0.2, backoffMax = 2, fetchOptions = {}) {\n const urlParams = new URLSearchParams(params);\n urlParams.set('format', 'flatbuffers');\n const response = yield fetchRetried(`${url}?${urlParams.toString()}`, retries, backoffFactor, backoffMax, fetchOptions);\n const fb = new flatbuffers_1.ByteBuffer(new Uint8Array(yield response.arrayBuffer()));\n const results = [];\n let pos = 0;\n while (pos < fb.capacity()) {\n fb.setPosition(pos);\n const len = fb.readInt32(fb.position());\n results.push(weather_api_response_1.WeatherApiResponse.getSizePrefixedRootAsWeatherApiResponse(fb));\n pos += len + 4;\n }\n return results;\n });\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport HSL from \"./hsl\";\nvar Scheme = /** @class */ (function () {\n function Scheme(initial) {\n this.primary = HSL.fromHex(initial);\n }\n Scheme.prototype.toString = function () {\n var values = this.colors.map(function (color) { return color.toString(16); }).join(\",\");\n return \"\".concat(this.constructor.name, \": \").concat(values);\n };\n return Scheme;\n}());\nexport { Scheme };\nvar Analogous = /** @class */ (function (_super) {\n __extends(Analogous, _super);\n function Analogous(initial) {\n var _this = _super.call(this, initial) || this;\n var left1 = new HSL(_this.primary.hue - 30, _this.primary.saturation, _this.primary.lightness);\n var left2 = new HSL(_this.primary.hue - 15, _this.primary.saturation, _this.primary.lightness);\n var right1 = new HSL(_this.primary.hue + 15, _this.primary.saturation, _this.primary.lightness);\n var right2 = new HSL(_this.primary.hue + 30, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n left1.toHex(),\n left2.toHex(),\n initial,\n right1.toHex(),\n right2.toHex()\n ];\n return _this;\n }\n return Analogous;\n}(Scheme));\nexport { Analogous };\nvar Monochromatic = /** @class */ (function (_super) {\n __extends(Monochromatic, _super);\n function Monochromatic(initial) {\n var _this = _super.call(this, initial) || this;\n var delta = _this.primary.lightness / 6;\n _this.colors = [\n initial,\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 2).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 3).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 4).toHex()\n ];\n return _this;\n }\n return Monochromatic;\n}(Scheme));\nexport { Monochromatic };\nvar SplitComplementary = /** @class */ (function (_super) {\n __extends(SplitComplementary, _super);\n function SplitComplementary(initial) {\n var _this = _super.call(this, initial) || this;\n var complement = new HSL((_this.primary.hue + 180) % 360, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n new HSL(complement.hue - 30, complement.saturation, complement.lightness).toHex(),\n new HSL(complement.hue + 30, complement.saturation, complement.lightness).toHex()\n ];\n return _this;\n }\n return SplitComplementary;\n}(Scheme));\nexport { SplitComplementary };\nvar Triadic = /** @class */ (function (_super) {\n __extends(Triadic, _super);\n function Triadic(initial) {\n var _this = _super.call(this, initial) || this;\n _this.colors = [\n initial,\n new HSL(_this.primary.hue - 120, _this.primary.saturation, _this.primary.lightness).toHex(),\n new HSL(_this.primary.hue + 120, _this.primary.saturation, _this.primary.lightness).toHex()\n ];\n return _this;\n }\n return Triadic;\n}(Scheme));\nexport { Triadic };\nvar Tetradic = /** @class */ (function (_super) {\n __extends(Tetradic, _super);\n function Tetradic(initial) {\n var _this = _super.call(this, initial) || this;\n var second = new HSL(_this.primary.hue + 45, _this.primary.saturation, _this.primary.lightness);\n var complement = new HSL(_this.primary.hue + 180, _this.primary.saturation, _this.primary.lightness);\n var secondComplement = new HSL(second.hue + 180, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n second.toHex(),\n complement.toHex(),\n secondComplement.toHex()\n ];\n return _this;\n }\n return Tetradic;\n}(Scheme));\nexport { Tetradic };\nvar Square = /** @class */ (function (_super) {\n __extends(Square, _super);\n function Square(initial) {\n var _this = _super.call(this, initial) || this;\n var second = new HSL(_this.primary.hue + 90, _this.primary.saturation, _this.primary.lightness);\n var third = new HSL(_this.primary.hue + 180, _this.primary.saturation, _this.primary.lightness);\n var fourth = new HSL(second.hue + 270, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n second.toHex(),\n third.toHex(),\n fourth.toHex()\n ];\n return _this;\n }\n return Square;\n}(Scheme));\nexport { Square };\n","import SandPainter from \"./sand-painter\";\nvar Crack = /** @class */ (function () {\n function Crack(state, x, y, angle) {\n this.x = 0;\n this.y = 0;\n this.angle = 0;\n this.state = state;\n this.painter = new SandPainter(this);\n this.start(x, y, angle);\n }\n Crack.prototype.start = function (x, y, angle) {\n var random = crypto.getRandomValues(new Uint8Array(2));\n this.x = x + .61 * Math.cos(angle * Math.PI / 180);\n this.y = y + .61 * Math.sin(angle * Math.PI / 180);\n var flip = (random[0] / 256) > 0.5;\n this.angle = angle + (90 + Math.floor((random[1] / 256) * 4.1 - 2)) * (flip ? -1 : 1);\n };\n Crack.prototype.draw = function () {\n var random = crypto.getRandomValues(new Uint8Array(2));\n this.x += .42 * Math.cos(this.angle * Math.PI / 180);\n this.y += .42 * Math.sin(this.angle * Math.PI / 180);\n var fuzzX = this.x + (random[0] / 256 * .66 - .33);\n var fuzzY = this.y + (random[1] / 256 * .66 - .33);\n var context = this.state.canvas.getContext(\"2d\");\n context.fillStyle = \"#000\";\n context.fillRect(fuzzX, fuzzY, 1, 1);\n this.painter.render();\n var x = Math.floor(this.x);\n var y = Math.floor(this.y);\n if (this.state.isWithinBoundary(x, y)) {\n var angle = this.state.grid[x][y];\n if (angle > 10000) {\n this.state.grid[x][y] = Math.floor(this.angle);\n this.state.seeds.push({ x: x, y: y });\n }\n else if (this.state.grid[x][y] != Math.floor(this.angle)) {\n var entry = this.state.getNewEntry();\n this.start(entry.x, entry.y, entry.angle);\n }\n }\n else {\n var entry = this.state.getNewEntry();\n this.start(entry.x, entry.y, entry.angle);\n this.state.addCrack();\n }\n };\n return Crack;\n}());\nexport default Crack;\n","import RGB from \"./rgb\";\nvar HSL = /** @class */ (function () {\n function HSL(hue, saturation, lightness) {\n this.hue = (hue + 360) % 360;\n this.saturation = saturation;\n this.lightness = lightness;\n }\n // https://en.wikipedia.org/wiki/HSL_and_HSV\n HSL.fromRgb = function (rgb) {\n var redValue = rgb.red / 255, greenValue = rgb.green / 255, blueValue = rgb.blue / 255, max = Math.max(redValue, greenValue, blueValue), min = Math.min(redValue, greenValue, blueValue), chroma = max - min, lightness = .5 * (max + min), saturation = 1 - (3 / (redValue + greenValue + blueValue)) * Math.min(redValue, greenValue, blueValue);\n var huePrime = 0;\n if (chroma != 0) {\n if (redValue == max)\n huePrime = ((greenValue - blueValue) / chroma) % 6;\n else if (greenValue == max)\n huePrime = ((blueValue - redValue) / chroma) + 2;\n else\n huePrime = ((redValue - greenValue) / chroma) + 4;\n }\n return new HSL(huePrime * 60, saturation, lightness);\n };\n HSL.fromHex = function (color) {\n return HSL.fromRgb(RGB.fromHex(color));\n };\n HSL.prototype.toHex = function () {\n return RGB.fromHsl(this).toHex();\n };\n return HSL;\n}());\nexport default HSL;\n","var RGB = /** @class */ (function () {\n function RGB(red, green, blue) {\n this.red = Math.floor(red < 0 ? 0 : red > 255 ? 255 : red);\n this.green = Math.floor(green < 0 ? 0 : green > 255 ? 255 : green);\n this.blue = Math.floor(blue < 0 ? 0 : blue > 255 ? 255 : blue);\n }\n RGB.prototype.toHex = function () {\n return (this.red << 16) + (this.green << 8) + this.blue;\n };\n // https://en.wikipedia.org/wiki/HSL_and_HSV\n RGB.fromHsl = function (hsl) {\n var red = 0, green = 0, blue = 0;\n var chroma = (1 - Math.abs(2 * hsl.lightness - 1)) * hsl.saturation, range = hsl.hue / 60, intermediate = chroma * (1 - Math.abs(range % 2 - 1)), match = hsl.lightness - chroma / 2;\n if (range >= 0 && range < 1) {\n red = chroma;\n green = intermediate;\n }\n else if (range >= 1 && range < 2) {\n red = intermediate;\n green = chroma;\n }\n else if (range >= 2 && range < 3) {\n green = chroma;\n blue = intermediate;\n }\n else if (range >= 3 && range < 4) {\n green = intermediate;\n blue = chroma;\n }\n else if (range >= 4 && range < 5) {\n red = intermediate;\n blue = chroma;\n }\n else if (range >= 5 && range < 6) {\n red = chroma;\n blue = intermediate;\n }\n return new RGB((red + match) * 255, (green + match) * 255, (blue + match) * 255);\n };\n RGB.fromHex = function (color) {\n var red = color >> 16;\n var green = (color - (red << 16)) >> 8;\n var blue = color - (red << 16) - (green << 8);\n return new RGB(red, green, blue);\n };\n return RGB;\n}());\nexport default RGB;\n","var SandPainter = /** @class */ (function () {\n function SandPainter(crack) {\n this.crack = crack;\n this.color = this.crack.state.getNextColor();\n this.gain = Math.random() / 10;\n }\n SandPainter.prototype.render = function () {\n var state = this.crack.state, x = this.crack.x, y = this.crack.y, angle = this.crack.angle;\n var open = true, endX = x, endY = y;\n while (open) {\n endX += .81 * Math.sin(angle * Math.PI / 180);\n endY -= .81 * Math.cos(angle * Math.PI / 180);\n var gridX = Math.floor(endX);\n var gridY = Math.floor(endY);\n if (state.isWithinBoundary(gridX, gridY)) {\n open = state.grid[gridX][gridY] > 10000;\n }\n else {\n open = false;\n }\n }\n this.gain += (Math.random() / 10 - .05);\n if (this.gain < 0)\n this.gain = 0;\n if (this.gain > 1)\n this.gain = 1;\n var grains = 64;\n var hex = this.color.toString(16);\n var w = this.gain / (grains - 1); // some kind of multiplier\n var context = state.canvas.getContext(\"2d\");\n for (var i = 0; i < grains; i++) {\n var alpha = Math.floor((.1 - i / (grains * 10)) * 255);\n var paintX = x + (endX - x) * Math.sin(Math.sin(i * w));\n var paintY = y + (endY - y) * Math.sin(Math.sin(i * w));\n context.fillStyle = \"#\".concat(hex.padStart(6, \"0\")).concat(alpha.toString(16).padStart(2, \"0\"));\n context.fillRect(paintX, paintY, 1, 1);\n }\n };\n return SandPainter;\n}());\nexport default SandPainter;\n","import Crack from \"./crack\";\nvar State = /** @class */ (function () {\n function State(colors, maxCracks, canvas) {\n this.canvasColors = [\n \"rgb(27 27 27 / 90%)\",\n \"rgb(90 90 90 / 90%)\",\n \"rgb(126 126 126 / 90%)\",\n \"rgb(180 180 180 / 90%)\",\n \"rgb(255 255 255 / 90%)\",\n \"rgb(180 180 180 / 90%)\",\n \"rgb(126 126 126 / 90%)\",\n \"rgb(90 90 90 / 90%)\"\n ];\n this.canvasIndex = 0;\n this.colorIndex = 0;\n this.canvas = canvas;\n this.maxCracks = maxCracks;\n this.grid = [];\n this.colors = colors;\n this.cracks = [];\n this.seeds = [];\n this.init();\n }\n State.prototype.init = function (colors) {\n if (colors)\n this.colors = colors;\n this.cracks.length = 0;\n this.grid.length = 0;\n this.seeds.length = 0;\n this.colorIndex = 0;\n var height = this.canvas.height;\n var width = this.canvas.width;\n var context = this.canvas.getContext(\"2d\");\n context.fillStyle = this.canvasColors[this.canvasIndex++ % this.canvasColors.length];\n context.fillRect(0, 0, width, height);\n for (var x = 0; x < width; x++) {\n this.grid[x] = [];\n for (var y = 0; y < height; y++) {\n this.grid[x][y] = 10001;\n }\n }\n var random = crypto.getRandomValues(new Uint8Array(9));\n for (var i = 0; i < 9; i += 3) {\n var x = Math.floor(random[i] * width / 256);\n var y = Math.floor(random[i + 1] * height / 256);\n var angle = Math.floor(random[i + 2] * 360 / 256);\n this.cracks.push(new Crack(this, x, y, angle));\n this.grid[x][y] = angle;\n }\n };\n State.prototype.addCrack = function () {\n if (this.cracks.length >= this.maxCracks)\n return;\n var _a = this.getNewEntry(), x = _a.x, y = _a.y, angle = _a.angle;\n this.cracks.push(new Crack(this, x, y, angle));\n };\n State.prototype.getNextColor = function () {\n return this.colors[this.colorIndex++ % this.colors.length];\n };\n State.prototype.isWithinBoundary = function (x, y) {\n return x >= 0 && x < this.canvas.width && y >= 0 && y < this.canvas.height;\n };\n State.prototype.getNewEntry = function () {\n var random = crypto.getRandomValues(new Uint8Array(4));\n if (!this.seeds.length) {\n var x = Math.floor(random[0] * this.canvas.width / 256);\n var y = Math.floor(random[1] * this.canvas.height / 256);\n var angle = this.grid[x][y];\n if (angle > 10000) {\n angle = Math.floor(random[2] * 360 / 256);\n this.grid[x][y] = angle;\n }\n return { x: x, y: y, angle: angle };\n }\n var randomIndex = Math.floor(random[3] * this.seeds.length / 256);\n var entry = this.seeds.splice(randomIndex, 1)[0];\n return {\n x: entry.x,\n y: entry.y,\n angle: this.grid[entry.x][entry.y]\n };\n };\n return State;\n}());\nexport default State;\n","// TS attempt of http://www.complexification.net/gallery/machines/substrate/index.php by laniaung.me\nimport State from \"./state\";\nimport { Analogous, Monochromatic, SplitComplementary, Square, Tetradic, Triadic } from \"./color-schemes\";\nvar Substrate = /** @class */ (function () {\n function Substrate(maxCracks, colors) {\n if (!(colors === null || colors === void 0 ? void 0 : colors.length))\n colors = [0x3a1e3e, 0x7c2d3b, 0xb94f3c, 0xf4a462, 0xf9c54e]; // https://colormagic.app/palette/671eeb6c42273fc4c1bb1ac7\n var canvas = document.createElement(\"canvas\");\n canvas.width = document.body.clientWidth;\n canvas.height = document.body.clientHeight;\n document.body.appendChild(canvas);\n this.state = new State(colors, maxCracks, canvas);\n this.init();\n }\n Substrate.prototype.init = function () {\n var me = this;\n var draw = function () {\n for (var _i = 0, _a = me.state.cracks; _i < _a.length; _i++) {\n var crack = _a[_i];\n crack.draw();\n }\n requestAnimationFrame(draw);\n };\n setInterval(function () { return me.state.init(me.getRandomColorScheme()); }, 120 * 1000);\n draw();\n };\n Substrate.prototype.getRandomColorScheme = function () {\n var color = Math.floor(Math.random() * Math.pow(256, 3));\n var scheme;\n switch (Math.floor(Math.random() * 6)) {\n case 1:\n scheme = new Monochromatic(color);\n break;\n case 2:\n scheme = new SplitComplementary(color);\n break;\n case 3:\n scheme = new Triadic(color);\n break;\n case 4:\n scheme = new Tetradic(color);\n break;\n case 5:\n scheme = new Square(color);\n break;\n default:\n scheme = new Analogous(color);\n }\n console.info(scheme.toString());\n return scheme.colors;\n };\n return Substrate;\n}());\nexport default Substrate;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { fetchWeatherApi } from \"openmeteo\";\nvar Weather = /** @class */ (function () {\n function Weather(latitude, longitude) {\n this.apiUrl = \"https://api.open-meteo.com/v1/forecast\";\n this.dailyVariables = [\"temperature_2m_max\", \"temperature_2m_min\", \"sunrise\", \"sunset\", \"uv_index_max\", \"precipitation_sum\", \"precipitation_hours\", \"wind_speed_10m_max\", \"wind_gusts_10m_max\", \"wind_direction_10m_dominant\"];\n this.hourlyVariables = [\"temperature_2m\", \"precipitation\", \"precipitation_probability\"];\n this.currentVariables = [\"temperature_2m\", \"relative_humidity_2m\", \"apparent_temperature\", \"precipitation\", \"wind_speed_10m\", \"wind_gusts_10m\", \"wind_direction_10m\", \"cloud_cover\"];\n this.hourly = [];\n this.daily = [];\n this.options = new WeatherOptions(latitude !== null && latitude !== void 0 ? latitude : 47.61002138071677, longitude !== null && longitude !== void 0 ? longitude : -122.17906310779568);\n var time = document.getElementById(\"time\");\n time.textContent = new Date().toLocaleTimeString(\"en-US\", { hour12: false, timeStyle: \"short\" });\n setInterval(function () { return time.textContent = new Date().toLocaleTimeString(\"en-US\", { hour12: false, timeStyle: \"short\" }); }, 15000);\n var me = this;\n setInterval(function () { return me.fetchWeather().then(function () { return me.setDisplay(); }); }, 300000);\n me.fetchWeather().then(function () { return me.setDisplay(); });\n }\n Weather.prototype.fetchWeather = function () {\n return __awaiter(this, void 0, void 0, function () {\n var me, parameters, needsUpdate, responses, _i, responses_1, response, current, hourly, daily;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n me = this;\n parameters = __assign({}, me.options);\n needsUpdate = me.needsUpdate(parameters);\n if (!needsUpdate)\n return [2 /*return*/];\n console.info(\"Getting weather\", parameters);\n return [4 /*yield*/, fetchWeatherApi(me.apiUrl, parameters)];\n case 1:\n responses = _a.sent();\n for (_i = 0, responses_1 = responses; _i < responses_1.length; _i++) {\n response = responses_1[_i];\n current = response.current();\n hourly = response.hourly();\n daily = response.daily();\n if (current != null)\n me.setCurrentData(current);\n if (hourly != null)\n me.setHourlyData(hourly);\n if (daily != null)\n me.setDailyData(daily);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n Weather.prototype.needsUpdate = function (parameters) {\n var me = this;\n if (!me.lastFetched) {\n parameters[\"daily\"] = me.dailyVariables;\n parameters[\"hourly\"] = me.hourlyVariables;\n parameters[\"current\"] = me.currentVariables;\n me.lastFetched = new LastFetched();\n return true;\n }\n else {\n // Weather data is updated every 15 minutes starting at :00 but just wait 15 minutes for an update\n if (me.lastFetched.minutesSinceCurrent() >= 15) {\n var now = new Date();\n // Make sure data is over 5 minutes old at least\n if ((now.getTime() - me.lastFetched.current.getTime()) > 300000) {\n parameters[\"current\"] = me.currentVariables;\n me.lastFetched.current = new Date();\n return true;\n }\n }\n // Reasonable-ish timers?\n if (me.lastFetched.hoursSinceHourly() > 3) {\n parameters[\"hourly\"] = me.hourlyVariables;\n me.lastFetched.hourly = new Date();\n return true;\n }\n if (me.lastFetched.hoursSinceDaily() > 8) {\n parameters[\"daily\"] = me.dailyVariables;\n me.lastFetched.daily = new Date();\n return true;\n }\n }\n return false;\n };\n Weather.prototype.setCurrentData = function (current) {\n this.current = {\n time: new Date(Number(current.time()) * 1000),\n temperature: current.variables(0).value(),\n humidity: current.variables(1).value(),\n feelsLike: current.variables(2).value(),\n precipitation: current.variables(3).value(),\n windSpeed: current.variables(4).value(),\n windGusts: current.variables(5).value(),\n windDirection: current.variables(6).value(),\n cloudCoverage: current.variables(7).value()\n };\n };\n Weather.prototype.setHourlyData = function (hourly) {\n var length = Number(hourly.timeEnd() - hourly.time()) / hourly.interval();\n var temperatures = hourly.variables(0).valuesArray();\n var precipitationTotals = hourly.variables(1).valuesArray();\n var precipitationProbabilities = hourly.variables(2).valuesArray();\n this.hourly.length = 0;\n for (var i = 0; i < length; i++) {\n this.hourly.push({\n time: new Date((Number(hourly.time()) + i * hourly.interval()) * 1000),\n temperature: temperatures[i],\n precipitation: precipitationTotals[i],\n precipitationProbability: precipitationProbabilities[i]\n });\n }\n };\n Weather.prototype.setDailyData = function (daily) {\n var length = Number(daily.timeEnd() - daily.time()) / daily.interval();\n var maxTemperatures = daily.variables(0).valuesArray();\n var minTemperatures = daily.variables(1).valuesArray();\n var sunrise = daily.variables(2);\n var sunset = daily.variables(3);\n var maxUVs = daily.variables(4).valuesArray();\n var precipitationTotals = daily.variables(5).valuesArray();\n var precipitationHours = daily.variables(6).valuesArray();\n var maxWindSpeeds = daily.variables(7).valuesArray();\n var maxWindGusts = daily.variables(8).valuesArray();\n var prominentWindDirections = daily.variables(9).valuesArray();\n this.daily.length = 0;\n for (var i = 0; i < length; i++) {\n this.daily.push({\n time: new Date((Number(daily.time()) + i * daily.interval()) * 1000),\n maxTemperature: maxTemperatures[i],\n minTemperature: minTemperatures[i],\n sunrise: new Date((Number(sunrise.valuesInt64(i))) * 1000),\n sunset: new Date((Number(sunset.valuesInt64(i))) * 1000),\n maxUV: maxUVs[i],\n totalPrecipitation: precipitationTotals[i],\n hoursOfPrecipitation: precipitationHours[i],\n maxWindSpeed: maxWindSpeeds[i],\n maxWindGusts: maxWindGusts[i],\n prominentWindDirection: prominentWindDirections[i]\n });\n }\n };\n Weather.prototype.setDisplay = function () {\n var current = document.getElementById(\"current\");\n current.innerHTML = \"
thermostat\".concat(Math.round(this.current.temperature), \" (\").concat(Math.round(this.current.feelsLike), \")
\\n
\\n
water_drop \").concat(Math.round(this.current.humidity), \"%
\\n
cloud \").concat(Math.round(this.current.cloudCoverage), \"%
\\n
weather_mix \").concat(Math.round(this.current.precipitation), \"%
\\n
air \").concat(Math.round(this.current.windSpeed), \" (\").concat(Math.round(this.current.windGusts), \") \").concat(this.inCardinals(this.current.windDirection), \"
\\n
\");\n };\n Weather.prototype.inCardinals = function (direction) {\n if (direction > 337.5 || direction <= 22.5)\n return \"N\";\n if (direction > 22.5 || direction <= 67.5)\n return \"NE\";\n if (direction > 67.5 || direction <= 112.5)\n return \"E\";\n if (direction > 112.5 || direction <= 157.5)\n return \"SE\";\n if (direction > 157.5 || direction <= 202.5)\n return \"S\";\n if (direction > 202.5 || direction <= 249.5)\n return \"SW\";\n if (direction > 249.5 || direction <= 294.5)\n return \"W\";\n if (direction > 294.5 || direction <= 337.5)\n return \"NW\";\n return null;\n };\n return Weather;\n}());\nexport default Weather;\nvar WeatherOptions = /** @class */ (function () {\n function WeatherOptions(latitude, longitude, timezone) {\n if (timezone === void 0) { timezone = \"America/Los_Angeles\"; }\n this.timezone = \"America/Los_Angeles\";\n this[\"wind_speed_unit\"] = \"mph\";\n this[\"temperature_unit\"] = \"fahrenheit\";\n this[\"precipitation_unit\"] = \"inch\";\n this.latitude = latitude;\n this.longitude = longitude;\n this.timezone = timezone;\n }\n return WeatherOptions;\n}());\nvar LastFetched = /** @class */ (function () {\n function LastFetched() {\n this.current = new Date();\n this.hourly = new Date();\n this.daily = new Date();\n }\n LastFetched.prototype.minutesSinceCurrent = function () {\n return Math.floor((new Date().getTime() - this.current.getTime()) / 60000);\n };\n LastFetched.prototype.hoursSinceHourly = function () {\n return Math.floor((new Date().getTime() - this.hourly.getTime()) / 3600000);\n };\n LastFetched.prototype.hoursSinceDaily = function () {\n return Math.floor((new Date().getTime() - this.daily.getTime()) / 3600000);\n };\n return LastFetched;\n}());\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Substrate from \"./substrate\";\nimport Weather from \"./weather\";\nvar ready = function (func) { return document.readyState !== \"loading\" ? func() : document.addEventListener(\"DOMContentLoaded\", func); };\nready(function () {\n new Substrate(20);\n var weather;\n navigator.geolocation.getCurrentPosition(function (position) {\n weather = new Weather(position.coords.latitude, position.coords.longitude);\n }, function () {\n weather = new Weather();\n });\n});\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"main.js","mappings":";;;;;;;;;;AAAa;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kBAAkB,mBAAmB,mBAAmB;;;;;;;;;;;ACnB5C;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,YAAY,aAAa,aAAa;;;;;;;;;;;ACvG1B;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,WAAW,YAAY,YAAY;;;;;;;;;;;ACjDvB;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,yBAAyB,mBAAO,CAAC,sEAAkB;AACnD,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,sBAAsB,mBAAO,CAAC,gEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;;;;;;;;;;ACxHb;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,eAAe,gBAAgB,gBAAgB;;;;;;;;;;;AC5JnC;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,kCAAkC,mBAAO,CAAC,wFAA2B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;;;;;;;;;;AC9EZ;AACb;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA,iCAAiC,mBAAO,CAAC,kEAAa;AACtD,mBAAmB,mBAAO,CAAC,0DAAY;AACvC,iCAAiC,mBAAO,CAAC,sFAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;;;;;;;;;;;;;;;;ACnHoB;AACwD;AAC/F;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,uDAAU;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU,MAAM;AAClC,iDAAiD,qDAAU;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,mCAAmC;AACnC;AACA,uDAAuD,uDAAY;AACnE;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA,6BAA6B,uDAAY,EAAE,SAAS,KAAK,uDAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,6DAAkB;AAChE;AACA;AACA,qCAAqC,qDAAU;AAC/C,gBAAgB,iEAAsB;AACtC,0CAA0C,iEAAsB;AAChE;AACA,oBAAoB,iEAAsB;AAC1C;AACA,yBAAyB,iEAAsB,MAAM,QAAQ;AAC7D;AACA;AACA;AACA,iCAAiC,qDAAU;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU;AAC5B,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACphBoE;AACC;AAC5B;AAClC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4CAAK;AACb,eAAe,8CAAO;AACtB;AACA;AACA,QAAQ,4CAAK,CAAC,qDAAc;AAC5B,QAAQ,4CAAK,CAAC,qDAAc;AAC5B,eAAe,8CAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAO;AACf,gCAAgC,4CAAK;AACrC;AACA;AACA,QAAQ,8CAAO;AACf,gCAAgC,4CAAK,CAAC,qDAAc;AACpD,oCAAoC,4CAAK,CAAC,qDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qDAAU;AAC5D,YAAY,iEAAsB;AAClC;AACA;AACA;AACA,wBAAwB,IAAI,iEAAsB,EAAE;AACpD,yEAAyE,qDAAU;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAU;AAC5B;AACA,6BAA6B,kDAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,qDAAU,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iEAAsB;AAClD;AACA,gBAAgB,iEAAsB;AACtC;AACA,wBAAwB,IAAI,iEAAsB,EAAE;AACpD,uEAAuE,qDAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACtPO;AACA;AACA;AACA;;;;;;;;;;;;;;;ACHA;AACP;AACA;AACA;AACA,CAAC,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJiB;AACF;AACY;AACJ;AACiB;AAC5B;AACF;AACO;;;;;;;;;;;;;;;;;;ACPvC;AACA;AACA;AACA;;;;;;;;;;;ACHM;AACb;AACA,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,sBAAsB,mBAAO,CAAC,kEAAa;AAC3C,+BAA+B,mBAAO,CAAC,kGAAqC;AAC5E;AACA;AACA,iIAAiI;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,aAAa,gBAAgB;AACxC,aAAa;AACb;AACA;AACA,yIAAyI;AACzI;AACA;AACA,+CAA+C,IAAI,GAAG,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;;;;;;;;;;ACnEA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACuB;AACxB;AACA;AACA,uBAAuB,4CAAG;AAC1B;AACA;AACA,wDAAwD,4BAA4B;AACpF;AACA;AACA;AACA,CAAC;AACiB;AAClB;AACA;AACA;AACA;AACA,wBAAwB,4CAAG;AAC3B,wBAAwB,4CAAG;AAC3B,yBAAyB,4CAAG;AAC5B,yBAAyB,4CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AACwB;AACzB;AACA;AACA;AACA;AACA,6BAA6B,4CAAG;AAChC;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AAC6B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4CAAG;AACnB,gBAAgB,4CAAG;AACnB;AACA;AACA;AACA;AACA,CAAC;AACkB;AACnB;AACA;AACA;AACA;AACA,yBAAyB,4CAAG;AAC5B,6BAA6B,4CAAG;AAChC,mCAAmC,4CAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACmB;AACpB;AACA;AACA;AACA;AACA,yBAAyB,4CAAG;AAC5B,wBAAwB,4CAAG;AAC3B,yBAAyB,4CAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACiB;;;;;;;;;;;;;;;;AChIuB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qDAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,YAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;AChDG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4CAAG;AAC9B;AACA;AACA,eAAe,4CAAG;AAClB;AACA;AACA,CAAC;AACD,iEAAe,GAAG,EAAC;;;;;;;;;;;;;;;AC7BnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,GAAG,EAAC;;;;;;;;;;;;;;;AC/CnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;ACxCC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA,iCAAiC,8CAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;ACpFrB;AAC4B;AAC8E;AAC1G;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA,yBAAyB,8CAAK;AAC9B;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB;AACnE;AACA;AACA;AACA;AACA;AACA,kCAAkC,kDAAkD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yDAAa;AAC1C;AACA;AACA,6BAA6B,8DAAkB;AAC/C;AACA;AACA,6BAA6B,mDAAO;AACpC;AACA;AACA,6BAA6B,oDAAQ;AACrC;AACA;AACA,6BAA6B,kDAAM;AACnC;AACA;AACA,6BAA6B,qDAAS;AACtC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,SAAS,EAAC;;;;;;;;;;;;;;;;;ACrDzB,gBAAgB,SAAI,IAAI,SAAI;AAC5B;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAI,IAAI,SAAI;AAC7B,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA,mBAAmB,SAAI,IAAI,SAAI;AAC/B,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,6IAA6I,cAAc;AAC3J,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AAC4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,mCAAmC;AACvG,kCAAkC,mEAAmE,mCAAmC,IAAI;AAC5I,kCAAkC,4CAA4C,yBAAyB,IAAI;AAC3G,6CAA6C,yBAAyB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,6CAA6C,0DAAe;AAC5D;AACA;AACA,8DAA8D,yBAAyB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA,maAAma,mCAAmC,2FAA2F,mCAAmC;AACpkB;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iEAAe,OAAO,EAAC;AACvB;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;UC/RD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACNoC;AACJ;AAChC,8BAA8B;AAC9B;AACA,QAAQ,kDAAS;AACjB;AACA;AACA,sBAAsB,gDAAO;AAC7B,KAAK;AACL,sBAAsB,gDAAO;AAC7B,KAAK;AACL,CAAC","sources":["webpack:///./node_modules/@openmeteo/sdk/aggregation.js","webpack:///./node_modules/@openmeteo/sdk/model.js","webpack:///./node_modules/@openmeteo/sdk/unit.js","webpack:///./node_modules/@openmeteo/sdk/variable-with-values.js","webpack:///./node_modules/@openmeteo/sdk/variable.js","webpack:///./node_modules/@openmeteo/sdk/variables-with-time.js","webpack:///./node_modules/@openmeteo/sdk/weather-api-response.js","webpack:///./node_modules/flatbuffers/mjs/builder.js","webpack:///./node_modules/flatbuffers/mjs/byte-buffer.js","webpack:///./node_modules/flatbuffers/mjs/constants.js","webpack:///./node_modules/flatbuffers/mjs/encoding.js","webpack:///./node_modules/flatbuffers/mjs/flatbuffers.js","webpack:///./node_modules/flatbuffers/mjs/utils.js","webpack:///./node_modules/openmeteo/lib/index.js","webpack:///./src/color-schemes.ts","webpack:///./src/crack.ts","webpack:///./src/hsl.ts","webpack:///./src/rgb.ts","webpack:///./src/sand-painter.ts","webpack:///./src/state.ts","webpack:///./src/substrate.ts","webpack:///./src/weather.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///./src/launch.ts"],"sourcesContent":["\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Aggregation = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Aggregation;\n(function (Aggregation) {\n Aggregation[Aggregation[\"none\"] = 0] = \"none\";\n Aggregation[Aggregation[\"minimum\"] = 1] = \"minimum\";\n Aggregation[Aggregation[\"maximum\"] = 2] = \"maximum\";\n Aggregation[Aggregation[\"mean\"] = 3] = \"mean\";\n Aggregation[Aggregation[\"p10\"] = 4] = \"p10\";\n Aggregation[Aggregation[\"p25\"] = 5] = \"p25\";\n Aggregation[Aggregation[\"median\"] = 6] = \"median\";\n Aggregation[Aggregation[\"p75\"] = 7] = \"p75\";\n Aggregation[Aggregation[\"p90\"] = 8] = \"p90\";\n Aggregation[Aggregation[\"dominant\"] = 9] = \"dominant\";\n Aggregation[Aggregation[\"sum\"] = 10] = \"sum\";\n Aggregation[Aggregation[\"spread\"] = 11] = \"spread\";\n})(Aggregation || (exports.Aggregation = Aggregation = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Model = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Model;\n(function (Model) {\n Model[Model[\"undefined\"] = 0] = \"undefined\";\n Model[Model[\"best_match\"] = 1] = \"best_match\";\n Model[Model[\"gfs_seamless\"] = 2] = \"gfs_seamless\";\n Model[Model[\"gfs_global\"] = 3] = \"gfs_global\";\n Model[Model[\"gfs_hrrr\"] = 4] = \"gfs_hrrr\";\n Model[Model[\"meteofrance_seamless\"] = 5] = \"meteofrance_seamless\";\n Model[Model[\"meteofrance_arpege_seamless\"] = 6] = \"meteofrance_arpege_seamless\";\n Model[Model[\"meteofrance_arpege_world\"] = 7] = \"meteofrance_arpege_world\";\n Model[Model[\"meteofrance_arpege_europe\"] = 8] = \"meteofrance_arpege_europe\";\n Model[Model[\"meteofrance_arome_seamless\"] = 9] = \"meteofrance_arome_seamless\";\n Model[Model[\"meteofrance_arome_france\"] = 10] = \"meteofrance_arome_france\";\n Model[Model[\"meteofrance_arome_france_hd\"] = 11] = \"meteofrance_arome_france_hd\";\n Model[Model[\"jma_seamless\"] = 12] = \"jma_seamless\";\n Model[Model[\"jma_msm\"] = 13] = \"jma_msm\";\n Model[Model[\"jms_gsm\"] = 14] = \"jms_gsm\";\n Model[Model[\"jma_gsm\"] = 15] = \"jma_gsm\";\n Model[Model[\"gem_seamless\"] = 16] = \"gem_seamless\";\n Model[Model[\"gem_global\"] = 17] = \"gem_global\";\n Model[Model[\"gem_regional\"] = 18] = \"gem_regional\";\n Model[Model[\"gem_hrdps_continental\"] = 19] = \"gem_hrdps_continental\";\n Model[Model[\"icon_seamless\"] = 20] = \"icon_seamless\";\n Model[Model[\"icon_global\"] = 21] = \"icon_global\";\n Model[Model[\"icon_eu\"] = 22] = \"icon_eu\";\n Model[Model[\"icon_d2\"] = 23] = \"icon_d2\";\n Model[Model[\"ecmwf_ifs04\"] = 24] = \"ecmwf_ifs04\";\n Model[Model[\"metno_nordic\"] = 25] = \"metno_nordic\";\n Model[Model[\"era5_seamless\"] = 26] = \"era5_seamless\";\n Model[Model[\"era5\"] = 27] = \"era5\";\n Model[Model[\"cerra\"] = 28] = \"cerra\";\n Model[Model[\"era5_land\"] = 29] = \"era5_land\";\n Model[Model[\"ecmwf_ifs\"] = 30] = \"ecmwf_ifs\";\n Model[Model[\"gwam\"] = 31] = \"gwam\";\n Model[Model[\"ewam\"] = 32] = \"ewam\";\n Model[Model[\"glofas_seamless_v3\"] = 33] = \"glofas_seamless_v3\";\n Model[Model[\"glofas_forecast_v3\"] = 34] = \"glofas_forecast_v3\";\n Model[Model[\"glofas_consolidated_v3\"] = 35] = \"glofas_consolidated_v3\";\n Model[Model[\"glofas_seamless_v4\"] = 36] = \"glofas_seamless_v4\";\n Model[Model[\"glofas_forecast_v4\"] = 37] = \"glofas_forecast_v4\";\n Model[Model[\"glofas_consolidated_v4\"] = 38] = \"glofas_consolidated_v4\";\n Model[Model[\"gfs025\"] = 39] = \"gfs025\";\n Model[Model[\"gfs05\"] = 40] = \"gfs05\";\n Model[Model[\"CMCC_CM2_VHR4\"] = 41] = \"CMCC_CM2_VHR4\";\n Model[Model[\"FGOALS_f3_H_highresSST\"] = 42] = \"FGOALS_f3_H_highresSST\";\n Model[Model[\"FGOALS_f3_H\"] = 43] = \"FGOALS_f3_H\";\n Model[Model[\"HiRAM_SIT_HR\"] = 44] = \"HiRAM_SIT_HR\";\n Model[Model[\"MRI_AGCM3_2_S\"] = 45] = \"MRI_AGCM3_2_S\";\n Model[Model[\"EC_Earth3P_HR\"] = 46] = \"EC_Earth3P_HR\";\n Model[Model[\"MPI_ESM1_2_XR\"] = 47] = \"MPI_ESM1_2_XR\";\n Model[Model[\"NICAM16_8S\"] = 48] = \"NICAM16_8S\";\n Model[Model[\"cams_europe\"] = 49] = \"cams_europe\";\n Model[Model[\"cams_global\"] = 50] = \"cams_global\";\n Model[Model[\"cfsv2\"] = 51] = \"cfsv2\";\n Model[Model[\"era5_ocean\"] = 52] = \"era5_ocean\";\n Model[Model[\"cma_grapes_global\"] = 53] = \"cma_grapes_global\";\n Model[Model[\"bom_access_global\"] = 54] = \"bom_access_global\";\n Model[Model[\"bom_access_global_ensemble\"] = 55] = \"bom_access_global_ensemble\";\n Model[Model[\"arpae_cosmo_seamless\"] = 56] = \"arpae_cosmo_seamless\";\n Model[Model[\"arpae_cosmo_2i\"] = 57] = \"arpae_cosmo_2i\";\n Model[Model[\"arpae_cosmo_2i_ruc\"] = 58] = \"arpae_cosmo_2i_ruc\";\n Model[Model[\"arpae_cosmo_5m\"] = 59] = \"arpae_cosmo_5m\";\n Model[Model[\"ecmwf_ifs025\"] = 60] = \"ecmwf_ifs025\";\n Model[Model[\"ecmwf_aifs025\"] = 61] = \"ecmwf_aifs025\";\n Model[Model[\"gfs013\"] = 62] = \"gfs013\";\n Model[Model[\"gfs_graphcast025\"] = 63] = \"gfs_graphcast025\";\n Model[Model[\"ecmwf_wam025\"] = 64] = \"ecmwf_wam025\";\n Model[Model[\"meteofrance_wave\"] = 65] = \"meteofrance_wave\";\n Model[Model[\"meteofrance_currents\"] = 66] = \"meteofrance_currents\";\n Model[Model[\"ecmwf_wam025_ensemble\"] = 67] = \"ecmwf_wam025_ensemble\";\n Model[Model[\"ncep_gfswave025\"] = 68] = \"ncep_gfswave025\";\n Model[Model[\"ncep_gefswave025\"] = 69] = \"ncep_gefswave025\";\n Model[Model[\"knmi_seamless\"] = 70] = \"knmi_seamless\";\n Model[Model[\"knmi_harmonie_arome_europe\"] = 71] = \"knmi_harmonie_arome_europe\";\n Model[Model[\"knmi_harmonie_arome_netherlands\"] = 72] = \"knmi_harmonie_arome_netherlands\";\n Model[Model[\"dmi_seamless\"] = 73] = \"dmi_seamless\";\n Model[Model[\"dmi_harmonie_arome_europe\"] = 74] = \"dmi_harmonie_arome_europe\";\n Model[Model[\"metno_seamless\"] = 75] = \"metno_seamless\";\n Model[Model[\"era5_ensemble\"] = 76] = \"era5_ensemble\";\n Model[Model[\"ecmwf_ifs_analysis\"] = 77] = \"ecmwf_ifs_analysis\";\n Model[Model[\"ecmwf_ifs_long_window\"] = 78] = \"ecmwf_ifs_long_window\";\n Model[Model[\"ecmwf_ifs_analysis_long_window\"] = 79] = \"ecmwf_ifs_analysis_long_window\";\n Model[Model[\"ukmo_global_deterministic_10km\"] = 80] = \"ukmo_global_deterministic_10km\";\n Model[Model[\"ukmo_uk_deterministic_2km\"] = 81] = \"ukmo_uk_deterministic_2km\";\n Model[Model[\"ukmo_seamless\"] = 82] = \"ukmo_seamless\";\n Model[Model[\"ncep_gfswave016\"] = 83] = \"ncep_gfswave016\";\n Model[Model[\"ncep_nbm_conus\"] = 84] = \"ncep_nbm_conus\";\n Model[Model[\"ukmo_global_ensemble_20km\"] = 85] = \"ukmo_global_ensemble_20km\";\n Model[Model[\"ecmwf_aifs025_single\"] = 86] = \"ecmwf_aifs025_single\";\n Model[Model[\"jma_jaxa_himawari\"] = 87] = \"jma_jaxa_himawari\";\n Model[Model[\"eumetsat_sarah3\"] = 88] = \"eumetsat_sarah3\";\n Model[Model[\"eumetsat_lsa_saf_msg\"] = 89] = \"eumetsat_lsa_saf_msg\";\n Model[Model[\"eumetsat_lsa_saf_iodc\"] = 90] = \"eumetsat_lsa_saf_iodc\";\n Model[Model[\"satellite_radiation_seamless\"] = 91] = \"satellite_radiation_seamless\";\n Model[Model[\"kma_gdps\"] = 92] = \"kma_gdps\";\n Model[Model[\"kma_ldps\"] = 93] = \"kma_ldps\";\n Model[Model[\"kma_seamless\"] = 94] = \"kma_seamless\";\n Model[Model[\"italia_meteo_arpae_icon_2i\"] = 95] = \"italia_meteo_arpae_icon_2i\";\n})(Model || (exports.Model = Model = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Unit = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Unit;\n(function (Unit) {\n Unit[Unit[\"undefined\"] = 0] = \"undefined\";\n Unit[Unit[\"celsius\"] = 1] = \"celsius\";\n Unit[Unit[\"centimetre\"] = 2] = \"centimetre\";\n Unit[Unit[\"cubic_metre_per_cubic_metre\"] = 3] = \"cubic_metre_per_cubic_metre\";\n Unit[Unit[\"cubic_metre_per_second\"] = 4] = \"cubic_metre_per_second\";\n Unit[Unit[\"degree_direction\"] = 5] = \"degree_direction\";\n Unit[Unit[\"dimensionless_integer\"] = 6] = \"dimensionless_integer\";\n Unit[Unit[\"dimensionless\"] = 7] = \"dimensionless\";\n Unit[Unit[\"european_air_quality_index\"] = 8] = \"european_air_quality_index\";\n Unit[Unit[\"fahrenheit\"] = 9] = \"fahrenheit\";\n Unit[Unit[\"feet\"] = 10] = \"feet\";\n Unit[Unit[\"fraction\"] = 11] = \"fraction\";\n Unit[Unit[\"gdd_celsius\"] = 12] = \"gdd_celsius\";\n Unit[Unit[\"geopotential_metre\"] = 13] = \"geopotential_metre\";\n Unit[Unit[\"grains_per_cubic_metre\"] = 14] = \"grains_per_cubic_metre\";\n Unit[Unit[\"gram_per_kilogram\"] = 15] = \"gram_per_kilogram\";\n Unit[Unit[\"hectopascal\"] = 16] = \"hectopascal\";\n Unit[Unit[\"hours\"] = 17] = \"hours\";\n Unit[Unit[\"inch\"] = 18] = \"inch\";\n Unit[Unit[\"iso8601\"] = 19] = \"iso8601\";\n Unit[Unit[\"joule_per_kilogram\"] = 20] = \"joule_per_kilogram\";\n Unit[Unit[\"kelvin\"] = 21] = \"kelvin\";\n Unit[Unit[\"kilopascal\"] = 22] = \"kilopascal\";\n Unit[Unit[\"kilogram_per_square_metre\"] = 23] = \"kilogram_per_square_metre\";\n Unit[Unit[\"kilometres_per_hour\"] = 24] = \"kilometres_per_hour\";\n Unit[Unit[\"knots\"] = 25] = \"knots\";\n Unit[Unit[\"megajoule_per_square_metre\"] = 26] = \"megajoule_per_square_metre\";\n Unit[Unit[\"metre_per_second_not_unit_converted\"] = 27] = \"metre_per_second_not_unit_converted\";\n Unit[Unit[\"metre_per_second\"] = 28] = \"metre_per_second\";\n Unit[Unit[\"metre\"] = 29] = \"metre\";\n Unit[Unit[\"micrograms_per_cubic_metre\"] = 30] = \"micrograms_per_cubic_metre\";\n Unit[Unit[\"miles_per_hour\"] = 31] = \"miles_per_hour\";\n Unit[Unit[\"millimetre\"] = 32] = \"millimetre\";\n Unit[Unit[\"pascal\"] = 33] = \"pascal\";\n Unit[Unit[\"per_second\"] = 34] = \"per_second\";\n Unit[Unit[\"percentage\"] = 35] = \"percentage\";\n Unit[Unit[\"seconds\"] = 36] = \"seconds\";\n Unit[Unit[\"unix_time\"] = 37] = \"unix_time\";\n Unit[Unit[\"us_air_quality_index\"] = 38] = \"us_air_quality_index\";\n Unit[Unit[\"watt_per_square_metre\"] = 39] = \"watt_per_square_metre\";\n Unit[Unit[\"wmo_code\"] = 40] = \"wmo_code\";\n Unit[Unit[\"parts_per_million\"] = 41] = \"parts_per_million\";\n})(Unit || (exports.Unit = Unit = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VariableWithValues = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst aggregation_js_1 = require(\"./aggregation.js\");\nconst unit_js_1 = require(\"./unit.js\");\nconst variable_js_1 = require(\"./variable.js\");\nclass VariableWithValues {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsVariableWithValues(bb, obj) {\n return (obj || new VariableWithValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsVariableWithValues(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new VariableWithValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n variable() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : variable_js_1.Variable.undefined;\n }\n unit() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : unit_js_1.Unit.undefined;\n }\n value() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n values(index) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readFloat32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;\n }\n valuesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n valuesArray() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? new Float32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;\n }\n valuesInt64(index) {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : BigInt(0);\n }\n valuesInt64Length() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n altitude() {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n aggregation() {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : aggregation_js_1.Aggregation.none;\n }\n pressureLevel() {\n const offset = this.bb.__offset(this.bb_pos, 18);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n depth() {\n const offset = this.bb.__offset(this.bb_pos, 20);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n depthTo() {\n const offset = this.bb.__offset(this.bb_pos, 22);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n ensembleMember() {\n const offset = this.bb.__offset(this.bb_pos, 24);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n previousDay() {\n const offset = this.bb.__offset(this.bb_pos, 26);\n return offset ? this.bb.readInt16(this.bb_pos + offset) : 0;\n }\n}\nexports.VariableWithValues = VariableWithValues;\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Variable = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nvar Variable;\n(function (Variable) {\n Variable[Variable[\"undefined\"] = 0] = \"undefined\";\n Variable[Variable[\"apparent_temperature\"] = 1] = \"apparent_temperature\";\n Variable[Variable[\"cape\"] = 2] = \"cape\";\n Variable[Variable[\"cloud_cover\"] = 3] = \"cloud_cover\";\n Variable[Variable[\"cloud_cover_high\"] = 4] = \"cloud_cover_high\";\n Variable[Variable[\"cloud_cover_low\"] = 5] = \"cloud_cover_low\";\n Variable[Variable[\"cloud_cover_mid\"] = 6] = \"cloud_cover_mid\";\n Variable[Variable[\"daylight_duration\"] = 7] = \"daylight_duration\";\n Variable[Variable[\"dew_point\"] = 8] = \"dew_point\";\n Variable[Variable[\"diffuse_radiation\"] = 9] = \"diffuse_radiation\";\n Variable[Variable[\"diffuse_radiation_instant\"] = 10] = \"diffuse_radiation_instant\";\n Variable[Variable[\"direct_normal_irradiance\"] = 11] = \"direct_normal_irradiance\";\n Variable[Variable[\"direct_normal_irradiance_instant\"] = 12] = \"direct_normal_irradiance_instant\";\n Variable[Variable[\"direct_radiation\"] = 13] = \"direct_radiation\";\n Variable[Variable[\"direct_radiation_instant\"] = 14] = \"direct_radiation_instant\";\n Variable[Variable[\"et0_fao_evapotranspiration\"] = 15] = \"et0_fao_evapotranspiration\";\n Variable[Variable[\"evapotranspiration\"] = 16] = \"evapotranspiration\";\n Variable[Variable[\"freezing_level_height\"] = 17] = \"freezing_level_height\";\n Variable[Variable[\"growing_degree_days\"] = 18] = \"growing_degree_days\";\n Variable[Variable[\"is_day\"] = 19] = \"is_day\";\n Variable[Variable[\"latent_heat_flux\"] = 20] = \"latent_heat_flux\";\n Variable[Variable[\"leaf_wetness_probability\"] = 21] = \"leaf_wetness_probability\";\n Variable[Variable[\"lifted_index\"] = 22] = \"lifted_index\";\n Variable[Variable[\"lightning_potential\"] = 23] = \"lightning_potential\";\n Variable[Variable[\"precipitation\"] = 24] = \"precipitation\";\n Variable[Variable[\"precipitation_hours\"] = 25] = \"precipitation_hours\";\n Variable[Variable[\"precipitation_probability\"] = 26] = \"precipitation_probability\";\n Variable[Variable[\"pressure_msl\"] = 27] = \"pressure_msl\";\n Variable[Variable[\"rain\"] = 28] = \"rain\";\n Variable[Variable[\"relative_humidity\"] = 29] = \"relative_humidity\";\n Variable[Variable[\"runoff\"] = 30] = \"runoff\";\n Variable[Variable[\"sensible_heat_flux\"] = 31] = \"sensible_heat_flux\";\n Variable[Variable[\"shortwave_radiation\"] = 32] = \"shortwave_radiation\";\n Variable[Variable[\"shortwave_radiation_instant\"] = 33] = \"shortwave_radiation_instant\";\n Variable[Variable[\"showers\"] = 34] = \"showers\";\n Variable[Variable[\"snow_depth\"] = 35] = \"snow_depth\";\n Variable[Variable[\"snow_height\"] = 36] = \"snow_height\";\n Variable[Variable[\"snowfall\"] = 37] = \"snowfall\";\n Variable[Variable[\"snowfall_height\"] = 38] = \"snowfall_height\";\n Variable[Variable[\"snowfall_water_equivalent\"] = 39] = \"snowfall_water_equivalent\";\n Variable[Variable[\"sunrise\"] = 40] = \"sunrise\";\n Variable[Variable[\"sunset\"] = 41] = \"sunset\";\n Variable[Variable[\"soil_moisture\"] = 42] = \"soil_moisture\";\n Variable[Variable[\"soil_moisture_index\"] = 43] = \"soil_moisture_index\";\n Variable[Variable[\"soil_temperature\"] = 44] = \"soil_temperature\";\n Variable[Variable[\"surface_pressure\"] = 45] = \"surface_pressure\";\n Variable[Variable[\"surface_temperature\"] = 46] = \"surface_temperature\";\n Variable[Variable[\"temperature\"] = 47] = \"temperature\";\n Variable[Variable[\"terrestrial_radiation\"] = 48] = \"terrestrial_radiation\";\n Variable[Variable[\"terrestrial_radiation_instant\"] = 49] = \"terrestrial_radiation_instant\";\n Variable[Variable[\"total_column_integrated_water_vapour\"] = 50] = \"total_column_integrated_water_vapour\";\n Variable[Variable[\"updraft\"] = 51] = \"updraft\";\n Variable[Variable[\"uv_index\"] = 52] = \"uv_index\";\n Variable[Variable[\"uv_index_clear_sky\"] = 53] = \"uv_index_clear_sky\";\n Variable[Variable[\"vapour_pressure_deficit\"] = 54] = \"vapour_pressure_deficit\";\n Variable[Variable[\"visibility\"] = 55] = \"visibility\";\n Variable[Variable[\"weather_code\"] = 56] = \"weather_code\";\n Variable[Variable[\"wind_direction\"] = 57] = \"wind_direction\";\n Variable[Variable[\"wind_gusts\"] = 58] = \"wind_gusts\";\n Variable[Variable[\"wind_speed\"] = 59] = \"wind_speed\";\n Variable[Variable[\"vertical_velocity\"] = 60] = \"vertical_velocity\";\n Variable[Variable[\"geopotential_height\"] = 61] = \"geopotential_height\";\n Variable[Variable[\"wet_bulb_temperature\"] = 62] = \"wet_bulb_temperature\";\n Variable[Variable[\"river_discharge\"] = 63] = \"river_discharge\";\n Variable[Variable[\"wave_height\"] = 64] = \"wave_height\";\n Variable[Variable[\"wave_period\"] = 65] = \"wave_period\";\n Variable[Variable[\"wave_direction\"] = 66] = \"wave_direction\";\n Variable[Variable[\"wind_wave_height\"] = 67] = \"wind_wave_height\";\n Variable[Variable[\"wind_wave_period\"] = 68] = \"wind_wave_period\";\n Variable[Variable[\"wind_wave_peak_period\"] = 69] = \"wind_wave_peak_period\";\n Variable[Variable[\"wind_wave_direction\"] = 70] = \"wind_wave_direction\";\n Variable[Variable[\"swell_wave_height\"] = 71] = \"swell_wave_height\";\n Variable[Variable[\"swell_wave_period\"] = 72] = \"swell_wave_period\";\n Variable[Variable[\"swell_wave_peak_period\"] = 73] = \"swell_wave_peak_period\";\n Variable[Variable[\"swell_wave_direction\"] = 74] = \"swell_wave_direction\";\n Variable[Variable[\"pm10\"] = 75] = \"pm10\";\n Variable[Variable[\"pm2p5\"] = 76] = \"pm2p5\";\n Variable[Variable[\"dust\"] = 77] = \"dust\";\n Variable[Variable[\"aerosol_optical_depth\"] = 78] = \"aerosol_optical_depth\";\n Variable[Variable[\"carbon_monoxide\"] = 79] = \"carbon_monoxide\";\n Variable[Variable[\"nitrogen_dioxide\"] = 80] = \"nitrogen_dioxide\";\n Variable[Variable[\"ammonia\"] = 81] = \"ammonia\";\n Variable[Variable[\"ozone\"] = 82] = \"ozone\";\n Variable[Variable[\"sulphur_dioxide\"] = 83] = \"sulphur_dioxide\";\n Variable[Variable[\"alder_pollen\"] = 84] = \"alder_pollen\";\n Variable[Variable[\"birch_pollen\"] = 85] = \"birch_pollen\";\n Variable[Variable[\"grass_pollen\"] = 86] = \"grass_pollen\";\n Variable[Variable[\"mugwort_pollen\"] = 87] = \"mugwort_pollen\";\n Variable[Variable[\"olive_pollen\"] = 88] = \"olive_pollen\";\n Variable[Variable[\"ragweed_pollen\"] = 89] = \"ragweed_pollen\";\n Variable[Variable[\"european_aqi\"] = 90] = \"european_aqi\";\n Variable[Variable[\"european_aqi_pm2p5\"] = 91] = \"european_aqi_pm2p5\";\n Variable[Variable[\"european_aqi_pm10\"] = 92] = \"european_aqi_pm10\";\n Variable[Variable[\"european_aqi_nitrogen_dioxide\"] = 93] = \"european_aqi_nitrogen_dioxide\";\n Variable[Variable[\"european_aqi_ozone\"] = 94] = \"european_aqi_ozone\";\n Variable[Variable[\"european_aqi_sulphur_dioxide\"] = 95] = \"european_aqi_sulphur_dioxide\";\n Variable[Variable[\"us_aqi\"] = 96] = \"us_aqi\";\n Variable[Variable[\"us_aqi_pm2p5\"] = 97] = \"us_aqi_pm2p5\";\n Variable[Variable[\"us_aqi_pm10\"] = 98] = \"us_aqi_pm10\";\n Variable[Variable[\"us_aqi_nitrogen_dioxide\"] = 99] = \"us_aqi_nitrogen_dioxide\";\n Variable[Variable[\"us_aqi_ozone\"] = 100] = \"us_aqi_ozone\";\n Variable[Variable[\"us_aqi_sulphur_dioxide\"] = 101] = \"us_aqi_sulphur_dioxide\";\n Variable[Variable[\"us_aqi_carbon_monoxide\"] = 102] = \"us_aqi_carbon_monoxide\";\n Variable[Variable[\"sunshine_duration\"] = 103] = \"sunshine_duration\";\n Variable[Variable[\"convective_inhibition\"] = 104] = \"convective_inhibition\";\n Variable[Variable[\"shortwave_radiation_clear_sky\"] = 105] = \"shortwave_radiation_clear_sky\";\n Variable[Variable[\"global_tilted_irradiance\"] = 106] = \"global_tilted_irradiance\";\n Variable[Variable[\"global_tilted_irradiance_instant\"] = 107] = \"global_tilted_irradiance_instant\";\n Variable[Variable[\"ocean_current_velocity\"] = 108] = \"ocean_current_velocity\";\n Variable[Variable[\"ocean_current_direction\"] = 109] = \"ocean_current_direction\";\n Variable[Variable[\"cloud_base\"] = 110] = \"cloud_base\";\n Variable[Variable[\"cloud_top\"] = 111] = \"cloud_top\";\n Variable[Variable[\"mass_density\"] = 112] = \"mass_density\";\n Variable[Variable[\"boundary_layer_height\"] = 113] = \"boundary_layer_height\";\n Variable[Variable[\"formaldehyde\"] = 114] = \"formaldehyde\";\n Variable[Variable[\"glyoxal\"] = 115] = \"glyoxal\";\n Variable[Variable[\"non_methane_volatile_organic_compounds\"] = 116] = \"non_methane_volatile_organic_compounds\";\n Variable[Variable[\"pm10_wildfires\"] = 117] = \"pm10_wildfires\";\n Variable[Variable[\"peroxyacyl_nitrates\"] = 118] = \"peroxyacyl_nitrates\";\n Variable[Variable[\"secondary_inorganic_aerosol\"] = 119] = \"secondary_inorganic_aerosol\";\n Variable[Variable[\"residential_elementary_carbon\"] = 120] = \"residential_elementary_carbon\";\n Variable[Variable[\"total_elementary_carbon\"] = 121] = \"total_elementary_carbon\";\n Variable[Variable[\"pm2_5_total_organic_matter\"] = 122] = \"pm2_5_total_organic_matter\";\n Variable[Variable[\"sea_salt_aerosol\"] = 123] = \"sea_salt_aerosol\";\n Variable[Variable[\"nitrogen_monoxide\"] = 124] = \"nitrogen_monoxide\";\n Variable[Variable[\"thunderstorm_probability\"] = 125] = \"thunderstorm_probability\";\n Variable[Variable[\"rain_probability\"] = 126] = \"rain_probability\";\n Variable[Variable[\"freezing_rain_probability\"] = 127] = \"freezing_rain_probability\";\n Variable[Variable[\"ice_pellets_probability\"] = 128] = \"ice_pellets_probability\";\n Variable[Variable[\"snowfall_probability\"] = 129] = \"snowfall_probability\";\n Variable[Variable[\"carbon_dioxide\"] = 130] = \"carbon_dioxide\";\n Variable[Variable[\"methane\"] = 131] = \"methane\";\n Variable[Variable[\"sea_level_height_msl\"] = 132] = \"sea_level_height_msl\";\n Variable[Variable[\"sea_surface_temperature\"] = 133] = \"sea_surface_temperature\";\n Variable[Variable[\"invert_barometer_height\"] = 134] = \"invert_barometer_height\";\n Variable[Variable[\"hail\"] = 135] = \"hail\";\n Variable[Variable[\"albedo\"] = 136] = \"albedo\";\n Variable[Variable[\"precipitation_type\"] = 137] = \"precipitation_type\";\n Variable[Variable[\"convective_cloud_base\"] = 138] = \"convective_cloud_base\";\n Variable[Variable[\"convective_cloud_top\"] = 139] = \"convective_cloud_top\";\n Variable[Variable[\"snow_depth_water_equivalent\"] = 140] = \"snow_depth_water_equivalent\";\n Variable[Variable[\"secondary_swell_wave_height\"] = 141] = \"secondary_swell_wave_height\";\n Variable[Variable[\"secondary_swell_wave_period\"] = 142] = \"secondary_swell_wave_period\";\n Variable[Variable[\"secondary_swell_wave_peak_period\"] = 143] = \"secondary_swell_wave_peak_period\";\n Variable[Variable[\"secondary_swell_wave_direction\"] = 144] = \"secondary_swell_wave_direction\";\n Variable[Variable[\"tertiary_swell_wave_height\"] = 145] = \"tertiary_swell_wave_height\";\n Variable[Variable[\"tertiary_swell_wave_period\"] = 146] = \"tertiary_swell_wave_period\";\n Variable[Variable[\"tertiary_swell_wave_peak_period\"] = 147] = \"tertiary_swell_wave_peak_period\";\n Variable[Variable[\"tertiary_swell_wave_direction\"] = 148] = \"tertiary_swell_wave_direction\";\n})(Variable || (exports.Variable = Variable = {}));\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VariablesWithTime = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst variable_with_values_js_1 = require(\"./variable-with-values.js\");\nclass VariablesWithTime {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsVariablesWithTime(bb, obj) {\n return (obj || new VariablesWithTime()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsVariablesWithTime(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new VariablesWithTime()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n time() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n timeEnd() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n interval() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n variables(index, obj) {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new variable_with_values_js_1.VariableWithValues()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n variablesLength() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n}\nexports.VariablesWithTime = VariablesWithTime;\n","\"use strict\";\n// automatically generated by the FlatBuffers compiler, do not modify\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WeatherApiResponse = void 0;\n/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */\nconst flatbuffers = __importStar(require(\"flatbuffers\"));\nconst model_js_1 = require(\"./model.js\");\nconst variables_with_time_js_1 = require(\"./variables-with-time.js\");\nclass WeatherApiResponse {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n static getRootAsWeatherApiResponse(bb, obj) {\n return (obj || new WeatherApiResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n static getSizePrefixedRootAsWeatherApiResponse(bb, obj) {\n bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);\n return (obj || new WeatherApiResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n latitude() {\n const offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n longitude() {\n const offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n elevation() {\n const offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n generationTimeMilliseconds() {\n const offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;\n }\n locationId() {\n const offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0');\n }\n model() {\n const offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.readUint8(this.bb_pos + offset) : model_js_1.Model.undefined;\n }\n utcOffsetSeconds() {\n const offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n timezone(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 18);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n timezoneAbbreviation(optionalEncoding) {\n const offset = this.bb.__offset(this.bb_pos, 20);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n current(obj) {\n const offset = this.bb.__offset(this.bb_pos, 22);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n daily(obj) {\n const offset = this.bb.__offset(this.bb_pos, 24);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n hourly(obj) {\n const offset = this.bb.__offset(this.bb_pos, 26);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n minutely15(obj) {\n const offset = this.bb.__offset(this.bb_pos, 28);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n sixHourly(obj) {\n const offset = this.bb.__offset(this.bb_pos, 30);\n return offset ? (obj || new variables_with_time_js_1.VariablesWithTime()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n}\nexports.WeatherApiResponse = WeatherApiResponse;\n","import { ByteBuffer } from \"./byte-buffer.js\";\nimport { SIZEOF_SHORT, SIZE_PREFIX_LENGTH, SIZEOF_INT, FILE_IDENTIFIER_LENGTH } from \"./constants.js\";\nexport class Builder {\n /**\n * Create a FlatBufferBuilder.\n */\n constructor(opt_initial_size) {\n /** Minimum alignment encountered so far. */\n this.minalign = 1;\n /** The vtable for the current table. */\n this.vtable = null;\n /** The amount of fields we're actually using. */\n this.vtable_in_use = 0;\n /** Whether we are currently serializing a table. */\n this.isNested = false;\n /** Starting offset of the current struct/table. */\n this.object_start = 0;\n /** List of offsets of all vtables. */\n this.vtables = [];\n /** For the current vector being built. */\n this.vector_num_elems = 0;\n /** False omits default values from the serialized data */\n this.force_defaults = false;\n this.string_maps = null;\n this.text_encoder = new TextEncoder();\n let initial_size;\n if (!opt_initial_size) {\n initial_size = 1024;\n }\n else {\n initial_size = opt_initial_size;\n }\n /**\n * @type {ByteBuffer}\n * @private\n */\n this.bb = ByteBuffer.allocate(initial_size);\n this.space = initial_size;\n }\n clear() {\n this.bb.clear();\n this.space = this.bb.capacity();\n this.minalign = 1;\n this.vtable = null;\n this.vtable_in_use = 0;\n this.isNested = false;\n this.object_start = 0;\n this.vtables = [];\n this.vector_num_elems = 0;\n this.force_defaults = false;\n this.string_maps = null;\n }\n /**\n * In order to save space, fields that are set to their default value\n * don't get serialized into the buffer. Forcing defaults provides a\n * way to manually disable this optimization.\n *\n * @param forceDefaults true always serializes default values\n */\n forceDefaults(forceDefaults) {\n this.force_defaults = forceDefaults;\n }\n /**\n * Get the ByteBuffer representing the FlatBuffer. Only call this after you've\n * called finish(). The actual data starts at the ByteBuffer's current position,\n * not necessarily at 0.\n */\n dataBuffer() {\n return this.bb;\n }\n /**\n * Get the bytes representing the FlatBuffer. Only call this after you've\n * called finish().\n */\n asUint8Array() {\n return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());\n }\n /**\n * Prepare to write an element of `size` after `additional_bytes` have been\n * written, e.g. if you write a string, you need to align such the int length\n * field is aligned to 4 bytes, and the string data follows it directly. If all\n * you need to do is alignment, `additional_bytes` will be 0.\n *\n * @param size This is the of the new element to write\n * @param additional_bytes The padding size\n */\n prep(size, additional_bytes) {\n // Track the biggest thing we've ever aligned to.\n if (size > this.minalign) {\n this.minalign = size;\n }\n // Find the amount of alignment needed such that `size` is properly\n // aligned after `additional_bytes`\n const align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);\n // Reallocate the buffer if needed.\n while (this.space < align_size + size + additional_bytes) {\n const old_buf_size = this.bb.capacity();\n this.bb = Builder.growByteBuffer(this.bb);\n this.space += this.bb.capacity() - old_buf_size;\n }\n this.pad(align_size);\n }\n pad(byte_size) {\n for (let i = 0; i < byte_size; i++) {\n this.bb.writeInt8(--this.space, 0);\n }\n }\n writeInt8(value) {\n this.bb.writeInt8(this.space -= 1, value);\n }\n writeInt16(value) {\n this.bb.writeInt16(this.space -= 2, value);\n }\n writeInt32(value) {\n this.bb.writeInt32(this.space -= 4, value);\n }\n writeInt64(value) {\n this.bb.writeInt64(this.space -= 8, value);\n }\n writeFloat32(value) {\n this.bb.writeFloat32(this.space -= 4, value);\n }\n writeFloat64(value) {\n this.bb.writeFloat64(this.space -= 8, value);\n }\n /**\n * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int8` to add the buffer.\n */\n addInt8(value) {\n this.prep(1, 0);\n this.writeInt8(value);\n }\n /**\n * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int16` to add the buffer.\n */\n addInt16(value) {\n this.prep(2, 0);\n this.writeInt16(value);\n }\n /**\n * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int32` to add the buffer.\n */\n addInt32(value) {\n this.prep(4, 0);\n this.writeInt32(value);\n }\n /**\n * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `int64` to add the buffer.\n */\n addInt64(value) {\n this.prep(8, 0);\n this.writeInt64(value);\n }\n /**\n * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `float32` to add the buffer.\n */\n addFloat32(value) {\n this.prep(4, 0);\n this.writeFloat32(value);\n }\n /**\n * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param value The `float64` to add the buffer.\n */\n addFloat64(value) {\n this.prep(8, 0);\n this.writeFloat64(value);\n }\n addFieldInt8(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt8(value);\n this.slot(voffset);\n }\n }\n addFieldInt16(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt16(value);\n this.slot(voffset);\n }\n }\n addFieldInt32(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt32(value);\n this.slot(voffset);\n }\n }\n addFieldInt64(voffset, value, defaultValue) {\n if (this.force_defaults || value !== defaultValue) {\n this.addInt64(value);\n this.slot(voffset);\n }\n }\n addFieldFloat32(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat32(value);\n this.slot(voffset);\n }\n }\n addFieldFloat64(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat64(value);\n this.slot(voffset);\n }\n }\n addFieldOffset(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addOffset(value);\n this.slot(voffset);\n }\n }\n /**\n * Structs are stored inline, so nothing additional is being added. `d` is always 0.\n */\n addFieldStruct(voffset, value, defaultValue) {\n if (value != defaultValue) {\n this.nested(value);\n this.slot(voffset);\n }\n }\n /**\n * Structures are always stored inline, they need to be created right\n * where they're used. You'll get this assertion failure if you\n * created it elsewhere.\n */\n nested(obj) {\n if (obj != this.offset()) {\n throw new TypeError('FlatBuffers: struct must be serialized inline.');\n }\n }\n /**\n * Should not be creating any other object, string or vector\n * while an object is being constructed\n */\n notNested() {\n if (this.isNested) {\n throw new TypeError('FlatBuffers: object serialization must not be nested.');\n }\n }\n /**\n * Set the current vtable at `voffset` to the current location in the buffer.\n */\n slot(voffset) {\n if (this.vtable !== null)\n this.vtable[voffset] = this.offset();\n }\n /**\n * @returns Offset relative to the end of the buffer.\n */\n offset() {\n return this.bb.capacity() - this.space;\n }\n /**\n * Doubles the size of the backing ByteBuffer and copies the old data towards\n * the end of the new buffer (since we build the buffer backwards).\n *\n * @param bb The current buffer with the existing data\n * @returns A new byte buffer with the old data copied\n * to it. The data is located at the end of the buffer.\n *\n * uint8Array.set() formally takes {Array|ArrayBufferView}, so to pass\n * it a uint8Array we need to suppress the type check:\n * @suppress {checkTypes}\n */\n static growByteBuffer(bb) {\n const old_buf_size = bb.capacity();\n // Ensure we don't grow beyond what fits in an int.\n if (old_buf_size & 0xC0000000) {\n throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');\n }\n const new_buf_size = old_buf_size << 1;\n const nbb = ByteBuffer.allocate(new_buf_size);\n nbb.setPosition(new_buf_size - old_buf_size);\n nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);\n return nbb;\n }\n /**\n * Adds on offset, relative to where it will be written.\n *\n * @param offset The offset to add.\n */\n addOffset(offset) {\n this.prep(SIZEOF_INT, 0); // Ensure alignment is already done.\n this.writeInt32(this.offset() - offset + SIZEOF_INT);\n }\n /**\n * Start encoding a new object in the buffer. Users will not usually need to\n * call this directly. The FlatBuffers compiler will generate helper methods\n * that call this method internally.\n */\n startObject(numfields) {\n this.notNested();\n if (this.vtable == null) {\n this.vtable = [];\n }\n this.vtable_in_use = numfields;\n for (let i = 0; i < numfields; i++) {\n this.vtable[i] = 0; // This will push additional elements as needed\n }\n this.isNested = true;\n this.object_start = this.offset();\n }\n /**\n * Finish off writing the object that is under construction.\n *\n * @returns The offset to the object inside `dataBuffer`\n */\n endObject() {\n if (this.vtable == null || !this.isNested) {\n throw new Error('FlatBuffers: endObject called without startObject');\n }\n this.addInt32(0);\n const vtableloc = this.offset();\n // Trim trailing zeroes.\n let i = this.vtable_in_use - 1;\n // eslint-disable-next-line no-empty\n for (; i >= 0 && this.vtable[i] == 0; i--) { }\n const trimmed_size = i + 1;\n // Write out the current vtable.\n for (; i >= 0; i--) {\n // Offset relative to the start of the table.\n this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);\n }\n const standard_fields = 2; // The fields below:\n this.addInt16(vtableloc - this.object_start);\n const len = (trimmed_size + standard_fields) * SIZEOF_SHORT;\n this.addInt16(len);\n // Search for an existing vtable that matches the current one.\n let existing_vtable = 0;\n const vt1 = this.space;\n outer_loop: for (i = 0; i < this.vtables.length; i++) {\n const vt2 = this.bb.capacity() - this.vtables[i];\n if (len == this.bb.readInt16(vt2)) {\n for (let j = SIZEOF_SHORT; j < len; j += SIZEOF_SHORT) {\n if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {\n continue outer_loop;\n }\n }\n existing_vtable = this.vtables[i];\n break;\n }\n }\n if (existing_vtable) {\n // Found a match:\n // Remove the current vtable.\n this.space = this.bb.capacity() - vtableloc;\n // Point table to existing vtable.\n this.bb.writeInt32(this.space, existing_vtable - vtableloc);\n }\n else {\n // No match:\n // Add the location of the current vtable to the list of vtables.\n this.vtables.push(this.offset());\n // Point table to current vtable.\n this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);\n }\n this.isNested = false;\n return vtableloc;\n }\n /**\n * Finalize a buffer, poiting to the given `root_table`.\n */\n finish(root_table, opt_file_identifier, opt_size_prefix) {\n const size_prefix = opt_size_prefix ? SIZE_PREFIX_LENGTH : 0;\n if (opt_file_identifier) {\n const file_identifier = opt_file_identifier;\n this.prep(this.minalign, SIZEOF_INT +\n FILE_IDENTIFIER_LENGTH + size_prefix);\n if (file_identifier.length != FILE_IDENTIFIER_LENGTH) {\n throw new TypeError('FlatBuffers: file identifier must be length ' +\n FILE_IDENTIFIER_LENGTH);\n }\n for (let i = FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {\n this.writeInt8(file_identifier.charCodeAt(i));\n }\n }\n this.prep(this.minalign, SIZEOF_INT + size_prefix);\n this.addOffset(root_table);\n if (size_prefix) {\n this.addInt32(this.bb.capacity() - this.space);\n }\n this.bb.setPosition(this.space);\n }\n /**\n * Finalize a size prefixed buffer, pointing to the given `root_table`.\n */\n finishSizePrefixed(root_table, opt_file_identifier) {\n this.finish(root_table, opt_file_identifier, true);\n }\n /**\n * This checks a required field has been set in a given table that has\n * just been constructed.\n */\n requiredField(table, field) {\n const table_start = this.bb.capacity() - table;\n const vtable_start = table_start - this.bb.readInt32(table_start);\n const ok = field < this.bb.readInt16(vtable_start) &&\n this.bb.readInt16(vtable_start + field) != 0;\n // If this fails, the caller will show what field needs to be set.\n if (!ok) {\n throw new TypeError('FlatBuffers: field ' + field + ' must be set');\n }\n }\n /**\n * Start a new array/vector of objects. Users usually will not call\n * this directly. The FlatBuffers compiler will create a start/end\n * method for vector types in generated code.\n *\n * @param elem_size The size of each element in the array\n * @param num_elems The number of elements in the array\n * @param alignment The alignment of the array\n */\n startVector(elem_size, num_elems, alignment) {\n this.notNested();\n this.vector_num_elems = num_elems;\n this.prep(SIZEOF_INT, elem_size * num_elems);\n this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.\n }\n /**\n * Finish off the creation of an array and all its elements. The array must be\n * created with `startVector`.\n *\n * @returns The offset at which the newly created array\n * starts.\n */\n endVector() {\n this.writeInt32(this.vector_num_elems);\n return this.offset();\n }\n /**\n * Encode the string `s` in the buffer using UTF-8. If the string passed has\n * already been seen, we return the offset of the already written string\n *\n * @param s The string to encode\n * @return The offset in the buffer where the encoded string starts\n */\n createSharedString(s) {\n if (!s) {\n return 0;\n }\n if (!this.string_maps) {\n this.string_maps = new Map();\n }\n if (this.string_maps.has(s)) {\n return this.string_maps.get(s);\n }\n const offset = this.createString(s);\n this.string_maps.set(s, offset);\n return offset;\n }\n /**\n * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed\n * instead of a string, it is assumed to contain valid UTF-8 encoded data.\n *\n * @param s The string to encode\n * @return The offset in the buffer where the encoded string starts\n */\n createString(s) {\n if (s === null || s === undefined) {\n return 0;\n }\n let utf8;\n if (s instanceof Uint8Array) {\n utf8 = s;\n }\n else {\n utf8 = this.text_encoder.encode(s);\n }\n this.addInt8(0);\n this.startVector(1, utf8.length, 1);\n this.bb.setPosition(this.space -= utf8.length);\n this.bb.bytes().set(utf8, this.space);\n return this.endVector();\n }\n /**\n * Create a byte vector.\n *\n * @param v The bytes to add\n * @returns The offset in the buffer where the byte vector starts\n */\n createByteVector(v) {\n if (v === null || v === undefined) {\n return 0;\n }\n this.startVector(1, v.length, 1);\n this.bb.setPosition(this.space -= v.length);\n this.bb.bytes().set(v, this.space);\n return this.endVector();\n }\n /**\n * A helper function to pack an object\n *\n * @returns offset of obj\n */\n createObjectOffset(obj) {\n if (obj === null) {\n return 0;\n }\n if (typeof obj === 'string') {\n return this.createString(obj);\n }\n else {\n return obj.pack(this);\n }\n }\n /**\n * A helper function to pack a list of object\n *\n * @returns list of offsets of each non null object\n */\n createObjectOffsetList(list) {\n const ret = [];\n for (let i = 0; i < list.length; ++i) {\n const val = list[i];\n if (val !== null) {\n ret.push(this.createObjectOffset(val));\n }\n else {\n throw new TypeError('FlatBuffers: Argument for createObjectOffsetList cannot contain null.');\n }\n }\n return ret;\n }\n createStructOffsetList(list, startFunc) {\n startFunc(this, list.length);\n this.createObjectOffsetList(list.slice().reverse());\n return this.endVector();\n }\n}\n","import { FILE_IDENTIFIER_LENGTH, SIZEOF_INT } from \"./constants.js\";\nimport { int32, isLittleEndian, float32, float64 } from \"./utils.js\";\nimport { Encoding } from \"./encoding.js\";\nexport class ByteBuffer {\n /**\n * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)\n */\n constructor(bytes_) {\n this.bytes_ = bytes_;\n this.position_ = 0;\n this.text_decoder_ = new TextDecoder();\n }\n /**\n * Create and allocate a new ByteBuffer with a given size.\n */\n static allocate(byte_size) {\n return new ByteBuffer(new Uint8Array(byte_size));\n }\n clear() {\n this.position_ = 0;\n }\n /**\n * Get the underlying `Uint8Array`.\n */\n bytes() {\n return this.bytes_;\n }\n /**\n * Get the buffer's position.\n */\n position() {\n return this.position_;\n }\n /**\n * Set the buffer's position.\n */\n setPosition(position) {\n this.position_ = position;\n }\n /**\n * Get the buffer's capacity.\n */\n capacity() {\n return this.bytes_.length;\n }\n readInt8(offset) {\n return this.readUint8(offset) << 24 >> 24;\n }\n readUint8(offset) {\n return this.bytes_[offset];\n }\n readInt16(offset) {\n return this.readUint16(offset) << 16 >> 16;\n }\n readUint16(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8;\n }\n readInt32(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;\n }\n readUint32(offset) {\n return this.readInt32(offset) >>> 0;\n }\n readInt64(offset) {\n return BigInt.asIntN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));\n }\n readUint64(offset) {\n return BigInt.asUintN(64, BigInt(this.readUint32(offset)) + (BigInt(this.readUint32(offset + 4)) << BigInt(32)));\n }\n readFloat32(offset) {\n int32[0] = this.readInt32(offset);\n return float32[0];\n }\n readFloat64(offset) {\n int32[isLittleEndian ? 0 : 1] = this.readInt32(offset);\n int32[isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);\n return float64[0];\n }\n writeInt8(offset, value) {\n this.bytes_[offset] = value;\n }\n writeUint8(offset, value) {\n this.bytes_[offset] = value;\n }\n writeInt16(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n }\n writeUint16(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n }\n writeInt32(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n }\n writeUint32(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n }\n writeInt64(offset, value) {\n this.writeInt32(offset, Number(BigInt.asIntN(32, value)));\n this.writeInt32(offset + 4, Number(BigInt.asIntN(32, value >> BigInt(32))));\n }\n writeUint64(offset, value) {\n this.writeUint32(offset, Number(BigInt.asUintN(32, value)));\n this.writeUint32(offset + 4, Number(BigInt.asUintN(32, value >> BigInt(32))));\n }\n writeFloat32(offset, value) {\n float32[0] = value;\n this.writeInt32(offset, int32[0]);\n }\n writeFloat64(offset, value) {\n float64[0] = value;\n this.writeInt32(offset, int32[isLittleEndian ? 0 : 1]);\n this.writeInt32(offset + 4, int32[isLittleEndian ? 1 : 0]);\n }\n /**\n * Return the file identifier. Behavior is undefined for FlatBuffers whose\n * schema does not include a file_identifier (likely points at padding or the\n * start of a the root vtable).\n */\n getBufferIdentifier() {\n if (this.bytes_.length < this.position_ + SIZEOF_INT +\n FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: ByteBuffer is too short to contain an identifier.');\n }\n let result = \"\";\n for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {\n result += String.fromCharCode(this.readInt8(this.position_ + SIZEOF_INT + i));\n }\n return result;\n }\n /**\n * Look up a field in the vtable, return an offset into the object, or 0 if the\n * field is not present.\n */\n __offset(bb_pos, vtable_offset) {\n const vtable = bb_pos - this.readInt32(bb_pos);\n return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;\n }\n /**\n * Initialize any Table-derived type to point to the union at the given offset.\n */\n __union(t, offset) {\n t.bb_pos = offset + this.readInt32(offset);\n t.bb = this;\n return t;\n }\n /**\n * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.\n * This allocates a new string and converts to wide chars upon each access.\n *\n * To avoid the conversion to string, pass Encoding.UTF8_BYTES as the\n * \"optionalEncoding\" argument. This is useful for avoiding conversion when\n * the data will just be packaged back up in another FlatBuffer later on.\n *\n * @param offset\n * @param opt_encoding Defaults to UTF16_STRING\n */\n __string(offset, opt_encoding) {\n offset += this.readInt32(offset);\n const length = this.readInt32(offset);\n offset += SIZEOF_INT;\n const utf8bytes = this.bytes_.subarray(offset, offset + length);\n if (opt_encoding === Encoding.UTF8_BYTES)\n return utf8bytes;\n else\n return this.text_decoder_.decode(utf8bytes);\n }\n /**\n * Handle unions that can contain string as its member, if a Table-derived type then initialize it,\n * if a string then return a new one\n *\n * WARNING: strings are immutable in JS so we can't change the string that the user gave us, this\n * makes the behaviour of __union_with_string different compared to __union\n */\n __union_with_string(o, offset) {\n if (typeof o === 'string') {\n return this.__string(offset);\n }\n return this.__union(o, offset);\n }\n /**\n * Retrieve the relative offset stored at \"offset\"\n */\n __indirect(offset) {\n return offset + this.readInt32(offset);\n }\n /**\n * Get the start of data of a vector whose offset is stored at \"offset\" in this object.\n */\n __vector(offset) {\n return offset + this.readInt32(offset) + SIZEOF_INT; // data starts after the length\n }\n /**\n * Get the length of a vector whose offset is stored at \"offset\" in this object.\n */\n __vector_len(offset) {\n return this.readInt32(offset + this.readInt32(offset));\n }\n __has_identifier(ident) {\n if (ident.length != FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: file identifier must be length ' +\n FILE_IDENTIFIER_LENGTH);\n }\n for (let i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {\n if (ident.charCodeAt(i) != this.readInt8(this.position() + SIZEOF_INT + i)) {\n return false;\n }\n }\n return true;\n }\n /**\n * A helper function for generating list for obj api\n */\n createScalarList(listAccessor, listLength) {\n const ret = [];\n for (let i = 0; i < listLength; ++i) {\n const val = listAccessor(i);\n if (val !== null) {\n ret.push(val);\n }\n }\n return ret;\n }\n /**\n * A helper function for generating list for obj api\n * @param listAccessor function that accepts an index and return data at that index\n * @param listLength listLength\n * @param res result list\n */\n createObjList(listAccessor, listLength) {\n const ret = [];\n for (let i = 0; i < listLength; ++i) {\n const val = listAccessor(i);\n if (val !== null) {\n ret.push(val.unpack());\n }\n }\n return ret;\n }\n}\n","export const SIZEOF_SHORT = 2;\nexport const SIZEOF_INT = 4;\nexport const FILE_IDENTIFIER_LENGTH = 4;\nexport const SIZE_PREFIX_LENGTH = 4;\n","export var Encoding;\n(function (Encoding) {\n Encoding[Encoding[\"UTF8_BYTES\"] = 1] = \"UTF8_BYTES\";\n Encoding[Encoding[\"UTF16_STRING\"] = 2] = \"UTF16_STRING\";\n})(Encoding || (Encoding = {}));\n","export { SIZEOF_SHORT } from './constants.js';\nexport { SIZEOF_INT } from './constants.js';\nexport { FILE_IDENTIFIER_LENGTH } from './constants.js';\nexport { SIZE_PREFIX_LENGTH } from './constants.js';\nexport { int32, float32, float64, isLittleEndian } from './utils.js';\nexport { Encoding } from './encoding.js';\nexport { Builder } from './builder.js';\nexport { ByteBuffer } from './byte-buffer.js';\n","export const int32 = new Int32Array(2);\nexport const float32 = new Float32Array(int32.buffer);\nexport const float64 = new Float64Array(int32.buffer);\nexport const isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchWeatherApi = fetchWeatherApi;\nconst flatbuffers_1 = require(\"flatbuffers\");\nconst weather_api_response_1 = require(\"@openmeteo/sdk/weather-api-response\");\nconst sleep = (ms) => new Promise(r => setTimeout(r, ms));\nfunction fetchRetried(url_1) {\n return __awaiter(this, arguments, void 0, function* (url, retries = 3, backoffFactor = 0.5, backoffMax = 2, fetchOptions = {}) {\n const statusToRetry = [500, 502, 504];\n const statusWithJsonError = [400, 429];\n let currentTry = 0;\n let response = yield fetch(url, fetchOptions);\n while (statusToRetry.includes(response.status)) {\n currentTry++;\n if (currentTry >= retries) {\n throw new Error(response.statusText);\n }\n const sleepMs = Math.min(backoffFactor * Math.pow(2, currentTry), backoffMax) * 1000;\n yield sleep(sleepMs);\n response = yield fetch(url, fetchOptions);\n }\n if (statusWithJsonError.includes(response.status)) {\n const json = yield response.json();\n if ('reason' in json) {\n throw new Error(json.reason);\n }\n throw new Error(response.statusText);\n }\n return response;\n });\n}\n/**\n * Retrieve data from the Open-Meteo weather API\n *\n * @param {string} url Server and endpoint. E.g. \"https://api.open-meteo.com/v1/forecast\"\n * @param {any} params URL parameter as an object\n * @param {number} [retries=3] Number of retries in case of an server error\n * @param {number} [backoffFactor=0.2] Exponential backoff factor to increase wait time after each retry\n * @param {number} [backoffMax=2] Maximum wait time between retries\n * @param {RequestInit} [fetchOptions={}] Additional fetch options such as headers, signal, etc.\n * @returns {Promise}\n */\nfunction fetchWeatherApi(url_1, params_1) {\n return __awaiter(this, arguments, void 0, function* (url, params, retries = 3, backoffFactor = 0.2, backoffMax = 2, fetchOptions = {}) {\n const urlParams = new URLSearchParams(params);\n urlParams.set('format', 'flatbuffers');\n const response = yield fetchRetried(`${url}?${urlParams.toString()}`, retries, backoffFactor, backoffMax, fetchOptions);\n const fb = new flatbuffers_1.ByteBuffer(new Uint8Array(yield response.arrayBuffer()));\n const results = [];\n let pos = 0;\n while (pos < fb.capacity()) {\n fb.setPosition(pos);\n const len = fb.readInt32(fb.position());\n results.push(weather_api_response_1.WeatherApiResponse.getSizePrefixedRootAsWeatherApiResponse(fb));\n pos += len + 4;\n }\n return results;\n });\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport HSL from \"./hsl\";\nvar Scheme = /** @class */ (function () {\n function Scheme(initial) {\n this.primary = HSL.fromHex(initial);\n }\n Scheme.prototype.toString = function () {\n var values = this.colors.map(function (color) { return color.toString(16); }).join(\",\");\n return \"\".concat(this.constructor.name, \": \").concat(values);\n };\n return Scheme;\n}());\nexport { Scheme };\nvar Analogous = /** @class */ (function (_super) {\n __extends(Analogous, _super);\n function Analogous(initial) {\n var _this = _super.call(this, initial) || this;\n var left1 = new HSL(_this.primary.hue - 30, _this.primary.saturation, _this.primary.lightness);\n var left2 = new HSL(_this.primary.hue - 15, _this.primary.saturation, _this.primary.lightness);\n var right1 = new HSL(_this.primary.hue + 15, _this.primary.saturation, _this.primary.lightness);\n var right2 = new HSL(_this.primary.hue + 30, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n left1.toHex(),\n left2.toHex(),\n initial,\n right1.toHex(),\n right2.toHex()\n ];\n return _this;\n }\n return Analogous;\n}(Scheme));\nexport { Analogous };\nvar Monochromatic = /** @class */ (function (_super) {\n __extends(Monochromatic, _super);\n function Monochromatic(initial) {\n var _this = _super.call(this, initial) || this;\n var delta = _this.primary.lightness / 6;\n _this.colors = [\n initial,\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 2).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 3).toHex(),\n new HSL(_this.primary.hue, _this.primary.saturation, _this.primary.lightness - delta * 4).toHex()\n ];\n return _this;\n }\n return Monochromatic;\n}(Scheme));\nexport { Monochromatic };\nvar SplitComplementary = /** @class */ (function (_super) {\n __extends(SplitComplementary, _super);\n function SplitComplementary(initial) {\n var _this = _super.call(this, initial) || this;\n var complement = new HSL((_this.primary.hue + 180) % 360, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n new HSL(complement.hue - 30, complement.saturation, complement.lightness).toHex(),\n new HSL(complement.hue + 30, complement.saturation, complement.lightness).toHex()\n ];\n return _this;\n }\n return SplitComplementary;\n}(Scheme));\nexport { SplitComplementary };\nvar Triadic = /** @class */ (function (_super) {\n __extends(Triadic, _super);\n function Triadic(initial) {\n var _this = _super.call(this, initial) || this;\n _this.colors = [\n initial,\n new HSL(_this.primary.hue - 120, _this.primary.saturation, _this.primary.lightness).toHex(),\n new HSL(_this.primary.hue + 120, _this.primary.saturation, _this.primary.lightness).toHex()\n ];\n return _this;\n }\n return Triadic;\n}(Scheme));\nexport { Triadic };\nvar Tetradic = /** @class */ (function (_super) {\n __extends(Tetradic, _super);\n function Tetradic(initial) {\n var _this = _super.call(this, initial) || this;\n var second = new HSL(_this.primary.hue + 45, _this.primary.saturation, _this.primary.lightness);\n var complement = new HSL(_this.primary.hue + 180, _this.primary.saturation, _this.primary.lightness);\n var secondComplement = new HSL(second.hue + 180, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n second.toHex(),\n complement.toHex(),\n secondComplement.toHex()\n ];\n return _this;\n }\n return Tetradic;\n}(Scheme));\nexport { Tetradic };\nvar Square = /** @class */ (function (_super) {\n __extends(Square, _super);\n function Square(initial) {\n var _this = _super.call(this, initial) || this;\n var second = new HSL(_this.primary.hue + 90, _this.primary.saturation, _this.primary.lightness);\n var third = new HSL(_this.primary.hue + 180, _this.primary.saturation, _this.primary.lightness);\n var fourth = new HSL(second.hue + 270, _this.primary.saturation, _this.primary.lightness);\n _this.colors = [\n initial,\n second.toHex(),\n third.toHex(),\n fourth.toHex()\n ];\n return _this;\n }\n return Square;\n}(Scheme));\nexport { Square };\n","import SandPainter from \"./sand-painter\";\nvar Crack = /** @class */ (function () {\n function Crack(state, x, y, angle) {\n this.x = 0;\n this.y = 0;\n this.angle = 0;\n this.state = state;\n this.painter = new SandPainter(this);\n this.start(x, y, angle);\n }\n Crack.prototype.start = function (x, y, angle) {\n var random = crypto.getRandomValues(new Uint8Array(2));\n this.x = x + .61 * Math.cos(angle * Math.PI / 180);\n this.y = y + .61 * Math.sin(angle * Math.PI / 180);\n var flip = (random[0] / 256) > 0.5;\n this.angle = angle + (90 + Math.floor((random[1] / 256) * 4.1 - 2)) * (flip ? -1 : 1);\n };\n Crack.prototype.draw = function () {\n var random = crypto.getRandomValues(new Uint8Array(2));\n this.x += .42 * Math.cos(this.angle * Math.PI / 180);\n this.y += .42 * Math.sin(this.angle * Math.PI / 180);\n var fuzzX = this.x + (random[0] / 256 * .66 - .33);\n var fuzzY = this.y + (random[1] / 256 * .66 - .33);\n var context = this.state.canvas.getContext(\"2d\");\n context.fillStyle = \"#000\";\n context.fillRect(fuzzX, fuzzY, 1, 1);\n this.painter.render();\n var x = Math.floor(this.x);\n var y = Math.floor(this.y);\n if (this.state.isWithinBoundary(x, y)) {\n var angle = this.state.grid[x][y];\n if (angle > 10000) {\n this.state.grid[x][y] = Math.floor(this.angle);\n this.state.seeds.push({ x: x, y: y });\n }\n else if (this.state.grid[x][y] != Math.floor(this.angle)) {\n var entry = this.state.getNewEntry();\n this.start(entry.x, entry.y, entry.angle);\n }\n }\n else {\n var entry = this.state.getNewEntry();\n this.start(entry.x, entry.y, entry.angle);\n this.state.addCrack();\n }\n };\n return Crack;\n}());\nexport default Crack;\n","import RGB from \"./rgb\";\nvar HSL = /** @class */ (function () {\n function HSL(hue, saturation, lightness) {\n this.hue = (hue + 360) % 360;\n this.saturation = saturation;\n this.lightness = lightness;\n }\n // https://en.wikipedia.org/wiki/HSL_and_HSV\n HSL.fromRgb = function (rgb) {\n var redValue = rgb.red / 255, greenValue = rgb.green / 255, blueValue = rgb.blue / 255, max = Math.max(redValue, greenValue, blueValue), min = Math.min(redValue, greenValue, blueValue), chroma = max - min, lightness = .5 * (max + min), saturation = 1 - (3 / (redValue + greenValue + blueValue)) * Math.min(redValue, greenValue, blueValue);\n var huePrime = 0;\n if (chroma != 0) {\n if (redValue == max)\n huePrime = ((greenValue - blueValue) / chroma) % 6;\n else if (greenValue == max)\n huePrime = ((blueValue - redValue) / chroma) + 2;\n else\n huePrime = ((redValue - greenValue) / chroma) + 4;\n }\n return new HSL(huePrime * 60, saturation, lightness);\n };\n HSL.fromHex = function (color) {\n return HSL.fromRgb(RGB.fromHex(color));\n };\n HSL.prototype.toHex = function () {\n return RGB.fromHsl(this).toHex();\n };\n return HSL;\n}());\nexport default HSL;\n","var RGB = /** @class */ (function () {\n function RGB(red, green, blue) {\n this.red = Math.floor(red < 0 ? 0 : red > 255 ? 255 : red);\n this.green = Math.floor(green < 0 ? 0 : green > 255 ? 255 : green);\n this.blue = Math.floor(blue < 0 ? 0 : blue > 255 ? 255 : blue);\n }\n RGB.prototype.toHex = function () {\n return (this.red << 16) + (this.green << 8) + this.blue;\n };\n // https://en.wikipedia.org/wiki/HSL_and_HSV\n RGB.fromHsl = function (hsl) {\n var red = 0, green = 0, blue = 0;\n var chroma = (1 - Math.abs(2 * hsl.lightness - 1)) * hsl.saturation, range = hsl.hue / 60, intermediate = chroma * (1 - Math.abs(range % 2 - 1)), match = hsl.lightness - chroma / 2;\n if (range >= 0 && range < 1) {\n red = chroma;\n green = intermediate;\n }\n else if (range >= 1 && range < 2) {\n red = intermediate;\n green = chroma;\n }\n else if (range >= 2 && range < 3) {\n green = chroma;\n blue = intermediate;\n }\n else if (range >= 3 && range < 4) {\n green = intermediate;\n blue = chroma;\n }\n else if (range >= 4 && range < 5) {\n red = intermediate;\n blue = chroma;\n }\n else if (range >= 5 && range < 6) {\n red = chroma;\n blue = intermediate;\n }\n return new RGB((red + match) * 255, (green + match) * 255, (blue + match) * 255);\n };\n RGB.fromHex = function (color) {\n var red = color >> 16;\n var green = (color - (red << 16)) >> 8;\n var blue = color - (red << 16) - (green << 8);\n return new RGB(red, green, blue);\n };\n return RGB;\n}());\nexport default RGB;\n","var SandPainter = /** @class */ (function () {\n function SandPainter(crack) {\n this.crack = crack;\n this.color = this.crack.state.getNextColor();\n this.gain = Math.random() / 10;\n }\n SandPainter.prototype.render = function () {\n var state = this.crack.state, x = this.crack.x, y = this.crack.y, angle = this.crack.angle;\n var open = true, endX = x, endY = y;\n while (open) {\n endX += .81 * Math.sin(angle * Math.PI / 180);\n endY -= .81 * Math.cos(angle * Math.PI / 180);\n var gridX = Math.floor(endX);\n var gridY = Math.floor(endY);\n if (state.isWithinBoundary(gridX, gridY)) {\n open = state.grid[gridX][gridY] > 10000;\n }\n else {\n open = false;\n }\n }\n this.gain += (Math.random() / 10 - .05);\n if (this.gain < 0)\n this.gain = 0;\n if (this.gain > 1)\n this.gain = 1;\n var grains = 64;\n var hex = this.color.toString(16);\n var w = this.gain / (grains - 1); // some kind of multiplier\n var context = state.canvas.getContext(\"2d\");\n for (var i = 0; i < grains; i++) {\n var alpha = Math.floor((.1 - i / (grains * 10)) * 255);\n var paintX = x + (endX - x) * Math.sin(Math.sin(i * w));\n var paintY = y + (endY - y) * Math.sin(Math.sin(i * w));\n context.fillStyle = \"#\".concat(hex.padStart(6, \"0\")).concat(alpha.toString(16).padStart(2, \"0\"));\n context.fillRect(paintX, paintY, 1, 1);\n }\n };\n return SandPainter;\n}());\nexport default SandPainter;\n","import Crack from \"./crack\";\nvar State = /** @class */ (function () {\n function State(colors, maxCracks, canvas) {\n this.canvasColors = [\n \"rgb(27 27 27 / 90%)\",\n \"rgb(90 90 90 / 90%)\",\n \"rgb(126 126 126 / 90%)\",\n \"rgb(180 180 180 / 90%)\",\n \"rgb(255 255 255 / 90%)\",\n \"rgb(180 180 180 / 90%)\",\n \"rgb(126 126 126 / 90%)\",\n \"rgb(90 90 90 / 90%)\"\n ];\n this.canvasIndex = 0;\n this.colorIndex = 0;\n this.canvas = canvas;\n this.maxCracks = maxCracks;\n this.grid = [];\n this.colors = colors;\n this.cracks = [];\n this.seeds = [];\n this.init();\n }\n State.prototype.init = function (colors) {\n if (colors)\n this.colors = colors;\n this.cracks.length = 0;\n this.grid.length = 0;\n this.seeds.length = 0;\n this.colorIndex = 0;\n var height = this.canvas.height;\n var width = this.canvas.width;\n var context = this.canvas.getContext(\"2d\");\n context.fillStyle = this.canvasColors[this.canvasIndex++ % this.canvasColors.length];\n context.fillRect(0, 0, width, height);\n for (var x = 0; x < width; x++) {\n this.grid[x] = [];\n for (var y = 0; y < height; y++) {\n this.grid[x][y] = 10001;\n }\n }\n var random = crypto.getRandomValues(new Uint8Array(9));\n for (var i = 0; i < 9; i += 3) {\n var x = Math.floor(random[i] * width / 256);\n var y = Math.floor(random[i + 1] * height / 256);\n var angle = Math.floor(random[i + 2] * 360 / 256);\n this.cracks.push(new Crack(this, x, y, angle));\n this.grid[x][y] = angle;\n }\n };\n State.prototype.addCrack = function () {\n if (this.cracks.length >= this.maxCracks)\n return;\n var _a = this.getNewEntry(), x = _a.x, y = _a.y, angle = _a.angle;\n this.cracks.push(new Crack(this, x, y, angle));\n };\n State.prototype.getNextColor = function () {\n return this.colors[this.colorIndex++ % this.colors.length];\n };\n State.prototype.isWithinBoundary = function (x, y) {\n return x >= 0 && x < this.canvas.width && y >= 0 && y < this.canvas.height;\n };\n State.prototype.getNewEntry = function () {\n var random = crypto.getRandomValues(new Uint8Array(4));\n if (!this.seeds.length) {\n var x = Math.floor(random[0] * this.canvas.width / 256);\n var y = Math.floor(random[1] * this.canvas.height / 256);\n var angle = this.grid[x][y];\n if (angle > 10000) {\n angle = Math.floor(random[2] * 360 / 256);\n this.grid[x][y] = angle;\n }\n return { x: x, y: y, angle: angle };\n }\n var randomIndex = Math.floor(random[3] * this.seeds.length / 256);\n var entry = this.seeds.splice(randomIndex, 1)[0];\n return {\n x: entry.x,\n y: entry.y,\n angle: this.grid[entry.x][entry.y]\n };\n };\n return State;\n}());\nexport default State;\n","// TS attempt of http://www.complexification.net/gallery/machines/substrate/index.php by laniaung.me\nimport State from \"./state\";\nimport { Analogous, Monochromatic, SplitComplementary, Square, Tetradic, Triadic } from \"./color-schemes\";\nvar Substrate = /** @class */ (function () {\n function Substrate(maxCracks, colors) {\n if (!(colors === null || colors === void 0 ? void 0 : colors.length))\n colors = [0x3a1e3e, 0x7c2d3b, 0xb94f3c, 0xf4a462, 0xf9c54e]; // https://colormagic.app/palette/671eeb6c42273fc4c1bb1ac7\n var canvas = document.createElement(\"canvas\");\n canvas.width = document.body.clientWidth;\n canvas.height = document.body.clientHeight;\n document.body.appendChild(canvas);\n this.state = new State(colors, maxCracks, canvas);\n this.init();\n }\n Substrate.prototype.init = function () {\n var me = this;\n var draw = function () {\n for (var _i = 0, _a = me.state.cracks; _i < _a.length; _i++) {\n var crack = _a[_i];\n crack.draw();\n }\n requestAnimationFrame(draw);\n };\n setInterval(function () { return me.state.init(me.getRandomColorScheme()); }, 120 * 1000);\n draw();\n };\n Substrate.prototype.getRandomColorScheme = function () {\n var color = Math.floor(Math.random() * Math.pow(256, 3));\n var scheme;\n switch (Math.floor(Math.random() * 6)) {\n case 1:\n scheme = new Monochromatic(color);\n break;\n case 2:\n scheme = new SplitComplementary(color);\n break;\n case 3:\n scheme = new Triadic(color);\n break;\n case 4:\n scheme = new Tetradic(color);\n break;\n case 5:\n scheme = new Square(color);\n break;\n default:\n scheme = new Analogous(color);\n }\n console.info(scheme.toString());\n return scheme.colors;\n };\n return Substrate;\n}());\nexport default Substrate;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { fetchWeatherApi } from \"openmeteo\";\nvar Weather = /** @class */ (function () {\n function Weather(latitude, longitude) {\n this.apiUrl = \"https://api.open-meteo.com/v1/forecast\";\n this.dailyVariables = [\"temperature_2m_max\", \"temperature_2m_min\", \"sunrise\", \"sunset\", \"uv_index_max\", \"precipitation_sum\", \"precipitation_hours\", \"wind_speed_10m_max\", \"wind_gusts_10m_max\", \"wind_direction_10m_dominant\"];\n this.hourlyVariables = [\"temperature_2m\", \"precipitation\", \"precipitation_probability\"];\n this.currentVariables = [\"temperature_2m\", \"relative_humidity_2m\", \"apparent_temperature\", \"precipitation\", \"wind_speed_10m\", \"wind_gusts_10m\", \"wind_direction_10m\", \"cloud_cover\"];\n this.hourly = [];\n this.daily = [];\n this.options = new WeatherOptions(latitude !== null && latitude !== void 0 ? latitude : 47.61002138071677, longitude !== null && longitude !== void 0 ? longitude : -122.17906310779568);\n var me = this;\n var time = document.getElementById(\"time-value\");\n time.textContent = new Date().toLocaleTimeString(\"en-US\", { hour12: false, timeStyle: \"short\" });\n setInterval(function () { return time.textContent = new Date().toLocaleTimeString(\"en-US\", { hour12: false, timeStyle: \"short\" }); }, 15000);\n setInterval(function () { return me.fetchWeather().then(function () { return me.setDisplay(); }); }, 300000);\n me.fetchWeather().then(function () { return me.setDisplay(); });\n }\n Weather.prototype.fetchWeather = function () {\n return __awaiter(this, void 0, void 0, function () {\n var me, parameters, needsUpdate, responses, _i, responses_1, response, current, hourly, daily;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n me = this;\n parameters = __assign({}, me.options);\n needsUpdate = me.needsUpdate(parameters);\n if (!needsUpdate)\n return [2 /*return*/];\n console.info(\"Getting weather\", parameters);\n return [4 /*yield*/, fetchWeatherApi(me.apiUrl, parameters)];\n case 1:\n responses = _a.sent();\n for (_i = 0, responses_1 = responses; _i < responses_1.length; _i++) {\n response = responses_1[_i];\n current = response.current();\n hourly = response.hourly();\n daily = response.daily();\n if (current != null)\n me.current = new CurrentWeather(current);\n if (hourly != null)\n me.setHourlyData(hourly);\n if (daily != null)\n me.setDailyData(daily);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n Weather.prototype.needsUpdate = function (parameters) {\n var me = this;\n if (!me.lastFetched) {\n parameters[\"daily\"] = me.dailyVariables;\n parameters[\"hourly\"] = me.hourlyVariables;\n parameters[\"current\"] = me.currentVariables;\n me.lastFetched = new LastFetched();\n return true;\n }\n else {\n // Weather data is updated every 15 minutes starting at :00 but just wait 15 minutes for an update\n if (me.lastFetched.minutesSinceCurrent() >= 15) {\n var now = new Date();\n // Make sure data is over 5 minutes old at least\n if ((now.getTime() - me.lastFetched.current.getTime()) > 300000) {\n parameters[\"current\"] = me.currentVariables;\n me.lastFetched.current = new Date();\n return true;\n }\n }\n // Reasonable-ish timers?\n if (me.lastFetched.hoursSinceHourly() > 3) {\n parameters[\"hourly\"] = me.hourlyVariables;\n me.lastFetched.hourly = new Date();\n return true;\n }\n if (me.lastFetched.hoursSinceDaily() > 8) {\n parameters[\"daily\"] = me.dailyVariables;\n me.lastFetched.daily = new Date();\n return true;\n }\n }\n return false;\n };\n Weather.prototype.setHourlyData = function (hourly) {\n var length = Number(hourly.timeEnd() - hourly.time()) / hourly.interval();\n var temperatures = hourly.variables(0).valuesArray();\n var precipitationTotals = hourly.variables(1).valuesArray();\n var precipitationProbabilities = hourly.variables(2).valuesArray();\n this.hourly.length = 0;\n for (var i = 0; i < length; i++) {\n this.hourly.push({\n time: new Date(new Date().getTime() + i * 3600000),\n temperature: temperatures[i],\n precipitation: precipitationTotals[i],\n precipitationProbability: precipitationProbabilities[i]\n });\n }\n };\n Weather.prototype.setDailyData = function (daily) {\n var length = Number(daily.timeEnd() - daily.time()) / daily.interval();\n var maxTemperatures = daily.variables(0).valuesArray();\n var minTemperatures = daily.variables(1).valuesArray();\n var sunrise = daily.variables(2);\n var sunset = daily.variables(3);\n var maxUVs = daily.variables(4).valuesArray();\n var precipitationTotals = daily.variables(5).valuesArray();\n var precipitationHours = daily.variables(6).valuesArray();\n var maxWindSpeeds = daily.variables(7).valuesArray();\n var maxWindGusts = daily.variables(8).valuesArray();\n var prominentWindDirections = daily.variables(9).valuesArray();\n this.daily.length = 0;\n for (var i = 0; i < length; i++) {\n var weather = new DailyWeather();\n weather.time = new Date((Number(daily.time()) + i * daily.interval()) * 1000);\n weather.maxTemperature = maxTemperatures[i];\n weather.minTemperature = minTemperatures[i];\n weather.sunrise = new Date((Number(sunrise.valuesInt64(i))) * 1000);\n weather.sunset = new Date((Number(sunset.valuesInt64(i))) * 1000);\n weather.maxUV = maxUVs[i];\n weather.totalPrecipitation = precipitationTotals[i];\n weather.hoursOfPrecipitation = precipitationHours[i];\n weather.maxWindSpeed = maxWindSpeeds[i];\n weather.maxWindGusts = maxWindGusts[i];\n weather.prominentWindDirection = prominentWindDirections[i];\n this.daily.push(weather);\n }\n };\n Weather.prototype.setDisplay = function () {\n console.debug(this);\n var current = document.getElementById(\"current\");\n current.innerHTML = \"
thermostat\".concat(Math.round(this.current.temperature), \" (\").concat(Math.round(this.current.feelsLike), \")
\\n
humidity_percentage \").concat(Math.round(this.current.humidity), \"%
\\n
cloud \").concat(Math.round(this.current.cloudCoverage), \"%
\\n
weather_mix \").concat(Math.round(this.current.precipitation), \"%
\\n
air \").concat(Math.round(this.current.windSpeed), \" (\").concat(Math.round(this.current.windGusts), \") \").concat(this.inCardinals(this.current.windDirection), \"
\");\n if (!this.daily)\n return;\n var icon = document.getElementById(\"time-icon\");\n icon.innerText = this.current.getCloudCoverageIcon(this.daily[0].sunrise, this.daily[0].sunset);\n var dailySlots = [];\n for (var _i = 0, _a = this.daily; _i < _a.length; _i++) {\n var day = _a[_i];\n dailySlots.push(\"
\\n \".concat(day.time.getDate(), \"\\n \").concat(Math.round(day.minTemperature), \" - \").concat(Math.round(day.maxTemperature), \"\\n \").concat(Math.round(day.maxUV), \"\\n \").concat(day.sunrise.toLocaleTimeString(\"en-US\", { timeStyle: \"short\", hour12: false }), \"\\n \").concat(day.sunset.toLocaleTimeString(\"en-US\", { timeStyle: \"short\", hour12: false }), \"\\n
\"));\n }\n var daily = document.getElementById(\"daily\");\n daily.innerHTML = dailySlots.join(\"\\r\\n\");\n if (!this.hourly)\n return;\n var hourlySlots = [];\n for (var i = 0; i < 12; i++) {\n var hour = this.hourly[i];\n hourlySlots.push(\"
\\n \".concat(hour.time.getHours(), \"\\n \").concat(Math.round(hour.temperature), \"\\n \").concat(hour.precipitation, \"\\\"\\n \").concat(hour.precipitationProbability, \"%\\n
\"));\n }\n var hourly = document.getElementById(\"hourly\");\n hourly.innerHTML = hourlySlots.join(\"\\r\\n\");\n };\n Weather.prototype.inCardinals = function (direction) {\n if (direction > 337.5 || direction <= 22.5)\n return \"N\";\n if (direction > 22.5 || direction <= 67.5)\n return \"NE\";\n if (direction > 67.5 || direction <= 112.5)\n return \"E\";\n if (direction > 112.5 || direction <= 157.5)\n return \"SE\";\n if (direction > 157.5 || direction <= 202.5)\n return \"S\";\n if (direction > 202.5 || direction <= 249.5)\n return \"SW\";\n if (direction > 249.5 || direction <= 294.5)\n return \"W\";\n if (direction > 294.5 || direction <= 337.5)\n return \"NW\";\n return null;\n };\n return Weather;\n}());\nexport default Weather;\nvar WeatherOptions = /** @class */ (function () {\n function WeatherOptions(latitude, longitude, timezone) {\n if (timezone === void 0) { timezone = \"America/Los_Angeles\"; }\n this.timezone = \"America/Los_Angeles\";\n this[\"wind_speed_unit\"] = \"mph\";\n this[\"temperature_unit\"] = \"fahrenheit\";\n this[\"precipitation_unit\"] = \"inch\";\n this.latitude = latitude;\n this.longitude = longitude;\n this.timezone = timezone;\n }\n return WeatherOptions;\n}());\nvar CurrentWeather = /** @class */ (function () {\n function CurrentWeather(current) {\n this.time = new Date(Number(current.time()) * 1000);\n this.temperature = current.variables(0).value();\n this.humidity = current.variables(1).value();\n this.feelsLike = current.variables(2).value();\n this.precipitation = current.variables(3).value();\n this.windSpeed = current.variables(4).value();\n this.windGusts = current.variables(5).value();\n this.windDirection = current.variables(6).value();\n this.cloudCoverage = current.variables(7).value();\n }\n CurrentWeather.prototype.getCloudCoverageIcon = function (sunrise, sunset) {\n if (this.cloudCoverage > 75 || !sunrise || !sunset)\n return \"cloud\";\n if (this.time.getTime() > sunrise.getTime() && this.time.getTime() < sunset.getTime())\n return this.cloudCoverage > 25 ? \"partly_cloudy_day\" : \"clear_day\";\n return this.cloudCoverage > 25 ? \"partly_cloudy_night\" : \"bedtime\";\n };\n return CurrentWeather;\n}());\nvar DailyWeather = /** @class */ (function () {\n function DailyWeather() {\n }\n DailyWeather.prototype.uvRating = function () {\n if (this.maxUV < 3)\n return \"low\";\n if (this.maxUV < 6)\n return \"moderate\";\n if (this.maxUV < 8)\n return \"high\";\n if (this.maxUV < 11)\n return \"very-high\";\n return \"extreme\";\n };\n return DailyWeather;\n}());\nvar LastFetched = /** @class */ (function () {\n function LastFetched() {\n this.current = new Date();\n this.hourly = new Date();\n this.daily = new Date();\n }\n LastFetched.prototype.minutesSinceCurrent = function () {\n return Math.floor((new Date().getTime() - this.current.getTime()) / 60000);\n };\n LastFetched.prototype.hoursSinceHourly = function () {\n return Math.floor((new Date().getTime() - this.hourly.getTime()) / 3600000);\n };\n LastFetched.prototype.hoursSinceDaily = function () {\n return Math.floor((new Date().getTime() - this.daily.getTime()) / 3600000);\n };\n return LastFetched;\n}());\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Substrate from \"./substrate\";\nimport Weather from \"./weather\";\nvar ready = function (func) { return document.readyState !== \"loading\" ? func() : document.addEventListener(\"DOMContentLoaded\", func); };\nready(function () {\n new Substrate(20);\n var weather;\n navigator.geolocation.getCurrentPosition(function (position) {\n weather = new Weather(position.coords.latitude, position.coords.longitude);\n }, function () {\n weather = new Weather();\n });\n});\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/www/styles.css b/www/styles.css index eedff0b..0bcbd66 100644 --- a/www/styles.css +++ b/www/styles.css @@ -51,8 +51,59 @@ body #weather-panel .material { html #weather-panel #time, body #weather-panel #time { font-size: 3rem; + margin-bottom: 1rem; text-align: center; } +html #weather-panel #time .material, +body #weather-panel #time .material { + font-variation-settings: "FILL" 0, "wght" 700, "opsz" 24; + vertical-align: sub; +} +html #weather-panel #hourly, +body #weather-panel #hourly { + display: flex; + font-size: 0.75rem; + margin: 1rem 0; + text-align: center; +} +html #weather-panel #daily, +body #weather-panel #daily { + display: flex; +} +html #weather-panel #daily .daily-slot, +body #weather-panel #daily .daily-slot { + display: flex; + flex-direction: column; +} +html #weather-panel #daily .daily-slot .range, +body #weather-panel #daily .daily-slot .range { + white-space: nowrap; +} +html #weather-panel #daily .daily-slot .uv.moderate, +body #weather-panel #daily .daily-slot .uv.moderate { + color: yellow; + -webkit-text-fill-color: yellow; +} +html #weather-panel #daily .daily-slot .uv.high, +body #weather-panel #daily .daily-slot .uv.high { + color: orange; + -webkit-text-fill-color: orange; +} +html #weather-panel #daily .daily-slot .uv.very-high, +body #weather-panel #daily .daily-slot .uv.very-high { + color: red; + -webkit-text-fill-color: red; +} +html #weather-panel #daily .daily-slot .uv.extreme, +body #weather-panel #daily .daily-slot .uv.extreme { + color: purple; + -webkit-text-fill-color: purple; +} +html #weather-panel #current, +body #weather-panel #current { + display: grid; + grid-template-columns: 1fr 1fr; +} html #weather-panel section header, body #weather-panel section header { font-size: 1.5rem;