use-mmdb-vanilla 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,55 +1,55 @@
1
- var L = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ft = {}, q = {}, Q = {};
1
+ var P = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ft = {}, q = {}, Q = {};
2
2
  Q.byteLength = Ht;
3
3
  Q.toByteArray = Jt;
4
4
  Q.fromByteArray = Qt;
5
- var k = [], P = [], Yt = typeof Uint8Array < "u" ? Uint8Array : Array, it = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
5
+ var k = [], L = [], Yt = typeof Uint8Array < "u" ? Uint8Array : Array, it = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6
6
  for (var V = 0, qt = it.length; V < qt; ++V)
7
- k[V] = it[V], P[it.charCodeAt(V)] = V;
8
- P[45] = 62;
9
- P[95] = 63;
7
+ k[V] = it[V], L[it.charCodeAt(V)] = V;
8
+ L[45] = 62;
9
+ L[95] = 63;
10
10
  function At(u) {
11
11
  var o = u.length;
12
12
  if (o % 4 > 0)
13
13
  throw new Error("Invalid string. Length must be a multiple of 4");
14
- var s = u.indexOf("=");
15
- s === -1 && (s = o);
16
- var f = s === o ? 0 : 4 - s % 4;
17
- return [s, f];
14
+ var h = u.indexOf("=");
15
+ h === -1 && (h = o);
16
+ var f = h === o ? 0 : 4 - h % 4;
17
+ return [h, f];
18
18
  }
19
19
  function Ht(u) {
20
- var o = At(u), s = o[0], f = o[1];
21
- return (s + f) * 3 / 4 - f;
20
+ var o = At(u), h = o[0], f = o[1];
21
+ return (h + f) * 3 / 4 - f;
22
22
  }
