@signalk/freeboard-sk 2.0.0-beta.2 → 2.0.0-beta.3

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/package.json +23 -19
  3. package/public/825.1f150975e9b76d8a.js +1 -0
  4. package/public/assets/help/img/settings_course.png +0 -0
  5. package/public/assets/help/index.html +31 -6
  6. package/public/assets/img/alarms/weather.png +0 -0
  7. package/public/index.html +2 -2
  8. package/public/main.5c6ba1b2f2e8677e.js +1 -0
  9. package/public/polyfills.12ddee7e4cb46a02.js +1 -0
  10. package/public/runtime.f37695a1bd6595d8.js +1 -0
  11. package/public/styles.a0bf4282aea78b28.css +1 -0
  12. package/dist/fb-openlayers/README.md +0 -17
  13. package/dist/fb-openlayers/bundles/fb-openlayers.umd.js +0 -4884
  14. package/dist/fb-openlayers/bundles/fb-openlayers.umd.js.map +0 -1
  15. package/dist/fb-openlayers/esm2015/fb-openlayers.js +0 -5
  16. package/dist/fb-openlayers/esm2015/index.js +0 -92
  17. package/dist/fb-openlayers/esm2015/lib/alarms/layer-anchor-alarm.component.js +0 -136
  18. package/dist/fb-openlayers/esm2015/lib/alarms/layer-cpa-alarm.component.js +0 -135
  19. package/dist/fb-openlayers/esm2015/lib/content.component.js +0 -16
  20. package/dist/fb-openlayers/esm2015/lib/control.component.js +0 -37
  21. package/dist/fb-openlayers/esm2015/lib/controls.directive.js +0 -61
  22. package/dist/fb-openlayers/esm2015/lib/interactions/interaction-draw.component.js +0 -72
  23. package/dist/fb-openlayers/esm2015/lib/interactions/interaction-modify.component.js +0 -72
  24. package/dist/fb-openlayers/esm2015/lib/interactions.directive.js +0 -61
  25. package/dist/fb-openlayers/esm2015/lib/layer.component.js +0 -157
  26. package/dist/fb-openlayers/esm2015/lib/map.component.js +0 -206
  27. package/dist/fb-openlayers/esm2015/lib/map.service.js +0 -70
  28. package/dist/fb-openlayers/esm2015/lib/models.js +0 -37
  29. package/dist/fb-openlayers/esm2015/lib/navigation/layer-arrival-circle.component.js +0 -116
  30. package/dist/fb-openlayers/esm2015/lib/navigation/layer-bearing-line.component.js +0 -229
  31. package/dist/fb-openlayers/esm2015/lib/navigation/layer-xte-path.component.js +0 -120
  32. package/dist/fb-openlayers/esm2015/lib/overlay.component.js +0 -56
  33. package/dist/fb-openlayers/esm2015/lib/resources/layer-charts.component.js +0 -141
  34. package/dist/fb-openlayers/esm2015/lib/resources/layer-notes.component.js +0 -177
  35. package/dist/fb-openlayers/esm2015/lib/resources/layer-regions.component.js +0 -184
  36. package/dist/fb-openlayers/esm2015/lib/resources/layer-resourceset.component.js +0 -226
  37. package/dist/fb-openlayers/esm2015/lib/resources/layer-routes.component.js +0 -188
  38. package/dist/fb-openlayers/esm2015/lib/resources/layer-sktarget-tracks.component.js +0 -213
  39. package/dist/fb-openlayers/esm2015/lib/resources/layer-sktargets.component.js +0 -269
  40. package/dist/fb-openlayers/esm2015/lib/resources/layer-skvessels.component.js +0 -410
  41. package/dist/fb-openlayers/esm2015/lib/resources/layer-tracks.component.js +0 -175
  42. package/dist/fb-openlayers/esm2015/lib/resources/layer-waypoints.component.js +0 -238
  43. package/dist/fb-openlayers/esm2015/lib/util.js +0 -124
  44. package/dist/fb-openlayers/esm2015/lib/vessel/layer-vessel-trail.component.js +0 -178
  45. package/dist/fb-openlayers/esm2015/lib/vessel/layer-vessel.component.js +0 -229
  46. package/dist/fb-openlayers/esm2015/lib/view.directive.js +0 -141
  47. package/dist/fb-openlayers/fb-openlayers.d.ts +0 -5
  48. package/dist/fb-openlayers/fb-openlayers.d.ts.map +0 -1
  49. package/dist/fb-openlayers/fb-openlayers.metadata.json +0 -1
  50. package/dist/fb-openlayers/fesm2015/fb-openlayers.js +0 -4326
  51. package/dist/fb-openlayers/fesm2015/fb-openlayers.js.map +0 -1
  52. package/dist/fb-openlayers/index.d.ts +0 -33
  53. package/dist/fb-openlayers/index.d.ts.map +0 -1
  54. package/dist/fb-openlayers/index.ngfactory.d.ts.map +0 -1
  55. package/dist/fb-openlayers/lib/alarms/layer-anchor-alarm.component.d.ts +0 -44
  56. package/dist/fb-openlayers/lib/alarms/layer-anchor-alarm.component.d.ts.map +0 -1
  57. package/dist/fb-openlayers/lib/alarms/layer-anchor-alarm.component.ngfactory.d.ts.map +0 -1
  58. package/dist/fb-openlayers/lib/alarms/layer-cpa-alarm.component.d.ts +0 -39
  59. package/dist/fb-openlayers/lib/alarms/layer-cpa-alarm.component.d.ts.map +0 -1
  60. package/dist/fb-openlayers/lib/alarms/layer-cpa-alarm.component.ngfactory.d.ts.map +0 -1
  61. package/dist/fb-openlayers/lib/content.component.d.ts +0 -6
  62. package/dist/fb-openlayers/lib/content.component.d.ts.map +0 -1
  63. package/dist/fb-openlayers/lib/content.component.ngfactory.d.ts.map +0 -1
  64. package/dist/fb-openlayers/lib/control.component.d.ts +0 -14
  65. package/dist/fb-openlayers/lib/control.component.d.ts.map +0 -1
  66. package/dist/fb-openlayers/lib/control.component.ngfactory.d.ts.map +0 -1
  67. package/dist/fb-openlayers/lib/controls.directive.d.ts +0 -14
  68. package/dist/fb-openlayers/lib/controls.directive.d.ts.map +0 -1
  69. package/dist/fb-openlayers/lib/controls.directive.ngfactory.d.ts.map +0 -1
  70. package/dist/fb-openlayers/lib/interactions/interaction-draw.component.d.ts +0 -27
  71. package/dist/fb-openlayers/lib/interactions/interaction-draw.component.d.ts.map +0 -1
  72. package/dist/fb-openlayers/lib/interactions/interaction-draw.component.ngfactory.d.ts.map +0 -1
  73. package/dist/fb-openlayers/lib/interactions/interaction-modify.component.d.ts +0 -26
  74. package/dist/fb-openlayers/lib/interactions/interaction-modify.component.d.ts.map +0 -1
  75. package/dist/fb-openlayers/lib/interactions/interaction-modify.component.ngfactory.d.ts.map +0 -1
  76. package/dist/fb-openlayers/lib/interactions.directive.d.ts +0 -14
  77. package/dist/fb-openlayers/lib/interactions.directive.d.ts.map +0 -1
  78. package/dist/fb-openlayers/lib/interactions.directive.ngfactory.d.ts.map +0 -1
  79. package/dist/fb-openlayers/lib/layer.component.d.ts +0 -41
  80. package/dist/fb-openlayers/lib/layer.component.d.ts.map +0 -1
  81. package/dist/fb-openlayers/lib/layer.component.ngfactory.d.ts.map +0 -1
  82. package/dist/fb-openlayers/lib/map.component.d.ts +0 -71
  83. package/dist/fb-openlayers/lib/map.component.d.ts.map +0 -1
  84. package/dist/fb-openlayers/lib/map.component.ngfactory.d.ts.map +0 -1
  85. package/dist/fb-openlayers/lib/map.component.scss.shim.ngstyle.d.ts.map +0 -1
  86. package/dist/fb-openlayers/lib/map.service.d.ts +0 -19
  87. package/dist/fb-openlayers/lib/map.service.d.ts.map +0 -1
  88. package/dist/fb-openlayers/lib/map.service.ngfactory.d.ts.map +0 -1
  89. package/dist/fb-openlayers/lib/models.d.ts +0 -42
  90. package/dist/fb-openlayers/lib/models.d.ts.map +0 -1
  91. package/dist/fb-openlayers/lib/navigation/layer-arrival-circle.component.d.ts +0 -39
  92. package/dist/fb-openlayers/lib/navigation/layer-arrival-circle.component.d.ts.map +0 -1
  93. package/dist/fb-openlayers/lib/navigation/layer-arrival-circle.component.ngfactory.d.ts.map +0 -1
  94. package/dist/fb-openlayers/lib/navigation/layer-bearing-line.component.d.ts +0 -49
  95. package/dist/fb-openlayers/lib/navigation/layer-bearing-line.component.d.ts.map +0 -1
  96. package/dist/fb-openlayers/lib/navigation/layer-bearing-line.component.ngfactory.d.ts.map +0 -1
  97. package/dist/fb-openlayers/lib/navigation/layer-xte-path.component.d.ts +0 -39
  98. package/dist/fb-openlayers/lib/navigation/layer-xte-path.component.d.ts.map +0 -1
  99. package/dist/fb-openlayers/lib/navigation/layer-xte-path.component.ngfactory.d.ts.map +0 -1
  100. package/dist/fb-openlayers/lib/overlay.component.d.ts +0 -25
  101. package/dist/fb-openlayers/lib/overlay.component.d.ts.map +0 -1
  102. package/dist/fb-openlayers/lib/overlay.component.ngfactory.d.ts.map +0 -1
  103. package/dist/fb-openlayers/lib/resources/layer-charts.component.d.ts +0 -20
  104. package/dist/fb-openlayers/lib/resources/layer-charts.component.d.ts.map +0 -1
  105. package/dist/fb-openlayers/lib/resources/layer-charts.component.ngfactory.d.ts.map +0 -1
  106. package/dist/fb-openlayers/lib/resources/layer-notes.component.d.ts +0 -51
  107. package/dist/fb-openlayers/lib/resources/layer-notes.component.d.ts.map +0 -1
  108. package/dist/fb-openlayers/lib/resources/layer-notes.component.ngfactory.d.ts.map +0 -1
  109. package/dist/fb-openlayers/lib/resources/layer-regions.component.d.ts +0 -53
  110. package/dist/fb-openlayers/lib/resources/layer-regions.component.d.ts.map +0 -1
  111. package/dist/fb-openlayers/lib/resources/layer-regions.component.ngfactory.d.ts.map +0 -1
  112. package/dist/fb-openlayers/lib/resources/layer-resourceset.component.d.ts +0 -49
  113. package/dist/fb-openlayers/lib/resources/layer-resourceset.component.d.ts.map +0 -1
  114. package/dist/fb-openlayers/lib/resources/layer-resourceset.component.ngfactory.d.ts.map +0 -1
  115. package/dist/fb-openlayers/lib/resources/layer-routes.component.d.ts +0 -52
  116. package/dist/fb-openlayers/lib/resources/layer-routes.component.d.ts.map +0 -1
  117. package/dist/fb-openlayers/lib/resources/layer-routes.component.ngfactory.d.ts.map +0 -1
  118. package/dist/fb-openlayers/lib/resources/layer-sktarget-tracks.component.d.ts +0 -44
  119. package/dist/fb-openlayers/lib/resources/layer-sktarget-tracks.component.d.ts.map +0 -1
  120. package/dist/fb-openlayers/lib/resources/layer-sktarget-tracks.component.ngfactory.d.ts.map +0 -1
  121. package/dist/fb-openlayers/lib/resources/layer-sktargets.component.d.ts +0 -51
  122. package/dist/fb-openlayers/lib/resources/layer-sktargets.component.d.ts.map +0 -1
  123. package/dist/fb-openlayers/lib/resources/layer-sktargets.component.ngfactory.d.ts.map +0 -1
  124. package/dist/fb-openlayers/lib/resources/layer-skvessels.component.d.ts +0 -60
  125. package/dist/fb-openlayers/lib/resources/layer-skvessels.component.d.ts.map +0 -1
  126. package/dist/fb-openlayers/lib/resources/layer-skvessels.component.ngfactory.d.ts.map +0 -1
  127. package/dist/fb-openlayers/lib/resources/layer-tracks.component.d.ts +0 -50
  128. package/dist/fb-openlayers/lib/resources/layer-tracks.component.d.ts.map +0 -1
  129. package/dist/fb-openlayers/lib/resources/layer-tracks.component.ngfactory.d.ts.map +0 -1
  130. package/dist/fb-openlayers/lib/resources/layer-waypoints.component.d.ts +0 -57
  131. package/dist/fb-openlayers/lib/resources/layer-waypoints.component.d.ts.map +0 -1
  132. package/dist/fb-openlayers/lib/resources/layer-waypoints.component.ngfactory.d.ts.map +0 -1
  133. package/dist/fb-openlayers/lib/util.d.ts +0 -19
  134. package/dist/fb-openlayers/lib/util.d.ts.map +0 -1
  135. package/dist/fb-openlayers/lib/vessel/layer-vessel-trail.component.d.ts +0 -45
  136. package/dist/fb-openlayers/lib/vessel/layer-vessel-trail.component.d.ts.map +0 -1
  137. package/dist/fb-openlayers/lib/vessel/layer-vessel-trail.component.ngfactory.d.ts.map +0 -1
  138. package/dist/fb-openlayers/lib/vessel/layer-vessel.component.d.ts +0 -55
  139. package/dist/fb-openlayers/lib/vessel/layer-vessel.component.d.ts.map +0 -1
  140. package/dist/fb-openlayers/lib/vessel/layer-vessel.component.ngfactory.d.ts.map +0 -1
  141. package/dist/fb-openlayers/lib/view.directive.d.ts +0 -44
  142. package/dist/fb-openlayers/lib/view.directive.d.ts.map +0 -1
  143. package/dist/fb-openlayers/lib/view.directive.ngfactory.d.ts.map +0 -1
  144. package/public/53.4babe18f9baabeea.js +0 -1
  145. package/public/main.a668c86ee67ed842.js +0 -1
  146. package/public/polyfills.1ba4e1a897c69e24.js +0 -1
  147. package/public/runtime.55118010dbcb6e60.js +0 -1
  148. package/public/styles.f013b594260c141e.css +0 -1
