@poor-knight/cesium-utils 0.0.0 → 0.0.1

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.
@@ -1,7 +1,7 @@
1
1
  var ne = Object.defineProperty;
2
- var oe = (r, t, e) => t in r ? ne(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var W = (r, t, e) => oe(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { Cartesian2, Cartesian3, VerticalOrigin, HorizontalOrigin, Color, LabelStyle, defaultValue, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle, WebMapTileServiceImageryProvider, ImageryLayer, WebMapServiceImageryProvider } from "cesium";
2
+ var se = (r, t, e) => t in r ? ne(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var H = (r, t, e) => se(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import { Cartesian2, Cartesian3, VerticalOrigin, HorizontalOrigin, Color, LabelStyle, defaultValue, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle, WebMapTileServiceImageryProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, ImageryLayer, WebMapServiceImageryProvider } from "cesium";
5
5
  var commonjsGlobal = typeof globalThis < "u" ? (
6
6
  // eslint-disable-next-line no-undef
7
7
  globalThis
@@ -10,15 +10,15 @@ var commonjsGlobal = typeof globalThis < "u" ? (
10
10
  global
11
11
  ) : typeof self < "u" ? self : {}, inflate$2 = {};
12
12
  const adler32$1 = (r, t, e, a) => {
13
- let l = r & 65535 | 0, n = r >>> 16 & 65535 | 0, o = 0;
13
+ let c = r & 65535 | 0, n = r >>> 16 & 65535 | 0, o = 0;
14
14
  for (; e !== 0; ) {
15
15
  o = e > 2e3 ? 2e3 : e, e -= o;
16
16
  do
17
- l = l + t[a++] | 0, n = n + l | 0;
17
+ c = c + t[a++] | 0, n = n + c | 0;
18
18
  while (--o);
19
- l %= 65521, n %= 65521;
19
+ c %= 65521, n %= 65521;
20
20
  }
21
- return l | n << 16 | 0;
21
+ return c | n << 16 | 0;
22
22
  };
23
23
  var adler32_1 = adler32$1;
24
24
  const makeTable = () => {
@@ -31,77 +31,77 @@ const makeTable = () => {
31
31
  }
32
32
  return t;
33
33
  }, crcTable = new Uint32Array(makeTable()), crc32$1 = (r, t, e, a) => {
34
- const l = crcTable, n = a + e;
34
+ const c = crcTable, n = a + e;
35
35
  r ^= -1;
36
36
  for (let o = a; o < n; o++)
37
- r = r >>> 8 ^ l[(r ^ t[o]) & 255];
37
+ r = r >>> 8 ^ c[(r ^ t[o]) & 255];
38
38
  return r ^ -1;
39
39
  };
40
40
  var crc32_1 = crc32$1;
41
41
  const BAD$1 = 16209, TYPE$1 = 16191;
42
42
  var inffast = function(t, e) {
43
- let a, l, n, o, s, u, i, c, h, p, d, y, g, T, _, m, b, v, x, O, E, q, S, $;
43
+ let a, c, n, o, s, u, i, l, h, p, d, y, g, _, w, m, b, v, E, T, R, q, A, $;
44
44
  const k = t.state;
45
- a = t.next_in, S = t.input, l = a + (t.avail_in - 5), n = t.next_out, $ = t.output, o = n - (e - t.avail_out), s = n + (t.avail_out - 257), u = k.dmax, i = k.wsize, c = k.whave, h = k.wnext, p = k.window, d = k.hold, y = k.bits, g = k.lencode, T = k.distcode, _ = (1 << k.lenbits) - 1, m = (1 << k.distbits) - 1;
45
+ a = t.next_in, A = t.input, c = a + (t.avail_in - 5), n = t.next_out, $ = t.output, o = n - (e - t.avail_out), s = n + (t.avail_out - 257), u = k.dmax, i = k.wsize, l = k.whave, h = k.wnext, p = k.window, d = k.hold, y = k.bits, g = k.lencode, _ = k.distcode, w = (1 << k.lenbits) - 1, m = (1 << k.distbits) - 1;
46
46
  e: do {
47
- y < 15 && (d += S[a++] << y, y += 8, d += S[a++] << y, y += 8), b = g[d & _];
47
+ y < 15 && (d += A[a++] << y, y += 8, d += A[a++] << y, y += 8), b = g[d & w];
48
48
  t: for (; ; ) {
49
49
  if (v = b >>> 24, d >>>= v, y -= v, v = b >>> 16 & 255, v === 0)
50
50
  $[n++] = b & 65535;
51
51
  else if (v & 16) {
52
- x = b & 65535, v &= 15, v && (y < v && (d += S[a++] << y, y += 8), x += d & (1 << v) - 1, d >>>= v, y -= v), y < 15 && (d += S[a++] << y, y += 8, d += S[a++] << y, y += 8), b = T[d & m];
52
+ E = b & 65535, v &= 15, v && (y < v && (d += A[a++] << y, y += 8), E += d & (1 << v) - 1, d >>>= v, y -= v), y < 15 && (d += A[a++] << y, y += 8, d += A[a++] << y, y += 8), b = _[d & m];
53
53
  r: for (; ; ) {
54
54
  if (v = b >>> 24, d >>>= v, y -= v, v = b >>> 16 & 255, v & 16) {
55
- if (O = b & 65535, v &= 15, y < v && (d += S[a++] << y, y += 8, y < v && (d += S[a++] << y, y += 8)), O += d & (1 << v) - 1, O > u) {
55
+ if (T = b & 65535, v &= 15, y < v && (d += A[a++] << y, y += 8, y < v && (d += A[a++] << y, y += 8)), T += d & (1 << v) - 1, T > u) {
56
56
  t.msg = "invalid distance too far back", k.mode = BAD$1;
57
57
  break e;
58
58
  }
59
- if (d >>>= v, y -= v, v = n - o, O > v) {
60
- if (v = O - v, v > c && k.sane) {
59
+ if (d >>>= v, y -= v, v = n - o, T > v) {
60
+ if (v = T - v, v > l && k.sane) {
61
61
  t.msg = "invalid distance too far back", k.mode = BAD$1;
62
62
  break e;
63
63
  }
64
- if (E = 0, q = p, h === 0) {
65
- if (E += i - v, v < x) {
66
- x -= v;
64
+ if (R = 0, q = p, h === 0) {
65
+ if (R += i - v, v < E) {
66
+ E -= v;
67
67
  do
68
- $[n++] = p[E++];
68
+ $[n++] = p[R++];
69
69
  while (--v);
70
- E = n - O, q = $;
70
+ R = n - T, q = $;
71
71
  }
72
72
  } else if (h < v) {
73
- if (E += i + h - v, v -= h, v < x) {
74
- x -= v;
73
+ if (R += i + h - v, v -= h, v < E) {
74
+ E -= v;
75
75
  do
76
- $[n++] = p[E++];
76
+ $[n++] = p[R++];
77
77
  while (--v);
78
- if (E = 0, h < x) {
79
- v = h, x -= v;
78
+ if (R = 0, h < E) {
79
+ v = h, E -= v;
80
80
  do
81
- $[n++] = p[E++];
81
+ $[n++] = p[R++];
82
82
  while (--v);
83
- E = n - O, q = $;
83
+ R = n - T, q = $;
84
84
  }
85
85
  }
86
- } else if (E += h - v, v < x) {
87
- x -= v;
86
+ } else if (R += h - v, v < E) {
87
+ E -= v;
88
88
  do
89
- $[n++] = p[E++];
89
+ $[n++] = p[R++];
90
90
  while (--v);
91
- E = n - O, q = $;
91
+ R = n - T, q = $;
92
92
  }
93
- for (; x > 2; )
94
- $[n++] = q[E++], $[n++] = q[E++], $[n++] = q[E++], x -= 3;
95
- x && ($[n++] = q[E++], x > 1 && ($[n++] = q[E++]));
93
+ for (; E > 2; )
94
+ $[n++] = q[R++], $[n++] = q[R++], $[n++] = q[R++], E -= 3;
95
+ E && ($[n++] = q[R++], E > 1 && ($[n++] = q[R++]));
96
96
  } else {
97
- E = n - O;
97
+ R = n - T;
98
98
  do
99
- $[n++] = $[E++], $[n++] = $[E++], $[n++] = $[E++], x -= 3;
100
- while (x > 2);
101
- x && ($[n++] = $[E++], x > 1 && ($[n++] = $[E++]));
99
+ $[n++] = $[R++], $[n++] = $[R++], $[n++] = $[R++], E -= 3;
100
+ while (E > 2);
101
+ E && ($[n++] = $[R++], E > 1 && ($[n++] = $[R++]));
102
102
  }
103
103
  } else if ((v & 64) === 0) {
104
- b = T[(b & 65535) + (d & (1 << v) - 1)];
104
+ b = _[(b & 65535) + (d & (1 << v) - 1)];
105
105
  continue r;
106
106
  } else {
107
107
  t.msg = "invalid distance code", k.mode = BAD$1;
@@ -121,8 +121,8 @@ var inffast = function(t, e) {
121
121
  }
122
122
  break;
123
123
  }
124
- } while (a < l && n < s);
125
- x = y >> 3, a -= x, y -= x << 3, d &= (1 << y) - 1, t.next_in = a, t.next_out = n, t.avail_in = a < l ? 5 + (l - a) : 5 - (a - l), t.avail_out = n < s ? 257 + (s - n) : 257 - (n - s), k.hold = d, k.bits = y;
124
+ } while (a < c && n < s);
125
+ E = y >> 3, a -= E, y -= E << 3, d &= (1 << y) - 1, t.next_in = a, t.next_out = n, t.avail_in = a < c ? 5 + (c - a) : 5 - (a - c), t.avail_out = n < s ? 257 + (s - n) : 257 - (n - s), k.hold = d, k.bits = y;
126
126
  };
127
127
  const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS$1 = 1, DISTS$1 = 2, lbase = new Uint16Array([
128
128
  /* Length codes 257..285 base */
@@ -258,53 +258,53 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
258
258
  29,
259
259
  64,
260
260
  64
261
- ]), inflate_table$1 = (r, t, e, a, l, n, o, s) => {
261
+ ]), inflate_table$1 = (r, t, e, a, c, n, o, s) => {
262
262
  const u = s.bits;
263
- let i = 0, c = 0, h = 0, p = 0, d = 0, y = 0, g = 0, T = 0, _ = 0, m = 0, b, v, x, O, E, q = null, S;
263
+ let i = 0, l = 0, h = 0, p = 0, d = 0, y = 0, g = 0, _ = 0, w = 0, m = 0, b, v, E, T, R, q = null, A;
264
264
  const $ = new Uint16Array(MAXBITS + 1), k = new Uint16Array(MAXBITS + 1);
265
265
  let D = null, M, L, U;
266
266
  for (i = 0; i <= MAXBITS; i++)
267
267
  $[i] = 0;
268
- for (c = 0; c < a; c++)
269
- $[t[e + c]]++;
268
+ for (l = 0; l < a; l++)
269
+ $[t[e + l]]++;
270
270
  for (d = u, p = MAXBITS; p >= 1 && $[p] === 0; p--)
271
271
  ;
272
272
  if (d > p && (d = p), p === 0)
273
- return l[n++] = 1 << 24 | 64 << 16 | 0, l[n++] = 1 << 24 | 64 << 16 | 0, s.bits = 1, 0;
273
+ return c[n++] = 1 << 24 | 64 << 16 | 0, c[n++] = 1 << 24 | 64 << 16 | 0, s.bits = 1, 0;
274
274
  for (h = 1; h < p && $[h] === 0; h++)
275
275
  ;
276
- for (d < h && (d = h), T = 1, i = 1; i <= MAXBITS; i++)
277
- if (T <<= 1, T -= $[i], T < 0)
276
+ for (d < h && (d = h), _ = 1, i = 1; i <= MAXBITS; i++)
277
+ if (_ <<= 1, _ -= $[i], _ < 0)
278
278
  return -1;
279
- if (T > 0 && (r === CODES$1 || p !== 1))
279
+ if (_ > 0 && (r === CODES$1 || p !== 1))
280
280
  return -1;
281
281
  for (k[1] = 0, i = 1; i < MAXBITS; i++)
282
282
  k[i + 1] = k[i] + $[i];
283
- for (c = 0; c < a; c++)
284
- t[e + c] !== 0 && (o[k[t[e + c]]++] = c);
285
- if (r === CODES$1 ? (q = D = o, S = 20) : r === LENS$1 ? (q = lbase, D = lext, S = 257) : (q = dbase, D = dext, S = 0), m = 0, c = 0, i = h, E = n, y = d, g = 0, x = -1, _ = 1 << d, O = _ - 1, r === LENS$1 && _ > ENOUGH_LENS$1 || r === DISTS$1 && _ > ENOUGH_DISTS$1)
283
+ for (l = 0; l < a; l++)
284
+ t[e + l] !== 0 && (o[k[t[e + l]]++] = l);
285
+ if (r === CODES$1 ? (q = D = o, A = 20) : r === LENS$1 ? (q = lbase, D = lext, A = 257) : (q = dbase, D = dext, A = 0), m = 0, l = 0, i = h, R = n, y = d, g = 0, E = -1, w = 1 << d, T = w - 1, r === LENS$1 && w > ENOUGH_LENS$1 || r === DISTS$1 && w > ENOUGH_DISTS$1)
286
286
  return 1;
287
287
  for (; ; ) {
288
- M = i - g, o[c] + 1 < S ? (L = 0, U = o[c]) : o[c] >= S ? (L = D[o[c] - S], U = q[o[c] - S]) : (L = 96, U = 0), b = 1 << i - g, v = 1 << y, h = v;
288
+ M = i - g, o[l] + 1 < A ? (L = 0, U = o[l]) : o[l] >= A ? (L = D[o[l] - A], U = q[o[l] - A]) : (L = 96, U = 0), b = 1 << i - g, v = 1 << y, h = v;
289
289
  do
290
- v -= b, l[E + (m >> g) + v] = M << 24 | L << 16 | U | 0;
290
+ v -= b, c[R + (m >> g) + v] = M << 24 | L << 16 | U | 0;
291
291
  while (v !== 0);
292
292
  for (b = 1 << i - 1; m & b; )
293
293
  b >>= 1;
294
- if (b !== 0 ? (m &= b - 1, m += b) : m = 0, c++, --$[i] === 0) {
294
+ if (b !== 0 ? (m &= b - 1, m += b) : m = 0, l++, --$[i] === 0) {
295
295
  if (i === p)
296
296
  break;
297
- i = t[e + o[c]];
297
+ i = t[e + o[l]];
298
298
  }
299
- if (i > d && (m & O) !== x) {
300
- for (g === 0 && (g = d), E += h, y = i - g, T = 1 << y; y + g < p && (T -= $[y + g], !(T <= 0)); )
301
- y++, T <<= 1;
302
- if (_ += 1 << y, r === LENS$1 && _ > ENOUGH_LENS$1 || r === DISTS$1 && _ > ENOUGH_DISTS$1)
299
+ if (i > d && (m & T) !== E) {
300
+ for (g === 0 && (g = d), R += h, y = i - g, _ = 1 << y; y + g < p && (_ -= $[y + g], !(_ <= 0)); )
301
+ y++, _ <<= 1;
302
+ if (w += 1 << y, r === LENS$1 && w > ENOUGH_LENS$1 || r === DISTS$1 && w > ENOUGH_DISTS$1)
303
303
  return 1;
304
- x = m & O, l[x] = d << 24 | y << 16 | E - n | 0;
304
+ E = m & T, c[E] = d << 24 | y << 16 | R - n | 0;
305
305
  }
306
306
  }
307
- return m !== 0 && (l[E + m] = i - g << 24 | 64 << 16 | 0), s.bits = d, 0;
307
+ return m !== 0 && (c[R + m] = i - g << 24 | 64 << 16 | 0), s.bits = d, 0;
308
308
  };
309
309
  var inftrees = inflate_table$1, constants = {
310
310
  /* Allowed flush values; see deflate() and inflate() below for details */
@@ -394,12 +394,12 @@ const fixedtables = (r) => {
394
394
  }
395
395
  r.lencode = lenfix, r.lenbits = 9, r.distcode = distfix, r.distbits = 5;
396
396
  }, updatewindow = (r, t, e, a) => {
397
- let l;
397
+ let c;
398
398
  const n = r.state;
399
- return n.window === null && (n.wsize = 1 << n.wbits, n.wnext = 0, n.whave = 0, n.window = new Uint8Array(n.wsize)), a >= n.wsize ? (n.window.set(t.subarray(e - n.wsize, e), 0), n.wnext = 0, n.whave = n.wsize) : (l = n.wsize - n.wnext, l > a && (l = a), n.window.set(t.subarray(e - a, e - a + l), n.wnext), a -= l, a ? (n.window.set(t.subarray(e - a, e), 0), n.wnext = a, n.whave = n.wsize) : (n.wnext += l, n.wnext === n.wsize && (n.wnext = 0), n.whave < n.wsize && (n.whave += l))), 0;
399
+ return n.window === null && (n.wsize = 1 << n.wbits, n.wnext = 0, n.whave = 0, n.window = new Uint8Array(n.wsize)), a >= n.wsize ? (n.window.set(t.subarray(e - n.wsize, e), 0), n.wnext = 0, n.whave = n.wsize) : (c = n.wsize - n.wnext, c > a && (c = a), n.window.set(t.subarray(e - a, e - a + c), n.wnext), a -= c, a ? (n.window.set(t.subarray(e - a, e), 0), n.wnext = a, n.whave = n.wsize) : (n.wnext += c, n.wnext === n.wsize && (n.wnext = 0), n.whave < n.wsize && (n.whave += c))), 0;
400
400
  }, inflate$1 = (r, t) => {
401
- let e, a, l, n, o, s, u, i, c, h, p, d, y, g, T = 0, _, m, b, v, x, O, E, q;
402
- const S = new Uint8Array(4);
401
+ let e, a, c, n, o, s, u, i, l, h, p, d, y, g, _ = 0, w, m, b, v, E, T, R, q;
402
+ const A = new Uint8Array(4);
403
403
  let $, k;
404
404
  const D = (
405
405
  /* permutation of code lengths */
@@ -407,7 +407,7 @@ const fixedtables = (r) => {
407
407
  );
408
408
  if (inflateStateCheck(r) || !r.output || !r.input && r.avail_in !== 0)
409
409
  return Z_STREAM_ERROR$1;
410
- e = r.state, e.mode === TYPE && (e.mode = TYPEDO), o = r.next_out, l = r.output, u = r.avail_out, n = r.next_in, a = r.input, s = r.avail_in, i = e.hold, c = e.bits, h = s, p = u, q = Z_OK$1;
410
+ e = r.state, e.mode === TYPE && (e.mode = TYPEDO), o = r.next_out, c = r.output, u = r.avail_out, n = r.next_in, a = r.input, s = r.avail_in, i = e.hold, l = e.bits, h = s, p = u, q = Z_OK$1;
411
411
  e: for (; ; )
412
412
  switch (e.mode) {
413
413
  case HEAD:
@@ -415,13 +415,13 @@ const fixedtables = (r) => {
415
415
  e.mode = TYPEDO;
416
416
  break;
417
417
  }
418
- for (; c < 16; ) {
418
+ for (; l < 16; ) {
419
419
  if (s === 0)
420
420
  break e;
421
- s--, i += a[n++] << c, c += 8;
421
+ s--, i += a[n++] << l, l += 8;
422
422
  }
423
423
  if (e.wrap & 2 && i === 35615) {
424
- e.wbits === 0 && (e.wbits = 15), e.check = 0, S[0] = i & 255, S[1] = i >>> 8 & 255, e.check = crc32(e.check, S, 2, 0), i = 0, c = 0, e.mode = FLAGS;
424
+ e.wbits === 0 && (e.wbits = 15), e.check = 0, A[0] = i & 255, A[1] = i >>> 8 & 255, e.check = crc32(e.check, A, 2, 0), i = 0, l = 0, e.mode = FLAGS;
425
425
  break;
426
426
  }
427
427
  if (e.head && (e.head.done = !1), !(e.wrap & 1) || (((i & 255) << 8) + (i >> 8)) % 31) {
@@ -432,17 +432,17 @@ const fixedtables = (r) => {
432
432
  r.msg = "unknown compression method", e.mode = BAD;
433
433
  break;
434
434
  }
435
- if (i >>>= 4, c -= 4, E = (i & 15) + 8, e.wbits === 0 && (e.wbits = E), E > 15 || E > e.wbits) {
435
+ if (i >>>= 4, l -= 4, R = (i & 15) + 8, e.wbits === 0 && (e.wbits = R), R > 15 || R > e.wbits) {
436
436
  r.msg = "invalid window size", e.mode = BAD;
437
437
  break;
438
438
  }
439
- e.dmax = 1 << e.wbits, e.flags = 0, r.adler = e.check = 1, e.mode = i & 512 ? DICTID : TYPE, i = 0, c = 0;
439
+ e.dmax = 1 << e.wbits, e.flags = 0, r.adler = e.check = 1, e.mode = i & 512 ? DICTID : TYPE, i = 0, l = 0;
440
440
  break;
441
441
  case FLAGS:
442
- for (; c < 16; ) {
442
+ for (; l < 16; ) {
443
443
  if (s === 0)
444
444
  break e;
445
- s--, i += a[n++] << c, c += 8;
445
+ s--, i += a[n++] << l, l += 8;
446
446
  }
447
447
  if (e.flags = i, (e.flags & 255) !== Z_DEFLATED) {
448
448
  r.msg = "unknown compression method", e.mode = BAD;
@@ -452,44 +452,44 @@ const fixedtables = (r) => {
452
452
  r.msg = "unknown header flags set", e.mode = BAD;
453
453
  break;
454
454
  }
455
- e.head && (e.head.text = i >> 8 & 1), e.flags & 512 && e.wrap & 4 && (S[0] = i & 255, S[1] = i >>> 8 & 255, e.check = crc32(e.check, S, 2, 0)), i = 0, c = 0, e.mode = TIME;
455
+ e.head && (e.head.text = i >> 8 & 1), e.flags & 512 && e.wrap & 4 && (A[0] = i & 255, A[1] = i >>> 8 & 255, e.check = crc32(e.check, A, 2, 0)), i = 0, l = 0, e.mode = TIME;
456
456
  /* falls through */
457
457
  case TIME:
458
- for (; c < 32; ) {
458
+ for (; l < 32; ) {
459
459
  if (s === 0)
460
460
  break e;
461
- s--, i += a[n++] << c, c += 8;
461
+ s--, i += a[n++] << l, l += 8;
462
462
  }
463
- e.head && (e.head.time = i), e.flags & 512 && e.wrap & 4 && (S[0] = i & 255, S[1] = i >>> 8 & 255, S[2] = i >>> 16 & 255, S[3] = i >>> 24 & 255, e.check = crc32(e.check, S, 4, 0)), i = 0, c = 0, e.mode = OS;
463
+ e.head && (e.head.time = i), e.flags & 512 && e.wrap & 4 && (A[0] = i & 255, A[1] = i >>> 8 & 255, A[2] = i >>> 16 & 255, A[3] = i >>> 24 & 255, e.check = crc32(e.check, A, 4, 0)), i = 0, l = 0, e.mode = OS;
464
464
  /* falls through */
465
465
  case OS:
466
- for (; c < 16; ) {
466
+ for (; l < 16; ) {
467
467
  if (s === 0)
468
468
  break e;
469
- s--, i += a[n++] << c, c += 8;
469
+ s--, i += a[n++] << l, l += 8;
470
470
  }
471
- e.head && (e.head.xflags = i & 255, e.head.os = i >> 8), e.flags & 512 && e.wrap & 4 && (S[0] = i & 255, S[1] = i >>> 8 & 255, e.check = crc32(e.check, S, 2, 0)), i = 0, c = 0, e.mode = EXLEN;
471
+ e.head && (e.head.xflags = i & 255, e.head.os = i >> 8), e.flags & 512 && e.wrap & 4 && (A[0] = i & 255, A[1] = i >>> 8 & 255, e.check = crc32(e.check, A, 2, 0)), i = 0, l = 0, e.mode = EXLEN;
472
472
  /* falls through */
473
473
  case EXLEN:
474
474
  if (e.flags & 1024) {
475
- for (; c < 16; ) {
475
+ for (; l < 16; ) {
476
476
  if (s === 0)
477
477
  break e;
478
- s--, i += a[n++] << c, c += 8;
478
+ s--, i += a[n++] << l, l += 8;
479
479
  }
480
- e.length = i, e.head && (e.head.extra_len = i), e.flags & 512 && e.wrap & 4 && (S[0] = i & 255, S[1] = i >>> 8 & 255, e.check = crc32(e.check, S, 2, 0)), i = 0, c = 0;
480
+ e.length = i, e.head && (e.head.extra_len = i), e.flags & 512 && e.wrap & 4 && (A[0] = i & 255, A[1] = i >>> 8 & 255, e.check = crc32(e.check, A, 2, 0)), i = 0, l = 0;
481
481
  } else e.head && (e.head.extra = null);
482
482
  e.mode = EXTRA;
483
483
  /* falls through */
484
484
  case EXTRA:
485
- if (e.flags & 1024 && (d = e.length, d > s && (d = s), d && (e.head && (E = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Uint8Array(e.head.extra_len)), e.head.extra.set(
485
+ if (e.flags & 1024 && (d = e.length, d > s && (d = s), d && (e.head && (R = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Uint8Array(e.head.extra_len)), e.head.extra.set(
486
486
  a.subarray(
487
487
  n,
488
488
  // extra field is limited to 65536 bytes
489
489
  // - no need for additional size check
490
490
  n + d
491
491
  ),
492
- E
492
+ R
493
493
  )), e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, e.length -= d), e.length))
494
494
  break e;
495
495
  e.length = 0, e.mode = NAME;
@@ -500,9 +500,9 @@ const fixedtables = (r) => {
500
500
  break e;
501
501
  d = 0;
502
502
  do
503
- E = a[n + d++], e.head && E && e.length < 65536 && (e.head.name += String.fromCharCode(E));
504
- while (E && d < s);
505
- if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, E)
503
+ R = a[n + d++], e.head && R && e.length < 65536 && (e.head.name += String.fromCharCode(R));
504
+ while (R && d < s);
505
+ if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, R)
506
506
  break e;
507
507
  } else e.head && (e.head.name = null);
508
508
  e.length = 0, e.mode = COMMENT;
@@ -513,39 +513,39 @@ const fixedtables = (r) => {
513
513
  break e;
514
514
  d = 0;
515
515
  do
516
- E = a[n + d++], e.head && E && e.length < 65536 && (e.head.comment += String.fromCharCode(E));
517
- while (E && d < s);
518
- if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, E)
516
+ R = a[n + d++], e.head && R && e.length < 65536 && (e.head.comment += String.fromCharCode(R));
517
+ while (R && d < s);
518
+ if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, R)
519
519
  break e;
520
520
  } else e.head && (e.head.comment = null);
521
521
  e.mode = HCRC;
522
522
  /* falls through */
523
523
  case HCRC:
524
524
  if (e.flags & 512) {
525
- for (; c < 16; ) {
525
+ for (; l < 16; ) {
526
526
  if (s === 0)
527
527
  break e;
528
- s--, i += a[n++] << c, c += 8;
528
+ s--, i += a[n++] << l, l += 8;
529
529
  }
530
530
  if (e.wrap & 4 && i !== (e.check & 65535)) {
531
531
  r.msg = "header crc mismatch", e.mode = BAD;
532
532
  break;
533
533
  }
534
- i = 0, c = 0;
534
+ i = 0, l = 0;
535
535
  }
536
536
  e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), r.adler = e.check = 0, e.mode = TYPE;
537
537
  break;
538
538
  case DICTID:
539
- for (; c < 32; ) {
539
+ for (; l < 32; ) {
540
540
  if (s === 0)
541
541
  break e;
542
- s--, i += a[n++] << c, c += 8;
542
+ s--, i += a[n++] << l, l += 8;
543
543
  }
544
- r.adler = e.check = zswap32(i), i = 0, c = 0, e.mode = DICT;
544
+ r.adler = e.check = zswap32(i), i = 0, l = 0, e.mode = DICT;
545
545
  /* falls through */
546
546
  case DICT:
547
547
  if (e.havedict === 0)
548
- return r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = c, Z_NEED_DICT$1;
548
+ return r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = l, Z_NEED_DICT$1;
549
549
  r.adler = e.check = 1, e.mode = TYPE;
550
550
  /* falls through */
551
551
  case TYPE:
@@ -554,21 +554,21 @@ const fixedtables = (r) => {
554
554
  /* falls through */
555
555
  case TYPEDO:
556
556
  if (e.last) {
557
- i >>>= c & 7, c -= c & 7, e.mode = CHECK;
557
+ i >>>= l & 7, l -= l & 7, e.mode = CHECK;
558
558
  break;
559
559
  }
560
- for (; c < 3; ) {
560
+ for (; l < 3; ) {
561
561
  if (s === 0)
562
562
  break e;
563
- s--, i += a[n++] << c, c += 8;
563
+ s--, i += a[n++] << l, l += 8;
564
564
  }
565
- switch (e.last = i & 1, i >>>= 1, c -= 1, i & 3) {
565
+ switch (e.last = i & 1, i >>>= 1, l -= 1, i & 3) {
566
566
  case 0:
567
567
  e.mode = STORED;
568
568
  break;
569
569
  case 1:
570
570
  if (fixedtables(e), e.mode = LEN_, t === Z_TREES) {
571
- i >>>= 2, c -= 2;
571
+ i >>>= 2, l -= 2;
572
572
  break e;
573
573
  }
574
574
  break;
@@ -578,19 +578,19 @@ const fixedtables = (r) => {
578
578
  case 3:
579
579
  r.msg = "invalid block type", e.mode = BAD;
580
580
  }
581
- i >>>= 2, c -= 2;
581
+ i >>>= 2, l -= 2;
582
582
  break;
583
583
  case STORED:
584
- for (i >>>= c & 7, c -= c & 7; c < 32; ) {
584
+ for (i >>>= l & 7, l -= l & 7; l < 32; ) {
585
585
  if (s === 0)
586
586
  break e;
587
- s--, i += a[n++] << c, c += 8;
587
+ s--, i += a[n++] << l, l += 8;
588
588
  }
589
589
  if ((i & 65535) !== (i >>> 16 ^ 65535)) {
590
590
  r.msg = "invalid stored block lengths", e.mode = BAD;
591
591
  break;
592
592
  }
593
- if (e.length = i & 65535, i = 0, c = 0, e.mode = COPY_, t === Z_TREES)
593
+ if (e.length = i & 65535, i = 0, l = 0, e.mode = COPY_, t === Z_TREES)
594
594
  break e;
595
595
  /* falls through */
596
596
  case COPY_:
@@ -600,18 +600,18 @@ const fixedtables = (r) => {
600
600
  if (d = e.length, d) {
601
601
  if (d > s && (d = s), d > u && (d = u), d === 0)
602
602
  break e;
603
- l.set(a.subarray(n, n + d), o), s -= d, n += d, u -= d, o += d, e.length -= d;
603
+ c.set(a.subarray(n, n + d), o), s -= d, n += d, u -= d, o += d, e.length -= d;
604
604
  break;
605
605
  }
606
606
  e.mode = TYPE;
607
607
  break;
608
608
  case TABLE:
609
- for (; c < 14; ) {
609
+ for (; l < 14; ) {
610
610
  if (s === 0)
611
611
  break e;
612
- s--, i += a[n++] << c, c += 8;
612
+ s--, i += a[n++] << l, l += 8;
613
613
  }
614
- if (e.nlen = (i & 31) + 257, i >>>= 5, c -= 5, e.ndist = (i & 31) + 1, i >>>= 5, c -= 5, e.ncode = (i & 15) + 4, i >>>= 4, c -= 4, e.nlen > 286 || e.ndist > 30) {
614
+ if (e.nlen = (i & 31) + 257, i >>>= 5, l -= 5, e.ndist = (i & 31) + 1, i >>>= 5, l -= 5, e.ncode = (i & 15) + 4, i >>>= 4, l -= 4, e.nlen > 286 || e.ndist > 30) {
615
615
  r.msg = "too many length or distance symbols", e.mode = BAD;
616
616
  break;
617
617
  }
@@ -619,12 +619,12 @@ const fixedtables = (r) => {
619
619
  /* falls through */
620
620
  case LENLENS:
621
621
  for (; e.have < e.ncode; ) {
622
- for (; c < 3; ) {
622
+ for (; l < 3; ) {
623
623
  if (s === 0)
624
624
  break e;
625
- s--, i += a[n++] << c, c += 8;
625
+ s--, i += a[n++] << l, l += 8;
626
626
  }
627
- e.lens[D[e.have++]] = i & 7, i >>>= 3, c -= 3;
627
+ e.lens[D[e.have++]] = i & 7, i >>>= 3, l -= 3;
628
628
  }
629
629
  for (; e.have < 19; )
630
630
  e.lens[D[e.have++]] = 0;
@@ -638,46 +638,46 @@ const fixedtables = (r) => {
638
638
  /* falls through */
639
639
  case CODELENS:
640
640
  for (; e.have < e.nlen + e.ndist; ) {
641
- for (; T = e.lencode[i & (1 << e.lenbits) - 1], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(_ <= c); ) {
641
+ for (; _ = e.lencode[i & (1 << e.lenbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
642
642
  if (s === 0)
643
643
  break e;
644
- s--, i += a[n++] << c, c += 8;
644
+ s--, i += a[n++] << l, l += 8;
645
645
  }
646
646
  if (b < 16)
647
- i >>>= _, c -= _, e.lens[e.have++] = b;
647
+ i >>>= w, l -= w, e.lens[e.have++] = b;
648
648
  else {
649
649
  if (b === 16) {
650
- for (k = _ + 2; c < k; ) {
650
+ for (k = w + 2; l < k; ) {
651
651
  if (s === 0)
652
652
  break e;
653
- s--, i += a[n++] << c, c += 8;
653
+ s--, i += a[n++] << l, l += 8;
654
654
  }
655
- if (i >>>= _, c -= _, e.have === 0) {
655
+ if (i >>>= w, l -= w, e.have === 0) {
656
656
  r.msg = "invalid bit length repeat", e.mode = BAD;
657
657
  break;
658
658
  }
659
- E = e.lens[e.have - 1], d = 3 + (i & 3), i >>>= 2, c -= 2;
659
+ R = e.lens[e.have - 1], d = 3 + (i & 3), i >>>= 2, l -= 2;
660
660
  } else if (b === 17) {
661
- for (k = _ + 3; c < k; ) {
661
+ for (k = w + 3; l < k; ) {
662
662
  if (s === 0)
663
663
  break e;
664
- s--, i += a[n++] << c, c += 8;
664
+ s--, i += a[n++] << l, l += 8;
665
665
  }
666
- i >>>= _, c -= _, E = 0, d = 3 + (i & 7), i >>>= 3, c -= 3;
666
+ i >>>= w, l -= w, R = 0, d = 3 + (i & 7), i >>>= 3, l -= 3;
667
667
  } else {
668
- for (k = _ + 7; c < k; ) {
668
+ for (k = w + 7; l < k; ) {
669
669
  if (s === 0)
670
670
  break e;
671
- s--, i += a[n++] << c, c += 8;
671
+ s--, i += a[n++] << l, l += 8;
672
672
  }
673
- i >>>= _, c -= _, E = 0, d = 11 + (i & 127), i >>>= 7, c -= 7;
673
+ i >>>= w, l -= w, R = 0, d = 11 + (i & 127), i >>>= 7, l -= 7;
674
674
  }
675
675
  if (e.have + d > e.nlen + e.ndist) {
676
676
  r.msg = "invalid bit length repeat", e.mode = BAD;
677
677
  break;
678
678
  }
679
679
  for (; d--; )
680
- e.lens[e.have++] = E;
680
+ e.lens[e.have++] = R;
681
681
  }
682
682
  }
683
683
  if (e.mode === BAD)
@@ -715,23 +715,23 @@ const fixedtables = (r) => {
715
715
  /* falls through */
716
716
  case LEN:
717
717
  if (s >= 6 && u >= 258) {
718
- r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = c, inflate_fast(r, p), o = r.next_out, l = r.output, u = r.avail_out, n = r.next_in, a = r.input, s = r.avail_in, i = e.hold, c = e.bits, e.mode === TYPE && (e.back = -1);
718
+ r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = l, inflate_fast(r, p), o = r.next_out, c = r.output, u = r.avail_out, n = r.next_in, a = r.input, s = r.avail_in, i = e.hold, l = e.bits, e.mode === TYPE && (e.back = -1);
719
719
  break;
720
720
  }
721
- for (e.back = 0; T = e.lencode[i & (1 << e.lenbits) - 1], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(_ <= c); ) {
721
+ for (e.back = 0; _ = e.lencode[i & (1 << e.lenbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
722
722
  if (s === 0)
723
723
  break e;
724
- s--, i += a[n++] << c, c += 8;
724
+ s--, i += a[n++] << l, l += 8;
725
725
  }
726
726
  if (m && (m & 240) === 0) {
727
- for (v = _, x = m, O = b; T = e.lencode[O + ((i & (1 << v + x) - 1) >> v)], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(v + _ <= c); ) {
727
+ for (v = w, E = m, T = b; _ = e.lencode[T + ((i & (1 << v + E) - 1) >> v)], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(v + w <= l); ) {
728
728
  if (s === 0)
729
729
  break e;
730
- s--, i += a[n++] << c, c += 8;
730
+ s--, i += a[n++] << l, l += 8;
731
731
  }
732
- i >>>= v, c -= v, e.back += v;
732
+ i >>>= v, l -= v, e.back += v;
733
733
  }
734
- if (i >>>= _, c -= _, e.back += _, e.length = b, m === 0) {
734
+ if (i >>>= w, l -= w, e.back += w, e.length = b, m === 0) {
735
735
  e.mode = LIT;
736
736
  break;
737
737
  }
@@ -747,30 +747,30 @@ const fixedtables = (r) => {
747
747
  /* falls through */
748
748
  case LENEXT:
749
749
  if (e.extra) {
750
- for (k = e.extra; c < k; ) {
750
+ for (k = e.extra; l < k; ) {
751
751
  if (s === 0)
752
752
  break e;
753
- s--, i += a[n++] << c, c += 8;
753
+ s--, i += a[n++] << l, l += 8;
754
754
  }
755
- e.length += i & (1 << e.extra) - 1, i >>>= e.extra, c -= e.extra, e.back += e.extra;
755
+ e.length += i & (1 << e.extra) - 1, i >>>= e.extra, l -= e.extra, e.back += e.extra;
756
756
  }
757
757
  e.was = e.length, e.mode = DIST;
758
758
  /* falls through */
759
759
  case DIST:
760
- for (; T = e.distcode[i & (1 << e.distbits) - 1], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(_ <= c); ) {
760
+ for (; _ = e.distcode[i & (1 << e.distbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
761
761
  if (s === 0)
762
762
  break e;
763
- s--, i += a[n++] << c, c += 8;
763
+ s--, i += a[n++] << l, l += 8;
764
764
  }
765
765
  if ((m & 240) === 0) {
766
- for (v = _, x = m, O = b; T = e.distcode[O + ((i & (1 << v + x) - 1) >> v)], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(v + _ <= c); ) {
766
+ for (v = w, E = m, T = b; _ = e.distcode[T + ((i & (1 << v + E) - 1) >> v)], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(v + w <= l); ) {
767
767
  if (s === 0)
768
768
  break e;
769
- s--, i += a[n++] << c, c += 8;
769
+ s--, i += a[n++] << l, l += 8;
770
770
  }
771
- i >>>= v, c -= v, e.back += v;
771
+ i >>>= v, l -= v, e.back += v;
772
772
  }
773
- if (i >>>= _, c -= _, e.back += _, m & 64) {
773
+ if (i >>>= w, l -= w, e.back += w, m & 64) {
774
774
  r.msg = "invalid distance code", e.mode = BAD;
775
775
  break;
776
776
  }
@@ -778,12 +778,12 @@ const fixedtables = (r) => {
778
778
  /* falls through */
779
779
  case DISTEXT:
780
780
  if (e.extra) {
781
- for (k = e.extra; c < k; ) {
781
+ for (k = e.extra; l < k; ) {
782
782
  if (s === 0)
783
783
  break e;
784
- s--, i += a[n++] << c, c += 8;
784
+ s--, i += a[n++] << l, l += 8;
785
785
  }
786
- e.offset += i & (1 << e.extra) - 1, i >>>= e.extra, c -= e.extra, e.back += e.extra;
786
+ e.offset += i & (1 << e.extra) - 1, i >>>= e.extra, l -= e.extra, e.back += e.extra;
787
787
  }
788
788
  if (e.offset > e.dmax) {
789
789
  r.msg = "invalid distance too far back", e.mode = BAD;
@@ -801,46 +801,46 @@ const fixedtables = (r) => {
801
801
  }
802
802
  d > e.wnext ? (d -= e.wnext, y = e.wsize - d) : y = e.wnext - d, d > e.length && (d = e.length), g = e.window;
803
803
  } else
804
- g = l, y = o - e.offset, d = e.length;
804
+ g = c, y = o - e.offset, d = e.length;
805
805
  d > u && (d = u), u -= d, e.length -= d;
806
806
  do
807
- l[o++] = g[y++];
807
+ c[o++] = g[y++];
808
808
  while (--d);
809
809
  e.length === 0 && (e.mode = LEN);
810
810
  break;
811
811
  case LIT:
812
812
  if (u === 0)
813
813
  break e;
814
- l[o++] = e.length, u--, e.mode = LEN;
814
+ c[o++] = e.length, u--, e.mode = LEN;
815
815
  break;
816
816
  case CHECK:
817
817
  if (e.wrap) {
818
- for (; c < 32; ) {
818
+ for (; l < 32; ) {
819
819
  if (s === 0)
820
820
  break e;
821
- s--, i |= a[n++] << c, c += 8;
821
+ s--, i |= a[n++] << l, l += 8;
822
822
  }
823
823
  if (p -= u, r.total_out += p, e.total += p, e.wrap & 4 && p && (r.adler = e.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
824
- e.flags ? crc32(e.check, l, p, o - p) : adler32(e.check, l, p, o - p)), p = u, e.wrap & 4 && (e.flags ? i : zswap32(i)) !== e.check) {
824
+ e.flags ? crc32(e.check, c, p, o - p) : adler32(e.check, c, p, o - p)), p = u, e.wrap & 4 && (e.flags ? i : zswap32(i)) !== e.check) {
825
825
  r.msg = "incorrect data check", e.mode = BAD;
826
826
  break;
827
827
  }
828
- i = 0, c = 0;
828
+ i = 0, l = 0;
829
829
  }
830
830
  e.mode = LENGTH;
831
831
  /* falls through */
832
832
  case LENGTH:
833
833
  if (e.wrap && e.flags) {
834
- for (; c < 32; ) {
834
+ for (; l < 32; ) {
835
835
  if (s === 0)
836
836
  break e;
837
- s--, i += a[n++] << c, c += 8;
837
+ s--, i += a[n++] << l, l += 8;
838
838
  }
839
839
  if (e.wrap & 4 && i !== (e.total & 4294967295)) {
840
840
  r.msg = "incorrect length check", e.mode = BAD;
841
841
  break;
842
842
  }
843
- i = 0, c = 0;
843
+ i = 0, l = 0;
844
844
  }
845
845
  e.mode = DONE;
846
846
  /* falls through */
@@ -857,8 +857,8 @@ const fixedtables = (r) => {
857
857
  default:
858
858
  return Z_STREAM_ERROR$1;
859
859
  }
860
- return r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = c, (e.wsize || p !== r.avail_out && e.mode < BAD && (e.mode < CHECK || t !== Z_FINISH$1)) && updatewindow(r, r.output, r.next_out, p - r.avail_out), h -= r.avail_in, p -= r.avail_out, r.total_in += h, r.total_out += p, e.total += p, e.wrap & 4 && p && (r.adler = e.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
861
- e.flags ? crc32(e.check, l, p, r.next_out - p) : adler32(e.check, l, p, r.next_out - p)), r.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === TYPE ? 128 : 0) + (e.mode === LEN_ || e.mode === COPY_ ? 256 : 0), (h === 0 && p === 0 || t === Z_FINISH$1) && q === Z_OK$1 && (q = Z_BUF_ERROR), q;
860
+ return r.next_out = o, r.avail_out = u, r.next_in = n, r.avail_in = s, e.hold = i, e.bits = l, (e.wsize || p !== r.avail_out && e.mode < BAD && (e.mode < CHECK || t !== Z_FINISH$1)) && updatewindow(r, r.output, r.next_out, p - r.avail_out), h -= r.avail_in, p -= r.avail_out, r.total_in += h, r.total_out += p, e.total += p, e.wrap & 4 && p && (r.adler = e.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
861
+ e.flags ? crc32(e.check, c, p, r.next_out - p) : adler32(e.check, c, p, r.next_out - p)), r.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === TYPE ? 128 : 0) + (e.mode === LEN_ || e.mode === COPY_ ? 256 : 0), (h === 0 && p === 0 || t === Z_FINISH$1) && q === Z_OK$1 && (q = Z_BUF_ERROR), q;
862
862
  }, inflateEnd = (r) => {
863
863
  if (inflateStateCheck(r))
864
864
  return Z_STREAM_ERROR$1;
@@ -871,8 +871,8 @@ const fixedtables = (r) => {
871
871
  return (e.wrap & 2) === 0 ? Z_STREAM_ERROR$1 : (e.head = t, t.done = !1, Z_OK$1);
872
872
  }, inflateSetDictionary = (r, t) => {
873
873
  const e = t.length;
874
- let a, l, n;
875
- return inflateStateCheck(r) || (a = r.state, a.wrap !== 0 && a.mode !== DICT) ? Z_STREAM_ERROR$1 : a.mode === DICT && (l = 1, l = adler32(l, t, e, 0), l !== a.check) ? Z_DATA_ERROR$1 : (n = updatewindow(r, t, e, e), n ? (a.mode = MEM, Z_MEM_ERROR$1) : (a.havedict = 1, Z_OK$1));
874
+ let a, c, n;
875
+ return inflateStateCheck(r) || (a = r.state, a.wrap !== 0 && a.mode !== DICT) ? Z_STREAM_ERROR$1 : a.mode === DICT && (c = 1, c = adler32(c, t, e, 0), c !== a.check) ? Z_DATA_ERROR$1 : (n = updatewindow(r, t, e, e), n ? (a.mode = MEM, Z_MEM_ERROR$1) : (a.havedict = 1, Z_OK$1));
876
876
  };
877
877
  inflate$2.inflateReset = inflateReset;
878
878
  inflate$2.inflateReset2 = inflateReset2;
@@ -901,12 +901,12 @@ common$1.assign = function(r) {
901
901
  };
902
902
  common$1.flattenChunks = (r) => {
903
903
  let t = 0;
904
- for (let a = 0, l = r.length; a < l; a++)
904
+ for (let a = 0, c = r.length; a < c; a++)
905
905
  t += r[a].length;
906
906
  const e = new Uint8Array(t);
907
- for (let a = 0, l = 0, n = r.length; a < n; a++) {
907
+ for (let a = 0, c = 0, n = r.length; a < n; a++) {
908
908
  let o = r[a];
909
- e.set(o, l), l += o.length;
909
+ e.set(o, c), c += o.length;
910
910
  }
911
911
  return e;
912
912
  };
@@ -924,11 +924,11 @@ _utf8len[254] = _utf8len[254] = 1;
924
924
  strings$1.string2buf = (r) => {
925
925
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
926
926
  return new TextEncoder().encode(r);
927
- let t, e, a, l, n, o = r.length, s = 0;
928
- for (l = 0; l < o; l++)
929
- e = r.charCodeAt(l), (e & 64512) === 55296 && l + 1 < o && (a = r.charCodeAt(l + 1), (a & 64512) === 56320 && (e = 65536 + (e - 55296 << 10) + (a - 56320), l++)), s += e < 128 ? 1 : e < 2048 ? 2 : e < 65536 ? 3 : 4;
930
- for (t = new Uint8Array(s), n = 0, l = 0; n < s; l++)
931
- e = r.charCodeAt(l), (e & 64512) === 55296 && l + 1 < o && (a = r.charCodeAt(l + 1), (a & 64512) === 56320 && (e = 65536 + (e - 55296 << 10) + (a - 56320), l++)), e < 128 ? t[n++] = e : e < 2048 ? (t[n++] = 192 | e >>> 6, t[n++] = 128 | e & 63) : e < 65536 ? (t[n++] = 224 | e >>> 12, t[n++] = 128 | e >>> 6 & 63, t[n++] = 128 | e & 63) : (t[n++] = 240 | e >>> 18, t[n++] = 128 | e >>> 12 & 63, t[n++] = 128 | e >>> 6 & 63, t[n++] = 128 | e & 63);
927
+ let t, e, a, c, n, o = r.length, s = 0;
928
+ for (c = 0; c < o; c++)
929
+ e = r.charCodeAt(c), (e & 64512) === 55296 && c + 1 < o && (a = r.charCodeAt(c + 1), (a & 64512) === 56320 && (e = 65536 + (e - 55296 << 10) + (a - 56320), c++)), s += e < 128 ? 1 : e < 2048 ? 2 : e < 65536 ? 3 : 4;
930
+ for (t = new Uint8Array(s), n = 0, c = 0; n < s; c++)
931
+ e = r.charCodeAt(c), (e & 64512) === 55296 && c + 1 < o && (a = r.charCodeAt(c + 1), (a & 64512) === 56320 && (e = 65536 + (e - 55296 << 10) + (a - 56320), c++)), e < 128 ? t[n++] = e : e < 2048 ? (t[n++] = 192 | e >>> 6, t[n++] = 128 | e & 63) : e < 65536 ? (t[n++] = 224 | e >>> 12, t[n++] = 128 | e >>> 6 & 63, t[n++] = 128 | e & 63) : (t[n++] = 240 | e >>> 18, t[n++] = 128 | e >>> 12 & 63, t[n++] = 128 | e >>> 6 & 63, t[n++] = 128 | e & 63);
932
932
  return t;
933
933
  };
934
934
  const buf2binstring = (r, t) => {
@@ -943,28 +943,28 @@ strings$1.buf2string = (r, t) => {
943
943
  const e = t || r.length;
944
944
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
945
945
  return new TextDecoder().decode(r.subarray(0, t));
946
- let a, l;
946
+ let a, c;
947
947
  const n = new Array(e * 2);
948
- for (l = 0, a = 0; a < e; ) {
948
+ for (c = 0, a = 0; a < e; ) {
949
949
  let o = r[a++];
950
950
  if (o < 128) {
951
- n[l++] = o;
951
+ n[c++] = o;
952
952
  continue;
953
953
  }
954
954
  let s = _utf8len[o];
955
955
  if (s > 4) {
956
- n[l++] = 65533, a += s - 1;
956
+ n[c++] = 65533, a += s - 1;
957
957
  continue;
958
958
  }
959
959
  for (o &= s === 2 ? 31 : s === 3 ? 15 : 7; s > 1 && a < e; )
960
960
  o = o << 6 | r[a++] & 63, s--;
961
961
  if (s > 1) {
962
- n[l++] = 65533;
962
+ n[c++] = 65533;
963
963
  continue;
964
964
  }
965
- o < 65536 ? n[l++] = o : (o -= 65536, n[l++] = 55296 | o >> 10 & 1023, n[l++] = 56320 | o & 1023);
965
+ o < 65536 ? n[c++] = o : (o -= 65536, n[c++] = 55296 | o >> 10 & 1023, n[c++] = 56320 | o & 1023);
966
966
  }
967
- return buf2binstring(n, l);
967
+ return buf2binstring(n, c);
968
968
  };
969
969
  strings$1.utf8border = (r, t) => {
970
970
  t = t || r.length, t > r.length && (t = r.length);
@@ -1028,11 +1028,11 @@ function Inflate(r) {
1028
1028
  throw new Error(msg[e]);
1029
1029
  }
1030
1030
  Inflate.prototype.push = function(r, t) {
1031
- const e = this.strm, a = this.options.chunkSize, l = this.options.dictionary;
1031
+ const e = this.strm, a = this.options.chunkSize, c = this.options.dictionary;
1032
1032
  let n, o, s;
1033
1033
  if (this.ended) return !1;
1034
1034
  for (t === ~~t ? o = t : o = t === !0 ? Z_FINISH : Z_NO_FLUSH, toString.call(r) === "[object ArrayBuffer]" ? e.input = new Uint8Array(r) : e.input = r, e.next_in = 0, e.avail_in = e.input.length; ; ) {
1035
- for (e.avail_out === 0 && (e.output = new Uint8Array(a), e.next_out = 0, e.avail_out = a), n = zlib_inflate.inflate(e, o), n === Z_NEED_DICT && l && (n = zlib_inflate.inflateSetDictionary(e, l), n === Z_OK ? n = zlib_inflate.inflate(e, o) : n === Z_DATA_ERROR && (n = Z_NEED_DICT)); e.avail_in > 0 && n === Z_STREAM_END && e.state.wrap > 0 && r[e.next_in] !== 0; )
1035
+ for (e.avail_out === 0 && (e.output = new Uint8Array(a), e.next_out = 0, e.avail_out = a), n = zlib_inflate.inflate(e, o), n === Z_NEED_DICT && c && (n = zlib_inflate.inflateSetDictionary(e, c), n === Z_OK ? n = zlib_inflate.inflate(e, o) : n === Z_DATA_ERROR && (n = Z_NEED_DICT)); e.avail_in > 0 && n === Z_STREAM_END && e.state.wrap > 0 && r[e.next_in] !== 0; )
1036
1036
  zlib_inflate.inflateReset(e), n = zlib_inflate.inflate(e, o);
1037
1037
  switch (n) {
1038
1038
  case Z_STREAM_ERROR:
@@ -1043,8 +1043,8 @@ Inflate.prototype.push = function(r, t) {
1043
1043
  }
1044
1044
  if (s = e.avail_out, e.next_out && (e.avail_out === 0 || n === Z_STREAM_END))
1045
1045
  if (this.options.to === "string") {
1046
- let u = strings.utf8border(e.output, e.next_out), i = e.next_out - u, c = strings.buf2string(e.output, u);
1047
- e.next_out = i, e.avail_out = a - i, i && e.output.set(e.output.subarray(u, u + i), 0), this.onData(c);
1046
+ let u = strings.utf8border(e.output, e.next_out), i = e.next_out - u, l = strings.buf2string(e.output, u);
1047
+ e.next_out = i, e.avail_out = a - i, i && e.output.set(e.output.subarray(u, u + i), 0), this.onData(l);
1048
1048
  } else
1049
1049
  this.onData(
1050
1050
  e.output.length === e.next_out ? e.output : e.output.subarray(0, e.next_out)
@@ -1069,8 +1069,8 @@ function inflate(r, t) {
1069
1069
  return e.result;
1070
1070
  }
1071
1071
  var inflate_2 = inflate;
1072
- function f(r, t, e, a, l, n) {
1073
- let o = r.tileXYToRectangle(e, a, l);
1072
+ function f(r, t, e, a, c, n) {
1073
+ let o = r.tileXYToRectangle(e, a, c);
1074
1074
  return defined(Rectangle.intersection(o, t, n));
1075
1075
  }
1076
1076
  class GeoTerrainProvider {
@@ -1118,7 +1118,7 @@ class GeoTerrainProvider {
1118
1118
  this._tilingScheme.getNumberOfXTilesAtLevel(0)
1119
1119
  ), this._ready = !0, this._topLevel = defaultValue(t.topLevel, 5), this._bottomLevel = defaultValue(t.bottomLevel, 25);
1120
1120
  }
1121
- requestTileGeometry(t, e, a, l) {
1121
+ requestTileGeometry(t, e, a, c) {
1122
1122
  if (!this.ready)
1123
1123
  throw new DeveloperError("requestTileGeometry must not be called before ready returns true.");
1124
1124
  if (a >= this._bottomLevel) return Promise.reject(`${a}该级别不发送请求!`);
@@ -1136,7 +1136,7 @@ class GeoTerrainProvider {
1136
1136
  Array.isArray(this._subdomains) && this._subdomains.length && (n = this._subdomains[(t + e) % this._subdomains.length], o = o.replace("{s}", n)), o = o.replace("{token}", this._token).replace("{x}", t).replace("{y}", e).replace("{z}", a + 1);
1137
1137
  const s = Resource.fetchArrayBuffer({
1138
1138
  url: o,
1139
- request: l
1139
+ request: c
1140
1140
  });
1141
1141
  if (s)
1142
1142
  return s.then((u) => u.byteLength < 1e3 ? Promise.reject("无效数据") : inflate_2(u)).then((u) => {
@@ -1163,12 +1163,12 @@ class GeoTerrainProvider {
1163
1163
  this._dataType === "int" ? e = 2 : this._dataType === "float" && (e = 4);
1164
1164
  let a = t;
1165
1165
  if (a.length !== 22500 * e) return null;
1166
- let l, n, o, s, u = new ArrayBuffer(e), i = new DataView(u), c = this._heightmapWidth, h = this._heightmapHeight, p = new Uint8Array(c * h * 4);
1166
+ let c, n, o, s, u = new ArrayBuffer(e), i = new DataView(u), l = this._heightmapWidth, h = this._heightmapHeight, p = new Uint8Array(l * h * 4);
1167
1167
  for (let d = 0; d < h; d++)
1168
- for (let y = 0; y < c; y++) {
1169
- o = parseInt(149 * d / (h - 1)), s = parseInt(149 * y / (c - 1)), n = e * (150 * o + s), e === 4 ? (i.setInt8(0, a[n]), i.setInt8(1, a[n + 1]), i.setInt8(2, a[n + 2]), i.setInt8(3, a[n + 3]), l = i.getFloat32(0, !0)) : l = a[n] + 256 * a[n + 1], (1e4 < l || l < -2e3) && (l = 0);
1170
- let g = (l + 1e3) / 1e-3, T = 4 * (d * c + y);
1171
- p[T] = g / 65536, p[1 + T] = (g - 256 * p[T] * 256) / 256, p[2 + T] = g - 256 * p[T] * 256 - 256 * p[1 + T], p[3 + T] = 255;
1168
+ for (let y = 0; y < l; y++) {
1169
+ o = parseInt(149 * d / (h - 1)), s = parseInt(149 * y / (l - 1)), n = e * (150 * o + s), e === 4 ? (i.setInt8(0, a[n]), i.setInt8(1, a[n + 1]), i.setInt8(2, a[n + 2]), i.setInt8(3, a[n + 3]), c = i.getFloat32(0, !0)) : c = a[n] + 256 * a[n + 1], (1e4 < c || c < -2e3) && (c = 0);
1170
+ let g = (c + 1e3) / 1e-3, _ = 4 * (d * l + y);
1171
+ p[_] = g / 65536, p[1 + _] = (g - 256 * p[_] * 256) / 256, p[2 + _] = g - 256 * p[_] * 256 - 256 * p[1 + _], p[3 + _] = 255;
1172
1172
  }
1173
1173
  return p;
1174
1174
  }
@@ -1183,12 +1183,12 @@ class GeoTerrainProvider {
1183
1183
  return t;
1184
1184
  }
1185
1185
  getChildTileMask(t, e, a) {
1186
- let l = new Rectangle(), n = this._tilingScheme, o = this._rectangles, s = n.tileXYToRectangle(t, e, a), u = 0;
1186
+ let c = new Rectangle(), n = this._tilingScheme, o = this._rectangles, s = n.tileXYToRectangle(t, e, a), u = 0;
1187
1187
  for (let i = 0; i < o.length && u !== 15; ++i) {
1188
- let c = o[i];
1189
- if (!(c.maxLevel <= a)) {
1190
- let h = c.rectangle, p = Rectangle.intersection(h, s, l);
1191
- defined(p) && (f(n, h, 2 * t, 2 * e, a + 1, l) && (u |= 4), f(n, h, 2 * t + 1, 2 * e, a + 1, l) && (u |= 8), f(n, h, 2 * t, 2 * e + 1, a + 1, l) && (u |= 1), f(n, h, 2 * t + 1, 2 * e + 1, a + 1, l) && (u |= 2));
1188
+ let l = o[i];
1189
+ if (!(l.maxLevel <= a)) {
1190
+ let h = l.rectangle, p = Rectangle.intersection(h, s, c);
1191
+ defined(p) && (f(n, h, 2 * t, 2 * e, a + 1, c) && (u |= 4), f(n, h, 2 * t + 1, 2 * e, a + 1, c) && (u |= 8), f(n, h, 2 * t, 2 * e + 1, a + 1, c) && (u |= 1), f(n, h, 2 * t + 1, 2 * e + 1, a + 1, c) && (u |= 2));
1192
1192
  }
1193
1193
  }
1194
1194
  return u;
@@ -1199,9 +1199,9 @@ function requireAspromise() {
1199
1199
  if (hasRequiredAspromise) return aspromise;
1200
1200
  hasRequiredAspromise = 1, aspromise = r;
1201
1201
  function r(t, e) {
1202
- for (var a = new Array(arguments.length - 1), l = 0, n = 2, o = !0; n < arguments.length; ) a[l++] = arguments[n++];
1202
+ for (var a = new Array(arguments.length - 1), c = 0, n = 2, o = !0; n < arguments.length; ) a[c++] = arguments[n++];
1203
1203
  return new Promise(function(u, i) {
1204
- a[l] = function(h) {
1204
+ a[c] = function(h) {
1205
1205
  if (o)
1206
1206
  if (o = !1, h) i(h);
1207
1207
  else {
@@ -1211,8 +1211,8 @@ function requireAspromise() {
1211
1211
  };
1212
1212
  try {
1213
1213
  t.apply(e || null, a);
1214
- } catch (c) {
1215
- o && (o = !1, i(c));
1214
+ } catch (l) {
1215
+ o && (o = !1, i(l));
1216
1216
  }
1217
1217
  });
1218
1218
  }
@@ -1228,10 +1228,10 @@ function requireBase64() {
1228
1228
  for (var i = 0; --u % 4 > 1 && s.charAt(u) === "="; ) ++i;
1229
1229
  return Math.ceil(s.length * 3) / 4 - i;
1230
1230
  };
1231
- for (var e = new Array(64), a = new Array(123), l = 0; l < 64; )
1232
- a[e[l] = l < 26 ? l + 65 : l < 52 ? l + 71 : l < 62 ? l - 4 : l - 59 | 43] = l++;
1231
+ for (var e = new Array(64), a = new Array(123), c = 0; c < 64; )
1232
+ a[e[c] = c < 26 ? c + 65 : c < 52 ? c + 71 : c < 62 ? c - 4 : c - 59 | 43] = c++;
1233
1233
  t.encode = function(s, u, i) {
1234
- for (var c = null, h = [], p = 0, d = 0, y; u < i; ) {
1234
+ for (var l = null, h = [], p = 0, d = 0, y; u < i; ) {
1235
1235
  var g = s[u++];
1236
1236
  switch (d) {
1237
1237
  case 0:
@@ -1244,13 +1244,13 @@ function requireBase64() {
1244
1244
  h[p++] = e[y | g >> 6], h[p++] = e[g & 63], d = 0;
1245
1245
  break;
1246
1246
  }
1247
- p > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, h)), p = 0);
1247
+ p > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, h)), p = 0);
1248
1248
  }
1249
- return d && (h[p++] = e[y], h[p++] = 61, d === 1 && (h[p++] = 61)), c ? (p && c.push(String.fromCharCode.apply(String, h.slice(0, p))), c.join("")) : String.fromCharCode.apply(String, h.slice(0, p));
1249
+ return d && (h[p++] = e[y], h[p++] = 61, d === 1 && (h[p++] = 61)), l ? (p && l.push(String.fromCharCode.apply(String, h.slice(0, p))), l.join("")) : String.fromCharCode.apply(String, h.slice(0, p));
1250
1250
  };
1251
1251
  var n = "invalid encoding";
1252
1252
  t.decode = function(s, u, i) {
1253
- for (var c = i, h = 0, p, d = 0; d < s.length; ) {
1253
+ for (var l = i, h = 0, p, d = 0; d < s.length; ) {
1254
1254
  var y = s.charCodeAt(d++);
1255
1255
  if (y === 61 && h > 1) break;
1256
1256
  if ((y = a[y]) === void 0) throw Error(n);
@@ -1270,7 +1270,7 @@ function requireBase64() {
1270
1270
  }
1271
1271
  }
1272
1272
  if (h === 1) throw Error(n);
1273
- return i - c;
1273
+ return i - l;
1274
1274
  }, t.test = function(s) {
1275
1275
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
1276
1276
  };
@@ -1283,23 +1283,23 @@ function requireEventemitter() {
1283
1283
  function r() {
1284
1284
  this._listeners = {};
1285
1285
  }
1286
- return r.prototype.on = function(e, a, l) {
1286
+ return r.prototype.on = function(e, a, c) {
1287
1287
  return (this._listeners[e] || (this._listeners[e] = [])).push({
1288
1288
  fn: a,
1289
- ctx: l || this
1289
+ ctx: c || this
1290
1290
  }), this;
1291
1291
  }, r.prototype.off = function(e, a) {
1292
1292
  if (e === void 0) this._listeners = {};
1293
1293
  else if (a === void 0) this._listeners[e] = [];
1294
1294
  else
1295
- for (var l = this._listeners[e], n = 0; n < l.length; )
1296
- l[n].fn === a ? l.splice(n, 1) : ++n;
1295
+ for (var c = this._listeners[e], n = 0; n < c.length; )
1296
+ c[n].fn === a ? c.splice(n, 1) : ++n;
1297
1297
  return this;
1298
1298
  }, r.prototype.emit = function(e) {
1299
1299
  var a = this._listeners[e];
1300
1300
  if (a) {
1301
- for (var l = [], n = 1; n < arguments.length; ) l.push(arguments[n++]);
1302
- for (n = 0; n < a.length; ) a[n].fn.apply(a[n++].ctx, l);
1301
+ for (var c = [], n = 1; n < arguments.length; ) c.push(arguments[n++]);
1302
+ for (n = 0; n < a.length; ) a[n].fn.apply(a[n++].ctx, c);
1303
1303
  }
1304
1304
  return this;
1305
1305
  }, eventemitter;
@@ -1314,10 +1314,10 @@ function requireFloat() {
1314
1314
  function i(d, y, g) {
1315
1315
  o[0] = d, y[g] = s[0], y[g + 1] = s[1], y[g + 2] = s[2], y[g + 3] = s[3];
1316
1316
  }
1317
- function c(d, y, g) {
1317
+ function l(d, y, g) {
1318
1318
  o[0] = d, y[g] = s[3], y[g + 1] = s[2], y[g + 2] = s[1], y[g + 3] = s[0];
1319
1319
  }
1320
- n.writeFloatLE = u ? i : c, n.writeFloatBE = u ? c : i;
1320
+ n.writeFloatLE = u ? i : l, n.writeFloatBE = u ? l : i;
1321
1321
  function h(d, y) {
1322
1322
  return s[0] = d[y], s[1] = d[y + 1], s[2] = d[y + 2], s[3] = d[y + 3], o[0];
1323
1323
  }
@@ -1326,7 +1326,7 @@ function requireFloat() {
1326
1326
  }
1327
1327
  n.readFloatLE = u ? h : p, n.readFloatBE = u ? p : h;
1328
1328
  }() : function() {
1329
- function o(u, i, c, h) {
1329
+ function o(u, i, l, h) {
1330
1330
  var p = i < 0 ? 1 : 0;
1331
1331
  if (p && (i = -i), i === 0)
1332
1332
  u(1 / i > 0 ? (
@@ -1335,32 +1335,32 @@ function requireFloat() {
1335
1335
  ) : (
1336
1336
  /* negative 0 */
1337
1337
  2147483648
1338
- ), c, h);
1339
- else if (isNaN(i)) u(2143289344, c, h);
1338
+ ), l, h);
1339
+ else if (isNaN(i)) u(2143289344, l, h);
1340
1340
  else if (i > 34028234663852886e22)
1341
- u((p << 31 | 2139095040) >>> 0, c, h);
1341
+ u((p << 31 | 2139095040) >>> 0, l, h);
1342
1342
  else if (i < 11754943508222875e-54)
1343
- u((p << 31 | Math.round(i / 1401298464324817e-60)) >>> 0, c, h);
1343
+ u((p << 31 | Math.round(i / 1401298464324817e-60)) >>> 0, l, h);
1344
1344
  else {
1345
1345
  var d = Math.floor(Math.log(i) / Math.LN2), y = Math.round(i * Math.pow(2, -d) * 8388608) & 8388607;
1346
- u((p << 31 | d + 127 << 23 | y) >>> 0, c, h);
1346
+ u((p << 31 | d + 127 << 23 | y) >>> 0, l, h);
1347
1347
  }
1348
1348
  }
1349
1349
  n.writeFloatLE = o.bind(null, t), n.writeFloatBE = o.bind(null, e);
1350
- function s(u, i, c) {
1351
- var h = u(i, c), p = (h >> 31) * 2 + 1, d = h >>> 23 & 255, y = h & 8388607;
1350
+ function s(u, i, l) {
1351
+ var h = u(i, l), p = (h >> 31) * 2 + 1, d = h >>> 23 & 255, y = h & 8388607;
1352
1352
  return d === 255 ? y ? NaN : p * (1 / 0) : d === 0 ? p * 1401298464324817e-60 * y : p * Math.pow(2, d - 150) * (y + 8388608);
1353
1353
  }
1354
- n.readFloatLE = s.bind(null, a), n.readFloatBE = s.bind(null, l);
1354
+ n.readFloatLE = s.bind(null, a), n.readFloatBE = s.bind(null, c);
1355
1355
  }(), typeof Float64Array < "u" ? function() {
1356
1356
  var o = new Float64Array([-0]), s = new Uint8Array(o.buffer), u = s[7] === 128;
1357
1357
  function i(d, y, g) {
1358
1358
  o[0] = d, y[g] = s[0], y[g + 1] = s[1], y[g + 2] = s[2], y[g + 3] = s[3], y[g + 4] = s[4], y[g + 5] = s[5], y[g + 6] = s[6], y[g + 7] = s[7];
1359
1359
  }
1360
- function c(d, y, g) {
1360
+ function l(d, y, g) {
1361
1361
  o[0] = d, y[g] = s[7], y[g + 1] = s[6], y[g + 2] = s[5], y[g + 3] = s[4], y[g + 4] = s[3], y[g + 5] = s[2], y[g + 6] = s[1], y[g + 7] = s[0];
1362
1362
  }
1363
- n.writeDoubleLE = u ? i : c, n.writeDoubleBE = u ? c : i;
1363
+ n.writeDoubleLE = u ? i : l, n.writeDoubleBE = u ? l : i;
1364
1364
  function h(d, y) {
1365
1365
  return s[0] = d[y], s[1] = d[y + 1], s[2] = d[y + 2], s[3] = d[y + 3], s[4] = d[y + 4], s[5] = d[y + 5], s[6] = d[y + 6], s[7] = d[y + 7], o[0];
1366
1366
  }
@@ -1369,7 +1369,7 @@ function requireFloat() {
1369
1369
  }
1370
1370
  n.readDoubleLE = u ? h : p, n.readDoubleBE = u ? p : h;
1371
1371
  }() : function() {
1372
- function o(u, i, c, h, p, d) {
1372
+ function o(u, i, l, h, p, d) {
1373
1373
  var y = h < 0 ? 1 : 0;
1374
1374
  if (y && (h = -h), h === 0)
1375
1375
  u(0, p, d + i), u(1 / h > 0 ? (
@@ -1378,31 +1378,31 @@ function requireFloat() {
1378
1378
  ) : (
1379
1379
  /* negative 0 */
1380
1380
  2147483648
1381
- ), p, d + c);
1381
+ ), p, d + l);
1382
1382
  else if (isNaN(h))
1383
- u(0, p, d + i), u(2146959360, p, d + c);
1383
+ u(0, p, d + i), u(2146959360, p, d + l);
1384
1384
  else if (h > 17976931348623157e292)
1385
- u(0, p, d + i), u((y << 31 | 2146435072) >>> 0, p, d + c);
1385
+ u(0, p, d + i), u((y << 31 | 2146435072) >>> 0, p, d + l);
1386
1386
  else {
1387
1387
  var g;
1388
1388
  if (h < 22250738585072014e-324)
1389
- g = h / 5e-324, u(g >>> 0, p, d + i), u((y << 31 | g / 4294967296) >>> 0, p, d + c);
1389
+ g = h / 5e-324, u(g >>> 0, p, d + i), u((y << 31 | g / 4294967296) >>> 0, p, d + l);
1390
1390
  else {
1391
- var T = Math.floor(Math.log(h) / Math.LN2);
1392
- T === 1024 && (T = 1023), g = h * Math.pow(2, -T), u(g * 4503599627370496 >>> 0, p, d + i), u(
1393
- (y << 31 | T + 1023 << 20 | g * 1048576 & 1048575) >>> 0,
1391
+ var _ = Math.floor(Math.log(h) / Math.LN2);
1392
+ _ === 1024 && (_ = 1023), g = h * Math.pow(2, -_), u(g * 4503599627370496 >>> 0, p, d + i), u(
1393
+ (y << 31 | _ + 1023 << 20 | g * 1048576 & 1048575) >>> 0,
1394
1394
  p,
1395
- d + c
1395
+ d + l
1396
1396
  );
1397
1397
  }
1398
1398
  }
1399
1399
  }
1400
1400
  n.writeDoubleLE = o.bind(null, t, 0, 4), n.writeDoubleBE = o.bind(null, e, 4, 0);
1401
- function s(u, i, c, h, p) {
1402
- var d = u(h, p + i), y = u(h, p + c), g = (y >> 31) * 2 + 1, T = y >>> 20 & 2047, _ = 4294967296 * (y & 1048575) + d;
1403
- return T === 2047 ? _ ? NaN : g * (1 / 0) : T === 0 ? g * 5e-324 * _ : g * Math.pow(2, T - 1075) * (_ + 4503599627370496);
1401
+ function s(u, i, l, h, p) {
1402
+ var d = u(h, p + i), y = u(h, p + l), g = (y >> 31) * 2 + 1, _ = y >>> 20 & 2047, w = 4294967296 * (y & 1048575) + d;
1403
+ return _ === 2047 ? w ? NaN : g * (1 / 0) : _ === 0 ? g * 5e-324 * w : g * Math.pow(2, _ - 1075) * (w + 4503599627370496);
1404
1404
  }
1405
- n.readDoubleLE = s.bind(null, a, 0, 4), n.readDoubleBE = s.bind(null, l, 4, 0);
1405
+ n.readDoubleLE = s.bind(null, a, 0, 4), n.readDoubleBE = s.bind(null, c, 4, 0);
1406
1406
  }(), n;
1407
1407
  }
1408
1408
  function t(n, o, s) {
@@ -1414,7 +1414,7 @@ function requireFloat() {
1414
1414
  function a(n, o) {
1415
1415
  return (n[o] | n[o + 1] << 8 | n[o + 2] << 16 | n[o + 3] << 24) >>> 0;
1416
1416
  }
1417
- function l(n, o) {
1417
+ function c(n, o) {
1418
1418
  return (n[o] << 24 | n[o + 1] << 16 | n[o + 2] << 8 | n[o + 3]) >>> 0;
1419
1419
  }
1420
1420
  return float;
@@ -1438,18 +1438,18 @@ function requireUtf8() {
1438
1438
  return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(r) {
1439
1439
  var t = r;
1440
1440
  t.length = function(a) {
1441
- for (var l = 0, n = 0, o = 0; o < a.length; ++o)
1442
- n = a.charCodeAt(o), n < 128 ? l += 1 : n < 2048 ? l += 2 : (n & 64512) === 55296 && (a.charCodeAt(o + 1) & 64512) === 56320 ? (++o, l += 4) : l += 3;
1443
- return l;
1444
- }, t.read = function(a, l, n) {
1445
- var o = n - l;
1441
+ for (var c = 0, n = 0, o = 0; o < a.length; ++o)
1442
+ n = a.charCodeAt(o), n < 128 ? c += 1 : n < 2048 ? c += 2 : (n & 64512) === 55296 && (a.charCodeAt(o + 1) & 64512) === 56320 ? (++o, c += 4) : c += 3;
1443
+ return c;
1444
+ }, t.read = function(a, c, n) {
1445
+ var o = n - c;
1446
1446
  if (o < 1) return "";
1447
- for (var s = null, u = [], i = 0, c; l < n; )
1448
- c = a[l++], c < 128 ? u[i++] = c : c > 191 && c < 224 ? u[i++] = (c & 31) << 6 | a[l++] & 63 : c > 239 && c < 365 ? (c = ((c & 7) << 18 | (a[l++] & 63) << 12 | (a[l++] & 63) << 6 | a[l++] & 63) - 65536, u[i++] = 55296 + (c >> 10), u[i++] = 56320 + (c & 1023)) : u[i++] = (c & 15) << 12 | (a[l++] & 63) << 6 | a[l++] & 63, i > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, u)), i = 0);
1447
+ for (var s = null, u = [], i = 0, l; c < n; )
1448
+ l = a[c++], l < 128 ? u[i++] = l : l > 191 && l < 224 ? u[i++] = (l & 31) << 6 | a[c++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (a[c++] & 63) << 12 | (a[c++] & 63) << 6 | a[c++] & 63) - 65536, u[i++] = 55296 + (l >> 10), u[i++] = 56320 + (l & 1023)) : u[i++] = (l & 15) << 12 | (a[c++] & 63) << 6 | a[c++] & 63, i > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, u)), i = 0);
1449
1449
  return s ? (i && s.push(String.fromCharCode.apply(String, u.slice(0, i))), s.join("")) : String.fromCharCode.apply(String, u.slice(0, i));
1450
- }, t.write = function(a, l, n) {
1450
+ }, t.write = function(a, c, n) {
1451
1451
  for (var o = n, s, u, i = 0; i < a.length; ++i)
1452
- s = a.charCodeAt(i), s < 128 ? l[n++] = s : s < 2048 ? (l[n++] = s >> 6 | 192, l[n++] = s & 63 | 128) : (s & 64512) === 55296 && ((u = a.charCodeAt(i + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (u & 1023), ++i, l[n++] = s >> 18 | 240, l[n++] = s >> 12 & 63 | 128, l[n++] = s >> 6 & 63 | 128, l[n++] = s & 63 | 128) : (l[n++] = s >> 12 | 224, l[n++] = s >> 6 & 63 | 128, l[n++] = s & 63 | 128);
1452
+ s = a.charCodeAt(i), s < 128 ? c[n++] = s : s < 2048 ? (c[n++] = s >> 6 | 192, c[n++] = s & 63 | 128) : (s & 64512) === 55296 && ((u = a.charCodeAt(i + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (u & 1023), ++i, c[n++] = s >> 18 | 240, c[n++] = s >> 12 & 63 | 128, c[n++] = s >> 6 & 63 | 128, c[n++] = s & 63 | 128) : (c[n++] = s >> 12 | 224, c[n++] = s >> 6 & 63 | 128, c[n++] = s & 63 | 128);
1453
1453
  return n - o;
1454
1454
  };
1455
1455
  }(utf8$2)), utf8$2;
@@ -1459,12 +1459,12 @@ function requirePool() {
1459
1459
  if (hasRequiredPool) return pool_1;
1460
1460
  hasRequiredPool = 1, pool_1 = r;
1461
1461
  function r(t, e, a) {
1462
- var l = a || 8192, n = l >>> 1, o = null, s = l;
1462
+ var c = a || 8192, n = c >>> 1, o = null, s = c;
1463
1463
  return function(i) {
1464
1464
  if (i < 1 || i > n) return t(i);
1465
- s + i > l && (o = t(l), s = 0);
1466
- var c = e.call(o, s, s += i);
1467
- return s & 7 && (s = (s | 7) + 1), c;
1465
+ s + i > c && (o = t(c), s = 0);
1466
+ var l = e.call(o, s, s += i);
1467
+ return s & 7 && (s = (s | 7) + 1), l;
1468
1468
  };
1469
1469
  }
1470
1470
  return pool_1;
@@ -1514,11 +1514,11 @@ function requireLongbits() {
1514
1514
  }
1515
1515
  );
1516
1516
  };
1517
- var l = String.prototype.charCodeAt;
1517
+ var c = String.prototype.charCodeAt;
1518
1518
  return t.fromHash = function(o) {
1519
1519
  return o === a ? e : new t(
1520
- (l.call(o, 0) | l.call(o, 1) << 8 | l.call(o, 2) << 16 | l.call(o, 3) << 24) >>> 0,
1521
- (l.call(o, 4) | l.call(o, 5) << 8 | l.call(o, 6) << 16 | l.call(o, 7) << 24) >>> 0
1520
+ (c.call(o, 0) | c.call(o, 1) << 8 | c.call(o, 2) << 16 | c.call(o, 3) << 24) >>> 0,
1521
+ (c.call(o, 4) | c.call(o, 5) << 8 | c.call(o, 6) << 16 | c.call(o, 7) << 24) >>> 0
1522
1522
  );
1523
1523
  }, t.prototype.toHash = function() {
1524
1524
  return String.fromCharCode(
@@ -1570,8 +1570,8 @@ function requireMinimal() {
1570
1570
  return s != null && n.hasOwnProperty(o) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
1571
1571
  }, t.Buffer = function() {
1572
1572
  try {
1573
- var l = t.inquire("buffer").Buffer;
1574
- return l.prototype.utf8Write ? l : (
1573
+ var c = t.inquire("buffer").Buffer;
1574
+ return c.prototype.utf8Write ? c : (
1575
1575
  /* istanbul ignore next */
1576
1576
  null
1577
1577
  );
@@ -1589,15 +1589,15 @@ function requireMinimal() {
1589
1589
  var s = t.LongBits.fromHash(n);
1590
1590
  return t.Long ? t.Long.fromBits(s.lo, s.hi, o) : s.toNumber(!!o);
1591
1591
  };
1592
- function e(l, n, o) {
1592
+ function e(c, n, o) {
1593
1593
  for (var s = Object.keys(n), u = 0; u < s.length; ++u)
1594
- (l[s[u]] === void 0 || !o) && (l[s[u]] = n[s[u]]);
1595
- return l;
1594
+ (c[s[u]] === void 0 || !o) && (c[s[u]] = n[s[u]]);
1595
+ return c;
1596
1596
  }
1597
1597
  t.merge = e, t.lcFirst = function(n) {
1598
1598
  return n.charAt(0).toLowerCase() + n.substring(1);
1599
1599
  };
1600
- function a(l) {
1600
+ function a(c) {
1601
1601
  function n(o, s) {
1602
1602
  if (!(this instanceof n)) return new n(o, s);
1603
1603
  Object.defineProperty(this, "message", {
@@ -1617,7 +1617,7 @@ function requireMinimal() {
1617
1617
  },
1618
1618
  name: {
1619
1619
  get: function() {
1620
- return l;
1620
+ return c;
1621
1621
  },
1622
1622
  set: void 0,
1623
1623
  enumerable: !1,
@@ -1655,15 +1655,15 @@ function requireMinimal() {
1655
1655
  bytes: String,
1656
1656
  json: !0
1657
1657
  }, t._configure = function() {
1658
- var l = t.Buffer;
1659
- if (!l) {
1658
+ var c = t.Buffer;
1659
+ if (!c) {
1660
1660
  t._Buffer_from = t._Buffer_allocUnsafe = null;
1661
1661
  return;
1662
1662
  }
1663
- t._Buffer_from = l.from !== Uint8Array.from && l.from || function(o, s) {
1664
- return new l(o, s);
1665
- }, t._Buffer_allocUnsafe = l.allocUnsafe || function(o) {
1666
- return new l(o);
1663
+ t._Buffer_from = c.from !== Uint8Array.from && c.from || function(o, s) {
1664
+ return new c(o, s);
1665
+ }, t._Buffer_allocUnsafe = c.allocUnsafe || function(o) {
1666
+ return new c(o);
1667
1667
  };
1668
1668
  };
1669
1669
  }(minimal)), minimal;
@@ -1767,7 +1767,7 @@ var writeBytes = util$7.Array.prototype.set ? function r(t, e, a) {
1767
1767
  } : (
1768
1768
  /* istanbul ignore next */
1769
1769
  function r(t, e, a) {
1770
- for (var l = 0; l < t.length; ++l) e[a + l] = t[l];
1770
+ for (var c = 0; c < t.length; ++c) e[a + c] = t[c];
1771
1771
  }
1772
1772
  );
1773
1773
  Writer$1.prototype.bytes = function r(t) {
@@ -1816,8 +1816,8 @@ BufferWriter._configure = function() {
1816
1816
  if (t.copy)
1817
1817
  t.copy(e, a, 0, t.length);
1818
1818
  else
1819
- for (var l = 0; l < t.length; )
1820
- e[a++] = t[l++];
1819
+ for (var c = 0; c < t.length; )
1820
+ e[a++] = t[c++];
1821
1821
  }
1822
1822
  );
1823
1823
  };
@@ -1854,10 +1854,10 @@ var create_array = typeof Uint8Array < "u" ? function r(t) {
1854
1854
  }
1855
1855
  ), create = function r() {
1856
1856
  return util$5.Buffer ? function(e) {
1857
- return (Reader$1.create = function(l) {
1858
- return util$5.Buffer.isBuffer(l) ? new BufferReader$1(l) : (
1857
+ return (Reader$1.create = function(c) {
1858
+ return util$5.Buffer.isBuffer(c) ? new BufferReader$1(c) : (
1859
1859
  /* istanbul ignore next */
1860
- create_array(l)
1860
+ create_array(c)
1861
1861
  );
1862
1862
  })(e);
1863
1863
  } : (
@@ -1945,8 +1945,8 @@ Reader$1.prototype.bytes = function r() {
1945
1945
  if (this.pos += t, Array.isArray(this.buf))
1946
1946
  return this.buf.slice(e, a);
1947
1947
  if (e === a) {
1948
- var l = util$5.Buffer;
1949
- return l ? l.alloc(0) : new this.buf.constructor(0);
1948
+ var c = util$5.Buffer;
1949
+ return c ? c.alloc(0) : new this.buf.constructor(0);
1950
1950
  }
1951
1951
  return this._slice.call(this.buf, e, a);
1952
1952
  };
@@ -2032,10 +2032,10 @@ function Service$1(r, t, e) {
2032
2032
  if (typeof r != "function") throw TypeError("rpcImpl must be a function");
2033
2033
  util$3.EventEmitter.call(this), this.rpcImpl = r, this.requestDelimited = !!t, this.responseDelimited = !!e;
2034
2034
  }
2035
- Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2036
- if (!l) throw TypeError("request must be specified");
2035
+ Service$1.prototype.rpcCall = function r(t, e, a, c, n) {
2036
+ if (!c) throw TypeError("request must be specified");
2037
2037
  var o = this;
2038
- if (!n) return util$3.asPromise(r, o, t, e, a, l);
2038
+ if (!n) return util$3.asPromise(r, o, t, e, a, c);
2039
2039
  if (!o.rpcImpl) {
2040
2040
  setTimeout(function() {
2041
2041
  n(Error("already ended"));
@@ -2045,7 +2045,7 @@ Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2045
2045
  try {
2046
2046
  return o.rpcImpl(
2047
2047
  t,
2048
- e[o.requestDelimited ? "encodeDelimited" : "encode"](l).finish(),
2048
+ e[o.requestDelimited ? "encodeDelimited" : "encode"](c).finish(),
2049
2049
  function(u, i) {
2050
2050
  if (u)
2051
2051
  return o.emit("error", u, t), n(u);
@@ -2059,8 +2059,8 @@ Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2059
2059
  if (!(i instanceof a))
2060
2060
  try {
2061
2061
  i = a[o.responseDelimited ? "decodeDelimited" : "decode"](i);
2062
- } catch (c) {
2063
- return o.emit("error", c, t), n(c);
2062
+ } catch (l) {
2063
+ return o.emit("error", l, t), n(l);
2064
2064
  }
2065
2065
  return o.emit("data", i, t), n(null, i);
2066
2066
  }
@@ -2094,65 +2094,65 @@ function codegen(r, t) {
2094
2094
  var e = [];
2095
2095
  function a(n) {
2096
2096
  if (typeof n != "string") {
2097
- var o = l();
2097
+ var o = c();
2098
2098
  if (codegen.verbose && console.warn("codegen: " + o), o = "return " + o, n) {
2099
- for (var s = Object.keys(n), u = new Array(s.length + 1), i = new Array(s.length), c = 0; c < s.length; )
2100
- u[c] = s[c], i[c] = n[s[c++]];
2101
- return u[c] = o, Function.apply(null, u).apply(null, i);
2099
+ for (var s = Object.keys(n), u = new Array(s.length + 1), i = new Array(s.length), l = 0; l < s.length; )
2100
+ u[l] = s[l], i[l] = n[s[l++]];
2101
+ return u[l] = o, Function.apply(null, u).apply(null, i);
2102
2102
  }
2103
2103
  return Function(o)();
2104
2104
  }
2105
2105
  for (var h = new Array(arguments.length - 1), p = 0; p < h.length; )
2106
2106
  h[p] = arguments[++p];
2107
2107
  if (p = 0, n = n.replace(/%([%dfijs])/g, function(y, g) {
2108
- var T = h[p++];
2108
+ var _ = h[p++];
2109
2109
  switch (g) {
2110
2110
  case "d":
2111
2111
  case "f":
2112
- return String(Number(T));
2112
+ return String(Number(_));
2113
2113
  case "i":
2114
- return String(Math.floor(T));
2114
+ return String(Math.floor(_));
2115
2115
  case "j":
2116
- return JSON.stringify(T);
2116
+ return JSON.stringify(_);
2117
2117
  case "s":
2118
- return String(T);
2118
+ return String(_);
2119
2119
  }
2120
2120
  return "%";
2121
2121
  }), p !== h.length) throw Error("parameter count mismatch");
2122
2122
  return e.push(n), a;
2123
2123
  }
2124
- function l(n) {
2124
+ function c(n) {
2125
2125
  return "function " + (n || t || "") + "(" + (r && r.join(",") || "") + `){
2126
2126
  ` + e.join(`
2127
2127
  `) + `
2128
2128
  }`;
2129
2129
  }
2130
- return a.toString = l, a;
2130
+ return a.toString = c, a;
2131
2131
  }
2132
2132
  codegen.verbose = !1;
2133
2133
  var fetch_1 = fetch, asPromise = requireAspromise(), inquire = requireInquire(), fs = inquire("fs");
2134
2134
  function fetch(r, t, e) {
2135
- return typeof t == "function" ? (e = t, t = {}) : t || (t = {}), e ? !t.xhr && fs && fs.readFile ? fs.readFile(r, function(l, n) {
2136
- return l && typeof XMLHttpRequest < "u" ? fetch.xhr(r, t, e) : l ? e(l) : e(null, t.binary ? n : n.toString("utf8"));
2135
+ return typeof t == "function" ? (e = t, t = {}) : t || (t = {}), e ? !t.xhr && fs && fs.readFile ? fs.readFile(r, function(c, n) {
2136
+ return c && typeof XMLHttpRequest < "u" ? fetch.xhr(r, t, e) : c ? e(c) : e(null, t.binary ? n : n.toString("utf8"));
2137
2137
  }) : fetch.xhr(r, t, e) : asPromise(fetch, this, r, t);
2138
2138
  }
2139
2139
  fetch.xhr = function r(t, e, a) {
2140
- var l = new XMLHttpRequest();
2141
- l.onreadystatechange = function() {
2142
- if (l.readyState === 4) {
2143
- if (l.status !== 0 && l.status !== 200) return a(Error("status " + l.status));
2140
+ var c = new XMLHttpRequest();
2141
+ c.onreadystatechange = function() {
2142
+ if (c.readyState === 4) {
2143
+ if (c.status !== 0 && c.status !== 200) return a(Error("status " + c.status));
2144
2144
  if (e.binary) {
2145
- var o = l.response;
2145
+ var o = c.response;
2146
2146
  if (!o) {
2147
2147
  o = [];
2148
- for (var s = 0; s < l.responseText.length; ++s)
2149
- o.push(l.responseText.charCodeAt(s) & 255);
2148
+ for (var s = 0; s < c.responseText.length; ++s)
2149
+ o.push(c.responseText.charCodeAt(s) & 255);
2150
2150
  }
2151
2151
  return a(null, typeof Uint8Array < "u" ? new Uint8Array(o) : o);
2152
2152
  }
2153
- return a(null, l.responseText);
2153
+ return a(null, c.responseText);
2154
2154
  }
2155
- }, e.binary && ("overrideMimeType" in l && l.overrideMimeType("text/plain; charset=x-user-defined"), l.responseType = "arraybuffer"), l.open("GET", t), l.send();
2155
+ }, e.binary && ("overrideMimeType" in c && c.overrideMimeType("text/plain; charset=x-user-defined"), c.responseType = "arraybuffer"), c.open("GET", t), c.send();
2156
2156
  };
2157
2157
  var path = {};
2158
2158
  (function(r) {
@@ -2219,12 +2219,12 @@ function requireTypes() {
2219
2219
  "bytes"
2220
2220
  // 14
2221
2221
  ];
2222
- function l(n, o) {
2222
+ function c(n, o) {
2223
2223
  var s = 0, u = {};
2224
2224
  for (o |= 0; s < n.length; ) u[a[s + o]] = n[s++];
2225
2225
  return u;
2226
2226
  }
2227
- t.basic = l([
2227
+ t.basic = c([
2228
2228
  /* double */
2229
2229
  1,
2230
2230
  /* float */
@@ -2255,7 +2255,7 @@ function requireTypes() {
2255
2255
  2,
2256
2256
  /* bytes */
2257
2257
  2
2258
- ]), t.defaults = l([
2258
+ ]), t.defaults = c([
2259
2259
  /* double */
2260
2260
  0,
2261
2261
  /* float */
@@ -2288,7 +2288,7 @@ function requireTypes() {
2288
2288
  e.emptyArray,
2289
2289
  /* message */
2290
2290
  null
2291
- ]), t.long = l(
2291
+ ]), t.long = c(
2292
2292
  [
2293
2293
  /* int64 */
2294
2294
  0,
@@ -2302,7 +2302,7 @@ function requireTypes() {
2302
2302
  1
2303
2303
  ],
2304
2304
  7
2305
- ), t.mapKey = l(
2305
+ ), t.mapKey = c(
2306
2306
  [
2307
2307
  /* int32 */
2308
2308
  0,
@@ -2330,7 +2330,7 @@ function requireTypes() {
2330
2330
  2
2331
2331
  ],
2332
2332
  2
2333
- ), t.packed = l([
2333
+ ), t.packed = c([
2334
2334
  /* double */
2335
2335
  1,
2336
2336
  /* float */
@@ -2366,17 +2366,17 @@ function requireField() {
2366
2366
  hasRequiredField = 1, field = o;
2367
2367
  var r = requireObject();
2368
2368
  ((o.prototype = Object.create(r.prototype)).constructor = o).className = "Field";
2369
- var t = require_enum(), e = requireTypes(), a = requireUtil(), l, n = /^required|optional|repeated$/;
2369
+ var t = require_enum(), e = requireTypes(), a = requireUtil(), c, n = /^required|optional|repeated$/;
2370
2370
  o.fromJSON = function(u, i) {
2371
2371
  return new o(u, i.id, i.type, i.rule, i.extend, i.options, i.comment);
2372
2372
  };
2373
- function o(s, u, i, c, h, p, d) {
2374
- if (a.isObject(c) ? (d = h, p = c, c = h = void 0) : a.isObject(h) && (d = p, p = h, h = void 0), r.call(this, s, p), !a.isInteger(u) || u < 0) throw TypeError("id must be a non-negative integer");
2373
+ function o(s, u, i, l, h, p, d) {
2374
+ if (a.isObject(l) ? (d = h, p = l, l = h = void 0) : a.isObject(h) && (d = p, p = h, h = void 0), r.call(this, s, p), !a.isInteger(u) || u < 0) throw TypeError("id must be a non-negative integer");
2375
2375
  if (!a.isString(i)) throw TypeError("type must be a string");
2376
- if (c !== void 0 && !n.test(c = c.toString().toLowerCase()))
2376
+ if (l !== void 0 && !n.test(l = l.toString().toLowerCase()))
2377
2377
  throw TypeError("rule must be a string rule");
2378
2378
  if (h !== void 0 && !a.isString(h)) throw TypeError("extend must be a string");
2379
- c === "proto3_optional" && (c = "optional"), this.rule = c && c !== "optional" ? c : void 0, this.type = i, this.id = u, this.extend = h || void 0, this.required = c === "required", this.optional = !this.required, this.repeated = c === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = a.Long ? e.long[i] !== void 0 : (
2379
+ l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = i, this.id = u, this.extend = h || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = a.Long ? e.long[i] !== void 0 : (
2380
2380
  /* istanbul ignore next */
2381
2381
  !1
2382
2382
  ), this.bytes = i === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = d;
@@ -2385,8 +2385,8 @@ function requireField() {
2385
2385
  get: function() {
2386
2386
  return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
2387
2387
  }
2388
- }), o.prototype.setOption = function(u, i, c) {
2389
- return u === "packed" && (this._packed = null), r.prototype.setOption.call(this, u, i, c);
2388
+ }), o.prototype.setOption = function(u, i, l) {
2389
+ return u === "packed" && (this._packed = null), r.prototype.setOption.call(this, u, i, l);
2390
2390
  }, o.prototype.toJSON = function(u) {
2391
2391
  var i = u ? !!u.keepComments : !1;
2392
2392
  return a.toObject([
@@ -2405,7 +2405,7 @@ function requireField() {
2405
2405
  ]);
2406
2406
  }, o.prototype.resolve = function() {
2407
2407
  if (this.resolved) return this;
2408
- if ((this.typeDefault = e.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof l ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof t && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof t)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
2408
+ if ((this.typeDefault = e.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof c ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof t && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof t)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
2409
2409
  this.typeDefault = a.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
2410
2410
  else if (this.bytes && typeof this.typeDefault == "string") {
2411
2411
  var u;
@@ -2419,17 +2419,17 @@ function requireField() {
2419
2419
  0
2420
2420
  ), this.typeDefault = u;
2421
2421
  }
2422
- return this.map ? this.defaultValue = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof l && (this.parent.ctor.prototype[this.name] = this.defaultValue), r.prototype.resolve.call(this);
2423
- }, o.d = function(u, i, c, h) {
2422
+ return this.map ? this.defaultValue = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof c && (this.parent.ctor.prototype[this.name] = this.defaultValue), r.prototype.resolve.call(this);
2423
+ }, o.d = function(u, i, l, h) {
2424
2424
  return typeof i == "function" ? i = a.decorateType(i).name : i && typeof i == "object" && (i = a.decorateEnum(i).name), function(d, y) {
2425
2425
  a.decorateType(d.constructor).add(
2426
- new o(y, u, i, c, {
2426
+ new o(y, u, i, l, {
2427
2427
  default: h
2428
2428
  })
2429
2429
  );
2430
2430
  };
2431
2431
  }, o._configure = function(u) {
2432
- l = u;
2432
+ c = u;
2433
2433
  }, field;
2434
2434
  }
2435
2435
  var oneof, hasRequiredOneof;
@@ -2457,14 +2457,14 @@ function requireOneof() {
2457
2457
  s ? this.comment : void 0
2458
2458
  ]);
2459
2459
  };
2460
- function l(n) {
2460
+ function c(n) {
2461
2461
  if (n.parent)
2462
2462
  for (var o = 0; o < n.fieldsArray.length; ++o)
2463
2463
  n.fieldsArray[o].parent || n.parent.add(n.fieldsArray[o]);
2464
2464
  }
2465
2465
  return a.prototype.add = function(o) {
2466
2466
  if (!(o instanceof t)) throw TypeError("field must be a Field");
2467
- return o.parent && o.parent !== this.parent && o.parent.remove(o), this.oneof.push(o.name), this.fieldsArray.push(o), o.partOf = this, l(this), this;
2467
+ return o.parent && o.parent !== this.parent && o.parent.remove(o), this.oneof.push(o.name), this.fieldsArray.push(o), o.partOf = this, c(this), this;
2468
2468
  }, a.prototype.remove = function(o) {
2469
2469
  if (!(o instanceof t)) throw TypeError("field must be a Field");
2470
2470
  var s = this.fieldsArray.indexOf(o);
@@ -2476,15 +2476,15 @@ function requireOneof() {
2476
2476
  var i = o.get(this.oneof[u]);
2477
2477
  i && !i.partOf && (i.partOf = s, s.fieldsArray.push(i));
2478
2478
  }
2479
- l(this);
2479
+ c(this);
2480
2480
  }, a.prototype.onRemove = function(o) {
2481
2481
  for (var s = 0, u; s < this.fieldsArray.length; ++s)
2482
2482
  (u = this.fieldsArray[s]).parent && u.parent.remove(u);
2483
2483
  r.prototype.onRemove.call(this, o);
2484
2484
  }, a.d = function() {
2485
2485
  for (var o = new Array(arguments.length), s = 0; s < arguments.length; ) o[s] = arguments[s++];
2486
- return function(i, c) {
2487
- e.decorateType(i.constructor).add(new a(c, o)), Object.defineProperty(i, c, {
2486
+ return function(i, l) {
2487
+ e.decorateType(i.constructor).add(new a(l, o)), Object.defineProperty(i, l, {
2488
2488
  get: e.oneOfGetter(o),
2489
2489
  set: e.oneOfSetter(o)
2490
2490
  });
@@ -2497,13 +2497,13 @@ function requireNamespace() {
2497
2497
  hasRequiredNamespace = 1, namespace = u;
2498
2498
  var r = requireObject();
2499
2499
  ((u.prototype = Object.create(r.prototype)).constructor = u).className = "Namespace";
2500
- var t = requireField(), e = requireUtil(), a = requireOneof(), l, n, o;
2500
+ var t = requireField(), e = requireUtil(), a = requireOneof(), c, n, o;
2501
2501
  u.fromJSON = function(h, p) {
2502
2502
  return new u(h, p.options).addJSON(p.nested);
2503
2503
  };
2504
- function s(c, h) {
2505
- if (c && c.length) {
2506
- for (var p = {}, d = 0; d < c.length; ++d) p[c[d].name] = c[d].toJSON(h);
2504
+ function s(l, h) {
2505
+ if (l && l.length) {
2506
+ for (var p = {}, d = 0; d < l.length; ++d) p[l[d].name] = l[d].toJSON(h);
2507
2507
  return p;
2508
2508
  }
2509
2509
  }
@@ -2520,11 +2520,11 @@ function requireNamespace() {
2520
2520
  }
2521
2521
  return !1;
2522
2522
  };
2523
- function u(c, h) {
2524
- r.call(this, c, h), this.nested = void 0, this._nestedArray = null;
2523
+ function u(l, h) {
2524
+ r.call(this, l, h), this.nested = void 0, this._nestedArray = null;
2525
2525
  }
2526
- function i(c) {
2527
- return c._nestedArray = null, c;
2526
+ function i(l) {
2527
+ return l._nestedArray = null, l;
2528
2528
  }
2529
2529
  return Object.defineProperty(u.prototype, "nestedArray", {
2530
2530
  get: function() {
@@ -2543,7 +2543,7 @@ function requireNamespace() {
2543
2543
  for (var d = Object.keys(h), y = 0, g; y < d.length; ++y)
2544
2544
  g = h[d[y]], p.add(
2545
2545
  // most to least likely
2546
- (g.fields !== void 0 ? l.fromJSON : g.values !== void 0 ? o.fromJSON : g.methods !== void 0 ? n.fromJSON : g.id !== void 0 ? t.fromJSON : u.fromJSON)(d[y], g)
2546
+ (g.fields !== void 0 ? c.fromJSON : g.values !== void 0 ? o.fromJSON : g.methods !== void 0 ? n.fromJSON : g.id !== void 0 ? t.fromJSON : u.fromJSON)(d[y], g)
2547
2547
  );
2548
2548
  return this;
2549
2549
  }, u.prototype.get = function(h) {
@@ -2552,13 +2552,13 @@ function requireNamespace() {
2552
2552
  if (this.nested && this.nested[h] instanceof o) return this.nested[h].values;
2553
2553
  throw Error("no such enum: " + h);
2554
2554
  }, u.prototype.add = function(h) {
2555
- if (!(h instanceof t && h.extend !== void 0 || h instanceof l || h instanceof a || h instanceof o || h instanceof n || h instanceof u))
2555
+ if (!(h instanceof t && h.extend !== void 0 || h instanceof c || h instanceof a || h instanceof o || h instanceof n || h instanceof u))
2556
2556
  throw TypeError("object must be a valid nested object");
2557
2557
  if (!this.nested) this.nested = {};
2558
2558
  else {
2559
2559
  var p = this.get(h.name);
2560
2560
  if (p)
2561
- if (p instanceof u && h instanceof u && !(p instanceof l || p instanceof n)) {
2561
+ if (p instanceof u && h instanceof u && !(p instanceof c || p instanceof n)) {
2562
2562
  for (var d = p.nestedArray, y = 0; y < d.length; ++y) h.add(d[y]);
2563
2563
  this.remove(p), this.nested || (this.nested = {}), h.setOptions(p.options, !0);
2564
2564
  } else throw Error("duplicate name '" + h.name + "' in " + this);
@@ -2601,7 +2601,7 @@ function requireNamespace() {
2601
2601
  return y;
2602
2602
  return this.parent === null || d ? null : this.parent.lookup(h, p);
2603
2603
  }, u.prototype.lookupType = function(h) {
2604
- var p = this.lookup(h, [l]);
2604
+ var p = this.lookup(h, [c]);
2605
2605
  if (!p) throw Error("no such type: " + h);
2606
2606
  return p;
2607
2607
  }, u.prototype.lookupEnum = function(h) {
@@ -2609,15 +2609,15 @@ function requireNamespace() {
2609
2609
  if (!p) throw Error("no such Enum '" + h + "' in " + this);
2610
2610
  return p;
2611
2611
  }, u.prototype.lookupTypeOrEnum = function(h) {
2612
- var p = this.lookup(h, [l, o]);
2612
+ var p = this.lookup(h, [c, o]);
2613
2613
  if (!p) throw Error("no such Type or Enum '" + h + "' in " + this);
2614
2614
  return p;
2615
2615
  }, u.prototype.lookupService = function(h) {
2616
2616
  var p = this.lookup(h, [n]);
2617
2617
  if (!p) throw Error("no such Service '" + h + "' in " + this);
2618
2618
  return p;
2619
- }, u._configure = function(c, h, p) {
2620
- l = c, n = h, o = p;
2619
+ }, u._configure = function(l, h, p) {
2620
+ c = l, n = h, o = p;
2621
2621
  }, namespace;
2622
2622
  }
2623
2623
  var mapfield, hasRequiredMapfield;
@@ -2627,8 +2627,8 @@ function requireMapfield() {
2627
2627
  var r = requireField();
2628
2628
  ((a.prototype = Object.create(r.prototype)).constructor = a).className = "MapField";
2629
2629
  var t = requireTypes(), e = requireUtil();
2630
- function a(l, n, o, s, u, i) {
2631
- if (r.call(this, l, n, s, void 0, void 0, u, i), !e.isString(o)) throw TypeError("keyType must be a string");
2630
+ function a(c, n, o, s, u, i) {
2631
+ if (r.call(this, c, n, s, void 0, void 0, u, i), !e.isString(o)) throw TypeError("keyType must be a string");
2632
2632
  this.keyType = o, this.resolvedKeyType = null, this.map = !0;
2633
2633
  }
2634
2634
  return a.fromJSON = function(n, o) {
@@ -2654,8 +2654,8 @@ function requireMapfield() {
2654
2654
  if (t.mapKey[this.keyType] === void 0) throw Error("invalid key type: " + this.keyType);
2655
2655
  return r.prototype.resolve.call(this);
2656
2656
  }, a.d = function(n, o, s) {
2657
- return typeof s == "function" ? s = e.decorateType(s).name : s && typeof s == "object" && (s = e.decorateEnum(s).name), function(i, c) {
2658
- e.decorateType(i.constructor).add(new a(c, n, o, s));
2657
+ return typeof s == "function" ? s = e.decorateType(s).name : s && typeof s == "object" && (s = e.decorateEnum(s).name), function(i, l) {
2658
+ e.decorateType(i.constructor).add(new a(l, n, o, s));
2659
2659
  };
2660
2660
  }, mapfield;
2661
2661
  }
@@ -2666,15 +2666,15 @@ function requireMethod() {
2666
2666
  var r = requireObject();
2667
2667
  ((e.prototype = Object.create(r.prototype)).constructor = e).className = "Method";
2668
2668
  var t = requireUtil();
2669
- function e(a, l, n, o, s, u, i, c, h) {
2670
- if (t.isObject(s) ? (i = s, s = u = void 0) : t.isObject(u) && (i = u, u = void 0), !(l === void 0 || t.isString(l))) throw TypeError("type must be a string");
2669
+ function e(a, c, n, o, s, u, i, l, h) {
2670
+ if (t.isObject(s) ? (i = s, s = u = void 0) : t.isObject(u) && (i = u, u = void 0), !(c === void 0 || t.isString(c))) throw TypeError("type must be a string");
2671
2671
  if (!t.isString(n)) throw TypeError("requestType must be a string");
2672
2672
  if (!t.isString(o)) throw TypeError("responseType must be a string");
2673
- r.call(this, a, i), this.type = l || "rpc", this.requestType = n, this.requestStream = s ? !0 : void 0, this.responseType = o, this.responseStream = u ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = c, this.parsedOptions = h;
2673
+ r.call(this, a, i), this.type = c || "rpc", this.requestType = n, this.requestStream = s ? !0 : void 0, this.responseType = o, this.responseStream = u ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = h;
2674
2674
  }
2675
- return e.fromJSON = function(l, n) {
2675
+ return e.fromJSON = function(c, n) {
2676
2676
  return new e(
2677
- l,
2677
+ c,
2678
2678
  n.type,
2679
2679
  n.requestType,
2680
2680
  n.responseType,
@@ -2684,8 +2684,8 @@ function requireMethod() {
2684
2684
  n.comment,
2685
2685
  n.parsedOptions
2686
2686
  );
2687
- }, e.prototype.toJSON = function(l) {
2688
- var n = l ? !!l.keepComments : !1;
2687
+ }, e.prototype.toJSON = function(c) {
2688
+ var n = c ? !!c.keepComments : !1;
2689
2689
  return t.toObject([
2690
2690
  "type",
2691
2691
  this.type !== "rpc" && /* istanbul ignore next */
@@ -2712,20 +2712,20 @@ function requireMethod() {
2712
2712
  var service, hasRequiredService;
2713
2713
  function requireService() {
2714
2714
  if (hasRequiredService) return service;
2715
- hasRequiredService = 1, service = l;
2715
+ hasRequiredService = 1, service = c;
2716
2716
  var r = requireNamespace();
2717
- ((l.prototype = Object.create(r.prototype)).constructor = l).className = "Service";
2717
+ ((c.prototype = Object.create(r.prototype)).constructor = c).className = "Service";
2718
2718
  var t = requireMethod(), e = requireUtil(), a = rpc;
2719
- function l(o, s) {
2719
+ function c(o, s) {
2720
2720
  r.call(this, o, s), this.methods = {}, this._methodsArray = null;
2721
2721
  }
2722
- l.fromJSON = function(s, u) {
2723
- var i = new l(s, u.options);
2722
+ c.fromJSON = function(s, u) {
2723
+ var i = new c(s, u.options);
2724
2724
  if (u.methods)
2725
- for (var c = Object.keys(u.methods), h = 0; h < c.length; ++h)
2726
- i.add(t.fromJSON(c[h], u.methods[c[h]]));
2725
+ for (var l = Object.keys(u.methods), h = 0; h < l.length; ++h)
2726
+ i.add(t.fromJSON(l[h], u.methods[l[h]]));
2727
2727
  return u.nested && i.addJSON(u.nested), i.comment = u.comment, i;
2728
- }, l.prototype.toJSON = function(s) {
2728
+ }, c.prototype.toJSON = function(s) {
2729
2729
  var u = r.prototype.toJSON.call(this, s), i = s ? !!s.keepComments : !1;
2730
2730
  return e.toObject([
2731
2731
  "options",
@@ -2738,7 +2738,7 @@ function requireService() {
2738
2738
  "comment",
2739
2739
  i ? this.comment : void 0
2740
2740
  ]);
2741
- }, Object.defineProperty(l.prototype, "methodsArray", {
2741
+ }, Object.defineProperty(c.prototype, "methodsArray", {
2742
2742
  get: function() {
2743
2743
  return this._methodsArray || (this._methodsArray = e.toArray(this.methods));
2744
2744
  }
@@ -2746,25 +2746,25 @@ function requireService() {
2746
2746
  function n(o) {
2747
2747
  return o._methodsArray = null, o;
2748
2748
  }
2749
- return l.prototype.get = function(s) {
2749
+ return c.prototype.get = function(s) {
2750
2750
  return this.methods[s] || r.prototype.get.call(this, s);
2751
- }, l.prototype.resolveAll = function() {
2751
+ }, c.prototype.resolveAll = function() {
2752
2752
  for (var s = this.methodsArray, u = 0; u < s.length; ++u) s[u].resolve();
2753
2753
  return r.prototype.resolve.call(this);
2754
- }, l.prototype.add = function(s) {
2754
+ }, c.prototype.add = function(s) {
2755
2755
  if (this.get(s.name)) throw Error("duplicate name '" + s.name + "' in " + this);
2756
2756
  return s instanceof t ? (this.methods[s.name] = s, s.parent = this, n(this)) : r.prototype.add.call(this, s);
2757
- }, l.prototype.remove = function(s) {
2757
+ }, c.prototype.remove = function(s) {
2758
2758
  if (s instanceof t) {
2759
2759
  if (this.methods[s.name] !== s) throw Error(s + " is not a member of " + this);
2760
2760
  return delete this.methods[s.name], s.parent = null, n(this);
2761
2761
  }
2762
2762
  return r.prototype.remove.call(this, s);
2763
- }, l.prototype.create = function(s, u, i) {
2764
- for (var c = new a.Service(s, u, i), h = 0, p; h < /* initializes */
2763
+ }, c.prototype.create = function(s, u, i) {
2764
+ for (var l = new a.Service(s, u, i), h = 0, p; h < /* initializes */
2765
2765
  this.methodsArray.length; ++h) {
2766
2766
  var d = e.lcFirst((p = this._methodsArray[h]).resolve().name).replace(/[^$\w_]/g, "");
2767
- c[d] = e.codegen(
2767
+ l[d] = e.codegen(
2768
2768
  ["r", "c"],
2769
2769
  e.isReserved(d) ? d + "_" : d
2770
2770
  )("return this.rpcCall(m,q,s,r,c)")({
@@ -2773,7 +2773,7 @@ function requireService() {
2773
2773
  s: p.resolvedResponseType.ctor
2774
2774
  });
2775
2775
  }
2776
- return c;
2776
+ return l;
2777
2777
  }, service;
2778
2778
  }
2779
2779
  var message = Message, util$1 = requireMinimal();
@@ -2812,12 +2812,12 @@ Message.prototype.toJSON = function r() {
2812
2812
  var decoder_1, hasRequiredDecoder;
2813
2813
  function requireDecoder() {
2814
2814
  if (hasRequiredDecoder) return decoder_1;
2815
- hasRequiredDecoder = 1, decoder_1 = l;
2815
+ hasRequiredDecoder = 1, decoder_1 = c;
2816
2816
  var r = require_enum(), t = requireTypes(), e = requireUtil();
2817
2817
  function a(n) {
2818
2818
  return "missing required '" + n.name + "'";
2819
2819
  }
2820
- function l(n) {
2820
+ function c(n) {
2821
2821
  var o = e.codegen(["r", "l"], n.name + "$decode")("if(!(r instanceof Reader))")(
2822
2822
  "r=Reader.create(r)"
2823
2823
  )(
@@ -2828,23 +2828,23 @@ function requireDecoder() {
2828
2828
  n.group && o("if((t&7)===4)")("break"), o("switch(t>>>3){");
2829
2829
  for (var s = 0; s < /* initializes */
2830
2830
  n.fieldsArray.length; ++s) {
2831
- var u = n._fieldsArray[s].resolve(), i = u.resolvedType instanceof r ? "int32" : u.type, c = "m" + e.safeProp(u.name);
2832
- o("case %i: {", u.id), u.map ? (o("if(%s===util.emptyObject)", c)("%s={}", c)("var c2 = r.uint32()+r.pos"), t.defaults[u.keyType] !== void 0 ? o("k=%j", t.defaults[u.keyType]) : o("k=null"), t.defaults[i] !== void 0 ? o("value=%j", t.defaults[i]) : o("value=null"), o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")(
2831
+ var u = n._fieldsArray[s].resolve(), i = u.resolvedType instanceof r ? "int32" : u.type, l = "m" + e.safeProp(u.name);
2832
+ o("case %i: {", u.id), u.map ? (o("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), t.defaults[u.keyType] !== void 0 ? o("k=%j", t.defaults[u.keyType]) : o("k=null"), t.defaults[i] !== void 0 ? o("value=%j", t.defaults[i]) : o("value=null"), o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")(
2833
2833
  "case 1: k=r.%s(); break",
2834
2834
  u.keyType
2835
- )("case 2:"), t.basic[i] === void 0 ? o("value=types[%i].decode(r,r.uint32())", s) : o("value=r.%s()", i), o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), t.long[u.keyType] !== void 0 ? o('%s[typeof k==="object"?util.longToHash(k):k]=value', c) : o("%s[k]=value", c)) : u.repeated ? (o("if(!(%s&&%s.length))", c, c)("%s=[]", c), t.packed[i] !== void 0 && o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")(
2835
+ )("case 2:"), t.basic[i] === void 0 ? o("value=types[%i].decode(r,r.uint32())", s) : o("value=r.%s()", i), o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), t.long[u.keyType] !== void 0 ? o('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : o("%s[k]=value", l)) : u.repeated ? (o("if(!(%s&&%s.length))", l, l)("%s=[]", l), t.packed[i] !== void 0 && o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")(
2836
2836
  "%s.push(r.%s())",
2837
- c,
2837
+ l,
2838
2838
  i
2839
2839
  )("}else"), t.basic[i] === void 0 ? o(
2840
2840
  u.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))",
2841
- c,
2841
+ l,
2842
2842
  s
2843
- ) : o("%s.push(r.%s())", c, i)) : t.basic[i] === void 0 ? o(
2843
+ ) : o("%s.push(r.%s())", l, i)) : t.basic[i] === void 0 ? o(
2844
2844
  u.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())",
2845
- c,
2845
+ l,
2846
2846
  s
2847
- ) : o("%s=r.%s()", c, i), o("break")("}");
2847
+ ) : o("%s=r.%s()", l, i), o("break")("}");
2848
2848
  }
2849
2849
  for (o("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s < n._fieldsArray.length; ++s) {
2850
2850
  var h = n._fieldsArray[s];
@@ -2869,8 +2869,8 @@ function requireVerifier() {
2869
2869
  if (s.resolvedType)
2870
2870
  if (s.resolvedType instanceof r) {
2871
2871
  o("switch(%s){", i)("default:")("return%j", e(s, "enum value"));
2872
- for (var c = Object.keys(s.resolvedType.values), h = 0; h < c.length; ++h)
2873
- o("case %i:", s.resolvedType.values[c[h]]);
2872
+ for (var l = Object.keys(s.resolvedType.values), h = 0; h < l.length; ++h)
2873
+ o("case %i:", s.resolvedType.values[l[h]]);
2874
2874
  o("break")("}");
2875
2875
  } else
2876
2876
  o("{")("var e=types[%i].verify(%s);", u, i)("if(e)")(
@@ -2920,7 +2920,7 @@ function requireVerifier() {
2920
2920
  }
2921
2921
  return o;
2922
2922
  }
2923
- function l(o, s, u) {
2923
+ function c(o, s, u) {
2924
2924
  switch (s.keyType) {
2925
2925
  case "int32":
2926
2926
  case "uint32":
@@ -2952,25 +2952,25 @@ function requireVerifier() {
2952
2952
  "object expected"
2953
2953
  ), u = o.oneofsArray, i = {};
2954
2954
  u.length && s("var p={}");
2955
- for (var c = 0; c < /* initializes */
2956
- o.fieldsArray.length; ++c) {
2957
- var h = o._fieldsArray[c].resolve(), p = "m" + t.safeProp(h.name);
2955
+ for (var l = 0; l < /* initializes */
2956
+ o.fieldsArray.length; ++l) {
2957
+ var h = o._fieldsArray[l].resolve(), p = "m" + t.safeProp(h.name);
2958
2958
  if (h.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", p, h.name), h.map)
2959
2959
  s("if(!util.isObject(%s))", p)("return%j", e(h, "object"))(
2960
2960
  "var k=Object.keys(%s)",
2961
2961
  p
2962
- )("for(var i=0;i<k.length;++i){"), l(s, h, "k[i]"), a(s, h, c, p + "[k[i]]")("}");
2962
+ )("for(var i=0;i<k.length;++i){"), c(s, h, "k[i]"), a(s, h, l, p + "[k[i]]")("}");
2963
2963
  else if (h.repeated)
2964
2964
  s("if(!Array.isArray(%s))", p)("return%j", e(h, "array"))(
2965
2965
  "for(var i=0;i<%s.length;++i){",
2966
2966
  p
2967
- ), a(s, h, c, p + "[i]")("}");
2967
+ ), a(s, h, l, p + "[i]")("}");
2968
2968
  else {
2969
2969
  if (h.partOf) {
2970
2970
  var d = t.safeProp(h.partOf.name);
2971
2971
  i[h.partOf.name] === 1 && s("if(p%s===1)", d)("return%j", h.partOf.name + ": multiple values"), i[h.partOf.name] = 1, s("p%s=1", d);
2972
2972
  }
2973
- a(s, h, c, p);
2973
+ a(s, h, l, p);
2974
2974
  }
2975
2975
  h.optional && s("}");
2976
2976
  }
@@ -2982,17 +2982,17 @@ var converter = {}, hasRequiredConverter;
2982
2982
  function requireConverter() {
2983
2983
  return hasRequiredConverter || (hasRequiredConverter = 1, function(r) {
2984
2984
  var t = r, e = require_enum(), a = requireUtil();
2985
- function l(o, s, u, i) {
2986
- var c = !1;
2985
+ function c(o, s, u, i) {
2986
+ var l = !1;
2987
2987
  if (s.resolvedType)
2988
2988
  if (s.resolvedType instanceof e) {
2989
2989
  o("switch(d%s){", i);
2990
2990
  for (var h = s.resolvedType.values, p = Object.keys(h), d = 0; d < p.length; ++d)
2991
- h[p[d]] === s.typeDefault && !c && (o("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', i, i, i), s.repeated || o(
2991
+ h[p[d]] === s.typeDefault && !l && (o("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', i, i, i), s.repeated || o(
2992
2992
  // fallback to default value only for
2993
2993
  // arrays, to avoid leaving holes.
2994
2994
  "break"
2995
- ), c = !0), o("case%j:", p[d])("case %i:", h[p[d]])("m%s=%j", i, h[p[d]])(
2995
+ ), l = !0), o("case%j:", p[d])("case %i:", h[p[d]])("m%s=%j", i, h[p[d]])(
2996
2996
  "break"
2997
2997
  );
2998
2998
  o("}");
@@ -3069,35 +3069,35 @@ function requireConverter() {
3069
3069
  );
3070
3070
  if (!u.length) return i("return new this.ctor");
3071
3071
  i("var m=new this.ctor");
3072
- for (var c = 0; c < u.length; ++c) {
3073
- var h = u[c].resolve(), p = a.safeProp(h.name);
3072
+ for (var l = 0; l < u.length; ++l) {
3073
+ var h = u[l].resolve(), p = a.safeProp(h.name);
3074
3074
  h.map ? (i("if(d%s){", p)('if(typeof d%s!=="object")', p)(
3075
3075
  "throw TypeError(%j)",
3076
3076
  h.fullName + ": object expected"
3077
- )("m%s={}", p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", p), l(
3077
+ )("m%s={}", p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", p), c(
3078
3078
  i,
3079
3079
  h,
3080
3080
  /* not sorted */
3081
- c,
3081
+ l,
3082
3082
  p + "[ks[i]]"
3083
3083
  )("}")("}")) : h.repeated ? (i("if(d%s){", p)("if(!Array.isArray(d%s))", p)(
3084
3084
  "throw TypeError(%j)",
3085
3085
  h.fullName + ": array expected"
3086
- )("m%s=[]", p)("for(var i=0;i<d%s.length;++i){", p), l(
3086
+ )("m%s=[]", p)("for(var i=0;i<d%s.length;++i){", p), c(
3087
3087
  i,
3088
3088
  h,
3089
3089
  /* not sorted */
3090
- c,
3090
+ l,
3091
3091
  p + "[i]"
3092
3092
  )("}")("}")) : (h.resolvedType instanceof e || i(
3093
3093
  // no need to test for null/undefined if an enum (uses switch)
3094
3094
  "if(d%s!=null){",
3095
3095
  p
3096
- ), l(
3096
+ ), c(
3097
3097
  i,
3098
3098
  h,
3099
3099
  /* not sorted */
3100
- c,
3100
+ l,
3101
3101
  p
3102
3102
  ), h.resolvedType instanceof e || i("}"));
3103
3103
  }
@@ -3116,14 +3116,14 @@ function requireConverter() {
3116
3116
  i
3117
3117
  ) : o("d%s=types[%i].toObject(m%s,o)", i, u, i);
3118
3118
  else {
3119
- var c = !1;
3119
+ var l = !1;
3120
3120
  switch (s.type) {
3121
3121
  case "double":
3122
3122
  case "float":
3123
3123
  o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", i, i, i, i);
3124
3124
  break;
3125
3125
  case "uint64":
3126
- c = !0;
3126
+ l = !0;
3127
3127
  // eslint-disable-next-line no-fallthrough
3128
3128
  case "int64":
3129
3129
  case "sint64":
@@ -3141,7 +3141,7 @@ function requireConverter() {
3141
3141
  i,
3142
3142
  i,
3143
3143
  i,
3144
- c ? "true" : "",
3144
+ l ? "true" : "",
3145
3145
  i
3146
3146
  );
3147
3147
  break;
@@ -3165,11 +3165,11 @@ function requireConverter() {
3165
3165
  t.toObject = function(s) {
3166
3166
  var u = s.fieldsArray.slice().sort(a.compareFieldsById);
3167
3167
  if (!u.length) return a.codegen()("return {}");
3168
- for (var i = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), c = [], h = [], p = [], d = 0; d < u.length; ++d)
3169
- u[d].partOf || (u[d].resolve().repeated ? c : u[d].map ? h : p).push(u[d]);
3170
- if (c.length) {
3171
- for (i("if(o.arrays||o.defaults){"), d = 0; d < c.length; ++d)
3172
- i("d%s=[]", a.safeProp(c[d].name));
3168
+ for (var i = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], h = [], p = [], d = 0; d < u.length; ++d)
3169
+ u[d].partOf || (u[d].resolve().repeated ? l : u[d].map ? h : p).push(u[d]);
3170
+ if (l.length) {
3171
+ for (i("if(o.arrays||o.defaults){"), d = 0; d < l.length; ++d)
3172
+ i("d%s=[]", a.safeProp(l[d].name));
3173
3173
  i("}");
3174
3174
  }
3175
3175
  if (h.length) {
@@ -3202,12 +3202,12 @@ function requireConverter() {
3202
3202
  y.typeDefault.toNumber()
3203
3203
  );
3204
3204
  else if (y.bytes) {
3205
- var T = "[" + Array.prototype.slice.call(y.typeDefault).join(",") + "]";
3205
+ var _ = "[" + Array.prototype.slice.call(y.typeDefault).join(",") + "]";
3206
3206
  i(
3207
3207
  "if(o.bytes===String)d%s=%j",
3208
3208
  g,
3209
3209
  String.fromCharCode.apply(String, y.typeDefault)
3210
- )("else{")("d%s=%s", g, T)(
3210
+ )("else{")("d%s=%s", g, _)(
3211
3211
  "if(o.bytes!==Array)d%s=util.newBuffer(d%s)",
3212
3212
  g,
3213
3213
  g
@@ -3216,10 +3216,10 @@ function requireConverter() {
3216
3216
  }
3217
3217
  i("}");
3218
3218
  }
3219
- var _ = !1;
3219
+ var w = !1;
3220
3220
  for (d = 0; d < u.length; ++d) {
3221
3221
  var y = u[d], m = s._fieldsArray.indexOf(y), g = a.safeProp(y.name);
3222
- y.map ? (_ || (_ = !0, i("var ks2")), i("if(m%s&&(ks2=Object.keys(m%s)).length){", g, g)("d%s={}", g)(
3222
+ y.map ? (w || (w = !0, i("var ks2")), i("if(m%s&&(ks2=Object.keys(m%s)).length){", g, g)("d%s={}", g)(
3223
3223
  "for(var j=0;j<ks2.length;++j){"
3224
3224
  ), n(
3225
3225
  i,
@@ -3254,7 +3254,7 @@ var wrappers = {};
3254
3254
  t[".google.protobuf.Any"] = {
3255
3255
  fromObject: function(a) {
3256
3256
  if (a && a["@type"]) {
3257
- var l = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), n = this.lookup(l);
3257
+ var c = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), n = this.lookup(c);
3258
3258
  if (n) {
3259
3259
  var o = a["@type"].charAt(0) === "." ? a["@type"].slice(1) : a["@type"];
3260
3260
  return o.indexOf("/") === -1 && (o = "/" + o), this.create({
@@ -3265,18 +3265,18 @@ var wrappers = {};
3265
3265
  }
3266
3266
  return this.fromObject(a);
3267
3267
  },
3268
- toObject: function(a, l) {
3268
+ toObject: function(a, c) {
3269
3269
  var n = "type.googleapis.com/", o = "", s = "";
3270
- if (l && l.json && a.type_url && a.value) {
3270
+ if (c && c.json && a.type_url && a.value) {
3271
3271
  s = a.type_url.substring(a.type_url.lastIndexOf("/") + 1), o = a.type_url.substring(0, a.type_url.lastIndexOf("/") + 1);
3272
3272
  var u = this.lookup(s);
3273
3273
  u && (a = u.decode(a.value));
3274
3274
  }
3275
3275
  if (!(a instanceof this.ctor) && a instanceof e) {
3276
- var i = a.$type.toObject(a, l), c = a.$type.fullName[0] === "." ? a.$type.fullName.slice(1) : a.$type.fullName;
3277
- return o === "" && (o = n), s = o + c, i["@type"] = s, i;
3276
+ var i = a.$type.toObject(a, c), l = a.$type.fullName[0] === "." ? a.$type.fullName.slice(1) : a.$type.fullName;
3277
+ return o === "" && (o = n), s = o + l, i["@type"] = s, i;
3278
3278
  }
3279
- return this.toObject(a, l);
3279
+ return this.toObject(a, c);
3280
3280
  }
3281
3281
  };
3282
3282
  })(wrappers);
@@ -3286,9 +3286,9 @@ function requireType() {
3286
3286
  hasRequiredType = 1, type = g;
3287
3287
  var r = requireNamespace();
3288
3288
  ((g.prototype = Object.create(r.prototype)).constructor = g).className = "Type";
3289
- var t = require_enum(), e = requireOneof(), a = requireField(), l = requireMapfield(), n = requireService(), o = message, s = reader, u = writer, i = requireUtil(), c = requireEncoder(), h = requireDecoder(), p = requireVerifier(), d = requireConverter(), y = wrappers;
3290
- function g(_, m) {
3291
- r.call(this, _, m), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
3289
+ var t = require_enum(), e = requireOneof(), a = requireField(), c = requireMapfield(), n = requireService(), o = message, s = reader, u = writer, i = requireUtil(), l = requireEncoder(), h = requireDecoder(), p = requireVerifier(), d = requireConverter(), y = wrappers;
3290
+ function g(w, m) {
3291
+ r.call(this, w, m), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
3292
3292
  }
3293
3293
  Object.defineProperties(g.prototype, {
3294
3294
  /**
@@ -3301,8 +3301,8 @@ function requireType() {
3301
3301
  get: function() {
3302
3302
  if (this._fieldsById) return this._fieldsById;
3303
3303
  this._fieldsById = {};
3304
- for (var _ = Object.keys(this.fields), m = 0; m < _.length; ++m) {
3305
- var b = this.fields[_[m]], v = b.id;
3304
+ for (var w = Object.keys(this.fields), m = 0; m < w.length; ++m) {
3305
+ var b = this.fields[w[m]], v = b.id;
3306
3306
  if (this._fieldsById[v]) throw Error("duplicate id " + v + " in " + this);
3307
3307
  this._fieldsById[v] = b;
3308
3308
  }
@@ -3341,9 +3341,9 @@ function requireType() {
3341
3341
  get: function() {
3342
3342
  return this._ctor || (this.ctor = g.generateConstructor(this)());
3343
3343
  },
3344
- set: function(_) {
3345
- var m = _.prototype;
3346
- m instanceof o || ((_.prototype = new o()).constructor = _, i.merge(_.prototype, m)), _.$type = _.prototype.$type = this, i.merge(_, o, !0), this._ctor = _;
3344
+ set: function(w) {
3345
+ var m = w.prototype;
3346
+ m instanceof o || ((w.prototype = new o()).constructor = w, i.merge(w.prototype, m)), w.$type = w.prototype.$type = this, i.merge(w, o, !0), this._ctor = w;
3347
3347
  for (var b = 0; b < /* initializes */
3348
3348
  this.fieldsArray.length; ++b) this._fieldsArray[b].resolve();
3349
3349
  var v = {};
@@ -3353,39 +3353,39 @@ function requireType() {
3353
3353
  get: i.oneOfGetter(this._oneofsArray[b].oneof),
3354
3354
  set: i.oneOfSetter(this._oneofsArray[b].oneof)
3355
3355
  };
3356
- b && Object.defineProperties(_.prototype, v);
3356
+ b && Object.defineProperties(w.prototype, v);
3357
3357
  }
3358
3358
  }
3359
3359
  }), g.generateConstructor = function(m) {
3360
- for (var b = i.codegen(["p"], m.name), v = 0, x; v < m.fieldsArray.length; ++v)
3361
- (x = m._fieldsArray[v]).map ? b("this%s={}", i.safeProp(x.name)) : x.repeated && b("this%s=[]", i.safeProp(x.name));
3360
+ for (var b = i.codegen(["p"], m.name), v = 0, E; v < m.fieldsArray.length; ++v)
3361
+ (E = m._fieldsArray[v]).map ? b("this%s={}", i.safeProp(E.name)) : E.repeated && b("this%s=[]", i.safeProp(E.name));
3362
3362
  return b("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")(
3363
3363
  // omit undefined or null
3364
3364
  "this[ks[i]]=p[ks[i]]"
3365
3365
  );
3366
3366
  };
3367
- function T(_) {
3368
- return _._fieldsById = _._fieldsArray = _._oneofsArray = null, delete _.encode, delete _.decode, delete _.verify, _;
3367
+ function _(w) {
3368
+ return w._fieldsById = w._fieldsArray = w._oneofsArray = null, delete w.encode, delete w.decode, delete w.verify, w;
3369
3369
  }
3370
3370
  return g.fromJSON = function(m, b) {
3371
3371
  var v = new g(m, b.options);
3372
3372
  v.extensions = b.extensions, v.reserved = b.reserved;
3373
- for (var x = Object.keys(b.fields), O = 0; O < x.length; ++O)
3373
+ for (var E = Object.keys(b.fields), T = 0; T < E.length; ++T)
3374
3374
  v.add(
3375
- (typeof b.fields[x[O]].keyType < "u" ? l.fromJSON : a.fromJSON)(
3376
- x[O],
3377
- b.fields[x[O]]
3375
+ (typeof b.fields[E[T]].keyType < "u" ? c.fromJSON : a.fromJSON)(
3376
+ E[T],
3377
+ b.fields[E[T]]
3378
3378
  )
3379
3379
  );
3380
3380
  if (b.oneofs)
3381
- for (x = Object.keys(b.oneofs), O = 0; O < x.length; ++O)
3382
- v.add(e.fromJSON(x[O], b.oneofs[x[O]]));
3381
+ for (E = Object.keys(b.oneofs), T = 0; T < E.length; ++T)
3382
+ v.add(e.fromJSON(E[T], b.oneofs[E[T]]));
3383
3383
  if (b.nested)
3384
- for (x = Object.keys(b.nested), O = 0; O < x.length; ++O) {
3385
- var E = b.nested[x[O]];
3384
+ for (E = Object.keys(b.nested), T = 0; T < E.length; ++T) {
3385
+ var R = b.nested[E[T]];
3386
3386
  v.add(
3387
3387
  // most to least likely
3388
- (E.id !== void 0 ? a.fromJSON : E.fields !== void 0 ? g.fromJSON : E.values !== void 0 ? t.fromJSON : E.methods !== void 0 ? n.fromJSON : r.fromJSON)(x[O], E)
3388
+ (R.id !== void 0 ? a.fromJSON : R.fields !== void 0 ? g.fromJSON : R.values !== void 0 ? t.fromJSON : R.methods !== void 0 ? n.fromJSON : r.fromJSON)(E[T], R)
3389
3389
  );
3390
3390
  }
3391
3391
  return b.extensions && b.extensions.length && (v.extensions = b.extensions), b.reserved && b.reserved.length && (v.reserved = b.reserved), b.group && (v.group = !0), b.comment && (v.comment = b.comment), v;
@@ -3398,8 +3398,8 @@ function requireType() {
3398
3398
  r.arrayToJSON(this.oneofsArray, m),
3399
3399
  "fields",
3400
3400
  r.arrayToJSON(
3401
- this.fieldsArray.filter(function(x) {
3402
- return !x.declaringField;
3401
+ this.fieldsArray.filter(function(E) {
3402
+ return !E.declaringField;
3403
3403
  }),
3404
3404
  m
3405
3405
  ) || {},
@@ -3432,19 +3432,19 @@ function requireType() {
3432
3432
  if (this.isReservedId(m.id)) throw Error("id " + m.id + " is reserved in " + this);
3433
3433
  if (this.isReservedName(m.name))
3434
3434
  throw Error("name '" + m.name + "' is reserved in " + this);
3435
- return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), T(this);
3435
+ return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), _(this);
3436
3436
  }
3437
- return m instanceof e ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), T(this)) : r.prototype.add.call(this, m);
3437
+ return m instanceof e ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), _(this)) : r.prototype.add.call(this, m);
3438
3438
  }, g.prototype.remove = function(m) {
3439
3439
  if (m instanceof a && m.extend === void 0) {
3440
3440
  if (!this.fields || this.fields[m.name] !== m)
3441
3441
  throw Error(m + " is not a member of " + this);
3442
- return delete this.fields[m.name], m.parent = null, m.onRemove(this), T(this);
3442
+ return delete this.fields[m.name], m.parent = null, m.onRemove(this), _(this);
3443
3443
  }
3444
3444
  if (m instanceof e) {
3445
3445
  if (!this.oneofs || this.oneofs[m.name] !== m)
3446
3446
  throw Error(m + " is not a member of " + this);
3447
- return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), T(this);
3447
+ return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), _(this);
3448
3448
  }
3449
3449
  return r.prototype.remove.call(this, m);
3450
3450
  }, g.prototype.isReservedId = function(m) {
@@ -3457,7 +3457,7 @@ function requireType() {
3457
3457
  for (var m = this.fullName, b = [], v = 0; v < /* initializes */
3458
3458
  this.fieldsArray.length; ++v)
3459
3459
  b.push(this._fieldsArray[v].resolve().resolvedType);
3460
- this.encode = c(this)({
3460
+ this.encode = l(this)({
3461
3461
  Writer: u,
3462
3462
  types: b,
3463
3463
  util: i
@@ -3475,10 +3475,10 @@ function requireType() {
3475
3475
  types: b,
3476
3476
  util: i
3477
3477
  });
3478
- var x = y[m];
3479
- if (x) {
3480
- var O = Object.create(this);
3481
- O.fromObject = this.fromObject, this.fromObject = x.fromObject.bind(O), O.toObject = this.toObject, this.toObject = x.toObject.bind(O);
3478
+ var E = y[m];
3479
+ if (E) {
3480
+ var T = Object.create(this);
3481
+ T.fromObject = this.fromObject, this.fromObject = E.fromObject.bind(T), T.toObject = this.toObject, this.toObject = E.toObject.bind(T);
3482
3482
  }
3483
3483
  return this;
3484
3484
  }, g.prototype.encode = function(m, b) {
@@ -3507,90 +3507,90 @@ function requireRoot() {
3507
3507
  hasRequiredRoot = 1, root$1 = u;
3508
3508
  var r = requireNamespace();
3509
3509
  ((u.prototype = Object.create(r.prototype)).constructor = u).className = "Root";
3510
- var t = requireField(), e = require_enum(), a = requireOneof(), l = requireUtil(), n, o, s;
3510
+ var t = requireField(), e = require_enum(), a = requireOneof(), c = requireUtil(), n, o, s;
3511
3511
  function u(p) {
3512
3512
  r.call(this, "", p), this.deferred = [], this.files = [];
3513
3513
  }
3514
3514
  u.fromJSON = function(d, y) {
3515
3515
  return y || (y = new u()), d.options && y.setOptions(d.options), y.addJSON(d.nested);
3516
- }, u.prototype.resolvePath = l.path.resolve, u.prototype.fetch = l.fetch;
3516
+ }, u.prototype.resolvePath = c.path.resolve, u.prototype.fetch = c.fetch;
3517
3517
  function i() {
3518
3518
  }
3519
3519
  u.prototype.load = function p(d, y, g) {
3520
3520
  typeof y == "function" && (g = y, y = void 0);
3521
- var T = this;
3522
- if (!g) return l.asPromise(p, T, d, y);
3523
- var _ = g === i;
3524
- function m(S, $) {
3521
+ var _ = this;
3522
+ if (!g) return c.asPromise(p, _, d, y);
3523
+ var w = g === i;
3524
+ function m(A, $) {
3525
3525
  if (g) {
3526
- if (_) throw S;
3526
+ if (w) throw A;
3527
3527
  var k = g;
3528
- g = null, k(S, $);
3528
+ g = null, k(A, $);
3529
3529
  }
3530
3530
  }
3531
- function b(S) {
3532
- var $ = S.lastIndexOf("google/protobuf/");
3531
+ function b(A) {
3532
+ var $ = A.lastIndexOf("google/protobuf/");
3533
3533
  if ($ > -1) {
3534
- var k = S.substring($);
3534
+ var k = A.substring($);
3535
3535
  if (k in s) return k;
3536
3536
  }
3537
3537
  return null;
3538
3538
  }
3539
- function v(S, $) {
3539
+ function v(A, $) {
3540
3540
  try {
3541
- if (l.isString($) && $.charAt(0) === "{" && ($ = JSON.parse($)), !l.isString($)) T.setOptions($.options).addJSON($.nested);
3541
+ if (c.isString($) && $.charAt(0) === "{" && ($ = JSON.parse($)), !c.isString($)) _.setOptions($.options).addJSON($.nested);
3542
3542
  else {
3543
- o.filename = S;
3544
- var k = o($, T, y), D, M = 0;
3543
+ o.filename = A;
3544
+ var k = o($, _, y), D, M = 0;
3545
3545
  if (k.imports)
3546
3546
  for (; M < k.imports.length; ++M)
3547
- (D = b(k.imports[M]) || T.resolvePath(S, k.imports[M])) && x(D);
3547
+ (D = b(k.imports[M]) || _.resolvePath(A, k.imports[M])) && E(D);
3548
3548
  if (k.weakImports)
3549
3549
  for (M = 0; M < k.weakImports.length; ++M)
3550
- (D = b(k.weakImports[M]) || T.resolvePath(S, k.weakImports[M])) && x(D, !0);
3550
+ (D = b(k.weakImports[M]) || _.resolvePath(A, k.weakImports[M])) && E(D, !0);
3551
3551
  }
3552
3552
  } catch (L) {
3553
3553
  m(L);
3554
3554
  }
3555
- !_ && !O && m(null, T);
3555
+ !w && !T && m(null, _);
3556
3556
  }
3557
- function x(S, $) {
3558
- if (S = b(S) || S, !(T.files.indexOf(S) > -1)) {
3559
- if (T.files.push(S), S in s) {
3560
- _ ? v(S, s[S]) : (++O, setTimeout(function() {
3561
- --O, v(S, s[S]);
3557
+ function E(A, $) {
3558
+ if (A = b(A) || A, !(_.files.indexOf(A) > -1)) {
3559
+ if (_.files.push(A), A in s) {
3560
+ w ? v(A, s[A]) : (++T, setTimeout(function() {
3561
+ --T, v(A, s[A]);
3562
3562
  }));
3563
3563
  return;
3564
3564
  }
3565
- if (_) {
3565
+ if (w) {
3566
3566
  var k;
3567
3567
  try {
3568
- k = l.fs.readFileSync(S).toString("utf8");
3568
+ k = c.fs.readFileSync(A).toString("utf8");
3569
3569
  } catch (D) {
3570
3570
  $ || m(D);
3571
3571
  return;
3572
3572
  }
3573
- v(S, k);
3573
+ v(A, k);
3574
3574
  } else
3575
- ++O, T.fetch(S, function(D, M) {
3576
- if (--O, !!g) {
3575
+ ++T, _.fetch(A, function(D, M) {
3576
+ if (--T, !!g) {
3577
3577
  if (D) {
3578
- $ ? O || m(null, T) : m(D);
3578
+ $ ? T || m(null, _) : m(D);
3579
3579
  return;
3580
3580
  }
3581
- v(S, M);
3581
+ v(A, M);
3582
3582
  }
3583
3583
  });
3584
3584
  }
3585
3585
  }
3586
- var O = 0;
3587
- l.isString(d) && (d = [d]);
3588
- for (var E = 0, q; E < d.length; ++E)
3589
- (q = T.resolvePath("", d[E])) && x(q);
3590
- if (_) return T;
3591
- O || m(null, T);
3586
+ var T = 0;
3587
+ c.isString(d) && (d = [d]);
3588
+ for (var R = 0, q; R < d.length; ++R)
3589
+ (q = _.resolvePath("", d[R])) && E(q);
3590
+ if (w) return _;
3591
+ T || m(null, _);
3592
3592
  }, u.prototype.loadSync = function(d, y) {
3593
- if (!l.isNode) throw Error("not supported");
3593
+ if (!c.isNode) throw Error("not supported");
3594
3594
  return this.load(d, y, i);
3595
3595
  }, u.prototype.resolveAll = function() {
3596
3596
  if (this.deferred.length)
@@ -3601,7 +3601,7 @@ function requireRoot() {
3601
3601
  );
3602
3602
  return r.prototype.resolveAll.call(this);
3603
3603
  };
3604
- var c = /^[A-Z]/;
3604
+ var l = /^[A-Z]/;
3605
3605
  function h(p, d) {
3606
3606
  var y = d.parent.lookup(d.extend);
3607
3607
  if (y) {
@@ -3623,7 +3623,7 @@ function requireRoot() {
3623
3623
  d.extend !== void 0 && /* not already handled */
3624
3624
  !d.extensionField && (h(this, d) || this.deferred.push(d));
3625
3625
  else if (d instanceof e)
3626
- c.test(d.name) && (d.parent[d.name] = d.values);
3626
+ l.test(d.name) && (d.parent[d.name] = d.values);
3627
3627
  else if (!(d instanceof a)) {
3628
3628
  if (d instanceof n)
3629
3629
  for (var y = 0; y < this.deferred.length; )
@@ -3631,7 +3631,7 @@ function requireRoot() {
3631
3631
  for (var g = 0; g < /* initializes */
3632
3632
  d.nestedArray.length; ++g)
3633
3633
  this._handleAdd(d._nestedArray[g]);
3634
- c.test(d.name) && (d.parent[d.name] = d);
3634
+ l.test(d.name) && (d.parent[d.name] = d);
3635
3635
  }
3636
3636
  }, u.prototype._handleRemove = function(d) {
3637
3637
  if (d instanceof t) {
@@ -3649,12 +3649,12 @@ function requireRoot() {
3649
3649
  y > -1 && this.deferred.splice(y, 1);
3650
3650
  }
3651
3651
  } else if (d instanceof e)
3652
- c.test(d.name) && delete d.parent[d.name];
3652
+ l.test(d.name) && delete d.parent[d.name];
3653
3653
  else if (d instanceof r) {
3654
3654
  for (var g = 0; g < /* initializes */
3655
3655
  d.nestedArray.length; ++g)
3656
3656
  this._handleRemove(d._nestedArray[g]);
3657
- c.test(d.name) && delete d.parent[d.name];
3657
+ l.test(d.name) && delete d.parent[d.name];
3658
3658
  }
3659
3659
  }, u._configure = function(p, d, y) {
3660
3660
  n = p, o = d, s = y;
@@ -3667,39 +3667,39 @@ function requireUtil() {
3667
3667
  var r = util$2.exports = requireMinimal(), t = roots, e, a;
3668
3668
  r.codegen = codegen_1, r.fetch = fetch_1, r.path = path, r.fs = r.inquire("fs"), r.toArray = function(i) {
3669
3669
  if (i) {
3670
- for (var c = Object.keys(i), h = new Array(c.length), p = 0; p < c.length; ) h[p] = i[c[p++]];
3670
+ for (var l = Object.keys(i), h = new Array(l.length), p = 0; p < l.length; ) h[p] = i[l[p++]];
3671
3671
  return h;
3672
3672
  }
3673
3673
  return [];
3674
3674
  }, r.toObject = function(i) {
3675
- for (var c = {}, h = 0; h < i.length; ) {
3675
+ for (var l = {}, h = 0; h < i.length; ) {
3676
3676
  var p = i[h++], d = i[h++];
3677
- d !== void 0 && (c[p] = d);
3677
+ d !== void 0 && (l[p] = d);
3678
3678
  }
3679
- return c;
3679
+ return l;
3680
3680
  };
3681
- var l = /\\/g, n = /"/g;
3681
+ var c = /\\/g, n = /"/g;
3682
3682
  r.isReserved = function(i) {
3683
3683
  return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(
3684
3684
  i
3685
3685
  );
3686
3686
  }, r.safeProp = function(i) {
3687
- return !/^[$\w_]+$/.test(i) || r.isReserved(i) ? '["' + i.replace(l, "\\\\").replace(n, '\\"') + '"]' : "." + i;
3687
+ return !/^[$\w_]+$/.test(i) || r.isReserved(i) ? '["' + i.replace(c, "\\\\").replace(n, '\\"') + '"]' : "." + i;
3688
3688
  }, r.ucFirst = function(i) {
3689
3689
  return i.charAt(0).toUpperCase() + i.substring(1);
3690
3690
  };
3691
3691
  var o = /_([a-z])/g;
3692
3692
  r.camelCase = function(i) {
3693
- return i.substring(0, 1) + i.substring(1).replace(o, function(c, h) {
3693
+ return i.substring(0, 1) + i.substring(1).replace(o, function(l, h) {
3694
3694
  return h.toUpperCase();
3695
3695
  });
3696
- }, r.compareFieldsById = function(i, c) {
3697
- return i.id - c.id;
3698
- }, r.decorateType = function(i, c) {
3696
+ }, r.compareFieldsById = function(i, l) {
3697
+ return i.id - l.id;
3698
+ }, r.decorateType = function(i, l) {
3699
3699
  if (i.$type)
3700
- return c && i.$type.name !== c && (r.decorateRoot.remove(i.$type), i.$type.name = c, r.decorateRoot.add(i.$type)), i.$type;
3700
+ return l && i.$type.name !== l && (r.decorateRoot.remove(i.$type), i.$type.name = l, r.decorateRoot.add(i.$type)), i.$type;
3701
3701
  e || (e = requireType());
3702
- var h = new e(c || i.name);
3702
+ var h = new e(l || i.name);
3703
3703
  return r.decorateRoot.add(h), h.ctor = i, Object.defineProperty(i, "$type", {
3704
3704
  value: h,
3705
3705
  enumerable: !1
@@ -3712,27 +3712,27 @@ function requireUtil() {
3712
3712
  return r.decorateEnum = function(i) {
3713
3713
  if (i.$type) return i.$type;
3714
3714
  a || (a = require_enum());
3715
- var c = new a("Enum" + s++, i);
3716
- return r.decorateRoot.add(c), Object.defineProperty(i, "$type", {
3717
- value: c,
3715
+ var l = new a("Enum" + s++, i);
3716
+ return r.decorateRoot.add(l), Object.defineProperty(i, "$type", {
3717
+ value: l,
3718
3718
  enumerable: !1
3719
- }), c;
3720
- }, r.setProperty = function(i, c, h) {
3719
+ }), l;
3720
+ }, r.setProperty = function(i, l, h) {
3721
3721
  function p(d, y, g) {
3722
- var T = y.shift();
3723
- if (T === "__proto__" || T === "prototype")
3722
+ var _ = y.shift();
3723
+ if (_ === "__proto__" || _ === "prototype")
3724
3724
  return d;
3725
3725
  if (y.length > 0)
3726
- d[T] = p(d[T] || {}, y, g);
3726
+ d[_] = p(d[_] || {}, y, g);
3727
3727
  else {
3728
- var _ = d[T];
3729
- _ && (g = [].concat(_).concat(g)), d[T] = g;
3728
+ var w = d[_];
3729
+ w && (g = [].concat(w).concat(g)), d[_] = g;
3730
3730
  }
3731
3731
  return d;
3732
3732
  }
3733
3733
  if (typeof i != "object") throw TypeError("dst must be an object");
3734
- if (!c) throw TypeError("path must be specified");
3735
- return c = c.split("."), p(i, c, h);
3734
+ if (!l) throw TypeError("path must be specified");
3735
+ return l = l.split("."), p(i, l, h);
3736
3736
  }, Object.defineProperty(r, "decorateRoot", {
3737
3737
  get: function() {
3738
3738
  return t.decorated || (t.decorated = new (requireRoot())());
@@ -3744,10 +3744,10 @@ function requireObject() {
3744
3744
  if (hasRequiredObject) return object;
3745
3745
  hasRequiredObject = 1, object = e, e.className = "ReflectionObject";
3746
3746
  var r = requireUtil(), t;
3747
- function e(a, l) {
3747
+ function e(a, c) {
3748
3748
  if (!r.isString(a)) throw TypeError("name must be a string");
3749
- if (l && !r.isObject(l)) throw TypeError("options must be an object");
3750
- this.options = l, this.parsedOptions = null, this.name = a, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3749
+ if (c && !r.isObject(c)) throw TypeError("options must be an object");
3750
+ this.options = c, this.parsedOptions = null, this.name = a, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3751
3751
  }
3752
3752
  return Object.defineProperties(e.prototype, {
3753
3753
  /**
@@ -3770,52 +3770,52 @@ function requireObject() {
3770
3770
  */
3771
3771
  fullName: {
3772
3772
  get: function() {
3773
- for (var a = [this.name], l = this.parent; l; )
3774
- a.unshift(l.name), l = l.parent;
3773
+ for (var a = [this.name], c = this.parent; c; )
3774
+ a.unshift(c.name), c = c.parent;
3775
3775
  return a.join(".");
3776
3776
  }
3777
3777
  }
3778
3778
  }), e.prototype.toJSON = /* istanbul ignore next */
3779
3779
  function() {
3780
3780
  throw Error();
3781
- }, e.prototype.onAdd = function(l) {
3782
- this.parent && this.parent !== l && this.parent.remove(this), this.parent = l, this.resolved = !1;
3783
- var n = l.root;
3781
+ }, e.prototype.onAdd = function(c) {
3782
+ this.parent && this.parent !== c && this.parent.remove(this), this.parent = c, this.resolved = !1;
3783
+ var n = c.root;
3784
3784
  n instanceof t && n._handleAdd(this);
3785
- }, e.prototype.onRemove = function(l) {
3786
- var n = l.root;
3785
+ }, e.prototype.onRemove = function(c) {
3786
+ var n = c.root;
3787
3787
  n instanceof t && n._handleRemove(this), this.parent = null, this.resolved = !1;
3788
3788
  }, e.prototype.resolve = function() {
3789
3789
  return this.resolved ? this : (this.root instanceof t && (this.resolved = !0), this);
3790
- }, e.prototype.getOption = function(l) {
3791
- if (this.options) return this.options[l];
3792
- }, e.prototype.setOption = function(l, n, o) {
3793
- return (!o || !this.options || this.options[l] === void 0) && ((this.options || (this.options = {}))[l] = n), this;
3794
- }, e.prototype.setParsedOption = function(l, n, o) {
3790
+ }, e.prototype.getOption = function(c) {
3791
+ if (this.options) return this.options[c];
3792
+ }, e.prototype.setOption = function(c, n, o) {
3793
+ return (!o || !this.options || this.options[c] === void 0) && ((this.options || (this.options = {}))[c] = n), this;
3794
+ }, e.prototype.setParsedOption = function(c, n, o) {
3795
3795
  this.parsedOptions || (this.parsedOptions = []);
3796
3796
  var s = this.parsedOptions;
3797
3797
  if (o) {
3798
3798
  var u = s.find(function(h) {
3799
- return Object.prototype.hasOwnProperty.call(h, l);
3799
+ return Object.prototype.hasOwnProperty.call(h, c);
3800
3800
  });
3801
3801
  if (u) {
3802
- var i = u[l];
3802
+ var i = u[c];
3803
3803
  r.setProperty(i, o, n);
3804
3804
  } else
3805
- u = {}, u[l] = r.setProperty({}, o, n), s.push(u);
3805
+ u = {}, u[c] = r.setProperty({}, o, n), s.push(u);
3806
3806
  } else {
3807
- var c = {};
3808
- c[l] = n, s.push(c);
3807
+ var l = {};
3808
+ l[c] = n, s.push(l);
3809
3809
  }
3810
3810
  return this;
3811
- }, e.prototype.setOptions = function(l, n) {
3812
- if (l)
3813
- for (var o = Object.keys(l), s = 0; s < o.length; ++s)
3814
- this.setOption(o[s], l[o[s]], n);
3811
+ }, e.prototype.setOptions = function(c, n) {
3812
+ if (c)
3813
+ for (var o = Object.keys(c), s = 0; s < o.length; ++s)
3814
+ this.setOption(o[s], c[o[s]], n);
3815
3815
  return this;
3816
3816
  }, e.prototype.toString = function() {
3817
- var l = this.constructor.className, n = this.fullName;
3818
- return n.length ? l + " " + n : l;
3817
+ var c = this.constructor.className, n = this.fullName;
3818
+ return n.length ? c + " " + n : c;
3819
3819
  }, e._configure = function(a) {
3820
3820
  t = a;
3821
3821
  }, object;
@@ -3827,11 +3827,11 @@ function require_enum() {
3827
3827
  var r = requireObject();
3828
3828
  ((a.prototype = Object.create(r.prototype)).constructor = a).className = "Enum";
3829
3829
  var t = requireNamespace(), e = requireUtil();
3830
- function a(l, n, o, s, u, i) {
3831
- if (r.call(this, l, o), n && typeof n != "object") throw TypeError("values must be an object");
3830
+ function a(c, n, o, s, u, i) {
3831
+ if (r.call(this, c, o), n && typeof n != "object") throw TypeError("values must be an object");
3832
3832
  if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = u || {}, this.valuesOptions = i, this.reserved = void 0, n)
3833
- for (var c = Object.keys(n), h = 0; h < c.length; ++h)
3834
- typeof n[c[h]] == "number" && (this.valuesById[this.values[c[h]] = n[c[h]]] = c[h]);
3833
+ for (var l = Object.keys(n), h = 0; h < l.length; ++h)
3834
+ typeof n[l[h]] == "number" && (this.valuesById[this.values[l[h]] = n[l[h]]] = l[h]);
3835
3835
  }
3836
3836
  return a.fromJSON = function(n, o) {
3837
3837
  var s = new a(n, o.values, o.options, o.comment, o.comments);
@@ -3878,7 +3878,7 @@ function require_enum() {
3878
3878
  var encoder_1, hasRequiredEncoder;
3879
3879
  function requireEncoder() {
3880
3880
  if (hasRequiredEncoder) return encoder_1;
3881
- hasRequiredEncoder = 1, encoder_1 = l;
3881
+ hasRequiredEncoder = 1, encoder_1 = c;
3882
3882
  var r = require_enum(), t = requireTypes(), e = requireUtil();
3883
3883
  function a(n, o, s, u) {
3884
3884
  return o.resolvedType.group ? n(
@@ -3894,33 +3894,33 @@ function requireEncoder() {
3894
3894
  (o.id << 3 | 2) >>> 0
3895
3895
  );
3896
3896
  }
3897
- function l(n) {
3897
+ function c(n) {
3898
3898
  for (var o = e.codegen(["m", "w"], n.name + "$encode")("if(!w)")("w=Writer.create()"), s, u, i = (
3899
3899
  /* initializes */
3900
3900
  n.fieldsArray.slice().sort(e.compareFieldsById)
3901
3901
  ), s = 0; s < i.length; ++s) {
3902
- var c = i[s].resolve(), h = n._fieldsArray.indexOf(c), p = c.resolvedType instanceof r ? "int32" : c.type, d = t.basic[p];
3903
- u = "m" + e.safeProp(c.name), c.map ? (o(
3902
+ var l = i[s].resolve(), h = n._fieldsArray.indexOf(l), p = l.resolvedType instanceof r ? "int32" : l.type, d = t.basic[p];
3903
+ u = "m" + e.safeProp(l.name), l.map ? (o(
3904
3904
  "if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",
3905
3905
  u,
3906
- c.name
3906
+ l.name
3907
3907
  )(
3908
3908
  // !== undefined && !== null
3909
3909
  "for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",
3910
3910
  u
3911
3911
  )(
3912
3912
  "w.uint32(%i).fork().uint32(%i).%s(ks[i])",
3913
- (c.id << 3 | 2) >>> 0,
3914
- 8 | t.mapKey[c.keyType],
3915
- c.keyType
3916
- ), d === void 0 ? o("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", h, u) : o(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | d, p, u), o("}")("}")) : c.repeated ? (o("if(%s!=null&&%s.length){", u, u), c.packed && t.packed[p] !== void 0 ? o("w.uint32(%i).fork()", (c.id << 3 | 2) >>> 0)(
3913
+ (l.id << 3 | 2) >>> 0,
3914
+ 8 | t.mapKey[l.keyType],
3915
+ l.keyType
3916
+ ), d === void 0 ? o("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", h, u) : o(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | d, p, u), o("}")("}")) : l.repeated ? (o("if(%s!=null&&%s.length){", u, u), l.packed && t.packed[p] !== void 0 ? o("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)(
3917
3917
  "for(var i=0;i<%s.length;++i)",
3918
3918
  u
3919
3919
  )(
3920
3920
  "w.%s(%s[i])",
3921
3921
  p,
3922
3922
  u
3923
- )("w.ldelim()") : (o("for(var i=0;i<%s.length;++i)", u), d === void 0 ? a(o, c, h, u + "[i]") : o("w.uint32(%i).%s(%s[i])", (c.id << 3 | d) >>> 0, p, u)), o("}")) : (c.optional && o("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", u, c.name), d === void 0 ? a(o, c, h, u) : o("w.uint32(%i).%s(%s)", (c.id << 3 | d) >>> 0, p, u));
3923
+ )("w.ldelim()") : (o("for(var i=0;i<%s.length;++i)", u), d === void 0 ? a(o, l, h, u + "[i]") : o("w.uint32(%i).%s(%s[i])", (l.id << 3 | d) >>> 0, p, u)), o("}")) : (l.optional && o("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", u, l.name), d === void 0 ? a(o, l, h, u) : o("w.uint32(%i).%s(%s)", (l.id << 3 | d) >>> 0, p, u));
3924
3924
  }
3925
3925
  return o("return w");
3926
3926
  }
@@ -3979,89 +3979,89 @@ function unescape(r) {
3979
3979
  tokenize$1.unescape = unescape;
3980
3980
  function tokenize$1(r, t) {
3981
3981
  r = r.toString();
3982
- var e = 0, a = r.length, l = 1, n = 0, o = {}, s = [], u = null;
3982
+ var e = 0, a = r.length, c = 1, n = 0, o = {}, s = [], u = null;
3983
3983
  function i(v) {
3984
- return Error("illegal " + v + " (line " + l + ")");
3984
+ return Error("illegal " + v + " (line " + c + ")");
3985
3985
  }
3986
- function c() {
3986
+ function l() {
3987
3987
  var v = u === "'" ? stringSingleRe : stringDoubleRe;
3988
3988
  v.lastIndex = e - 1;
3989
- var x = v.exec(r);
3990
- if (!x) throw i("string");
3991
- return e = v.lastIndex, T(u), u = null, unescape(x[1]);
3989
+ var E = v.exec(r);
3990
+ if (!E) throw i("string");
3991
+ return e = v.lastIndex, _(u), u = null, unescape(E[1]);
3992
3992
  }
3993
3993
  function h(v) {
3994
3994
  return r.charAt(v);
3995
3995
  }
3996
- function p(v, x, O) {
3997
- var E = {
3996
+ function p(v, E, T) {
3997
+ var R = {
3998
3998
  type: r.charAt(v++),
3999
3999
  lineEmpty: !1,
4000
- leading: O
4000
+ leading: T
4001
4001
  }, q;
4002
4002
  t ? q = 2 : q = 3;
4003
- var S = v - q, $;
4003
+ var A = v - q, $;
4004
4004
  do
4005
- if (--S < 0 || ($ = r.charAt(S)) === `
4005
+ if (--A < 0 || ($ = r.charAt(A)) === `
4006
4006
  `) {
4007
- E.lineEmpty = !0;
4007
+ R.lineEmpty = !0;
4008
4008
  break;
4009
4009
  }
4010
4010
  while ($ === " " || $ === " ");
4011
- for (var k = r.substring(v, x).split(setCommentSplitRe), D = 0; D < k.length; ++D)
4011
+ for (var k = r.substring(v, E).split(setCommentSplitRe), D = 0; D < k.length; ++D)
4012
4012
  k[D] = k[D].replace(t ? setCommentAltRe : setCommentRe, "").trim();
4013
- E.text = k.join(`
4014
- `).trim(), o[l] = E, n = l;
4013
+ R.text = k.join(`
4014
+ `).trim(), o[c] = R, n = c;
4015
4015
  }
4016
4016
  function d(v) {
4017
- var x = y(v), O = r.substring(v, x), E = /^\s*\/\//.test(O);
4018
- return E;
4017
+ var E = y(v), T = r.substring(v, E), R = /^\s*\/\//.test(T);
4018
+ return R;
4019
4019
  }
4020
4020
  function y(v) {
4021
- for (var x = v; x < a && h(x) !== `
4021
+ for (var E = v; E < a && h(E) !== `
4022
4022
  `; )
4023
- x++;
4024
- return x;
4023
+ E++;
4024
+ return E;
4025
4025
  }
4026
4026
  function g() {
4027
4027
  if (s.length > 0) return s.shift();
4028
- if (u) return c();
4029
- var v, x, O, E, q, S = e === 0;
4028
+ if (u) return l();
4029
+ var v, E, T, R, q, A = e === 0;
4030
4030
  do {
4031
4031
  if (e === a) return null;
4032
- for (v = !1; whitespaceRe.test(O = h(e)); )
4033
- if (O === `
4034
- ` && (S = !0, ++l), ++e === a) return null;
4032
+ for (v = !1; whitespaceRe.test(T = h(e)); )
4033
+ if (T === `
4034
+ ` && (A = !0, ++c), ++e === a) return null;
4035
4035
  if (h(e) === "/") {
4036
4036
  if (++e === a)
4037
4037
  throw i("comment");
4038
4038
  if (h(e) === "/")
4039
4039
  if (t) {
4040
- if (E = e, q = !1, d(e - 1)) {
4040
+ if (R = e, q = !1, d(e - 1)) {
4041
4041
  q = !0;
4042
4042
  do
4043
- if (e = y(e), e === a || (e++, !S))
4043
+ if (e = y(e), e === a || (e++, !A))
4044
4044
  break;
4045
4045
  while (d(e));
4046
4046
  } else
4047
4047
  e = Math.min(a, y(e) + 1);
4048
- q && (p(E, e, S), S = !0), l++, v = !0;
4048
+ q && (p(R, e, A), A = !0), c++, v = !0;
4049
4049
  } else {
4050
- for (q = h(E = e + 1) === "/"; h(++e) !== `
4050
+ for (q = h(R = e + 1) === "/"; h(++e) !== `
4051
4051
  `; )
4052
4052
  if (e === a)
4053
4053
  return null;
4054
- ++e, q && (p(E, e - 1, S), S = !0), ++l, v = !0;
4054
+ ++e, q && (p(R, e - 1, A), A = !0), ++c, v = !0;
4055
4055
  }
4056
- else if ((O = h(e)) === "*") {
4057
- E = e + 1, q = t || h(E) === "*";
4056
+ else if ((T = h(e)) === "*") {
4057
+ R = e + 1, q = t || h(R) === "*";
4058
4058
  do {
4059
- if (O === `
4060
- ` && ++l, ++e === a)
4059
+ if (T === `
4060
+ ` && ++c, ++e === a)
4061
4061
  throw i("comment");
4062
- x = O, O = h(e);
4063
- } while (x !== "*" || O !== "/");
4064
- ++e, q && (p(E, e - 2, S), S = !0), v = !0;
4062
+ E = T, T = h(e);
4063
+ } while (E !== "*" || T !== "/");
4064
+ ++e, q && (p(R, e - 2, A), A = !0), v = !0;
4065
4065
  } else
4066
4066
  return "/";
4067
4067
  }
@@ -4073,40 +4073,40 @@ function tokenize$1(r, t) {
4073
4073
  var D = r.substring(e, e = $);
4074
4074
  return (D === '"' || D === "'") && (u = D), D;
4075
4075
  }
4076
- function T(v) {
4076
+ function _(v) {
4077
4077
  s.push(v);
4078
4078
  }
4079
- function _() {
4079
+ function w() {
4080
4080
  if (!s.length) {
4081
4081
  var v = g();
4082
4082
  if (v === null) return null;
4083
- T(v);
4083
+ _(v);
4084
4084
  }
4085
4085
  return s[0];
4086
4086
  }
4087
- function m(v, x) {
4088
- var O = _(), E = O === v;
4089
- if (E)
4087
+ function m(v, E) {
4088
+ var T = w(), R = T === v;
4089
+ if (R)
4090
4090
  return g(), !0;
4091
- if (!x) throw i("token '" + O + "', '" + v + "' expected");
4091
+ if (!E) throw i("token '" + T + "', '" + v + "' expected");
4092
4092
  return !1;
4093
4093
  }
4094
4094
  function b(v) {
4095
- var x = null, O;
4096
- return v === void 0 ? (O = o[l - 1], delete o[l - 1], O && (t || O.type === "*" || O.lineEmpty) && (x = O.leading ? O.text : null)) : (n < v && _(), O = o[v], delete o[v], O && !O.lineEmpty && (t || O.type === "/") && (x = O.leading ? null : O.text)), x;
4095
+ var E = null, T;
4096
+ return v === void 0 ? (T = o[c - 1], delete o[c - 1], T && (t || T.type === "*" || T.lineEmpty) && (E = T.leading ? T.text : null)) : (n < v && w(), T = o[v], delete o[v], T && !T.lineEmpty && (t || T.type === "/") && (E = T.leading ? null : T.text)), E;
4097
4097
  }
4098
4098
  return Object.defineProperty(
4099
4099
  {
4100
4100
  next: g,
4101
- peek: _,
4102
- push: T,
4101
+ peek: w,
4102
+ push: _,
4103
4103
  skip: m,
4104
4104
  cmnt: b
4105
4105
  },
4106
4106
  "line",
4107
4107
  {
4108
4108
  get: function() {
4109
- return l;
4109
+ return c;
4110
4110
  }
4111
4111
  }
4112
4112
  );
@@ -4119,29 +4119,29 @@ parse.defaults = {
4119
4119
  var tokenize = tokenize_1, Root = requireRoot(), Type = requireType(), Field = requireField(), MapField = requireMapfield(), OneOf = requireOneof(), Enum = require_enum(), Service = requireService(), Method = requireMethod(), types = requireTypes(), util = requireUtil(), base10Re = /^[1-9][0-9]*$/, base10NegRe = /^-?[1-9][0-9]*$/, base16Re = /^0[x][0-9a-fA-F]+$/, base16NegRe = /^-?0[x][0-9a-fA-F]+$/, base8Re = /^0[0-7]+$/, base8NegRe = /^-?0[0-7]+$/, numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;
4120
4120
  function parse(r, t, e) {
4121
4121
  t instanceof Root || (e = t, t = new Root()), e || (e = parse.defaults);
4122
- var a = e.preferTrailingComment || !1, l = tokenize(r, e.alternateCommentMode || !1), n = l.next, o = l.push, s = l.peek, u = l.skip, i = l.cmnt, c = !0, h, p, d, y, g = !1, T = t, _ = e.keepCase ? function(w) {
4123
- return w;
4122
+ var a = e.preferTrailingComment || !1, c = tokenize(r, e.alternateCommentMode || !1), n = c.next, o = c.push, s = c.peek, u = c.skip, i = c.cmnt, l = !0, h, p, d, y, g = !1, _ = t, w = e.keepCase ? function(O) {
4123
+ return O;
4124
4124
  } : util.camelCase;
4125
- function m(w, R, A) {
4125
+ function m(O, x, S) {
4126
4126
  var N = parse.filename;
4127
- return A || (parse.filename = null), Error(
4128
- "illegal " + (R || "token") + " '" + w + "' (" + (N ? N + ", " : "") + "line " + l.line + ")"
4127
+ return S || (parse.filename = null), Error(
4128
+ "illegal " + (x || "token") + " '" + O + "' (" + (N ? N + ", " : "") + "line " + c.line + ")"
4129
4129
  );
4130
4130
  }
4131
4131
  function b() {
4132
- var w = [], R;
4132
+ var O = [], x;
4133
4133
  do {
4134
- if ((R = n()) !== '"' && R !== "'") throw m(R);
4135
- w.push(n()), u(R), R = s();
4136
- } while (R === '"' || R === "'");
4137
- return w.join("");
4134
+ if ((x = n()) !== '"' && x !== "'") throw m(x);
4135
+ O.push(n()), u(x), x = s();
4136
+ } while (x === '"' || x === "'");
4137
+ return O.join("");
4138
4138
  }
4139
4139
  function v() {
4140
- var w = n();
4141
- switch (w) {
4140
+ var O = n();
4141
+ switch (O) {
4142
4142
  case "'":
4143
4143
  case '"':
4144
- return o(w), b();
4144
+ return o(O), b();
4145
4145
  case "true":
4146
4146
  case "TRUE":
4147
4147
  return !0;
@@ -4150,20 +4150,20 @@ function parse(r, t, e) {
4150
4150
  return !1;
4151
4151
  }
4152
4152
  try {
4153
- return O(
4154
- w,
4153
+ return T(
4154
+ O,
4155
4155
  /* insideTryCatch */
4156
4156
  !0
4157
4157
  );
4158
4158
  } catch {
4159
- if (typeRefRe.test(w)) return w;
4160
- throw m(w, "value");
4159
+ if (typeRefRe.test(O)) return O;
4160
+ throw m(O, "value");
4161
4161
  }
4162
4162
  }
4163
- function x(w, R) {
4164
- var A, N;
4163
+ function E(O, x) {
4164
+ var S, N;
4165
4165
  do
4166
- R && ((A = s()) === '"' || A === "'") ? w.push(b()) : w.push([N = E(n()), u("to", !0) ? E(n()) : N]);
4166
+ x && ((S = s()) === '"' || S === "'") ? O.push(b()) : O.push([N = R(n()), u("to", !0) ? R(n()) : N]);
4167
4167
  while (u(",", !0));
4168
4168
  var I = {
4169
4169
  options: void 0
@@ -4178,17 +4178,17 @@ function parse(r, t, e) {
4178
4178
  else throw m(C);
4179
4179
  },
4180
4180
  function() {
4181
- z(I);
4181
+ W(I);
4182
4182
  }
4183
4183
  );
4184
4184
  }
4185
- function O(w, R) {
4186
- var A = 1;
4187
- switch (w.charAt(0) === "-" && (A = -1, w = w.substring(1)), w) {
4185
+ function T(O, x) {
4186
+ var S = 1;
4187
+ switch (O.charAt(0) === "-" && (S = -1, O = O.substring(1)), O) {
4188
4188
  case "inf":
4189
4189
  case "INF":
4190
4190
  case "Inf":
4191
- return A * (1 / 0);
4191
+ return S * (1 / 0);
4192
4192
  case "nan":
4193
4193
  case "NAN":
4194
4194
  case "Nan":
@@ -4197,14 +4197,14 @@ function parse(r, t, e) {
4197
4197
  case "0":
4198
4198
  return 0;
4199
4199
  }
4200
- if (base10Re.test(w)) return A * parseInt(w, 10);
4201
- if (base16Re.test(w)) return A * parseInt(w, 16);
4202
- if (base8Re.test(w)) return A * parseInt(w, 8);
4203
- if (numberRe.test(w)) return A * parseFloat(w);
4204
- throw m(w, "number", R);
4205
- }
4206
- function E(w, R) {
4207
- switch (w) {
4200
+ if (base10Re.test(O)) return S * parseInt(O, 10);
4201
+ if (base16Re.test(O)) return S * parseInt(O, 16);
4202
+ if (base8Re.test(O)) return S * parseInt(O, 8);
4203
+ if (numberRe.test(O)) return S * parseFloat(O);
4204
+ throw m(O, "number", x);
4205
+ }
4206
+ function R(O, x) {
4207
+ switch (O) {
4208
4208
  case "max":
4209
4209
  case "MAX":
4210
4210
  case "Max":
@@ -4212,95 +4212,95 @@ function parse(r, t, e) {
4212
4212
  case "0":
4213
4213
  return 0;
4214
4214
  }
4215
- if (!R && w.charAt(0) === "-") throw m(w, "id");
4216
- if (base10NegRe.test(w)) return parseInt(w, 10);
4217
- if (base16NegRe.test(w)) return parseInt(w, 16);
4218
- if (base8NegRe.test(w)) return parseInt(w, 8);
4219
- throw m(w, "id");
4215
+ if (!x && O.charAt(0) === "-") throw m(O, "id");
4216
+ if (base10NegRe.test(O)) return parseInt(O, 10);
4217
+ if (base16NegRe.test(O)) return parseInt(O, 16);
4218
+ if (base8NegRe.test(O)) return parseInt(O, 8);
4219
+ throw m(O, "id");
4220
4220
  }
4221
4221
  function q() {
4222
4222
  if (h !== void 0) throw m("package");
4223
4223
  if (h = n(), !typeRefRe.test(h)) throw m(h, "name");
4224
- T = T.define(h), u(";");
4224
+ _ = _.define(h), u(";");
4225
4225
  }
4226
- function S() {
4227
- var w = s(), R;
4228
- switch (w) {
4226
+ function A() {
4227
+ var O = s(), x;
4228
+ switch (O) {
4229
4229
  case "weak":
4230
- R = d || (d = []), n();
4230
+ x = d || (d = []), n();
4231
4231
  break;
4232
4232
  case "public":
4233
4233
  n();
4234
4234
  // eslint-disable-next-line no-fallthrough
4235
4235
  default:
4236
- R = p || (p = []);
4236
+ x = p || (p = []);
4237
4237
  break;
4238
4238
  }
4239
- w = b(), u(";"), R.push(w);
4239
+ O = b(), u(";"), x.push(O);
4240
4240
  }
4241
4241
  function $() {
4242
4242
  if (u("="), y = b(), g = y === "proto3", !g && y !== "proto2") throw m(y, "syntax");
4243
4243
  t.setOption("syntax", y), u(";");
4244
4244
  }
4245
- function k(w, R) {
4246
- switch (R) {
4245
+ function k(O, x) {
4246
+ switch (x) {
4247
4247
  case "option":
4248
- return j(w, R), u(";"), !0;
4248
+ return j(O, x), u(";"), !0;
4249
4249
  case "message":
4250
- return M(w, R), !0;
4250
+ return M(O, x), !0;
4251
4251
  case "enum":
4252
- return J(w, R), !0;
4252
+ return J(O, x), !0;
4253
4253
  case "service":
4254
- return te(w, R), !0;
4254
+ return te(O, x), !0;
4255
4255
  case "extend":
4256
- return ie(w, R), !0;
4256
+ return ie(O, x), !0;
4257
4257
  }
4258
4258
  return !1;
4259
4259
  }
4260
- function D(w, R, A) {
4261
- var N = l.line;
4262
- if (w && (typeof w.comment != "string" && (w.comment = i()), w.filename = parse.filename), u("{", !0)) {
4263
- for (var I; (I = n()) !== "}"; ) R(I);
4260
+ function D(O, x, S) {
4261
+ var N = c.line;
4262
+ if (O && (typeof O.comment != "string" && (O.comment = i()), O.filename = parse.filename), u("{", !0)) {
4263
+ for (var I; (I = n()) !== "}"; ) x(I);
4264
4264
  u(";", !0);
4265
4265
  } else
4266
- A && A(), u(";"), w && (typeof w.comment != "string" || a) && (w.comment = i(N) || w.comment);
4266
+ S && S(), u(";"), O && (typeof O.comment != "string" || a) && (O.comment = i(N) || O.comment);
4267
4267
  }
4268
- function M(w, R) {
4269
- if (!nameRe.test(R = n())) throw m(R, "type name");
4270
- var A = new Type(R);
4271
- D(A, function(I) {
4272
- if (!k(A, I))
4268
+ function M(O, x) {
4269
+ if (!nameRe.test(x = n())) throw m(x, "type name");
4270
+ var S = new Type(x);
4271
+ D(S, function(I) {
4272
+ if (!k(S, I))
4273
4273
  switch (I) {
4274
4274
  case "map":
4275
- X(A);
4275
+ X(S);
4276
4276
  break;
4277
4277
  case "required":
4278
4278
  case "repeated":
4279
- L(A, I);
4279
+ L(S, I);
4280
4280
  break;
4281
4281
  case "optional":
4282
- g ? L(A, "proto3_optional") : L(A, "optional");
4282
+ g ? L(S, "proto3_optional") : L(S, "optional");
4283
4283
  break;
4284
4284
  case "oneof":
4285
- Y(A, I);
4285
+ Y(S, I);
4286
4286
  break;
4287
4287
  case "extensions":
4288
- x(A.extensions || (A.extensions = []));
4288
+ E(S.extensions || (S.extensions = []));
4289
4289
  break;
4290
4290
  case "reserved":
4291
- x(A.reserved || (A.reserved = []), !0);
4291
+ E(S.reserved || (S.reserved = []), !0);
4292
4292
  break;
4293
4293
  default:
4294
4294
  if (!g || !typeRefRe.test(I)) throw m(I);
4295
- o(I), L(A, "optional");
4295
+ o(I), L(S, "optional");
4296
4296
  break;
4297
4297
  }
4298
- }), w.add(A);
4298
+ }), O.add(S);
4299
4299
  }
4300
- function L(w, R, A) {
4300
+ function L(O, x, S) {
4301
4301
  var N = n();
4302
4302
  if (N === "group") {
4303
- U(w, R);
4303
+ U(O, x);
4304
4304
  return;
4305
4305
  }
4306
4306
  for (; N.endsWith(".") || s().startsWith("."); )
@@ -4308,8 +4308,8 @@ function parse(r, t, e) {
4308
4308
  if (!typeRefRe.test(N)) throw m(N, "type");
4309
4309
  var I = n();
4310
4310
  if (!nameRe.test(I)) throw m(I, "name");
4311
- I = _(I), u("=");
4312
- var B = new Field(I, E(n()), N, R, A);
4311
+ I = w(I), u("=");
4312
+ var B = new Field(I, R(n()), N, x, S);
4313
4313
  if (D(
4314
4314
  B,
4315
4315
  function(F) {
@@ -4318,13 +4318,13 @@ function parse(r, t, e) {
4318
4318
  else throw m(F);
4319
4319
  },
4320
4320
  function() {
4321
- z(B);
4321
+ W(B);
4322
4322
  }
4323
- ), R === "proto3_optional") {
4323
+ ), x === "proto3_optional") {
4324
4324
  var C = new OneOf("_" + I);
4325
- B.setOption("proto3_optional", !0), C.add(B), w.add(C);
4325
+ B.setOption("proto3_optional", !0), C.add(B), O.add(C);
4326
4326
  } else
4327
- w.add(B);
4327
+ O.add(B);
4328
4328
  !g && B.repeated && (types.packed[N] !== void 0 || types.basic[N] === void 0) && B.setOption(
4329
4329
  "packed",
4330
4330
  !1,
@@ -4332,14 +4332,14 @@ function parse(r, t, e) {
4332
4332
  !0
4333
4333
  );
4334
4334
  }
4335
- function U(w, R) {
4336
- var A = n();
4337
- if (!nameRe.test(A)) throw m(A, "name");
4338
- var N = util.lcFirst(A);
4339
- A === N && (A = util.ucFirst(A)), u("=");
4340
- var I = E(n()), B = new Type(A);
4335
+ function U(O, x) {
4336
+ var S = n();
4337
+ if (!nameRe.test(S)) throw m(S, "name");
4338
+ var N = util.lcFirst(S);
4339
+ S === N && (S = util.ucFirst(S)), u("=");
4340
+ var I = R(n()), B = new Type(S);
4341
4341
  B.group = !0;
4342
- var C = new Field(N, I, A, R);
4342
+ var C = new Field(N, I, S, x);
4343
4343
  C.filename = parse.filename, D(B, function(F) {
4344
4344
  switch (F) {
4345
4345
  case "option":
@@ -4362,20 +4362,20 @@ function parse(r, t, e) {
4362
4362
  default:
4363
4363
  throw m(F);
4364
4364
  }
4365
- }), w.add(B).add(C);
4365
+ }), O.add(B).add(C);
4366
4366
  }
4367
- function X(w) {
4367
+ function X(O) {
4368
4368
  u("<");
4369
- var R = n();
4370
- if (types.mapKey[R] === void 0) throw m(R, "type");
4369
+ var x = n();
4370
+ if (types.mapKey[x] === void 0) throw m(x, "type");
4371
4371
  u(",");
4372
- var A = n();
4373
- if (!typeRefRe.test(A)) throw m(A, "type");
4372
+ var S = n();
4373
+ if (!typeRefRe.test(S)) throw m(S, "type");
4374
4374
  u(">");
4375
4375
  var N = n();
4376
4376
  if (!nameRe.test(N)) throw m(N, "name");
4377
4377
  u("=");
4378
- var I = new MapField(_(N), E(n()), R, A);
4378
+ var I = new MapField(w(N), R(n()), x, S);
4379
4379
  D(
4380
4380
  I,
4381
4381
  function(C) {
@@ -4384,37 +4384,37 @@ function parse(r, t, e) {
4384
4384
  else throw m(C);
4385
4385
  },
4386
4386
  function() {
4387
- z(I);
4387
+ W(I);
4388
4388
  }
4389
- ), w.add(I);
4390
- }
4391
- function Y(w, R) {
4392
- if (!nameRe.test(R = n())) throw m(R, "name");
4393
- var A = new OneOf(_(R));
4394
- D(A, function(I) {
4395
- I === "option" ? (j(A, I), u(";")) : (o(I), L(A, "optional"));
4396
- }), w.add(A);
4397
- }
4398
- function J(w, R) {
4399
- if (!nameRe.test(R = n())) throw m(R, "name");
4400
- var A = new Enum(R);
4401
- D(A, function(I) {
4389
+ ), O.add(I);
4390
+ }
4391
+ function Y(O, x) {
4392
+ if (!nameRe.test(x = n())) throw m(x, "name");
4393
+ var S = new OneOf(w(x));
4394
+ D(S, function(I) {
4395
+ I === "option" ? (j(S, I), u(";")) : (o(I), L(S, "optional"));
4396
+ }), O.add(S);
4397
+ }
4398
+ function J(O, x) {
4399
+ if (!nameRe.test(x = n())) throw m(x, "name");
4400
+ var S = new Enum(x);
4401
+ D(S, function(I) {
4402
4402
  switch (I) {
4403
4403
  case "option":
4404
- j(A, I), u(";");
4404
+ j(S, I), u(";");
4405
4405
  break;
4406
4406
  case "reserved":
4407
- x(A.reserved || (A.reserved = []), !0);
4407
+ E(S.reserved || (S.reserved = []), !0);
4408
4408
  break;
4409
4409
  default:
4410
- Q(A, I);
4410
+ Q(S, I);
4411
4411
  }
4412
- }), w.add(A);
4412
+ }), O.add(S);
4413
4413
  }
4414
- function Q(w, R) {
4415
- if (!nameRe.test(R)) throw m(R, "name");
4414
+ function Q(O, x) {
4415
+ if (!nameRe.test(x)) throw m(x, "name");
4416
4416
  u("=");
4417
- var A = E(n(), !0), N = {
4417
+ var S = R(n(), !0), N = {
4418
4418
  options: void 0
4419
4419
  };
4420
4420
  N.setOption = function(I, B) {
@@ -4427,27 +4427,27 @@ function parse(r, t, e) {
4427
4427
  else throw m(B);
4428
4428
  },
4429
4429
  function() {
4430
- z(N);
4430
+ W(N);
4431
4431
  }
4432
- ), w.add(R, A, N.comment, N.options);
4432
+ ), O.add(x, S, N.comment, N.options);
4433
4433
  }
4434
- function j(w, R) {
4435
- var A = u("(", !0);
4436
- if (!typeRefRe.test(R = n())) throw m(R, "name");
4437
- var N = R, I = N, B;
4438
- A && (u(")"), N = "(" + N + ")", I = N, R = s(), fqTypeRefRe.test(R) && (B = R.slice(1), N += R, n())), u("=");
4439
- var C = K(w, N);
4440
- ee(w, I, C, B);
4434
+ function j(O, x) {
4435
+ var S = u("(", !0);
4436
+ if (!typeRefRe.test(x = n())) throw m(x, "name");
4437
+ var N = x, I = N, B;
4438
+ S && (u(")"), N = "(" + N + ")", I = N, x = s(), fqTypeRefRe.test(x) && (B = x.slice(1), N += x, n())), u("=");
4439
+ var C = K(O, N);
4440
+ ee(O, I, C, B);
4441
4441
  }
4442
- function K(w, R) {
4442
+ function K(O, x) {
4443
4443
  if (u("{", !0)) {
4444
- for (var A = {}; !u("}", !0); ) {
4444
+ for (var S = {}; !u("}", !0); ) {
4445
4445
  if (!nameRe.test(P = n()))
4446
4446
  throw m(P, "name");
4447
4447
  if (P === null)
4448
4448
  throw m(P, "end of input");
4449
4449
  var N, I = P;
4450
- if (u(":", !0), s() === "{") N = K(w, R + "." + P);
4450
+ if (u(":", !0), s() === "{") N = K(O, x + "." + P);
4451
4451
  else if (s() === "[") {
4452
4452
  N = [];
4453
4453
  var B;
@@ -4455,70 +4455,70 @@ function parse(r, t, e) {
4455
4455
  do
4456
4456
  B = v(), N.push(B);
4457
4457
  while (u(",", !0));
4458
- u("]"), typeof B < "u" && G(w, R + "." + P, B);
4458
+ u("]"), typeof B < "u" && G(O, x + "." + P, B);
4459
4459
  }
4460
4460
  } else
4461
- N = v(), G(w, R + "." + P, N);
4462
- var C = A[I];
4463
- C && (N = [].concat(C).concat(N)), A[I] = N, u(",", !0), u(";", !0);
4461
+ N = v(), G(O, x + "." + P, N);
4462
+ var C = S[I];
4463
+ C && (N = [].concat(C).concat(N)), S[I] = N, u(",", !0), u(";", !0);
4464
4464
  }
4465
- return A;
4465
+ return S;
4466
4466
  }
4467
4467
  var Z = v();
4468
- return G(w, R, Z), Z;
4468
+ return G(O, x, Z), Z;
4469
4469
  }
4470
- function G(w, R, A) {
4471
- w.setOption && w.setOption(R, A);
4470
+ function G(O, x, S) {
4471
+ O.setOption && O.setOption(x, S);
4472
4472
  }
4473
- function ee(w, R, A, N) {
4474
- w.setParsedOption && w.setParsedOption(R, A, N);
4473
+ function ee(O, x, S, N) {
4474
+ O.setParsedOption && O.setParsedOption(x, S, N);
4475
4475
  }
4476
- function z(w) {
4476
+ function W(O) {
4477
4477
  if (u("[", !0)) {
4478
4478
  do
4479
- j(w, "option");
4479
+ j(O, "option");
4480
4480
  while (u(",", !0));
4481
4481
  u("]");
4482
4482
  }
4483
- return w;
4484
- }
4485
- function te(w, R) {
4486
- if (!nameRe.test(R = n())) throw m(R, "service name");
4487
- var A = new Service(R);
4488
- D(A, function(I) {
4489
- if (!k(A, I))
4490
- if (I === "rpc") re(A, I);
4483
+ return O;
4484
+ }
4485
+ function te(O, x) {
4486
+ if (!nameRe.test(x = n())) throw m(x, "service name");
4487
+ var S = new Service(x);
4488
+ D(S, function(I) {
4489
+ if (!k(S, I))
4490
+ if (I === "rpc") re(S, I);
4491
4491
  else throw m(I);
4492
- }), w.add(A);
4493
- }
4494
- function re(w, R) {
4495
- var A = i(), N = R;
4496
- if (!nameRe.test(R = n())) throw m(R, "name");
4497
- var I = R, B, C, Z, F;
4498
- if (u("("), u("stream", !0) && (C = !0), !typeRefRe.test(R = n()) || (B = R, u(")"), u("returns"), u("("), u("stream", !0) && (F = !0), !typeRefRe.test(R = n()))) throw m(R);
4499
- Z = R, u(")");
4500
- var H = new Method(I, N, B, Z, C, F);
4501
- H.comment = A, D(H, function(V) {
4492
+ }), O.add(S);
4493
+ }
4494
+ function re(O, x) {
4495
+ var S = i(), N = x;
4496
+ if (!nameRe.test(x = n())) throw m(x, "name");
4497
+ var I = x, B, C, Z, F;
4498
+ if (u("("), u("stream", !0) && (C = !0), !typeRefRe.test(x = n()) || (B = x, u(")"), u("returns"), u("("), u("stream", !0) && (F = !0), !typeRefRe.test(x = n()))) throw m(x);
4499
+ Z = x, u(")");
4500
+ var z = new Method(I, N, B, Z, C, F);
4501
+ z.comment = S, D(z, function(V) {
4502
4502
  if (V === "option")
4503
- j(H, V), u(";");
4503
+ j(z, V), u(";");
4504
4504
  else throw m(V);
4505
- }), w.add(H);
4505
+ }), O.add(z);
4506
4506
  }
4507
- function ie(w, R) {
4508
- if (!typeRefRe.test(R = n())) throw m(R, "reference");
4509
- var A = R;
4507
+ function ie(O, x) {
4508
+ if (!typeRefRe.test(x = n())) throw m(x, "reference");
4509
+ var S = x;
4510
4510
  D(null, function(I) {
4511
4511
  switch (I) {
4512
4512
  case "required":
4513
4513
  case "repeated":
4514
- L(w, I, A);
4514
+ L(O, I, S);
4515
4515
  break;
4516
4516
  case "optional":
4517
- g ? L(w, "proto3_optional", A) : L(w, "optional", A);
4517
+ g ? L(O, "proto3_optional", S) : L(O, "optional", S);
4518
4518
  break;
4519
4519
  default:
4520
4520
  if (!g || !typeRefRe.test(I)) throw m(I);
4521
- o(I), L(w, "optional", A);
4521
+ o(I), L(O, "optional", S);
4522
4522
  break;
4523
4523
  }
4524
4524
  });
@@ -4526,23 +4526,23 @@ function parse(r, t, e) {
4526
4526
  for (var P; (P = n()) !== null; )
4527
4527
  switch (P) {
4528
4528
  case "package":
4529
- if (!c) throw m(P);
4529
+ if (!l) throw m(P);
4530
4530
  q();
4531
4531
  break;
4532
4532
  case "import":
4533
- if (!c) throw m(P);
4534
- S();
4533
+ if (!l) throw m(P);
4534
+ A();
4535
4535
  break;
4536
4536
  case "syntax":
4537
- if (!c) throw m(P);
4537
+ if (!l) throw m(P);
4538
4538
  $();
4539
4539
  break;
4540
4540
  case "option":
4541
- j(T, P), u(";");
4541
+ j(_, P), u(";");
4542
4542
  break;
4543
4543
  default:
4544
- if (k(T, P)) {
4545
- c = !1;
4544
+ if (k(_, P)) {
4545
+ l = !1;
4546
4546
  continue;
4547
4547
  }
4548
4548
  throw m(P);
@@ -4931,8 +4931,8 @@ function getRawTag(r) {
4931
4931
  var a = !0;
4932
4932
  } catch {
4933
4933
  }
4934
- var l = nativeObjectToString$1.call(r);
4935
- return a && (t ? r[symToStringTag$1] = e : delete r[symToStringTag$1]), l;
4934
+ var c = nativeObjectToString$1.call(r);
4935
+ return a && (t ? r[symToStringTag$1] = e : delete r[symToStringTag$1]), c;
4936
4936
  }
4937
4937
  var objectProto$5 = Object.prototype, nativeObjectToString = objectProto$5.toString;
4938
4938
  function objectToString(r) {
@@ -5043,8 +5043,8 @@ var HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
5043
5043
  function shortOut(r) {
5044
5044
  var t = 0, e = 0;
5045
5045
  return function() {
5046
- var a = nativeNow(), l = HOT_SPAN - (a - e);
5047
- if (e = a, l > 0) {
5046
+ var a = nativeNow(), c = HOT_SPAN - (a - e);
5047
+ if (e = a, c > 0) {
5048
5048
  if (++t >= HOT_COUNT)
5049
5049
  return arguments[0];
5050
5050
  } else
@@ -5081,11 +5081,11 @@ function eq(r, t) {
5081
5081
  var nativeMax$1 = Math.max;
5082
5082
  function overRest(r, t, e) {
5083
5083
  return t = nativeMax$1(t === void 0 ? r.length - 1 : t, 0), function() {
5084
- for (var a = arguments, l = -1, n = nativeMax$1(a.length - t, 0), o = Array(n); ++l < n; )
5085
- o[l] = a[t + l];
5086
- l = -1;
5087
- for (var s = Array(t + 1); ++l < t; )
5088
- s[l] = a[l];
5084
+ for (var a = arguments, c = -1, n = nativeMax$1(a.length - t, 0), o = Array(n); ++c < n; )
5085
+ o[c] = a[t + c];
5086
+ c = -1;
5087
+ for (var s = Array(t + 1); ++c < t; )
5088
+ s[c] = a[c];
5089
5089
  return s[t] = e(o), apply(r, this, s);
5090
5090
  };
5091
5091
  }
@@ -5146,11 +5146,11 @@ var freeExports = typeof exports == "object" && exports && !exports.nodeType &&
5146
5146
  }
5147
5147
  }(), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
5148
5148
  function arrayLikeKeys(r, t) {
5149
- var e = isArray(r), a = !e && isArguments(r), l = !e && !a && isBuffer(r), n = !e && !a && !l && isTypedArray(r), o = e || a || l || n, s = o ? baseTimes(r.length, String) : [], u = s.length;
5149
+ var e = isArray(r), a = !e && isArguments(r), c = !e && !a && isBuffer(r), n = !e && !a && !c && isTypedArray(r), o = e || a || c || n, s = o ? baseTimes(r.length, String) : [], u = s.length;
5150
5150
  for (var i in r)
5151
5151
  o && // Safari 9 has enumerable `arguments.length` in strict mode.
5152
5152
  (i == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
5153
- l && (i == "offset" || i == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
5153
+ c && (i == "offset" || i == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
5154
5154
  n && (i == "buffer" || i == "byteLength" || i == "byteOffset") || // Skip index properties.
5155
5155
  isIndex(i, u)) || s.push(i);
5156
5156
  return s;
@@ -5178,65 +5178,177 @@ var now = function() {
5178
5178
  return root.Date.now();
5179
5179
  }, FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min;
5180
5180
  function debounce(r, t, e) {
5181
- var a, l, n, o, s, u, i = 0, c = !1, h = !1, p = !0;
5181
+ var a, c, n, o, s, u, i = 0, l = !1, h = !1, p = !0;
5182
5182
  if (typeof r != "function")
5183
5183
  throw new TypeError(FUNC_ERROR_TEXT);
5184
- t = toNumber(t) || 0, isObject(e) && (c = !!e.leading, h = "maxWait" in e, n = h ? nativeMax(toNumber(e.maxWait) || 0, t) : n, p = "trailing" in e ? !!e.trailing : p);
5185
- function d(O) {
5186
- var E = a, q = l;
5187
- return a = l = void 0, i = O, o = r.apply(q, E), o;
5184
+ t = toNumber(t) || 0, isObject(e) && (l = !!e.leading, h = "maxWait" in e, n = h ? nativeMax(toNumber(e.maxWait) || 0, t) : n, p = "trailing" in e ? !!e.trailing : p);
5185
+ function d(T) {
5186
+ var R = a, q = c;
5187
+ return a = c = void 0, i = T, o = r.apply(q, R), o;
5188
5188
  }
5189
- function y(O) {
5190
- return i = O, s = setTimeout(_, t), c ? d(O) : o;
5189
+ function y(T) {
5190
+ return i = T, s = setTimeout(w, t), l ? d(T) : o;
5191
5191
  }
5192
- function g(O) {
5193
- var E = O - u, q = O - i, S = t - E;
5194
- return h ? nativeMin(S, n - q) : S;
5192
+ function g(T) {
5193
+ var R = T - u, q = T - i, A = t - R;
5194
+ return h ? nativeMin(A, n - q) : A;
5195
5195
  }
5196
- function T(O) {
5197
- var E = O - u, q = O - i;
5198
- return u === void 0 || E >= t || E < 0 || h && q >= n;
5196
+ function _(T) {
5197
+ var R = T - u, q = T - i;
5198
+ return u === void 0 || R >= t || R < 0 || h && q >= n;
5199
5199
  }
5200
- function _() {
5201
- var O = now();
5202
- if (T(O))
5203
- return m(O);
5204
- s = setTimeout(_, g(O));
5200
+ function w() {
5201
+ var T = now();
5202
+ if (_(T))
5203
+ return m(T);
5204
+ s = setTimeout(w, g(T));
5205
5205
  }
5206
- function m(O) {
5207
- return s = void 0, p && a ? d(O) : (a = l = void 0, o);
5206
+ function m(T) {
5207
+ return s = void 0, p && a ? d(T) : (a = c = void 0, o);
5208
5208
  }
5209
5209
  function b() {
5210
- s !== void 0 && clearTimeout(s), i = 0, a = u = l = s = void 0;
5210
+ s !== void 0 && clearTimeout(s), i = 0, a = u = c = s = void 0;
5211
5211
  }
5212
5212
  function v() {
5213
5213
  return s === void 0 ? o : m(now());
5214
5214
  }
5215
- function x() {
5216
- var O = now(), E = T(O);
5217
- if (a = arguments, l = this, u = O, E) {
5215
+ function E() {
5216
+ var T = now(), R = _(T);
5217
+ if (a = arguments, c = this, u = T, R) {
5218
5218
  if (s === void 0)
5219
5219
  return y(u);
5220
5220
  if (h)
5221
- return clearTimeout(s), s = setTimeout(_, t), d(u);
5221
+ return clearTimeout(s), s = setTimeout(w, t), d(u);
5222
5222
  }
5223
- return s === void 0 && (s = setTimeout(_, t)), o;
5223
+ return s === void 0 && (s = setTimeout(w, t)), o;
5224
5224
  }
5225
- return x.cancel = b, x.flush = v, x;
5225
+ return E.cancel = b, E.flush = v, E;
5226
5226
  }
5227
5227
  var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, defaults = baseRest(function(r, t) {
5228
5228
  r = Object(r);
5229
- var e = -1, a = t.length, l = a > 2 ? t[2] : void 0;
5230
- for (l && isIterateeCall(t[0], t[1], l) && (a = 1); ++e < a; )
5229
+ var e = -1, a = t.length, c = a > 2 ? t[2] : void 0;
5230
+ for (c && isIterateeCall(t[0], t[1], c) && (a = 1); ++e < a; )
5231
5231
  for (var n = t[e], o = keysIn(n), s = -1, u = o.length; ++s < u; ) {
5232
- var i = o[s], c = r[i];
5233
- (c === void 0 || eq(c, objectProto[i]) && !hasOwnProperty.call(r, i)) && (r[i] = n[i]);
5232
+ var i = o[s], l = r[i];
5233
+ (l === void 0 || eq(l, objectProto[i]) && !hasOwnProperty.call(r, i)) && (r[i] = n[i]);
5234
5234
  }
5235
5235
  return r;
5236
5236
  });
5237
+ function getDefaultExportFromCjs(r) {
5238
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5239
+ }
5240
+ var eventemitter3 = { exports: {} }, hasRequiredEventemitter3;
5241
+ function requireEventemitter3() {
5242
+ return hasRequiredEventemitter3 || (hasRequiredEventemitter3 = 1, function(r) {
5243
+ var t = Object.prototype.hasOwnProperty, e = "~";
5244
+ function a() {
5245
+ }
5246
+ Object.create && (a.prototype = /* @__PURE__ */ Object.create(null), new a().__proto__ || (e = !1));
5247
+ function c(u, i, l) {
5248
+ this.fn = u, this.context = i, this.once = l || !1;
5249
+ }
5250
+ function n(u, i, l, h, p) {
5251
+ if (typeof l != "function")
5252
+ throw new TypeError("The listener must be a function");
5253
+ var d = new c(l, h || u, p), y = e ? e + i : i;
5254
+ return u._events[y] ? u._events[y].fn ? u._events[y] = [u._events[y], d] : u._events[y].push(d) : (u._events[y] = d, u._eventsCount++), u;
5255
+ }
5256
+ function o(u, i) {
5257
+ --u._eventsCount === 0 ? u._events = new a() : delete u._events[i];
5258
+ }
5259
+ function s() {
5260
+ this._events = new a(), this._eventsCount = 0;
5261
+ }
5262
+ s.prototype.eventNames = function() {
5263
+ var i = [], l, h;
5264
+ if (this._eventsCount === 0) return i;
5265
+ for (h in l = this._events)
5266
+ t.call(l, h) && i.push(e ? h.slice(1) : h);
5267
+ return Object.getOwnPropertySymbols ? i.concat(Object.getOwnPropertySymbols(l)) : i;
5268
+ }, s.prototype.listeners = function(i) {
5269
+ var l = e ? e + i : i, h = this._events[l];
5270
+ if (!h) return [];
5271
+ if (h.fn) return [h.fn];
5272
+ for (var p = 0, d = h.length, y = new Array(d); p < d; p++)
5273
+ y[p] = h[p].fn;
5274
+ return y;
5275
+ }, s.prototype.listenerCount = function(i) {
5276
+ var l = e ? e + i : i, h = this._events[l];
5277
+ return h ? h.fn ? 1 : h.length : 0;
5278
+ }, s.prototype.emit = function(i, l, h, p, d, y) {
5279
+ var g = e ? e + i : i;
5280
+ if (!this._events[g]) return !1;
5281
+ var _ = this._events[g], w = arguments.length, m, b;
5282
+ if (_.fn) {
5283
+ switch (_.once && this.removeListener(i, _.fn, void 0, !0), w) {
5284
+ case 1:
5285
+ return _.fn.call(_.context), !0;
5286
+ case 2:
5287
+ return _.fn.call(_.context, l), !0;
5288
+ case 3:
5289
+ return _.fn.call(_.context, l, h), !0;
5290
+ case 4:
5291
+ return _.fn.call(_.context, l, h, p), !0;
5292
+ case 5:
5293
+ return _.fn.call(_.context, l, h, p, d), !0;
5294
+ case 6:
5295
+ return _.fn.call(_.context, l, h, p, d, y), !0;
5296
+ }
5297
+ for (b = 1, m = new Array(w - 1); b < w; b++)
5298
+ m[b - 1] = arguments[b];
5299
+ _.fn.apply(_.context, m);
5300
+ } else {
5301
+ var v = _.length, E;
5302
+ for (b = 0; b < v; b++)
5303
+ switch (_[b].once && this.removeListener(i, _[b].fn, void 0, !0), w) {
5304
+ case 1:
5305
+ _[b].fn.call(_[b].context);
5306
+ break;
5307
+ case 2:
5308
+ _[b].fn.call(_[b].context, l);
5309
+ break;
5310
+ case 3:
5311
+ _[b].fn.call(_[b].context, l, h);
5312
+ break;
5313
+ case 4:
5314
+ _[b].fn.call(_[b].context, l, h, p);
5315
+ break;
5316
+ default:
5317
+ if (!m) for (E = 1, m = new Array(w - 1); E < w; E++)
5318
+ m[E - 1] = arguments[E];
5319
+ _[b].fn.apply(_[b].context, m);
5320
+ }
5321
+ }
5322
+ return !0;
5323
+ }, s.prototype.on = function(i, l, h) {
5324
+ return n(this, i, l, h, !1);
5325
+ }, s.prototype.once = function(i, l, h) {
5326
+ return n(this, i, l, h, !0);
5327
+ }, s.prototype.removeListener = function(i, l, h, p) {
5328
+ var d = e ? e + i : i;
5329
+ if (!this._events[d]) return this;
5330
+ if (!l)
5331
+ return o(this, d), this;
5332
+ var y = this._events[d];
5333
+ if (y.fn)
5334
+ y.fn === l && (!p || y.once) && (!h || y.context === h) && o(this, d);
5335
+ else {
5336
+ for (var g = 0, _ = [], w = y.length; g < w; g++)
5337
+ (y[g].fn !== l || p && !y[g].once || h && y[g].context !== h) && _.push(y[g]);
5338
+ _.length ? this._events[d] = _.length === 1 ? _[0] : _ : o(this, d);
5339
+ }
5340
+ return this;
5341
+ }, s.prototype.removeAllListeners = function(i) {
5342
+ var l;
5343
+ return i ? (l = e ? e + i : i, this._events[l] && o(this, l)) : (this._events = new a(), this._eventsCount = 0), this;
5344
+ }, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prefixed = e, s.EventEmitter = s, r.exports = s;
5345
+ }(eventemitter3)), eventemitter3.exports;
5346
+ }
5347
+ var eventemitter3Exports = requireEventemitter3();
5348
+ const EventEmitter = /* @__PURE__ */ getDefaultExportFromCjs(eventemitter3Exports);
5237
5349
  class WmsLayer {
5238
- constructor(t, e, a, l = 1 / 0) {
5239
- this.ctrl = t, this.key = e, this.layer = a, this.zIndex = l, this.ctrl.registerLayer(this);
5350
+ constructor(t, e, a, c = 1 / 0) {
5351
+ this.ctrl = t, this.key = e, this.layer = a, this.zIndex = c, this.ctrl.registerLayer(this);
5240
5352
  }
5241
5353
  show(t) {
5242
5354
  this.ctrl.showLayer(t, this.key);
@@ -5245,25 +5357,27 @@ class WmsLayer {
5245
5357
  this.ctrl.hideLayer(t, this.key);
5246
5358
  }
5247
5359
  }
5248
- class WmsLayerController {
5249
- constructor(t) {
5250
- W(this, "layerMap", /* @__PURE__ */ new Map());
5251
- W(this, "showLayers", Array());
5252
- W(this, "imgLayer");
5360
+ class WmsLayerController extends EventEmitter {
5361
+ constructor(e) {
5362
+ super();
5363
+ H(this, "layerMap", /* @__PURE__ */ new Map());
5364
+ H(this, "showLayers", Array());
5365
+ H(this, "imgLayer");
5253
5366
  /**更新底图,加了个的防抖 */
5254
- W(this, "update", debounce((t) => {
5255
- if (this.imgLayer && t.imageryLayers.remove(this.imgLayer, !0), this.showLayers.length === 0) {
5256
- this.imgLayer = void 0;
5367
+ H(this, "update", debounce((e) => {
5368
+ if (this.imgLayer && e.imageryLayers.remove(this.imgLayer, !0), this.showLayers.length === 0) {
5369
+ this.imgLayer = void 0, this.destroyHandler();
5257
5370
  return;
5258
5371
  }
5259
- this.imgLayer = new ImageryLayer(
5372
+ this.handler || this.hookClickEvent(e), this.imgLayer = new ImageryLayer(
5260
5373
  new WebMapServiceImageryProvider({
5261
5374
  ...this.args,
5262
- layers: this.showLayers.map((e) => this.layerMap.get(e).layer).join(",")
5375
+ layers: this.showLayers.map((a) => this.layerMap.get(a).layer).join(",")
5263
5376
  })
5264
- ), this.imgLayer.show = !0, t.imageryLayers.add(this.imgLayer);
5377
+ ), this.imgLayer.show = !0, e.imageryLayers.add(this.imgLayer);
5265
5378
  }, 200));
5266
- this.args = t, this.args.parameters = defaults(this.args.parameters, {
5379
+ H(this, "handler");
5380
+ this.args = e, this.args.parameters = defaults(this.args.parameters, {
5267
5381
  service: "WMS",
5268
5382
  version: "1.1.1",
5269
5383
  request: "GetMap",
@@ -5275,22 +5389,31 @@ class WmsLayerController {
5275
5389
  height: 256
5276
5390
  });
5277
5391
  }
5278
- registerLayer(t) {
5279
- if (this.layerMap.has(t.key))
5280
- throw new Error(`Layer with key 【${t.key}】 is already registered`);
5281
- this.layerMap.set(t.key, t);
5282
- }
5283
- showLayer(t, e) {
5284
- if (!this.layerMap.has(e))
5285
- throw new Error(`Layer with key 【${e}】 is not registered`);
5286
- this.showLayers.push(e), this.showLayers.sort((a, l) => {
5287
- const n = this.layerMap.get(a).zIndex, o = this.layerMap.get(l).zIndex;
5288
- return n - o;
5289
- }), this.update(t);
5290
- }
5291
- hideLayer(t, e) {
5292
- const a = this.showLayers.indexOf(e);
5293
- a !== -1 && (this.showLayers.splice(a, 1), this.update(t));
5392
+ registerLayer(e) {
5393
+ if (this.layerMap.has(e.key))
5394
+ throw new Error(`Layer with key 【${e.key}】 is already registered`);
5395
+ this.layerMap.set(e.key, e);
5396
+ }
5397
+ showLayer(e, a) {
5398
+ if (!this.layerMap.has(a))
5399
+ throw new Error(`Layer with key 【${a}】 is not registered`);
5400
+ this.showLayers.push(a), this.showLayers.sort((c, n) => {
5401
+ const o = this.layerMap.get(c).zIndex, s = this.layerMap.get(n).zIndex;
5402
+ return o - s;
5403
+ }), this.update(e);
5404
+ }
5405
+ hideLayer(e, a) {
5406
+ const c = this.showLayers.indexOf(a);
5407
+ c !== -1 && (this.showLayers.splice(c, 1), this.update(e));
5408
+ }
5409
+ hookClickEvent(e) {
5410
+ this.handler = new ScreenSpaceEventHandler(e.scene.canvas), this.handler.setInputAction(async (a) => {
5411
+ const c = e.scene, n = c.camera.getPickRay(a.position), o = await c.imageryLayers.pickImageryLayerFeatures(n, e.scene);
5412
+ this.emit("click", o);
5413
+ }, ScreenSpaceEventType.LEFT_CLICK);
5414
+ }
5415
+ destroyHandler() {
5416
+ this.handler && (this.handler.destroy(), this.handler = void 0);
5294
5417
  }
5295
5418
  }
5296
5419
  export {