23
- function Xt(u, o, s) {
24
- return (o + s) * 3 / 4 - s;
23
+ function Xt(u, o, h) {
24
+ return (o + h) * 3 / 4 - h;
25
25
  }
26
26
  function Jt(u) {
27
- var o, s = At(u), f = s[0], l = s[1], d = new Yt(Xt(u, f, l)), p = 0, c = l > 0 ? f - 4 : f, g;
27
+ var o, h = At(u), f = h[0], l = h[1], d = new Yt(Xt(u, f, l)), p = 0, c = l > 0 ? f - 4 : f, g;
28
28
  for (g = 0; g < c; g += 4)
29
- o = P[u.charCodeAt(g)] << 18 | P[u.charCodeAt(g + 1)] << 12 | P[u.charCodeAt(g + 2)] << 6 | P[u.charCodeAt(g + 3)], d[p++] = o >> 16 & 255, d[p++] = o >> 8 & 255, d[p++] = o & 255;
30
- return l === 2 && (o = P[u.charCodeAt(g)] << 2 | P[u.charCodeAt(g + 1)] >> 4, d[p++] = o & 255), l === 1 && (o = P[u.charCodeAt(g)] << 10 | P[u.charCodeAt(g + 1)] << 4 | P[u.charCodeAt(g + 2)] >> 2, d[p++] = o >> 8 & 255, d[p++] = o & 255), d;
29
+ o = L[u.charCodeAt(g)] << 18 | L[u.charCodeAt(g + 1)] << 12 | L[u.charCodeAt(g + 2)] << 6 | L[u.charCodeAt(g + 3)], d[p++] = o >> 16 & 255, d[p++] = o >> 8 & 255, d[p++] = o & 255;
30
+ return l === 2 && (o = L[u.charCodeAt(g)] << 2 | L[u.charCodeAt(g + 1)] >> 4, d[p++] = o & 255), l === 1 && (o = L[u.charCodeAt(g)] << 10 | L[u.charCodeAt(g + 1)] << 4 | L[u.charCodeAt(g + 2)] >> 2, d[p++] = o >> 8 & 255, d[p++] = o & 255), d;
31
31
  }
32
32
  function Zt(u) {
33
33
  return k[u >> 18 & 63] + k[u >> 12 & 63] + k[u >> 6 & 63] + k[u & 63];
34
34
  }
35
- function Kt(u, o, s) {
36
- for (var f, l = [], d = o; d < s; d += 3)
35
+ function Kt(u, o, h) {
36
+ for (var f, l = [], d = o; d < h; d += 3)
37
37
  f = (u[d] << 16 & 16711680) + (u[d + 1] << 8 & 65280) + (u[d + 2] & 255), l.push(Zt(f));
38
38
  return l.join("");
39
39
  }
40
40
  function Qt(u) {
41
- for (var o, s = u.length, f = s % 3, l = [], d = 16383, p = 0, c = s - f; p < c; p += d)
41
+ for (var o, h = u.length, f = h % 3, l = [], d = 16383, p = 0, c = h - f; p < c; p += d)
42
42
  l.push(Kt(u, p, p + d > c ? c : p + d));
43
- return f === 1 ? (o = u[s - 1], l.push(
43
+ return f === 1 ? (o = u[h - 1], l.push(
44
44
  k[o >> 2] + k[o << 4 & 63] + "=="
45
- )) : f === 2 && (o = (u[s - 2] << 8) + u[s - 1], l.push(
45
+ )) : f === 2 && (o = (u[h - 2] << 8) + u[h - 1], l.push(
46
46
  k[o >> 10] + k[o >> 4 & 63] + k[o << 2 & 63] + "="
47
47
  )), l.join("");
48
48
  }
49
49
  var ct = {};
50
50
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
51
- ct.read = function(u, o, s, f, l) {
52
- var d, p, c = l * 8 - f - 1, g = (1 << c) - 1, m = g >> 1, E = -7, x = s ? l - 1 : 0, w = s ? -1 : 1, y = u[o + x];
51
+ ct.read = function(u, o, h, f, l) {
52
+ var d, p, c = l * 8 - f - 1, g = (1 << c) - 1, m = g >> 1, E = -7, x = h ? l - 1 : 0, w = h ? -1 : 1, y = u[o + x];
53
53
  for (x += w, d = y & (1 << -E) - 1, y >>= -E, E += c; E > 0; d = d * 256 + u[o + x], x += w, E -= 8)
54
54
  ;
55
55
  for (p = d & (1 << -E) - 1, d >>= -E, E += f; E > 0; p = p * 256 + u[o + x], x += w, E -= 8)
@@ -63,13 +63,13 @@ ct.read = function(u, o, s, f, l) {
63
63
  }
64
64
  return (y ? -1 : 1) * p * Math.pow(2, d - f);
65
65
  };
66
- ct.write = function(u, o, s, f, l, d) {
66
+ ct.write = function(u, o, h, f, l, d) {
67
67
  var p, c, g, m = d * 8 - l - 1, E = (1 << m) - 1, x = E >> 1, w = l === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = f ? 0 : d - 1, _ = f ? 1 : -1, S = o < 0 || o === 0 && 1 / o < 0 ? 1 : 0;
68
- for (o = Math.abs(o), isNaN(o) || o === 1 / 0 ? (c = isNaN(o) ? 1 : 0, p = E) : (p = Math.floor(Math.log(o) / Math.LN2), o * (g = Math.pow(2, -p)) < 1 && (p--, g *= 2), p + x >= 1 ? o += w / g : o += w * Math.pow(2, 1 - x), o * g >= 2 && (p++, g /= 2), p + x >= E ? (c = 0, p = E) : p + x >= 1 ? (c = (o * g - 1) * Math.pow(2, l), p = p + x) : (c = o * Math.pow(2, x - 1) * Math.pow(2, l), p = 0)); l >= 8; u[s + y] = c & 255, y += _, c /= 256, l -= 8)
68
+ for (o = Math.abs(o), isNaN(o) || o === 1 / 0 ? (c = isNaN(o) ? 1 : 0, p = E) : (p = Math.floor(Math.log(o) / Math.LN2), o * (g = Math.pow(2, -p)) < 1 && (p--, g *= 2), p + x >= 1 ? o += w / g : o += w * Math.pow(2, 1 - x), o * g >= 2 && (p++, g /= 2), p + x >= E ? (c = 0, p = E) : p + x >= 1 ? (c = (o * g - 1) * Math.pow(2, l), p = p + x) : (c = o * Math.pow(2, x - 1) * Math.pow(2, l), p = 0)); l >= 8; u[h + y] = c & 255, y += _, c /= 256, l -= 8)
69
69
  ;
70
- for (p = p << l | c, m += l; m > 0; u[s + y] = p & 255, y += _, p /= 256, m -= 8)
70
+ for (p = p << l | c, m += l; m > 0; u[h + y] = p & 255, y += _, p /= 256, m -= 8)
71
71
  ;
72
- u[s + y - _] |= S * 128;
72
+ u[h + y - _] |= S * 128;
73
73
  };
74
74
  /*!
75
75
  * The buffer module from node.js, for the browser.
@@ -78,7 +78,7 @@ ct.write = function(u, o, s, f, l, d) {
78
78
  * @license MIT
79
79
  */
80
80
  (function(u) {
81
- const o = Q, s = ct, f = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
81
+ const o = Q, h = ct, f = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
82
82
  u.Buffer = c, u.SlowBuffer = W, u.INSPECT_MAX_BYTES = 50;
83
83
  const l = 2147483647;
84
84
  u.kMaxLength = l, c.TYPED_ARRAY_SUPPORT = d(), !c.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
@@ -143,8 +143,7 @@ ct.write = function(u, o, s, f, l, d) {
143
143
  if (n != null && n !== e)
144
144
  return c.from(n, t, r);
145
145
  const i = X(e);
146
- if (i)
147
- return i;
146
+ if (i) return i;
148
147
  if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function")
149
148
  return c.from(e[Symbol.toPrimitive]("string"), t, r);
150
149
  throw new TypeError(
@@ -228,10 +227,9 @@ ct.write = function(u, o, s, f, l, d) {
228
227
  throw new TypeError(
229
228
  'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
230
229
  );
231
- if (t === r)
232
- return 0;
230
+ if (t === r) return 0;
233
231
  let n = t.length, i = r.length;
234
- for (let a = 0, h = Math.min(n, i); a < h; ++a)
232
+ for (let a = 0, s = Math.min(n, i); a < s; ++a)
235
233
  if (t[a] !== r[a]) {
236
234
  n = t[a], i = r[a];
237
235
  break;
@@ -266,18 +264,18 @@ ct.write = function(u, o, s, f, l, d) {
266
264
  const i = c.allocUnsafe(r);
267
265
  let a = 0;
268
266
  for (n = 0; n < t.length; ++n) {
269
- let h = t[n];
270
- if (N(h, Uint8Array))
271
- a + h.length > i.length ? (c.isBuffer(h) || (h = c.from(h)), h.copy(i, a)) : Uint8Array.prototype.set.call(
267
+ let s = t[n];
268
+ if (N(s, Uint8Array))
269
+ a + s.length > i.length ? (c.isBuffer(s) || (s = c.from(s)), s.copy(i, a)) : Uint8Array.prototype.set.call(
272
270
  i,
273
- h,
271
+ s,
274
272
  a
275
273
  );
276
- else if (c.isBuffer(h))
277
- h.copy(i, a);
274
+ else if (c.isBuffer(s))
275
+ s.copy(i, a);
278
276
  else
279
277
  throw new TypeError('"list" argument must be an Array of Buffers');
280
- a += h.length;
278
+ a += s.length;
281
279
  }
282
280
  return i;
283
281
  };
@@ -291,8 +289,7 @@ ct.write = function(u, o, s, f, l, d) {
291
289
  'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e
292
290
  );
293
291
  const r = e.length, n = arguments.length > 2 && arguments[2] === !0;
294
- if (!n && r === 0)
295
- return 0;
292
+ if (!n && r === 0) return 0;
296
293
  let i = !1;
297
294
  for (; ; )
298
295
  switch (t) {
@@ -336,15 +333,14 @@ ct.write = function(u, o, s, f, l, d) {
336
333
  case "binary":
337
334
  return Nt(this, t, r);
338
335
  case "base64":
339
- return Pt(this, t, r);
336
+ return Lt(this, t, r);
340
337
  case "ucs2":
341
338
  case "ucs-2":
342
339
  case "utf16le":
343
340
  case "utf-16le":
344
341
  return Ot(this, t, r);
345
342
  default:
346
- if (n)
347
- throw new TypeError("Unknown encoding: " + e);
343
+ if (n) throw new TypeError("Unknown encoding: " + e);
348
344
  e = (e + "").toLowerCase(), n = !0;
349
345
  }
350
346
  }
@@ -378,8 +374,7 @@ ct.write = function(u, o, s, f, l, d) {
378
374
  const t = this.length;
379
375
  return t === 0 ? "" : arguments.length === 0 ? lt(this, 0, t) : _t.apply(this, arguments);
380
376
  }, c.prototype.toLocaleString = c.prototype.toString, c.prototype.equals = function(t) {
381
- if (!c.isBuffer(t))
382
- throw new TypeError("Argument must be a Buffer");
377
+ if (!c.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
383
378
  return this === t ? !0 : c.compare(this, t) === 0;
384
379
  }, c.prototype.inspect = function() {
385
380
  let t = "";
@@ -398,29 +393,24 @@ ct.write = function(u, o, s, f, l, d) {
398
393
  return -1;
399
394
  if (r >= n)
400
395
  return 1;
401
- if (r >>>= 0, n >>>= 0, i >>>= 0, a >>>= 0, this === t)
402
- return 0;
403
- let h = a - i, B = n - r;
404
- const A = Math.min(h, B), F = this.slice(i, a), U = t.slice(r, n);
396
+ if (r >>>= 0, n >>>= 0, i >>>= 0, a >>>= 0, this === t) return 0;
397
+ let s = a - i, B = n - r;
398
+ const A = Math.min(s, B), F = this.slice(i, a), U = t.slice(r, n);
405
399
  for (let I = 0; I < A; ++I)
406
400
  if (F[I] !== U[I]) {
407
- h = F[I], B = U[I];
401
+ s = F[I], B = U[I];
408
402
  break;
409
403
  }
410
- return h < B ? -1 : B < h ? 1 : 0;
404
+ return s < B ? -1 : B < s ? 1 : 0;
411
405
  };
412
- function ht(e, t, r, n, i) {
413
- if (e.length === 0)
414
- return -1;
406
+ function st(e, t, r, n, i) {
407
+ if (e.length === 0) return -1;
415
408
  if (typeof r == "string" ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, nt(r) && (r = i ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) {
416
- if (i)
417
- return -1;
409
+ if (i) return -1;
418
410
  r = e.length - 1;
419
411
  } else if (r < 0)
420
- if (i)
421
- r = 0;
422
- else
423
- return -1;
412
+ if (i) r = 0;
413
+ else return -1;
424
414
  if (typeof t == "string" && (t = c.from(t, n)), c.isBuffer(t))
425
415
  return t.length === 0 ? -1 : ft(e, t, r, n, i);
426
416
  if (typeof t == "number")
@@ -428,11 +418,11 @@ ct.write = function(u, o, s, f, l, d) {
428
418
  throw new TypeError("val must be string, number or Buffer");
429
419
  }
430
420
  function ft(e, t, r, n, i) {
431
- let a = 1, h = e.length, B = t.length;
421
+ let a = 1, s = e.length, B = t.length;
432
422
  if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
433
423
  if (e.length < 2 || t.length < 2)
434
424
  return -1;
435
- a = 2, h /= 2, B /= 2, r /= 2;
425
+ a = 2, s /= 2, B /= 2, r /= 2;
436
426
  }
437
427
  function A(U, I) {
438
428
  return a === 1 ? U[I] : U.readUInt16BE(I * a);
@@ -440,31 +430,29 @@ ct.write = function(u, o, s, f, l, d) {
440
430
  let F;
441
431
  if (i) {
442
432
  let U = -1;
443
- for (F = r; F < h; F++)
433
+ for (F = r; F < s; F++)
444
434
  if (A(e, F) === A(t, U === -1 ? 0 : F - U)) {
445
- if (U === -1 && (U = F), F - U + 1 === B)
446
- return U * a;
435
+ if (U === -1 && (U = F), F - U + 1 === B) return U * a;
447
436
  } else
448
437
  U !== -1 && (F -= F - U), U = -1;
449
438
  } else
450
- for (r + B > h && (r = h - B), F = r; F >= 0; F--) {
439
+ for (r + B > s && (r = s - B), F = r; F >= 0; F--) {
451
440
  let U = !0;
452
441
  for (let I = 0; I < B; I++)
453
442
  if (A(e, F + I) !== A(t, I)) {
454
443
  U = !1;
455
444
  break;
456
445
  }
457
- if (U)
458
- return F;
446
+ if (U) return F;
459
447
  }
460
448
  return -1;
461
449
  }
462
450
  c.prototype.includes = function(t, r, n) {
463
451
  return this.indexOf(t, r, n) !== -1;
464
452
  }, c.prototype.indexOf = function(t, r, n) {
465
- return ht(this, t, r, n, !0);
453
+ return st(this, t, r, n, !0);
466
454
  }, c.prototype.lastIndexOf = function(t, r, n) {
467
- return ht(this, t, r, n, !1);
455
+ return st(this, t, r, n, !1);
468
456
  };
469
457
  function bt(e, t, r, n) {
470
458
  r = Number(r) || 0;
@@ -472,14 +460,13 @@ ct.write = function(u, o, s, f, l, d) {
472
460
  n ? (n = Number(n), n > i && (n = i)) : n = i;
473
461
  const a = t.length;
474
462
  n > a / 2 && (n = a / 2);
475
- let h;
476
- for (h = 0; h < n; ++h) {
477
- const B = parseInt(t.substr(h * 2, 2), 16);
478
- if (nt(B))
479
- return h;
480
- e[r + h] = B;
463
+ let s;
464
+ for (s = 0; s < n; ++s) {
465
+ const B = parseInt(t.substr(s * 2, 2), 16);
466
+ if (nt(B)) return s;
467
+ e[r + s] = B;
481
468
  }
482
- return h;
469
+ return s;
483
470
  }
484
471
  function Rt(e, t, r, n) {
485
472
  return J(et(t, e.length - r), e, r, n);
@@ -508,7 +495,7 @@ ct.write = function(u, o, s, f, l, d) {
508
495
  if ((n === void 0 || n > a) && (n = a), t.length > 0 && (n < 0 || r < 0) || r > this.length)
509
496
  throw new RangeError("Attempt to write outside buffer bounds");
510
497
  i || (i = "utf8");
511
- let h = !1;
498
+ let s = !1;
512
499
  for (; ; )
513
500
  switch (i) {
514
501
  case "hex":
@@ -528,9 +515,8 @@ ct.write = function(u, o, s, f, l, d) {
528
515
  case "utf-16le":
529
516
  return Mt(this, t, r, n);
530
517
  default:
531
- if (h)
532
- throw new TypeError("Unknown encoding: " + i);
533
- i = ("" + i).toLowerCase(), h = !0;
518
+ if (s) throw new TypeError("Unknown encoding: " + i);
519
+ i = ("" + i).toLowerCase(), s = !0;
534
520
  }
535
521
  }, c.prototype.toJSON = function() {
536
522
  return {
@@ -538,7 +524,7 @@ ct.write = function(u, o, s, f, l, d) {
538
524
  data: Array.prototype.slice.call(this._arr || this, 0)
539
525
  };
540
526
  };
541
- function Pt(e, t, r) {
527
+ function Lt(e, t, r) {
542
528
  return t === 0 && r === e.length ? o.fromByteArray(e) : o.fromByteArray(e.slice(t, r));
543
529
  }
544
530
  function lt(e, t, r) {
@@ -547,29 +533,29 @@ ct.write = function(u, o, s, f, l, d) {
547
533
  let i = t;
548
534
  for (; i < r; ) {
549
535
  const a = e[i];
550
- let h = null, B = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
536
+ let s = null, B = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
551
537
  if (i + B <= r) {
552
538
  let A, F, U, I;
553
539
  switch (B) {
554
540
  case 1:
555
- a < 128 && (h = a);
541
+ a < 128 && (s = a);
556
542
  break;
557
543
  case 2:
558
- A = e[i + 1], (A & 192) === 128 && (I = (a & 31) << 6 | A & 63, I > 127 && (h = I));
544
+ A = e[i + 1], (A & 192) === 128 && (I = (a & 31) << 6 | A & 63, I > 127 && (s = I));
559
545
  break;
560
546
  case 3:
561
- A = e[i + 1], F = e[i + 2], (A & 192) === 128 && (F & 192) === 128 && (I = (a & 15) << 12 | (A & 63) << 6 | F & 63, I > 2047 && (I < 55296 || I > 57343) && (h = I));
547
+ A = e[i + 1], F = e[i + 2], (A & 192) === 128 && (F & 192) === 128 && (I = (a & 15) << 12 | (A & 63) << 6 | F & 63, I > 2047 && (I < 55296 || I > 57343) && (s = I));
562
548
  break;
563
549
  case 4:
564
- A = e[i + 1], F = e[i + 2], U = e[i + 3], (A & 192) === 128 && (F & 192) === 128 && (U & 192) === 128 && (I = (a & 15) << 18 | (A & 63) << 12 | (F & 63) << 6 | U & 63, I > 65535 && I < 1114112 && (h = I));
550
+ A = e[i + 1], F = e[i + 2], U = e[i + 3], (A & 192) === 128 && (F & 192) === 128 && (U & 192) === 128 && (I = (a & 15) << 18 | (A & 63) << 12 | (F & 63) << 6 | U & 63, I > 65535 && I < 1114112 && (s = I));
565
551
  }
566
552
  }
567
- h === null ? (h = 65533, B = 1) : h > 65535 && (h -= 65536, n.push(h >>> 10 & 1023 | 55296), h = 56320 | h & 1023), n.push(h), i += B;
553
+ s === null ? (s = 65533, B = 1) : s > 65535 && (s -= 65536, n.push(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), n.push(s), i += B;
568
554
  }
569
- return Lt(n);
555
+ return Pt(n);
570
556
  }
571
557
  const dt = 4096;
572
- function Lt(e) {
558
+ function Pt(e) {
573
559
  const t = e.length;
574
560
  if (t <= dt)
575
561
  return String.fromCharCode.apply(String, e);
@@ -617,16 +603,14 @@ ct.write = function(u, o, s, f, l, d) {
617
603
  return Object.setPrototypeOf(i, c.prototype), i;
618
604
  };
619
605
  function b(e, t, r) {
620
- if (e % 1 !== 0 || e < 0)
621
- throw new RangeError("offset is not uint");
622
- if (e + t > r)
623
- throw new RangeError("Trying to access beyond buffer length");
606
+ if (e % 1 !== 0 || e < 0) throw new RangeError("offset is not uint");
607
+ if (e + t > r) throw new RangeError("Trying to access beyond buffer length");
624
608
  }
625
609
  c.prototype.readUintLE = c.prototype.readUIntLE = function(t, r, n) {
626
610
  t = t >>> 0, r = r >>> 0, n || b(t, r, this.length);
627
- let i = this[t], a = 1, h = 0;
628
- for (; ++h < r && (a *= 256); )
629
- i += this[t + h] * a;
611
+ let i = this[t], a = 1, s = 0;
612
+ for (; ++s < r && (a *= 256); )
613
+ i += this[t + s] * a;
630
614
  return i;
631
615
  }, c.prototype.readUintBE = c.prototype.readUIntBE = function(t, r, n) {
632
616
  t = t >>> 0, r = r >>> 0, n || b(t, r, this.length);
@@ -658,16 +642,16 @@ ct.write = function(u, o, s, f, l, d) {
658
642
  return (BigInt(i) << BigInt(32)) + BigInt(a);
659
643
  }), c.prototype.readIntLE = function(t, r, n) {
660
644
  t = t >>> 0, r = r >>> 0, n || b(t, r, this.length);
661
- let i = this[t], a = 1, h = 0;
662
- for (; ++h < r && (a *= 256); )
663
- i += this[t + h] * a;
645
+ let i = this[t], a = 1, s = 0;
646
+ for (; ++s < r && (a *= 256); )
647
+ i += this[t + s] * a;
664
648
  return a *= 128, i >= a && (i -= Math.pow(2, 8 * r)), i;
665
649
  }, c.prototype.readIntBE = function(t, r, n) {
666
650
  t = t >>> 0, r = r >>> 0, n || b(t, r, this.length);
667
- let i = r, a = 1, h = this[t + --i];
651
+ let i = r, a = 1, s = this[t + --i];
668
652
  for (; i > 0 && (a *= 256); )
669
- h += this[t + --i] * a;
670
- return a *= 128, h >= a && (h -= Math.pow(2, 8 * r)), h;
653
+ s += this[t + --i] * a;
654
+ return a *= 128, s >= a && (s -= Math.pow(2, 8 * r)), s;
671
655
  }, c.prototype.readInt8 = function(t, r) {
672
656
  return t = t >>> 0, r || b(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
673
657
  }, c.prototype.readInt16LE = function(t, r) {
@@ -696,39 +680,36 @@ ct.write = function(u, o, s, f, l, d) {
696
680
  this[++t] * 2 ** 16 + this[++t] * 2 ** 8 + this[++t];
697
681
  return (BigInt(i) << BigInt(32)) + BigInt(this[++t] * 2 ** 24 + this[++t] * 2 ** 16 + this[++t] * 2 ** 8 + n);
698
682
  }), c.prototype.readFloatLE = function(t, r) {
699
- return t = t >>> 0, r || b(t, 4, this.length), s.read(this, t, !0, 23, 4);
683
+ return t = t >>> 0, r || b(t, 4, this.length), h.read(this, t, !0, 23, 4);
700
684
  }, c.prototype.readFloatBE = function(t, r) {
701
- return t = t >>> 0, r || b(t, 4, this.length), s.read(this, t, !1, 23, 4);
685
+ return t = t >>> 0, r || b(t, 4, this.length), h.read(this, t, !1, 23, 4);
702
686
  }, c.prototype.readDoubleLE = function(t, r) {
703
- return t = t >>> 0, r || b(t, 8, this.length), s.read(this, t, !0, 52, 8);
687
+ return t = t >>> 0, r || b(t, 8, this.length), h.read(this, t, !0, 52, 8);
704
688
  }, c.prototype.readDoubleBE = function(t, r) {
705
- return t = t >>> 0, r || b(t, 8, this.length), s.read(this, t, !1, 52, 8);
689
+ return t = t >>> 0, r || b(t, 8, this.length), h.read(this, t, !1, 52, 8);
706
690
  };
707
691
  function M(e, t, r, n, i, a) {
708
- if (!c.isBuffer(e))
709
- throw new TypeError('"buffer" argument must be a Buffer instance');
710
- if (t > i || t < a)
711
- throw new RangeError('"value" argument is out of bounds');
712
- if (r + n > e.length)
713
- throw new RangeError("Index out of range");
692
+ if (!c.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
693
+ if (t > i || t < a) throw new RangeError('"value" argument is out of bounds');
694
+ if (r + n > e.length) throw new RangeError("Index out of range");
714
695
  }
715
696
  c.prototype.writeUintLE = c.prototype.writeUIntLE = function(t, r, n, i) {
716
697
  if (t = +t, r = r >>> 0, n = n >>> 0, !i) {
717
698
  const B = Math.pow(2, 8 * n) - 1;
718
699
  M(this, t, r, n, B, 0);
719
700
  }
720
- let a = 1, h = 0;
721
- for (this[r] = t & 255; ++h < n && (a *= 256); )
722
- this[r + h] = t / a & 255;
701
+ let a = 1, s = 0;
702
+ for (this[r] = t & 255; ++s < n && (a *= 256); )
703
+ this[r + s] = t / a & 255;
723
704
  return r + n;
724
705
  }, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(t, r, n, i) {
725
706
  if (t = +t, r = r >>> 0, n = n >>> 0, !i) {
726
707
  const B = Math.pow(2, 8 * n) - 1;
727
708
  M(this, t, r, n, B, 0);
728
709
  }
729
- let a = n - 1, h = 1;
730
- for (this[r + a] = t & 255; --a >= 0 && (h *= 256); )
731
- this[r + a] = t / h & 255;
710
+ let a = n - 1, s = 1;
711
+ for (this[r + a] = t & 255; --a >= 0 && (s *= 256); )
712
+ this[r + a] = t / s & 255;
732
713
  return r + n;
733
714
  }, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(t, r, n) {
734
715
  return t = +t, r = r >>> 0, n || M(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
@@ -745,15 +726,15 @@ ct.write = function(u, o, s, f, l, d) {
745
726
  Et(t, n, i, e, r, 7);
746
727
  let a = Number(t & BigInt(4294967295));
747
728
  e[r++] = a, a = a >> 8, e[r++] = a, a = a >> 8, e[r++] = a, a = a >> 8, e[r++] = a;
748
- let h = Number(t >> BigInt(32) & BigInt(4294967295));
749
- return e[r++] = h, h = h >> 8, e[r++] = h, h = h >> 8, e[r++] = h, h = h >> 8, e[r++] = h, r;
729
+ let s = Number(t >> BigInt(32) & BigInt(4294967295));
730
+ return e[r++] = s, s = s >> 8, e[r++] = s, s = s >> 8, e[r++] = s, s = s >> 8, e[r++] = s, r;
750
731
  }
751
732
  function wt(e, t, r, n, i) {
752
733
  Et(t, n, i, e, r, 7);
753
734
  let a = Number(t & BigInt(4294967295));
754
735
  e[r + 7] = a, a = a >> 8, e[r + 6] = a, a = a >> 8, e[r + 5] = a, a = a >> 8, e[r + 4] = a;
755
- let h = Number(t >> BigInt(32) & BigInt(4294967295));
756
- return e[r + 3] = h, h = h >> 8, e[r + 2] = h, h = h >> 8, e[r + 1] = h, h = h >> 8, e[r] = h, r + 8;
736
+ let s = Number(t >> BigInt(32) & BigInt(4294967295));
737
+ return e[r + 3] = s, s = s >> 8, e[r + 2] = s, s = s >> 8, e[r + 1] = s, s = s >> 8, e[r] = s, r + 8;
757
738
  }
758
739
  c.prototype.writeBigUInt64LE = $(function(t, r = 0) {
759
740
  return pt(this, t, r, BigInt(0), BigInt("0xffffffffffffffff"));
@@ -764,18 +745,18 @@ ct.write = function(u, o, s, f, l, d) {
764
745
  const A = Math.pow(2, 8 * n - 1);
765
746
  M(this, t, r, n, A - 1, -A);
766
747
  }
767
- let a = 0, h = 1, B = 0;
768
- for (this[r] = t & 255; ++a < n && (h *= 256); )
769
- t < 0 && B === 0 && this[r + a - 1] !== 0 && (B = 1), this[r + a] = (t / h >> 0) - B & 255;
748
+ let a = 0, s = 1, B = 0;
749
+ for (this[r] = t & 255; ++a < n && (s *= 256); )
750
+ t < 0 && B === 0 && this[r + a - 1] !== 0 && (B = 1), this[r + a] = (t / s >> 0) - B & 255;
770
751
  return r + n;
771
752
  }, c.prototype.writeIntBE = function(t, r, n, i) {
772
753
  if (t = +t, r = r >>> 0, !i) {
773
754
  const A = Math.pow(2, 8 * n - 1);
774
755
  M(this, t, r, n, A - 1, -A);
775
756
  }
776
- let a = n - 1, h = 1, B = 0;
777
- for (this[r + a] = t & 255; --a >= 0 && (h *= 256); )
778
- t < 0 && B === 0 && this[r + a + 1] !== 0 && (B = 1), this[r + a] = (t / h >> 0) - B & 255;
757
+ let a = n - 1, s = 1, B = 0;
758
+ for (this[r + a] = t & 255; --a >= 0 && (s *= 256); )
759
+ t < 0 && B === 0 && this[r + a + 1] !== 0 && (B = 1), this[r + a] = (t / s >> 0) - B & 255;
779
760
  return r + n;
780
761
  }, c.prototype.writeInt8 = function(t, r, n) {
781
762
  return t = +t, r = r >>> 0, n || M(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
@@ -793,13 +774,11 @@ ct.write = function(u, o, s, f, l, d) {
793
774
  return wt(this, t, r, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
794
775
  });
795
776
  function yt(e, t, r, n, i, a) {
796
- if (r + n > e.length)
797
- throw new RangeError("Index out of range");
798
- if (r < 0)
799
- throw new RangeError("Index out of range");
777
+ if (r + n > e.length) throw new RangeError("Index out of range");
778
+ if (r < 0) throw new RangeError("Index out of range");
800
779
  }
801
780
  function xt(e, t, r, n, i) {
802
- return t = +t, r = r >>> 0, i || yt(e, t, r, 4), s.write(e, t, r, n, 23, 4), r + 4;
781
+ return t = +t, r = r >>> 0, i || yt(e, t, r, 4), h.write(e, t, r, n, 23, 4), r + 4;
803
782
  }
804
783
  c.prototype.writeFloatLE = function(t, r, n) {
805
784
  return xt(this, t, r, !0, n);
@@ -807,23 +786,19 @@ ct.write = function(u, o, s, f, l, d) {
807
786
  return xt(this, t, r, !1, n);
808
787
  };
809
788
  function Bt(e, t, r, n, i) {
810
- return t = +t, r = r >>> 0, i || yt(e, t, r, 8), s.write(e, t, r, n, 52, 8), r + 8;
789
+ return t = +t, r = r >>> 0, i || yt(e, t, r, 8), h.write(e, t, r, n, 52, 8), r + 8;
811
790
  }
812
791
  c.prototype.writeDoubleLE = function(t, r, n) {
813
792
  return Bt(this, t, r, !0, n);
814
793
  }, c.prototype.writeDoubleBE = function(t, r, n) {
815
794
  return Bt(this, t, r, !1, n);
816
795
  }, c.prototype.copy = function(t, r, n, i) {
817
- if (!c.isBuffer(t))
818
- throw new TypeError("argument should be a Buffer");
819
- if (n || (n = 0), !i && i !== 0 && (i = this.length), r >= t.length && (r = t.length), r || (r = 0), i > 0 && i < n && (i = n), i === n || t.length === 0 || this.length === 0)
820
- return 0;
796
+ if (!c.isBuffer(t)) throw new TypeError("argument should be a Buffer");
797
+ if (n || (n = 0), !i && i !== 0 && (i = this.length), r >= t.length && (r = t.length), r || (r = 0), i > 0 && i < n && (i = n), i === n || t.length === 0 || this.length === 0) return 0;
821
798
  if (r < 0)
822
799
  throw new RangeError("targetStart out of bounds");
823
- if (n < 0 || n >= this.length)
824
- throw new RangeError("Index out of range");
825
- if (i < 0)
826
- throw new RangeError("sourceEnd out of bounds");
800
+ if (n < 0 || n >= this.length) throw new RangeError("Index out of range");
801
+ if (i < 0) throw new RangeError("sourceEnd out of bounds");
827
802
  i > this.length && (i = this.length), t.length - r < i - n && (i = t.length - r + n);
828
803
  const a = i - n;
829
804
  return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r, n, i) : Uint8Array.prototype.set.call(
@@ -838,11 +813,10 @@ ct.write = function(u, o, s, f, l, d) {
838
813
  if (typeof i == "string" && !c.isEncoding(i))
839
814
  throw new TypeError("Unknown encoding: " + i);
840
815
  if (t.length === 1) {
841
- const h = t.charCodeAt(0);
842
- (i === "utf8" && h < 128 || i === "latin1") && (t = h);
816
+ const s = t.charCodeAt(0);
817
+ (i === "utf8" && s < 128 || i === "latin1") && (t = s);
843
818
  }
844
- } else
845
- typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
819
+ } else typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
846
820
  if (r < 0 || this.length < r || this.length < n)
847
821
  throw new RangeError("Out of range index");
848
822
  if (n <= r)
@@ -853,11 +827,11 @@ ct.write = function(u, o, s, f, l, d) {
853
827
  for (a = r; a < n; ++a)
854
828
  this[a] = t;
855
829
  else {
856
- const h = c.isBuffer(t) ? t : c.from(t, i), B = h.length;
830
+ const s = c.isBuffer(t) ? t : c.from(t, i), B = s.length;
857
831
  if (B === 0)
858
832
  throw new TypeError('The value "' + t + '" is invalid for argument "value"');
859
833
  for (a = 0; a < n - r; ++a)
860
- this[a + r] = h[a % B];
834
+ this[a + r] = s[a % B];
861
835
  }
862
836
  return this;
863
837
  };
@@ -919,9 +893,9 @@ ct.write = function(u, o, s, f, l, d) {
919
893
  }
920
894
  function Et(e, t, r, n, i, a) {
921
895
  if (e > r || e < t) {
922
- const h = typeof t == "bigint" ? "n" : "";
896
+ const s = typeof t == "bigint" ? "n" : "";
923
897
  let B;
924
- throw a > 3 ? t === 0 || t === BigInt(0) ? B = `>= 0${h} and < 2${h} ** ${(a + 1) * 8}${h}` : B = `>= -(2${h} ** ${(a + 1) * 8 - 1}${h}) and < 2 ** ${(a + 1) * 8 - 1}${h}` : B = `>= ${t}${h} and <= ${r}${h}`, new G.ERR_OUT_OF_RANGE("value", B, e);
898
+ throw t === 0 || t === BigInt(0) ? B = `>= 0${s} and < 2${s} ** ${(a + 1) * 8}${s}` : B = `>= -(2${s} ** ${(a + 1) * 8 - 1}${s}) and < 2 ** ${(a + 1) * 8 - 1}${s}`, new G.ERR_OUT_OF_RANGE("value", B, e);
925
899
  }
926
900
  $t(n, i, a);
927
901
  }
@@ -930,16 +904,15 @@ ct.write = function(u, o, s, f, l, d) {
930
904
  throw new G.ERR_INVALID_ARG_TYPE(t, "number", e);
931
905
  }
932
906
  function Y(e, t, r) {
933
- throw Math.floor(e) !== e ? (z(e, r), new G.ERR_OUT_OF_RANGE(r || "offset", "an integer", e)) : t < 0 ? new G.ERR_BUFFER_OUT_OF_BOUNDS() : new G.ERR_OUT_OF_RANGE(
934
- r || "offset",
935
- `>= ${r ? 1 : 0} and <= ${t}`,
907
+ throw Math.floor(e) !== e ? (z(e, r), new G.ERR_OUT_OF_RANGE("offset", "an integer", e)) : t < 0 ? new G.ERR_BUFFER_OUT_OF_BOUNDS() : new G.ERR_OUT_OF_RANGE(
908
+ "offset",
909
+ `>= 0 and <= ${t}`,
936
910
  e
937
911
  );
938
912
  }
939
913
  const Dt = /[^+/0-9A-Za-z-_]/g;
940
914
  function jt(e) {
941
- if (e = e.split("=")[0], e = e.trim().replace(Dt, ""), e.length < 2)
942
- return "";
915
+ if (e = e.split("=")[0], e = e.trim().replace(Dt, ""), e.length < 2) return "";
943
916
  for (; e.length % 4 !== 0; )
944
917
  e = e + "=";
945
918
  return e;
@@ -950,13 +923,13 @@ ct.write = function(u, o, s, f, l, d) {
950
923
  const n = e.length;
951
924
  let i = null;
952
925
  const a = [];
953
- for (let h = 0; h < n; ++h) {
954
- if (r = e.charCodeAt(h), r > 55295 && r < 57344) {
926
+ for (let s = 0; s < n; ++s) {
927
+ if (r = e.charCodeAt(s), r > 55295 && r < 57344) {
955
928
  if (!i) {
956
929
  if (r > 56319) {
957
930
  (t -= 3) > -1 && a.push(239, 191, 189);
958
931
  continue;
959
- } else if (h + 1 === n) {
932
+ } else if (s + 1 === n) {
960
933
  (t -= 3) > -1 && a.push(239, 191, 189);
961
934
  continue;
962
935
  }
@@ -968,30 +941,25 @@ ct.write = function(u, o, s, f, l, d) {
968
941
  continue;
969
942
  }
970
943
  r = (i - 55296 << 10 | r - 56320) + 65536;
971
- } else
972
- i && (t -= 3) > -1 && a.push(239, 191, 189);
944
+ } else i && (t -= 3) > -1 && a.push(239, 191, 189);
973
945
  if (i = null, r < 128) {
974
- if ((t -= 1) < 0)
975
- break;
946
+ if ((t -= 1) < 0) break;
976
947
  a.push(r);
977
948
  } else if (r < 2048) {
978
- if ((t -= 2) < 0)
979
- break;
949
+ if ((t -= 2) < 0) break;
980
950
  a.push(
981
951
  r >> 6 | 192,
982
952
  r & 63 | 128
983
953
  );
984
954
  } else if (r < 65536) {
985
- if ((t -= 3) < 0)
986
- break;
955
+ if ((t -= 3) < 0) break;
987
956
  a.push(
988
957
  r >> 12 | 224,
989
958
  r >> 6 & 63 | 128,
990
959
  r & 63 | 128
991
960
  );
992
961
  } else if (r < 1114112) {
993
- if ((t -= 4) < 0)
994
- break;
962
+ if ((t -= 4) < 0) break;
995
963
  a.push(
996
964
  r >> 18 | 240,
997
965
  r >> 12 & 63 | 128,
@@ -1012,8 +980,8 @@ ct.write = function(u, o, s, f, l, d) {
1012
980
  function zt(e, t) {
1013
981
  let r, n, i;
1014
982
  const a = [];
1015
- for (let h = 0; h < e.length && !((t -= 2) < 0); ++h)
1016
- r = e.charCodeAt(h), n = r >> 8, i = r % 256, a.push(i), a.push(n);
983
+ for (let s = 0; s < e.length && !((t -= 2) < 0); ++s)
984
+ r = e.charCodeAt(s), n = r >> 8, i = r % 256, a.push(i), a.push(n);
1017
985
  return a;
1018
986
  }
1019
987
  function mt(e) {
@@ -1049,7 +1017,7 @@ ct.write = function(u, o, s, f, l, d) {
1049
1017
  })(q);
1050
1018
  var v = {}, H = {};
1051
1019
  Object.defineProperty(H, "__esModule", { value: !0 });
1052
- const vt = (u, o) => u << 8 | o, tr = (u, o, s) => u << 16 | o << 8 | s, rr = (u, o, s, f) => u << 24 | o << 16 | s << 8 | f, er = `Maxmind v2 module has changed API.
1020
+ const vt = (u, o) => u << 8 | o, tr = (u, o, h) => u << 16 | o << 8 | h, rr = (u, o, h, f) => u << 24 | o << 16 | h << 8 | f, er = `Maxmind v2 module has changed API.
1053
1021
  Upgrade instructions can be found here: https://github.com/runk/node-maxmind/wiki/Migration-guide
1054
1022
  If you want to use legacy library then explicitly install maxmind@1`;
1055
1023
  H.default = {
@@ -1058,7 +1026,7 @@ H.default = {
1058
1026
  concat4: rr,
1059
1027
  legacyErrorMessage: er
1060
1028
  };
1061
- var nr = L && L.__importDefault || function(u) {
1029
+ var nr = P && P.__importDefault || function(u) {
1062
1030
  return u && u.__esModule ? u : { default: u };
1063
1031
  };
1064
1032
  Object.defineProperty(v, "__esModule", { value: !0 });
@@ -1074,78 +1042,78 @@ const or = [0, 2048, 526336, 0], ur = {
1074
1042
  }
1075
1043
  }, R = (u, o) => ({ value: u, offset: o });
1076
1044
  class cr {
1077
- constructor(o, s = 0, f = ur) {
1078
- this.telemetry = {}, this.db = o, this.baseOffset = s, this.cache = f;
1045
+ constructor(o, h = 0, f = ur) {
1046
+ this.telemetry = {}, this.db = o, this.baseOffset = h, this.cache = f;
1079
1047
  }
1080
1048
  decode(o) {
1081
- let s;
1049
+ let h;
1082
1050
  const f = this.db[o++];
1083
1051
  let l = f >> 5;
1084
1052
  if (l === C.Pointer)
1085
- return s = this.decodePointer(f, o), R(this.decodeFast(s.value).value, s.offset);
1053
+ return h = this.decodePointer(f, o), R(this.decodeFast(h.value).value, h.offset);
1086
1054
  if (l === C.Extended) {
1087
- if (s = this.db[o] + 7, s < 8)
1088
- throw new Error("Invalid Extended Type at offset " + o + " val " + s);
1089
- l = s, o++;
1055
+ if (h = this.db[o] + 7, h < 8)
1056
+ throw new Error("Invalid Extended Type at offset " + o + " val " + h);
1057
+ l = h, o++;
1090
1058
  }
1091
1059
  const d = this.sizeFromCtrlByte(f, o);
1092
1060
  return this.decodeByType(l, d.offset, d.value);
1093
1061
  }
1094
1062
  decodeFast(o) {
1095
- const s = this.cache.get(o);
1096
- if (s)
1097
- return s;
1063
+ const h = this.cache.get(o);
1064
+ if (h)
1065
+ return h;
1098
1066
  const f = this.decode(o);
1099
1067
  return this.cache.set(o, f), f;
1100
1068
  }
1101
- decodeByType(o, s, f) {
1102
- const l = s + f;
1069
+ decodeByType(o, h, f) {
1070
+ const l = h + f;
1103
1071
  switch (o) {
1104
1072
  case C.Utf8String:
1105
- return R(this.decodeString(s, f), l);
1073
+ return R(this.decodeString(h, f), l);
1106
1074
  case C.Map:
1107
- return this.decodeMap(f, s);
1075
+ return this.decodeMap(f, h);
1108
1076
  case C.Uint32:
1109
- return R(this.decodeUint(s, f), l);
1077
+ return R(this.decodeUint(h, f), l);
1110
1078
  case C.Double:
1111
- return R(this.decodeDouble(s), l);
1079
+ return R(this.decodeDouble(h), l);
1112
1080
  case C.Array:
1113
- return this.decodeArray(f, s);
1081
+ return this.decodeArray(f, h);
1114
1082
  case C.Boolean:
1115
- return R(this.decodeBoolean(f), s);
1083
+ return R(this.decodeBoolean(f), h);
1116
1084
  case C.Float:
1117
- return R(this.decodeFloat(s), l);
1085
+ return R(this.decodeFloat(h), l);
1118
1086
  case C.Bytes:
1119
- return R(this.decodeBytes(s, f), l);
1087
+ return R(this.decodeBytes(h, f), l);
1120
1088
  case C.Uint16:
1121
- return R(this.decodeUint(s, f), l);
1089
+ return R(this.decodeUint(h, f), l);
1122
1090
  case C.Int32:
1123
- return R(this.decodeInt32(s, f), l);
1091
+ return R(this.decodeInt32(h, f), l);
1124
1092
  case C.Uint64:
1125
- return R(this.decodeUint(s, f), l);
1093
+ return R(this.decodeUint(h, f), l);
1126
1094
  case C.Uint128:
1127
- return R(this.decodeUint(s, f), l);
1095
+ return R(this.decodeUint(h, f), l);
1128
1096
  }
1129
- throw new Error("Unknown type " + o + " at offset " + s);
1097
+ throw new Error("Unknown type " + o + " at offset " + h);
1130
1098
  }
1131
- sizeFromCtrlByte(o, s) {
1099
+ sizeFromCtrlByte(o, h) {
1132
1100
  const f = o & 31;
1133
- return f < 29 ? R(f, s) : f === 29 ? R(29 + this.db[s], s + 1) : f === 30 ? R(285 + this.db.readUInt16BE(s), s + 2) : R(65821 + j.default.concat3(this.db[s], this.db[s + 1], this.db[s + 2]), s + 3);
1101
+ return f < 29 ? R(f, h) : f === 29 ? R(29 + this.db[h], h + 1) : f === 30 ? R(285 + this.db.readUInt16BE(h), h + 2) : R(65821 + j.default.concat3(this.db[h], this.db[h + 1], this.db[h + 2]), h + 3);
1134
1102
  }
1135
- decodeBytes(o, s) {
1136
- return this.db.slice(o, o + s);
1103
+ decodeBytes(o, h) {
1104
+ return this.db.slice(o, o + h);
1137
1105
  }
1138
- decodePointer(o, s) {
1106
+ decodePointer(o, h) {
1139
1107
  const f = o >> 3 & 3, l = this.baseOffset + or[f];
1140
1108
  let d = 0;
1141
- return f === 0 ? d = j.default.concat2(o & 7, this.db[s]) : f === 1 ? d = j.default.concat3(o & 7, this.db[s], this.db[s + 1]) : f === 2 ? d = j.default.concat4(o & 7, this.db[s], this.db[s + 1], this.db[s + 2]) : d = this.db.readUInt32BE(s), s += f + 1, R(l + d, s);
1109
+ return f === 0 ? d = j.default.concat2(o & 7, this.db[h]) : f === 1 ? d = j.default.concat3(o & 7, this.db[h], this.db[h + 1]) : f === 2 ? d = j.default.concat4(o & 7, this.db[h], this.db[h + 1], this.db[h + 2]) : d = this.db.readUInt32BE(h), h += f + 1, R(l + d, h);
1142
1110
  }
1143
- decodeArray(o, s) {
1111
+ decodeArray(o, h) {
1144
1112
  let f;
1145
1113
  const l = [];
1146
1114
  for (let d = 0; d < o; d++)
1147
- f = this.decode(s), s = f.offset, l.push(f.value);
1148
- return R(l, s);
1115
+ f = this.decode(h), h = f.offset, l.push(f.value);
1116
+ return R(l, h);
1149
1117
  }
1150
1118
  decodeBoolean(o) {
1151
1119
  return o !== 0;
@@ -1156,18 +1124,18 @@ class cr {
1156
1124
  decodeFloat(o) {
1157
1125
  return this.db.readFloatBE(o);
1158
1126
  }
1159
- decodeMap(o, s) {
1127
+ decodeMap(o, h) {
1160
1128
  let f, l;
1161
1129
  const d = {};
1162
1130
  for (let p = 0; p < o; p++)
1163
- f = this.decode(s), l = f.value, f = this.decode(f.offset), s = f.offset, d[l] = f.value;
1164
- return R(d, s);
1131
+ f = this.decode(h), l = f.value, f = this.decode(f.offset), h = f.offset, d[l] = f.value;
1132
+ return R(d, h);
1165
1133
  }
1166
- decodeInt32(o, s) {
1167
- return s === 0 ? 0 : this.db.readInt32BE(o);
1134
+ decodeInt32(o, h) {
1135
+ return h === 0 ? 0 : this.db.readInt32BE(o);
1168
1136
  }
1169
- decodeUint(o, s) {
1170
- switch (s) {
1137
+ decodeUint(o, h) {
1138
+ switch (h) {
1171
1139
  case 0:
1172
1140
  return 0;
1173
1141
  case 1:
@@ -1179,20 +1147,20 @@ class cr {
1179
1147
  case 4:
1180
1148
  return j.default.concat4(this.db[o + 0], this.db[o + 1], this.db[o + 2], this.db[o + 3]);
1181
1149
  case 8:
1182
- return this.decodeBigUint(o, s);
1150
+ return this.decodeBigUint(o, h);
1183
1151
  case 16:
1184
- return this.decodeBigUint(o, s);
1152
+ return this.decodeBigUint(o, h);
1185
1153
  }
1186
1154
  return 0;
1187
1155
  }
1188
- decodeString(o, s) {
1189
- return this.db.slice(o, o + s).toString();
1156
+ decodeString(o, h) {
1157
+ return this.db.slice(o, o + h).toString();
1190
1158
  }
1191
- decodeBigUint(o, s) {
1192
- const f = ir.Buffer.alloc(s);
1193
- this.db.copy(f, 0, o, o + s);
1159
+ decodeBigUint(o, h) {
1160
+ const f = ir.Buffer.alloc(h);
1161
+ this.db.copy(f, 0, o, o + h);
1194
1162
  let l = BigInt(0);
1195
- const d = s / 4;
1163
+ const d = h / 4;
1196
1164
  for (let p = 0; p < d; p++)
1197
1165
  l = l * BigInt(4294967296) + BigInt(f.readUInt32BE(p << 2));
1198
1166
  return l.toString();
@@ -1202,42 +1170,42 @@ v.default = cr;
1202
1170
  var at = {};
1203
1171
  Object.defineProperty(at, "__esModule", { value: !0 });
1204
1172
  const ar = (u) => {
1205
- const o = u.split(".", 4), s = parseInt(o[0]), f = parseInt(o[1]), l = parseInt(o[2]), d = parseInt(o[3]);
1206
- return [s, f, l, d];
1173
+ const o = u.split(".", 4), h = parseInt(o[0]), f = parseInt(o[1]), l = parseInt(o[2]), d = parseInt(o[3]);
1174
+ return [h, f, l, d];
1207
1175
  }, Z = (u) => {
1208
1176
  const o = parseInt(u, 10).toString(16);
1209
1177
  return o.length === 2 ? o : "0" + o;
1210
- }, sr = (u) => {
1178
+ }, hr = (u) => {
1211
1179
  const o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
1212
- let s, f, l;
1180
+ let h, f, l;
1213
1181
  const d = u.indexOf(".") > -1 ? u.replace(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, (g, m, E, x, w) => Z(m) + Z(E) + ":" + Z(x) + Z(w)) : u, [p, c] = d.split("::", 2);
1214
1182
  if (p)
1215
- for (f = p.split(":"), s = 0; s < f.length; s++)
1216
- l = parseInt(f[s], 16), o[s * 2] = l >> 8, o[s * 2 + 1] = l & 255;
1183
+ for (f = p.split(":"), h = 0; h < f.length; h++)
1184
+ l = parseInt(f[h], 16), o[h * 2] = l >> 8, o[h * 2 + 1] = l & 255;
1217
1185
  if (c) {
1218
1186
  f = c.split(":");
1219
1187
  const g = 16 - f.length * 2;
1220
- for (s = 0; s < f.length; s++)
1221
- l = parseInt(f[s], 16), o[g + s * 2] = l >> 8, o[g + (s * 2 + 1)] = l & 255;
1188
+ for (h = 0; h < f.length; h++)
1189
+ l = parseInt(f[h], 16), o[g + h * 2] = l >> 8, o[g + (h * 2 + 1)] = l & 255;
1222
1190
  }
1223
1191
  return o;
1224
- }, hr = (u) => u.indexOf(":") === -1 ? ar(u) : sr(u), fr = (u, o) => {
1225
- const s = o >> 3, f = 7 ^ o & 7;
1226
- return u[s] >>> f & 1;
1192
+ }, sr = (u) => u.indexOf(":") === -1 ? ar(u) : hr(u), fr = (u, o) => {
1193
+ const h = o >> 3, f = 7 ^ o & 7;
1194
+ return u[h] >>> f & 1;
1227
1195
  }, lr = (u) => /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(u), dr = (u) => /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/.test(u), pr = (u) => lr(u) || dr(u);
1228
1196
  at.default = {
1229
1197
  bitAt: fr,
1230
- parse: hr,
1198
+ parse: sr,
1231
1199
  validate: pr
1232
1200
  };
1233
1201
  var Ut = {};
1234
1202
  (function(u) {
1235
- var o = L && L.__importDefault || function(m) {
1203
+ var o = P && P.__importDefault || function(m) {
1236
1204
  return m && m.__esModule ? m : { default: m };
1237
1205
  };
1238
1206
  Object.defineProperty(u, "__esModule", { value: !0 }), u.isLegacyFormat = u.parseMetadata = void 0;
1239
- const s = o(v), f = o(H), d = q.Buffer.from("ABCDEF4D61784D696E642E636F6D", "hex"), p = (m) => {
1240
- const E = c(m), w = new s.default(m, E).decode(E).value;
1207
+ const h = o(v), f = o(H), d = q.Buffer.from("ABCDEF4D61784D696E642E636F6D", "hex"), p = (m) => {
1208
+ const E = c(m), w = new h.default(m, E).decode(E).value;
1241
1209
  if (!w)
1242
1210
  throw new Error((0, u.isLegacyFormat)(m) ? f.default.legacyErrorMessage : "Cannot parse binary database");
1243
1211
  return [24, 28, 32].indexOf(w.record_size) > -1, {
@@ -1273,12 +1241,12 @@ var Ut = {};
1273
1241
  };
1274
1242
  u.isLegacyFormat = g;
1275
1243
  })(Ut);
1276
- var st = {}, wr = L && L.__importDefault || function(u) {
1244
+ var ht = {}, wr = P && P.__importDefault || function(u) {
1277
1245
  return u && u.__esModule ? u : { default: u };
1278
1246
  };
1279
- Object.defineProperty(st, "__esModule", { value: !0 });
1247
+ Object.defineProperty(ht, "__esModule", { value: !0 });
1280
1248
  const tt = wr(H), yr = (u) => (o) => tt.default.concat3(u[o + 3], u[o + 4], u[o + 5]), xr = (u) => (o) => tt.default.concat3(u[o], u[o + 1], u[o + 2]), Br = (u) => (o) => tt.default.concat4(u[o + 3] >> 4, u[o], u[o + 1], u[o + 2]), gr = (u) => (o) => tt.default.concat4(u[o + 3] & 15, u[o + 4], u[o + 5], u[o + 6]), Er = (u) => (o) => u.readUInt32BE(o), mr = (u) => (o) => u.readUInt32BE(o + 4);
1281
- st.default = (u, o) => {
1249
+ ht.default = (u, o) => {
1282
1250
  switch (o) {
1283
1251
  case 24:
1284
1252
  return { left: xr(u), right: yr(u) };
@@ -1294,7 +1262,7 @@ function Ir() {
1294
1262
  return It || (It = 1, Object.defineProperty(ot, "__esModule", { value: !0 })), ot;
1295
1263
  }
1296
1264
  (function(u) {
1297
- var o = L && L.__createBinding || (Object.create ? function(x, w, y, _) {
1265
+ var o = P && P.__createBinding || (Object.create ? function(x, w, y, _) {
1298
1266
  _ === void 0 && (_ = y);
1299
1267
  var S = Object.getOwnPropertyDescriptor(w, y);
1300
1268
  (!S || ("get" in S ? !w.__esModule : S.writable || S.configurable)) && (S = { enumerable: !0, get: function() {
@@ -1302,14 +1270,13 @@ function Ir() {
1302
1270
  } }), Object.defineProperty(x, _, S);
1303
1271
  } : function(x, w, y, _) {
1304
1272
  _ === void 0 && (_ = y), x[_] = w[y];
1305
- }), s = L && L.__exportStar || function(x, w) {
1306
- for (var y in x)
1307
- y !== "default" && !Object.prototype.hasOwnProperty.call(w, y) && o(w, x, y);
1308
- }, f = L && L.__importDefault || function(x) {
1273
+ }), h = P && P.__exportStar || function(x, w) {
1274
+ for (var y in x) y !== "default" && !Object.prototype.hasOwnProperty.call(w, y) && o(w, x, y);
1275
+ }, f = P && P.__importDefault || function(x) {
1309
1276
  return x && x.__esModule ? x : { default: x };
1310
1277
  };
1311
1278
  Object.defineProperty(u, "__esModule", { value: !0 }), u.Reader = void 0;
1312
- const l = q, d = f(v), p = f(at), c = Ut, g = f(st), m = 16;
1279
+ const l = q, d = f(v), p = f(at), c = Ut, g = f(ht), m = 16;
1313
1280
  class E {
1314
1281
  constructor(w, y = {}) {
1315
1282
  this.opts = y, this.load(w);
@@ -1350,14 +1317,14 @@ function Ir() {
1350
1317
  return y;
1351
1318
  }
1352
1319
  }
1353
- u.Reader = E, s(Ir(), u);
1320
+ u.Reader = E, h(Ir(), u);
1354
1321
  })(Ft);
1355
1322
  async function Fr(u) {
1356
1323
  try {
1357
1324
  const o = await fetch(u);
1358
1325
  if (!o.ok)
1359
1326
  throw new Error("Network response was not ok");
1360
- const s = await o.arrayBuffer(), f = new Uint8Array(s);
1327
+ const h = await o.arrayBuffer(), f = new Uint8Array(h);
1361
1328
  return q.Buffer.from(f);
1362
1329
  } catch (o) {
1363
1330
  console.error("Fetching file failed:", o);
@@ -1366,16 +1333,14 @@ async function Fr(u) {
1366
1333
  const Ar = "https://raw.githubusercontent.com/Max-Sum/17mon-mmdb/release/Country.mmdb";
1367
1334
  let K = null;
1368
1335
  const Ur = async (u) => {
1369
- if (K)
1370
- return K;
1371
- const o = await Fr(u ?? Ar);
1336
+ if (K) return K;
1337
+ const o = await Fr(Ar);
1372
1338
  if (o)
1373
1339
  return K = new Ft.Reader(o), K;
1374
1340
  }, ut = /* @__PURE__ */ new Map(), _r = async (u) => {
1375
1341
  var d;
1376
- if (ut.has(u))
1377
- return ut.get(u);
1378
- const o = await Ur(), s = o == null ? void 0 : o.get(u), f = (d = s == null ? void 0 : s.country) == null ? void 0 : d.names, l = (f == null ? void 0 : f["zh-CN"]) ?? (f == null ? void 0 : f.en) ?? "n/a";
1342
+ if (ut.has(u)) return ut.get(u);
1343
+ const o = await Ur(), h = o == null ? void 0 : o.get(u), f = (d = h == null ? void 0 : h.country) == null ? void 0 : d.names, l = (f == null ? void 0 : f["zh-CN"]) ?? (f == null ? void 0 : f.en) ?? "n/a";
1379
1344
  return l && ut.set(u, l), l;
1380
1345
  };
1381
1346
  window.getGeoFromIp = _r;