package/CHANGELOG.md CHANGED
@@ -30,6 +30,8 @@ __UPDATES:__
30
30
 
31
31
  - **Change**: Notes are only displayed on the map if they have a valid position. Notes attached to a resource / region are only available in the notes list of that resource.
32
32
 
33
+ - **Experiment**: Display Weather forecasts and warnings provided by `freeboard-sk-helper` plug-in. Ensure `freeboard-sk-helper` is configured using _Plugin Config_ on server dashboard. For more information see `freeboard-sk-helper` documentation.
34
+
33
35
 
34
36
  ### v1.19.0
35
37
 
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@signalk/freeboard-sk",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "Openlayers chartplotter implementation for Signal K",
5
5
  "keywords": [
6
6
  "signalk-webapp",
7
7
  "signalk-category-chart-plotters"
8
8
  ],
9
+ "signalk": {
10
+ "appIcon": "./assets/icons/icon-72x72.png",
11
+ "displayName": "Freeboard-SK"
12
+ },
9
13
  "repository": "https://github.com/SignalK/freeboard-sk",
10
14
  "scripts": {
11
15
  "ng": "ng",
@@ -29,20 +33,20 @@
29
33
  ],
30
34
  "license": "Apache-v2",
31
35
  "devDependencies": {
32
- "@angular-devkit/build-angular": "~13.2.6",
33
- "@angular/animations": "~13.2.6",
34
- "@angular/cdk": "^13.2.6",
35
- "@angular/cli": "~13.2.6",
36
- "@angular/common": "~13.2.6",
37
- "@angular/compiler": "~13.2.6",
38
- "@angular/compiler-cli": "~13.2.6",
39
- "@angular/core": "~13.2.6",
40
- "@angular/forms": "~13.2.6",
41
- "@angular/language-service": "~13.2.6",
42
- "@angular/material": "^13.2.6",
43
- "@angular/platform-browser": "~13.2.6",
44
- "@angular/platform-browser-dynamic": "~13.2.6",
45
- "@kolkov/angular-editor": "^2.0.0",
36
+ "@angular-devkit/build-angular": "^14.0.1",
37
+ "@angular/animations": "^14.0.1",
38
+ "@angular/cdk": "^14.0.1",
39
+ "@angular/cli": "^14.0.1",
40
+ "@angular/common": "^14.0.1",
41
+ "@angular/compiler": "^14.0.1",
42
+ "@angular/compiler-cli": "^14.0.1",
43
+ "@angular/core": "^14.0.1",
44
+ "@angular/forms": "^14.0.1",
45
+ "@angular/language-service": "^14.0.1",
46
+ "@angular/material": "^14.0.1",
47
+ "@angular/platform-browser": "^14.0.1",
48
+ "@angular/platform-browser-dynamic": "^14.0.1",
49
+ "@kolkov/angular-editor": "^2.1.0",
46
50
  "@types/jasmine": "~3.6.0",
47
51
  "@types/jasminewd2": "~2.0.3",
48
52
  "@types/node": "^12.11.1",
@@ -59,20 +63,20 @@
59
63
  "karma-coverage-istanbul-reporter": "~3.0.2",
60
64
  "karma-jasmine": "~4.0.0",
61
65
  "karma-jasmine-html-reporter": "^1.5.0",
62
- "ng-packagr": "^13.2.1",
66
+ "ng-packagr": "^14.0.2",
63
67
  "ngeohash": "^0.6.3",
64
- "ol": "6.5.0",
68
+ "ol": "^6.14.1",
65
69
  "prettier": "^2.5.1",
66
70
  "prettier-plugin-organize-attributes": "^0.0.5",
67
71
  "proj4": "2.6.2",
68
72
  "protractor": "~7.0.0",
69
73
  "rxjs": "~6.6.3",
70
74
  "signalk-client-angular": "^2.0.0-beta.rc1",
71
- "signalk-worker-angular": ">=1.1.3 <2.0.0",
75
+ "signalk-worker-angular": "^1.1.4-beta.2",
72
76
  "simplify-ts": "^1.0.2",
73
77
  "ts-node": "~7.0.0",
74
78
  "tslib": "^2.0.0",
75
- "typescript": "~4.5.5",
79
+ "typescript": "~4.7.3",
76
80
  "zone.js": "~0.11.4"
77
81
  }
