@idm-plugin/geo 1.7.7 → 1.7.9

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as e from "@turf/turf";
2
- import C from "moment";
2
+ import m from "moment";
3
3
  import _ from "@log4js-node/log4js-api";
4
4
  var a0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function X0(E) {
@@ -8,46 +8,46 @@ function X0(E) {
8
8
  var j = { exports: {} };
9
9
  (function(E) {
10
10
  //! moment-timezone.js
11
- //! version : 0.5.47
11
+ //! version : 0.5.48
12
12
  //! Copyright (c) JS Foundation and other contributors
13
13
  //! license : MIT
14
14
  //! github.com/moment/moment-timezone
15
15
  (function(M, z) {
16
- E.exports ? E.exports = z(C) : z(M.moment);
16
+ E.exports ? E.exports = z(m) : z(M.moment);
17
17
  })(a0, function(M) {
18
18
  M.version === void 0 && M.default && (M = M.default);
19
- var z = "0.5.47", p = {}, O = {}, A = {}, b = {}, c = {}, o;
19
+ var z = "0.5.48", p = {}, O = {}, A = {}, b = {}, W = {}, o;
20
20
  (!M || typeof M.version != "string") && D("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
21
21
  var q = M.version.split("."), Y = +q[0], d = +q[1];
22
22
  (Y < 2 || Y === 2 && d < 6) && D("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js " + M.version + ". See momentjs.com");
23
- function L(W) {
24
- return W > 96 ? W - 87 : W > 64 ? W - 29 : W - 48;
23
+ function L(c) {
24
+ return c > 96 ? c - 87 : c > 64 ? c - 29 : c - 48;
25
25
  }
26
- function T(W) {
27
- var a = 0, n = W.split("."), R = n[0], i = n[1] || "", S = 1, V, B = 0, t = 1;
28
- for (W.charCodeAt(0) === 45 && (a = 1, t = -1), a; a < R.length; a++)
26
+ function T(c) {
27
+ var a = 0, n = c.split("."), R = n[0], i = n[1] || "", S = 1, V, B = 0, t = 1;
28
+ for (c.charCodeAt(0) === 45 && (a = 1, t = -1), a; a < R.length; a++)
29
29
  V = L(R.charCodeAt(a)), B = 60 * B + V;
30
30
  for (a = 0; a < i.length; a++)
31
31
  S = S / 60, V = L(i.charCodeAt(a)), B += V * S;
32
32
  return B * t;
33
33
  }
34
- function U(W) {
35
- for (var a = 0; a < W.length; a++)
36
- W[a] = T(W[a]);
34
+ function U(c) {
35
+ for (var a = 0; a < c.length; a++)
36
+ c[a] = T(c[a]);
37
37
  }
38
- function r(W, a) {
38
+ function r(c, a) {
39
39
  for (var n = 0; n < a; n++)
40
- W[n] = Math.round((W[n - 1] || 0) + W[n] * 6e4);
41
- W[a - 1] = 1 / 0;
40
+ c[n] = Math.round((c[n - 1] || 0) + c[n] * 6e4);
41
+ c[a - 1] = 1 / 0;
42
42
  }
43
- function s(W, a) {
43
+ function s(c, a) {
44
44
  var n = [], R;
45
45
  for (R = 0; R < a.length; R++)
46
- n[R] = W[a[R]];
46
+ n[R] = c[a[R]];
47
47
  return n;
48
48
  }
49
- function P(W) {
50
- var a = W.split("|"), n = a[2].split(" "), R = a[3].split(""), i = a[4].split(" ");
49
+ function P(c) {
50
+ var a = c.split("|"), n = a[2].split(" "), R = a[3].split(""), i = a[4].split(" ");
51
51
  return U(n), U(R), U(i), r(i, R.length), {
52
52
  name: a[0],
53
53
  abbrs: s(a[1].split(" "), R),
@@ -56,92 +56,92 @@ var j = { exports: {} };
56
56
  population: a[5] | 0
57
57
  };
58
58
  }
59
- function I(W) {
60
- W && this._set(P(W));
59
+ function I(c) {
60
+ c && this._set(P(c));
61
61
  }
62
- function l(W, a) {
62
+ function l(c, a) {
63
63
  var n = a.length;
64
- if (W < a[0])
64
+ if (c < a[0])
65
65
  return 0;
66
- if (n > 1 && a[n - 1] === 1 / 0 && W >= a[n - 2])
66
+ if (n > 1 && a[n - 1] === 1 / 0 && c >= a[n - 2])
67
67
  return n - 1;
68
- if (W >= a[n - 1])
68
+ if (c >= a[n - 1])
69
69
  return -1;
70
70
  for (var R, i = 0, S = n - 1; S - i > 1; )
71
- R = Math.floor((i + S) / 2), a[R] <= W ? i = R : S = R;
71
+ R = Math.floor((i + S) / 2), a[R] <= c ? i = R : S = R;
72
72
  return S;
73
73
  }
74
74
  I.prototype = {
75
- _set: function(W) {
76
- this.name = W.name, this.abbrs = W.abbrs, this.untils = W.untils, this.offsets = W.offsets, this.population = W.population;
75
+ _set: function(c) {
76
+ this.name = c.name, this.abbrs = c.abbrs, this.untils = c.untils, this.offsets = c.offsets, this.population = c.population;
77
77
  },
78
- _index: function(W) {
79
- var a = +W, n = this.untils, R;
78
+ _index: function(c) {
79
+ var a = +c, n = this.untils, R;
80
80
  if (R = l(a, n), R >= 0)
81
81
  return R;
82
82
  },
83
83
  countries: function() {
84
- var W = this.name;
84
+ var c = this.name;
85
85
  return Object.keys(A).filter(function(a) {
86
- return A[a].zones.indexOf(W) !== -1;
86
+ return A[a].zones.indexOf(c) !== -1;
87
87
  });
88
88
  },
89
- parse: function(W) {
90
- var a = +W, n = this.offsets, R = this.untils, i = R.length - 1, S, V, B, t;
89
+ parse: function(c) {
90
+ var a = +c, n = this.offsets, R = this.untils, i = R.length - 1, S, V, B, t;
91
91
  for (t = 0; t < i; t++)
92
92
  if (S = n[t], V = n[t + 1], B = n[t && t - 1], S < V && u.moveAmbiguousForward ? S = V : S > B && u.moveInvalidForward && (S = B), a < R[t] - S * 6e4)
93
93
  return n[t];
94
94
  return n[i];
95
95
  },
96
- abbr: function(W) {
97
- return this.abbrs[this._index(W)];
96
+ abbr: function(c) {
97
+ return this.abbrs[this._index(c)];
98
98
  },
99
- offset: function(W) {
100
- return D("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(W)];
99
+ offset: function(c) {
100
+ return D("zone.offset has been deprecated in favor of zone.utcOffset"), this.offsets[this._index(c)];
101
101
  },
102
- utcOffset: function(W) {
103
- return this.offsets[this._index(W)];
102
+ utcOffset: function(c) {
103
+ return this.offsets[this._index(c)];
104
104
  }
105
105
  };
106
- function f(W, a) {
107
- this.name = W, this.zones = a;
106
+ function f(c, a) {
107
+ this.name = c, this.zones = a;
108
108
  }
109
- function G(W) {
110
- var a = W.toTimeString(), n = a.match(/\([a-z ]+\)/i);
111
- n && n[0] ? (n = n[0].match(/[A-Z]/g), n = n ? n.join("") : void 0) : (n = a.match(/[A-Z]{3,5}/g), n = n ? n[0] : void 0), n === "GMT" && (n = void 0), this.at = +W, this.abbr = n, this.offset = W.getTimezoneOffset();
109
+ function G(c) {
110
+ var a = c.toTimeString(), n = a.match(/\([a-z ]+\)/i);
111
+ n && n[0] ? (n = n[0].match(/[A-Z]/g), n = n ? n.join("") : void 0) : (n = a.match(/[A-Z]{3,5}/g), n = n ? n[0] : void 0), n === "GMT" && (n = void 0), this.at = +c, this.abbr = n, this.offset = c.getTimezoneOffset();
112
112
  }
113
- function H(W) {
114
- this.zone = W, this.offsetScore = 0, this.abbrScore = 0;
113
+ function H(c) {
114
+ this.zone = c, this.offsetScore = 0, this.abbrScore = 0;
115
115
  }
116
- H.prototype.scoreOffsetAt = function(W) {
117
- this.offsetScore += Math.abs(this.zone.utcOffset(W.at) - W.offset), this.zone.abbr(W.at).replace(/[^A-Z]/g, "") !== W.abbr && this.abbrScore++;
116
+ H.prototype.scoreOffsetAt = function(c) {
117
+ this.offsetScore += Math.abs(this.zone.utcOffset(c.at) - c.offset), this.zone.abbr(c.at).replace(/[^A-Z]/g, "") !== c.abbr && this.abbrScore++;
118
118
  };
119
- function Q(W, a) {
120
- for (var n, R; R = ((a.at - W.at) / 12e4 | 0) * 6e4; )
121
- n = new G(new Date(W.at + R)), n.offset === W.offset ? W = n : a = n;
122
- return W;
119
+ function Q(c, a) {
120
+ for (var n, R; R = ((a.at - c.at) / 12e4 | 0) * 6e4; )
121
+ n = new G(new Date(c.at + R)), n.offset === c.offset ? c = n : a = n;
122
+ return c;
123
123
  }
124
124
  function F() {
125
- var W = (/* @__PURE__ */ new Date()).getFullYear() - 2, a = new G(new Date(W, 0, 1)), n = a.offset, R = [a], i, S, V, B;
125
+ var c = (/* @__PURE__ */ new Date()).getFullYear() - 2, a = new G(new Date(c, 0, 1)), n = a.offset, R = [a], i, S, V, B;
126
126
  for (B = 1; B < 48; B++)
127
- V = new Date(W, B, 1).getTimezoneOffset(), V !== n && (S = new G(new Date(W, B, 1)), i = Q(a, S), R.push(i), R.push(new G(new Date(i.at + 6e4))), a = S, n = V);
127
+ V = new Date(c, B, 1).getTimezoneOffset(), V !== n && (S = new G(new Date(c, B, 1)), i = Q(a, S), R.push(i), R.push(new G(new Date(i.at + 6e4))), a = S, n = V);
128
128
  for (B = 0; B < 4; B++)
129
- R.push(new G(new Date(W + B, 0, 1))), R.push(new G(new Date(W + B, 6, 1)));
129
+ R.push(new G(new Date(c + B, 0, 1))), R.push(new G(new Date(c + B, 6, 1)));
130
130
  return R;
131
131
  }
132
- function M0(W, a) {
133
- return W.offsetScore !== a.offsetScore ? W.offsetScore - a.offsetScore : W.abbrScore !== a.abbrScore ? W.abbrScore - a.abbrScore : W.zone.population !== a.zone.population ? a.zone.population - W.zone.population : a.zone.name.localeCompare(W.zone.name);
132
+ function M0(c, a) {
133
+ return c.offsetScore !== a.offsetScore ? c.offsetScore - a.offsetScore : c.abbrScore !== a.abbrScore ? c.abbrScore - a.abbrScore : c.zone.population !== a.zone.population ? a.zone.population - c.zone.population : a.zone.name.localeCompare(c.zone.name);
134
134
  }
135
- function z0(W, a) {
135
+ function z0(c, a) {
136
136
  var n, R;
137
137
  for (U(a), n = 0; n < a.length; n++)
138
- R = a[n], c[R] = c[R] || {}, c[R][W] = !0;
138
+ R = a[n], W[R] = W[R] || {}, W[R][c] = !0;
139
139
  }
140
- function b0(W) {
141
- var a = W.length, n = {}, R = [], i = {}, S, V, B, t;
140
+ function b0(c) {
141
+ var a = c.length, n = {}, R = [], i = {}, S, V, B, t;
142
142
  for (S = 0; S < a; S++)
143
- if (B = W[S].offset, !i.hasOwnProperty(B)) {
144
- t = c[B] || {};
143
+ if (B = c[S].offset, !i.hasOwnProperty(B)) {
144
+ t = W[B] || {};
145
145
  for (V in t)
146
146
  t.hasOwnProperty(V) && (n[V] = !0);
147
147
  i[B] = !0;
@@ -152,12 +152,12 @@ var j = { exports: {} };
152
152
  }
153
153
  function p0() {
154
154
  try {
155
- var W = Intl.DateTimeFormat().resolvedOptions().timeZone;
156
- if (W && W.length > 3) {
157
- var a = b[K(W)];
155
+ var c = Intl.DateTimeFormat().resolvedOptions().timeZone;
156
+ if (c && c.length > 3) {
157
+ var a = b[K(c)];
158
158
  if (a)
159
159
  return a;
160
- D("Moment Timezone found " + W + " from the Intl api, but did not have that data loaded.");
160
+ D("Moment Timezone found " + c + " from the Intl api, but did not have that data loaded.");
161
161
  }
162
162
  } catch {
163
163
  }
@@ -169,52 +169,52 @@ var j = { exports: {} };
169
169
  }
170
170
  return S.sort(M0), S.length > 0 ? S[0].zone.name : void 0;
171
171
  }
172
- function O0(W) {
173
- return (!o || W) && (o = p0()), o;
172
+ function O0(c) {
173
+ return (!o || c) && (o = p0()), o;
174
174
  }
175
- function K(W) {
176
- return (W || "").toLowerCase().replace(/\//g, "_");
175
+ function K(c) {
176
+ return (c || "").toLowerCase().replace(/\//g, "_");
177
177
  }
178
- function k(W) {
178
+ function k(c) {
179
179
  var a, n, R, i;
180
- for (typeof W == "string" && (W = [W]), a = 0; a < W.length; a++)
181
- R = W[a].split("|"), n = R[0], i = K(n), p[i] = W[a], b[i] = n, z0(i, R[2].split(" "));
180
+ for (typeof c == "string" && (c = [c]), a = 0; a < c.length; a++)
181
+ R = c[a].split("|"), n = R[0], i = K(n), p[i] = c[a], b[i] = n, z0(i, R[2].split(" "));
182
182
  }
183
- function g(W, a) {
184
- W = K(W);
185
- var n = p[W], R;
186
- return n instanceof I ? n : typeof n == "string" ? (n = new I(n), p[W] = n, n) : O[W] && a !== g && (R = g(O[W], g)) ? (n = p[W] = new I(), n._set(R), n.name = b[W], n) : null;
183
+ function g(c, a) {
184
+ c = K(c);
185
+ var n = p[c], R;
186
+ return n instanceof I ? n : typeof n == "string" ? (n = new I(n), p[c] = n, n) : O[c] && a !== g && (R = g(O[c], g)) ? (n = p[c] = new I(), n._set(R), n.name = b[c], n) : null;
187
187
  }
188
188
  function A0() {
189
- var W, a = [];
190
- for (W in b)
191
- b.hasOwnProperty(W) && (p[W] || p[O[W]]) && b[W] && a.push(b[W]);
189
+ var c, a = [];
190
+ for (c in b)
191
+ b.hasOwnProperty(c) && (p[c] || p[O[c]]) && b[c] && a.push(b[c]);
192
192
  return a.sort();
193
193
  }
194
194
  function c0() {
195
195
  return Object.keys(A);
196
196
  }
197
- function v(W) {
197
+ function v(c) {
198
198
  var a, n, R, i;
199
- for (typeof W == "string" && (W = [W]), a = 0; a < W.length; a++)
200
- n = W[a].split("|"), R = K(n[0]), i = K(n[1]), O[R] = i, b[R] = n[0], O[i] = R, b[i] = n[1];
199
+ for (typeof c == "string" && (c = [c]), a = 0; a < c.length; a++)
200
+ n = c[a].split("|"), R = K(n[0]), i = K(n[1]), O[R] = i, b[R] = n[0], O[i] = R, b[i] = n[1];
201
201
  }
202
- function W0(W) {
202
+ function W0(c) {
203
203
  var a, n, R, i;
204
- if (!(!W || !W.length))
205
- for (a = 0; a < W.length; a++)
206
- i = W[a].split("|"), n = i[0].toUpperCase(), R = i[1].split(" "), A[n] = new f(
204
+ if (!(!c || !c.length))
205
+ for (a = 0; a < c.length; a++)
206
+ i = c[a].split("|"), n = i[0].toUpperCase(), R = i[1].split(" "), A[n] = new f(
207
207
  n,
208
208
  R
209
209
  );
210
210
  }
211
- function o0(W) {
212
- return W = W.toUpperCase(), A[W] || null;
211
+ function o0(c) {
212
+ return c = c.toUpperCase(), A[c] || null;
213
213
  }
214
- function q0(W, a) {
215
- if (W = o0(W), !W)
214
+ function q0(c, a) {
215
+ if (c = o0(c), !c)
216
216
  return null;
217
- var n = W.zones.sort();
217
+ var n = c.zones.sort();
218
218
  return a ? n.map(function(R) {
219
219
  var i = g(R);
220
220
  return {
@@ -223,66 +223,66 @@ var j = { exports: {} };
223
223
  };
224
224
  }) : n;
225
225
  }
226
- function Y0(W) {
227
- k(W.zones), v(W.links), W0(W.countries), u.dataVersion = W.version;
226
+ function Y0(c) {
227
+ k(c.zones), v(c.links), W0(c.countries), u.dataVersion = c.version;
228
228
  }
229
- function $(W) {
230
- return $.didShowError || ($.didShowError = !0, D("moment.tz.zoneExists('" + W + "') has been deprecated in favor of !moment.tz.zone('" + W + "')")), !!g(W);
229
+ function $(c) {
230
+ return $.didShowError || ($.didShowError = !0, D("moment.tz.zoneExists('" + c + "') has been deprecated in favor of !moment.tz.zone('" + c + "')")), !!g(c);
231
231
  }
232
- function J(W) {
233
- var a = W._f === "X" || W._f === "x";
234
- return !!(W._a && W._tzm === void 0 && !a);
232
+ function J(c) {
233
+ var a = c._f === "X" || c._f === "x";
234
+ return !!(c._a && c._tzm === void 0 && !a);
235
235
  }
236
- function D(W) {
237
- typeof console < "u" && typeof console.error == "function" && console.error(W);
236
+ function D(c) {
237
+ typeof console < "u" && typeof console.error == "function" && console.error(c);
238
238
  }
239
- function u(W) {
239
+ function u(c) {
240
240
  var a = Array.prototype.slice.call(arguments, 0, -1), n = arguments[arguments.length - 1], R = M.utc.apply(null, a), i;
241
- return !M.isMoment(W) && J(R) && (i = g(n)) && R.add(i.parse(R), "minutes"), R.tz(n), R;
241
+ return !M.isMoment(c) && J(R) && (i = g(n)) && R.add(i.parse(R), "minutes"), R.tz(n), R;
242
242
  }
243
243
  u.version = z, u.dataVersion = "", u._zones = p, u._links = O, u._names = b, u._countries = A, u.add = k, u.link = v, u.load = Y0, u.zone = g, u.zoneExists = $, u.guess = O0, u.names = A0, u.Zone = I, u.unpack = P, u.unpackBase60 = T, u.needsOffset = J, u.moveInvalidForward = !0, u.moveAmbiguousForward = !1, u.countries = c0, u.zonesForCountry = q0;
244
- var m = M.fn;
245
- M.tz = u, M.defaultZone = null, M.updateOffset = function(W, a) {
244
+ var C = M.fn;
245
+ M.tz = u, M.defaultZone = null, M.updateOffset = function(c, a) {
246
246
  var n = M.defaultZone, R;
247
- if (W._z === void 0 && (n && J(W) && !W._isUTC && W.isValid() && (W._d = M.utc(W._a)._d, W.utc().add(n.parse(W), "minutes")), W._z = n), W._z)
248
- if (R = W._z.utcOffset(W), Math.abs(R) < 16 && (R = R / 60), W.utcOffset !== void 0) {
249
- var i = W._z;
250
- W.utcOffset(-R, a), W._z = i;
247
+ if (c._z === void 0 && (n && J(c) && !c._isUTC && c.isValid() && (c._d = M.utc(c._a)._d, c.utc().add(n.parse(c), "minutes")), c._z = n), c._z)
248
+ if (R = c._z.utcOffset(c), Math.abs(R) < 16 && (R = R / 60), c.utcOffset !== void 0) {
249
+ var i = c._z;
250
+ c.utcOffset(-R, a), c._z = i;
251
251
  } else
252
- W.zone(R, a);
253
- }, m.tz = function(W, a) {
254
- if (W) {
255
- if (typeof W != "string")
256
- throw new Error("Time zone name must be a string, got " + W + " [" + typeof W + "]");
257
- return this._z = g(W), this._z ? M.updateOffset(this, a) : D("Moment Timezone has no data for " + W + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
252
+ c.zone(R, a);
253
+ }, C.tz = function(c, a) {
254
+ if (c) {
255
+ if (typeof c != "string")
256
+ throw new Error("Time zone name must be a string, got " + c + " [" + typeof c + "]");
257
+ return this._z = g(c), this._z ? M.updateOffset(this, a) : D("Moment Timezone has no data for " + c + ". See http://momentjs.com/timezone/docs/#/data-loading/."), this;
258
258
  }
259
259
  if (this._z)
260
260
  return this._z.name;
261
261
  };
262
- function y(W) {
262
+ function y(c) {
263
263
  return function() {
264
- return this._z ? this._z.abbr(this) : W.call(this);
264
+ return this._z ? this._z.abbr(this) : c.call(this);
265
265
  };
266
266
  }
267
- function w(W) {
267
+ function w(c) {
268
268
  return function() {
269
- return this._z = null, W.apply(this, arguments);
269
+ return this._z = null, c.apply(this, arguments);
270
270
  };
271
271
  }
272
- function d0(W) {
272
+ function d0(c) {
273
273
  return function() {
274
- return arguments.length > 0 && (this._z = null), W.apply(this, arguments);
274
+ return arguments.length > 0 && (this._z = null), c.apply(this, arguments);
275
275
  };
276
276
  }
277
- m.zoneName = y(m.zoneName), m.zoneAbbr = y(m.zoneAbbr), m.utc = w(m.utc), m.local = w(m.local), m.utcOffset = d0(m.utcOffset), M.tz.setDefault = function(W) {
278
- return (Y < 2 || Y === 2 && d < 9) && D("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = W ? g(W) : null, M;
277
+ C.zoneName = y(C.zoneName), C.zoneAbbr = y(C.zoneAbbr), C.utc = w(C.utc), C.local = w(C.local), C.utcOffset = d0(C.utcOffset), M.tz.setDefault = function(c) {
278
+ return (Y < 2 || Y === 2 && d < 9) && D("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + M.version + "."), M.defaultZone = c ? g(c) : null, M;
279
279
  };
280
280
  var h = M.momentProperties;
281
281
  return Object.prototype.toString.call(h) === "[object Array]" ? (h.push("_z"), h.push("_a")) : h && (h._z = null), M;
282
282
  });
283
283
  })(j);
284
284
  var n0 = j.exports;
285
- const R0 = "2025a", L0 = [
285
+ const R0 = "2025b", L0 = [
286
286
  "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5",
287
287
  "Africa/Nairobi|LMT +0230 EAT +0245|-2r.g -2u -30 -2J|012132|-2ua2r.g N6nV.g 3Fbu h1cu dzbJ|47e5",
288
288
  "Africa/Algiers|LMT PMT WET WEST CET CEST|-c.c -9.l 0 -10 -10 -20|01232323232323232454542423234542324|-3bQ0c.c MDA2.P cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5",
@@ -337,6 +337,7 @@ const R0 = "2025a", L0 = [
337
337
  "America/Chihuahua|LMT MST CST MDT CDT|74.k 70 60 60 50|0121312424231313131313131313131313131313131313131313131313132|-1UQF0 deo0 8lz0 16p0 11z0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4",
338
338
  "America/Ciudad_Juarez|LMT MST CST MDT CDT|75.U 70 60 60 50|01213124242313131313131313131313131313131313131313131313131321313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQF0 deo0 8lz0 16p0 11z0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1wn0 cm0 EP0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|",
339
339
  "America/Costa_Rica|LMT SJMT CST CDT|5A.d 5A.d 60 50|01232323232|-3eLun.L 1fyo0 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5",
340
+ "America/Coyhaique|LMT SMT -05 -04 -03|4M.g 4G.J 50 40 30|012131323232323232323434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-3eLvb.I MJbS.t fJAh.f 5knG.J 1Vzh.f jRAG.J 1pbh.f 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 11B0 1qL0 11B0|",
340
341
  "America/Phoenix|LMT MST MDT MWT|7s.i 70 60 60|012121313121|-3tFF0 1nEe0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5",
341
342
  "America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4",
342
343
  "America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8",
@@ -499,7 +500,7 @@ const R0 = "2025a", L0 = [
499
500
  "Asia/Taipei|LMT CST JST CDT|-86 -80 -90 -90|012131313131313131313131313131313131313131|-30bk6 1FDc6 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5",
500
501
  "Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5",
501
502
  "Asia/Tbilisi|LMT TBMT +03 +04 +05|-2X.b -2X.b -30 -40 -50|01234343434343434343434323232343434343434343434323|-3D8OX.b 1LUM0 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5",
502
- "Asia/Tehran|LMT TMT +0330 +0430 +04 +05|-3p.I -3p.I -3u -4u -40 -50|012345423232323232323232323232323232323232323232323232323232323232323232|-2btDp.I Llc0 1FHaT.I 1pc0 120u Rc0 XA0 Wou JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6",
503
+ "Asia/Tehran|LMT TMT +0330 +0430 +04 +05|-3p.I -3p.I -3u -4u -40 -50|012345423232323232323232323232323232323232323232323232323232323232323232|-2btDp.I Llc0 1FHaT.I 1pc0 120u Rc0 Dc0 1iMu JX0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6",
503
504
  "Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3",
504
505
  "Asia/Tokyo|LMT JST JDT|-9i.X -90 -a0|0121212121|-3jE90 2qSo0 Rc0 1lc0 14o0 1zc0 Oo0 1zc0 Oo0|38e6",
505
506
  "Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5",
@@ -925,7 +926,7 @@ const R0 = "2025a", L0 = [
925
926
  "CH|Europe/Zurich",
926
927
  "CI|Africa/Abidjan",
927
928
  "CK|Pacific/Rarotonga",
928
- "CL|America/Santiago America/Punta_Arenas Pacific/Easter",
929
+ "CL|America/Santiago America/Coyhaique America/Punta_Arenas Pacific/Easter",
929
930
  "CM|Africa/Lagos Africa/Douala",
930
931
  "CN|Asia/Shanghai Asia/Urumqi",
931
932
  "CO|America/Bogota",
@@ -1144,9 +1145,9 @@ var x = { exports: {} };
1144
1145
  throw new RangeError("invalid coordinates");
1145
1146
  if (90 <= z)
1146
1147
  return "Etc/GMT";
1147
- var b = -1, c = 48 * (180 + p) / 360.00000000000006, o = 24 * (90 - z) / 180.00000000000003, q = 0 | c, Y = 0 | o, d = 96 * Y + 2 * q;
1148
+ var b = -1, W = 48 * (180 + p) / 360.00000000000006, o = 24 * (90 - z) / 180.00000000000003, q = 0 | W, Y = 0 | o, d = 96 * Y + 2 * q;
1148
1149
  for (d = 56 * O.charCodeAt(d) + O.charCodeAt(d + 1) - 1995; d + A.length < 3136; )
1149
- d = 56 * O.charCodeAt(d = 8 * (b = b + d + 1) + 4 * (Y = 0 | (o = 2 * (o - Y) % 2)) + 2 * (q = 0 | (c = 2 * (c - q) % 2)) + 2304) + O.charCodeAt(d + 1) - 1995;
1150
+ d = 56 * O.charCodeAt(d = 8 * (b = b + d + 1) + 4 * (Y = 0 | (o = 2 * (o - Y) % 2)) + 2 * (q = 0 | (W = 2 * (W - q) % 2)) + 2304) + O.charCodeAt(d + 1) - 1995;
1150
1151
  return A[d + A.length - 3136];
1151
1152
  }
1152
1153
  E.exports = M;
@@ -1160,7 +1161,7 @@ class X {
1160
1161
  * @param lat
1161
1162
  */
1162
1163
  static guessTimeZoneOffset(M, z) {
1163
- const p = f0(z, M), O = C().tz(p).utcOffset();
1164
+ const p = f0(z, M), O = m().tz(p).utcOffset();
1164
1165
  return this.roundPrecision(O / 60, 1);
1165
1166
  }
1166
1167
  /**
@@ -1176,9 +1177,9 @@ class X {
1176
1177
  z = z < 6 ? 6 : z, M = X.convertToStdLng(M, z);
1177
1178
  let O = "E";
1178
1179
  M < 0 && (O = "W"), M = Math.abs(M), p = p.toUpperCase();
1179
- let A = M * 3600, b, c, o, q, Y, d;
1180
- b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(3, "0") : d = X.padNumber(Y, 3, 2), Number(c) >= 60 && (q = Number(q) + 1, c = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
1181
- const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
1180
+ let A = M * 3600, b, W, o, q, Y, d;
1181
+ b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, W = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(3, "0") : d = X.padNumber(Y, 3, 2), Number(W) >= 60 && (q = Number(q) + 1, W = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
1182
+ const L = `${p.replace(/S+/gi, W).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
1182
1183
  return {
1183
1184
  direction: O,
1184
1185
  degree: X.roundPrecision(Y, z),
@@ -1197,9 +1198,9 @@ class X {
1197
1198
  z = z < 6 ? 6 : z, M = M % 180;
1198
1199
  let O = "N";
1199
1200
  M < 0 && (O = "S"), M = Math.abs(M), p = p.toUpperCase();
1200
- let A = M * 3600, b, c, o, q, Y, d;
1201
- b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, c = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(2, "0") : d = X.padNumber(Y, 2, 2), Number(c) >= 60 && (q = Number(q) + 1, c = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
1202
- const L = `${p.replace(/S+/gi, c).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
1201
+ let A = M * 3600, b, W, o, q, Y, d;
1202
+ b = A % 3600 % 60, p.indexOf("S") !== -1 && (A = A - b, W = X.padNumber(b, 2, 2)), o = A / 60 % 60, p.indexOf("M") !== -1 && (p.indexOf("S") !== -1 ? q = X.roundPrecision(o, z).toString().padStart(2, "0") : q = X.padNumber(o, 2, 2), A = A - o * 60), Y = A / 3600, p.indexOf("M") !== -1 ? d = X.roundPrecision(Y, z).toString().padStart(2, "0") : d = X.padNumber(Y, 2, 2), Number(W) >= 60 && (q = Number(q) + 1, W = 0), Number(q) >= 60 && (d = Number(d) + 1, q = 0);
1203
+ const L = `${p.replace(/S+/gi, W).replace(/M+/gi, q).replace(/H+/gi, d)}${O}`;
1203
1204
  return {
1204
1205
  direction: O,
1205
1206
  degree: X.roundPrecision(Y, z),
@@ -1215,12 +1216,12 @@ class X {
1215
1216
  const O = M[M.length - 1].toUpperCase();
1216
1217
  M = M.substring(0, M.length - 1).trim();
1217
1218
  const A = M.split(" ").filter((o) => o !== "").map((o) => Math.abs(Number(o)));
1218
- let [b, c] = A;
1219
- if (c = c > 60 ? c / Math.pow(10, String(c).length - 2) : c, b > 360 && !c) {
1219
+ let [b, W] = A;
1220
+ if (W = W > 60 ? W / Math.pow(10, String(W).length - 2) : W, b > 360 && !W) {
1220
1221
  const o = this.roundPrecision(b / 100, 0);
1221
- c = b - o * 100, b = o;
1222
+ W = b - o * 100, b = o;
1222
1223
  }
1223
- p = b + (c ?? 0) / 60, O === "W" && (p = p * -1);
1224
+ p = b + (W ?? 0) / 60, O === "W" && (p = p * -1);
1224
1225
  } else
1225
1226
  p = Number(M);
1226
1227
  return X.convertToStdLng(p, z);
@@ -1232,12 +1233,12 @@ class X {
1232
1233
  const O = M[M.length - 1].toUpperCase();
1233
1234
  M = M.substring(0, M.length - 1).trim();
1234
1235
  const A = M.split(" ").filter((o) => o !== "").map((o) => Math.abs(Number(o)));
1235
- let [b, c] = A;
1236
- if (c = c > 60 ? c / Math.pow(10, String(c).length - 2) : c, b > 90 && !c) {
1236
+ let [b, W] = A;
1237
+ if (W = W > 60 ? W / Math.pow(10, String(W).length - 2) : W, b > 90 && !W) {
1237
1238
  const o = this.roundPrecision(b / 100, 0);
1238
- c = b - o * 100, b = o;
1239
+ W = b - o * 100, b = o;
1239
1240
  }
1240
- if (p = b + (c ?? 0) / 60, p > 90)
1241
+ if (p = b + (W ?? 0) / 60, p > 90)
1241
1242
  throw new Error(`latitude out of range: ${M}${O}`);
1242
1243
  O === "S" && (p = p * -1);
1243
1244
  } else
@@ -1342,8 +1343,8 @@ class N {
1342
1343
  [M.lng, M.lat],
1343
1344
  [z.lng, z.lat]
1344
1345
  ]);
1345
- let c;
1346
- return p ? c = e.rhumbDistance(b.features[0], b.features[1], { units: A }) : c = e.distance(b.features[0], b.features[1], { units: A }), X.roundPrecision(c, O);
1346
+ let W;
1347
+ return p ? W = e.rhumbDistance(b.features[0], b.features[1], { units: A }) : W = e.distance(b.features[0], b.features[1], { units: A }), X.roundPrecision(W, O);
1347
1348
  }
1348
1349
  /**
1349
1350
  * 计算航线距离
@@ -1354,10 +1355,10 @@ class N {
1354
1355
  static calculateRouteDistance(M, z = 4, p = "nauticalmiles") {
1355
1356
  let O = 0, A;
1356
1357
  for (const b of M)
1357
- for (let c = 0; c < b.length - 1; c++) {
1358
- const o = { lng: b[c][0], lat: b[c][1] };
1359
- c === 0 && A && (O += this.calculateDistance(A, o, !0, z, p));
1360
- const q = { lng: b[c + 1][0], lat: b[c + 1][1] };
1358
+ for (let W = 0; W < b.length - 1; W++) {
1359
+ const o = { lng: b[W][0], lat: b[W][1] };
1360
+ W === 0 && A && (O += this.calculateDistance(A, o, !0, z, p));
1361
+ const q = { lng: b[W + 1][0], lat: b[W + 1][1] };
1361
1362
  O += this.calculateDistance(o, q, !0, z, p), A = q;
1362
1363
  }
1363
1364
  return X.roundPrecision(O, z);
@@ -1372,9 +1373,9 @@ class N {
1372
1373
  */
1373
1374
  static calculateCoordinate(M, z, p, O = "nauticalmiles", A = !0) {
1374
1375
  const b = e.point([M.lng, M.lat]);
1375
- let c;
1376
- A ? c = e.rhumbDestination(b, p, z, { units: O }) : c = e.destination(b, p, z, { units: O });
1377
- const o = c.geometry.coordinates;
1376
+ let W;
1377
+ A ? W = e.rhumbDestination(b, p, z, { units: O }) : W = e.destination(b, p, z, { units: O });
1378
+ const o = W.geometry.coordinates;
1378
1379
  return { lng: X.convertToStdLng(o[0], 8), lat: X.roundPrecision(o[1], 8) };
1379
1380
  }
1380
1381
  /**
@@ -1387,12 +1388,12 @@ class N {
1387
1388
  * @param units 单位,默认 nm(海里)
1388
1389
  */
1389
1390
  static interpolateCoordinates(M, z, p, O = !0, A = !0, b = "nauticalmiles") {
1390
- const c = [], o = this.calculateBearing(M, z, !1), q = this.calculateDistance(M, z, !1, 8, b);
1391
- O && c.push({ lng: M.lng, lat: M.lat });
1391
+ const W = [], o = this.calculateBearing(M, z, !1), q = this.calculateDistance(M, z, !1, 8, b);
1392
+ O && W.push({ lng: M.lng, lat: M.lat });
1392
1393
  let Y = 0;
1393
1394
  for (; Y < q; )
1394
- Y += p, Y < q && c.push(this.calculateCoordinate(M, o, Y, b, !1));
1395
- return A && c.push({ lng: z.lng, lat: z.lat }), c;
1395
+ Y += p, Y < q && W.push(this.calculateCoordinate(M, o, Y, b, !1));
1396
+ return A && W.push({ lng: z.lng, lat: z.lat }), W;
1396
1397
  }
1397
1398
  /**
1398
1399
  * 分组坐标(如相邻两个坐标经度差超180度,需以180为界将坐标分为两组)
@@ -1412,13 +1413,13 @@ class N {
1412
1413
  let p = [];
1413
1414
  const O = [];
1414
1415
  let A, b;
1415
- for (let c = 0; c < M.length - 1; c++) {
1416
- A = X.convertToStdLng(M[c].lng, 8), b = X.convertToStdLng(M[c + 1].lng, 8), M[c].lat = X.roundPrecision(M[c].lat, 8), M[c + 1].lat = X.roundPrecision(M[c + 1].lat, 8), p.push([A, M[c].lat]);
1416
+ for (let W = 0; W < M.length - 1; W++) {
1417
+ A = X.convertToStdLng(M[W].lng, 8), b = X.convertToStdLng(M[W + 1].lng, 8), M[W].lat = X.roundPrecision(M[W].lat, 8), M[W + 1].lat = X.roundPrecision(M[W + 1].lat, 8), p.push([A, M[W].lat]);
1417
1418
  const o = A - b;
1418
1419
  if (Math.abs(o) > 180) {
1419
1420
  const q = X.convertToMonotonicLng2([
1420
- [A, M[c].lat],
1421
- [b, M[c + 1].lat]
1421
+ [A, M[W].lat],
1422
+ [b, M[W + 1].lat]
1422
1423
  ]);
1423
1424
  let Y, d;
1424
1425
  z ? (Y = e.lineString(q), d = e.lineString([
@@ -1431,10 +1432,10 @@ class N {
1431
1432
  const U = e.getCoord(L.features[0]);
1432
1433
  T = X.roundPrecision(U[1], 8);
1433
1434
  } else
1434
- T = M[c].lat;
1435
+ T = M[W].lat;
1435
1436
  o > 0 ? (p.push([180 - 1e-6, T]), O.push([...p]), p = [], p.push([-(180 - 1e-6), T])) : (p.push([-(180 - 1e-6), T]), O.push([...p]), p = [], p.push([180 - 1e-6, T]));
1436
1437
  }
1437
- c === M.length - 2 && p.push([b, M[c + 1].lat]);
1438
+ W === M.length - 2 && p.push([b, M[W + 1].lat]);
1438
1439
  }
1439
1440
  return O.push(p), O;
1440
1441
  }
@@ -1445,7 +1446,7 @@ class N {
1445
1446
  static deduplicateRoute(M) {
1446
1447
  const z = [];
1447
1448
  for (const p of M) {
1448
- const O = p.reduce((A, b) => (A.findIndex((c) => c[0] === b[0] && c[1] === b[1]) === -1 && A.push(b), A), []);
1449
+ const O = p.reduce((A, b) => (A.findIndex((W) => W[0] === b[0] && W[1] === b[1]) === -1 && A.push(b), A), []);
1449
1450
  z.push(O);
1450
1451
  }
1451
1452
  return z;
@@ -1493,13 +1494,13 @@ class N {
1493
1494
  */
1494
1495
  static mergeCoordinateToRoute(M, z) {
1495
1496
  M.lng = X.convertToStdLng(M.lng, 8);
1496
- let p = Number.MAX_VALUE, O = 0, A = 0, b, c;
1497
+ let p = Number.MAX_VALUE, O = 0, A = 0, b, W;
1497
1498
  return z.forEach((o, q) => {
1498
1499
  for (let Y = 0; Y < o.length - 1; Y++) {
1499
1500
  const d = { lng: o[Y][0], lat: o[Y][1] }, L = { lng: o[Y + 1][0], lat: o[Y + 1][1] }, T = this.calculatePointToLineDistance(M, d, L);
1500
- p > T && (p = T, A = Y, O = q, b = this.calculateDistance(d, M), c = this.calculateDistance(L, M));
1501
+ p > T && (p = T, A = Y, O = q, b = this.calculateDistance(d, M), W = this.calculateDistance(L, M));
1501
1502
  }
1502
- }), b !== 0 && c !== 0 ? z[O].splice(A + 1, 0, [M.lng, M.lat]) : b === 0 ? z[O].splice(A, 1, [M.lng, M.lat]) : c === 0 && z[O].splice(A + 1, 1, [M.lng, M.lat]), z;
1503
+ }), b !== 0 && W !== 0 ? z[O].splice(A + 1, 0, [M.lng, M.lat]) : b === 0 ? z[O].splice(A, 1, [M.lng, M.lat]) : W === 0 && z[O].splice(A + 1, 1, [M.lng, M.lat]), z;
1503
1504
  }
1504
1505
  /**
1505
1506
  * 向Route尾加1个坐标
@@ -1544,15 +1545,15 @@ class N {
1544
1545
  return p.forEach((b) => {
1545
1546
  if (A === 2)
1546
1547
  return;
1547
- const c = [];
1548
+ const W = [];
1548
1549
  for (const o of b) {
1549
1550
  if (X.roundPrecision(z.lng, 8) === X.roundPrecision(o[0], 8) && X.roundPrecision(z.lat, 8) === X.roundPrecision(o[1], 8)) {
1550
- c.push(o), A === 0 && c.push([M.lng, M.lat]), A = 2;
1551
+ W.push(o), A === 0 && W.push([M.lng, M.lat]), A = 2;
1551
1552
  break;
1552
1553
  }
1553
- A === 1 ? c.push(o) : X.roundPrecision(M.lng, 8) === X.roundPrecision(o[0], 8) && X.roundPrecision(M.lat, 8) === X.roundPrecision(o[1], 8) && (A = 1, c.push(o));
1554
+ A === 1 ? W.push(o) : X.roundPrecision(M.lng, 8) === X.roundPrecision(o[0], 8) && X.roundPrecision(M.lat, 8) === X.roundPrecision(o[1], 8) && (A = 1, W.push(o));
1554
1555
  }
1555
- c.length && O.push(c);
1556
+ W.length && O.push(W);
1556
1557
  }), O;
1557
1558
  }
1558
1559
  /**
@@ -1564,12 +1565,12 @@ class N {
1564
1565
  * @return [{lng, lat}]
1565
1566
  */
1566
1567
  static calculateRangeWaypoints(M, z, p, O = []) {
1567
- const A = this.convertRouteToCoordinates(p, 0), b = this.mergeCoordinatesToWaypoints([M, z], A.length ? A : O), c = b.findIndex(
1568
+ const A = this.convertRouteToCoordinates(p, 0), b = this.mergeCoordinatesToWaypoints([M, z], A.length ? A : O), W = b.findIndex(
1568
1569
  (Y) => X.roundPrecision(M.lng, 8) === X.roundPrecision(Y.lng, 8) && X.roundPrecision(M.lat, 8) === X.roundPrecision(Y.lat, 8)
1569
1570
  ), o = b.findIndex(
1570
1571
  (Y) => X.roundPrecision(z.lng, 8) === X.roundPrecision(Y.lng, 8) && X.roundPrecision(z.lat, 8) === X.roundPrecision(Y.lat, 8)
1571
1572
  );
1572
- return b.filter((Y, d) => d >= c && d <= o);
1573
+ return b.filter((Y, d) => d >= W && d <= o);
1573
1574
  }
1574
1575
  /**
1575
1576
  * 计算坐标到航路上的最短距离
@@ -1578,10 +1579,10 @@ class N {
1578
1579
  */
1579
1580
  static calculateMinDistanceToRoute(M, z) {
1580
1581
  let p = Number.MAX_VALUE, O = 0, A = 0;
1581
- return z.forEach((b, c) => {
1582
+ return z.forEach((b, W) => {
1582
1583
  for (let o = 0; o < b.length - 1; o++) {
1583
1584
  const q = { lng: b[o][0], lat: b[o][1] }, Y = { lng: b[o + 1][0], lat: b[o + 1][1] }, d = this.calculatePointToLineDistance(M, q, Y);
1584
- p > d && (p = d, O = o, A = c);
1585
+ p > d && (p = d, O = o, A = W);
1585
1586
  }
1586
1587
  }), { minDist: p, segIndex: A, minIndex: O };
1587
1588
  }
@@ -1597,14 +1598,14 @@ class N {
1597
1598
  const { segIndex: O, minIndex: A } = this.calculateMinDistanceToRoute({ ...M }, z);
1598
1599
  M.lng = X.convertToStdLng(M.lng);
1599
1600
  const b = [];
1600
- let c = !0;
1601
+ let W = !0;
1601
1602
  for (let o = O; o < z.length; o++)
1602
- if (c) {
1603
+ if (W) {
1603
1604
  const q = [];
1604
1605
  q.push([M.lng, M.lat]);
1605
1606
  for (let Y = A + 1; Y < z[o].length; Y++)
1606
1607
  M.lng === z[o][Y][0] && M.lat === z[o][Y][1] || q.push(z[o][Y]);
1607
- b.push(q), c = !1;
1608
+ b.push(q), W = !1;
1608
1609
  } else
1609
1610
  b.push([...z[o]]);
1610
1611
  return b;
@@ -1618,12 +1619,12 @@ class N {
1618
1619
  static calculateSubWaypoints(M, z) {
1619
1620
  let p = Number.MAX_VALUE, O = 0;
1620
1621
  for (let b = 0; b < z.length - 1; b++) {
1621
- const c = z[b], o = z[b + 1];
1622
- if (this.calculateDistance(M, c) === 0)
1622
+ const W = z[b], o = z[b + 1];
1623
+ if (this.calculateDistance(M, W) === 0)
1623
1624
  return z;
1624
1625
  if (this.calculateDistance(M, o) === 0)
1625
1626
  return z.filter((Y, d) => d > 0);
1626
- const q = this.calculatePointToLineDistance(M, c, o);
1627
+ const q = this.calculatePointToLineDistance(M, W, o);
1627
1628
  p > q && (p = q, O = b);
1628
1629
  }
1629
1630
  M.lng = X.convertToStdLng(M.lng);
@@ -1646,8 +1647,8 @@ class N {
1646
1647
  const b = e.lineString([
1647
1648
  [z.lng, z.lat],
1648
1649
  [p.lng, p.lat]
1649
- ]), c = e.pointToLineDistance(e.point([M.lng, M.lat]), b, O), o = e.pointToLineDistance(e.point([M.lng > 0 ? M.lng - 360 : M.lng + 360, M.lat]), b, O);
1650
- return X.roundPrecision(Math.min(c, o), 6);
1650
+ ]), W = e.pointToLineDistance(e.point([M.lng, M.lat]), b, O), o = e.pointToLineDistance(e.point([M.lng > 0 ? M.lng - 360 : M.lng + 360, M.lat]), b, O);
1651
+ return X.roundPrecision(Math.min(W, o), 6);
1651
1652
  }
1652
1653
  /**
1653
1654
  * 计算途经点的COG, Distance等属性
@@ -1686,15 +1687,15 @@ class N {
1686
1687
  */
1687
1688
  static mergeCoordinateToWaypoints(M, z, p = !0) {
1688
1689
  M.lng = X.convertToStdLng(M.lng, 8);
1689
- let O = Number.MAX_VALUE, A = 0, b = 0, c = 0;
1690
+ let O = Number.MAX_VALUE, A = 0, b = 0, W = 0;
1690
1691
  if (z.length < 2)
1691
1692
  z.push(M);
1692
1693
  else {
1693
1694
  for (let o = 0; o < z.length - 1; o++) {
1694
1695
  const q = { lng: z[o].lng, lat: z[o].lat }, Y = { lng: z[o + 1].lng, lat: z[o + 1].lat }, d = this.calculatePointToLineDistance(M, q, Y);
1695
- O >= d && (O = d, A = o, b = this.calculateDistance(q, M, !1, 6), c = this.calculateDistance(Y, M, !1, 6));
1696
+ O >= d && (O = d, A = o, b = this.calculateDistance(q, M, !1, 6), W = this.calculateDistance(Y, M, !1, 6));
1696
1697
  }
1697
- b !== 0 && c !== 0 ? b < O || b === O && A === 0 ? z.unshift(M) : c < O || c === O && A === z.length - 2 ? z.push(M) : z.splice(A + 1, 0, M) : b === 0 ? p ? z.splice(A, 1, M) : z.splice(A + 1, 0, M) : c === 0 && (p ? z.splice(A + 1, 1, M) : z.splice(A + 1, 0, M));
1698
+ b !== 0 && W !== 0 ? b < O || b === O && A === 0 ? z.unshift(M) : W < O || W === O && A === z.length - 2 ? z.push(M) : z.splice(A + 1, 0, M) : b === 0 ? p ? z.splice(A, 1, M) : z.splice(A + 1, 0, M) : W === 0 && (p ? z.splice(A + 1, 1, M) : z.splice(A + 1, 0, M));
1698
1699
  }
1699
1700
  return z.map((o, q) => {
1700
1701
  o.lng = X.convertToStdLng(o.lng);
@@ -1729,7 +1730,7 @@ class N {
1729
1730
  * @param route [[[lng, lat]]]
1730
1731
  */
1731
1732
  static nearestCoordinateInRoute(M, z) {
1732
- const p = e.point([M.lng, M.lat]), A = this.convertRouteToCoordinates(z).map((q) => [q.lng, q.lat]), b = e.lineString(A), c = e.nearestPointOnLine(b, p), o = e.getCoord(c);
1733
+ const p = e.point([M.lng, M.lat]), A = this.convertRouteToCoordinates(z).map((q) => [q.lng, q.lat]), b = e.lineString(A), W = e.nearestPointOnLine(b, p), o = e.getCoord(W);
1733
1734
  return { lng: X.roundPrecision(o[0], 8), lat: X.roundPrecision(o[1], 8) };
1734
1735
  }
1735
1736
  /**
@@ -1764,10 +1765,10 @@ class N {
1764
1765
  static calculateNextCoordinateAlongRoute(M, z, p, O = "nauticalmiles") {
1765
1766
  var L;
1766
1767
  const A = M.speed || 12, b = [];
1767
- let c = [], o = !1, q = 0, Y = 0, d;
1768
+ let W = [], o = !1, q = 0, Y = 0, d;
1768
1769
  if (z && p.length ? (b.push(M), p.forEach((T, U) => {
1769
1770
  if (o)
1770
- c.push(T);
1771
+ W.push(T);
1771
1772
  else {
1772
1773
  const r = [];
1773
1774
  let s;
@@ -1789,15 +1790,15 @@ class N {
1789
1790
  o = !0;
1790
1791
  }
1791
1792
  }
1792
- r.length && c.push(r), U === p.length - 1 && !d && (d = s);
1793
+ r.length && W.push(r), U === p.length - 1 && !d && (d = s);
1793
1794
  }
1794
- })) : (c = p, d = { ...M }), d)
1795
- if (b.push(d), d.distanceFromPrevious = Y, d.hourFromPrevious = Math.round(Y / A * 1e4) / 1e4, ((L = c[0]) == null ? void 0 : L.length) > 1) {
1796
- const T = { lng: c[0][1][0], lat: c[0][1][1] };
1795
+ })) : (W = p, d = { ...M }), d)
1796
+ if (b.push(d), d.distanceFromPrevious = Y, d.hourFromPrevious = Math.round(Y / A * 1e4) / 1e4, ((L = W[0]) == null ? void 0 : L.length) > 1) {
1797
+ const T = { lng: W[0][1][0], lat: W[0][1][1] };
1797
1798
  d.bearing = this.calculateBearing(d, T);
1798
1799
  } else
1799
1800
  d.bearing = 0;
1800
- return { coordinate: d, nextRoute: c, prevRoute: b };
1801
+ return { coordinate: d, nextRoute: W, prevRoute: b };
1801
1802
  }
1802
1803
  /**
1803
1804
  * 返回最近点及其是否为垂足(最近点不是起点或终点)
@@ -1806,11 +1807,11 @@ class N {
1806
1807
  * @param to {lng, lat}
1807
1808
  */
1808
1809
  static nearestCoordinateInLine(M, z, p) {
1809
- const O = X.convertToStdLng(M.lng, 6), A = e.point([O, M.lat]), b = X.convertToStdLng(z.lng, 6), c = X.convertToStdLng(p.lng, 6), o = e.lineString([
1810
+ const O = X.convertToStdLng(M.lng, 6), A = e.point([O, M.lat]), b = X.convertToStdLng(z.lng, 6), W = X.convertToStdLng(p.lng, 6), o = e.lineString([
1810
1811
  [b, z.lat],
1811
- [c, p.lat]
1812
+ [W, p.lat]
1812
1813
  ]), q = e.nearestPointOnLine(o, A), Y = e.getCoord(q), d = X.roundPrecision(Y[0], 6), L = X.roundPrecision(Y[1], 6);
1813
- return { lng: d, lat: L, inline: !(d === b && L === z.lat) && !(d === c && L === p.lat) };
1814
+ return { lng: d, lat: L, inline: !(d === b && L === z.lat) && !(d === W && L === p.lat) };
1814
1815
  }
1815
1816
  /**
1816
1817
  * 将route转coordinate
@@ -1821,8 +1822,8 @@ class N {
1821
1822
  const p = [];
1822
1823
  let O, A;
1823
1824
  return M.forEach((b) => {
1824
- b.forEach((c) => {
1825
- const o = { lng: X.roundPrecision(c[0], 8), lat: X.roundPrecision(c[1], 8) };
1825
+ b.forEach((W) => {
1826
+ const o = { lng: X.roundPrecision(W[0], 8), lat: X.roundPrecision(W[1], 8) };
1826
1827
  if (!A)
1827
1828
  p.push(o), A = o;
1828
1829
  else if (A.bearing === void 0)
@@ -1857,8 +1858,8 @@ class N {
1857
1858
  for (let O = 1; O < z.length; O++) {
1858
1859
  const A = z[O - 1], b = z[O];
1859
1860
  if (b.gcToPrevious) {
1860
- const c = M.findIndex((q) => q.lng === A.lng && q.lat === A.lat), o = M.findIndex((q) => q.lng === b.lng && q.lat === b.lat);
1861
- for (let q = o - 1; q > c; q--)
1861
+ const W = M.findIndex((q) => q.lng === A.lng && q.lat === A.lat), o = M.findIndex((q) => q.lng === b.lng && q.lat === b.lat);
1862
+ for (let q = o - 1; q > W; q--)
1862
1863
  M.splice(q, 1);
1863
1864
  }
1864
1865
  }
@@ -1875,12 +1876,12 @@ class N {
1875
1876
  */
1876
1877
  static calculateCenter(M) {
1877
1878
  const z = [];
1878
- for (const c of M)
1879
- for (const o of c)
1879
+ for (const W of M)
1880
+ for (const o of W)
1880
1881
  z.push(o);
1881
1882
  const p = e.featureCollection([]), O = X.convertToMonotonicLng2(z);
1882
- for (const c of O)
1883
- p.features.push(e.point(c));
1883
+ for (const W of O)
1884
+ p.features.push(e.point(W));
1884
1885
  const b = e.center(p).geometry.coordinates;
1885
1886
  return { lng: X.convertToStdLng(b[0], 8), lat: X.roundPrecision(b[1], 8) };
1886
1887
  }
@@ -1921,11 +1922,11 @@ class N {
1921
1922
  static simplifyCoordinates(M, z = 1, p = 180) {
1922
1923
  const O = [];
1923
1924
  for (let A = 1; A < M.length; A++) {
1924
- const b = M[A - 1], c = M[A], o = M[A + 1];
1925
+ const b = M[A - 1], W = M[A], o = M[A + 1];
1925
1926
  let q = !1, Y = !1;
1926
- if ((b.velocity || b.suspend || b.important || b.pilot || A === 1) && (q = !0, O.push(b)), c.gcToPrevious && (q || (q = !0, O.push(b)), Y = !0, O.push(c), A++), o) {
1927
- const d = N.calculateDistance(b, c, !0), L = N.calculateDistance(c, o, !0), T = N.calculateDistance(b, o, !0), U = (Math.pow(d, 2) + Math.pow(L, 2) - Math.pow(T, 2)) / (2 * d * L);
1928
- Math.round(Math.acos(U) * 180 / Math.PI) < p && T > z && !Y && (O.push(c), A++);
1927
+ if ((b.velocity || b.suspend || b.important || b.pilot || A === 1) && (q = !0, O.push(b)), W.gcToPrevious && (q || (q = !0, O.push(b)), Y = !0, O.push(W), A++), o) {
1928
+ const d = N.calculateDistance(b, W, !0), L = N.calculateDistance(W, o, !0), T = N.calculateDistance(b, o, !0), U = (Math.pow(d, 2) + Math.pow(L, 2) - Math.pow(T, 2)) / (2 * d * L);
1929
+ Math.round(Math.acos(U) * 180 / Math.PI) < p && T > z && !Y && (O.push(W), A++);
1929
1930
  }
1930
1931
  if (A >= M.length - 1) {
1931
1932
  const d = M.at(-1);
@@ -1941,10 +1942,10 @@ class N {
1941
1942
  * @param waypoints 带时间的轨迹, 单位秒
1942
1943
  */
1943
1944
  static nearestTSPointInWaypoints(M, z, p) {
1944
- const O = C.unix(M), A = p.filter(
1945
+ const O = m.unix(M), A = p.filter(
1945
1946
  (b) => O.clone().subtract(z, "hour").unix() <= (b.positionTime || 0) && O.clone().add(z, "h").unix() >= (b.positionTime || 0)
1946
1947
  );
1947
- return A.sort((b, c) => (b.positionTime || 0) - (c.positionTime || 0)), A.at(-1);
1948
+ return A.sort((b, W) => (b.positionTime || 0) - (W.positionTime || 0)), A.at(-1);
1948
1949
  }
1949
1950
  /**
1950
1951
  * 推测船位
@@ -1952,17 +1953,17 @@ class N {
1952
1953
  * @param positions 带时间(positionTime)的轨迹
1953
1954
  */
1954
1955
  static deadReckoning(M, z) {
1955
- var A, b, c, o;
1956
+ var A, b, W, o;
1956
1957
  M > 1e12 && (M = Math.round(M / 1e3));
1957
- const p = C.unix(M);
1958
+ const p = m.unix(M);
1958
1959
  let O = z.find((q) => q.positionTime === p.unix());
1959
1960
  if (!O) {
1960
- const q = (b = (A = z.filter((d) => (d == null ? void 0 : d.positionTime) < p.unix())) == null ? void 0 : A.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : b.at(-1), Y = (o = (c = z.filter((d) => (d == null ? void 0 : d.positionTime) > p.unix())) == null ? void 0 : c.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : o.at(0);
1961
+ const q = (b = (A = z.filter((d) => (d == null ? void 0 : d.positionTime) < p.unix())) == null ? void 0 : A.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : b.at(-1), Y = (o = (W = z.filter((d) => (d == null ? void 0 : d.positionTime) > p.unix())) == null ? void 0 : W.sort((d, L) => (d.positionTime || 0) - (L.positionTime || 0))) == null ? void 0 : o.at(0);
1961
1962
  if (q && Y) {
1962
1963
  const d = N.calculateBearing(q, Y, !0), L = N.calculateDistance(q, Y), T = (p.unix() - q.positionTime) / (Y.positionTime - q.positionTime);
1963
1964
  O = N.calculateCoordinate(q, d, L * T), O.positionTime = p.unix(), O.utc = p.utc().format(), O.cog = d, O.sog = Math.round(L / ((Y.positionTime - q.positionTime) / 3600) * 100) / 100;
1964
1965
  } else
1965
- O = q || Y, O && (O.utc = C.unix(O == null ? void 0 : O.positionTime).utc().format());
1966
+ O = q || Y, O && (O.utc = m.unix(O == null ? void 0 : O.positionTime).utc().format());
1966
1967
  }
1967
1968
  return O;
1968
1969
  }
@@ -1978,8 +1979,8 @@ class N {
1978
1979
  const Y = z[q], d = z[q + 1], L = N.calculatePointToLineDistance(M, Y, d);
1979
1980
  L < p && (p = L, O = q);
1980
1981
  }
1981
- const A = z[O], b = z[O + 1], c = N.calculateDistance(A, M), o = N.calculateDistance(b, M);
1982
- if (c === 0)
1982
+ const A = z[O], b = z[O + 1], W = N.calculateDistance(A, M), o = N.calculateDistance(b, M);
1983
+ if (W === 0)
1983
1984
  M = A;
1984
1985
  else if (o === 0)
1985
1986
  M = b;
@@ -1987,7 +1988,7 @@ class N {
1987
1988
  const q = N.nearestCoordinateInLine(M, A, b), Y = A.positionTime, d = b.positionTime, L = N.calculateDistance(A, q), T = N.calculateDistance(A, b), U = Math.round(Y + (d - Y) * (L / T));
1988
1989
  M.positionTime = U;
1989
1990
  }
1990
- return M.utc = M.positionTime ? C.unix(M.positionTime).utc().format() : void 0, M.positionTime ? M : void 0;
1991
+ return M.utc = M.positionTime ? m.unix(M.positionTime).utc().format() : void 0, M.positionTime ? M : void 0;
1991
1992
  }
1992
1993
  /**
1993
1994
  * 翻转轨迹
@@ -2020,27 +2021,26 @@ class t0 {
2020
2021
  for (const O of M) {
2021
2022
  if (O.forecasts) {
2022
2023
  const A = (p = O.history) == null ? void 0 : p[0];
2023
- A && A.wind && (A.wind.spd = A.spd, A.wind.kts = A.kts);
2024
+ A && A.wind && (A.wind.kts = A.kts);
2024
2025
  for (const b of O.forecasts) {
2025
- const c = [], o = C(b.date).utc(), q = `${O.name}-${b.model}`;
2026
+ const W = [], o = m(b.date).utc(), q = `${O.name}-${b.model}`;
2026
2027
  if (A) {
2027
- const Y = C(A.updated).utc(), d = e.point([A.lng, A.lat], {
2028
+ const Y = m(A.updated).utc(), d = e.point([A.lng, A.lat], {
2028
2029
  model: b.model,
2029
2030
  name: O.name,
2030
2031
  date: Y.format(),
2031
2032
  hour: 0,
2032
2033
  format: Y.format("MMM-DD/HHmm[Z]"),
2033
- pressure: A.pressure > 1e4 ? X.roundPrecision(A.pressure / 100, 0) : X.roundPrecision(A.pressure, 0),
2034
- wind: A == null ? void 0 : A.wind,
2034
+ pressure: A.pressure > 1e4 ? X.roundPrecision((A == null ? void 0 : A.pressure) / 100, 0) : X.roundPrecision(A.pressure, 0),
2035
+ wind: A.wind,
2036
+ movement: A.movement,
2035
2037
  category: q,
2036
2038
  type: "forecast"
2037
2039
  });
2038
- z.features.push(d), c.push(d.geometry.coordinates);
2040
+ z.features.push(d), W.push(d.geometry.coordinates);
2039
2041
  }
2040
2042
  for (const Y in b == null ? void 0 : b.hours) {
2041
- const d = b.hours[Y];
2042
- d.wind.spd = d.wind.spd || d.wind.speed;
2043
- const L = o.clone().add(Number(Y), "hour"), T = e.point([d.lng, d.lat], {
2043
+ const d = b.hours[Y], L = o.clone().add(Number(Y), "hour"), T = e.point([d.lng, d.lat], {
2044
2044
  model: b.model,
2045
2045
  name: O.name,
2046
2046
  date: L.format(),
@@ -2053,10 +2053,10 @@ class t0 {
2053
2053
  category: q,
2054
2054
  type: "forecast"
2055
2055
  });
2056
- z.features.push(T), c.push(T.geometry.coordinates);
2056
+ z.features.push(T), W.push(T.geometry.coordinates);
2057
2057
  }
2058
- if ((c == null ? void 0 : c.length) > 1) {
2059
- const Y = e.lineString(X.convertToMonotonicLng2(c), {
2058
+ if ((W == null ? void 0 : W.length) > 1) {
2059
+ const Y = e.lineString(X.convertToMonotonicLng2(W), {
2060
2060
  date: b.date,
2061
2061
  id: O.id || O.name,
2062
2062
  model: b.model,
@@ -2070,35 +2070,32 @@ class t0 {
2070
2070
  }
2071
2071
  if (O.history) {
2072
2072
  const A = [];
2073
- for (const c of O.history) {
2074
- const o = C(c.updated).utc(), q = e.point([c.lng, c.lat], {
2073
+ for (const W of O.history) {
2074
+ const o = m(W.updated).utc(), q = e.point([W.lng, W.lat], {
2075
2075
  name: O.name,
2076
2076
  date: o.format(),
2077
2077
  format: o.format("MMM-DD/HHmm[Z]"),
2078
- pressure: c.pressure > 1e4 ? X.roundPrecision(c.pressure / 100, 0) : X.roundPrecision(c.pressure, 0),
2079
- spd: c.speed || c.spd,
2080
- kts: c.kts,
2081
- source: c.source,
2082
- level: c.type,
2078
+ pressure: W.pressure > 1e4 ? X.roundPrecision(W.pressure / 100, 0) : X.roundPrecision(W.pressure, 0),
2079
+ kts: W.kts,
2080
+ level: W.type,
2083
2081
  type: "history",
2084
2082
  category: `${O.name}-history`,
2085
- wind: c.wind
2083
+ wind: W.wind,
2084
+ movement: W.movement
2086
2085
  });
2087
2086
  z.features.push(q), A.push(q.geometry.coordinates);
2088
2087
  }
2089
2088
  const b = O.history[0];
2090
2089
  if (A.length === 1 && A.push(A[0]), A.length > 1) {
2091
- const c = e.lineString(X.convertToMonotonicLng2(A), {
2090
+ const W = e.lineString(X.convertToMonotonicLng2(A), {
2092
2091
  name: O.name,
2093
2092
  type: "history",
2094
2093
  updated: b == null ? void 0 : b.updated,
2095
2094
  pressure: (b == null ? void 0 : b.pressure) > 1e4 ? X.roundPrecision((b == null ? void 0 : b.pressure) / 100, 0) : X.roundPrecision(b == null ? void 0 : b.pressure, 0),
2096
- spd: (b == null ? void 0 : b.speed) || (b == null ? void 0 : b.spd),
2097
2095
  kts: b == null ? void 0 : b.kts,
2098
- source: b == null ? void 0 : b.source,
2099
2096
  level: b == null ? void 0 : b.type
2100
2097
  });
2101
- z.features.push(c);
2098
+ z.features.push(W);
2102
2099
  }
2103
2100
  }
2104
2101
  }
@@ -2110,10 +2107,10 @@ class t0 {
2110
2107
  * @param step
2111
2108
  */
2112
2109
  static interpolate(M, z = 3) {
2113
- var A, b, c, o;
2110
+ var A, b, W, o;
2114
2111
  const p = (A = M == null ? void 0 : M.data) == null ? void 0 : A.features.filter((q) => q.geometry.type === "LineString" && q.properties.type === "forecast"), O = [];
2115
2112
  for (const q of p) {
2116
- const Y = q.properties.name, d = q.properties.model, L = q.properties.showCircle, T = q.properties.disabled, U = C(q.properties.date).utc();
2113
+ const Y = q.properties.name, d = q.properties.model, L = q.properties.showCircle, T = q.properties.disabled, U = m(q.properties.date).utc();
2117
2114
  let r = z * 60 - (U.get("hour") * 60 + U.get("minute")) % (z * 60);
2118
2115
  const s = (b = M == null ? void 0 : M.data) == null ? void 0 : b.features.filter(
2119
2116
  (l) => l.geometry.type === "Point" && l.properties.type === "forecast" && l.properties.category === `${Y}-${d}`
@@ -2121,7 +2118,7 @@ class t0 {
2121
2118
  let P, I = U.clone().add(r, "minute").set({ minute: 0, second: 0, millisecond: 0 });
2122
2119
  for (; P = this.pickIndex(s, I), P <= s.length - 1; ) {
2123
2120
  if (P > 0) {
2124
- const l = s[P], f = P === 0 ? void 0 : s[P - 1], G = (r / 60 - ((c = f == null ? void 0 : f.properties) == null ? void 0 : c.hour)) / (l.properties.hour - ((o = f == null ? void 0 : f.properties) == null ? void 0 : o.hour)), H = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[0], l.geometry.coordinates[0], G), Q = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[1], l.geometry.coordinates[1], G), F = e.point([H, Q], {
2121
+ const l = s[P], f = P === 0 ? void 0 : s[P - 1], G = (r / 60 - ((W = f == null ? void 0 : f.properties) == null ? void 0 : W.hour)) / (l.properties.hour - ((o = f == null ? void 0 : f.properties) == null ? void 0 : o.hour)), H = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[0], l.geometry.coordinates[0], G), Q = this.computeNumber(f == null ? void 0 : f.geometry.coordinates[1], l.geometry.coordinates[1], G), F = e.point([H, Q], {
2125
2122
  name: Y,
2126
2123
  model: d,
2127
2124
  category: l == null ? void 0 : l.properties.category,
@@ -2165,7 +2162,7 @@ class t0 {
2165
2162
  * @param options
2166
2163
  */
2167
2164
  static diversionPassageAt(M, z, p, O = {}) {
2168
- const { t1: A, t2: b, hr: c, hours: o } = this.tropicalCenterTwin(z, 24, O);
2165
+ const { t1: A, t2: b, hr: W, hours: o } = this.tropicalCenterTwin(z, 24, O);
2169
2166
  if (A && b) {
2170
2167
  if (!O.debug) {
2171
2168
  const U = N.calculateDistance(M, A), r = N.calculateDistance(M, b);
@@ -2174,7 +2171,7 @@ class t0 {
2174
2171
  from: M,
2175
2172
  t1: A,
2176
2173
  t2: b,
2177
- hr: c
2174
+ hr: W
2178
2175
  }), {};
2179
2176
  }
2180
2177
  const q = N.calculateBearing(M, A), Y = N.calculateBearing(A, b), d = Math.abs(q - Y);
@@ -2189,7 +2186,7 @@ class t0 {
2189
2186
  bearing1: q,
2190
2187
  bearing2: Y,
2191
2188
  right: T
2192
- }), { at: T, t1: A, t2: b, hr: Number(c), hours: o };
2189
+ }), { at: T, t1: A, t2: b, hr: Number(W), hours: o };
2193
2190
  }
2194
2191
  return {};
2195
2192
  }
@@ -2204,7 +2201,7 @@ class t0 {
2204
2201
  * @param options
2205
2202
  */
2206
2203
  static driftPassageAt(M, z, p, O = {}) {
2207
- const { t1: A, t2: b, hr: c, hours: o } = this.tropicalCenterTwin(z, 24, O);
2204
+ const { t1: A, t2: b, hr: W, hours: o } = this.tropicalCenterTwin(z, 24, O);
2208
2205
  if (A && b) {
2209
2206
  if (!O.debug) {
2210
2207
  const T = N.calculateDistance(M, A), U = N.calculateDistance(M, b);
@@ -2213,13 +2210,13 @@ class t0 {
2213
2210
  from: M,
2214
2211
  t1: A,
2215
2212
  t2: b,
2216
- hr: c
2213
+ hr: W
2217
2214
  }), {};
2218
2215
  }
2219
2216
  const q = N.calculateBearing(M, A), Y = N.calculateBearing(A, b), d = N.calculateDistance(M, A);
2220
- return { at: N.calculateCoordinate(A, q - Y + 180, p < d ? p : d), t1: A, t2: b, hr: Number(c), hours: o };
2217
+ return { at: N.calculateCoordinate(A, q - Y + 180, p < d ? p : d), t1: A, t2: b, hr: Number(W), hours: o };
2221
2218
  } else
2222
- return Z == null || Z.info("[%s] no need drift: %j", O.requestId, { from: M, t1: A, t2: b, hr: c }), {};
2219
+ return Z == null || Z.info("[%s] no need drift: %j", O.requestId, { from: M, t1: A, t2: b, hr: W }), {};
2223
2220
  }
2224
2221
  /**
2225
2222
  * 获取台风中心点对
@@ -2239,17 +2236,17 @@ class t0 {
2239
2236
  Z == null || Z.info("[%s] the first tropical center: %j", p.requestId, A);
2240
2237
  let b = (T = Object.keys(O || {}).filter((r) => Number(r) <= (z < 0 ? 24 : z))) == null ? void 0 : T.at(-1);
2241
2238
  b || (b = (U = Object.keys(O || {}).filter((r) => Number(r) <= (z < 0 ? 24 : 2 * z))) == null ? void 0 : U.at(-1));
2242
- const c = O == null ? void 0 : O[b || -1];
2243
- Z == null || Z.info("[%s] the second tropical center: %j in %d hrs", p.requestId, c, b);
2239
+ const W = O == null ? void 0 : O[b || -1];
2240
+ Z == null || Z.info("[%s] the second tropical center: %j in %d hrs", p.requestId, W, b);
2244
2241
  const o = Object.keys(O || {}).filter((r) => Number(r) <= Number(b)), q = { 0: A };
2245
2242
  for (const r of o)
2246
2243
  q[r] = O[r];
2247
- return { t1: A, t2: c, hr: Number(b), hours: q };
2244
+ return { t1: A, t2: W, hr: Number(b), hours: q };
2248
2245
  }
2249
2246
  static pickIndex(M, z) {
2250
2247
  let p = 0;
2251
2248
  for (const O of M) {
2252
- if (C(O.properties.date).isAfter(z))
2249
+ if (m(O.properties.date).isAfter(z))
2253
2250
  return p === 0 ? -1 : p;
2254
2251
  p++;
2255
2252
  }
@@ -2277,14 +2274,14 @@ class V0 {
2277
2274
  return `${M.lat}|${M.lng}|${M.positionTime}|${M.sog}|${M.cog}|${M.hdg}|${M.draught}|${z}|${JSON.stringify(M.meteo || {})}|${M.vendor}|${M.deleted}`;
2278
2275
  }
2279
2276
  static str2Json(M) {
2280
- const [z, p, O, A, b, c, o, q, Y, d, L] = M.split("|");
2277
+ const [z, p, O, A, b, W, o, q, Y, d, L] = M.split("|");
2281
2278
  return {
2282
2279
  lat: Number(z),
2283
2280
  lng: Number(p),
2284
2281
  positionTime: Number(O),
2285
2282
  sog: Number(A),
2286
2283
  cog: Number(b),
2287
- hdg: Number(c),
2284
+ hdg: Number(W),
2288
2285
  //@ts-ignore
2289
2286
  draught: isNaN(o) ? null : Number(o),
2290
2287
  type: q,
@@ -2298,7 +2295,7 @@ class V0 {
2298
2295
  const O = M.at(0).positionTime < M.at(-1).positionTime;
2299
2296
  O || M.sort((o, q) => o.positionTime - q.positionTime);
2300
2297
  const A = [];
2301
- let b, c;
2298
+ let b, W;
2302
2299
  for (let o = 0; o < M.length - 1; o++) {
2303
2300
  const q = M[o];
2304
2301
  if (!(p && ["N", "B", "E", "NOON", "BOSP", "EOSP"].includes(q.type))) {
@@ -2308,33 +2305,33 @@ class V0 {
2308
2305
  continue;
2309
2306
  const T = L.positionTime - d.positionTime;
2310
2307
  if (N.calculateDistance(L, d, !0, 4) / (T / 3600) < z)
2311
- b || (b = q), Y === M.length - 1 && (c = L, o = Y);
2308
+ b || (b = q), Y === M.length - 1 && (W = L, o = Y);
2312
2309
  else {
2313
- b && (c = M[Y - 1], o = Y);
2310
+ b && (W = M[Y - 1], o = Y);
2314
2311
  break;
2315
2312
  }
2316
2313
  }
2317
- if ((c == null ? void 0 : c.positionTime) > (b == null ? void 0 : b.positionTime) && b) {
2314
+ if ((W == null ? void 0 : W.positionTime) > (b == null ? void 0 : b.positionTime) && b) {
2318
2315
  const Y = {
2319
2316
  start: {
2320
2317
  lat: b.lat,
2321
2318
  lng: b.lng,
2322
2319
  sog: b.sog,
2323
2320
  positionTime: b.positionTime,
2324
- utc: C.unix(b.positionTime).utc().format()
2321
+ utc: m.unix(b.positionTime).utc().format()
2325
2322
  },
2326
2323
  end: {
2327
- lat: c.lat,
2328
- lng: c.lng,
2329
- sog: c.sog,
2330
- positionTime: c.positionTime,
2331
- utc: C.unix(c.positionTime).utc().format()
2324
+ lat: W.lat,
2325
+ lng: W.lng,
2326
+ sog: W.sog,
2327
+ positionTime: W.positionTime,
2328
+ utc: m.unix(W.positionTime).utc().format()
2332
2329
  },
2333
- duration: c.positionTime - b.positionTime
2330
+ duration: W.positionTime - b.positionTime
2334
2331
  }, d = M.filter((T) => T.positionTime >= Y.start.positionTime && T.positionTime <= Y.end.positionTime), L = N.divideAccordingToLng(d);
2335
2332
  Y.distance = N.calculateRouteDistance(L), Y.hours = Math.round(Y.duration / 3600 * 10) / 10, Y.avgSog = Math.round(Y.distance / Y.hours * 10) / 10, A.push(Y);
2336
2333
  }
2337
- b = void 0, c = void 0;
2334
+ b = void 0, W = void 0;
2338
2335
  }
2339
2336
  }
2340
2337
  return O || M.sort((o, q) => q.positionTime - o.positionTime), A;