@idmui/spot 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -861,6 +861,7 @@ class or {
|
|
|
861
861
|
*/
|
|
862
862
|
static autoPickMeteoModel(A = "best_match") {
|
|
863
863
|
var e, r;
|
|
864
|
+
A = A == null ? void 0 : A.toLowerCase(), A = A === "ec" ? "ecmwf" : A;
|
|
864
865
|
const n = A.toLowerCase().split(","), i = [], a = [];
|
|
865
866
|
for (const o of n) {
|
|
866
867
|
let c = Ms.find((d) => {
|
|
@@ -1066,7 +1067,8 @@ class or {
|
|
|
1066
1067
|
degree: (oA = HA.swell_wave_direction_dominant) == null ? void 0 : oA.at(wA),
|
|
1067
1068
|
period: (CA = HA.swell_wave_period_max) == null ? void 0 : CA.at(wA),
|
|
1068
1069
|
peakPeriod: (b = HA.swell_wave_peak_period_max) == null ? void 0 : b.at(wA),
|
|
1069
|
-
bearing:
|
|
1070
|
+
// bearing: daily.swell_wave_direction_dominant?.at(day) !== null ? (daily.swell_wave_direction_dominant?.at(day) + 180) % 360 : null,
|
|
1071
|
+
bearing: ((M = HA.swell_wave_direction_dominant) == null ? void 0 : M.at(wA)) !== null ? ((P = HA.swell_wave_direction_dominant) == null ? void 0 : P.at(wA)) % 360 : null
|
|
1070
1072
|
},
|
|
1071
1073
|
wd: {
|
|
1072
1074
|
height: (N = HA.wind_wave_height_max) == null ? void 0 : N.at(wA),
|
|
@@ -1084,16 +1086,16 @@ class or {
|
|
|
1084
1086
|
}
|
|
1085
1087
|
static parseWave(A, e) {
|
|
1086
1088
|
if (A.sig.direction = this.degree2Direction(A.sig.degree), A.swell.direction = this.degree2Direction(A.swell.degree), A.wd.direction = this.degree2Direction(A.wd.degree), A.sig.scale = this.douglas(A.sig.height), A.swell.scale = this.douglas(A.swell.height), A.wd.scale = this.douglas(A.wd.height), A.sig.height === 0) {
|
|
1087
|
-
const r = Math.sqrt(Math.pow(A.swell.height || 0, 2) + Math.pow(A.wd.height || 0, 2))
|
|
1088
|
-
A.sig.height = Math.round(
|
|
1089
|
+
const r = Math.sqrt(Math.pow(A.swell.height || 0, 2) + Math.pow(A.wd.height || 0, 2));
|
|
1090
|
+
A.sig.height = Math.round(r * 100) / 100;
|
|
1089
1091
|
}
|
|
1090
1092
|
if (A.swell.height === 0) {
|
|
1091
|
-
const r = Math.sqrt(Math.abs(Math.pow(A.sig.height || 0, 2) - Math.pow(A.wd.height || 0, 2))), n = 0.28 * Math.pow(this.kts2ms((e == null ? void 0 : e.kts) || 0), 2) /
|
|
1092
|
-
A.swell.height = Math.round(
|
|
1093
|
+
const r = Math.sqrt(Math.abs(Math.pow(A.sig.height || 0, 2) - Math.pow(A.wd.height || 0, 2))), n = 0.28 * Math.pow(this.kts2ms((e == null ? void 0 : e.kts) || 0), 2) / 48.0665;
|
|
1094
|
+
A.swell.height = Math.round(Math.min(r, n) * 100) / 100;
|
|
1093
1095
|
}
|
|
1094
1096
|
if (A.wd.height === 0 || A.wd.height > A.sig.height) {
|
|
1095
|
-
const r = Math.sqrt(Math.abs(Math.pow(A.sig.height || 0, 2) - Math.pow(A.swell.height || 0, 2))), n = 0.28 * Math.pow(this.kts2ms((e == null ? void 0 : e.kts) || 0), 2) /
|
|
1096
|
-
A.wd.height = Math.round(
|
|
1097
|
+
const r = Math.sqrt(Math.abs(Math.pow(A.sig.height || 0, 2) - Math.pow(A.swell.height || 0, 2))), n = 0.28 * Math.pow(this.kts2ms((e == null ? void 0 : e.kts) || 0), 2) / 48.0665;
|
|
1098
|
+
A.wd.height = Math.round(Math.min(r, n) * 100) / 100;
|
|
1097
1099
|
}
|
|
1098
1100
|
return A.swell.height > A.sig.height && (A.swell.height = Math.round(A.sig.height * 0.76 * 100) / 100), A.sig.period || (A.sig.period = Math.round(5 * Math.sqrt(A.sig.height))), A.swell.period || (A.swell.period = Math.round(5 * Math.sqrt(A.swell.height))), A.wd.period || (A.wd.period = Math.round(5 * Math.sqrt(A.wd.height))), A;
|
|
1099
1101
|
}
|
|
@@ -14463,7 +14465,7 @@ function(t) {
|
|
|
14463
14465
|
*/
|
|
14464
14466
|
function(t) {
|
|
14465
14467
|
function A() {
|
|
14466
|
-
return (ue.canvg ? Promise.resolve(ue.canvg) : import("./index.es-
|
|
14468
|
+
return (ue.canvg ? Promise.resolve(ue.canvg) : import("./index.es-b4042971.js")).catch(function(e) {
|
|
14467
14469
|
return Promise.reject(new Error("Could not load canvg: " + e));
|
|
14468
14470
|
}).then(function(e) {
|
|
14469
14471
|
return e.default ? e.default : e;
|
package/dist/index.js
CHANGED
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function($t,te){typeof exports=="object"&&typeof module<"u"?te(exports,require("moment"),require("moment-timezone"),require("@element-plus/icons-vue"),require("@idm-plugin/geo"),require("vue"),require("echarts"),require("axios")):typeof define=="function"&&define.amd?define(["exports","moment","moment-timezone","@element-plus/icons-vue","@idm-plugin/geo","vue","echarts","axios"],te):($t=typeof globalThis<"u"?globalThis:$t||self,te($t["idmui-spot"]={},$t.moment,$t["moment-timezone"],$t["@element-plus/icons-vue"],$t["@idm-plugin/geo"],$t.Vue,$t.echarts,$t.axios))})(this,function($t,te,fe,nl,ga,h,Jy,ei){"use strict";function Zy(t){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return A.default=t,Object.freeze(A)}const Ke=Zy(Jy);var $y=Object.defineProperty,A5=(t,A,e)=>A in t?$y(t,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[A]=e,da=(t,A,e)=>(A5(t,typeof A!="symbol"?A+"":A,e),e);da(class{},"LEVEL",{Basic:1,Prime:2,Supper:1024});const Zh=class{static getWeatherLayer(A){return Zh.WEATHER_LAYERS.find(e=>e.key===A)}static getOtherLayer(A){return Zh.OTHER_LAYERS.find(e=>e.key===A)}};let $h=Zh;da($h,"WEATHER_LAYERS",[{weight:1,name:"Wind",key:"wind",h5:!0,enabled:!0,type:"json",particle:!0,format:"vector",atmos:!0},{weight:524288,name:"Wind Particle",key:"wind-particle",peer:{weight:1,key:"wind"},enabled:!0,hide:!0,type:"jpg",format:"jpg",atmos:!0},{weight:16,name:"Sig Waves",key:"sig-wave-height",h5:!0,enabled:!0,type:"json",format:"contourf"},{weight:4194304,name:"Sig Waves (JPG)",key:"sig-wave",peer:{weight:16,key:"sig-wave"},enabled:!0,hide:!0,type:"jpg",format:"jpg"},{weight:8388608,name:"Sig Waves (Contour)",key:"sig-wave-height-contour",peer:{weight:16,key:"sig-wave-contour"},enabled:!0,hide:!0,type:"json",format:"contour"},{weight:96,name:"Current",key:"current",vendor:"cmems",alias:"copernicus",merge:!0,h5:!0,enabled:!0,type:"json",particle:!0},{weight:1048576,name:"Current Particle",key:"current-particle",vendor:"cmems",alias:"copernicus",peer:{weight:96,key:"current"},enabled:!0,hide:!0,type:"jpg",format:"jpg"},{weight:256,name:"Tropicals",key:"tropicals",h5:!0,enabled:!0,type:"json"},{weight:4096,name:"Pressure",h5:!0,key:"prmsl",enabled:!0,type:"json",format:"contour",atmos:!0},{weight:8192,name:"Visibility",vendor:"gfs",key:"visibility",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0},{weight:262144,name:"Precip Acc",key:"precip3h",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0},{weight:6,name:"Swell",key:"swell",merge:!0,h5:!0,enabled:!0,type:"json",format:"contour"},{weight:2,name:"Swell Height",key:"swell-height",partly:!0,enabled:!0,type:"json",format:"contour"},{weight:4,name:"Swell Direction",key:"swell-direction",partly:!0,enabled:!0,type:"json",format:"scalar"},{weight:32,name:"Current Direction",key:"current-direction",vendor:"cmems",alias:"copernicus",partly:!0,enabled:!0,type:"json",format:"vector"},{weight:64,name:"Current Speed",key:"current-speed",vendor:"cmems",alias:"copernicus",partly:!0,enabled:!0,type:"json",format:"contourf"},{weight:512,name:"Pressure Contour",key:"prmsl-contour",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:1024,name:"Pressure Value",key:"prmsl-value",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:2048,name:"Pressure Front",key:"prmsl-front",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:16384,name:"Ice Edge(OBS)",key:"ice-edge",vendor:"cmems",alias:"copernicus",enabled:!0,type:"jpg",format:"jpg",obs:!0,daily:!0},{weight:32768,name:"Ice Thick",key:"ice-thickness",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",daily:!0},{weight:65536,name:"Ice Cover",key:"ice-cover",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",daily:!0},{weight:131072,name:"Sea Surf. Temp.",key:"water-temp",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",step:6},{weight:2097152,name:"Temp.",key:"temp",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0}]),da($h,"OTHER_LAYERS",[{weight:1,name:"War Zones",key:"war-zones",h5:!0,enabled:!0,type:"json"},{weight:2,name:"GMDSS Areas",key:"gmdss-areas",h5:!0,enabled:!0,type:"json"},{weight:4,name:"ECA Zones",key:"eca-zones",h5:!0,enabled:!0,type:"json"},{weight:8,name:"Load Lines",key:"load-lines",h5:!0,enabled:!0,type:"json"},{weight:16,name:"HRA",key:"high-risk-area",enabled:!1,type:"json"},{weight:32,name:"Pirates",key:"pirates",enabled:!1,type:"json"},{weight:4096,name:"Alert Zones",key:"alert-zones",h5:!0,enabled:!0,type:"json"},{weight:64,name:"Ports",key:"ports",h5:!0,enabled:!0,type:"json"},{weight:128,name:"Time Zones",key:"time-zones",h5:!0,enabled:!0,type:"json"},{weight:256,name:"VRA",key:"voluntary-reporting-area",h5:!0,enabled:!0,type:"json"},{weight:512,name:"Special Areas",key:"special-area",h5:!0,enabled:!0,type:"json"},{weight:1024,name:"Day/Night",key:"day-night",h5:!0,enabled:!0,type:"json"},{weight:2048,name:"ENC",key:"enc",h5:!0,enabled:!0,type:"origin"},{weight:8192,name:"12nm",key:"world12nm",h5:!1,enabled:!0,type:"origin"},{weight:16384,name:"Sea Area",key:"worldMarine",h5:!1,enabled:!0,type:"origin"},{weight:32768,name:"China Route",key:"chinaRoute",h5:!1,enabled:!0,type:"origin"}]);let Au=class{};da(Au,"WEATHER_TAG",[{weight:4,name:"Adverse Weather Dangerous",key:"DANGEROUS",positive:!0},{weight:2,name:"Adverse Weather Severe",key:"SEVERE",positive:!0},{weight:1,name:"Adverse Weather Heavy",key:"HEAVY",positive:!0}]),da(Au,"SAILING_TAG",[{weight:2048,name:"Deviation",key:"deviation",positive:!0},{weight:4096,name:"Stoppage",key:"stoppage",positive:!0},{weight:8192,name:"Deceleration",key:"deceleration",positive:!0},{weight:16384,name:"Slow Speed",key:"slowSpeed",positive:!0},{weight:32768,name:"No Noon",key:"noNoon",positive:!0},{weight:65536,name:"AIS LOSS",key:"aisLoss",positive:!0}]),da(Au,"OTHER_TAG",[{weight:2097152,name:"No CP",key:"noCp",positive:!0},{weight:4194304,name:"Send Rpt",key:"sendRpt",positive:!1},{weight:8388608,name:"Send Bps",key:"sendBps",positive:!1},{weight:16777216,name:"Send Pvar",key:"sendPvar",positive:!1},{weight:33554432,name:"Checked",key:"checked",positive:!1},{weight:67108864,name:"Not Send PWFR",key:"notSendPwfr",positive:!0}]);const xs=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"GFS",alias:"GFS",model:"gfs_seamless",provider:"NOAA",country:"United States",resolution:25,tips:"3-25km",length:16,frequency:1,models:["gfs_seamless"],categories:"ncep_gfs013,ncep_gfs025,ncep_gfs_graphcast025,ncep_hrrr_conus,ncep_nbm_conus",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:2,name:"ECMWF",alias:"ECMWF",model:"ecmwf_ifs025",provider:"ECMWF",country:"European Union",resolution:25,tips:"25km",length:15,frequency:6,models:["ecmwf_ifs025","ecmwf_aifs025_single"],categories:"ecmwf_ifs025,ecmwf_aifs025_single",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:3,disabled:!0,name:"ICON",alias:"ECMWF",model:"icon_seamless",provider:"Deutscher Wetterdienst (DWD)",country:"Germany",resolution:13,tips:"2-13km",length:7.5,frequency:3,models:["icon_seamless","icon_global","icon_eu","icon_d2"],categories:"dwd_icon,dwd_icon_eps,dwd_icon_d2,dwd_icon_d2_eps,dwd_icon_eu,dwd_icon_eu_eps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:4,name:"ARPEGE",disabled:!0,alias:"ECMWF",model:"arpege_seamless",provider:"Météo-France",country:"France",resolution:25,tips:"1-25km",length:4,frequency:1,models:["arpege_seamless","arpege_world","arpege_europe"],categories:"meteofrance_arpege_europe,meteofrance_arpege_europe_probabilities,meteofrance_arpege_world025",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:5,name:"UKMO",disabled:!0,alias:"ECMWF",model:"ukmo_seamless",provider:"UK Met Office",country:"United Kingdom",resolution:10,tips:"2-10km",length:7,frequency:1,models:["ukmo_seamless","ukmo_global_deterministic_10km","ukmo_uk_deterministic_2km"],categories:"ukmo_global_deterministic_10km,ukmo_uk_deterministic_2km",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:6,name:"JMA",disabled:!0,alias:"GFS",model:"jma_seamless",provider:"JMA",country:"Japan",resolution:55,tips:"5-55km",length:11,frequency:3,models:["jma_seamless","jma_msm","jma_gsm"],categories:"jma_gsm,jma_msm",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:7,name:"GEM",disabled:!0,alias:"GFS",model:"gem_seamless",provider:"Canadian Weather Service",country:"Canada",resolution:2.5,tips:"2.5km",length:10,frequency:6,models:["gem_seamless","gem_global","gem_regional"],categories:"cmc_gem_gdps,cmc_gem_hrdps,cmc_gem_rdps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:8,name:"GRAPES",disabled:!0,alias:"GFS",model:"cma_grapes_global",provider:"China Meteorological Administration (CMA)",country:"China",resolution:15,tips:"15km",length:10,frequency:6,models:["cma_grapes_global"],categories:"cma_grapes_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:9,name:"ACCESS-G",disabled:!0,alias:"GFS",model:"bom_access_global",provider:"Australian Bureau of Meteorology (BOM)",country:"Australia",resolution:15,tips:"15km",length:10,frequency:6,models:["bom_access_global"],categories:"bom_access_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"}],Is=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"MFWAM",alias:"ECMWF",model:"meteofrance_wave",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:12,models:["meteofrance_wave"],categories:"meteofrance_wave",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:2,disabled:!0,name:"SMOC",alias:"ECMWF",model:"meteofrance_currents",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:24,models:["meteofrance_currents"],categories:"meteofrance_currents, meteofrance_sea_surface_temperature",variables:"ocean_u_current,ocean_v_current,invert_barometer_height,sea_level_height_msl,sea_surface_temperature"},{rank:3,disabled:!0,name:"EWAM",alias:"ECMWF",model:"ewam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:8,frequency:2,models:["ewam"],categories:"dwd_ewam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:4,disabled:!0,name:"GWAM",alias:"ECMWF",model:"gwam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:4,frequency:2,models:["gwam"],categories:"dwd_gwam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:5,disabled:!0,name:"ECWAM",alias:"ECMWF",model:"ecmwf_wam025",provider:"ECMWF",country:"Europe",resolution:25,tips:"25km",length:10,frequency:6,models:["ecmwf_wam025"],categories:"ecmwf_wam025",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:6,name:"GFSWave",alias:"GFS",model:"ncep_gfswave025",provider:"NCEP",country:"USA",resolution:25,tips:"25km",length:10,frequency:6,models:["ncep_gfswave025","ncep_gfswave016"],categories:"ncep_gfswave025,ncep_gfswave016",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:7,disabled:!0,name:"ERA5-Ocean",alias:"ECMWF",model:"era5_ocean",provider:"Copernicus",country:"Europe",resolution:50,tips:"50km",length:-5,frequency:1,models:["era5_ocean"],categories:"copernicus_era5_ocean",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"}];class Dr{static standardWeatherModels(){return xs.filter(A=>!A.disabled&&A.alias)}static standardMarineModels(){return Is.filter(A=>!A.disabled&&A.alias)}static autoPickLayerModel(A,e="copernicus"){return e=e||"copernicus",e=e==null?void 0:e.toLowerCase(),e=["gfs","ecmwf","copernicus"].includes(e)?e:"copernicus",A=A==null?void 0:A.toLowerCase(),A==="gfs"?"gfs":["ec","ecmwf"].includes(A)?"ecmwf":["copernicus","cmems"].includes(A)?"copernicus":e}static autoPickPeerModel(A,e,r="copernicus"){if(e=this.autoPickLayerModel(e,r),$h.WEATHER_LAYERS.reduce((n,i)=>i.atmos?n+i.weight:n,0)&A.weight){if(e==="copernicus")return"ecmwf"}else if(e==="ecmwf")return"copernicus";return e}static autoPickMeteoModel(A="best_match"){var e,r;const n=A.toLowerCase().split(","),i=[],a=[];for(const s of n){let o=xs.find(u=>{var d,p,g;return((d=u.models)==null?void 0:d.includes(s))||((p=u.alias)==null?void 0:p.toLowerCase())===s||((g=u.name)==null?void 0:g.toLowerCase())===s}),c=Is.find(u=>{var d,p,g;return((d=u.models)==null?void 0:d.includes(s))||((p=u.alias)==null?void 0:p.toLowerCase())===s||((g=u.name)==null?void 0:g.toLowerCase())===s});o=o||xs.find(u=>{var d,p;return((d=u.alias)==null?void 0:d.toLowerCase())===((p=c==null?void 0:c.alias)==null?void 0:p.toLowerCase())}),c=c||Is.find(u=>{var d,p;return((d=u.alias)==null?void 0:d.toLowerCase())===((p=o==null?void 0:o.alias)==null?void 0:p.toLowerCase())}),o=o||xs[0],c=c||Is[0],i.push((e=o.models)!=null&&e.includes(s)?s:o.model),a.push((r=c.models)!=null&&r.includes(s)?s:c.model)}return{weatherModels:i.join(","),marineModels:a.join(",")}}static autoPickSubCategories(A){A=A.toUpperCase();const e=xs.filter(i=>i.alias===A),r=Is.filter(i=>i.alias===A),n=[];return e.forEach(i=>{i.categories&&n.push(...i.categories.split(","))}),r.forEach(i=>{i.categories&&n.push(...i.categories.split(","))}),n}static pickHourly(A,e){var r,n,i,a,s,o,c,u,d,p,g,m,v,b,C,E,N,k,j,z,K,P,X,nA,D,Q,_,R,eA,AA,W,Z,$,tA,dA,x,H,M,S,J,aA,fA,gA,bA,QA,FA,NA,kA,pA,G;const KA=typeof e=="string"?te(e):e,lA=A==null?void 0:A.weather,BA=A==null?void 0:A.marine,TA=te((n=(r=lA==null?void 0:lA[0])==null?void 0:r.hourly)==null?void 0:n.date).utc(),rA=TA.clone().add((s=(a=(i=lA==null?void 0:lA[0])==null?void 0:i.hourly)==null?void 0:a.time)==null?void 0:s.at(0),"h"),UA=TA.clone().add((u=(c=(o=lA==null?void 0:lA[0])==null?void 0:o.hourly)==null?void 0:c.time)==null?void 0:u.at(-1),"h"),jA=[];if(KA.isBetween(rA,UA,"millisecond","[]")){const xA=KA.utc().diff(rA,"h",!1);let YA,qA;if(lA){let Y=0,DA=0;for(const vA of lA){const OA=vA==null?void 0:vA.hourly;for(let ee=xA-(xA-1)%3;ee<=xA;ee++)Y+=(d=OA==null?void 0:OA.precipitation)==null?void 0:d.at(ee);for(let ee=xA-(xA-1)%6;ee<=xA;ee++)DA+=(p=OA==null?void 0:OA.precipitation)==null?void 0:p.at(ee);YA={temp:(g=OA==null?void 0:OA.temperature_2m)==null?void 0:g.at(xA),apparentTemp:(m=OA==null?void 0:OA.apparent_temperature)==null?void 0:m.at(xA),rh:(v=OA==null?void 0:OA.relative_humidity_2m)==null?void 0:v.at(xA),dp:(b=OA==null?void 0:OA.dew_point_2m)==null?void 0:b.at(xA),precip:{probability:(C=OA==null?void 0:OA.precipitation_probability)==null?void 0:C.at(xA),sum:(E=OA==null?void 0:OA.precipitation)==null?void 0:E.at(xA),sum3Hours:Math.round(Y*100)/100,sum6Hours:Math.round(DA*100)/100},pmsl:(N=OA==null?void 0:OA.pressure_msl)==null?void 0:N.at(xA),psurf:(k=OA==null?void 0:OA.surface_pressure)==null?void 0:k.at(xA),code:(j=OA==null?void 0:OA.weather_code)==null?void 0:j.at(xA),visibility:this.m2nm((z=OA==null?void 0:OA.visibility)==null?void 0:z.at(xA)),wind:{speed:(K=OA==null?void 0:OA.wind_speed_10m)==null?void 0:K.at(xA),kts:(P=OA==null?void 0:OA.wind_speed_10m)==null?void 0:P.at(xA),degree:(X=OA==null?void 0:OA.wind_direction_10m)==null?void 0:X.at(xA),bearing:((nA=OA==null?void 0:OA.wind_direction_10m)==null?void 0:nA.at(xA))!==null?(((D=OA==null?void 0:OA.wind_direction_10m)==null?void 0:D.at(xA))+180)%360:null,gusts:(Q=OA==null?void 0:OA.wind_gusts_10m)==null?void 0:Q.at(xA)},isDay:(_=OA==null?void 0:OA.is_day)==null?void 0:_.at(xA)};const{name:EA,url:cA,bg:SA}=this.parseWeatherCode(YA.code,YA.isDay);YA.name=EA,YA.url=cA,YA.bg=SA,YA.wind.scale=this.beaufort(this.kts2ms(YA.wind.kts)),YA.wind.direction=this.degree2Direction(YA.wind.degree),jA.push({utc:rA.add(xA,"h").format(),model:vA.model,weather:{...YA}})}}if(BA){let Y=0;for(const DA of BA){const vA=DA==null?void 0:DA.hourly;qA={wave:{sig:{height:(R=vA==null?void 0:vA.wave_height)==null?void 0:R.at(xA),degree:(eA=vA==null?void 0:vA.wave_direction)==null?void 0:eA.at(xA),bearing:((AA=vA==null?void 0:vA.wave_direction)==null?void 0:AA.at(xA))!==null?(((W=vA==null?void 0:vA.wave_direction)==null?void 0:W.at(xA))+180)%360:null,period:(Z=vA==null?void 0:vA.wave_period)==null?void 0:Z.at(xA)},swell:{height:($=vA==null?void 0:vA.swell_wave_height)==null?void 0:$.at(xA),degree:(tA=vA==null?void 0:vA.swell_wave_direction)==null?void 0:tA.at(xA),bearing:((dA=vA==null?void 0:vA.swell_wave_direction)==null?void 0:dA.at(xA))!==null?(((x=vA==null?void 0:vA.swell_wave_direction)==null?void 0:x.at(xA))+180)%360:null,period:(H=vA==null?void 0:vA.swell_wave_period)==null?void 0:H.at(xA),peakPeriod:(M=vA==null?void 0:vA.swell_wave_peak_period)==null?void 0:M.at(xA)},wd:{height:(S=vA==null?void 0:vA.wind_wave_height)==null?void 0:S.at(xA),degree:(J=vA==null?void 0:vA.wind_wave_direction)==null?void 0:J.at(xA),bearing:((aA=vA==null?void 0:vA.wind_wave_direction)==null?void 0:aA.at(xA))!==null?(((fA=vA==null?void 0:vA.wind_wave_direction)==null?void 0:fA.at(xA))+180)%360:null,period:(gA=vA==null?void 0:vA.wind_wave_period)==null?void 0:gA.at(xA),peakPeriod:(bA=vA==null?void 0:vA.wind_wave_peak_period)==null?void 0:bA.at(xA)}},current:{speed:(QA=vA==null?void 0:vA.ocean_current_velocity)==null?void 0:QA.at(xA),kts:(FA=vA==null?void 0:vA.ocean_current_velocity)==null?void 0:FA.at(xA),degree:(NA=vA==null?void 0:vA.ocean_current_direction)==null?void 0:NA.at(xA),bearing:((kA=vA==null?void 0:vA.ocean_current_direction)==null?void 0:kA.at(xA))??null},sst:(pA=vA==null?void 0:vA.sea_surface_temperature)==null?void 0:pA.at(xA),height:(G=vA==null?void 0:vA.sea_level_height_msl)==null?void 0:G.at(xA)},qA.wave=this.parseWave(qA.wave,YA==null?void 0:YA.wind),qA.current.direction=this.degree2Direction(qA.current.degree),Object.assign(jA[Y],qA),Y++}}}return jA}static toLegacy(A){var e,r,n,i,a,s,o,c,u,d;return{wind:(e=A==null?void 0:A.weather)==null?void 0:e.wind,visibility:(r=A==null?void 0:A.weather)==null?void 0:r.visibility,temp:(n=A==null?void 0:A.weather)==null?void 0:n.temp,prmsl:(i=A==null?void 0:A.weather)==null?void 0:i.pmsl,gusts:{kts:(s=(a=A==null?void 0:A.weather)==null?void 0:a.wind)==null?void 0:s.gusts},precip:(o=A==null?void 0:A.weather)==null?void 0:o.precip,code:(c=A==null?void 0:A.weather)==null?void 0:c.code,name:(u=A==null?void 0:A.weather)==null?void 0:u.name,url:(d=A==null?void 0:A.weather)==null?void 0:d.url,wave:A==null?void 0:A.wave,current:A==null?void 0:A.current,sst:A==null?void 0:A.sst,height:A==null?void 0:A.height,utc:A==null?void 0:A.utc,source:A==null?void 0:A.model}}static pickDaily(A,e){var r,n,i,a,s,o,c,u,d,p,g,m,v,b,C,E,N,k,j,z,K,P,X,nA,D,Q,_,R,eA,AA,W,Z,$,tA,dA,x,H,M,S,J,aA,fA,gA,bA;const QA=typeof e=="string"?te(e):e,FA=A==null?void 0:A.weather,NA=A==null?void 0:A.marine,kA=te((i=(n=(r=FA==null?void 0:FA[0])==null?void 0:r.daily)==null?void 0:n.time)==null?void 0:i.at(0)),pA=te((o=(s=(a=FA==null?void 0:FA[0])==null?void 0:a.daily)==null?void 0:s.time)==null?void 0:o.at(-1)),G=[];if(QA.isBetween(kA,pA,"millisecond","[]")){let KA,lA;const BA=QA.diff(kA,"d",!1);if(FA)for(const TA of FA){const rA=TA.daily;KA={code:(c=rA.weather_code)==null?void 0:c.at(BA),temp:{max:(u=rA.temperature_2m_max)==null?void 0:u.at(BA),min:(d=rA.temperature_2m_min)==null?void 0:d.at(BA),mean:(p=rA.temperature_2m_mean)==null?void 0:p.at(BA)},apparentTemp:{max:(g=rA.apparent_temperature_max)==null?void 0:g.at(BA),min:(m=rA.apparent_temperature_min)==null?void 0:m.at(BA)},precip:{sum:(v=rA.precipitation_sum)==null?void 0:v.at(BA),rainSum:(b=rA.rain_sum)==null?void 0:b.at(BA),snowfallSum:(C=rA.snowfall_sum)==null?void 0:C.at(BA),showersSum:(E=rA.showers_sum)==null?void 0:E.at(BA),hours:(N=rA.precipitation_hours)==null?void 0:N.at(BA),probability:(k=rA.precipitation_probability_max)==null?void 0:k.at(BA)},rh:{max:(j=rA.relative_humidity_2m_max)==null?void 0:j.at(BA),min:(z=rA.relative_humidity_2m_min)==null?void 0:z.at(BA),mean:(K=rA.relative_humidity_2m_mean)==null?void 0:K.at(BA)},wind:{speed:(P=rA.wind_speed_10m_max)==null?void 0:P.at(BA),kts:(X=rA.wind_speed_10m_max)==null?void 0:X.at(BA),degree:(nA=rA.wind_direction_10m_dominant)==null?void 0:nA.at(BA),gusts:(D=rA.wind_gusts_10m_max)==null?void 0:D.at(BA),bearing:((Q=rA.wind_direction_10m_dominant)==null?void 0:Q.at(BA))!==null?(((_=rA.wind_direction_10m_dominant)==null?void 0:_.at(BA))+180)%360:null}};const{name:UA,url:jA,bg:xA}=this.parseWeatherCode(KA.code,!0);KA.name=UA,KA.url=jA,KA.bg=xA,KA.wind.scale=this.beaufort(this.kts2ms(KA.wind.kts)),KA.wind.direction=this.degree2Direction(KA.wind.degree),G.push({utc:kA.add(BA,"d").utc().format(),model:TA.model,weather:{...KA}})}if(NA){let TA=0;for(const rA of NA){const UA=rA.daily;lA={wave:{sig:{height:(R=UA.wave_height_max)==null?void 0:R.at(BA),degree:(eA=UA.wave_direction_dominant)==null?void 0:eA.at(BA),period:(AA=UA.wave_period_max)==null?void 0:AA.at(BA),bearing:((W=UA.wave_direction_dominant)==null?void 0:W.at(BA))!==null?(((Z=UA.wave_direction_dominant)==null?void 0:Z.at(BA))+180)%360:null},swell:{height:($=UA.swell_wave_height_max)==null?void 0:$.at(BA),degree:(tA=UA.swell_wave_direction_dominant)==null?void 0:tA.at(BA),period:(dA=UA.swell_wave_period_max)==null?void 0:dA.at(BA),peakPeriod:(x=UA.swell_wave_peak_period_max)==null?void 0:x.at(BA),bearing:((H=UA.swell_wave_direction_dominant)==null?void 0:H.at(BA))!==null?(((M=UA.swell_wave_direction_dominant)==null?void 0:M.at(BA))+180)%360:null},wd:{height:(S=UA.wind_wave_height_max)==null?void 0:S.at(BA),degree:(J=UA.wind_wave_direction_dominant)==null?void 0:J.at(BA),period:(aA=UA.wind_wave_period_max)==null?void 0:aA.at(BA),peakPeriod:(fA=UA.wind_wave_peak_period_max)==null?void 0:fA.at(BA),bearing:((gA=UA.wind_wave_direction_dominant)==null?void 0:gA.at(BA))!==null?(((bA=UA.wind_wave_direction_dominant)==null?void 0:bA.at(BA))+180)%360:null}}},lA.wave=this.parseWave(lA.wave,KA==null?void 0:KA.wind),Object.assign(G[TA],lA),TA++}}}return G}static parseWave(A,e){if(A.sig.direction=this.degree2Direction(A.sig.degree),A.swell.direction=this.degree2Direction(A.swell.degree),A.wd.direction=this.degree2Direction(A.wd.degree),A.sig.scale=this.douglas(A.sig.height),A.swell.scale=this.douglas(A.swell.height),A.wd.scale=this.douglas(A.wd.height),A.sig.height===0){const r=Math.sqrt(Math.pow(A.swell.height||0,2)+Math.pow(A.wd.height||0,2)),n=.28*Math.pow(this.kts2ms((e==null?void 0:e.kts)||0),2)/9.80665;A.sig.height=Math.round(Math.max(r,n)*100)/100}if(A.swell.height===0){const r=Math.sqrt(Math.abs(Math.pow(A.sig.height||0,2)-Math.pow(A.wd.height||0,2))),n=.28*Math.pow(this.kts2ms((e==null?void 0:e.kts)||0),2)/9.80665;A.swell.height=Math.round((Math.min(r,n)||n)*100)/100}if(A.wd.height===0||A.wd.height>A.sig.height){const r=Math.sqrt(Math.abs(Math.pow(A.sig.height||0,2)-Math.pow(A.swell.height||0,2))),n=.28*Math.pow(this.kts2ms((e==null?void 0:e.kts)||0),2)/9.80665;A.wd.height=Math.round((Math.min(r,n)||n)*100)/100}return A.swell.height>A.sig.height&&(A.swell.height=Math.round(A.sig.height*.76*100)/100),A.sig.period||(A.sig.period=Math.round(5*Math.sqrt(A.sig.height))),A.swell.period||(A.swell.period=Math.round(5*Math.sqrt(A.swell.height))),A.wd.period||(A.wd.period=Math.round(5*Math.sqrt(A.wd.height))),A}static parseWeatherCode(A,e){const r=this.weatherCode(A);return(e?r.day:r.night)||{}}static weatherCode(A){const e={code:A};switch(A){case 0:e.day={name:"Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},e.night={name:"Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 1:e.day={name:"Mainly Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},e.night={name:"Mainly Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 2:e.day={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"},e.night={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"};break;case 3:e.day={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"},e.night={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"};break;case 45:e.day={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},e.night={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 48:e.day={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},e.night={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 51:e.day={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 53:e.day={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 55:e.day={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 56:e.day={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 57:e.day={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 61:e.day={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 63:e.day={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 65:e.day={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 66:e.day={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 67:e.day={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 71:e.day={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 73:e.day={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 75:e.day={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 77:e.day={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 80:e.day={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 81:e.day={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 82:e.day={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 85:e.day={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 86:e.day={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 95:e.day={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 96:e.day={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 99:e.day={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break}return e}static kts2ms(A){return isNaN(A)||A===null?A:Math.round(A*1852/3600*1e4)/1e4}static kts2kmh(A){return isNaN(A)||A===null?A:A*1.852}static m2nm(A){return isNaN(A)||A===null?A:Math.round(A/1e3/1.852*1e4)/1e4}static kmh2kts(A){return isNaN(A)||A===null?A:this.ms2kts(A*1e3/3600)}static ms2kts(A){return isNaN(A)||A===null?A:Math.round(A*3600/1852*1e4)/1e4}static degree2Radian(A){if(isNaN(A)||A===null)return A;let e=A%360/360*2*Math.PI;return e=e<0?e+2*Math.PI:e,e}static degree2Direction(A){const e=this.degree2Radian(A);if(isNaN(e)||e===null)return null;let r="N/A";const n=Math.PI/16;return e<n?r="N":e>=n&&e<3*n?r="NNE":e>=3*n&&e<5*n?r="NE":e>=5*n&&e<7*n?r="ENE":e>=7*n&&e<9*n?r="E":e>=9*n&&e<11*n?r="ESE":e>=11*n&&e<13*n?r="SE":e>=13*n&&e<15*n?r="SSE":e>=15*n&&e<17*n?r="S":e>=17*n&&e<19*n?r="SSW":e>=19*n&&e<21*n?r="SW":e>=21*n&&e<23*n?r="WSW":e>=23*n&&e<25*n?r="W":e>=25*n&&e<27*n?r="WNW":e>=27*n&&e<29*n?r="NW":e>=29*n&&e<31*n?r="NNW":e>=31*n&&e<32*n&&(r="N"),r}static beaufort(A){let e=0;return isNaN(A)||(A=Math.round(A*10)/10,A<=.2?e=0:A<=1.5?e=1:A<=3.3?e=2:A<=5.4?e=3:A<=7.9?e=4:A<=10.7?e=5:A<=13.8?e=6:A<=17.1?e=7:A<=20.7?e=8:A<=22.4?e=9:A<=28.4?e=10:A<=32.6?e=11:A>32.6&&(e=12)),e}static douglas(A){let e="Calm";return isNaN(A)||A<=.1?e="Calm":A<=.5?e="Smooth":A<=1.25?e="Slight":A<=2.5?e="Moderate":A<=4?e="Rough":A<=6?e="VeryRough":A<=9?e="High":A<=14?e="VeryHigh":e="Precipitous",e}}const Dk="",eu=(t,A)=>{const e=t.__vccOpts||t;for(const[r,n]of A)e[r]=n;return e},e5={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:Number}},data(){return{base64url:""}},computed:{computeUTCTime(){return function(t,A="MMM-DD/HHmm[Z]"){return`${(t?te(t):te()).utc().format(A)}`}}},async mounted(){this.base64url=await this.convertPngToBase64("https://img.idmwx.com/asset/orm/logo_300x180.png")},methods:{async convertPngToBase64(t){try{const e=await(await fetch(t)).blob();return new Promise((r,n)=>{const i=new FileReader;i.onloadend=()=>r(i.result),i.onerror=n,i.readAsDataURL(e)})}catch(A){return console.warn("PNG conversion error:",A),t}}}},t5={class:"section brand-section flex-space"},r5={class:"logo-box flex-center"},n5={class:"logo"},i5={href:"https://fmp.idmwx.com",target:"_blank"},a5=["src"],s5={class:"report-box flex-space"},o5={class:"name flex-start"},l5={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},c5={class:"flex-start",style:{width:"100%"}},h5={class:"label-block flex-evenly",style:{flex:"1"}},u5={class:"flex-end",style:{flex:"2"}};function f5(t,A,e,r,n,i){return h.openBlock(),h.createElementBlock("div",t5,[h.createElementVNode("div",r5,[h.createElementVNode("div",n5,[h.createElementVNode("a",i5,[h.createElementVNode("img",{src:n.base64url},null,8,a5)]),A[0]||(A[0]=h.createElementVNode("a",{href:"https://fmp.idmwx.com",target:"_blank",style:{"text-decoration":"none"}},[h.createElementVNode("div",{class:"brand"},[h.createElementVNode("span",{style:{"text-decoration":"underline"}},"Weather Routing"),h.createElementVNode("div",{class:"company"},"Ocean Right Marine Service")])],-1))])]),h.createElementVNode("div",s5,[h.createElementVNode("div",o5,h.toDisplayString(e.name),1),h.createElementVNode("div",l5,[h.createElementVNode("div",c5,[h.createElementVNode("div",h5,[A[1]||(A[1]=h.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),h.createElementVNode("span",u5,h.toDisplayString(i.computeUTCTime(e.issued,"MMM-DD, YYYY")),1)])]),A[2]||(A[2]=h.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[h.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[h.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),h.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1))])])])}const Mp=eu(e5,[["render",f5],["__scopeId","data-v-b8e71ec0"]]);/*!
|
|
1
|
+
(function($t,te){typeof exports=="object"&&typeof module<"u"?te(exports,require("moment"),require("moment-timezone"),require("@element-plus/icons-vue"),require("@idm-plugin/geo"),require("vue"),require("echarts"),require("axios")):typeof define=="function"&&define.amd?define(["exports","moment","moment-timezone","@element-plus/icons-vue","@idm-plugin/geo","vue","echarts","axios"],te):($t=typeof globalThis<"u"?globalThis:$t||self,te($t["idmui-spot"]={},$t.moment,$t["moment-timezone"],$t["@element-plus/icons-vue"],$t["@idm-plugin/geo"],$t.Vue,$t.echarts,$t.axios))})(this,function($t,te,fe,nl,ga,h,Jy,ei){"use strict";function Zy(t){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return A.default=t,Object.freeze(A)}const Ke=Zy(Jy);var $y=Object.defineProperty,A5=(t,A,e)=>A in t?$y(t,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[A]=e,da=(t,A,e)=>(A5(t,typeof A!="symbol"?A+"":A,e),e);da(class{},"LEVEL",{Basic:1,Prime:2,Supper:1024});const Zh=class{static getWeatherLayer(A){return Zh.WEATHER_LAYERS.find(e=>e.key===A)}static getOtherLayer(A){return Zh.OTHER_LAYERS.find(e=>e.key===A)}};let $h=Zh;da($h,"WEATHER_LAYERS",[{weight:1,name:"Wind",key:"wind",h5:!0,enabled:!0,type:"json",particle:!0,format:"vector",atmos:!0},{weight:524288,name:"Wind Particle",key:"wind-particle",peer:{weight:1,key:"wind"},enabled:!0,hide:!0,type:"jpg",format:"jpg",atmos:!0},{weight:16,name:"Sig Waves",key:"sig-wave-height",h5:!0,enabled:!0,type:"json",format:"contourf"},{weight:4194304,name:"Sig Waves (JPG)",key:"sig-wave",peer:{weight:16,key:"sig-wave"},enabled:!0,hide:!0,type:"jpg",format:"jpg"},{weight:8388608,name:"Sig Waves (Contour)",key:"sig-wave-height-contour",peer:{weight:16,key:"sig-wave-contour"},enabled:!0,hide:!0,type:"json",format:"contour"},{weight:96,name:"Current",key:"current",vendor:"cmems",alias:"copernicus",merge:!0,h5:!0,enabled:!0,type:"json",particle:!0},{weight:1048576,name:"Current Particle",key:"current-particle",vendor:"cmems",alias:"copernicus",peer:{weight:96,key:"current"},enabled:!0,hide:!0,type:"jpg",format:"jpg"},{weight:256,name:"Tropicals",key:"tropicals",h5:!0,enabled:!0,type:"json"},{weight:4096,name:"Pressure",h5:!0,key:"prmsl",enabled:!0,type:"json",format:"contour",atmos:!0},{weight:8192,name:"Visibility",vendor:"gfs",key:"visibility",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0},{weight:262144,name:"Precip Acc",key:"precip3h",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0},{weight:6,name:"Swell",key:"swell",merge:!0,h5:!0,enabled:!0,type:"json",format:"contour"},{weight:2,name:"Swell Height",key:"swell-height",partly:!0,enabled:!0,type:"json",format:"contour"},{weight:4,name:"Swell Direction",key:"swell-direction",partly:!0,enabled:!0,type:"json",format:"scalar"},{weight:32,name:"Current Direction",key:"current-direction",vendor:"cmems",alias:"copernicus",partly:!0,enabled:!0,type:"json",format:"vector"},{weight:64,name:"Current Speed",key:"current-speed",vendor:"cmems",alias:"copernicus",partly:!0,enabled:!0,type:"json",format:"contourf"},{weight:512,name:"Pressure Contour",key:"prmsl-contour",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:1024,name:"Pressure Value",key:"prmsl-value",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:2048,name:"Pressure Front",key:"prmsl-front",partly:!0,enabled:!0,hide:!0,type:"json",format:"contour",atmos:!0},{weight:16384,name:"Ice Edge(OBS)",key:"ice-edge",vendor:"cmems",alias:"copernicus",enabled:!0,type:"jpg",format:"jpg",obs:!0,daily:!0},{weight:32768,name:"Ice Thick",key:"ice-thickness",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",daily:!0},{weight:65536,name:"Ice Cover",key:"ice-cover",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",daily:!0},{weight:131072,name:"Sea Surf. Temp.",key:"water-temp",vendor:"cmems",alias:"copernicus",h5:!0,enabled:!0,type:"jpg",format:"jpg",step:6},{weight:2097152,name:"Temp.",key:"temp",h5:!0,enabled:!0,type:"jpg",format:"jpg",atmos:!0}]),da($h,"OTHER_LAYERS",[{weight:1,name:"War Zones",key:"war-zones",h5:!0,enabled:!0,type:"json"},{weight:2,name:"GMDSS Areas",key:"gmdss-areas",h5:!0,enabled:!0,type:"json"},{weight:4,name:"ECA Zones",key:"eca-zones",h5:!0,enabled:!0,type:"json"},{weight:8,name:"Load Lines",key:"load-lines",h5:!0,enabled:!0,type:"json"},{weight:16,name:"HRA",key:"high-risk-area",enabled:!1,type:"json"},{weight:32,name:"Pirates",key:"pirates",enabled:!1,type:"json"},{weight:4096,name:"Alert Zones",key:"alert-zones",h5:!0,enabled:!0,type:"json"},{weight:64,name:"Ports",key:"ports",h5:!0,enabled:!0,type:"json"},{weight:128,name:"Time Zones",key:"time-zones",h5:!0,enabled:!0,type:"json"},{weight:256,name:"VRA",key:"voluntary-reporting-area",h5:!0,enabled:!0,type:"json"},{weight:512,name:"Special Areas",key:"special-area",h5:!0,enabled:!0,type:"json"},{weight:1024,name:"Day/Night",key:"day-night",h5:!0,enabled:!0,type:"json"},{weight:2048,name:"ENC",key:"enc",h5:!0,enabled:!0,type:"origin"},{weight:8192,name:"12nm",key:"world12nm",h5:!1,enabled:!0,type:"origin"},{weight:16384,name:"Sea Area",key:"worldMarine",h5:!1,enabled:!0,type:"origin"},{weight:32768,name:"China Route",key:"chinaRoute",h5:!1,enabled:!0,type:"origin"}]);let Au=class{};da(Au,"WEATHER_TAG",[{weight:4,name:"Adverse Weather Dangerous",key:"DANGEROUS",positive:!0},{weight:2,name:"Adverse Weather Severe",key:"SEVERE",positive:!0},{weight:1,name:"Adverse Weather Heavy",key:"HEAVY",positive:!0}]),da(Au,"SAILING_TAG",[{weight:2048,name:"Deviation",key:"deviation",positive:!0},{weight:4096,name:"Stoppage",key:"stoppage",positive:!0},{weight:8192,name:"Deceleration",key:"deceleration",positive:!0},{weight:16384,name:"Slow Speed",key:"slowSpeed",positive:!0},{weight:32768,name:"No Noon",key:"noNoon",positive:!0},{weight:65536,name:"AIS LOSS",key:"aisLoss",positive:!0}]),da(Au,"OTHER_TAG",[{weight:2097152,name:"No CP",key:"noCp",positive:!0},{weight:4194304,name:"Send Rpt",key:"sendRpt",positive:!1},{weight:8388608,name:"Send Bps",key:"sendBps",positive:!1},{weight:16777216,name:"Send Pvar",key:"sendPvar",positive:!1},{weight:33554432,name:"Checked",key:"checked",positive:!1},{weight:67108864,name:"Not Send PWFR",key:"notSendPwfr",positive:!0}]);const xs=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"GFS",alias:"GFS",model:"gfs_seamless",provider:"NOAA",country:"United States",resolution:25,tips:"3-25km",length:16,frequency:1,models:["gfs_seamless"],categories:"ncep_gfs013,ncep_gfs025,ncep_gfs_graphcast025,ncep_hrrr_conus,ncep_nbm_conus",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:2,name:"ECMWF",alias:"ECMWF",model:"ecmwf_ifs025",provider:"ECMWF",country:"European Union",resolution:25,tips:"25km",length:15,frequency:6,models:["ecmwf_ifs025","ecmwf_aifs025_single"],categories:"ecmwf_ifs025,ecmwf_aifs025_single",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:3,disabled:!0,name:"ICON",alias:"ECMWF",model:"icon_seamless",provider:"Deutscher Wetterdienst (DWD)",country:"Germany",resolution:13,tips:"2-13km",length:7.5,frequency:3,models:["icon_seamless","icon_global","icon_eu","icon_d2"],categories:"dwd_icon,dwd_icon_eps,dwd_icon_d2,dwd_icon_d2_eps,dwd_icon_eu,dwd_icon_eu_eps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:4,name:"ARPEGE",disabled:!0,alias:"ECMWF",model:"arpege_seamless",provider:"Météo-France",country:"France",resolution:25,tips:"1-25km",length:4,frequency:1,models:["arpege_seamless","arpege_world","arpege_europe"],categories:"meteofrance_arpege_europe,meteofrance_arpege_europe_probabilities,meteofrance_arpege_world025",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:5,name:"UKMO",disabled:!0,alias:"ECMWF",model:"ukmo_seamless",provider:"UK Met Office",country:"United Kingdom",resolution:10,tips:"2-10km",length:7,frequency:1,models:["ukmo_seamless","ukmo_global_deterministic_10km","ukmo_uk_deterministic_2km"],categories:"ukmo_global_deterministic_10km,ukmo_uk_deterministic_2km",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:6,name:"JMA",disabled:!0,alias:"GFS",model:"jma_seamless",provider:"JMA",country:"Japan",resolution:55,tips:"5-55km",length:11,frequency:3,models:["jma_seamless","jma_msm","jma_gsm"],categories:"jma_gsm,jma_msm",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:7,name:"GEM",disabled:!0,alias:"GFS",model:"gem_seamless",provider:"Canadian Weather Service",country:"Canada",resolution:2.5,tips:"2.5km",length:10,frequency:6,models:["gem_seamless","gem_global","gem_regional"],categories:"cmc_gem_gdps,cmc_gem_hrdps,cmc_gem_rdps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:8,name:"GRAPES",disabled:!0,alias:"GFS",model:"cma_grapes_global",provider:"China Meteorological Administration (CMA)",country:"China",resolution:15,tips:"15km",length:10,frequency:6,models:["cma_grapes_global"],categories:"cma_grapes_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:9,name:"ACCESS-G",disabled:!0,alias:"GFS",model:"bom_access_global",provider:"Australian Bureau of Meteorology (BOM)",country:"Australia",resolution:15,tips:"15km",length:10,frequency:6,models:["bom_access_global"],categories:"bom_access_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"}],Is=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"MFWAM",alias:"ECMWF",model:"meteofrance_wave",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:12,models:["meteofrance_wave"],categories:"meteofrance_wave",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:2,disabled:!0,name:"SMOC",alias:"ECMWF",model:"meteofrance_currents",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:24,models:["meteofrance_currents"],categories:"meteofrance_currents, meteofrance_sea_surface_temperature",variables:"ocean_u_current,ocean_v_current,invert_barometer_height,sea_level_height_msl,sea_surface_temperature"},{rank:3,disabled:!0,name:"EWAM",alias:"ECMWF",model:"ewam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:8,frequency:2,models:["ewam"],categories:"dwd_ewam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:4,disabled:!0,name:"GWAM",alias:"ECMWF",model:"gwam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:4,frequency:2,models:["gwam"],categories:"dwd_gwam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:5,disabled:!0,name:"ECWAM",alias:"ECMWF",model:"ecmwf_wam025",provider:"ECMWF",country:"Europe",resolution:25,tips:"25km",length:10,frequency:6,models:["ecmwf_wam025"],categories:"ecmwf_wam025",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:6,name:"GFSWave",alias:"GFS",model:"ncep_gfswave025",provider:"NCEP",country:"USA",resolution:25,tips:"25km",length:10,frequency:6,models:["ncep_gfswave025","ncep_gfswave016"],categories:"ncep_gfswave025,ncep_gfswave016",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:7,disabled:!0,name:"ERA5-Ocean",alias:"ECMWF",model:"era5_ocean",provider:"Copernicus",country:"Europe",resolution:50,tips:"50km",length:-5,frequency:1,models:["era5_ocean"],categories:"copernicus_era5_ocean",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"}];class Dr{static standardWeatherModels(){return xs.filter(A=>!A.disabled&&A.alias)}static standardMarineModels(){return Is.filter(A=>!A.disabled&&A.alias)}static autoPickLayerModel(A,e="copernicus"){return e=e||"copernicus",e=e==null?void 0:e.toLowerCase(),e=["gfs","ecmwf","copernicus"].includes(e)?e:"copernicus",A=A==null?void 0:A.toLowerCase(),A==="gfs"?"gfs":["ec","ecmwf"].includes(A)?"ecmwf":["copernicus","cmems"].includes(A)?"copernicus":e}static autoPickPeerModel(A,e,r="copernicus"){if(e=this.autoPickLayerModel(e,r),$h.WEATHER_LAYERS.reduce((n,i)=>i.atmos?n+i.weight:n,0)&A.weight){if(e==="copernicus")return"ecmwf"}else if(e==="ecmwf")return"copernicus";return e}static autoPickMeteoModel(A="best_match"){var e,r;A=A==null?void 0:A.toLowerCase(),A=A==="ec"?"ecmwf":A;const n=A.toLowerCase().split(","),i=[],a=[];for(const s of n){let o=xs.find(u=>{var d,p,g;return((d=u.models)==null?void 0:d.includes(s))||((p=u.alias)==null?void 0:p.toLowerCase())===s||((g=u.name)==null?void 0:g.toLowerCase())===s}),c=Is.find(u=>{var d,p,g;return((d=u.models)==null?void 0:d.includes(s))||((p=u.alias)==null?void 0:p.toLowerCase())===s||((g=u.name)==null?void 0:g.toLowerCase())===s});o=o||xs.find(u=>{var d,p;return((d=u.alias)==null?void 0:d.toLowerCase())===((p=c==null?void 0:c.alias)==null?void 0:p.toLowerCase())}),c=c||Is.find(u=>{var d,p;return((d=u.alias)==null?void 0:d.toLowerCase())===((p=o==null?void 0:o.alias)==null?void 0:p.toLowerCase())}),o=o||xs[0],c=c||Is[0],i.push((e=o.models)!=null&&e.includes(s)?s:o.model),a.push((r=c.models)!=null&&r.includes(s)?s:c.model)}return{weatherModels:i.join(","),marineModels:a.join(",")}}static autoPickSubCategories(A){A=A.toUpperCase();const e=xs.filter(i=>i.alias===A),r=Is.filter(i=>i.alias===A),n=[];return e.forEach(i=>{i.categories&&n.push(...i.categories.split(","))}),r.forEach(i=>{i.categories&&n.push(...i.categories.split(","))}),n}static pickHourly(A,e){var r,n,i,a,s,o,c,u,d,p,g,m,v,b,C,E,N,k,j,z,K,P,X,nA,D,Q,_,R,eA,AA,W,Z,$,tA,dA,x,H,M,S,J,aA,fA,gA,bA,QA,FA,NA,kA,pA,G;const KA=typeof e=="string"?te(e):e,lA=A==null?void 0:A.weather,BA=A==null?void 0:A.marine,TA=te((n=(r=lA==null?void 0:lA[0])==null?void 0:r.hourly)==null?void 0:n.date).utc(),rA=TA.clone().add((s=(a=(i=lA==null?void 0:lA[0])==null?void 0:i.hourly)==null?void 0:a.time)==null?void 0:s.at(0),"h"),UA=TA.clone().add((u=(c=(o=lA==null?void 0:lA[0])==null?void 0:o.hourly)==null?void 0:c.time)==null?void 0:u.at(-1),"h"),jA=[];if(KA.isBetween(rA,UA,"millisecond","[]")){const xA=KA.utc().diff(rA,"h",!1);let YA,qA;if(lA){let Y=0,DA=0;for(const vA of lA){const OA=vA==null?void 0:vA.hourly;for(let ee=xA-(xA-1)%3;ee<=xA;ee++)Y+=(d=OA==null?void 0:OA.precipitation)==null?void 0:d.at(ee);for(let ee=xA-(xA-1)%6;ee<=xA;ee++)DA+=(p=OA==null?void 0:OA.precipitation)==null?void 0:p.at(ee);YA={temp:(g=OA==null?void 0:OA.temperature_2m)==null?void 0:g.at(xA),apparentTemp:(m=OA==null?void 0:OA.apparent_temperature)==null?void 0:m.at(xA),rh:(v=OA==null?void 0:OA.relative_humidity_2m)==null?void 0:v.at(xA),dp:(b=OA==null?void 0:OA.dew_point_2m)==null?void 0:b.at(xA),precip:{probability:(C=OA==null?void 0:OA.precipitation_probability)==null?void 0:C.at(xA),sum:(E=OA==null?void 0:OA.precipitation)==null?void 0:E.at(xA),sum3Hours:Math.round(Y*100)/100,sum6Hours:Math.round(DA*100)/100},pmsl:(N=OA==null?void 0:OA.pressure_msl)==null?void 0:N.at(xA),psurf:(k=OA==null?void 0:OA.surface_pressure)==null?void 0:k.at(xA),code:(j=OA==null?void 0:OA.weather_code)==null?void 0:j.at(xA),visibility:this.m2nm((z=OA==null?void 0:OA.visibility)==null?void 0:z.at(xA)),wind:{speed:(K=OA==null?void 0:OA.wind_speed_10m)==null?void 0:K.at(xA),kts:(P=OA==null?void 0:OA.wind_speed_10m)==null?void 0:P.at(xA),degree:(X=OA==null?void 0:OA.wind_direction_10m)==null?void 0:X.at(xA),bearing:((nA=OA==null?void 0:OA.wind_direction_10m)==null?void 0:nA.at(xA))!==null?(((D=OA==null?void 0:OA.wind_direction_10m)==null?void 0:D.at(xA))+180)%360:null,gusts:(Q=OA==null?void 0:OA.wind_gusts_10m)==null?void 0:Q.at(xA)},isDay:(_=OA==null?void 0:OA.is_day)==null?void 0:_.at(xA)};const{name:EA,url:cA,bg:SA}=this.parseWeatherCode(YA.code,YA.isDay);YA.name=EA,YA.url=cA,YA.bg=SA,YA.wind.scale=this.beaufort(this.kts2ms(YA.wind.kts)),YA.wind.direction=this.degree2Direction(YA.wind.degree),jA.push({utc:rA.add(xA,"h").format(),model:vA.model,weather:{...YA}})}}if(BA){let Y=0;for(const DA of BA){const vA=DA==null?void 0:DA.hourly;qA={wave:{sig:{height:(R=vA==null?void 0:vA.wave_height)==null?void 0:R.at(xA),degree:(eA=vA==null?void 0:vA.wave_direction)==null?void 0:eA.at(xA),bearing:((AA=vA==null?void 0:vA.wave_direction)==null?void 0:AA.at(xA))!==null?(((W=vA==null?void 0:vA.wave_direction)==null?void 0:W.at(xA))+180)%360:null,period:(Z=vA==null?void 0:vA.wave_period)==null?void 0:Z.at(xA)},swell:{height:($=vA==null?void 0:vA.swell_wave_height)==null?void 0:$.at(xA),degree:(tA=vA==null?void 0:vA.swell_wave_direction)==null?void 0:tA.at(xA),bearing:((dA=vA==null?void 0:vA.swell_wave_direction)==null?void 0:dA.at(xA))!==null?(((x=vA==null?void 0:vA.swell_wave_direction)==null?void 0:x.at(xA))+180)%360:null,period:(H=vA==null?void 0:vA.swell_wave_period)==null?void 0:H.at(xA),peakPeriod:(M=vA==null?void 0:vA.swell_wave_peak_period)==null?void 0:M.at(xA)},wd:{height:(S=vA==null?void 0:vA.wind_wave_height)==null?void 0:S.at(xA),degree:(J=vA==null?void 0:vA.wind_wave_direction)==null?void 0:J.at(xA),bearing:((aA=vA==null?void 0:vA.wind_wave_direction)==null?void 0:aA.at(xA))!==null?(((fA=vA==null?void 0:vA.wind_wave_direction)==null?void 0:fA.at(xA))+180)%360:null,period:(gA=vA==null?void 0:vA.wind_wave_period)==null?void 0:gA.at(xA),peakPeriod:(bA=vA==null?void 0:vA.wind_wave_peak_period)==null?void 0:bA.at(xA)}},current:{speed:(QA=vA==null?void 0:vA.ocean_current_velocity)==null?void 0:QA.at(xA),kts:(FA=vA==null?void 0:vA.ocean_current_velocity)==null?void 0:FA.at(xA),degree:(NA=vA==null?void 0:vA.ocean_current_direction)==null?void 0:NA.at(xA),bearing:((kA=vA==null?void 0:vA.ocean_current_direction)==null?void 0:kA.at(xA))??null},sst:(pA=vA==null?void 0:vA.sea_surface_temperature)==null?void 0:pA.at(xA),height:(G=vA==null?void 0:vA.sea_level_height_msl)==null?void 0:G.at(xA)},qA.wave=this.parseWave(qA.wave,YA==null?void 0:YA.wind),qA.current.direction=this.degree2Direction(qA.current.degree),Object.assign(jA[Y],qA),Y++}}}return jA}static toLegacy(A){var e,r,n,i,a,s,o,c,u,d;return{wind:(e=A==null?void 0:A.weather)==null?void 0:e.wind,visibility:(r=A==null?void 0:A.weather)==null?void 0:r.visibility,temp:(n=A==null?void 0:A.weather)==null?void 0:n.temp,prmsl:(i=A==null?void 0:A.weather)==null?void 0:i.pmsl,gusts:{kts:(s=(a=A==null?void 0:A.weather)==null?void 0:a.wind)==null?void 0:s.gusts},precip:(o=A==null?void 0:A.weather)==null?void 0:o.precip,code:(c=A==null?void 0:A.weather)==null?void 0:c.code,name:(u=A==null?void 0:A.weather)==null?void 0:u.name,url:(d=A==null?void 0:A.weather)==null?void 0:d.url,wave:A==null?void 0:A.wave,current:A==null?void 0:A.current,sst:A==null?void 0:A.sst,height:A==null?void 0:A.height,utc:A==null?void 0:A.utc,source:A==null?void 0:A.model}}static pickDaily(A,e){var r,n,i,a,s,o,c,u,d,p,g,m,v,b,C,E,N,k,j,z,K,P,X,nA,D,Q,_,R,eA,AA,W,Z,$,tA,dA,x,H,M,S,J,aA,fA,gA,bA;const QA=typeof e=="string"?te(e):e,FA=A==null?void 0:A.weather,NA=A==null?void 0:A.marine,kA=te((i=(n=(r=FA==null?void 0:FA[0])==null?void 0:r.daily)==null?void 0:n.time)==null?void 0:i.at(0)),pA=te((o=(s=(a=FA==null?void 0:FA[0])==null?void 0:a.daily)==null?void 0:s.time)==null?void 0:o.at(-1)),G=[];if(QA.isBetween(kA,pA,"millisecond","[]")){let KA,lA;const BA=QA.diff(kA,"d",!1);if(FA)for(const TA of FA){const rA=TA.daily;KA={code:(c=rA.weather_code)==null?void 0:c.at(BA),temp:{max:(u=rA.temperature_2m_max)==null?void 0:u.at(BA),min:(d=rA.temperature_2m_min)==null?void 0:d.at(BA),mean:(p=rA.temperature_2m_mean)==null?void 0:p.at(BA)},apparentTemp:{max:(g=rA.apparent_temperature_max)==null?void 0:g.at(BA),min:(m=rA.apparent_temperature_min)==null?void 0:m.at(BA)},precip:{sum:(v=rA.precipitation_sum)==null?void 0:v.at(BA),rainSum:(b=rA.rain_sum)==null?void 0:b.at(BA),snowfallSum:(C=rA.snowfall_sum)==null?void 0:C.at(BA),showersSum:(E=rA.showers_sum)==null?void 0:E.at(BA),hours:(N=rA.precipitation_hours)==null?void 0:N.at(BA),probability:(k=rA.precipitation_probability_max)==null?void 0:k.at(BA)},rh:{max:(j=rA.relative_humidity_2m_max)==null?void 0:j.at(BA),min:(z=rA.relative_humidity_2m_min)==null?void 0:z.at(BA),mean:(K=rA.relative_humidity_2m_mean)==null?void 0:K.at(BA)},wind:{speed:(P=rA.wind_speed_10m_max)==null?void 0:P.at(BA),kts:(X=rA.wind_speed_10m_max)==null?void 0:X.at(BA),degree:(nA=rA.wind_direction_10m_dominant)==null?void 0:nA.at(BA),gusts:(D=rA.wind_gusts_10m_max)==null?void 0:D.at(BA),bearing:((Q=rA.wind_direction_10m_dominant)==null?void 0:Q.at(BA))!==null?(((_=rA.wind_direction_10m_dominant)==null?void 0:_.at(BA))+180)%360:null}};const{name:UA,url:jA,bg:xA}=this.parseWeatherCode(KA.code,!0);KA.name=UA,KA.url=jA,KA.bg=xA,KA.wind.scale=this.beaufort(this.kts2ms(KA.wind.kts)),KA.wind.direction=this.degree2Direction(KA.wind.degree),G.push({utc:kA.add(BA,"d").utc().format(),model:TA.model,weather:{...KA}})}if(NA){let TA=0;for(const rA of NA){const UA=rA.daily;lA={wave:{sig:{height:(R=UA.wave_height_max)==null?void 0:R.at(BA),degree:(eA=UA.wave_direction_dominant)==null?void 0:eA.at(BA),period:(AA=UA.wave_period_max)==null?void 0:AA.at(BA),bearing:((W=UA.wave_direction_dominant)==null?void 0:W.at(BA))!==null?(((Z=UA.wave_direction_dominant)==null?void 0:Z.at(BA))+180)%360:null},swell:{height:($=UA.swell_wave_height_max)==null?void 0:$.at(BA),degree:(tA=UA.swell_wave_direction_dominant)==null?void 0:tA.at(BA),period:(dA=UA.swell_wave_period_max)==null?void 0:dA.at(BA),peakPeriod:(x=UA.swell_wave_peak_period_max)==null?void 0:x.at(BA),bearing:((H=UA.swell_wave_direction_dominant)==null?void 0:H.at(BA))!==null?((M=UA.swell_wave_direction_dominant)==null?void 0:M.at(BA))%360:null},wd:{height:(S=UA.wind_wave_height_max)==null?void 0:S.at(BA),degree:(J=UA.wind_wave_direction_dominant)==null?void 0:J.at(BA),period:(aA=UA.wind_wave_period_max)==null?void 0:aA.at(BA),peakPeriod:(fA=UA.wind_wave_peak_period_max)==null?void 0:fA.at(BA),bearing:((gA=UA.wind_wave_direction_dominant)==null?void 0:gA.at(BA))!==null?(((bA=UA.wind_wave_direction_dominant)==null?void 0:bA.at(BA))+180)%360:null}}},lA.wave=this.parseWave(lA.wave,KA==null?void 0:KA.wind),Object.assign(G[TA],lA),TA++}}}return G}static parseWave(A,e){if(A.sig.direction=this.degree2Direction(A.sig.degree),A.swell.direction=this.degree2Direction(A.swell.degree),A.wd.direction=this.degree2Direction(A.wd.degree),A.sig.scale=this.douglas(A.sig.height),A.swell.scale=this.douglas(A.swell.height),A.wd.scale=this.douglas(A.wd.height),A.sig.height===0){const r=Math.sqrt(Math.pow(A.swell.height||0,2)+Math.pow(A.wd.height||0,2));A.sig.height=Math.round(r*100)/100}if(A.swell.height===0){const r=Math.sqrt(Math.abs(Math.pow(A.sig.height||0,2)-Math.pow(A.wd.height||0,2))),n=.28*Math.pow(this.kts2ms((e==null?void 0:e.kts)||0),2)/48.0665;A.swell.height=Math.round(Math.min(r,n)*100)/100}if(A.wd.height===0||A.wd.height>A.sig.height){const r=Math.sqrt(Math.abs(Math.pow(A.sig.height||0,2)-Math.pow(A.swell.height||0,2))),n=.28*Math.pow(this.kts2ms((e==null?void 0:e.kts)||0),2)/48.0665;A.wd.height=Math.round(Math.min(r,n)*100)/100}return A.swell.height>A.sig.height&&(A.swell.height=Math.round(A.sig.height*.76*100)/100),A.sig.period||(A.sig.period=Math.round(5*Math.sqrt(A.sig.height))),A.swell.period||(A.swell.period=Math.round(5*Math.sqrt(A.swell.height))),A.wd.period||(A.wd.period=Math.round(5*Math.sqrt(A.wd.height))),A}static parseWeatherCode(A,e){const r=this.weatherCode(A);return(e?r.day:r.night)||{}}static weatherCode(A){const e={code:A};switch(A){case 0:e.day={name:"Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},e.night={name:"Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 1:e.day={name:"Mainly Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},e.night={name:"Mainly Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 2:e.day={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"},e.night={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"};break;case 3:e.day={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"},e.night={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"};break;case 45:e.day={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},e.night={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 48:e.day={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},e.night={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 51:e.day={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 53:e.day={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 55:e.day={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 56:e.day={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 57:e.day={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 61:e.day={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 63:e.day={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 65:e.day={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 66:e.day={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 67:e.day={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 71:e.day={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 73:e.day={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 75:e.day={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 77:e.day={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 80:e.day={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 81:e.day={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 82:e.day={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 85:e.day={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 86:e.day={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},e.night={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 95:e.day={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 96:e.day={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 99:e.day={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},e.night={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break}return e}static kts2ms(A){return isNaN(A)||A===null?A:Math.round(A*1852/3600*1e4)/1e4}static kts2kmh(A){return isNaN(A)||A===null?A:A*1.852}static m2nm(A){return isNaN(A)||A===null?A:Math.round(A/1e3/1.852*1e4)/1e4}static kmh2kts(A){return isNaN(A)||A===null?A:this.ms2kts(A*1e3/3600)}static ms2kts(A){return isNaN(A)||A===null?A:Math.round(A*3600/1852*1e4)/1e4}static degree2Radian(A){if(isNaN(A)||A===null)return A;let e=A%360/360*2*Math.PI;return e=e<0?e+2*Math.PI:e,e}static degree2Direction(A){const e=this.degree2Radian(A);if(isNaN(e)||e===null)return null;let r="N/A";const n=Math.PI/16;return e<n?r="N":e>=n&&e<3*n?r="NNE":e>=3*n&&e<5*n?r="NE":e>=5*n&&e<7*n?r="ENE":e>=7*n&&e<9*n?r="E":e>=9*n&&e<11*n?r="ESE":e>=11*n&&e<13*n?r="SE":e>=13*n&&e<15*n?r="SSE":e>=15*n&&e<17*n?r="S":e>=17*n&&e<19*n?r="SSW":e>=19*n&&e<21*n?r="SW":e>=21*n&&e<23*n?r="WSW":e>=23*n&&e<25*n?r="W":e>=25*n&&e<27*n?r="WNW":e>=27*n&&e<29*n?r="NW":e>=29*n&&e<31*n?r="NNW":e>=31*n&&e<32*n&&(r="N"),r}static beaufort(A){let e=0;return isNaN(A)||(A=Math.round(A*10)/10,A<=.2?e=0:A<=1.5?e=1:A<=3.3?e=2:A<=5.4?e=3:A<=7.9?e=4:A<=10.7?e=5:A<=13.8?e=6:A<=17.1?e=7:A<=20.7?e=8:A<=22.4?e=9:A<=28.4?e=10:A<=32.6?e=11:A>32.6&&(e=12)),e}static douglas(A){let e="Calm";return isNaN(A)||A<=.1?e="Calm":A<=.5?e="Smooth":A<=1.25?e="Slight":A<=2.5?e="Moderate":A<=4?e="Rough":A<=6?e="VeryRough":A<=9?e="High":A<=14?e="VeryHigh":e="Precipitous",e}}const Dk="",eu=(t,A)=>{const e=t.__vccOpts||t;for(const[r,n]of A)e[r]=n;return e},e5={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:Number}},data(){return{base64url:""}},computed:{computeUTCTime(){return function(t,A="MMM-DD/HHmm[Z]"){return`${(t?te(t):te()).utc().format(A)}`}}},async mounted(){this.base64url=await this.convertPngToBase64("https://img.idmwx.com/asset/orm/logo_300x180.png")},methods:{async convertPngToBase64(t){try{const e=await(await fetch(t)).blob();return new Promise((r,n)=>{const i=new FileReader;i.onloadend=()=>r(i.result),i.onerror=n,i.readAsDataURL(e)})}catch(A){return console.warn("PNG conversion error:",A),t}}}},t5={class:"section brand-section flex-space"},r5={class:"logo-box flex-center"},n5={class:"logo"},i5={href:"https://fmp.idmwx.com",target:"_blank"},a5=["src"],s5={class:"report-box flex-space"},o5={class:"name flex-start"},l5={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},c5={class:"flex-start",style:{width:"100%"}},h5={class:"label-block flex-evenly",style:{flex:"1"}},u5={class:"flex-end",style:{flex:"2"}};function f5(t,A,e,r,n,i){return h.openBlock(),h.createElementBlock("div",t5,[h.createElementVNode("div",r5,[h.createElementVNode("div",n5,[h.createElementVNode("a",i5,[h.createElementVNode("img",{src:n.base64url},null,8,a5)]),A[0]||(A[0]=h.createElementVNode("a",{href:"https://fmp.idmwx.com",target:"_blank",style:{"text-decoration":"none"}},[h.createElementVNode("div",{class:"brand"},[h.createElementVNode("span",{style:{"text-decoration":"underline"}},"Weather Routing"),h.createElementVNode("div",{class:"company"},"Ocean Right Marine Service")])],-1))])]),h.createElementVNode("div",s5,[h.createElementVNode("div",o5,h.toDisplayString(e.name),1),h.createElementVNode("div",l5,[h.createElementVNode("div",c5,[h.createElementVNode("div",h5,[A[1]||(A[1]=h.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),h.createElementVNode("span",u5,h.toDisplayString(i.computeUTCTime(e.issued,"MMM-DD, YYYY")),1)])]),A[2]||(A[2]=h.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[h.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[h.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),h.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1))])])])}const Mp=eu(e5,[["render",f5],["__scopeId","data-v-b8e71ec0"]]);/*!
|
|
2
2
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
3
3
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
4
4
|
* Released under MIT License
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idmui/spot",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "idm ui spot",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@idm-plugin/geo": "^1.8.5",
|
|
42
|
-
"@idm-plugin/meteo": "^0.5.
|
|
42
|
+
"@idm-plugin/meteo": "^0.5.4",
|
|
43
43
|
"@idmui/brand": "^0.0.2",
|
|
44
44
|
"@idmui/style": "^0.1.7"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@idm-plugin/geo": "^1.8.6",
|
|
48
|
-
"@idm-plugin/meteo": "^0.5.
|
|
48
|
+
"@idm-plugin/meteo": "^0.5.4",
|
|
49
49
|
"@idm-plugin/tag": "^0.2.3",
|
|
50
50
|
"@idmui/brand": "^0.0.2",
|
|
51
51
|
"@idmui/style": "^0.1.7",
|