78
82
  }
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var hg={7887:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=D(p(6984)),S=D(p(5010)),b=D(p(9601)),N=D(p(8302)),_=p(964);function D(m){return m&&m.__esModule?m:{default:m}}h.default=function(M,y,P){var O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,L=(0,E.default)(M),F=(0,S.default)(M),Y=y/O,ae=(0,b.default)(P),ye=(0,b.default)(L),se=(0,b.default)(F),Re=Math.asin(Math.sin(ye)*Math.cos(Y)+Math.cos(ye)*Math.sin(Y)*Math.cos(ae)),Ae=se+Math.atan2(Math.sin(ae)*Math.sin(Y)*Math.cos(ye),Math.cos(Y)-Math.sin(ye)*Math.sin(Re)),me=(0,N.default)(Ae);return(me<_.MINLON||me>_.MAXLON)&&(Ae=(Ae+3*Math.PI)%(2*Math.PI)-Math.PI,me=(0,N.default)(Ae)),{latitude:(0,N.default)(Re),longitude:me}}},964:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.areaConversion=h.timeConversion=h.distanceConversion=h.altitudeKeys=h.latitudeKeys=h.longitudeKeys=h.MAXLON=h.MINLON=h.MAXLAT=h.MINLAT=h.earthRadius=h.sexagesimalPattern=void 0,h.sexagesimalPattern=/^([0-9]{1,3})\xb0\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['\u2032]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["\u2033]\s*)?([NEOSW]?)$/,h.earthRadius=6378137,h.MINLAT=-90,h.MAXLAT=90,h.MINLON=-180,h.MAXLON=180,h.longitudeKeys=["lng","lon","longitude",0],h.latitudeKeys=["lat","latitude",1],h.altitudeKeys=["alt","altitude","elevation","elev",2],h.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144},h.timeConversion={m:60,h:3600,d:86400};var y={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};h.areaConversion=y,y.sqm=y.m2,y.sqkm=y.km2,y.sqft=y.ft2,y.sqyd=y.yd2,y.sqin=y.in2},8315:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964);h.default=function(_){var D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",I=E.areaConversion[D];if(I)return _*I;throw new Error("Invalid unit used for area conversion.")}},713:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964);h.default=function(_){var D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",I=E.distanceConversion[D];if(I)return _*I;throw new Error("Invalid unit used for distance conversion.")}},9173:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964);h.default=function(_){var D=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(D){case"kmh":return _*E.timeConversion.h*E.distanceConversion.km;case"mph":return _*E.timeConversion.h*E.distanceConversion.mi;default:return _}}},4974:(U,h)=>{function p(m,M){return function _(m){if(Array.isArray(m))return m}(m)||function N(m,M){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(m)){var y=[],P=!0,O=!1,L=void 0;try{for(var Y,F=m[Symbol.iterator]();!(P=(Y=F.next()).done)&&(y.push(Y.value),!M||y.length!==M);P=!0);}catch(ae){O=!0,L=ae}finally{try{!P&&null!=F.return&&F.return()}finally{if(O)throw L}}return y}}(m,M)||function S(m,M){if(m){if("string"==typeof m)return b(m,M);var y=Object.prototype.toString.call(m).slice(8,-1);if("Object"===y&&m.constructor&&(y=m.constructor.name),"Map"===y||"Set"===y)return Array.from(m);if("Arguments"===y||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return b(m,M)}}(m,M)||function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(m,M){(null==M||M>m.length)&&(M=m.length);for(var y=0,P=new Array(M);y<M;y++)P[y]=m[y];return P}Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(M){var P=p(M.toString().split("."),2),L=P[1],F=Math.abs(Number(P[0])),Y=60*Number("0."+(L||0)),ae=Y.toString().split("."),ye=Math.floor(Y),se=function(M){var P=Math.pow(10,arguments.length>1&&void 0!==arguments[1]?arguments[1]:4);return Math.round(M*P)/P}(60*Number("0."+(ae[1]||0))).toString(),Ae=p(se.split("."),2),me=Ae[0],fe=Ae[1],we=void 0===fe?"0":fe;return F+"\xb0 "+ye.toString().padStart(2,"0")+"' "+me.padStart(2,"0")+"."+we.padEnd(1,"0")+'"'}},1675:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(8252));h.default=function(D,I){return(0,E.default)(D,I)[0]}},4434:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(9601)),S=_(p(6984)),b=_(p(5010)),N=p(964);function _(v){return v&&v.__esModule?v:{default:v}}h.default=function(m){var M=0;if(m.length>2){for(var y,P,O,L=0;L<m.length;L++){L===m.length-2?(y=m.length-2,P=m.length-1,O=0):L===m.length-1?(y=m.length-1,P=0,O=1):(y=L,P=L+1,O=L+2);var F=(0,b.default)(m[y]),Y=(0,S.default)(m[P]),ae=(0,b.default)(m[O]);M+=((0,E.default)(ae)-(0,E.default)(F))*Math.sin((0,E.default)(Y))}M=M*N.earthRadius*N.earthRadius/2}return Math.abs(M)}},5744:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=b(p(6984)),S=b(p(5010));function b(D){return D&&D.__esModule?D:{default:D}}h.default=function(I){if(!1===Array.isArray(I)||0===I.length)throw new Error("No points were given.");return I.reduce(function(v,m){var M=(0,E.default)(m),y=(0,S.default)(m);return{maxLat:Math.max(M,v.maxLat),minLat:Math.min(M,v.minLat),maxLng:Math.max(y,v.maxLng),minLng:Math.min(y,v.minLng)}},{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}},2908:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=D(p(6984)),S=D(p(5010)),b=D(p(9601)),N=D(p(8302)),_=p(964);function D(m){return m&&m.__esModule?m:{default:m}}h.default=function(M,y){var fe,we,P=(0,E.default)(M),O=(0,S.default)(M),L=(0,b.default)(P),F=(0,b.default)(O),Y=y/_.earthRadius,ae=L-Y,ye=L+Y,se=(0,b.default)(_.MAXLAT),Re=(0,b.default)(_.MINLAT),Ae=(0,b.default)(_.MAXLON),me=(0,b.default)(_.MINLON);if(ae>Re&&ye<se){var Te=Math.asin(Math.sin(Y)/Math.cos(L));(fe=F-Te)<me&&(fe+=2*Math.PI),(we=F+Te)>Ae&&(we-=2*Math.PI)}else ae=Math.max(ae,Re),ye=Math.min(ye,se),fe=me,we=Ae;return[{latitude:(0,N.default)(ae),longitude:(0,N.default)(fe)},{latitude:(0,N.default)(ye),longitude:(0,N.default)(we)}]}},5582:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(6984)),S=_(p(5010)),b=_(p(9601)),N=_(p(8302));function _(v){return v&&v.__esModule?v:{default:v}}h.default=function(m){if(!1===Array.isArray(m)||0===m.length)return!1;var M=m.length,y=m.reduce(function(F,Y){var ae=(0,b.default)((0,E.default)(Y)),ye=(0,b.default)((0,S.default)(Y));return{X:F.X+Math.cos(ae)*Math.cos(ye),Y:F.Y+Math.cos(ae)*Math.sin(ye),Z:F.Z+Math.sin(ae)}},{X:0,Y:0,Z:0}),P=y.X/M,O=y.Y/M,L=y.Z/M;return{longitude:(0,N.default)(Math.atan2(O,P)),latitude:(0,N.default)(Math.atan2(L,Math.sqrt(P*P+O*O)))}}},6963:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(5744));h.default=function(D){var I=(0,E.default)(D),m=I.minLng+(I.maxLng-I.minLng)/2;return{latitude:parseFloat((I.minLat+(I.maxLat-I.minLat)/2).toFixed(6)),longitude:parseFloat(m.toFixed(6))}}},4629:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(2571));h.default=function(D,I){var v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.default,m="function"==typeof v?v(D,I):(0,E.default)(D,I);if(isNaN(m))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(m/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}},8839:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b,N){return N.reduce(function(_,D){if(null==b)throw new Error("'".concat(b,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(b,D)&&void 0!==D&&void 0===_?(_=D,D):_},void 0)}},804:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964),S=function b(m){return m&&m.__esModule?m:{default:m}}(p(8839));function N(m,M){var y=Object.keys(m);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(m);M&&(P=P.filter(function(O){return Object.getOwnPropertyDescriptor(m,O).enumerable})),y.push.apply(y,P)}return y}function _(m){for(var M=1;M<arguments.length;M++){var y=null!=arguments[M]?arguments[M]:{};M%2?N(Object(y),!0).forEach(function(P){D(m,P,y[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(y)):N(Object(y)).forEach(function(P){Object.defineProperty(m,P,Object.getOwnPropertyDescriptor(y,P))})}return m}function D(m,M,y){return M in m?Object.defineProperty(m,M,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[M]=y,m}h.default=function(M){var y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:E.longitudeKeys,latitude:E.latitudeKeys,altitude:E.altitudeKeys},P=(0,S.default)(M,y.longitude),O=(0,S.default)(M,y.latitude),L=(0,S.default)(M,y.altitude);return _({latitude:O,longitude:P},L?{altitude:L}:{})}},9068:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=D(p(6984)),S=D(p(5010)),b=D(p(9601)),N=D(p(7148)),_=p(964);function D(m){return m&&m.__esModule?m:{default:m}}h.default=function(M,y){var P=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;P=void 0===P||isNaN(P)?1:P;var O=(0,E.default)(M),L=(0,S.default)(M),F=(0,E.default)(y),Y=(0,S.default)(y),ae=Math.acos((0,N.default)(Math.sin((0,b.default)(F))*Math.sin((0,b.default)(O))+Math.cos((0,b.default)(F))*Math.cos((0,b.default)(O))*Math.cos((0,b.default)(L)-(0,b.default)(Y))))*_.earthRadius;return Math.round(ae/P)*P}},1599:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=b(p(9068)),S=b(p(7148));function b(D){return D&&D.__esModule?D:{default:D}}h.default=function(I,v,m){var M=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,y=(0,E.default)(v,I,M),P=(0,E.default)(I,m,M),O=(0,E.default)(v,m,M),L=Math.acos((0,S.default)((y*y+O*O-P*P)/(2*y*O))),F=Math.acos((0,S.default)((P*P+O*O-y*y)/(2*P*O)));return L>Math.PI/2?y:F>Math.PI/2?P:Math.sin(L)*y}},8172:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(6984)),S=_(p(5010)),b=_(p(9601)),N=_(p(8302));function _(v){return v&&v.__esModule?v:{default:v}}h.default=function(m,M){var y=(0,E.default)(M),P=(0,S.default)(M),O=(0,E.default)(m),L=(0,S.default)(m);return((0,N.default)(Math.atan2(Math.sin((0,b.default)(P)-(0,b.default)(L))*Math.cos((0,b.default)(y)),Math.cos((0,b.default)(O))*Math.sin((0,b.default)(y))-Math.sin((0,b.default)(O))*Math.cos((0,b.default)(y))*Math.cos((0,b.default)(P)-(0,b.default)(L))))+360)%360}},6984:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964),S=N(p(8839)),b=N(p(1450));function N(I){return I&&I.__esModule?I:{default:I}}h.default=function(v,m){var M=(0,S.default)(v,E.latitudeKeys);if(null!=M){var y=v[M];return!0===m?y:(0,b.default)(y)}}},5010:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964),S=N(p(8839)),b=N(p(1450));function N(I){return I&&I.__esModule?I:{default:I}}h.default=function(v,m){var M=(0,S.default)(v,E.longitudeKeys);if(null!=M){var y=v[M];return!0===m?y:(0,b.default)(y)}}},5482:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(D){return D&&D.__esModule?D:{default:D}}(p(9068));function b(D){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(v){return typeof v}:function(v){return v&&"function"==typeof Symbol&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(D)}h.default=function(I){var v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.default;return I.reduce(function(m,M){return"object"===b(m)&&null!==m.last&&(m.distance+=v(M,m.last)),m.last=M,m},{last:null,distance:0}).distance}},6952:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(6984)),S=_(p(5010)),b=_(p(9601)),N=p(964);function _(v){return v&&v.__esModule?v:{default:v}}h.default=function(m,M){var y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;y=void 0===y||isNaN(y)?1:y;var se,Re,Ae,me,fe,we,En,P=(0,E.default)(m),O=(0,S.default)(m),L=(0,E.default)(M),F=(0,S.default)(M),Y=6356752.314245,ae=1/298.257223563,ye=(0,b.default)(F-O),Te=Math.atan((1-ae)*Math.tan((0,b.default)(parseFloat(P)))),ln=Math.atan((1-ae)*Math.tan((0,b.default)(parseFloat(L)))),qt=Math.sin(Te),Kt=Math.cos(Te),Qt=Math.sin(ln),It=Math.cos(ln),wt=ye,Cn=100;do{var Dt=Math.sin(wt),Tn=Math.cos(wt);if(0===(we=Math.sqrt(It*Dt*(It*Dt)+(Kt*Qt-qt*It*Tn)*(Kt*Qt-qt*It*Tn))))return 0;se=qt*Qt+Kt*It*Tn,Re=Math.atan2(we,se),fe=se-2*qt*Qt/(me=1-(Ae=Kt*It*Dt/we)*Ae),isNaN(fe)&&(fe=0);var un=ae/16*me*(4+ae*(4-3*me));En=wt,wt=ye+(1-un)*ae*Ae*(Re+un*we*(fe+un*se*(2*fe*fe-1)))}while(Math.abs(wt-En)>1e-12&&--Cn>0);if(0===Cn)return NaN;var rt=me*(N.earthRadius*N.earthRadius-Y*Y)/(Y*Y),Sn=1+rt/16384*(4096+rt*(rt*(320-175*rt)-768)),zt=rt/1024*(256+rt*(rt*(74-47*rt)-128)),Pn=zt*we*(fe+zt/4*(se*(2*fe*fe-1)-zt/6*fe*(4*we*we-3)*(4*fe*fe-3))),xn=Y*Sn*(Re-Pn);return Math.round(xn/y)*y}},2571:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(6984)),S=_(p(5010)),b=_(p(9601)),N=_(p(8302));function _(v){return v&&v.__esModule?v:{default:v}}h.default=function(m,M){var y=(0,b.default)((0,S.default)(M))-(0,b.default)((0,S.default)(m)),P=Math.log(Math.tan((0,b.default)((0,E.default)(M))/2+Math.PI/4)/Math.tan((0,b.default)((0,E.default)(m))/2+Math.PI/4));return Math.abs(y)>Math.PI&&(y=y>0?-1*(2*Math.PI-y):2*Math.PI+y),((0,N.default)(Math.atan2(y,P))+360)%360}},9558:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b){return/^NNE|NE|NNW|N$/.test(b)?"N":/^ENE|E|ESE|SE$/.test(b)?"E":/^SSE|S|SSW|SW$/.test(b)?"S":/^WSW|W|WNW|NW$/.test(b)?"W":void 0}},3430:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(9068));h.default=function(D,I){var v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.default,m=v(D,I),M=Number(I.time)-Number(D.time),y=m/M*1e3;return y}},5026:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0});var E={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(h,"computeDestinationPoint",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(h,"convertArea",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(h,"convertDistance",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(h,"convertSpeed",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(h,"decimalToSexagesimal",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(h,"findNearest",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(h,"getAreaOfPolygon",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(h,"getBounds",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(h,"getBoundsOfDistance",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(h,"getCenter",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(h,"getCenterOfBounds",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(h,"getCompassDirection",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(h,"getCoordinateKey",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(h,"getCoordinateKeys",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(h,"getDistance",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(h,"getDistanceFromLine",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(h,"getGreatCircleBearing",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(h,"getLatitude",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(h,"getLongitude",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(h,"getPathLength",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(h,"getPreciseDistance",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(h,"getRhumbLineBearing",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(h,"getRoughCompassDirection",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(h,"getSpeed",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(h,"isDecimal",{enumerable:!0,get:function(){return ln.default}}),Object.defineProperty(h,"isPointInLine",{enumerable:!0,get:function(){return qt.default}}),Object.defineProperty(h,"isPointInPolygon",{enumerable:!0,get:function(){return Kt.default}}),Object.defineProperty(h,"isPointNearLine",{enumerable:!0,get:function(){return Qt.default}}),Object.defineProperty(h,"isPointWithinRadius",{enumerable:!0,get:function(){return It.default}}),Object.defineProperty(h,"isSexagesimal",{enumerable:!0,get:function(){return wt.default}}),Object.defineProperty(h,"isValidCoordinate",{enumerable:!0,get:function(){return En.default}}),Object.defineProperty(h,"isValidLatitude",{enumerable:!0,get:function(){return Cn.default}}),Object.defineProperty(h,"isValidLongitude",{enumerable:!0,get:function(){return Dt.default}}),Object.defineProperty(h,"orderByDistance",{enumerable:!0,get:function(){return Tn.default}}),Object.defineProperty(h,"sexagesimalToDecimal",{enumerable:!0,get:function(){return un.default}}),Object.defineProperty(h,"toDecimal",{enumerable:!0,get:function(){return rt.default}}),Object.defineProperty(h,"toRad",{enumerable:!0,get:function(){return Sn.default}}),Object.defineProperty(h,"toDeg",{enumerable:!0,get:function(){return zt.default}}),Object.defineProperty(h,"wktToPolygon",{enumerable:!0,get:function(){return Pn.default}});var S=z(p(7887)),b=z(p(8315)),N=z(p(713)),_=z(p(9173)),D=z(p(4974)),I=z(p(1675)),v=z(p(4434)),m=z(p(5744)),M=z(p(2908)),y=z(p(5582)),P=z(p(6963)),O=z(p(4629)),L=z(p(8839)),F=z(p(804)),Y=z(p(9068)),ae=z(p(1599)),ye=z(p(8172)),se=z(p(6984)),Re=z(p(5010)),Ae=z(p(5482)),me=z(p(6952)),fe=z(p(2571)),we=z(p(9558)),Te=z(p(3430)),ln=z(p(2926)),qt=z(p(9721)),Kt=z(p(2694)),Qt=z(p(9538)),It=z(p(6958)),wt=z(p(9674)),En=z(p(9139)),Cn=z(p(3861)),Dt=z(p(2494)),Tn=z(p(8252)),un=z(p(869)),rt=z(p(1450)),Sn=z(p(9601)),zt=z(p(8302)),Pn=z(p(7103)),xn=p(964);function z(V){return V&&V.__esModule?V:{default:V}}Object.keys(xn).forEach(function(V){"default"===V||"__esModule"===V||Object.prototype.hasOwnProperty.call(E,V)||Object.defineProperty(h,V,{enumerable:!0,get:function(){return xn[V]}})})},2926:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b){var N=b.toString().trim();return!isNaN(parseFloat(N))&&parseFloat(N)===Number(N)}},9721:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(9068));h.default=function(D,I,v){return(0,E.default)(I,D)+(0,E.default)(D,v)===(0,E.default)(I,v)}},2694:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=b(p(6984)),S=b(p(5010));function b(D){return D&&D.__esModule?D:{default:D}}h.default=function(I,v){for(var m=!1,M=v.length,y=-1,P=M-1;++y<M;P=y)((0,S.default)(v[y])<=(0,S.default)(I)&&(0,S.default)(I)<(0,S.default)(v[P])||(0,S.default)(v[P])<=(0,S.default)(I)&&(0,S.default)(I)<(0,S.default)(v[y]))&&(0,E.default)(I)<((0,E.default)(v[P])-(0,E.default)(v[y]))*((0,S.default)(I)-(0,S.default)(v[y]))/((0,S.default)(v[P])-(0,S.default)(v[y]))+(0,E.default)(v[y])&&(m=!m);return m}},9538:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(1599));h.default=function(D,I,v,m){return(0,E.default)(D,I,v)<m}},6958:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(9068));h.default=function(D,I,v){return(0,E.default)(D,I)<v}},9674:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964);h.default=function(_){return E.sexagesimalPattern.test(_.toString().trim())}},9139:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=N(p(804)),S=N(p(3861)),b=N(p(2494));function N(I){return I&&I.__esModule?I:{default:I}}h.default=function(v){var m=(0,E.default)(v),M=m.latitude,y=m.longitude;if(Array.isArray(v)&&v.length>=2)return(0,b.default)(v[0])&&(0,S.default)(v[1]);if(void 0===M||void 0===y)return!1;var P=v[y],O=v[M];return!(void 0===O||void 0===P||!1===(0,S.default)(O)||!1===(0,b.default)(P))}},3861:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(2926)),S=_(p(9674)),b=_(p(869)),N=p(964);function _(v){return v&&v.__esModule?v:{default:v}}h.default=function v(m){return(0,E.default)(m)?!(parseFloat(m)>N.MAXLAT||m<N.MINLAT):!!(0,S.default)(m)&&v((0,b.default)(m))}},2494:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=_(p(2926)),S=_(p(9674)),b=_(p(869)),N=p(964);function _(v){return v&&v.__esModule?v:{default:v}}h.default=function v(m){return(0,E.default)(m)?!(parseFloat(m)>N.MAXLON||m<N.MINLON):!!(0,S.default)(m)&&v((0,b.default)(m))}},8252:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=function S(_){return _&&_.__esModule?_:{default:_}}(p(9068));h.default=function(D,I){var v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.default;return v="function"==typeof v?v:E.default,I.slice().sort(function(m,M){return v(D,m)-v(D,M)})}},7148:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b){return b>1?1:b<-1?-1:b}},869:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=p(964);h.default=function(_){var D=new RegExp(E.sexagesimalPattern).exec(_.toString().trim());if(null==D)throw new Error("Given value is not in sexagesimal format");var I=Number(D[2])/60||0,v=Number(D[4])/3600||0,m=parseFloat(D[1])+I+v;return["S","W"].includes(D[7])?-m:m}},1450:(U,h,p)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0;var E=D(p(2926)),S=D(p(9674)),b=D(p(869)),N=D(p(9139)),_=D(p(804));function D(P){return P&&P.__esModule?P:{default:P}}function I(P,O){var L=Object.keys(P);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(P);O&&(F=F.filter(function(Y){return Object.getOwnPropertyDescriptor(P,Y).enumerable})),L.push.apply(L,F)}return L}function v(P){for(var O=1;O<arguments.length;O++){var L=null!=arguments[O]?arguments[O]:{};O%2?I(Object(L),!0).forEach(function(F){m(P,F,L[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(L)):I(Object(L)).forEach(function(F){Object.defineProperty(P,F,Object.getOwnPropertyDescriptor(L,F))})}return P}function m(P,O,L){return O in P?Object.defineProperty(P,O,{value:L,enumerable:!0,configurable:!0,writable:!0}):P[O]=L,P}h.default=function P(O){if((0,E.default)(O))return Number(O);if((0,S.default)(O))return(0,b.default)(O);if((0,N.default)(O)){var L=(0,_.default)(O);return Array.isArray(O)?O.map(function(F,Y){return[0,1].includes(Y)?P(F):F}):v(v(v({},O),L.latitude&&m({},L.latitude,P(O[L.latitude]))),L.longitude&&m({},L.longitude,P(O[L.longitude])))}return Array.isArray(O)?O.map(function(F){return(0,N.default)(F)?P(F):F}):O}},8302:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b){return 180*b/Math.PI}},9601:(U,h)=>{Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(b){return b*Math.PI/180}},7103:(U,h)=>{function b(v,m){(null==m||m>v.length)&&(m=v.length);for(var M=0,y=new Array(m);M<m;M++)y[M]=v[M];return y}Object.defineProperty(h,"__esModule",{value:!0}),h.default=void 0,h.default=function(m){if(!m.startsWith("POLYGON"))throw new Error("Invalid wkt.");return m.slice(m.indexOf("(")+2,m.indexOf(")")).split(", ").map(function(P){var L=function p(v,m){return function _(v){if(Array.isArray(v))return v}(v)||function N(v,m){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(v)){var M=[],y=!0,P=!1,O=void 0;try{for(var F,L=v[Symbol.iterator]();!(y=(F=L.next()).done)&&(M.push(F.value),!m||M.length!==m);y=!0);}catch(Y){P=!0,O=Y}finally{try{!y&&null!=L.return&&L.return()}finally{if(P)throw O}}return M}}(v,m)||function S(v,m){if(v){if("string"==typeof v)return b(v,m);var M=Object.prototype.toString.call(v).slice(8,-1);if("Object"===M&&v.constructor&&(M=v.constructor.name),"Map"===M||"Set"===M)return Array.from(v);if("Arguments"===M||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return b(v,m)}}(v,m)||function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(P.split(" "),2),Y=L[1];return{longitude:parseFloat(L[0]),latitude:parseFloat(Y)}})}}},Fl={};function Vl(U){var h=Fl[U];if(void 0!==h)return h.exports;var p=Fl[U]={exports:{}};return hg[U](p,p.exports,Vl),p.exports}(()=>{function U(t){return"function"==typeof t}let h=!1;const p={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else h&&console.log("RxJS: Back to a better error behavior. Thank you. <3");h=t},get useDeprecatedSynchronousErrorHandling(){return h}};function E(t){setTimeout(()=>{throw t},0)}const S={closed:!0,next(t){},error(t){if(p.useDeprecatedSynchronousErrorHandling)throw t;E(t)},complete(){}},b=Array.isArray||(t=>t&&"number"==typeof t.length);function N(t){return null!==t&&"object"==typeof t}const D=(()=>{function t(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return t.prototype=Object.create(Error.prototype),t})();class I{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof I)n.remove(this);else if(null!==n)for(let s=0;s<n.length;++s)n[s].remove(this);if(U(i)){r&&(this._unsubscribe=void 0);try{i.call(this)}catch(s){e=s instanceof D?v(s.errors):[s]}}if(b(o)){let s=-1,a=o.length;for(;++s<a;){const l=o[s];if(N(l))try{l.unsubscribe()}catch(u){e=e||[],u instanceof D?e=e.concat(v(u.errors)):e.push(u)}}}if(e)throw new D(e)}add(e){let n=e;if(!e)return I.EMPTY;switch(typeof e){case"function":n=new I(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof I)){const o=n;n=new I,n._subscriptions=[o]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof I){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n}remove(e){const n=this._subscriptions;if(n){const r=n.indexOf(e);-1!==r&&n.splice(r,1)}}}var t;function v(t){return t.reduce((e,n)=>e.concat(n instanceof D?n.errors:n),[])}I.EMPTY=((t=new I).closed=!0,t);const m="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class y extends I{constructor(e,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=S;break;case 1:if(!e){this.destination=S;break}if("object"==typeof e){e instanceof y?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new P(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new P(this,e,n,r)}}[m](){return this}static create(e,n,r){const i=new y(e,n,r);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class P extends y{constructor(e,n,r,i){super(),this._parentSubscriber=e;let o,s=this;U(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==S&&(s=Object.create(n),U(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;p.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=p;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=e,n.syncErrorThrown=!0):E(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;E(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const n=()=>this._complete.call(this._context);p.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,n){try{e.call(this._context,n)}catch(r){if(this.unsubscribe(),p.useDeprecatedSynchronousErrorHandling)throw r;E(r)}}__tryOrSetError(e,n,r){if(!p.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(i){return p.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(E(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}const F="function"==typeof Symbol&&Symbol.observable||"@@observable";function Y(t){return t}let se=(()=>{class t{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,i){const{operator:o}=this,s=function L(t,e,n){if(t){if(t instanceof y)return t;if(t[m])return t[m]()}return t||e||n?new y(t,e,n):new y(S)}(n,r,i);if(s.add(o?o.call(s,this.source):this.source||p.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),p.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){p.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function O(t){for(;t;){const{closed:e,destination:n,isStopped:r}=t;if(e||r)return!1;t=n&&n instanceof y?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=Re(r))((i,o)=>{let s;s=this.subscribe(a=>{try{n(a)}catch(l){o(l),s&&s.unsubscribe()}},o,i)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[F](){return this}pipe(...n){return 0===n.length?this:function ye(t){return 0===t.length?Y:1===t.length?t[0]:function(n){return t.reduce((r,i)=>i(r),n)}}(n)(this)}toPromise(n){return new(n=Re(n))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return t.create=e=>new t(e),t})();function Re(t){if(t||(t=p.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const me=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class fe extends I{constructor(e,n){super(),this.subject=e,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,n=e.observers;if(this.subject=null,!n||0===n.length||e.isStopped||e.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class we extends y{constructor(e){super(e),this.destination=e}}let Te=(()=>{class t extends se{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[m](){return new we(this)}lift(n){const r=new ln(this,this);return r.operator=n,r}next(n){if(this.closed)throw new me;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].next(n)}}error(n){if(this.closed)throw new me;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].error(n);this.observers.length=0}complete(){if(this.closed)throw new me;this.isStopped=!0;const{observers:n}=this,r=n.length,i=n.slice();for(let o=0;o<r;o++)i[o].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new me;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new me;return this.hasError?(n.error(this.thrownError),I.EMPTY):this.isStopped?(n.complete(),I.EMPTY):(this.observers.push(n),new fe(this,n))}asObservable(){const n=new se;return n.source=this,n}}return t.create=(e,n)=>new ln(e,n),t})();class ln extends Te{constructor(e,n){super(),this.destination=e,this.source=n}next(e){const{destination:n}=this;n&&n.next&&n.next(e)}error(e){const{destination:n}=this;n&&n.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:n}=this;return n?this.source.subscribe(e):I.EMPTY}}!function Cn(){"function"==typeof Symbol&&Symbol.iterator&&Symbol}();function ke(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}Error;class OM{constructor(){this.version=4,this.hex="",this.limitUI04=this.maxFromBits(4),this.limitUI06=this.maxFromBits(6),this.limitUI08=this.maxFromBits(8),this.limitUI12=this.maxFromBits(12),this.limitUI14=this.maxFromBits(14),this.limitUI16=this.maxFromBits(16),this.limitUI32=this.maxFromBits(32),this.limitUI40=this.maxFromBits(40),this.limitUI48=this.maxFromBits(48),this.create()}toString(){return this.hex}toURN(){return"urn:uuid:"+this.hex}toSignalK(){return`urn:mrn:signalk:uuid:${this.hex}`}toBytes(){let e=this.hex.split("-"),n=[],r=0;for(let i=0;i<e.length;i++)for(let o=0;o<e[i].length;o+=2)n[r++]=parseInt(e[i].substr(o,2),16);return n}maxFromBits(e){return Math.pow(2,e)}getRandomInt(e,n){return Math.floor(Math.random()*(n-e+1))+e}randomUI04(){return this.getRandomInt(0,this.limitUI04-1)}randomUI06(){return this.getRandomInt(0,this.limitUI06-1)}randomUI08(){return this.getRandomInt(0,this.limitUI08-1)}randomUI12(){return this.getRandomInt(0,this.limitUI12-1)}randomUI14(){return this.getRandomInt(0,this.limitUI14-1)}randomUI16(){return this.getRandomInt(0,this.limitUI16-1)}randomUI32(){return this.getRandomInt(0,this.limitUI32-1)}randomUI40(){return(0|Math.random()*(1<<30))+(0|1024*Math.random())*(1<<30)}randomUI48(){return(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30)}create(){this.fromParts(this.randomUI32(),this.randomUI16(),16384|this.randomUI12(),128|this.randomUI06(),this.randomUI08(),this.randomUI48())}paddedString(e,n,r=null){r=r||"0";let i=n-(e=String(e)).length;for(;i>0;i>>>=1,r+=r)1&i&&(e=r+e);return e}fromParts(e,n,r,i,o,s){return this.version=r>>12&15,this.hex=this.paddedString(e.toString(16),8)+"-"+this.paddedString(n.toString(16),4)+"-"+this.paddedString(r.toString(16),4)+"-"+this.paddedString(i.toString(16),2)+this.paddedString(o.toString(16),2)+"-"+this.paddedString(s.toString(16),12),this}}class wo{static updates(){return{context:null,updates:[]}}static subscribe(){return{context:null,subscribe:[]}}static unsubscribe(){return{context:null,unsubscribe:[]}}static request(){return{requestId:(new OM).toString()}}}let kM=(()=>{class t{constructor(){this._filter="",this._wsTimeout=2e4,this._token="",this._playbackMode=!1,this.version=1,this.endpoint="",this.selfId="",this._source=null,this._connect=new Te,this.onConnect=this._connect.asObservable(),this._close=new Te,this.onClose=this._close.asObservable(),this._error=new Te,this.onError=this._error.asObservable(),this._message=new Te,this.onMessage=this._message.asObservable()}set source(n){this._source||(this._source={}),this._source.label=n}set authToken(n){this._token=n}get connectionTimeout(){return this._wsTimeout}set connectionTimeout(n){this._wsTimeout=n<3e3?3e3:n>6e4?6e4:n}get isOpen(){return!(!this.ws||1==this.ws.readyState||3==this.ws.readyState)}get filter(){return this._filter}set filter(n){this._filter=n&&-1!=n.indexOf("self")?this.selfId?this.selfId:"":n}get playbackMode(){return this._playbackMode}close(){this.ws&&(this.ws.close(),this.ws=null)}open(n,r,i){if(!(n=n||this.endpoint))return;let o=-1==n.indexOf("?")?"?":"&";r&&(n+=`${o}subscribe=${r}`),(this._token||i)&&(n+=`${r?"&":"?"}token=${this._token||i}`),this.close(),this.ws=new WebSocket(n),setTimeout(()=>{this.ws&&1!=this.ws.readyState&&3!=this.ws.readyState&&(console.warn(`Connection watchdog expired (${this._wsTimeout/1e3} sec): ${this.ws.readyState}... aborting connection...`),this.close())},this._wsTimeout),this.ws.onopen=s=>{this._connect.next(s)},this.ws.onclose=s=>{this._close.next(s)},this.ws.onerror=s=>{this._error.next(s)},this.ws.onmessage=s=>{this.parseOnMessage(s)}}parseOnMessage(n){let r;if("string"==typeof n.data)try{r=JSON.parse(n.data)}catch(i){return}this.isHello(r)?(this.selfId=r.self,this._playbackMode=void 0!==r.startTime,this._message.next(r)):this.isResponse(r)?(void 0!==r.login&&void 0!==r.login.token&&(this._token=r.login.token),this._message.next(r)):this._filter&&this.isDelta(r)?r.context==this._filter&&this._message.next(r):this._message.next(r)}sendRequest(n){if("object"!=typeof n)return"";let r=wo.request();return void 0===n.login&&this._token&&(r.token=this._token),Object.keys(n).forEach(o=>{r[o]=n[o]}),this.send(r),r.requestId}put(n,r,i){return this.sendRequest({context:"self"==n?"vessels.self":n,put:{path:r,value:i}})}login(n,r){return this.sendRequest({login:{username:n,password:r}})}send(n){this.ws&&("object"==typeof n&&(n=JSON.stringify(n)),this.ws.send(n))}sendUpdate(n="self",r,i){let o=wo.updates();this._token&&(o.token=this._token),o.context="self"==n?"vessels.self":n,this._token&&(o.token=this._token);let s=[];"string"==typeof r&&s.push({path:r,value:i}),"object"==typeof r&&Array.isArray(r)&&(s=r);let a={timestamp:(new Date).toISOString(),values:s};this._source&&(a.source=this._source),o.updates.push(a),this.send(o)}subscribe(n="*",r="*",i){let o=wo.subscribe();if(this._token&&(o.token=this._token),o.context="self"==n?"vessels.self":n,this._token&&(o.token=this._token),"object"==typeof r&&Array.isArray(r)&&(o.subscribe=r),"string"==typeof r){let s={};s.path=r,i&&"object"==typeof i&&(i.period&&(s.period=i.period),i.minPeriod&&(s.minPeriod=i.period),i.format&&("delta"==i.format||"full"==i.format)&&(s.format=i.format),i.policy&&("instant"==i.policy||"ideal"==i.policy||"fixed"==i.policy)&&(s.policy=i.policy)),o.subscribe.push(s)}this.send(o)}unsubscribe(n="*",r="*"){let i=wo.unsubscribe();this._token&&(i.token=this._token),i.context="self"==n?"vessels.self":n,this._token&&(i.token=this._token),"object"==typeof r&&Array.isArray(r)&&(i.unsubscribe=r),"string"==typeof r&&i.unsubscribe.push({path:r}),this.send(i)}raiseAlarm(n="*",r,i){let o;o="string"==typeof r&&-1==r.indexOf("notifications.")?`notifications.${r}`:r,this.put(n,o,i.value)}clearAlarm(n="*",r){let i=-1==r.indexOf("notifications.")?`notifications.${r}`:r;this.put(n,i,null)}isSelf(n){return n.context==this.selfId}isDelta(n){return void 0!==n.context}isHello(n){return void 0!==n.version&&void 0!==n.self}isResponse(n){return void 0!==n.requestId}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class LM{constructor(e,n,r,i){this._method=[],this._message="",this._message=void 0!==e?e:"",this._state=void 0!==n?n:Do.alarm,r&&this._method.push(oi.visual),i&&this._method.push(oi.sound)}get value(){return{message:this._message,state:this._state,method:this._method}}}var Do=(()=>(function(t){t.normal="normal",t.alert="alert",t.warn="warn",t.alarm="alarm",t.emergency="emergency"}(Do||(Do={})),Do))(),oi=(()=>(function(t){t.visual="visual",t.sound="sound"}(oi||(oi={})),oi))();class jM{constructor(){this.obsList=[],this.stream=new kM,this._connect=new Te,this.onConnect=this._connect.asObservable(),this._close=new Te,this.onClose=this._close.asObservable(),this._error=new Te,this.onError=this._error.asObservable(),this._message=new Te,this.onMessage=this._message.asObservable()}get endpoint(){return this.stream.endpoint}set endpoint(e){this.stream.endpoint=e}get selfId(){return this.stream.selfId}set selfId(e){this.stream.selfId=e}get _source(){return this.stream._source}set _source(e){this.stream._source=e}set source(e){this.stream.source=e}set authToken(e){this.stream.authToken=e}get connectionTimeout(){return this.stream.connectionTimeout}set connectionTimeout(e){this.stream.connectionTimeout=e}get isOpen(){return this.stream.isOpen}get filter(){return this.stream.filter}set filter(e){this.stream.filter=e}get playbackMode(){return this.stream.playbackMode}open(e,n="none",r){this.obsList.push(this.stream.onConnect.subscribe(i=>this._connect.next(i))),this.obsList.push(this.stream.onClose.subscribe(i=>this._close.next(i))),this.obsList.push(this.stream.onError.subscribe(i=>this._error.next(i))),this.obsList.push(this.stream.onMessage.subscribe(i=>this._message.next(i))),this.stream.open(e,n,r)}close(){this.stream.close(),this.obsList.forEach(e=>e.unsubscribe()),this.obsList=[]}sendRequest(e){return this.stream.sendRequest(e)}put(e,n,r){return this.stream.put(e,n,r)}login(e,n){return this.stream.login(e,n)}send(e){this.stream.send(e)}sendUpdate(e="self",n,r){this.stream.sendUpdate(e,n,r)}subscribe(e="*",n="*",r){this.stream.subscribe(e,n,r)}unsubscribe(e="*",n="*"){this.stream.unsubscribe(e,n)}raiseAlarm(e="*",n,r){this.stream.raiseAlarm(e,n,r)}clearAlarm(e="*",n){this.stream.clearAlarm(e,n)}isSelf(e){return this.stream.isSelf(e)}isDelta(e){return this.stream.isDelta(e)}isHello(e){return this.stream.isHello(e)}isResponse(e){return this.stream.isResponse(e)}}class Bp{constructor(){this.position=[0,0],this.headingTrue=null,this.headingMagnetic=null,this.cogTrue=null,this.cogMagnetic=null,this.wind={direction:null,mwd:null,twd:null,tws:null,speedTrue:null,sog:null,awa:null,aws:null},this.lastUpdated=new Date,this.orientation=0,this.buddy=!1,this.closestApproach=null,this.mode="day",this.anchor={maxRadius:null,radius:null,position:null},this.resourceUpdates=[],this.autopilot={},this.track=[],this.courseApi={activeRoute:{},nextPoint:{},previousPoint:{}},this.properties={}}}class Gp{constructor(){this.lastUpdated=new Date,this.position=[0,0],this.properties={}}}class Wp extends Gp{constructor(){super(),this.type={id:-1,name:""}}}class FM extends Wp{constructor(){super()}}class VM extends Gp{constructor(){super(),this.orientation=0,this.sog=0,this.track=[]}}class bl{static celciusToKelvin(e=0){return e+273.15}static kelvinToCelcius(e=0){return e-273.15}static kelvinToFarenheit(e=0){return 1.8*e-459.67}static degreesToRadians(e=0){return e*Math.PI/180}static radiansToDegrees(e=0){return 180*e/Math.PI}static angleToDirection(e,n){const r=2*Math.PI;if(n||(n=0),e||(e=0),isNaN(n)||isNaN(e))return null;const i=n+e;return i>r?i-r:i<0?r+i:i}static directionToAngle(e,n){const r=2*Math.PI;if(n||(n=0),e||(e=0),isNaN(n)||isNaN(e))return null;const i=n-e;let o;if(i>0)o=i>Math.PI?r-i:0-i;else if(i<0){const s=Math.abs(i);o=s>Math.PI?s-r:s}else o=i;return o}static knotsToKm(e){return 1.852*e}static nauticalMilesToKm(e){return 1.852*e}static knotsToMSec(e){return.51444325460445*e}static kmToKnots(e){return.539957*e}static kmToNauticalMiles(e){return.539957*e}static kmToMiles(e){return.621371*e}static msecToKnots(e){return 1.94384*e}static msecToKmh(e){return 3.6*e}static msecToMph(e){return 2.23694*e}static nauticalMilesToMiles(e){return 1.15078*e}static milesToKm(e){return 1.60934*e}static milesToNauticalMiles(e){return.868976*e}static rpmToHertz(e){return e/60}}var yt={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},on={};on[yt.RADIANS]=6370997/(2*Math.PI),on[yt.DEGREES]=2*Math.PI*6370997/360,on[yt.FEET]=.3048,on[yt.METERS]=1,on[yt.USFEET]=1200/3937;const si=yt;var HM=function(){function t(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||on[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},t.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)},t.prototype.setWorldExtent=function(e){this.worldExtent_=e},t.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();const qp=HM;var UM="cosh"in Math?Math.cosh:function(e){var n=Math.exp(e);return(n+1/n)/2};function Il(t){return t*Math.PI/180}"log2"in Math&&Math;var GM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ai=6378137,yr=Math.PI*ai,WM=[-yr,-yr,yr,yr],qM=[-180,-85,180,85],Mo=ai*Math.log(Math.tan(Math.PI/2)),_r=function(t){function e(n){return t.call(this,{code:n,units:si.METERS,extent:WM,global:!0,worldExtent:qM,getPointResolution:function(r,i){return r/UM(i[1]/ai)}})||this}return GM(e,t),e}(qp),Kp=[new _r("EPSG:3857"),new _r("EPSG:102100"),new _r("EPSG:102113"),new _r("EPSG:900913"),new _r("http://www.opengis.net/def/crs/EPSG/0/3857"),new _r("http://www.opengis.net/gml/srs/epsg.xml#3857")];function KM(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i){o[s]=yr*t[s]/180;var a=ai*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Mo?a=Mo:a<-Mo&&(a=-Mo),o[s+1]=a}return o}function QM(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s<r;s+=i)o[s]=180*t[s]/yr,o[s+1]=360*Math.atan(Math.exp(t[s+1]/ai))/Math.PI-90;return o}var zM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qp=[-180,-90,180,90],YM=6378137*Math.PI/180,In=function(t){function e(n,r){return t.call(this,{code:n,units:si.DEGREES,extent:Qp,axisOrientation:r,global:!0,metersPerUnit:YM,worldExtent:Qp})||this}return zM(e,t),e}(qp),zp=[new In("CRS:84"),new In("EPSG:4326","neu"),new In("urn:ogc:def:crs:OGC:1.3:CRS84"),new In("urn:ogc:def:crs:OGC:2:84"),new In("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new In("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new In("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Eo={},_t={};function Co(t,e,n){var r=t.getCode(),i=e.getCode();r in _t||(_t[r]={}),_t[r][i]=n}function Dl(t,e,n){var r=n||6371008.8,i=Il(t[1]),o=Il(e[1]),s=(o-i)/2,a=Il(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Cl(t,e,n){var r;if(void 0!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];r=e}else r=t.slice();return r}function Zp(t,e,n){if(void 0!==e&&t!==e){for(var r=0,i=t.length;r<i;++r)e[r]=t[r];t=e}return t}function iE(t){(function JM(t,e){Eo[t]=e})(t.getCode(),t),Co(t,t,Cl)}function bt(t){return"string"==typeof t?function XM(t){return Eo[t]||Eo[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}(t):t||null}function Yp(t){(function oE(t){t.forEach(iE)})(t),t.forEach(function(e){t.forEach(function(n){e!==n&&Co(e,n,Cl)})})}function lE(t,e){return function xo(t,e,n){return function Jp(t,e){return Po(bt(t),bt(e))}(e,n)(t,void 0,t.length)}(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Po(t,e){var i=function eE(t,e){var n;return t in _t&&e in _t[t]&&(n=_t[t][e]),n}(t.getCode(),e.getCode());return i||(i=Zp),i}!function cE(){Yp(Kp),Yp(zp),function aE(t,e,n,r){t.forEach(function(i){e.forEach(function(o){Co(i,o,n),Co(o,i,r)})})}(zp,Kp,KM,QM)}();var li=Vl(5026);class sn{static destCoordinate(e,n,r){const i=(0,li.computeDestinationPoint)(e,r,bl.radiansToDegrees(n));return[i.longitude,i.latitude]}static distanceTo(e,n){return(0,li.getDistance)(e,n)}static routeLength(e){return(0,li.getPathLength)(e)}static centreOfPolygon(e){const n=(0,li.getCenter)(e);return[n.longitude,n.latitude]}static inDLCrossingZone(e,n=170){return Math.abs(e[0])>=n}static mapifyCoords(e){if(0==e.length)return e;let n=0;const r=e[0];for(let i=0;i<e.length;i++)(sn.inDLCrossingZone(e[i])||sn.inDLCrossingZone(r))&&(n=r[0]>0&&e[i][0]<0?1:r[0]<0&&e[i][0]>0?-1:0,1==n&&(e[i][0]=e[i][0]+360),-1==n&&(e[i][0]=Math.abs(e[i][0])-360));return e}static mapifyRadius(e,n){return void 0===e||void 0===n?e:e/function sE(t,e,n,r){var i,o=(t=bt(t)).getPointResolutionFunc();if(o)i=o(e,n),r&&r!==t.getUnits()&&(s=t.getMetersPerUnit())&&(i=i*s/on[r]);else{var a=t.getUnits();if(a==si.DEGREES&&!r||r==si.DEGREES)i=e;else{var s,l=Po(t,bt("EPSG:4326"));if(l===Zp&&a!==si.DEGREES)i=e*t.getMetersPerUnit();else{var u=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];i=(Dl((u=l(u,u,2)).slice(0,2),u.slice(2,4))+Dl(u.slice(4,6),u.slice(6,8)))/2}void 0!==(s=r?on[r]:t.getMetersPerUnit())&&(i/=s)}}return i}("EPSG:3857",1,lE(n))}static inBounds(e,n){return(0,li.isPointInPolygon)(e,[[n[0],n[1]],[n[0],n[3]],[n[2],n[3]],[n[2],n[1]],[n[0],n[1]]])}static calcMapifiedExtent(e,n){const i=111111*Math.cos(bl.degreesToRadians(e[1])),o=[0,0,0,0];return o[1]=e[1]+(0-Math.abs(n))/111111,o[3]=e[1]+Math.abs(n)/111111,o[0]=e[0]+(0-Math.abs(n))/i,o[2]=e[0]+Math.abs(n)/i,o}static normaliseCoords(e){if(!Array.isArray(e))return[0,0];if("number"==typeof e[0]){if(e[0]>180)for(;e[0]>180;)e[0]=e[0]-360;else if(e[0]<-180)for(;e[0]<-180;)e[0]=360+e[0];return e}return Array.isArray(e[0])?(e.forEach(n=>this.normaliseCoords(n)),e):void 0}}class dE{constructor(e){this.playback=!1,this.result=null,this.self=null,this.action="notification",this.type=e}}class fE{constructor(){this.playback=!1,this.result=null,this.self=null,this.action="update"}}const hE=["environment.wind.speedTrue","environment.wind.speedOverGround","environment.wind.angleTrueGround","environment.wind.angleTrueWater","environment.wind.directionTrue","environment.wind.directionMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"];let J,Ne;const ui=[];let tg,No=[],Tl=!1,Ao=!1;const X={signalk:{},aisState:[]};let Ke,ig,ng=[0,0,0,0],rg=60,ci=0,wn={},Dn=500,an=!1;const Wt={maxAge:54e4,staleAge:36e4,lastTick:(new Date).valueOf(),maxTrack:20};function og(){Ke={updated:{},stale:{},expired:{}}}function Oo({action:t,msg:e}){switch(t){case"onConnect":postMessage({action:"open",playback:an,result:e.target.readyState});break;case"onClose":console.warn("streamEvent: ",e),ag(!1);break;case"onError":console.warn("streamEvent: ",e),postMessage({action:"error",playback:an,result:"Connection error!"});break;case"onMessage":!function _E(t){Ne.isHello(t)?(postMessage({action:"hello",result:t,self:t.self,playback:an}),Dn&&cg()):Ne.isDelta(t)?(Tl=!0,t.updates.forEach(e=>{!e.values||e.values.forEach(n=>{if(ig=e.timestamp,t.context)switch(t.context.split(".")[0]){case"shore":case"atons":null!=X&&X.signalk.atons&&function DE(t,e){let n=!1;if(-1!=t.indexOf("shore.basestations")&&(n=!0),!J.atons.has(t)){const i=new Wp;i.id=t,i.position=null,n&&(i.type.id=-1,i.type.name="Basestation"),J.atons.set(t,i)}const r=J.atons.get(t);""===e.path?(void 0!==e.value.name&&(r.name=e.value.name),void 0!==e.value.mmsi&&(r.mmsi=e.value.mmsi),void 0!==e.value.atonType&&(r.type=e.value.atonType)):"atonType"===e.path?r.type=e.value:"navigation.position"===e.path?(r.position=[e.value.longitude,e.value.latitude],r.positionReceived=!0):r.properties[e.path]=e.value}(t.context,n),Ro(t.context,J.atons,null==X?void 0:X.signalk.atons);break;case"sar":null!=X&&X.signalk.sar&&function ME(t,e){if(!J.sar.has(t)){const r=new FM;r.id=t,r.position=null,r.type.id=-1,r.type.name="SaR Beacon",J.sar.set(t,r)}const n=J.sar.get(t);""===e.path?(void 0!==e.value.name&&(n.name=e.value.name),void 0!==e.value.mmsi&&(n.mmsi=e.value.mmsi)):"communication.callsignVhf"===e.path?n.callsign=e.value:"navigation.position"===e.path&&e.value?(n.position=sn.normaliseCoords([e.value.longitude,e.value.latitude]),n.positionReceived=!0):n.properties[e.path]=e.value}(t.context,n),Ro(t.context,J.sar,null==X?void 0:X.signalk.sar);break;case"aircraft":null!=X&&X.signalk.aircraft&&function EE(t,e){if(!J.aircraft.has(t)){const r=new VM;r.id=t,r.position=null,J.aircraft.set(t,r)}const n=J.aircraft.get(t);""===e.path?(void 0!==e.value.name&&(n.name=e.value.name),void 0!==e.value.mmsi&&(n.mmsi=e.value.mmsi)):"communication.callsignVhf"===e.path?n.callsign=e.value:"navigation.position"===e.path&&e.value?(n.position=sn.normaliseCoords([e.value.longitude,e.value.latitude]),n.positionReceived=!0,Sl(n)):"navigation.courseOverGroundTrue"===e.path?n.orientation=e.value:"navigation.speedOverGround"===e.path?n.sog=e.value:n.properties[e.path]=e.value}(t.context,n),Ro(t.context,J.aircraft,null==X?void 0:X.signalk.aircraft);break;case"vessels":if(Ne.isSelf(t))fg(J.self,n,!0),function IE(t,e){const n={path:t.path,value:t.value,context:e||null};let r;const i=t.path.split(".");if(("notifications.environment.depth.belowTransducer"===t.path||"notifications.environment.depth.belowSurface"===t.path||"notifications.environment.depth.belowKeel"===t.path)&&(r=i[2]),"notifications.navigation.anchor"===t.path&&(r=i[2]),-1!=["mob","sinking","fire","piracy","flooding","collision","grounding","listing","adrift","abandon"].indexOf(i[i.length-1])&&(r=i[i.length-1]),-1!=t.path.indexOf("notifications.navigation.closestApproach")&&(r=i[2],n.context=i[3]),-1!=t.path.indexOf("notifications.buddy")&&(r=i[1],n.context=i[2]),-1!=t.path.indexOf("notifications.navigation.course.arrivalCircleEntered")&&(r=i[3]),-1!=t.path.indexOf("notifications.navigation.course.perpendicularPassed")&&(r=i[3]),-1!=t.path.indexOf("notifications.environment.weather.warning")&&(r=i[2]),r){const o=new dE(r);o.playback=an,o.result=n,postMessage(o)}}(n);else{if(null!=X&&X.signalk.vessels){const r=function bE(t){if(!J.aisTargets.has(t)){const e=new Bp;e.position=null,J.aisTargets.set(t,e)}return J.aisTargets.get(t)}(t.context);fg(r,n)}Ro(t.context,J.aisTargets,null==X?void 0:X.signalk.vessels,null==X?void 0:X.aisState)}}})}),ug()):Ne.isResponse(t)&&postMessage({action:"response",result:t})}(e)}}function sg(t={}){t.interval&&"number"==typeof t.interval&&(Dn=t.interval,dg(),cg(),rg=1/(Dn/1e3)*60),an=!!t.playback,t.selections&&(void 0!==t.selections.preferredPaths&&(wn=t.selections.preferredPaths),t.selections.aisMaxAge&&"number"==typeof t.selections.aisMaxAge&&(Wt.maxAge=t.selections.aisMaxAge),t.selections.aisStaleAge&&"number"==typeof t.selections.aisStaleAge&&(Wt.staleAge=t.selections.aisStaleAge),"number"==typeof t.selections.signalk.maxRadius&&(X.signalk=t.selections.signalk),void 0!==t.selections.aisState&&Array.isArray(t.selections.aisState)&&(X.aisState=t.selections.aisState),console.log("Worker: AIS Filter...",X))}function ag(t=!1){dg(),ui.forEach(e=>e.unsubscribe()),Ne&&t&&Ne.close(),Ne=null,postMessage({action:"close",result:t,playback:an})}function lg(){(function mE(t){return new Promise((e,n)=>{fetch(`${t}`).then(r=>{r.json().then(i=>e(i)).catch(i=>n(i))}).catch(r=>{n(r)})})})(tg+"/tracks"+(X&&X.signalk&&X.signalk.maxRadius?`?radius=${X.signalk.maxRadius}`:"?radius=10000")).then(e=>{Ao=!0,Object.entries(e).forEach(n=>{if(J.aisTargets.has(n[0])){const r=J.aisTargets.get(n[0]);r.track=n[1].coordinates,Sl(r)}})}).catch(()=>{Ao=!1,console.warn("Unable to fetch AIS tracks!")})}function Ro(t,e,n=!0,r=[]){if(n){let i=e.get(t);i&&r.includes(null==i?void 0:i.state)&&(console.log(`state match => ${r}, ${t}`),Ke.expired[t]=!0,i=null),i&&X.signalk.maxRadius?i.positionReceived&&sn.inBounds(i.position,ng)?Ke.updated[t]=!0:(e.delete(t),Ke.expired[t]=!0):Ke.updated[t]=!0}else 0!=e.size&&(e.forEach((i,o)=>{Ke.expired[o]=!0}),e.clear())}function ug(t=!1){if(!Dn||t){const e=new fE;e.playback=an,J.aisStatus.updated=Object.keys(Ke.updated),J.aisStatus.stale=Object.keys(Ke.stale),J.aisStatus.expired=Object.keys(Ke.expired),e.result=J,e.timestamp=an?ig:J.self.lastUpdated.toISOString(),postMessage(e),og(),J.self.resourceUpdates=[],0==ci&&(function wE(){const t=(new Date).valueOf();J.aisTargets.forEach((e,n)=>{e.lastUpdated.valueOf()<t-Wt.maxAge?(Ke.expired[n]=!0,J.aisTargets.delete(n)):e.lastUpdated.valueOf()<t-Wt.staleAge&&(Ke.stale[n]=!0)}),J.aircraft.forEach((e,n)=>{e.lastUpdated.valueOf()<t-Wt.maxAge?(Ke.expired[n]=!0,J.aircraft.delete(n)):e.lastUpdated.valueOf()<t-Wt.staleAge&&(Ke.stale[n]=!0)}),J.sar.forEach((e,n)=>{e.lastUpdated.valueOf()<t-Wt.maxAge?(Ke.expired[n]=!0,J.sar.delete(n)):e.lastUpdated.valueOf()<t-Wt.staleAge&&(Ke.stale[n]=!0)})}(),J.self.positionReceived&&(null==X?void 0:X.signalk.maxRadius)&&(ng=sn.calcMapifiedExtent(J.self.position,X.signalk.maxRadius),ci++)),ci=ci>=rg?0:ci+1}}function cg(){Dn&&"number"==typeof Dn&&No.push(setInterval(()=>{Tl&&(ug(!0),Tl=!1)},Dn)),No.push(setInterval(()=>{console.warn("hasTrackPlugin",Ao),Ao&&lg()},6e4))}function dg(){No.forEach(t=>clearInterval(t)),No=[]}function fg(t,e,n=!1){if(t.lastUpdated=new Date,n){const r=-1!==e.path.indexOf("course")?e.path.split(".").slice(0,2).join("."):e.path;-1!=hE.indexOf(r)&&(J.paths[r]=null)}if(""===e.path)void 0!==e.value.name&&(t.name=e.value.name),void 0!==e.value.mmsi&&(t.mmsi=e.value.mmsi),void 0!==e.value.buddy&&(t.buddy=e.value.buddy);else if("communication.callsignVhf"===e.path)t.callsign=e.value;else if("navigation.position"===e.path&&e.value){if(void 0===e.value.longitude)return;t.position=sn.normaliseCoords([e.value.longitude,e.value.latitude]),t.positionReceived=!0,n||Sl(t)}else"navigation.state"===e.path?t.state=e.value:"navigation.speedOverGround"===e.path?t.sog=e.value:"navigation.courseOverGroundTrue"===e.path?t.cogTrue=e.value:"navigation.courseOverGroundMagnetic"===e.path?t.cogMagnetic=e.value:"navigation.headingTrue"===e.path?t.headingTrue=e.value:"navigation.headingMagnetic"===e.path?t.headingMagnetic=e.value:"environment.wind.angleApparent"===e.path?t.wind.awa=e.value:"environment.wind.speedApparent"===e.path?t.wind.aws=e.value:"environment.wind.speedTrue"===e.path?t.wind.speedTrue=e.value:"environment.wind.speedOverGround"===e.path?t.wind.sog=e.value:"environment.wind.directionTrue"===e.path?t.wind.twd=e.value:"environment.wind.directionMagnetic"===e.path?t.wind.mwd=e.value:"environment.mode"===e.path?t.mode=e.value:-1!==e.path.indexOf("navigation.course.")?-1!==e.path.indexOf("navigation.course.calcValues")?-1===e.path.indexOf("navigation.course.calcValues.previousPoint")&&(t[`course.${e.path.split(".").slice(-1)[0]}`]=e.value):-1!==e.path.indexOf("navigation.course.activeRoute")?t.courseApi.activeRoute[`${e.path.split(".").slice(-1)[0]}`]=e.value:-1!==e.path.indexOf("navigation.course.nextPoint")?t.courseApi.nextPoint[`${e.path.split(".").slice(-1)[0]}`]=e.value:-1!==e.path.indexOf("navigation.course.previousPoint")&&(t.courseApi.previousPoint[`${e.path.split(".").slice(-1)[0]}`]=e.value):-1!=e.path.indexOf("navigation.closestApproach")?t.closestApproach=e.value:"navigation.anchor.position"===e.path?t.anchor.position=e.value:"navigation.anchor.maxRadius"===e.path?t.anchor.maxRadius=e.value:"navigation.anchor.currentRadius"===e.path?t.anchor.radius=e.value:-1!=e.path.indexOf("resources.")?t.resourceUpdates.push(e):"steering.autopilot.mode"===e.path?t.autopilot.mode=e.value:"steering.autopilot.availableModes"===e.path?t.autopilot.modeList=e.value:"steering.autopilot.enabled"===e.path?t.autopilot.enabled=e.value:t.properties[e.path]=e.value;t.heading=null===t.heading&&null!=t.cog?t.cog:t.heading,void 0!==wn.heading&&e.path===wn.heading&&(t.orientation=e.value),void 0!==wn.tws&&e.path==wn.tws&&(t.wind.tws=e.value),void 0!==wn.twd&&e.path===wn.twd&&(t.wind.direction="environment.wind.angleTrueGround"===e.path||"environment.wind.angleTrueWater"===e.path?bl.angleToDirection(e.value,t.heading):e.value)}function Sl(t){if(t.track&&0===t.track.length)t.track.push([t.position]);else{const n=t.track[t.track.length-1][t.track[t.track.length-1].length-1];n[0]!=t.position[0]&&n[1]!=t.position[1]&&t.track[t.track.length-1].push(t.position)}t.track[t.track.length-1]=t.track[t.track.length-1].slice(0-Wt.maxTrack)}addEventListener("message",({data:t})=>{!function gE(t){if(t.cmd)switch(t.cmd){case"open":console.log("Worker control: opening stream..."),sg(t.options),function vE(t){if(Ne)return;if(!t.url)return void postMessage({action:"error",result:"Valid options not provided!"});const e=t.url.split("/");if(e.pop(),e.push("api"),e[0]="wss:"==e[0]?"https:":"http:",tg=e.join("/"),function pE(){J={self:new Bp,aisTargets:new Map,aisStatus:{updated:[],stale:[],expired:[]},paths:{},atons:new Map,aircraft:new Map,sar:new Map},J.self.positionReceived=!1,og()}(),Ne=new jM,ui.push(Ne.onConnect.subscribe(n=>Oo({action:"onConnect",msg:n}))),ui.push(Ne.onClose.subscribe(n=>Oo({action:"onClose",msg:n}))),ui.push(Ne.onError.subscribe(n=>Oo({action:"onError",msg:n}))),ui.push(Ne.onMessage.subscribe(n=>Oo({action:"onMessage",msg:n}))),t.playback){const n=t.playbackOptions.startTime?`?startTime=${t.playbackOptions.startTime}`:null;let r=t.playbackOptions.playbackRate?`playbackRate=${t.playbackOptions.playbackRate}`:null;r=r?n?"&"+r:"?"+r:null,Ne.open(`${t.url}${n||""}${r||""}`,t.playbackOptions.subscribe,t.token)}else Ne.open(t.url,t.subscribe,t.token),lg()}(t.options);break;case"close":console.log("Worker control: closing stream..."),ag(!0);break;case"subscribe":console.log("Worker control: subscribing to paths..."),Ne.subscribe(t.options.context,t.options.path);break;case"settings":console.log("Worker control: settings..."),sg(t.options);break;case"alarm":console.log("Worker control: alarm action..."),function yE(t){const e=-1==t.type.indexOf("notifications.")?`notifications.${t.type}`:t.type;t.raise?Ne.raiseAlarm("self",e,new LM(t.message,t.state,!0,!0)):Ne.clearAlarm("self",e)}(t.options);break;case"vessel":if(console.log("Worker control: vessel setting..."),t.options){let e;e="self"===t.options.context?J.self:J.aisTargets.get(t.options.context),e&&t.options.name&&(e.name=t.options.name)}break;case"auth":console.log("Worker control: auth token..."),t.options&&(Ne.authToken=t.options.token)}}(t)})})()})();
@@ -1647,12 +1647,34 @@
1647
1647
 
1648
1648
  <b>COURSE:</b><br />
1649
1649
  This section provides settings for course navigation.<br />
1650
+ <img
1651
+ src="./img/settings_course.png"
1652
+ style="height: 150px"
1653
+ alt=""
1654
+ /><br />
1650
1655
 
1651
- <b>Auto-advance to nextpoint on arrival</b>: Check it option to
1652
- auromatically advance to the next route point.<br />
1656
+ <b>Auto-advance to nextpoint on arrival</b>: Check this option to
1657
+ automatically advance to the next route point once the target
1658
+ notification has been received.<br />
1653
1659
 
1654
- <b>Time to Wait</b>: Select the period of time to elapse before the
1655
- destination is set to the next route point.<br />
1660
+ <b>Notification type to use</b>: Select the notification from the
1661
+ server to use to trigger the advancement to the next point.<br />
1662
+ Choose either:
1663
+ <li>
1664
+ <b><i>perpendicularPassed</i></b> (advancement occurs immediately
1665
+ notification is received.)
1666
+ </li>
1667
+ <li>
1668
+ <b><i>arrivalCircleEntered</i></b> (advancement occurs once
1669
+ <i>Time to Wait</i> has elapsed after notification has been
1670
+ receieved.)
1671
+ </li>
1672
+
1673
+ <b>Time to Wait</b>: Note: This option is only available when
1674
+ <i>arrivalCircleEntered</i> has been selected as the notification
1675
+ type.<br />
1676
+ Select the period of time to elapse before the destination is set to
1677
+ the next route point.<br />
1656
1678
 
1657
1679
  <hr />
1658
1680
  <b>VESSEL:</b><br />
@@ -1988,8 +2010,11 @@
1988
2010
  <i>http://server:3000/@signalk/freeboard-sk?movemap=0</i>
1989
2011
  </p>
1990
2012
  <p>
1991
- Example: Connect to Signal K server at supplied address and port. <br />
1992
- <i>http://server:3000/@signalk/freeboard-sk?host=192.168.86.32&port=3100</i>
2013
+ Example: Connect to Signal K server at supplied address and port.
2014
+ <br />
2015
+ <i
2016
+ >http://server:3000/@signalk/freeboard-sk?host=192.168.86.32&port=3100</i
2017
+ >
1993
2018
  </p>
1994
2019
  </div>
1995
2020
 
package/public/index.html CHANGED
@@ -62,7 +62,7 @@
62
62
  <meta name="msapplication-TileColor" content="#ffffff">
63
63
  <meta name="msapplication-TileImage" content="./assets/icons/ms-icon-192x192.png">
64
64
  <!-- ******************** /Device Icons ******************** -->
65
- <style>*{-webkit-tap-highlight-color:transparent}*{tap-highlight-color:transparent}body{background-color:#fff;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}b{font-weight:500}.loading{font-size:12pt;font-family:Arial,Helvetica,sans-serif;position:absolute;top:25%;left:0;right:0;margin-right:auto;color:#000;text-align:center}.loading img{border:5px rgba(200,200,200,0) solid;border-radius:100px;-webkit-animation:colorchange 1s;animation:colorchange 1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes colorchange{0%{border:3px solid rgba(8,85,178,.1)}25%{border:3px solid #7AB7FF}50%{border:3px solid #0855b2}75%{border:3px solid #7AB7FF}to{border:3px solid rgba(8,85,178,.1)}}@keyframes colorchange{0%{border:3px solid rgba(8,85,178,.1)}25%{border:3px solid #7AB7FF}50%{border:3px solid #0855b2}75%{border:3px solid #7AB7FF}to{border:3px solid rgba(8,85,178,.1)}}</style><link rel="stylesheet" href="styles.f013b594260c141e.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.f013b594260c141e.css"></noscript></head>
65
+ <style>*{-webkit-tap-highlight-color:transparent}*{tap-highlight-color:transparent}body{background-color:#fff;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}b{font-weight:500}.loading{font-size:12pt;font-family:Arial,Helvetica,sans-serif;position:absolute;top:25%;left:0;right:0;margin-right:auto;color:#000;text-align:center}.loading img{border:5px rgba(200,200,200,0) solid;border-radius:100px;-webkit-animation:colorchange 1s;animation:colorchange 1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes colorchange{0%{border:3px solid rgba(8,85,178,.1)}25%{border:3px solid #7AB7FF}50%{border:3px solid rgb(8,85,178)}75%{border:3px solid #7AB7FF}to{border:3px solid rgba(8,85,178,.1)}}@keyframes colorchange{0%{border:3px solid rgba(8,85,178,.1)}25%{border:3px solid #7AB7FF}50%{border:3px solid rgb(8,85,178)}75%{border:3px solid #7AB7FF}to{border:3px solid rgba(8,85,178,.1)}}</style><link rel="stylesheet" href="styles.a0bf4282aea78b28.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.a0bf4282aea78b28.css"></noscript></head>
66
66
  <body>
67
67
  <app-root>
68
68
  <div class="loading">
@@ -72,6 +72,6 @@
72
72
  </div>
73
73
  </div>
74
74
  </app-root>
75
- <script src="runtime.55118010dbcb6e60.js" type="module"></script><script src="polyfills.1ba4e1a897c69e24.js" type="module"></script><script src="main.a668c86ee67ed842.js" type="module"></script>
75
+ <script src="runtime.f37695a1bd6595d8.js" type="module"></script><script src="polyfills.12ddee7e4cb46a02.js" type="module"></script><script src="main.5c6ba1b2f2e8677e.js" type="module"></script>
76
76
 
77
77
  </body></html>