@poor-knight/cesium-utils 0.0.0 → 0.0.2

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,24 +1,18 @@
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";
5
- var commonjsGlobal = typeof globalThis < "u" ? (
6
- // eslint-disable-next-line no-undef
7
- globalThis
8
- ) : typeof window < "u" ? window : typeof global < "u" ? (
9
- // eslint-disable-next-line no-undef
10
- global
11
- ) : typeof self < "u" ? self : {}, inflate$2 = {};
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, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle, WebMapTileServiceImageryProvider, ScreenSpaceEventHandler, ScreenSpaceEventType, ImageryLayer, WebMapServiceImageryProvider } from "cesium";
5
+ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, inflate$2 = {};
12
6
  const adler32$1 = (r, t, e, a) => {
13
- let l = r & 65535 | 0, n = r >>> 16 & 65535 | 0, o = 0;
7
+ let c = r & 65535 | 0, n = r >>> 16 & 65535 | 0, o = 0;
14
8
  for (; e !== 0; ) {
15
9
  o = e > 2e3 ? 2e3 : e, e -= o;
16
10
  do
17
- l = l + t[a++] | 0, n = n + l | 0;
11
+ c = c + t[a++] | 0, n = n + c | 0;
18
12
  while (--o);
19
- l %= 65521, n %= 65521;
13
+ c %= 65521, n %= 65521;
20
14
  }
21
- return l | n << 16 | 0;
15
+ return c | n << 16 | 0;
22
16
  };
23
17
  var adler32_1 = adler32$1;
24
18
  const makeTable = () => {
@@ -31,77 +25,77 @@ const makeTable = () => {
31
25
  }
32
26
  return t;
33
27
  }, crcTable = new Uint32Array(makeTable()), crc32$1 = (r, t, e, a) => {
34
- const l = crcTable, n = a + e;
28
+ const c = crcTable, n = a + e;
35
29
  r ^= -1;
36
30
  for (let o = a; o < n; o++)
37
- r = r >>> 8 ^ l[(r ^ t[o]) & 255];
31
+ r = r >>> 8 ^ c[(r ^ t[o]) & 255];
38
32
  return r ^ -1;
39
33
  };
40
34
  var crc32_1 = crc32$1;
41
35
  const BAD$1 = 16209, TYPE$1 = 16191;
42
36
  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, $;
37
+ let a, c, n, o, s, u, i, l, h, p, d, y, g, _, w, m, b, v, E, T, R, q, A, $;
44
38
  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;
39
+ 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
40
  e: do {
47
- y < 15 && (d += S[a++] << y, y += 8, d += S[a++] << y, y += 8), b = g[d & _];
41
+ y < 15 && (d += A[a++] << y, y += 8, d += A[a++] << y, y += 8), b = g[d & w];
48
42
  t: for (; ; ) {
49
43
  if (v = b >>> 24, d >>>= v, y -= v, v = b >>> 16 & 255, v === 0)
50
44
  $[n++] = b & 65535;
51
45
  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];
46
+ 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
47
  r: for (; ; ) {
54
48
  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) {
49
+ 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
50
  t.msg = "invalid distance too far back", k.mode = BAD$1;
57
51
  break e;
58
52
  }
59
- if (d >>>= v, y -= v, v = n - o, O > v) {
60
- if (v = O - v, v > c && k.sane) {
53
+ if (d >>>= v, y -= v, v = n - o, T > v) {
54
+ if (v = T - v, v > l && k.sane) {
61
55
  t.msg = "invalid distance too far back", k.mode = BAD$1;
62
56
  break e;
63
57
  }
64
- if (E = 0, q = p, h === 0) {
65
- if (E += i - v, v < x) {
66
- x -= v;
58
+ if (R = 0, q = p, h === 0) {
59
+ if (R += i - v, v < E) {
60
+ E -= v;
67
61
  do
68
- $[n++] = p[E++];
62
+ $[n++] = p[R++];
69
63
  while (--v);
70
- E = n - O, q = $;
64
+ R = n - T, q = $;
71
65
  }
72
66
  } else if (h < v) {
73
- if (E += i + h - v, v -= h, v < x) {
74
- x -= v;
67
+ if (R += i + h - v, v -= h, v < E) {
68
+ E -= v;
75
69
  do
76
- $[n++] = p[E++];
70
+ $[n++] = p[R++];
77
71
  while (--v);
78
- if (E = 0, h < x) {
79
- v = h, x -= v;
72
+ if (R = 0, h < E) {
73
+ v = h, E -= v;
80
74
  do
81
- $[n++] = p[E++];
75
+ $[n++] = p[R++];
82
76
  while (--v);
83
- E = n - O, q = $;
77
+ R = n - T, q = $;
84
78
  }
85
79
  }
86
- } else if (E += h - v, v < x) {
87
- x -= v;
80
+ } else if (R += h - v, v < E) {
81
+ E -= v;
88
82
  do
89
- $[n++] = p[E++];
83
+ $[n++] = p[R++];
90
84
  while (--v);
91
- E = n - O, q = $;
85
+ R = n - T, q = $;
92
86
  }
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++]));
87
+ for (; E > 2; )
88
+ $[n++] = q[R++], $[n++] = q[R++], $[n++] = q[R++], E -= 3;
89
+ E && ($[n++] = q[R++], E > 1 && ($[n++] = q[R++]));
96
90
  } else {
97
- E = n - O;
91
+ R = n - T;
98
92
  do
99
- $[n++] = $[E++], $[n++] = $[E++], $[n++] = $[E++], x -= 3;
100
- while (x > 2);
101
- x && ($[n++] = $[E++], x > 1 && ($[n++] = $[E++]));
93
+ $[n++] = $[R++], $[n++] = $[R++], $[n++] = $[R++], E -= 3;
94
+ while (E > 2);
95
+ E && ($[n++] = $[R++], E > 1 && ($[n++] = $[R++]));
102
96
  }
103
97
  } else if ((v & 64) === 0) {
104
- b = T[(b & 65535) + (d & (1 << v) - 1)];
98
+ b = _[(b & 65535) + (d & (1 << v) - 1)];
105
99
  continue r;
106
100
  } else {
107
101
  t.msg = "invalid distance code", k.mode = BAD$1;
@@ -121,8 +115,8 @@ var inffast = function(t, e) {
121
115
  }
122
116
  break;
123
117
  }
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;
118
+ } while (a < c && n < s);
119
+ 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
120
  };
127
121
  const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS$1 = 1, DISTS$1 = 2, lbase = new Uint16Array([
128
122
  /* Length codes 257..285 base */
@@ -258,53 +252,53 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
258
252
  29,
259
253
  64,
260
254
  64
261
- ]), inflate_table$1 = (r, t, e, a, l, n, o, s) => {
255
+ ]), inflate_table$1 = (r, t, e, a, c, n, o, s) => {
262
256
  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;
257
+ 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
258
  const $ = new Uint16Array(MAXBITS + 1), k = new Uint16Array(MAXBITS + 1);
265
259
  let D = null, M, L, U;
266
260
  for (i = 0; i <= MAXBITS; i++)
267
261
  $[i] = 0;
268
- for (c = 0; c < a; c++)
269
- $[t[e + c]]++;
262
+ for (l = 0; l < a; l++)
263
+ $[t[e + l]]++;
270
264
  for (d = u, p = MAXBITS; p >= 1 && $[p] === 0; p--)
271
265
  ;
272
266
  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;
267
+ return c[n++] = 1 << 24 | 64 << 16 | 0, c[n++] = 1 << 24 | 64 << 16 | 0, s.bits = 1, 0;
274
268
  for (h = 1; h < p && $[h] === 0; h++)
275
269
  ;
276
- for (d < h && (d = h), T = 1, i = 1; i <= MAXBITS; i++)
277
- if (T <<= 1, T -= $[i], T < 0)
270
+ for (d < h && (d = h), _ = 1, i = 1; i <= MAXBITS; i++)
271
+ if (_ <<= 1, _ -= $[i], _ < 0)
278
272
  return -1;
279
- if (T > 0 && (r === CODES$1 || p !== 1))
273
+ if (_ > 0 && (r === CODES$1 || p !== 1))
280
274
  return -1;
281
275
  for (k[1] = 0, i = 1; i < MAXBITS; i++)
282
276
  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)
277
+ for (l = 0; l < a; l++)
278
+ t[e + l] !== 0 && (o[k[t[e + l]]++] = l);
279
+ 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
280
  return 1;
287
281
  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;
282
+ 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
283
  do
290
- v -= b, l[E + (m >> g) + v] = M << 24 | L << 16 | U | 0;
284
+ v -= b, c[R + (m >> g) + v] = M << 24 | L << 16 | U | 0;
291
285
  while (v !== 0);
292
286
  for (b = 1 << i - 1; m & b; )
293
287
  b >>= 1;
294
- if (b !== 0 ? (m &= b - 1, m += b) : m = 0, c++, --$[i] === 0) {
288
+ if (b !== 0 ? (m &= b - 1, m += b) : m = 0, l++, --$[i] === 0) {
295
289
  if (i === p)
296
290
  break;
297
- i = t[e + o[c]];
291
+ i = t[e + o[l]];
298
292
  }
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)
293
+ if (i > d && (m & T) !== E) {
294
+ for (g === 0 && (g = d), R += h, y = i - g, _ = 1 << y; y + g < p && (_ -= $[y + g], !(_ <= 0)); )
295
+ y++, _ <<= 1;
296
+ if (w += 1 << y, r === LENS$1 && w > ENOUGH_LENS$1 || r === DISTS$1 && w > ENOUGH_DISTS$1)
303
297
  return 1;
304
- x = m & O, l[x] = d << 24 | y << 16 | E - n | 0;
298
+ E = m & T, c[E] = d << 24 | y << 16 | R - n | 0;
305
299
  }
306
300
  }
307
- return m !== 0 && (l[E + m] = i - g << 24 | 64 << 16 | 0), s.bits = d, 0;
301
+ return m !== 0 && (c[R + m] = i - g << 24 | 64 << 16 | 0), s.bits = d, 0;
308
302
  };
309
303
  var inftrees = inflate_table$1, constants = {
310
304
  /* Allowed flush values; see deflate() and inflate() below for details */
@@ -394,12 +388,12 @@ const fixedtables = (r) => {
394
388
  }
395
389
  r.lencode = lenfix, r.lenbits = 9, r.distcode = distfix, r.distbits = 5;
396
390
  }, updatewindow = (r, t, e, a) => {
397
- let l;
391
+ let c;
398
392
  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;
393
+ 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
394
  }, 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);
395
+ let e, a, c, n, o, s, u, i, l, h, p, d, y, g, _ = 0, w, m, b, v, E, T, R, q;
396
+ const A = new Uint8Array(4);
403
397
  let $, k;
404
398
  const D = (
405
399
  /* permutation of code lengths */
@@ -407,7 +401,7 @@ const fixedtables = (r) => {
407
401
  );
408
402
  if (inflateStateCheck(r) || !r.output || !r.input && r.avail_in !== 0)
409
403
  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;
404
+ 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
405
  e: for (; ; )
412
406
  switch (e.mode) {
413
407
  case HEAD:
@@ -415,13 +409,13 @@ const fixedtables = (r) => {
415
409
  e.mode = TYPEDO;
416
410
  break;
417
411
  }
418
- for (; c < 16; ) {
412
+ for (; l < 16; ) {
419
413
  if (s === 0)
420
414
  break e;
421
- s--, i += a[n++] << c, c += 8;
415
+ s--, i += a[n++] << l, l += 8;
422
416
  }
423
417
  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;
418
+ 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
419
  break;
426
420
  }
427
421
  if (e.head && (e.head.done = !1), !(e.wrap & 1) || (((i & 255) << 8) + (i >> 8)) % 31) {
@@ -432,17 +426,17 @@ const fixedtables = (r) => {
432
426
  r.msg = "unknown compression method", e.mode = BAD;
433
427
  break;
434
428
  }
435
- if (i >>>= 4, c -= 4, E = (i & 15) + 8, e.wbits === 0 && (e.wbits = E), E > 15 || E > e.wbits) {
429
+ if (i >>>= 4, l -= 4, R = (i & 15) + 8, e.wbits === 0 && (e.wbits = R), R > 15 || R > e.wbits) {
436
430
  r.msg = "invalid window size", e.mode = BAD;
437
431
  break;
438
432
  }
439
- e.dmax = 1 << e.wbits, e.flags = 0, r.adler = e.check = 1, e.mode = i & 512 ? DICTID : TYPE, i = 0, c = 0;
433
+ e.dmax = 1 << e.wbits, e.flags = 0, r.adler = e.check = 1, e.mode = i & 512 ? DICTID : TYPE, i = 0, l = 0;
440
434
  break;
441
435
  case FLAGS:
442
- for (; c < 16; ) {
436
+ for (; l < 16; ) {
443
437
  if (s === 0)
444
438
  break e;
445
- s--, i += a[n++] << c, c += 8;
439
+ s--, i += a[n++] << l, l += 8;
446
440
  }
447
441
  if (e.flags = i, (e.flags & 255) !== Z_DEFLATED) {
448
442
  r.msg = "unknown compression method", e.mode = BAD;
@@ -452,44 +446,44 @@ const fixedtables = (r) => {
452
446
  r.msg = "unknown header flags set", e.mode = BAD;
453
447
  break;
454
448
  }
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;
449
+ 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
450
  /* falls through */
457
451
  case TIME:
458
- for (; c < 32; ) {
452
+ for (; l < 32; ) {
459
453
  if (s === 0)
460
454
  break e;
461
- s--, i += a[n++] << c, c += 8;
455
+ s--, i += a[n++] << l, l += 8;
462
456
  }
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;
457
+ 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
458
  /* falls through */
465
459
  case OS:
466
- for (; c < 16; ) {
460
+ for (; l < 16; ) {
467
461
  if (s === 0)
468
462
  break e;
469
- s--, i += a[n++] << c, c += 8;
463
+ s--, i += a[n++] << l, l += 8;
470
464
  }
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;
465
+ 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
466
  /* falls through */
473
467
  case EXLEN:
474
468
  if (e.flags & 1024) {
475
- for (; c < 16; ) {
469
+ for (; l < 16; ) {
476
470
  if (s === 0)
477
471
  break e;
478
- s--, i += a[n++] << c, c += 8;
472
+ s--, i += a[n++] << l, l += 8;
479
473
  }
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;
474
+ 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
475
  } else e.head && (e.head.extra = null);
482
476
  e.mode = EXTRA;
483
477
  /* falls through */
484
478
  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(
479
+ 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
480
  a.subarray(
487
481
  n,
488
482
  // extra field is limited to 65536 bytes
489
483
  // - no need for additional size check
490
484
  n + d
491
485
  ),
492
- E
486
+ R
493
487
  )), e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, e.length -= d), e.length))
494
488
  break e;
495
489
  e.length = 0, e.mode = NAME;
@@ -500,9 +494,9 @@ const fixedtables = (r) => {
500
494
  break e;
501
495
  d = 0;
502
496
  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)
497
+ R = a[n + d++], e.head && R && e.length < 65536 && (e.head.name += String.fromCharCode(R));
498
+ while (R && d < s);
499
+ if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, R)
506
500
  break e;
507
501
  } else e.head && (e.head.name = null);
508
502
  e.length = 0, e.mode = COMMENT;
@@ -513,39 +507,39 @@ const fixedtables = (r) => {
513
507
  break e;
514
508
  d = 0;
515
509
  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)
510
+ R = a[n + d++], e.head && R && e.length < 65536 && (e.head.comment += String.fromCharCode(R));
511
+ while (R && d < s);
512
+ if (e.flags & 512 && e.wrap & 4 && (e.check = crc32(e.check, a, d, n)), s -= d, n += d, R)
519
513
  break e;
520
514
  } else e.head && (e.head.comment = null);
521
515
  e.mode = HCRC;
522
516
  /* falls through */
523
517
  case HCRC:
524
518
  if (e.flags & 512) {
525
- for (; c < 16; ) {
519
+ for (; l < 16; ) {
526
520
  if (s === 0)
527
521
  break e;
528
- s--, i += a[n++] << c, c += 8;
522
+ s--, i += a[n++] << l, l += 8;
529
523
  }
530
524
  if (e.wrap & 4 && i !== (e.check & 65535)) {
531
525
  r.msg = "header crc mismatch", e.mode = BAD;
532
526
  break;
533
527
  }
534
- i = 0, c = 0;
528
+ i = 0, l = 0;
535
529
  }
536
530
  e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), r.adler = e.check = 0, e.mode = TYPE;
537
531
  break;
538
532
  case DICTID:
539
- for (; c < 32; ) {
533
+ for (; l < 32; ) {
540
534
  if (s === 0)
541
535
  break e;
542
- s--, i += a[n++] << c, c += 8;
536
+ s--, i += a[n++] << l, l += 8;
543
537
  }
544
- r.adler = e.check = zswap32(i), i = 0, c = 0, e.mode = DICT;
538
+ r.adler = e.check = zswap32(i), i = 0, l = 0, e.mode = DICT;
545
539
  /* falls through */
546
540
  case DICT:
547
541
  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;
542
+ 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
543
  r.adler = e.check = 1, e.mode = TYPE;
550
544
  /* falls through */
551
545
  case TYPE:
@@ -554,21 +548,21 @@ const fixedtables = (r) => {
554
548
  /* falls through */
555
549
  case TYPEDO:
556
550
  if (e.last) {
557
- i >>>= c & 7, c -= c & 7, e.mode = CHECK;
551
+ i >>>= l & 7, l -= l & 7, e.mode = CHECK;
558
552
  break;
559
553
  }
560
- for (; c < 3; ) {
554
+ for (; l < 3; ) {
561
555
  if (s === 0)
562
556
  break e;
563
- s--, i += a[n++] << c, c += 8;
557
+ s--, i += a[n++] << l, l += 8;
564
558
  }
565
- switch (e.last = i & 1, i >>>= 1, c -= 1, i & 3) {
559
+ switch (e.last = i & 1, i >>>= 1, l -= 1, i & 3) {
566
560
  case 0:
567
561
  e.mode = STORED;
568
562
  break;
569
563
  case 1:
570
564
  if (fixedtables(e), e.mode = LEN_, t === Z_TREES) {
571
- i >>>= 2, c -= 2;
565
+ i >>>= 2, l -= 2;
572
566
  break e;
573
567
  }
574
568
  break;
@@ -578,19 +572,19 @@ const fixedtables = (r) => {
578
572
  case 3:
579
573
  r.msg = "invalid block type", e.mode = BAD;
580
574
  }
581
- i >>>= 2, c -= 2;
575
+ i >>>= 2, l -= 2;
582
576
  break;
583
577
  case STORED:
584
- for (i >>>= c & 7, c -= c & 7; c < 32; ) {
578
+ for (i >>>= l & 7, l -= l & 7; l < 32; ) {
585
579
  if (s === 0)
586
580
  break e;
587
- s--, i += a[n++] << c, c += 8;
581
+ s--, i += a[n++] << l, l += 8;
588
582
  }
589
583
  if ((i & 65535) !== (i >>> 16 ^ 65535)) {
590
584
  r.msg = "invalid stored block lengths", e.mode = BAD;
591
585
  break;
592
586
  }
593
- if (e.length = i & 65535, i = 0, c = 0, e.mode = COPY_, t === Z_TREES)
587
+ if (e.length = i & 65535, i = 0, l = 0, e.mode = COPY_, t === Z_TREES)
594
588
  break e;
595
589
  /* falls through */
596
590
  case COPY_:
@@ -600,18 +594,18 @@ const fixedtables = (r) => {
600
594
  if (d = e.length, d) {
601
595
  if (d > s && (d = s), d > u && (d = u), d === 0)
602
596
  break e;
603
- l.set(a.subarray(n, n + d), o), s -= d, n += d, u -= d, o += d, e.length -= d;
597
+ c.set(a.subarray(n, n + d), o), s -= d, n += d, u -= d, o += d, e.length -= d;
604
598
  break;
605
599
  }
606
600
  e.mode = TYPE;
607
601
  break;
608
602
  case TABLE:
609
- for (; c < 14; ) {
603
+ for (; l < 14; ) {
610
604
  if (s === 0)
611
605
  break e;
612
- s--, i += a[n++] << c, c += 8;
606
+ s--, i += a[n++] << l, l += 8;
613
607
  }
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) {
608
+ 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
609
  r.msg = "too many length or distance symbols", e.mode = BAD;
616
610
  break;
617
611
  }
@@ -619,12 +613,12 @@ const fixedtables = (r) => {
619
613
  /* falls through */
620
614
  case LENLENS:
621
615
  for (; e.have < e.ncode; ) {
622
- for (; c < 3; ) {
616
+ for (; l < 3; ) {
623
617
  if (s === 0)
624
618
  break e;
625
- s--, i += a[n++] << c, c += 8;
619
+ s--, i += a[n++] << l, l += 8;
626
620
  }
627
- e.lens[D[e.have++]] = i & 7, i >>>= 3, c -= 3;
621
+ e.lens[D[e.have++]] = i & 7, i >>>= 3, l -= 3;
628
622
  }
629
623
  for (; e.have < 19; )
630
624
  e.lens[D[e.have++]] = 0;
@@ -638,46 +632,46 @@ const fixedtables = (r) => {
638
632
  /* falls through */
639
633
  case CODELENS:
640
634
  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); ) {
635
+ for (; _ = e.lencode[i & (1 << e.lenbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
642
636
  if (s === 0)
643
637
  break e;
644
- s--, i += a[n++] << c, c += 8;
638
+ s--, i += a[n++] << l, l += 8;
645
639
  }
646
640
  if (b < 16)
647
- i >>>= _, c -= _, e.lens[e.have++] = b;
641
+ i >>>= w, l -= w, e.lens[e.have++] = b;
648
642
  else {
649
643
  if (b === 16) {
650
- for (k = _ + 2; c < k; ) {
644
+ for (k = w + 2; l < k; ) {
651
645
  if (s === 0)
652
646
  break e;
653
- s--, i += a[n++] << c, c += 8;
647
+ s--, i += a[n++] << l, l += 8;
654
648
  }
655
- if (i >>>= _, c -= _, e.have === 0) {
649
+ if (i >>>= w, l -= w, e.have === 0) {
656
650
  r.msg = "invalid bit length repeat", e.mode = BAD;
657
651
  break;
658
652
  }
659
- E = e.lens[e.have - 1], d = 3 + (i & 3), i >>>= 2, c -= 2;
653
+ R = e.lens[e.have - 1], d = 3 + (i & 3), i >>>= 2, l -= 2;
660
654
  } else if (b === 17) {
661
- for (k = _ + 3; c < k; ) {
655
+ for (k = w + 3; l < k; ) {
662
656
  if (s === 0)
663
657
  break e;
664
- s--, i += a[n++] << c, c += 8;
658
+ s--, i += a[n++] << l, l += 8;
665
659
  }
666
- i >>>= _, c -= _, E = 0, d = 3 + (i & 7), i >>>= 3, c -= 3;
660
+ i >>>= w, l -= w, R = 0, d = 3 + (i & 7), i >>>= 3, l -= 3;
667
661
  } else {
668
- for (k = _ + 7; c < k; ) {
662
+ for (k = w + 7; l < k; ) {
669
663
  if (s === 0)
670
664
  break e;
671
- s--, i += a[n++] << c, c += 8;
665
+ s--, i += a[n++] << l, l += 8;
672
666
  }
673
- i >>>= _, c -= _, E = 0, d = 11 + (i & 127), i >>>= 7, c -= 7;
667
+ i >>>= w, l -= w, R = 0, d = 11 + (i & 127), i >>>= 7, l -= 7;
674
668
  }
675
669
  if (e.have + d > e.nlen + e.ndist) {
676
670
  r.msg = "invalid bit length repeat", e.mode = BAD;
677
671
  break;
678
672
  }
679
673
  for (; d--; )
680
- e.lens[e.have++] = E;
674
+ e.lens[e.have++] = R;
681
675
  }
682
676
  }
683
677
  if (e.mode === BAD)
@@ -715,23 +709,23 @@ const fixedtables = (r) => {
715
709
  /* falls through */
716
710
  case LEN:
717
711
  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);
712
+ 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
713
  break;
720
714
  }
721
- for (e.back = 0; T = e.lencode[i & (1 << e.lenbits) - 1], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(_ <= c); ) {
715
+ for (e.back = 0; _ = e.lencode[i & (1 << e.lenbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
722
716
  if (s === 0)
723
717
  break e;
724
- s--, i += a[n++] << c, c += 8;
718
+ s--, i += a[n++] << l, l += 8;
725
719
  }
726
720
  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); ) {
721
+ 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
722
  if (s === 0)
729
723
  break e;
730
- s--, i += a[n++] << c, c += 8;
724
+ s--, i += a[n++] << l, l += 8;
731
725
  }
732
- i >>>= v, c -= v, e.back += v;
726
+ i >>>= v, l -= v, e.back += v;
733
727
  }
734
- if (i >>>= _, c -= _, e.back += _, e.length = b, m === 0) {
728
+ if (i >>>= w, l -= w, e.back += w, e.length = b, m === 0) {
735
729
  e.mode = LIT;
736
730
  break;
737
731
  }
@@ -747,30 +741,30 @@ const fixedtables = (r) => {
747
741
  /* falls through */
748
742
  case LENEXT:
749
743
  if (e.extra) {
750
- for (k = e.extra; c < k; ) {
744
+ for (k = e.extra; l < k; ) {
751
745
  if (s === 0)
752
746
  break e;
753
- s--, i += a[n++] << c, c += 8;
747
+ s--, i += a[n++] << l, l += 8;
754
748
  }
755
- e.length += i & (1 << e.extra) - 1, i >>>= e.extra, c -= e.extra, e.back += e.extra;
749
+ e.length += i & (1 << e.extra) - 1, i >>>= e.extra, l -= e.extra, e.back += e.extra;
756
750
  }
757
751
  e.was = e.length, e.mode = DIST;
758
752
  /* falls through */
759
753
  case DIST:
760
- for (; T = e.distcode[i & (1 << e.distbits) - 1], _ = T >>> 24, m = T >>> 16 & 255, b = T & 65535, !(_ <= c); ) {
754
+ for (; _ = e.distcode[i & (1 << e.distbits) - 1], w = _ >>> 24, m = _ >>> 16 & 255, b = _ & 65535, !(w <= l); ) {
761
755
  if (s === 0)
762
756
  break e;
763
- s--, i += a[n++] << c, c += 8;
757
+ s--, i += a[n++] << l, l += 8;
764
758
  }
765
759
  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); ) {
760
+ 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
761
  if (s === 0)
768
762
  break e;
769
- s--, i += a[n++] << c, c += 8;
763
+ s--, i += a[n++] << l, l += 8;
770
764
  }
771
- i >>>= v, c -= v, e.back += v;
765
+ i >>>= v, l -= v, e.back += v;
772
766
  }
773
- if (i >>>= _, c -= _, e.back += _, m & 64) {
767
+ if (i >>>= w, l -= w, e.back += w, m & 64) {
774
768
  r.msg = "invalid distance code", e.mode = BAD;
775
769
  break;
776
770
  }
@@ -778,12 +772,12 @@ const fixedtables = (r) => {
778
772
  /* falls through */
779
773
  case DISTEXT:
780
774
  if (e.extra) {
781
- for (k = e.extra; c < k; ) {
775
+ for (k = e.extra; l < k; ) {
782
776
  if (s === 0)
783
777
  break e;
784
- s--, i += a[n++] << c, c += 8;
778
+ s--, i += a[n++] << l, l += 8;
785
779
  }
786
- e.offset += i & (1 << e.extra) - 1, i >>>= e.extra, c -= e.extra, e.back += e.extra;
780
+ e.offset += i & (1 << e.extra) - 1, i >>>= e.extra, l -= e.extra, e.back += e.extra;
787
781
  }
788
782
  if (e.offset > e.dmax) {
789
783
  r.msg = "invalid distance too far back", e.mode = BAD;
@@ -801,46 +795,46 @@ const fixedtables = (r) => {
801
795
  }
802
796
  d > e.wnext ? (d -= e.wnext, y = e.wsize - d) : y = e.wnext - d, d > e.length && (d = e.length), g = e.window;
803
797
  } else
804
- g = l, y = o - e.offset, d = e.length;
798
+ g = c, y = o - e.offset, d = e.length;
805
799
  d > u && (d = u), u -= d, e.length -= d;
806
800
  do
807
- l[o++] = g[y++];
801
+ c[o++] = g[y++];
808
802
  while (--d);
809
803
  e.length === 0 && (e.mode = LEN);
810
804
  break;
811
805
  case LIT:
812
806
  if (u === 0)
813
807
  break e;
814
- l[o++] = e.length, u--, e.mode = LEN;
808
+ c[o++] = e.length, u--, e.mode = LEN;
815
809
  break;
816
810
  case CHECK:
817
811
  if (e.wrap) {
818
- for (; c < 32; ) {
812
+ for (; l < 32; ) {
819
813
  if (s === 0)
820
814
  break e;
821
- s--, i |= a[n++] << c, c += 8;
815
+ s--, i |= a[n++] << l, l += 8;
822
816
  }
823
817
  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) {
818
+ 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
819
  r.msg = "incorrect data check", e.mode = BAD;
826
820
  break;
827
821
  }
828
- i = 0, c = 0;
822
+ i = 0, l = 0;
829
823
  }
830
824
  e.mode = LENGTH;
831
825
  /* falls through */
832
826
  case LENGTH:
833
827
  if (e.wrap && e.flags) {
834
- for (; c < 32; ) {
828
+ for (; l < 32; ) {
835
829
  if (s === 0)
836
830
  break e;
837
- s--, i += a[n++] << c, c += 8;
831
+ s--, i += a[n++] << l, l += 8;
838
832
  }
839
833
  if (e.wrap & 4 && i !== (e.total & 4294967295)) {
840
834
  r.msg = "incorrect length check", e.mode = BAD;
841
835
  break;
842
836
  }
843
- i = 0, c = 0;
837
+ i = 0, l = 0;
844
838
  }
845
839
  e.mode = DONE;
846
840
  /* falls through */
@@ -857,8 +851,8 @@ const fixedtables = (r) => {
857
851
  default:
858
852
  return Z_STREAM_ERROR$1;
859
853
  }
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;
854
+ 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);*/
855
+ 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
856
  }, inflateEnd = (r) => {
863
857
  if (inflateStateCheck(r))
864
858
  return Z_STREAM_ERROR$1;
@@ -871,8 +865,8 @@ const fixedtables = (r) => {
871
865
  return (e.wrap & 2) === 0 ? Z_STREAM_ERROR$1 : (e.head = t, t.done = !1, Z_OK$1);
872
866
  }, inflateSetDictionary = (r, t) => {
873
867
  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));
868
+ let a, c, n;
869
+ 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
870
  };
877
871
  inflate$2.inflateReset = inflateReset;
878
872
  inflate$2.inflateReset2 = inflateReset2;
@@ -901,12 +895,12 @@ common$1.assign = function(r) {
901
895
  };
902
896
  common$1.flattenChunks = (r) => {
903
897
  let t = 0;
904
- for (let a = 0, l = r.length; a < l; a++)
898
+ for (let a = 0, c = r.length; a < c; a++)
905
899
  t += r[a].length;
906
900
  const e = new Uint8Array(t);
907
- for (let a = 0, l = 0, n = r.length; a < n; a++) {
901
+ for (let a = 0, c = 0, n = r.length; a < n; a++) {
908
902
  let o = r[a];
909
- e.set(o, l), l += o.length;
903
+ e.set(o, c), c += o.length;
910
904
  }
911
905
  return e;
912
906
  };
@@ -924,11 +918,11 @@ _utf8len[254] = _utf8len[254] = 1;
924
918
  strings$1.string2buf = (r) => {
925
919
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
926
920
  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);
921
+ let t, e, a, c, n, o = r.length, s = 0;
922
+ for (c = 0; c < o; c++)
923
+ 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;
924
+ for (t = new Uint8Array(s), n = 0, c = 0; n < s; c++)
925
+ 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
926
  return t;
933
927
  };
934
928
  const buf2binstring = (r, t) => {
@@ -943,28 +937,28 @@ strings$1.buf2string = (r, t) => {
943
937
  const e = t || r.length;
944
938
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
945
939
  return new TextDecoder().decode(r.subarray(0, t));
946
- let a, l;
940
+ let a, c;
947
941
  const n = new Array(e * 2);
948
- for (l = 0, a = 0; a < e; ) {
942
+ for (c = 0, a = 0; a < e; ) {
949
943
  let o = r[a++];
950
944
  if (o < 128) {
951
- n[l++] = o;
945
+ n[c++] = o;
952
946
  continue;
953
947
  }
954
948
  let s = _utf8len[o];
955
949
  if (s > 4) {
956
- n[l++] = 65533, a += s - 1;
950
+ n[c++] = 65533, a += s - 1;
957
951
  continue;
958
952
  }
959
953
  for (o &= s === 2 ? 31 : s === 3 ? 15 : 7; s > 1 && a < e; )
960
954
  o = o << 6 | r[a++] & 63, s--;
961
955
  if (s > 1) {
962
- n[l++] = 65533;
956
+ n[c++] = 65533;
963
957
  continue;
964
958
  }
965
- o < 65536 ? n[l++] = o : (o -= 65536, n[l++] = 55296 | o >> 10 & 1023, n[l++] = 56320 | o & 1023);
959
+ o < 65536 ? n[c++] = o : (o -= 65536, n[c++] = 55296 | o >> 10 & 1023, n[c++] = 56320 | o & 1023);
966
960
  }
967
- return buf2binstring(n, l);
961
+ return buf2binstring(n, c);
968
962
  };
969
963
  strings$1.utf8border = (r, t) => {
970
964
  t = t || r.length, t > r.length && (t = r.length);
@@ -1028,11 +1022,11 @@ function Inflate(r) {
1028
1022
  throw new Error(msg[e]);
1029
1023
  }
1030
1024
  Inflate.prototype.push = function(r, t) {
1031
- const e = this.strm, a = this.options.chunkSize, l = this.options.dictionary;
1025
+ const e = this.strm, a = this.options.chunkSize, c = this.options.dictionary;
1032
1026
  let n, o, s;
1033
1027
  if (this.ended) return !1;
1034
1028
  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; )
1029
+ 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
1030
  zlib_inflate.inflateReset(e), n = zlib_inflate.inflate(e, o);
1037
1031
  switch (n) {
1038
1032
  case Z_STREAM_ERROR:
@@ -1043,8 +1037,8 @@ Inflate.prototype.push = function(r, t) {
1043
1037
  }
1044
1038
  if (s = e.avail_out, e.next_out && (e.avail_out === 0 || n === Z_STREAM_END))
1045
1039
  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);
1040
+ let u = strings.utf8border(e.output, e.next_out), i = e.next_out - u, l = strings.buf2string(e.output, u);
1041
+ e.next_out = i, e.avail_out = a - i, i && e.output.set(e.output.subarray(u, u + i), 0), this.onData(l);
1048
1042
  } else
1049
1043
  this.onData(
1050
1044
  e.output.length === e.next_out ? e.output : e.output.subarray(0, e.next_out)
@@ -1069,14 +1063,14 @@ function inflate(r, t) {
1069
1063
  return e.result;
1070
1064
  }
1071
1065
  var inflate_2 = inflate;
1072
- function f(r, t, e, a, l, n) {
1073
- let o = r.tileXYToRectangle(e, a, l);
1066
+ function f(r, t, e, a, c, n) {
1067
+ let o = r.tileXYToRectangle(e, a, c);
1074
1068
  return defined(Rectangle.intersection(o, t, n));
1075
1069
  }
1076
1070
  class GeoTerrainProvider {
1077
1071
  constructor(t) {
1078
- if (t = defaultValue(t, {}), !defined(t.url)) throw new DeveloperError("options.url is required.");
1079
- this._dataType = defaultValue(t.dataType, "int"), this._tileType = defaultValue(t.tileType, "heightmap"), this._url = t.url, this._maxTerrainLevel = defaultValue(t.dataType, "int"), this._subdomains = t.subdomains, this._token = t.token, this.init(t);
1072
+ if (t = t ?? {}, !defined(t.url)) throw new DeveloperError("options.url is required.");
1073
+ this._dataType = t.dataType ?? "int", this._tileType = t.tileType ?? "heightmap", this._url = t.url, this._maxTerrainLevel = t.dataType ?? "int", this._subdomains = t.subdomains, this._token = t.token, this.init(t);
1080
1074
  }
1081
1075
  get credit() {
1082
1076
  return this._credit;
@@ -1109,16 +1103,16 @@ class GeoTerrainProvider {
1109
1103
  };
1110
1104
  const e = t.credit;
1111
1105
  typeof e == "string" && (this._credit = new Credit(e)), this._rectangles = [];
1112
- const a = defaultValue(t.ellipsoid, Ellipsoid.WGS84);
1106
+ const a = t.ellipsoid ?? Ellipsoid.WGS84;
1113
1107
  this._tilingScheme = new GeographicTilingScheme({
1114
1108
  ellipsoid: a
1115
1109
  }), this._heightmapWidth = 64, this._heightmapHeight = 64, this._levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
1116
1110
  a,
1117
1111
  Math.min(this._heightmapWidth, this._heightmapHeight),
1118
1112
  this._tilingScheme.getNumberOfXTilesAtLevel(0)
1119
- ), this._ready = !0, this._topLevel = defaultValue(t.topLevel, 5), this._bottomLevel = defaultValue(t.bottomLevel, 25);
1113
+ ), this._ready = !0, this._topLevel = t.topLevel ?? 5, this._bottomLevel = t.bottomLevel ?? 25;
1120
1114
  }
1121
- requestTileGeometry(t, e, a, l) {
1115
+ requestTileGeometry(t, e, a, c) {
1122
1116
  if (!this.ready)
1123
1117
  throw new DeveloperError("requestTileGeometry must not be called before ready returns true.");
1124
1118
  if (a >= this._bottomLevel) return Promise.reject(`${a}该级别不发送请求!`);
@@ -1136,7 +1130,7 @@ class GeoTerrainProvider {
1136
1130
  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
1131
  const s = Resource.fetchArrayBuffer({
1138
1132
  url: o,
1139
- request: l
1133
+ request: c
1140
1134
  });
1141
1135
  if (s)
1142
1136
  return s.then((u) => u.byteLength < 1e3 ? Promise.reject("无效数据") : inflate_2(u)).then((u) => {
@@ -1163,12 +1157,12 @@ class GeoTerrainProvider {
1163
1157
  this._dataType === "int" ? e = 2 : this._dataType === "float" && (e = 4);
1164
1158
  let a = t;
1165
1159
  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);
1160
+ 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
1161
  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;
1162
+ for (let y = 0; y < l; y++) {
1163
+ 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);
1164
+ let g = (c + 1e3) / 1e-3, _ = 4 * (d * l + y);
1165
+ p[_] = g / 65536, p[1 + _] = (g - 256 * p[_] * 256) / 256, p[2 + _] = g - 256 * p[_] * 256 - 256 * p[1 + _], p[3 + _] = 255;
1172
1166
  }
1173
1167
  return p;
1174
1168
  }
@@ -1183,12 +1177,12 @@ class GeoTerrainProvider {
1183
1177
  return t;
1184
1178
  }
1185
1179
  getChildTileMask(t, e, a) {
1186
- let l = new Rectangle(), n = this._tilingScheme, o = this._rectangles, s = n.tileXYToRectangle(t, e, a), u = 0;
1180
+ let c = new Rectangle(), n = this._tilingScheme, o = this._rectangles, s = n.tileXYToRectangle(t, e, a), u = 0;
1187
1181
  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));
1182
+ let l = o[i];
1183
+ if (!(l.maxLevel <= a)) {
1184
+ let h = l.rectangle, p = Rectangle.intersection(h, s, c);
1185
+ 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
1186
  }
1193
1187
  }
1194
1188
  return u;
@@ -1199,9 +1193,9 @@ function requireAspromise() {
1199
1193
  if (hasRequiredAspromise) return aspromise;
1200
1194
  hasRequiredAspromise = 1, aspromise = r;
1201
1195
  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++];
1196
+ for (var a = new Array(arguments.length - 1), c = 0, n = 2, o = !0; n < arguments.length; ) a[c++] = arguments[n++];
1203
1197
  return new Promise(function(u, i) {
1204
- a[l] = function(h) {
1198
+ a[c] = function(h) {
1205
1199
  if (o)
1206
1200
  if (o = !1, h) i(h);
1207
1201
  else {
@@ -1211,8 +1205,8 @@ function requireAspromise() {
1211
1205
  };
1212
1206
  try {
1213
1207
  t.apply(e || null, a);
1214
- } catch (c) {
1215
- o && (o = !1, i(c));
1208
+ } catch (l) {
1209
+ o && (o = !1, i(l));
1216
1210
  }
1217
1211
  });
1218
1212
  }
@@ -1228,10 +1222,10 @@ function requireBase64() {
1228
1222
  for (var i = 0; --u % 4 > 1 && s.charAt(u) === "="; ) ++i;
1229
1223
  return Math.ceil(s.length * 3) / 4 - i;
1230
1224
  };
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++;
1225
+ for (var e = new Array(64), a = new Array(123), c = 0; c < 64; )
1226
+ a[e[c] = c < 26 ? c + 65 : c < 52 ? c + 71 : c < 62 ? c - 4 : c - 59 | 43] = c++;
1233
1227
  t.encode = function(s, u, i) {
1234
- for (var c = null, h = [], p = 0, d = 0, y; u < i; ) {
1228
+ for (var l = null, h = [], p = 0, d = 0, y; u < i; ) {
1235
1229
  var g = s[u++];
1236
1230
  switch (d) {
1237
1231
  case 0:
@@ -1244,13 +1238,13 @@ function requireBase64() {
1244
1238
  h[p++] = e[y | g >> 6], h[p++] = e[g & 63], d = 0;
1245
1239
  break;
1246
1240
  }
1247
- p > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, h)), p = 0);
1241
+ p > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, h)), p = 0);
1248
1242
  }
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));
1243
+ 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
1244
  };
1251
1245
  var n = "invalid encoding";
1252
1246
  t.decode = function(s, u, i) {
1253
- for (var c = i, h = 0, p, d = 0; d < s.length; ) {
1247
+ for (var l = i, h = 0, p, d = 0; d < s.length; ) {
1254
1248
  var y = s.charCodeAt(d++);
1255
1249
  if (y === 61 && h > 1) break;
1256
1250
  if ((y = a[y]) === void 0) throw Error(n);
@@ -1270,7 +1264,7 @@ function requireBase64() {
1270
1264
  }
1271
1265
  }
1272
1266
  if (h === 1) throw Error(n);
1273
- return i - c;
1267
+ return i - l;
1274
1268
  }, t.test = function(s) {
1275
1269
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
1276
1270
  };
@@ -1283,23 +1277,23 @@ function requireEventemitter() {
1283
1277
  function r() {
1284
1278
  this._listeners = {};
1285
1279
  }
1286
- return r.prototype.on = function(e, a, l) {
1280
+ return r.prototype.on = function(e, a, c) {
1287
1281
  return (this._listeners[e] || (this._listeners[e] = [])).push({
1288
1282
  fn: a,
1289
- ctx: l || this
1283
+ ctx: c || this
1290
1284
  }), this;
1291
1285
  }, r.prototype.off = function(e, a) {
1292
1286
  if (e === void 0) this._listeners = {};
1293
1287
  else if (a === void 0) this._listeners[e] = [];
1294
1288
  else
1295
- for (var l = this._listeners[e], n = 0; n < l.length; )
1296
- l[n].fn === a ? l.splice(n, 1) : ++n;
1289
+ for (var c = this._listeners[e], n = 0; n < c.length; )
1290
+ c[n].fn === a ? c.splice(n, 1) : ++n;
1297
1291
  return this;
1298
1292
  }, r.prototype.emit = function(e) {
1299
1293
  var a = this._listeners[e];
1300
1294
  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);
1295
+ for (var c = [], n = 1; n < arguments.length; ) c.push(arguments[n++]);
1296
+ for (n = 0; n < a.length; ) a[n].fn.apply(a[n++].ctx, c);
1303
1297
  }
1304
1298
  return this;
1305
1299
  }, eventemitter;
@@ -1314,10 +1308,10 @@ function requireFloat() {
1314
1308
  function i(d, y, g) {
1315
1309
  o[0] = d, y[g] = s[0], y[g + 1] = s[1], y[g + 2] = s[2], y[g + 3] = s[3];
1316
1310
  }
1317
- function c(d, y, g) {
1311
+ function l(d, y, g) {
1318
1312
  o[0] = d, y[g] = s[3], y[g + 1] = s[2], y[g + 2] = s[1], y[g + 3] = s[0];
1319
1313
  }
1320
- n.writeFloatLE = u ? i : c, n.writeFloatBE = u ? c : i;
1314
+ n.writeFloatLE = u ? i : l, n.writeFloatBE = u ? l : i;
1321
1315
  function h(d, y) {
1322
1316
  return s[0] = d[y], s[1] = d[y + 1], s[2] = d[y + 2], s[3] = d[y + 3], o[0];
1323
1317
  }
@@ -1326,7 +1320,7 @@ function requireFloat() {
1326
1320
  }
1327
1321
  n.readFloatLE = u ? h : p, n.readFloatBE = u ? p : h;
1328
1322
  }() : function() {
1329
- function o(u, i, c, h) {
1323
+ function o(u, i, l, h) {
1330
1324
  var p = i < 0 ? 1 : 0;
1331
1325
  if (p && (i = -i), i === 0)
1332
1326
  u(1 / i > 0 ? (
@@ -1335,32 +1329,32 @@ function requireFloat() {
1335
1329
  ) : (
1336
1330
  /* negative 0 */
1337
1331
  2147483648
1338
- ), c, h);
1339
- else if (isNaN(i)) u(2143289344, c, h);
1332
+ ), l, h);
1333
+ else if (isNaN(i)) u(2143289344, l, h);
1340
1334
  else if (i > 34028234663852886e22)
1341
- u((p << 31 | 2139095040) >>> 0, c, h);
1335
+ u((p << 31 | 2139095040) >>> 0, l, h);
1342
1336
  else if (i < 11754943508222875e-54)
1343
- u((p << 31 | Math.round(i / 1401298464324817e-60)) >>> 0, c, h);
1337
+ u((p << 31 | Math.round(i / 1401298464324817e-60)) >>> 0, l, h);
1344
1338
  else {
1345
1339
  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);
1340
+ u((p << 31 | d + 127 << 23 | y) >>> 0, l, h);
1347
1341
  }
1348
1342
  }
1349
1343
  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;
1344
+ function s(u, i, l) {
1345
+ var h = u(i, l), p = (h >> 31) * 2 + 1, d = h >>> 23 & 255, y = h & 8388607;
1352
1346
  return d === 255 ? y ? NaN : p * (1 / 0) : d === 0 ? p * 1401298464324817e-60 * y : p * Math.pow(2, d - 150) * (y + 8388608);
1353
1347
  }
1354
- n.readFloatLE = s.bind(null, a), n.readFloatBE = s.bind(null, l);
1348
+ n.readFloatLE = s.bind(null, a), n.readFloatBE = s.bind(null, c);
1355
1349
  }(), typeof Float64Array < "u" ? function() {
1356
1350
  var o = new Float64Array([-0]), s = new Uint8Array(o.buffer), u = s[7] === 128;
1357
1351
  function i(d, y, g) {
1358
1352
  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
1353
  }
1360
- function c(d, y, g) {
1354
+ function l(d, y, g) {
1361
1355
  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
1356
  }
1363
- n.writeDoubleLE = u ? i : c, n.writeDoubleBE = u ? c : i;
1357
+ n.writeDoubleLE = u ? i : l, n.writeDoubleBE = u ? l : i;
1364
1358
  function h(d, y) {
1365
1359
  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
1360
  }
@@ -1369,7 +1363,7 @@ function requireFloat() {
1369
1363
  }
1370
1364
  n.readDoubleLE = u ? h : p, n.readDoubleBE = u ? p : h;
1371
1365
  }() : function() {
1372
- function o(u, i, c, h, p, d) {
1366
+ function o(u, i, l, h, p, d) {
1373
1367
  var y = h < 0 ? 1 : 0;
1374
1368
  if (y && (h = -h), h === 0)
1375
1369
  u(0, p, d + i), u(1 / h > 0 ? (
@@ -1378,31 +1372,31 @@ function requireFloat() {
1378
1372
  ) : (
1379
1373
  /* negative 0 */
1380
1374
  2147483648
1381
- ), p, d + c);
1375
+ ), p, d + l);
1382
1376
  else if (isNaN(h))
1383
- u(0, p, d + i), u(2146959360, p, d + c);
1377
+ u(0, p, d + i), u(2146959360, p, d + l);
1384
1378
  else if (h > 17976931348623157e292)
1385
- u(0, p, d + i), u((y << 31 | 2146435072) >>> 0, p, d + c);
1379
+ u(0, p, d + i), u((y << 31 | 2146435072) >>> 0, p, d + l);
1386
1380
  else {
1387
1381
  var g;
1388
1382
  if (h < 22250738585072014e-324)
1389
- g = h / 5e-324, u(g >>> 0, p, d + i), u((y << 31 | g / 4294967296) >>> 0, p, d + c);
1383
+ g = h / 5e-324, u(g >>> 0, p, d + i), u((y << 31 | g / 4294967296) >>> 0, p, d + l);
1390
1384
  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,
1385
+ var _ = Math.floor(Math.log(h) / Math.LN2);
1386
+ _ === 1024 && (_ = 1023), g = h * Math.pow(2, -_), u(g * 4503599627370496 >>> 0, p, d + i), u(
1387
+ (y << 31 | _ + 1023 << 20 | g * 1048576 & 1048575) >>> 0,
1394
1388
  p,
1395
- d + c
1389
+ d + l
1396
1390
  );
1397
1391
  }
1398
1392
  }
1399
1393
  }
1400
1394
  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);
1395
+ function s(u, i, l, h, p) {
1396
+ var d = u(h, p + i), y = u(h, p + l), g = (y >> 31) * 2 + 1, _ = y >>> 20 & 2047, w = 4294967296 * (y & 1048575) + d;
1397
+ return _ === 2047 ? w ? NaN : g * (1 / 0) : _ === 0 ? g * 5e-324 * w : g * Math.pow(2, _ - 1075) * (w + 4503599627370496);
1404
1398
  }
1405
- n.readDoubleLE = s.bind(null, a, 0, 4), n.readDoubleBE = s.bind(null, l, 4, 0);
1399
+ n.readDoubleLE = s.bind(null, a, 0, 4), n.readDoubleBE = s.bind(null, c, 4, 0);
1406
1400
  }(), n;
1407
1401
  }
1408
1402
  function t(n, o, s) {
@@ -1414,7 +1408,7 @@ function requireFloat() {
1414
1408
  function a(n, o) {
1415
1409
  return (n[o] | n[o + 1] << 8 | n[o + 2] << 16 | n[o + 3] << 24) >>> 0;
1416
1410
  }
1417
- function l(n, o) {
1411
+ function c(n, o) {
1418
1412
  return (n[o] << 24 | n[o + 1] << 16 | n[o + 2] << 8 | n[o + 3]) >>> 0;
1419
1413
  }
1420
1414
  return float;
@@ -1438,18 +1432,18 @@ function requireUtf8() {
1438
1432
  return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(r) {
1439
1433
  var t = r;
1440
1434
  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;
1435
+ for (var c = 0, n = 0, o = 0; o < a.length; ++o)
1436
+ 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;
1437
+ return c;
1438
+ }, t.read = function(a, c, n) {
1439
+ var o = n - c;
1446
1440
  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);
1441
+ for (var s = null, u = [], i = 0, l; c < n; )
1442
+ 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
1443
  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) {
1444
+ }, t.write = function(a, c, n) {
1451
1445
  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);
1446
+ 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
1447
  return n - o;
1454
1448
  };
1455
1449
  }(utf8$2)), utf8$2;
@@ -1459,12 +1453,12 @@ function requirePool() {
1459
1453
  if (hasRequiredPool) return pool_1;
1460
1454
  hasRequiredPool = 1, pool_1 = r;
1461
1455
  function r(t, e, a) {
1462
- var l = a || 8192, n = l >>> 1, o = null, s = l;
1456
+ var c = a || 8192, n = c >>> 1, o = null, s = c;
1463
1457
  return function(i) {
1464
1458
  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;
1459
+ s + i > c && (o = t(c), s = 0);
1460
+ var l = e.call(o, s, s += i);
1461
+ return s & 7 && (s = (s | 7) + 1), l;
1468
1462
  };
1469
1463
  }
1470
1464
  return pool_1;
@@ -1514,11 +1508,11 @@ function requireLongbits() {
1514
1508
  }
1515
1509
  );
1516
1510
  };
1517
- var l = String.prototype.charCodeAt;
1511
+ var c = String.prototype.charCodeAt;
1518
1512
  return t.fromHash = function(o) {
1519
1513
  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
1514
+ (c.call(o, 0) | c.call(o, 1) << 8 | c.call(o, 2) << 16 | c.call(o, 3) << 24) >>> 0,
1515
+ (c.call(o, 4) | c.call(o, 5) << 8 | c.call(o, 6) << 16 | c.call(o, 7) << 24) >>> 0
1522
1516
  );
1523
1517
  }, t.prototype.toHash = function() {
1524
1518
  return String.fromCharCode(
@@ -1570,8 +1564,8 @@ function requireMinimal() {
1570
1564
  return s != null && n.hasOwnProperty(o) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
1571
1565
  }, t.Buffer = function() {
1572
1566
  try {
1573
- var l = t.inquire("buffer").Buffer;
1574
- return l.prototype.utf8Write ? l : (
1567
+ var c = t.inquire("buffer").Buffer;
1568
+ return c.prototype.utf8Write ? c : (
1575
1569
  /* istanbul ignore next */
1576
1570
  null
1577
1571
  );
@@ -1589,15 +1583,15 @@ function requireMinimal() {
1589
1583
  var s = t.LongBits.fromHash(n);
1590
1584
  return t.Long ? t.Long.fromBits(s.lo, s.hi, o) : s.toNumber(!!o);
1591
1585
  };
1592
- function e(l, n, o) {
1586
+ function e(c, n, o) {
1593
1587
  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;
1588
+ (c[s[u]] === void 0 || !o) && (c[s[u]] = n[s[u]]);
1589
+ return c;
1596
1590
  }
1597
1591
  t.merge = e, t.lcFirst = function(n) {
1598
1592
  return n.charAt(0).toLowerCase() + n.substring(1);
1599
1593
  };
1600
- function a(l) {
1594
+ function a(c) {
1601
1595
  function n(o, s) {
1602
1596
  if (!(this instanceof n)) return new n(o, s);
1603
1597
  Object.defineProperty(this, "message", {
@@ -1617,7 +1611,7 @@ function requireMinimal() {
1617
1611
  },
1618
1612
  name: {
1619
1613
  get: function() {
1620
- return l;
1614
+ return c;
1621
1615
  },
1622
1616
  set: void 0,
1623
1617
  enumerable: !1,
@@ -1655,15 +1649,15 @@ function requireMinimal() {
1655
1649
  bytes: String,
1656
1650
  json: !0
1657
1651
  }, t._configure = function() {
1658
- var l = t.Buffer;
1659
- if (!l) {
1652
+ var c = t.Buffer;
1653
+ if (!c) {
1660
1654
  t._Buffer_from = t._Buffer_allocUnsafe = null;
1661
1655
  return;
1662
1656
  }
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);
1657
+ t._Buffer_from = c.from !== Uint8Array.from && c.from || function(o, s) {
1658
+ return new c(o, s);
1659
+ }, t._Buffer_allocUnsafe = c.allocUnsafe || function(o) {
1660
+ return new c(o);
1667
1661
  };
1668
1662
  };
1669
1663
  }(minimal)), minimal;
@@ -1767,7 +1761,7 @@ var writeBytes = util$7.Array.prototype.set ? function r(t, e, a) {
1767
1761
  } : (
1768
1762
  /* istanbul ignore next */
1769
1763
  function r(t, e, a) {
1770
- for (var l = 0; l < t.length; ++l) e[a + l] = t[l];
1764
+ for (var c = 0; c < t.length; ++c) e[a + c] = t[c];
1771
1765
  }
1772
1766
  );
1773
1767
  Writer$1.prototype.bytes = function r(t) {
@@ -1816,8 +1810,8 @@ BufferWriter._configure = function() {
1816
1810
  if (t.copy)
1817
1811
  t.copy(e, a, 0, t.length);
1818
1812
  else
1819
- for (var l = 0; l < t.length; )
1820
- e[a++] = t[l++];
1813
+ for (var c = 0; c < t.length; )
1814
+ e[a++] = t[c++];
1821
1815
  }
1822
1816
  );
1823
1817
  };
@@ -1854,10 +1848,10 @@ var create_array = typeof Uint8Array < "u" ? function r(t) {
1854
1848
  }
1855
1849
  ), create = function r() {
1856
1850
  return util$5.Buffer ? function(e) {
1857
- return (Reader$1.create = function(l) {
1858
- return util$5.Buffer.isBuffer(l) ? new BufferReader$1(l) : (
1851
+ return (Reader$1.create = function(c) {
1852
+ return util$5.Buffer.isBuffer(c) ? new BufferReader$1(c) : (
1859
1853
  /* istanbul ignore next */
1860
- create_array(l)
1854
+ create_array(c)
1861
1855
  );
1862
1856
  })(e);
1863
1857
  } : (
@@ -1945,8 +1939,8 @@ Reader$1.prototype.bytes = function r() {
1945
1939
  if (this.pos += t, Array.isArray(this.buf))
1946
1940
  return this.buf.slice(e, a);
1947
1941
  if (e === a) {
1948
- var l = util$5.Buffer;
1949
- return l ? l.alloc(0) : new this.buf.constructor(0);
1942
+ var c = util$5.Buffer;
1943
+ return c ? c.alloc(0) : new this.buf.constructor(0);
1950
1944
  }
1951
1945
  return this._slice.call(this.buf, e, a);
1952
1946
  };
@@ -2032,10 +2026,10 @@ function Service$1(r, t, e) {
2032
2026
  if (typeof r != "function") throw TypeError("rpcImpl must be a function");
2033
2027
  util$3.EventEmitter.call(this), this.rpcImpl = r, this.requestDelimited = !!t, this.responseDelimited = !!e;
2034
2028
  }
2035
- Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2036
- if (!l) throw TypeError("request must be specified");
2029
+ Service$1.prototype.rpcCall = function r(t, e, a, c, n) {
2030
+ if (!c) throw TypeError("request must be specified");
2037
2031
  var o = this;
2038
- if (!n) return util$3.asPromise(r, o, t, e, a, l);
2032
+ if (!n) return util$3.asPromise(r, o, t, e, a, c);
2039
2033
  if (!o.rpcImpl) {
2040
2034
  setTimeout(function() {
2041
2035
  n(Error("already ended"));
@@ -2045,7 +2039,7 @@ Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2045
2039
  try {
2046
2040
  return o.rpcImpl(
2047
2041
  t,
2048
- e[o.requestDelimited ? "encodeDelimited" : "encode"](l).finish(),
2042
+ e[o.requestDelimited ? "encodeDelimited" : "encode"](c).finish(),
2049
2043
  function(u, i) {
2050
2044
  if (u)
2051
2045
  return o.emit("error", u, t), n(u);
@@ -2059,8 +2053,8 @@ Service$1.prototype.rpcCall = function r(t, e, a, l, n) {
2059
2053
  if (!(i instanceof a))
2060
2054
  try {
2061
2055
  i = a[o.responseDelimited ? "decodeDelimited" : "decode"](i);
2062
- } catch (c) {
2063
- return o.emit("error", c, t), n(c);
2056
+ } catch (l) {
2057
+ return o.emit("error", l, t), n(l);
2064
2058
  }
2065
2059
  return o.emit("data", i, t), n(null, i);
2066
2060
  }
@@ -2094,65 +2088,65 @@ function codegen(r, t) {
2094
2088
  var e = [];
2095
2089
  function a(n) {
2096
2090
  if (typeof n != "string") {
2097
- var o = l();
2091
+ var o = c();
2098
2092
  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);
2093
+ for (var s = Object.keys(n), u = new Array(s.length + 1), i = new Array(s.length), l = 0; l < s.length; )
2094
+ u[l] = s[l], i[l] = n[s[l++]];
2095
+ return u[l] = o, Function.apply(null, u).apply(null, i);
2102
2096
  }
2103
2097
  return Function(o)();
2104
2098
  }
2105
2099
  for (var h = new Array(arguments.length - 1), p = 0; p < h.length; )
2106
2100
  h[p] = arguments[++p];
2107
2101
  if (p = 0, n = n.replace(/%([%dfijs])/g, function(y, g) {
2108
- var T = h[p++];
2102
+ var _ = h[p++];
2109
2103
  switch (g) {
2110
2104
  case "d":
2111
2105
  case "f":
2112
- return String(Number(T));
2106
+ return String(Number(_));
2113
2107
  case "i":
2114
- return String(Math.floor(T));
2108
+ return String(Math.floor(_));
2115
2109
  case "j":
2116
- return JSON.stringify(T);
2110
+ return JSON.stringify(_);
2117
2111
  case "s":
2118
- return String(T);
2112
+ return String(_);
2119
2113
  }
2120
2114
  return "%";
2121
2115
  }), p !== h.length) throw Error("parameter count mismatch");
2122
2116
  return e.push(n), a;
2123
2117
  }
2124
- function l(n) {
2118
+ function c(n) {
2125
2119
  return "function " + (n || t || "") + "(" + (r && r.join(",") || "") + `){
2126
2120
  ` + e.join(`
2127
2121
  `) + `
2128
2122
  }`;
2129
2123
  }
2130
- return a.toString = l, a;
2124
+ return a.toString = c, a;
2131
2125
  }
2132
2126
  codegen.verbose = !1;
2133
2127
  var fetch_1 = fetch, asPromise = requireAspromise(), inquire = requireInquire(), fs = inquire("fs");
2134
2128
  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"));
2129
+ return typeof t == "function" ? (e = t, t = {}) : t || (t = {}), e ? !t.xhr && fs && fs.readFile ? fs.readFile(r, function(c, n) {
2130
+ return c && typeof XMLHttpRequest < "u" ? fetch.xhr(r, t, e) : c ? e(c) : e(null, t.binary ? n : n.toString("utf8"));
2137
2131
  }) : fetch.xhr(r, t, e) : asPromise(fetch, this, r, t);
2138
2132
  }
2139
2133
  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));
2134
+ var c = new XMLHttpRequest();
2135
+ c.onreadystatechange = function() {
2136
+ if (c.readyState === 4) {
2137
+ if (c.status !== 0 && c.status !== 200) return a(Error("status " + c.status));
2144
2138
  if (e.binary) {
2145
- var o = l.response;
2139
+ var o = c.response;
2146
2140
  if (!o) {
2147
2141
  o = [];
2148
- for (var s = 0; s < l.responseText.length; ++s)
2149
- o.push(l.responseText.charCodeAt(s) & 255);
2142
+ for (var s = 0; s < c.responseText.length; ++s)
2143
+ o.push(c.responseText.charCodeAt(s) & 255);
2150
2144
  }
2151
2145
  return a(null, typeof Uint8Array < "u" ? new Uint8Array(o) : o);
2152
2146
  }
2153
- return a(null, l.responseText);
2147
+ return a(null, c.responseText);
2154
2148
  }
2155
- }, e.binary && ("overrideMimeType" in l && l.overrideMimeType("text/plain; charset=x-user-defined"), l.responseType = "arraybuffer"), l.open("GET", t), l.send();
2149
+ }, e.binary && ("overrideMimeType" in c && c.overrideMimeType("text/plain; charset=x-user-defined"), c.responseType = "arraybuffer"), c.open("GET", t), c.send();
2156
2150
  };
2157
2151
  var path = {};
2158
2152
  (function(r) {
@@ -2219,12 +2213,12 @@ function requireTypes() {
2219
2213
  "bytes"
2220
2214
  // 14
2221
2215
  ];
2222
- function l(n, o) {
2216
+ function c(n, o) {
2223
2217
  var s = 0, u = {};
2224
2218
  for (o |= 0; s < n.length; ) u[a[s + o]] = n[s++];
2225
2219
  return u;
2226
2220
  }
2227
- t.basic = l([
2221
+ t.basic = c([
2228
2222
  /* double */
2229
2223
  1,
2230
2224
  /* float */
@@ -2255,7 +2249,7 @@ function requireTypes() {
2255
2249
  2,
2256
2250
  /* bytes */
2257
2251
  2
2258
- ]), t.defaults = l([
2252
+ ]), t.defaults = c([
2259
2253
  /* double */
2260
2254
  0,
2261
2255
  /* float */
@@ -2288,7 +2282,7 @@ function requireTypes() {
2288
2282
  e.emptyArray,
2289
2283
  /* message */
2290
2284
  null
2291
- ]), t.long = l(
2285
+ ]), t.long = c(
2292
2286
  [
2293
2287
  /* int64 */
2294
2288
  0,
@@ -2302,7 +2296,7 @@ function requireTypes() {
2302
2296
  1
2303
2297
  ],
2304
2298
  7
2305
- ), t.mapKey = l(
2299
+ ), t.mapKey = c(
2306
2300
  [
2307
2301
  /* int32 */
2308
2302
  0,
@@ -2330,7 +2324,7 @@ function requireTypes() {
2330
2324
  2
2331
2325
  ],
2332
2326
  2
2333
- ), t.packed = l([
2327
+ ), t.packed = c([
2334
2328
  /* double */
2335
2329
  1,
2336
2330
  /* float */
@@ -2366,17 +2360,17 @@ function requireField() {
2366
2360
  hasRequiredField = 1, field = o;
2367
2361
  var r = requireObject();
2368
2362
  ((o.prototype = Object.create(r.prototype)).constructor = o).className = "Field";
2369
- var t = require_enum(), e = requireTypes(), a = requireUtil(), l, n = /^required|optional|repeated$/;
2363
+ var t = require_enum(), e = requireTypes(), a = requireUtil(), c, n = /^required|optional|repeated$/;
2370
2364
  o.fromJSON = function(u, i) {
2371
2365
  return new o(u, i.id, i.type, i.rule, i.extend, i.options, i.comment);
2372
2366
  };
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");
2367
+ function o(s, u, i, l, h, p, d) {
2368
+ 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
2369
  if (!a.isString(i)) throw TypeError("type must be a string");
2376
- if (c !== void 0 && !n.test(c = c.toString().toLowerCase()))
2370
+ if (l !== void 0 && !n.test(l = l.toString().toLowerCase()))
2377
2371
  throw TypeError("rule must be a string rule");
2378
2372
  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 : (
2373
+ 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
2374
  /* istanbul ignore next */
2381
2375
  !1
2382
2376
  ), this.bytes = i === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = d;
@@ -2385,8 +2379,8 @@ function requireField() {
2385
2379
  get: function() {
2386
2380
  return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
2387
2381
  }
2388
- }), o.prototype.setOption = function(u, i, c) {
2389
- return u === "packed" && (this._packed = null), r.prototype.setOption.call(this, u, i, c);
2382
+ }), o.prototype.setOption = function(u, i, l) {
2383
+ return u === "packed" && (this._packed = null), r.prototype.setOption.call(this, u, i, l);
2390
2384
  }, o.prototype.toJSON = function(u) {
2391
2385
  var i = u ? !!u.keepComments : !1;
2392
2386
  return a.toObject([
@@ -2405,7 +2399,7 @@ function requireField() {
2405
2399
  ]);
2406
2400
  }, o.prototype.resolve = function() {
2407
2401
  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)
2402
+ 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
2403
  this.typeDefault = a.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
2410
2404
  else if (this.bytes && typeof this.typeDefault == "string") {
2411
2405
  var u;
@@ -2419,17 +2413,17 @@ function requireField() {
2419
2413
  0
2420
2414
  ), this.typeDefault = u;
2421
2415
  }
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) {
2416
+ 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);
2417
+ }, o.d = function(u, i, l, h) {
2424
2418
  return typeof i == "function" ? i = a.decorateType(i).name : i && typeof i == "object" && (i = a.decorateEnum(i).name), function(d, y) {
2425
2419
  a.decorateType(d.constructor).add(
2426
- new o(y, u, i, c, {
2420
+ new o(y, u, i, l, {
2427
2421
  default: h
2428
2422
  })
2429
2423
  );
2430
2424
  };
2431
2425
  }, o._configure = function(u) {
2432
- l = u;
2426
+ c = u;
2433
2427
  }, field;
2434
2428
  }
2435
2429
  var oneof, hasRequiredOneof;
@@ -2457,14 +2451,14 @@ function requireOneof() {
2457
2451
  s ? this.comment : void 0
2458
2452
  ]);
2459
2453
  };
2460
- function l(n) {
2454
+ function c(n) {
2461
2455
  if (n.parent)
2462
2456
  for (var o = 0; o < n.fieldsArray.length; ++o)
2463
2457
  n.fieldsArray[o].parent || n.parent.add(n.fieldsArray[o]);
2464
2458
  }
2465
2459
  return a.prototype.add = function(o) {
2466
2460
  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;
2461
+ 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
2462
  }, a.prototype.remove = function(o) {
2469
2463
  if (!(o instanceof t)) throw TypeError("field must be a Field");
2470
2464
  var s = this.fieldsArray.indexOf(o);
@@ -2476,15 +2470,15 @@ function requireOneof() {
2476
2470
  var i = o.get(this.oneof[u]);
2477
2471
  i && !i.partOf && (i.partOf = s, s.fieldsArray.push(i));
2478
2472
  }
2479
- l(this);
2473
+ c(this);
2480
2474
  }, a.prototype.onRemove = function(o) {
2481
2475
  for (var s = 0, u; s < this.fieldsArray.length; ++s)
2482
2476
  (u = this.fieldsArray[s]).parent && u.parent.remove(u);
2483
2477
  r.prototype.onRemove.call(this, o);
2484
2478
  }, a.d = function() {
2485
2479
  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, {
2480
+ return function(i, l) {
2481
+ e.decorateType(i.constructor).add(new a(l, o)), Object.defineProperty(i, l, {
2488
2482
  get: e.oneOfGetter(o),
2489
2483
  set: e.oneOfSetter(o)
2490
2484
  });
@@ -2497,13 +2491,13 @@ function requireNamespace() {
2497
2491
  hasRequiredNamespace = 1, namespace = u;
2498
2492
  var r = requireObject();
2499
2493
  ((u.prototype = Object.create(r.prototype)).constructor = u).className = "Namespace";
2500
- var t = requireField(), e = requireUtil(), a = requireOneof(), l, n, o;
2494
+ var t = requireField(), e = requireUtil(), a = requireOneof(), c, n, o;
2501
2495
  u.fromJSON = function(h, p) {
2502
2496
  return new u(h, p.options).addJSON(p.nested);
2503
2497
  };
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);
2498
+ function s(l, h) {
2499
+ if (l && l.length) {
2500
+ for (var p = {}, d = 0; d < l.length; ++d) p[l[d].name] = l[d].toJSON(h);
2507
2501
  return p;
2508
2502
  }
2509
2503
  }
@@ -2520,11 +2514,11 @@ function requireNamespace() {
2520
2514
  }
2521
2515
  return !1;
2522
2516
  };
2523
- function u(c, h) {
2524
- r.call(this, c, h), this.nested = void 0, this._nestedArray = null;
2517
+ function u(l, h) {
2518
+ r.call(this, l, h), this.nested = void 0, this._nestedArray = null;
2525
2519
  }
2526
- function i(c) {
2527
- return c._nestedArray = null, c;
2520
+ function i(l) {
2521
+ return l._nestedArray = null, l;
2528
2522
  }
2529
2523
  return Object.defineProperty(u.prototype, "nestedArray", {
2530
2524
  get: function() {
@@ -2543,7 +2537,7 @@ function requireNamespace() {
2543
2537
  for (var d = Object.keys(h), y = 0, g; y < d.length; ++y)
2544
2538
  g = h[d[y]], p.add(
2545
2539
  // 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)
2540
+ (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
2541
  );
2548
2542
  return this;
2549
2543
  }, u.prototype.get = function(h) {
@@ -2552,13 +2546,13 @@ function requireNamespace() {
2552
2546
  if (this.nested && this.nested[h] instanceof o) return this.nested[h].values;
2553
2547
  throw Error("no such enum: " + h);
2554
2548
  }, 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))
2549
+ if (!(h instanceof t && h.extend !== void 0 || h instanceof c || h instanceof a || h instanceof o || h instanceof n || h instanceof u))
2556
2550
  throw TypeError("object must be a valid nested object");
2557
2551
  if (!this.nested) this.nested = {};
2558
2552
  else {
2559
2553
  var p = this.get(h.name);
2560
2554
  if (p)
2561
- if (p instanceof u && h instanceof u && !(p instanceof l || p instanceof n)) {
2555
+ if (p instanceof u && h instanceof u && !(p instanceof c || p instanceof n)) {
2562
2556
  for (var d = p.nestedArray, y = 0; y < d.length; ++y) h.add(d[y]);
2563
2557
  this.remove(p), this.nested || (this.nested = {}), h.setOptions(p.options, !0);
2564
2558
  } else throw Error("duplicate name '" + h.name + "' in " + this);
@@ -2601,7 +2595,7 @@ function requireNamespace() {
2601
2595
  return y;
2602
2596
  return this.parent === null || d ? null : this.parent.lookup(h, p);
2603
2597
  }, u.prototype.lookupType = function(h) {
2604
- var p = this.lookup(h, [l]);
2598
+ var p = this.lookup(h, [c]);
2605
2599
  if (!p) throw Error("no such type: " + h);
2606
2600
  return p;
2607
2601
  }, u.prototype.lookupEnum = function(h) {
@@ -2609,15 +2603,15 @@ function requireNamespace() {
2609
2603
  if (!p) throw Error("no such Enum '" + h + "' in " + this);
2610
2604
  return p;
2611
2605
  }, u.prototype.lookupTypeOrEnum = function(h) {
2612
- var p = this.lookup(h, [l, o]);
2606
+ var p = this.lookup(h, [c, o]);
2613
2607
  if (!p) throw Error("no such Type or Enum '" + h + "' in " + this);
2614
2608
  return p;
2615
2609
  }, u.prototype.lookupService = function(h) {
2616
2610
  var p = this.lookup(h, [n]);
2617
2611
  if (!p) throw Error("no such Service '" + h + "' in " + this);
2618
2612
  return p;
2619
- }, u._configure = function(c, h, p) {
2620
- l = c, n = h, o = p;
2613
+ }, u._configure = function(l, h, p) {
2614
+ c = l, n = h, o = p;
2621
2615
  }, namespace;
2622
2616
  }
2623
2617
  var mapfield, hasRequiredMapfield;
@@ -2627,8 +2621,8 @@ function requireMapfield() {
2627
2621
  var r = requireField();
2628
2622
  ((a.prototype = Object.create(r.prototype)).constructor = a).className = "MapField";
2629
2623
  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");
2624
+ function a(c, n, o, s, u, i) {
2625
+ if (r.call(this, c, n, s, void 0, void 0, u, i), !e.isString(o)) throw TypeError("keyType must be a string");
2632
2626
  this.keyType = o, this.resolvedKeyType = null, this.map = !0;
2633
2627
  }
2634
2628
  return a.fromJSON = function(n, o) {
@@ -2654,8 +2648,8 @@ function requireMapfield() {
2654
2648
  if (t.mapKey[this.keyType] === void 0) throw Error("invalid key type: " + this.keyType);
2655
2649
  return r.prototype.resolve.call(this);
2656
2650
  }, 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));
2651
+ return typeof s == "function" ? s = e.decorateType(s).name : s && typeof s == "object" && (s = e.decorateEnum(s).name), function(i, l) {
2652
+ e.decorateType(i.constructor).add(new a(l, n, o, s));
2659
2653
  };
2660
2654
  }, mapfield;
2661
2655
  }
@@ -2666,15 +2660,15 @@ function requireMethod() {
2666
2660
  var r = requireObject();
2667
2661
  ((e.prototype = Object.create(r.prototype)).constructor = e).className = "Method";
2668
2662
  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");
2663
+ function e(a, c, n, o, s, u, i, l, h) {
2664
+ 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
2665
  if (!t.isString(n)) throw TypeError("requestType must be a string");
2672
2666
  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;
2667
+ 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
2668
  }
2675
- return e.fromJSON = function(l, n) {
2669
+ return e.fromJSON = function(c, n) {
2676
2670
  return new e(
2677
- l,
2671
+ c,
2678
2672
  n.type,
2679
2673
  n.requestType,
2680
2674
  n.responseType,
@@ -2684,8 +2678,8 @@ function requireMethod() {
2684
2678
  n.comment,
2685
2679
  n.parsedOptions
2686
2680
  );
2687
- }, e.prototype.toJSON = function(l) {
2688
- var n = l ? !!l.keepComments : !1;
2681
+ }, e.prototype.toJSON = function(c) {
2682
+ var n = c ? !!c.keepComments : !1;
2689
2683
  return t.toObject([
2690
2684
  "type",
2691
2685
  this.type !== "rpc" && /* istanbul ignore next */
@@ -2712,20 +2706,20 @@ function requireMethod() {
2712
2706
  var service, hasRequiredService;
2713
2707
  function requireService() {
2714
2708
  if (hasRequiredService) return service;
2715
- hasRequiredService = 1, service = l;
2709
+ hasRequiredService = 1, service = c;
2716
2710
  var r = requireNamespace();
2717
- ((l.prototype = Object.create(r.prototype)).constructor = l).className = "Service";
2711
+ ((c.prototype = Object.create(r.prototype)).constructor = c).className = "Service";
2718
2712
  var t = requireMethod(), e = requireUtil(), a = rpc;
2719
- function l(o, s) {
2713
+ function c(o, s) {
2720
2714
  r.call(this, o, s), this.methods = {}, this._methodsArray = null;
2721
2715
  }
2722
- l.fromJSON = function(s, u) {
2723
- var i = new l(s, u.options);
2716
+ c.fromJSON = function(s, u) {
2717
+ var i = new c(s, u.options);
2724
2718
  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]]));
2719
+ for (var l = Object.keys(u.methods), h = 0; h < l.length; ++h)
2720
+ i.add(t.fromJSON(l[h], u.methods[l[h]]));
2727
2721
  return u.nested && i.addJSON(u.nested), i.comment = u.comment, i;
2728
- }, l.prototype.toJSON = function(s) {
2722
+ }, c.prototype.toJSON = function(s) {
2729
2723
  var u = r.prototype.toJSON.call(this, s), i = s ? !!s.keepComments : !1;
2730
2724
  return e.toObject([
2731
2725
  "options",
@@ -2738,7 +2732,7 @@ function requireService() {
2738
2732
  "comment",
2739
2733
  i ? this.comment : void 0
2740
2734
  ]);
2741
- }, Object.defineProperty(l.prototype, "methodsArray", {
2735
+ }, Object.defineProperty(c.prototype, "methodsArray", {
2742
2736
  get: function() {
2743
2737
  return this._methodsArray || (this._methodsArray = e.toArray(this.methods));
2744
2738
  }
@@ -2746,25 +2740,25 @@ function requireService() {
2746
2740
  function n(o) {
2747
2741
  return o._methodsArray = null, o;
2748
2742
  }
2749
- return l.prototype.get = function(s) {
2743
+ return c.prototype.get = function(s) {
2750
2744
  return this.methods[s] || r.prototype.get.call(this, s);
2751
- }, l.prototype.resolveAll = function() {
2745
+ }, c.prototype.resolveAll = function() {
2752
2746
  for (var s = this.methodsArray, u = 0; u < s.length; ++u) s[u].resolve();
2753
2747
  return r.prototype.resolve.call(this);
2754
- }, l.prototype.add = function(s) {
2748
+ }, c.prototype.add = function(s) {
2755
2749
  if (this.get(s.name)) throw Error("duplicate name '" + s.name + "' in " + this);
2756
2750
  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) {
2751
+ }, c.prototype.remove = function(s) {
2758
2752
  if (s instanceof t) {
2759
2753
  if (this.methods[s.name] !== s) throw Error(s + " is not a member of " + this);
2760
2754
  return delete this.methods[s.name], s.parent = null, n(this);
2761
2755
  }
2762
2756
  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 */
2757
+ }, c.prototype.create = function(s, u, i) {
2758
+ for (var l = new a.Service(s, u, i), h = 0, p; h < /* initializes */
2765
2759
  this.methodsArray.length; ++h) {
2766
2760
  var d = e.lcFirst((p = this._methodsArray[h]).resolve().name).replace(/[^$\w_]/g, "");
2767
- c[d] = e.codegen(
2761
+ l[d] = e.codegen(
2768
2762
  ["r", "c"],
2769
2763
  e.isReserved(d) ? d + "_" : d
2770
2764
  )("return this.rpcCall(m,q,s,r,c)")({
@@ -2773,7 +2767,7 @@ function requireService() {
2773
2767
  s: p.resolvedResponseType.ctor
2774
2768
  });
2775
2769
  }
2776
- return c;
2770
+ return l;
2777
2771
  }, service;
2778
2772
  }
2779
2773
  var message = Message, util$1 = requireMinimal();
@@ -2812,12 +2806,12 @@ Message.prototype.toJSON = function r() {
2812
2806
  var decoder_1, hasRequiredDecoder;
2813
2807
  function requireDecoder() {
2814
2808
  if (hasRequiredDecoder) return decoder_1;
2815
- hasRequiredDecoder = 1, decoder_1 = l;
2809
+ hasRequiredDecoder = 1, decoder_1 = c;
2816
2810
  var r = require_enum(), t = requireTypes(), e = requireUtil();
2817
2811
  function a(n) {
2818
2812
  return "missing required '" + n.name + "'";
2819
2813
  }
2820
- function l(n) {
2814
+ function c(n) {
2821
2815
  var o = e.codegen(["r", "l"], n.name + "$decode")("if(!(r instanceof Reader))")(
2822
2816
  "r=Reader.create(r)"
2823
2817
  )(
@@ -2828,23 +2822,23 @@ function requireDecoder() {
2828
2822
  n.group && o("if((t&7)===4)")("break"), o("switch(t>>>3){");
2829
2823
  for (var s = 0; s < /* initializes */
2830
2824
  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){")(
2825
+ var u = n._fieldsArray[s].resolve(), i = u.resolvedType instanceof r ? "int32" : u.type, l = "m" + e.safeProp(u.name);
2826
+ 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
2827
  "case 1: k=r.%s(); break",
2834
2828
  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)")(
2829
+ )("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
2830
  "%s.push(r.%s())",
2837
- c,
2831
+ l,
2838
2832
  i
2839
2833
  )("}else"), t.basic[i] === void 0 ? o(
2840
2834
  u.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))",
2841
- c,
2835
+ l,
2842
2836
  s
2843
- ) : o("%s.push(r.%s())", c, i)) : t.basic[i] === void 0 ? o(
2837
+ ) : o("%s.push(r.%s())", l, i)) : t.basic[i] === void 0 ? o(
2844
2838
  u.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())",
2845
- c,
2839
+ l,
2846
2840
  s
2847
- ) : o("%s=r.%s()", c, i), o("break")("}");
2841
+ ) : o("%s=r.%s()", l, i), o("break")("}");
2848
2842
  }
2849
2843
  for (o("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s < n._fieldsArray.length; ++s) {
2850
2844
  var h = n._fieldsArray[s];
@@ -2869,8 +2863,8 @@ function requireVerifier() {
2869
2863
  if (s.resolvedType)
2870
2864
  if (s.resolvedType instanceof r) {
2871
2865
  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]]);
2866
+ for (var l = Object.keys(s.resolvedType.values), h = 0; h < l.length; ++h)
2867
+ o("case %i:", s.resolvedType.values[l[h]]);
2874
2868
  o("break")("}");
2875
2869
  } else
2876
2870
  o("{")("var e=types[%i].verify(%s);", u, i)("if(e)")(
@@ -2920,7 +2914,7 @@ function requireVerifier() {
2920
2914
  }
2921
2915
  return o;
2922
2916
  }
2923
- function l(o, s, u) {
2917
+ function c(o, s, u) {
2924
2918
  switch (s.keyType) {
2925
2919
  case "int32":
2926
2920
  case "uint32":
@@ -2952,25 +2946,25 @@ function requireVerifier() {
2952
2946
  "object expected"
2953
2947
  ), u = o.oneofsArray, i = {};
2954
2948
  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);
2949
+ for (var l = 0; l < /* initializes */
2950
+ o.fieldsArray.length; ++l) {
2951
+ var h = o._fieldsArray[l].resolve(), p = "m" + t.safeProp(h.name);
2958
2952
  if (h.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", p, h.name), h.map)
2959
2953
  s("if(!util.isObject(%s))", p)("return%j", e(h, "object"))(
2960
2954
  "var k=Object.keys(%s)",
2961
2955
  p
2962
- )("for(var i=0;i<k.length;++i){"), l(s, h, "k[i]"), a(s, h, c, p + "[k[i]]")("}");
2956
+ )("for(var i=0;i<k.length;++i){"), c(s, h, "k[i]"), a(s, h, l, p + "[k[i]]")("}");
2963
2957
  else if (h.repeated)
2964
2958
  s("if(!Array.isArray(%s))", p)("return%j", e(h, "array"))(
2965
2959
  "for(var i=0;i<%s.length;++i){",
2966
2960
  p
2967
- ), a(s, h, c, p + "[i]")("}");
2961
+ ), a(s, h, l, p + "[i]")("}");
2968
2962
  else {
2969
2963
  if (h.partOf) {
2970
2964
  var d = t.safeProp(h.partOf.name);
2971
2965
  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
2966
  }
2973
- a(s, h, c, p);
2967
+ a(s, h, l, p);
2974
2968
  }
2975
2969
  h.optional && s("}");
2976
2970
  }
@@ -2982,17 +2976,17 @@ var converter = {}, hasRequiredConverter;
2982
2976
  function requireConverter() {
2983
2977
  return hasRequiredConverter || (hasRequiredConverter = 1, function(r) {
2984
2978
  var t = r, e = require_enum(), a = requireUtil();
2985
- function l(o, s, u, i) {
2986
- var c = !1;
2979
+ function c(o, s, u, i) {
2980
+ var l = !1;
2987
2981
  if (s.resolvedType)
2988
2982
  if (s.resolvedType instanceof e) {
2989
2983
  o("switch(d%s){", i);
2990
2984
  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(
2985
+ 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
2986
  // fallback to default value only for
2993
2987
  // arrays, to avoid leaving holes.
2994
2988
  "break"
2995
- ), c = !0), o("case%j:", p[d])("case %i:", h[p[d]])("m%s=%j", i, h[p[d]])(
2989
+ ), l = !0), o("case%j:", p[d])("case %i:", h[p[d]])("m%s=%j", i, h[p[d]])(
2996
2990
  "break"
2997
2991
  );
2998
2992
  o("}");
@@ -3019,7 +3013,6 @@ function requireConverter() {
3019
3013
  break;
3020
3014
  case "uint64":
3021
3015
  y = !0;
3022
- // eslint-disable-next-line no-fallthrough
3023
3016
  case "int64":
3024
3017
  case "sint64":
3025
3018
  case "fixed64":
@@ -3069,35 +3062,35 @@ function requireConverter() {
3069
3062
  );
3070
3063
  if (!u.length) return i("return new this.ctor");
3071
3064
  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);
3065
+ for (var l = 0; l < u.length; ++l) {
3066
+ var h = u[l].resolve(), p = a.safeProp(h.name);
3074
3067
  h.map ? (i("if(d%s){", p)('if(typeof d%s!=="object")', p)(
3075
3068
  "throw TypeError(%j)",
3076
3069
  h.fullName + ": object expected"
3077
- )("m%s={}", p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", p), l(
3070
+ )("m%s={}", p)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", p), c(
3078
3071
  i,
3079
3072
  h,
3080
3073
  /* not sorted */
3081
- c,
3074
+ l,
3082
3075
  p + "[ks[i]]"
3083
3076
  )("}")("}")) : h.repeated ? (i("if(d%s){", p)("if(!Array.isArray(d%s))", p)(
3084
3077
  "throw TypeError(%j)",
3085
3078
  h.fullName + ": array expected"
3086
- )("m%s=[]", p)("for(var i=0;i<d%s.length;++i){", p), l(
3079
+ )("m%s=[]", p)("for(var i=0;i<d%s.length;++i){", p), c(
3087
3080
  i,
3088
3081
  h,
3089
3082
  /* not sorted */
3090
- c,
3083
+ l,
3091
3084
  p + "[i]"
3092
3085
  )("}")("}")) : (h.resolvedType instanceof e || i(
3093
3086
  // no need to test for null/undefined if an enum (uses switch)
3094
3087
  "if(d%s!=null){",
3095
3088
  p
3096
- ), l(
3089
+ ), c(
3097
3090
  i,
3098
3091
  h,
3099
3092
  /* not sorted */
3100
- c,
3093
+ l,
3101
3094
  p
3102
3095
  ), h.resolvedType instanceof e || i("}"));
3103
3096
  }
@@ -3116,15 +3109,14 @@ function requireConverter() {
3116
3109
  i
3117
3110
  ) : o("d%s=types[%i].toObject(m%s,o)", i, u, i);
3118
3111
  else {
3119
- var c = !1;
3112
+ var l = !1;
3120
3113
  switch (s.type) {
3121
3114
  case "double":
3122
3115
  case "float":
3123
3116
  o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", i, i, i, i);
3124
3117
  break;
3125
3118
  case "uint64":
3126
- c = !0;
3127
- // eslint-disable-next-line no-fallthrough
3119
+ l = !0;
3128
3120
  case "int64":
3129
3121
  case "sint64":
3130
3122
  case "fixed64":
@@ -3141,7 +3133,7 @@ function requireConverter() {
3141
3133
  i,
3142
3134
  i,
3143
3135
  i,
3144
- c ? "true" : "",
3136
+ l ? "true" : "",
3145
3137
  i
3146
3138
  );
3147
3139
  break;
@@ -3165,11 +3157,11 @@ function requireConverter() {
3165
3157
  t.toObject = function(s) {
3166
3158
  var u = s.fieldsArray.slice().sort(a.compareFieldsById);
3167
3159
  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));
3160
+ for (var i = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], h = [], p = [], d = 0; d < u.length; ++d)
3161
+ u[d].partOf || (u[d].resolve().repeated ? l : u[d].map ? h : p).push(u[d]);
3162
+ if (l.length) {
3163
+ for (i("if(o.arrays||o.defaults){"), d = 0; d < l.length; ++d)
3164
+ i("d%s=[]", a.safeProp(l[d].name));
3173
3165
  i("}");
3174
3166
  }
3175
3167
  if (h.length) {
@@ -3202,12 +3194,12 @@ function requireConverter() {
3202
3194
  y.typeDefault.toNumber()
3203
3195
  );
3204
3196
  else if (y.bytes) {
3205
- var T = "[" + Array.prototype.slice.call(y.typeDefault).join(",") + "]";
3197
+ var _ = "[" + Array.prototype.slice.call(y.typeDefault).join(",") + "]";
3206
3198
  i(
3207
3199
  "if(o.bytes===String)d%s=%j",
3208
3200
  g,
3209
3201
  String.fromCharCode.apply(String, y.typeDefault)
3210
- )("else{")("d%s=%s", g, T)(
3202
+ )("else{")("d%s=%s", g, _)(
3211
3203
  "if(o.bytes!==Array)d%s=util.newBuffer(d%s)",
3212
3204
  g,
3213
3205
  g
@@ -3216,10 +3208,10 @@ function requireConverter() {
3216
3208
  }
3217
3209
  i("}");
3218
3210
  }
3219
- var _ = !1;
3211
+ var w = !1;
3220
3212
  for (d = 0; d < u.length; ++d) {
3221
3213
  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)(
3214
+ y.map ? (w || (w = !0, i("var ks2")), i("if(m%s&&(ks2=Object.keys(m%s)).length){", g, g)("d%s={}", g)(
3223
3215
  "for(var j=0;j<ks2.length;++j){"
3224
3216
  ), n(
3225
3217
  i,
@@ -3254,7 +3246,7 @@ var wrappers = {};
3254
3246
  t[".google.protobuf.Any"] = {
3255
3247
  fromObject: function(a) {
3256
3248
  if (a && a["@type"]) {
3257
- var l = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), n = this.lookup(l);
3249
+ var c = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), n = this.lookup(c);
3258
3250
  if (n) {
3259
3251
  var o = a["@type"].charAt(0) === "." ? a["@type"].slice(1) : a["@type"];
3260
3252
  return o.indexOf("/") === -1 && (o = "/" + o), this.create({
@@ -3265,18 +3257,18 @@ var wrappers = {};
3265
3257
  }
3266
3258
  return this.fromObject(a);
3267
3259
  },
3268
- toObject: function(a, l) {
3260
+ toObject: function(a, c) {
3269
3261
  var n = "type.googleapis.com/", o = "", s = "";
3270
- if (l && l.json && a.type_url && a.value) {
3262
+ if (c && c.json && a.type_url && a.value) {
3271
3263
  s = a.type_url.substring(a.type_url.lastIndexOf("/") + 1), o = a.type_url.substring(0, a.type_url.lastIndexOf("/") + 1);
3272
3264
  var u = this.lookup(s);
3273
3265
  u && (a = u.decode(a.value));
3274
3266
  }
3275
3267
  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;
3268
+ var i = a.$type.toObject(a, c), l = a.$type.fullName[0] === "." ? a.$type.fullName.slice(1) : a.$type.fullName;
3269
+ return o === "" && (o = n), s = o + l, i["@type"] = s, i;
3278
3270
  }
3279
- return this.toObject(a, l);
3271
+ return this.toObject(a, c);
3280
3272
  }
3281
3273
  };
3282
3274
  })(wrappers);
@@ -3286,9 +3278,9 @@ function requireType() {
3286
3278
  hasRequiredType = 1, type = g;
3287
3279
  var r = requireNamespace();
3288
3280
  ((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;
3281
+ 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;
3282
+ function g(w, m) {
3283
+ 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
3284
  }
3293
3285
  Object.defineProperties(g.prototype, {
3294
3286
  /**
@@ -3301,8 +3293,8 @@ function requireType() {
3301
3293
  get: function() {
3302
3294
  if (this._fieldsById) return this._fieldsById;
3303
3295
  this._fieldsById = {};
3304
- for (var _ = Object.keys(this.fields), m = 0; m < _.length; ++m) {
3305
- var b = this.fields[_[m]], v = b.id;
3296
+ for (var w = Object.keys(this.fields), m = 0; m < w.length; ++m) {
3297
+ var b = this.fields[w[m]], v = b.id;
3306
3298
  if (this._fieldsById[v]) throw Error("duplicate id " + v + " in " + this);
3307
3299
  this._fieldsById[v] = b;
3308
3300
  }
@@ -3341,9 +3333,9 @@ function requireType() {
3341
3333
  get: function() {
3342
3334
  return this._ctor || (this.ctor = g.generateConstructor(this)());
3343
3335
  },
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 = _;
3336
+ set: function(w) {
3337
+ var m = w.prototype;
3338
+ 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
3339
  for (var b = 0; b < /* initializes */
3348
3340
  this.fieldsArray.length; ++b) this._fieldsArray[b].resolve();
3349
3341
  var v = {};
@@ -3353,39 +3345,39 @@ function requireType() {
3353
3345
  get: i.oneOfGetter(this._oneofsArray[b].oneof),
3354
3346
  set: i.oneOfSetter(this._oneofsArray[b].oneof)
3355
3347
  };
3356
- b && Object.defineProperties(_.prototype, v);
3348
+ b && Object.defineProperties(w.prototype, v);
3357
3349
  }
3358
3350
  }
3359
3351
  }), 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));
3352
+ for (var b = i.codegen(["p"], m.name), v = 0, E; v < m.fieldsArray.length; ++v)
3353
+ (E = m._fieldsArray[v]).map ? b("this%s={}", i.safeProp(E.name)) : E.repeated && b("this%s=[]", i.safeProp(E.name));
3362
3354
  return b("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")(
3363
3355
  // omit undefined or null
3364
3356
  "this[ks[i]]=p[ks[i]]"
3365
3357
  );
3366
3358
  };
3367
- function T(_) {
3368
- return _._fieldsById = _._fieldsArray = _._oneofsArray = null, delete _.encode, delete _.decode, delete _.verify, _;
3359
+ function _(w) {
3360
+ return w._fieldsById = w._fieldsArray = w._oneofsArray = null, delete w.encode, delete w.decode, delete w.verify, w;
3369
3361
  }
3370
3362
  return g.fromJSON = function(m, b) {
3371
3363
  var v = new g(m, b.options);
3372
3364
  v.extensions = b.extensions, v.reserved = b.reserved;
3373
- for (var x = Object.keys(b.fields), O = 0; O < x.length; ++O)
3365
+ for (var E = Object.keys(b.fields), T = 0; T < E.length; ++T)
3374
3366
  v.add(
3375
- (typeof b.fields[x[O]].keyType < "u" ? l.fromJSON : a.fromJSON)(
3376
- x[O],
3377
- b.fields[x[O]]
3367
+ (typeof b.fields[E[T]].keyType < "u" ? c.fromJSON : a.fromJSON)(
3368
+ E[T],
3369
+ b.fields[E[T]]
3378
3370
  )
3379
3371
  );
3380
3372
  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]]));
3373
+ for (E = Object.keys(b.oneofs), T = 0; T < E.length; ++T)
3374
+ v.add(e.fromJSON(E[T], b.oneofs[E[T]]));
3383
3375
  if (b.nested)
3384
- for (x = Object.keys(b.nested), O = 0; O < x.length; ++O) {
3385
- var E = b.nested[x[O]];
3376
+ for (E = Object.keys(b.nested), T = 0; T < E.length; ++T) {
3377
+ var R = b.nested[E[T]];
3386
3378
  v.add(
3387
3379
  // 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)
3380
+ (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
3381
  );
3390
3382
  }
3391
3383
  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 +3390,8 @@ function requireType() {
3398
3390
  r.arrayToJSON(this.oneofsArray, m),
3399
3391
  "fields",
3400
3392
  r.arrayToJSON(
3401
- this.fieldsArray.filter(function(x) {
3402
- return !x.declaringField;
3393
+ this.fieldsArray.filter(function(E) {
3394
+ return !E.declaringField;
3403
3395
  }),
3404
3396
  m
3405
3397
  ) || {},
@@ -3432,19 +3424,19 @@ function requireType() {
3432
3424
  if (this.isReservedId(m.id)) throw Error("id " + m.id + " is reserved in " + this);
3433
3425
  if (this.isReservedName(m.name))
3434
3426
  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);
3427
+ return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), _(this);
3436
3428
  }
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);
3429
+ return m instanceof e ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), _(this)) : r.prototype.add.call(this, m);
3438
3430
  }, g.prototype.remove = function(m) {
3439
3431
  if (m instanceof a && m.extend === void 0) {
3440
3432
  if (!this.fields || this.fields[m.name] !== m)
3441
3433
  throw Error(m + " is not a member of " + this);
3442
- return delete this.fields[m.name], m.parent = null, m.onRemove(this), T(this);
3434
+ return delete this.fields[m.name], m.parent = null, m.onRemove(this), _(this);
3443
3435
  }
3444
3436
  if (m instanceof e) {
3445
3437
  if (!this.oneofs || this.oneofs[m.name] !== m)
3446
3438
  throw Error(m + " is not a member of " + this);
3447
- return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), T(this);
3439
+ return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), _(this);
3448
3440
  }
3449
3441
  return r.prototype.remove.call(this, m);
3450
3442
  }, g.prototype.isReservedId = function(m) {
@@ -3457,7 +3449,7 @@ function requireType() {
3457
3449
  for (var m = this.fullName, b = [], v = 0; v < /* initializes */
3458
3450
  this.fieldsArray.length; ++v)
3459
3451
  b.push(this._fieldsArray[v].resolve().resolvedType);
3460
- this.encode = c(this)({
3452
+ this.encode = l(this)({
3461
3453
  Writer: u,
3462
3454
  types: b,
3463
3455
  util: i
@@ -3475,10 +3467,10 @@ function requireType() {
3475
3467
  types: b,
3476
3468
  util: i
3477
3469
  });
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);
3470
+ var E = y[m];
3471
+ if (E) {
3472
+ var T = Object.create(this);
3473
+ T.fromObject = this.fromObject, this.fromObject = E.fromObject.bind(T), T.toObject = this.toObject, this.toObject = E.toObject.bind(T);
3482
3474
  }
3483
3475
  return this;
3484
3476
  }, g.prototype.encode = function(m, b) {
@@ -3507,90 +3499,90 @@ function requireRoot() {
3507
3499
  hasRequiredRoot = 1, root$1 = u;
3508
3500
  var r = requireNamespace();
3509
3501
  ((u.prototype = Object.create(r.prototype)).constructor = u).className = "Root";
3510
- var t = requireField(), e = require_enum(), a = requireOneof(), l = requireUtil(), n, o, s;
3502
+ var t = requireField(), e = require_enum(), a = requireOneof(), c = requireUtil(), n, o, s;
3511
3503
  function u(p) {
3512
3504
  r.call(this, "", p), this.deferred = [], this.files = [];
3513
3505
  }
3514
3506
  u.fromJSON = function(d, y) {
3515
3507
  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;
3508
+ }, u.prototype.resolvePath = c.path.resolve, u.prototype.fetch = c.fetch;
3517
3509
  function i() {
3518
3510
  }
3519
3511
  u.prototype.load = function p(d, y, g) {
3520
3512
  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, $) {
3513
+ var _ = this;
3514
+ if (!g) return c.asPromise(p, _, d, y);
3515
+ var w = g === i;
3516
+ function m(A, $) {
3525
3517
  if (g) {
3526
- if (_) throw S;
3518
+ if (w) throw A;
3527
3519
  var k = g;
3528
- g = null, k(S, $);
3520
+ g = null, k(A, $);
3529
3521
  }
3530
3522
  }
3531
- function b(S) {
3532
- var $ = S.lastIndexOf("google/protobuf/");
3523
+ function b(A) {
3524
+ var $ = A.lastIndexOf("google/protobuf/");
3533
3525
  if ($ > -1) {
3534
- var k = S.substring($);
3526
+ var k = A.substring($);
3535
3527
  if (k in s) return k;
3536
3528
  }
3537
3529
  return null;
3538
3530
  }
3539
- function v(S, $) {
3531
+ function v(A, $) {
3540
3532
  try {
3541
- if (l.isString($) && $.charAt(0) === "{" && ($ = JSON.parse($)), !l.isString($)) T.setOptions($.options).addJSON($.nested);
3533
+ if (c.isString($) && $.charAt(0) === "{" && ($ = JSON.parse($)), !c.isString($)) _.setOptions($.options).addJSON($.nested);
3542
3534
  else {
3543
- o.filename = S;
3544
- var k = o($, T, y), D, M = 0;
3535
+ o.filename = A;
3536
+ var k = o($, _, y), D, M = 0;
3545
3537
  if (k.imports)
3546
3538
  for (; M < k.imports.length; ++M)
3547
- (D = b(k.imports[M]) || T.resolvePath(S, k.imports[M])) && x(D);
3539
+ (D = b(k.imports[M]) || _.resolvePath(A, k.imports[M])) && E(D);
3548
3540
  if (k.weakImports)
3549
3541
  for (M = 0; M < k.weakImports.length; ++M)
3550
- (D = b(k.weakImports[M]) || T.resolvePath(S, k.weakImports[M])) && x(D, !0);
3542
+ (D = b(k.weakImports[M]) || _.resolvePath(A, k.weakImports[M])) && E(D, !0);
3551
3543
  }
3552
3544
  } catch (L) {
3553
3545
  m(L);
3554
3546
  }
3555
- !_ && !O && m(null, T);
3547
+ !w && !T && m(null, _);
3556
3548
  }
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]);
3549
+ function E(A, $) {
3550
+ if (A = b(A) || A, !(_.files.indexOf(A) > -1)) {
3551
+ if (_.files.push(A), A in s) {
3552
+ w ? v(A, s[A]) : (++T, setTimeout(function() {
3553
+ --T, v(A, s[A]);
3562
3554
  }));
3563
3555
  return;
3564
3556
  }
3565
- if (_) {
3557
+ if (w) {
3566
3558
  var k;
3567
3559
  try {
3568
- k = l.fs.readFileSync(S).toString("utf8");
3560
+ k = c.fs.readFileSync(A).toString("utf8");
3569
3561
  } catch (D) {
3570
3562
  $ || m(D);
3571
3563
  return;
3572
3564
  }
3573
- v(S, k);
3565
+ v(A, k);
3574
3566
  } else
3575
- ++O, T.fetch(S, function(D, M) {
3576
- if (--O, !!g) {
3567
+ ++T, _.fetch(A, function(D, M) {
3568
+ if (--T, !!g) {
3577
3569
  if (D) {
3578
- $ ? O || m(null, T) : m(D);
3570
+ $ ? T || m(null, _) : m(D);
3579
3571
  return;
3580
3572
  }
3581
- v(S, M);
3573
+ v(A, M);
3582
3574
  }
3583
3575
  });
3584
3576
  }
3585
3577
  }
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);
3578
+ var T = 0;
3579
+ c.isString(d) && (d = [d]);
3580
+ for (var R = 0, q; R < d.length; ++R)
3581
+ (q = _.resolvePath("", d[R])) && E(q);
3582
+ if (w) return _;
3583
+ T || m(null, _);
3592
3584
  }, u.prototype.loadSync = function(d, y) {
3593
- if (!l.isNode) throw Error("not supported");
3585
+ if (!c.isNode) throw Error("not supported");
3594
3586
  return this.load(d, y, i);
3595
3587
  }, u.prototype.resolveAll = function() {
3596
3588
  if (this.deferred.length)
@@ -3601,7 +3593,7 @@ function requireRoot() {
3601
3593
  );
3602
3594
  return r.prototype.resolveAll.call(this);
3603
3595
  };
3604
- var c = /^[A-Z]/;
3596
+ var l = /^[A-Z]/;
3605
3597
  function h(p, d) {
3606
3598
  var y = d.parent.lookup(d.extend);
3607
3599
  if (y) {
@@ -3623,7 +3615,7 @@ function requireRoot() {
3623
3615
  d.extend !== void 0 && /* not already handled */
3624
3616
  !d.extensionField && (h(this, d) || this.deferred.push(d));
3625
3617
  else if (d instanceof e)
3626
- c.test(d.name) && (d.parent[d.name] = d.values);
3618
+ l.test(d.name) && (d.parent[d.name] = d.values);
3627
3619
  else if (!(d instanceof a)) {
3628
3620
  if (d instanceof n)
3629
3621
  for (var y = 0; y < this.deferred.length; )
@@ -3631,7 +3623,7 @@ function requireRoot() {
3631
3623
  for (var g = 0; g < /* initializes */
3632
3624
  d.nestedArray.length; ++g)
3633
3625
  this._handleAdd(d._nestedArray[g]);
3634
- c.test(d.name) && (d.parent[d.name] = d);
3626
+ l.test(d.name) && (d.parent[d.name] = d);
3635
3627
  }
3636
3628
  }, u.prototype._handleRemove = function(d) {
3637
3629
  if (d instanceof t) {
@@ -3649,12 +3641,12 @@ function requireRoot() {
3649
3641
  y > -1 && this.deferred.splice(y, 1);
3650
3642
  }
3651
3643
  } else if (d instanceof e)
3652
- c.test(d.name) && delete d.parent[d.name];
3644
+ l.test(d.name) && delete d.parent[d.name];
3653
3645
  else if (d instanceof r) {
3654
3646
  for (var g = 0; g < /* initializes */
3655
3647
  d.nestedArray.length; ++g)
3656
3648
  this._handleRemove(d._nestedArray[g]);
3657
- c.test(d.name) && delete d.parent[d.name];
3649
+ l.test(d.name) && delete d.parent[d.name];
3658
3650
  }
3659
3651
  }, u._configure = function(p, d, y) {
3660
3652
  n = p, o = d, s = y;
@@ -3667,39 +3659,39 @@ function requireUtil() {
3667
3659
  var r = util$2.exports = requireMinimal(), t = roots, e, a;
3668
3660
  r.codegen = codegen_1, r.fetch = fetch_1, r.path = path, r.fs = r.inquire("fs"), r.toArray = function(i) {
3669
3661
  if (i) {
3670
- for (var c = Object.keys(i), h = new Array(c.length), p = 0; p < c.length; ) h[p] = i[c[p++]];
3662
+ for (var l = Object.keys(i), h = new Array(l.length), p = 0; p < l.length; ) h[p] = i[l[p++]];
3671
3663
  return h;
3672
3664
  }
3673
3665
  return [];
3674
3666
  }, r.toObject = function(i) {
3675
- for (var c = {}, h = 0; h < i.length; ) {
3667
+ for (var l = {}, h = 0; h < i.length; ) {
3676
3668
  var p = i[h++], d = i[h++];
3677
- d !== void 0 && (c[p] = d);
3669
+ d !== void 0 && (l[p] = d);
3678
3670
  }
3679
- return c;
3671
+ return l;
3680
3672
  };
3681
- var l = /\\/g, n = /"/g;
3673
+ var c = /\\/g, n = /"/g;
3682
3674
  r.isReserved = function(i) {
3683
3675
  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
3676
  i
3685
3677
  );
3686
3678
  }, r.safeProp = function(i) {
3687
- return !/^[$\w_]+$/.test(i) || r.isReserved(i) ? '["' + i.replace(l, "\\\\").replace(n, '\\"') + '"]' : "." + i;
3679
+ return !/^[$\w_]+$/.test(i) || r.isReserved(i) ? '["' + i.replace(c, "\\\\").replace(n, '\\"') + '"]' : "." + i;
3688
3680
  }, r.ucFirst = function(i) {
3689
3681
  return i.charAt(0).toUpperCase() + i.substring(1);
3690
3682
  };
3691
3683
  var o = /_([a-z])/g;
3692
3684
  r.camelCase = function(i) {
3693
- return i.substring(0, 1) + i.substring(1).replace(o, function(c, h) {
3685
+ return i.substring(0, 1) + i.substring(1).replace(o, function(l, h) {
3694
3686
  return h.toUpperCase();
3695
3687
  });
3696
- }, r.compareFieldsById = function(i, c) {
3697
- return i.id - c.id;
3698
- }, r.decorateType = function(i, c) {
3688
+ }, r.compareFieldsById = function(i, l) {
3689
+ return i.id - l.id;
3690
+ }, r.decorateType = function(i, l) {
3699
3691
  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;
3692
+ return l && i.$type.name !== l && (r.decorateRoot.remove(i.$type), i.$type.name = l, r.decorateRoot.add(i.$type)), i.$type;
3701
3693
  e || (e = requireType());
3702
- var h = new e(c || i.name);
3694
+ var h = new e(l || i.name);
3703
3695
  return r.decorateRoot.add(h), h.ctor = i, Object.defineProperty(i, "$type", {
3704
3696
  value: h,
3705
3697
  enumerable: !1
@@ -3712,27 +3704,27 @@ function requireUtil() {
3712
3704
  return r.decorateEnum = function(i) {
3713
3705
  if (i.$type) return i.$type;
3714
3706
  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,
3707
+ var l = new a("Enum" + s++, i);
3708
+ return r.decorateRoot.add(l), Object.defineProperty(i, "$type", {
3709
+ value: l,
3718
3710
  enumerable: !1
3719
- }), c;
3720
- }, r.setProperty = function(i, c, h) {
3711
+ }), l;
3712
+ }, r.setProperty = function(i, l, h) {
3721
3713
  function p(d, y, g) {
3722
- var T = y.shift();
3723
- if (T === "__proto__" || T === "prototype")
3714
+ var _ = y.shift();
3715
+ if (_ === "__proto__" || _ === "prototype")
3724
3716
  return d;
3725
3717
  if (y.length > 0)
3726
- d[T] = p(d[T] || {}, y, g);
3718
+ d[_] = p(d[_] || {}, y, g);
3727
3719
  else {
3728
- var _ = d[T];
3729
- _ && (g = [].concat(_).concat(g)), d[T] = g;
3720
+ var w = d[_];
3721
+ w && (g = [].concat(w).concat(g)), d[_] = g;
3730
3722
  }
3731
3723
  return d;
3732
3724
  }
3733
3725
  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);
3726
+ if (!l) throw TypeError("path must be specified");
3727
+ return l = l.split("."), p(i, l, h);
3736
3728
  }, Object.defineProperty(r, "decorateRoot", {
3737
3729
  get: function() {
3738
3730
  return t.decorated || (t.decorated = new (requireRoot())());
@@ -3744,10 +3736,10 @@ function requireObject() {
3744
3736
  if (hasRequiredObject) return object;
3745
3737
  hasRequiredObject = 1, object = e, e.className = "ReflectionObject";
3746
3738
  var r = requireUtil(), t;
3747
- function e(a, l) {
3739
+ function e(a, c) {
3748
3740
  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;
3741
+ if (c && !r.isObject(c)) throw TypeError("options must be an object");
3742
+ this.options = c, this.parsedOptions = null, this.name = a, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
3751
3743
  }
3752
3744
  return Object.defineProperties(e.prototype, {
3753
3745
  /**
@@ -3770,52 +3762,52 @@ function requireObject() {
3770
3762
  */
3771
3763
  fullName: {
3772
3764
  get: function() {
3773
- for (var a = [this.name], l = this.parent; l; )
3774
- a.unshift(l.name), l = l.parent;
3765
+ for (var a = [this.name], c = this.parent; c; )
3766
+ a.unshift(c.name), c = c.parent;
3775
3767
  return a.join(".");
3776
3768
  }
3777
3769
  }
3778
3770
  }), e.prototype.toJSON = /* istanbul ignore next */
3779
3771
  function() {
3780
3772
  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;
3773
+ }, e.prototype.onAdd = function(c) {
3774
+ this.parent && this.parent !== c && this.parent.remove(this), this.parent = c, this.resolved = !1;
3775
+ var n = c.root;
3784
3776
  n instanceof t && n._handleAdd(this);
3785
- }, e.prototype.onRemove = function(l) {
3786
- var n = l.root;
3777
+ }, e.prototype.onRemove = function(c) {
3778
+ var n = c.root;
3787
3779
  n instanceof t && n._handleRemove(this), this.parent = null, this.resolved = !1;
3788
3780
  }, e.prototype.resolve = function() {
3789
3781
  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) {
3782
+ }, e.prototype.getOption = function(c) {
3783
+ if (this.options) return this.options[c];
3784
+ }, e.prototype.setOption = function(c, n, o) {
3785
+ return (!o || !this.options || this.options[c] === void 0) && ((this.options || (this.options = {}))[c] = n), this;
3786
+ }, e.prototype.setParsedOption = function(c, n, o) {
3795
3787
  this.parsedOptions || (this.parsedOptions = []);
3796
3788
  var s = this.parsedOptions;
3797
3789
  if (o) {
3798
3790
  var u = s.find(function(h) {
3799
- return Object.prototype.hasOwnProperty.call(h, l);
3791
+ return Object.prototype.hasOwnProperty.call(h, c);
3800
3792
  });
3801
3793
  if (u) {
3802
- var i = u[l];
3794
+ var i = u[c];
3803
3795
  r.setProperty(i, o, n);
3804
3796
  } else
3805
- u = {}, u[l] = r.setProperty({}, o, n), s.push(u);
3797
+ u = {}, u[c] = r.setProperty({}, o, n), s.push(u);
3806
3798
  } else {
3807
- var c = {};
3808
- c[l] = n, s.push(c);
3799
+ var l = {};
3800
+ l[c] = n, s.push(l);
3809
3801
  }
3810
3802
  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);
3803
+ }, e.prototype.setOptions = function(c, n) {
3804
+ if (c)
3805
+ for (var o = Object.keys(c), s = 0; s < o.length; ++s)
3806
+ this.setOption(o[s], c[o[s]], n);
3815
3807
  return this;
3816
3808
  }, e.prototype.toString = function() {
3817
- var l = this.constructor.className, n = this.fullName;
3818
- return n.length ? l + " " + n : l;
3809
+ var c = this.constructor.className, n = this.fullName;
3810
+ return n.length ? c + " " + n : c;
3819
3811
  }, e._configure = function(a) {
3820
3812
  t = a;
3821
3813
  }, object;
@@ -3827,11 +3819,11 @@ function require_enum() {
3827
3819
  var r = requireObject();
3828
3820
  ((a.prototype = Object.create(r.prototype)).constructor = a).className = "Enum";
3829
3821
  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");
3822
+ function a(c, n, o, s, u, i) {
3823
+ if (r.call(this, c, o), n && typeof n != "object") throw TypeError("values must be an object");
3832
3824
  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]);
3825
+ for (var l = Object.keys(n), h = 0; h < l.length; ++h)
3826
+ typeof n[l[h]] == "number" && (this.valuesById[this.values[l[h]] = n[l[h]]] = l[h]);
3835
3827
  }
3836
3828
  return a.fromJSON = function(n, o) {
3837
3829
  var s = new a(n, o.values, o.options, o.comment, o.comments);
@@ -3878,7 +3870,7 @@ function require_enum() {
3878
3870
  var encoder_1, hasRequiredEncoder;
3879
3871
  function requireEncoder() {
3880
3872
  if (hasRequiredEncoder) return encoder_1;
3881
- hasRequiredEncoder = 1, encoder_1 = l;
3873
+ hasRequiredEncoder = 1, encoder_1 = c;
3882
3874
  var r = require_enum(), t = requireTypes(), e = requireUtil();
3883
3875
  function a(n, o, s, u) {
3884
3876
  return o.resolvedType.group ? n(
@@ -3894,33 +3886,33 @@ function requireEncoder() {
3894
3886
  (o.id << 3 | 2) >>> 0
3895
3887
  );
3896
3888
  }
3897
- function l(n) {
3889
+ function c(n) {
3898
3890
  for (var o = e.codegen(["m", "w"], n.name + "$encode")("if(!w)")("w=Writer.create()"), s, u, i = (
3899
3891
  /* initializes */
3900
3892
  n.fieldsArray.slice().sort(e.compareFieldsById)
3901
3893
  ), 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(
3894
+ var l = i[s].resolve(), h = n._fieldsArray.indexOf(l), p = l.resolvedType instanceof r ? "int32" : l.type, d = t.basic[p];
3895
+ u = "m" + e.safeProp(l.name), l.map ? (o(
3904
3896
  "if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",
3905
3897
  u,
3906
- c.name
3898
+ l.name
3907
3899
  )(
3908
3900
  // !== undefined && !== null
3909
3901
  "for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",
3910
3902
  u
3911
3903
  )(
3912
3904
  "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)(
3905
+ (l.id << 3 | 2) >>> 0,
3906
+ 8 | t.mapKey[l.keyType],
3907
+ l.keyType
3908
+ ), 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
3909
  "for(var i=0;i<%s.length;++i)",
3918
3910
  u
3919
3911
  )(
3920
3912
  "w.%s(%s[i])",
3921
3913
  p,
3922
3914
  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));
3915
+ )("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
3916
  }
3925
3917
  return o("return w");
3926
3918
  }
@@ -3979,89 +3971,89 @@ function unescape(r) {
3979
3971
  tokenize$1.unescape = unescape;
3980
3972
  function tokenize$1(r, t) {
3981
3973
  r = r.toString();
3982
- var e = 0, a = r.length, l = 1, n = 0, o = {}, s = [], u = null;
3974
+ var e = 0, a = r.length, c = 1, n = 0, o = {}, s = [], u = null;
3983
3975
  function i(v) {
3984
- return Error("illegal " + v + " (line " + l + ")");
3976
+ return Error("illegal " + v + " (line " + c + ")");
3985
3977
  }
3986
- function c() {
3978
+ function l() {
3987
3979
  var v = u === "'" ? stringSingleRe : stringDoubleRe;
3988
3980
  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]);
3981
+ var E = v.exec(r);
3982
+ if (!E) throw i("string");
3983
+ return e = v.lastIndex, _(u), u = null, unescape(E[1]);
3992
3984
  }
3993
3985
  function h(v) {
3994
3986
  return r.charAt(v);
3995
3987
  }
3996
- function p(v, x, O) {
3997
- var E = {
3988
+ function p(v, E, T) {
3989
+ var R = {
3998
3990
  type: r.charAt(v++),
3999
3991
  lineEmpty: !1,
4000
- leading: O
3992
+ leading: T
4001
3993
  }, q;
4002
3994
  t ? q = 2 : q = 3;
4003
- var S = v - q, $;
3995
+ var A = v - q, $;
4004
3996
  do
4005
- if (--S < 0 || ($ = r.charAt(S)) === `
3997
+ if (--A < 0 || ($ = r.charAt(A)) === `
4006
3998
  `) {
4007
- E.lineEmpty = !0;
3999
+ R.lineEmpty = !0;
4008
4000
  break;
4009
4001
  }
4010
4002
  while ($ === " " || $ === " ");
4011
- for (var k = r.substring(v, x).split(setCommentSplitRe), D = 0; D < k.length; ++D)
4003
+ for (var k = r.substring(v, E).split(setCommentSplitRe), D = 0; D < k.length; ++D)
4012
4004
  k[D] = k[D].replace(t ? setCommentAltRe : setCommentRe, "").trim();
4013
- E.text = k.join(`
4014
- `).trim(), o[l] = E, n = l;
4005
+ R.text = k.join(`
4006
+ `).trim(), o[c] = R, n = c;
4015
4007
  }
4016
4008
  function d(v) {
4017
- var x = y(v), O = r.substring(v, x), E = /^\s*\/\//.test(O);
4018
- return E;
4009
+ var E = y(v), T = r.substring(v, E), R = /^\s*\/\//.test(T);
4010
+ return R;
4019
4011
  }
4020
4012
  function y(v) {
4021
- for (var x = v; x < a && h(x) !== `
4013
+ for (var E = v; E < a && h(E) !== `
4022
4014
  `; )
4023
- x++;
4024
- return x;
4015
+ E++;
4016
+ return E;
4025
4017
  }
4026
4018
  function g() {
4027
4019
  if (s.length > 0) return s.shift();
4028
- if (u) return c();
4029
- var v, x, O, E, q, S = e === 0;
4020
+ if (u) return l();
4021
+ var v, E, T, R, q, A = e === 0;
4030
4022
  do {
4031
4023
  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;
4024
+ for (v = !1; whitespaceRe.test(T = h(e)); )
4025
+ if (T === `
4026
+ ` && (A = !0, ++c), ++e === a) return null;
4035
4027
  if (h(e) === "/") {
4036
4028
  if (++e === a)
4037
4029
  throw i("comment");
4038
4030
  if (h(e) === "/")
4039
4031
  if (t) {
4040
- if (E = e, q = !1, d(e - 1)) {
4032
+ if (R = e, q = !1, d(e - 1)) {
4041
4033
  q = !0;
4042
4034
  do
4043
- if (e = y(e), e === a || (e++, !S))
4035
+ if (e = y(e), e === a || (e++, !A))
4044
4036
  break;
4045
4037
  while (d(e));
4046
4038
  } else
4047
4039
  e = Math.min(a, y(e) + 1);
4048
- q && (p(E, e, S), S = !0), l++, v = !0;
4040
+ q && (p(R, e, A), A = !0), c++, v = !0;
4049
4041
  } else {
4050
- for (q = h(E = e + 1) === "/"; h(++e) !== `
4042
+ for (q = h(R = e + 1) === "/"; h(++e) !== `
4051
4043
  `; )
4052
4044
  if (e === a)
4053
4045
  return null;
4054
- ++e, q && (p(E, e - 1, S), S = !0), ++l, v = !0;
4046
+ ++e, q && (p(R, e - 1, A), A = !0), ++c, v = !0;
4055
4047
  }
4056
- else if ((O = h(e)) === "*") {
4057
- E = e + 1, q = t || h(E) === "*";
4048
+ else if ((T = h(e)) === "*") {
4049
+ R = e + 1, q = t || h(R) === "*";
4058
4050
  do {
4059
- if (O === `
4060
- ` && ++l, ++e === a)
4051
+ if (T === `
4052
+ ` && ++c, ++e === a)
4061
4053
  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;
4054
+ E = T, T = h(e);
4055
+ } while (E !== "*" || T !== "/");
4056
+ ++e, q && (p(R, e - 2, A), A = !0), v = !0;
4065
4057
  } else
4066
4058
  return "/";
4067
4059
  }
@@ -4073,40 +4065,40 @@ function tokenize$1(r, t) {
4073
4065
  var D = r.substring(e, e = $);
4074
4066
  return (D === '"' || D === "'") && (u = D), D;
4075
4067
  }
4076
- function T(v) {
4068
+ function _(v) {
4077
4069
  s.push(v);
4078
4070
  }
4079
- function _() {
4071
+ function w() {
4080
4072
  if (!s.length) {
4081
4073
  var v = g();
4082
4074
  if (v === null) return null;
4083
- T(v);
4075
+ _(v);
4084
4076
  }
4085
4077
  return s[0];
4086
4078
  }
4087
- function m(v, x) {
4088
- var O = _(), E = O === v;
4089
- if (E)
4079
+ function m(v, E) {
4080
+ var T = w(), R = T === v;
4081
+ if (R)
4090
4082
  return g(), !0;
4091
- if (!x) throw i("token '" + O + "', '" + v + "' expected");
4083
+ if (!E) throw i("token '" + T + "', '" + v + "' expected");
4092
4084
  return !1;
4093
4085
  }
4094
4086
  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;
4087
+ var E = null, T;
4088
+ 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
4089
  }
4098
4090
  return Object.defineProperty(
4099
4091
  {
4100
4092
  next: g,
4101
- peek: _,
4102
- push: T,
4093
+ peek: w,
4094
+ push: _,
4103
4095
  skip: m,
4104
4096
  cmnt: b
4105
4097
  },
4106
4098
  "line",
4107
4099
  {
4108
4100
  get: function() {
4109
- return l;
4101
+ return c;
4110
4102
  }
4111
4103
  }
4112
4104
  );
@@ -4119,29 +4111,29 @@ parse.defaults = {
4119
4111
  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
4112
  function parse(r, t, e) {
4121
4113
  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;
4114
+ 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) {
4115
+ return O;
4124
4116
  } : util.camelCase;
4125
- function m(w, R, A) {
4117
+ function m(O, x, S) {
4126
4118
  var N = parse.filename;
4127
- return A || (parse.filename = null), Error(
4128
- "illegal " + (R || "token") + " '" + w + "' (" + (N ? N + ", " : "") + "line " + l.line + ")"
4119
+ return S || (parse.filename = null), Error(
4120
+ "illegal " + (x || "token") + " '" + O + "' (" + (N ? N + ", " : "") + "line " + c.line + ")"
4129
4121
  );
4130
4122
  }
4131
4123
  function b() {
4132
- var w = [], R;
4124
+ var O = [], x;
4133
4125
  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("");
4126
+ if ((x = n()) !== '"' && x !== "'") throw m(x);
4127
+ O.push(n()), u(x), x = s();
4128
+ } while (x === '"' || x === "'");
4129
+ return O.join("");
4138
4130
  }
4139
4131
  function v() {
4140
- var w = n();
4141
- switch (w) {
4132
+ var O = n();
4133
+ switch (O) {
4142
4134
  case "'":
4143
4135
  case '"':
4144
- return o(w), b();
4136
+ return o(O), b();
4145
4137
  case "true":
4146
4138
  case "TRUE":
4147
4139
  return !0;
@@ -4150,20 +4142,20 @@ function parse(r, t, e) {
4150
4142
  return !1;
4151
4143
  }
4152
4144
  try {
4153
- return O(
4154
- w,
4145
+ return T(
4146
+ O,
4155
4147
  /* insideTryCatch */
4156
4148
  !0
4157
4149
  );
4158
4150
  } catch {
4159
- if (typeRefRe.test(w)) return w;
4160
- throw m(w, "value");
4151
+ if (typeRefRe.test(O)) return O;
4152
+ throw m(O, "value");
4161
4153
  }
4162
4154
  }
4163
- function x(w, R) {
4164
- var A, N;
4155
+ function E(O, x) {
4156
+ var S, N;
4165
4157
  do
4166
- R && ((A = s()) === '"' || A === "'") ? w.push(b()) : w.push([N = E(n()), u("to", !0) ? E(n()) : N]);
4158
+ x && ((S = s()) === '"' || S === "'") ? O.push(b()) : O.push([N = R(n()), u("to", !0) ? R(n()) : N]);
4167
4159
  while (u(",", !0));
4168
4160
  var I = {
4169
4161
  options: void 0
@@ -4178,17 +4170,17 @@ function parse(r, t, e) {
4178
4170
  else throw m(C);
4179
4171
  },
4180
4172
  function() {
4181
- z(I);
4173
+ W(I);
4182
4174
  }
4183
4175
  );
4184
4176
  }
4185
- function O(w, R) {
4186
- var A = 1;
4187
- switch (w.charAt(0) === "-" && (A = -1, w = w.substring(1)), w) {
4177
+ function T(O, x) {
4178
+ var S = 1;
4179
+ switch (O.charAt(0) === "-" && (S = -1, O = O.substring(1)), O) {
4188
4180
  case "inf":
4189
4181
  case "INF":
4190
4182
  case "Inf":
4191
- return A * (1 / 0);
4183
+ return S * (1 / 0);
4192
4184
  case "nan":
4193
4185
  case "NAN":
4194
4186
  case "Nan":
@@ -4197,14 +4189,14 @@ function parse(r, t, e) {
4197
4189
  case "0":
4198
4190
  return 0;
4199
4191
  }
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) {
4192
+ if (base10Re.test(O)) return S * parseInt(O, 10);
4193
+ if (base16Re.test(O)) return S * parseInt(O, 16);
4194
+ if (base8Re.test(O)) return S * parseInt(O, 8);
4195
+ if (numberRe.test(O)) return S * parseFloat(O);
4196
+ throw m(O, "number", x);
4197
+ }
4198
+ function R(O, x) {
4199
+ switch (O) {
4208
4200
  case "max":
4209
4201
  case "MAX":
4210
4202
  case "Max":
@@ -4212,95 +4204,94 @@ function parse(r, t, e) {
4212
4204
  case "0":
4213
4205
  return 0;
4214
4206
  }
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");
4207
+ if (!x && O.charAt(0) === "-") throw m(O, "id");
4208
+ if (base10NegRe.test(O)) return parseInt(O, 10);
4209
+ if (base16NegRe.test(O)) return parseInt(O, 16);
4210
+ if (base8NegRe.test(O)) return parseInt(O, 8);
4211
+ throw m(O, "id");
4220
4212
  }
4221
4213
  function q() {
4222
4214
  if (h !== void 0) throw m("package");
4223
4215
  if (h = n(), !typeRefRe.test(h)) throw m(h, "name");
4224
- T = T.define(h), u(";");
4216
+ _ = _.define(h), u(";");
4225
4217
  }
4226
- function S() {
4227
- var w = s(), R;
4228
- switch (w) {
4218
+ function A() {
4219
+ var O = s(), x;
4220
+ switch (O) {
4229
4221
  case "weak":
4230
- R = d || (d = []), n();
4222
+ x = d || (d = []), n();
4231
4223
  break;
4232
4224
  case "public":
4233
4225
  n();
4234
- // eslint-disable-next-line no-fallthrough
4235
4226
  default:
4236
- R = p || (p = []);
4227
+ x = p || (p = []);
4237
4228
  break;
4238
4229
  }
4239
- w = b(), u(";"), R.push(w);
4230
+ O = b(), u(";"), x.push(O);
4240
4231
  }
4241
4232
  function $() {
4242
4233
  if (u("="), y = b(), g = y === "proto3", !g && y !== "proto2") throw m(y, "syntax");
4243
4234
  t.setOption("syntax", y), u(";");
4244
4235
  }
4245
- function k(w, R) {
4246
- switch (R) {
4236
+ function k(O, x) {
4237
+ switch (x) {
4247
4238
  case "option":
4248
- return j(w, R), u(";"), !0;
4239
+ return j(O, x), u(";"), !0;
4249
4240
  case "message":
4250
- return M(w, R), !0;
4241
+ return M(O, x), !0;
4251
4242
  case "enum":
4252
- return J(w, R), !0;
4243
+ return J(O, x), !0;
4253
4244
  case "service":
4254
- return te(w, R), !0;
4245
+ return te(O, x), !0;
4255
4246
  case "extend":
4256
- return ie(w, R), !0;
4247
+ return ie(O, x), !0;
4257
4248
  }
4258
4249
  return !1;
4259
4250
  }
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);
4251
+ function D(O, x, S) {
4252
+ var N = c.line;
4253
+ if (O && (typeof O.comment != "string" && (O.comment = i()), O.filename = parse.filename), u("{", !0)) {
4254
+ for (var I; (I = n()) !== "}"; ) x(I);
4264
4255
  u(";", !0);
4265
4256
  } else
4266
- A && A(), u(";"), w && (typeof w.comment != "string" || a) && (w.comment = i(N) || w.comment);
4257
+ S && S(), u(";"), O && (typeof O.comment != "string" || a) && (O.comment = i(N) || O.comment);
4267
4258
  }
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))
4259
+ function M(O, x) {
4260
+ if (!nameRe.test(x = n())) throw m(x, "type name");
4261
+ var S = new Type(x);
4262
+ D(S, function(I) {
4263
+ if (!k(S, I))
4273
4264
  switch (I) {
4274
4265
  case "map":
4275
- X(A);
4266
+ X(S);
4276
4267
  break;
4277
4268
  case "required":
4278
4269
  case "repeated":
4279
- L(A, I);
4270
+ L(S, I);
4280
4271
  break;
4281
4272
  case "optional":
4282
- g ? L(A, "proto3_optional") : L(A, "optional");
4273
+ g ? L(S, "proto3_optional") : L(S, "optional");
4283
4274
  break;
4284
4275
  case "oneof":
4285
- Y(A, I);
4276
+ Y(S, I);
4286
4277
  break;
4287
4278
  case "extensions":
4288
- x(A.extensions || (A.extensions = []));
4279
+ E(S.extensions || (S.extensions = []));
4289
4280
  break;
4290
4281
  case "reserved":
4291
- x(A.reserved || (A.reserved = []), !0);
4282
+ E(S.reserved || (S.reserved = []), !0);
4292
4283
  break;
4293
4284
  default:
4294
4285
  if (!g || !typeRefRe.test(I)) throw m(I);
4295
- o(I), L(A, "optional");
4286
+ o(I), L(S, "optional");
4296
4287
  break;
4297
4288
  }
4298
- }), w.add(A);
4289
+ }), O.add(S);
4299
4290
  }
4300
- function L(w, R, A) {
4291
+ function L(O, x, S) {
4301
4292
  var N = n();
4302
4293
  if (N === "group") {
4303
- U(w, R);
4294
+ U(O, x);
4304
4295
  return;
4305
4296
  }
4306
4297
  for (; N.endsWith(".") || s().startsWith("."); )
@@ -4308,8 +4299,8 @@ function parse(r, t, e) {
4308
4299
  if (!typeRefRe.test(N)) throw m(N, "type");
4309
4300
  var I = n();
4310
4301
  if (!nameRe.test(I)) throw m(I, "name");
4311
- I = _(I), u("=");
4312
- var B = new Field(I, E(n()), N, R, A);
4302
+ I = w(I), u("=");
4303
+ var B = new Field(I, R(n()), N, x, S);
4313
4304
  if (D(
4314
4305
  B,
4315
4306
  function(F) {
@@ -4318,13 +4309,13 @@ function parse(r, t, e) {
4318
4309
  else throw m(F);
4319
4310
  },
4320
4311
  function() {
4321
- z(B);
4312
+ W(B);
4322
4313
  }
4323
- ), R === "proto3_optional") {
4314
+ ), x === "proto3_optional") {
4324
4315
  var C = new OneOf("_" + I);
4325
- B.setOption("proto3_optional", !0), C.add(B), w.add(C);
4316
+ B.setOption("proto3_optional", !0), C.add(B), O.add(C);
4326
4317
  } else
4327
- w.add(B);
4318
+ O.add(B);
4328
4319
  !g && B.repeated && (types.packed[N] !== void 0 || types.basic[N] === void 0) && B.setOption(
4329
4320
  "packed",
4330
4321
  !1,
@@ -4332,14 +4323,14 @@ function parse(r, t, e) {
4332
4323
  !0
4333
4324
  );
4334
4325
  }
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);
4326
+ function U(O, x) {
4327
+ var S = n();
4328
+ if (!nameRe.test(S)) throw m(S, "name");
4329
+ var N = util.lcFirst(S);
4330
+ S === N && (S = util.ucFirst(S)), u("=");
4331
+ var I = R(n()), B = new Type(S);
4341
4332
  B.group = !0;
4342
- var C = new Field(N, I, A, R);
4333
+ var C = new Field(N, I, S, x);
4343
4334
  C.filename = parse.filename, D(B, function(F) {
4344
4335
  switch (F) {
4345
4336
  case "option":
@@ -4362,20 +4353,20 @@ function parse(r, t, e) {
4362
4353
  default:
4363
4354
  throw m(F);
4364
4355
  }
4365
- }), w.add(B).add(C);
4356
+ }), O.add(B).add(C);
4366
4357
  }
4367
- function X(w) {
4358
+ function X(O) {
4368
4359
  u("<");
4369
- var R = n();
4370
- if (types.mapKey[R] === void 0) throw m(R, "type");
4360
+ var x = n();
4361
+ if (types.mapKey[x] === void 0) throw m(x, "type");
4371
4362
  u(",");
4372
- var A = n();
4373
- if (!typeRefRe.test(A)) throw m(A, "type");
4363
+ var S = n();
4364
+ if (!typeRefRe.test(S)) throw m(S, "type");
4374
4365
  u(">");
4375
4366
  var N = n();
4376
4367
  if (!nameRe.test(N)) throw m(N, "name");
4377
4368
  u("=");
4378
- var I = new MapField(_(N), E(n()), R, A);
4369
+ var I = new MapField(w(N), R(n()), x, S);
4379
4370
  D(
4380
4371
  I,
4381
4372
  function(C) {
@@ -4384,37 +4375,37 @@ function parse(r, t, e) {
4384
4375
  else throw m(C);
4385
4376
  },
4386
4377
  function() {
4387
- z(I);
4378
+ W(I);
4388
4379
  }
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) {
4380
+ ), O.add(I);
4381
+ }
4382
+ function Y(O, x) {
4383
+ if (!nameRe.test(x = n())) throw m(x, "name");
4384
+ var S = new OneOf(w(x));
4385
+ D(S, function(I) {
4386
+ I === "option" ? (j(S, I), u(";")) : (o(I), L(S, "optional"));
4387
+ }), O.add(S);
4388
+ }
4389
+ function J(O, x) {
4390
+ if (!nameRe.test(x = n())) throw m(x, "name");
4391
+ var S = new Enum(x);
4392
+ D(S, function(I) {
4402
4393
  switch (I) {
4403
4394
  case "option":
4404
- j(A, I), u(";");
4395
+ j(S, I), u(";");
4405
4396
  break;
4406
4397
  case "reserved":
4407
- x(A.reserved || (A.reserved = []), !0);
4398
+ E(S.reserved || (S.reserved = []), !0);
4408
4399
  break;
4409
4400
  default:
4410
- Q(A, I);
4401
+ Q(S, I);
4411
4402
  }
4412
- }), w.add(A);
4403
+ }), O.add(S);
4413
4404
  }
4414
- function Q(w, R) {
4415
- if (!nameRe.test(R)) throw m(R, "name");
4405
+ function Q(O, x) {
4406
+ if (!nameRe.test(x)) throw m(x, "name");
4416
4407
  u("=");
4417
- var A = E(n(), !0), N = {
4408
+ var S = R(n(), !0), N = {
4418
4409
  options: void 0
4419
4410
  };
4420
4411
  N.setOption = function(I, B) {
@@ -4427,27 +4418,27 @@ function parse(r, t, e) {
4427
4418
  else throw m(B);
4428
4419
  },
4429
4420
  function() {
4430
- z(N);
4421
+ W(N);
4431
4422
  }
4432
- ), w.add(R, A, N.comment, N.options);
4423
+ ), O.add(x, S, N.comment, N.options);
4433
4424
  }
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);
4425
+ function j(O, x) {
4426
+ var S = u("(", !0);
4427
+ if (!typeRefRe.test(x = n())) throw m(x, "name");
4428
+ var N = x, I = N, B;
4429
+ S && (u(")"), N = "(" + N + ")", I = N, x = s(), fqTypeRefRe.test(x) && (B = x.slice(1), N += x, n())), u("=");
4430
+ var C = K(O, N);
4431
+ ee(O, I, C, B);
4441
4432
  }
4442
- function K(w, R) {
4433
+ function K(O, x) {
4443
4434
  if (u("{", !0)) {
4444
- for (var A = {}; !u("}", !0); ) {
4435
+ for (var S = {}; !u("}", !0); ) {
4445
4436
  if (!nameRe.test(P = n()))
4446
4437
  throw m(P, "name");
4447
4438
  if (P === null)
4448
4439
  throw m(P, "end of input");
4449
4440
  var N, I = P;
4450
- if (u(":", !0), s() === "{") N = K(w, R + "." + P);
4441
+ if (u(":", !0), s() === "{") N = K(O, x + "." + P);
4451
4442
  else if (s() === "[") {
4452
4443
  N = [];
4453
4444
  var B;
@@ -4455,70 +4446,70 @@ function parse(r, t, e) {
4455
4446
  do
4456
4447
  B = v(), N.push(B);
4457
4448
  while (u(",", !0));
4458
- u("]"), typeof B < "u" && G(w, R + "." + P, B);
4449
+ u("]"), typeof B < "u" && G(O, x + "." + P, B);
4459
4450
  }
4460
4451
  } 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);
4452
+ N = v(), G(O, x + "." + P, N);
4453
+ var C = S[I];
4454
+ C && (N = [].concat(C).concat(N)), S[I] = N, u(",", !0), u(";", !0);
4464
4455
  }
4465
- return A;
4456
+ return S;
4466
4457
  }
4467
4458
  var Z = v();
4468
- return G(w, R, Z), Z;
4459
+ return G(O, x, Z), Z;
4469
4460
  }
4470
- function G(w, R, A) {
4471
- w.setOption && w.setOption(R, A);
4461
+ function G(O, x, S) {
4462
+ O.setOption && O.setOption(x, S);
4472
4463
  }
4473
- function ee(w, R, A, N) {
4474
- w.setParsedOption && w.setParsedOption(R, A, N);
4464
+ function ee(O, x, S, N) {
4465
+ O.setParsedOption && O.setParsedOption(x, S, N);
4475
4466
  }
4476
- function z(w) {
4467
+ function W(O) {
4477
4468
  if (u("[", !0)) {
4478
4469
  do
4479
- j(w, "option");
4470
+ j(O, "option");
4480
4471
  while (u(",", !0));
4481
4472
  u("]");
4482
4473
  }
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);
4474
+ return O;
4475
+ }
4476
+ function te(O, x) {
4477
+ if (!nameRe.test(x = n())) throw m(x, "service name");
4478
+ var S = new Service(x);
4479
+ D(S, function(I) {
4480
+ if (!k(S, I))
4481
+ if (I === "rpc") re(S, I);
4491
4482
  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) {
4483
+ }), O.add(S);
4484
+ }
4485
+ function re(O, x) {
4486
+ var S = i(), N = x;
4487
+ if (!nameRe.test(x = n())) throw m(x, "name");
4488
+ var I = x, B, C, Z, F;
4489
+ 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);
4490
+ Z = x, u(")");
4491
+ var z = new Method(I, N, B, Z, C, F);
4492
+ z.comment = S, D(z, function(V) {
4502
4493
  if (V === "option")
4503
- j(H, V), u(";");
4494
+ j(z, V), u(";");
4504
4495
  else throw m(V);
4505
- }), w.add(H);
4496
+ }), O.add(z);
4506
4497
  }
4507
- function ie(w, R) {
4508
- if (!typeRefRe.test(R = n())) throw m(R, "reference");
4509
- var A = R;
4498
+ function ie(O, x) {
4499
+ if (!typeRefRe.test(x = n())) throw m(x, "reference");
4500
+ var S = x;
4510
4501
  D(null, function(I) {
4511
4502
  switch (I) {
4512
4503
  case "required":
4513
4504
  case "repeated":
4514
- L(w, I, A);
4505
+ L(O, I, S);
4515
4506
  break;
4516
4507
  case "optional":
4517
- g ? L(w, "proto3_optional", A) : L(w, "optional", A);
4508
+ g ? L(O, "proto3_optional", S) : L(O, "optional", S);
4518
4509
  break;
4519
4510
  default:
4520
4511
  if (!g || !typeRefRe.test(I)) throw m(I);
4521
- o(I), L(w, "optional", A);
4512
+ o(I), L(O, "optional", S);
4522
4513
  break;
4523
4514
  }
4524
4515
  });
@@ -4526,23 +4517,23 @@ function parse(r, t, e) {
4526
4517
  for (var P; (P = n()) !== null; )
4527
4518
  switch (P) {
4528
4519
  case "package":
4529
- if (!c) throw m(P);
4520
+ if (!l) throw m(P);
4530
4521
  q();
4531
4522
  break;
4532
4523
  case "import":
4533
- if (!c) throw m(P);
4534
- S();
4524
+ if (!l) throw m(P);
4525
+ A();
4535
4526
  break;
4536
4527
  case "syntax":
4537
- if (!c) throw m(P);
4528
+ if (!l) throw m(P);
4538
4529
  $();
4539
4530
  break;
4540
4531
  case "option":
4541
- j(T, P), u(";");
4532
+ j(_, P), u(";");
4542
4533
  break;
4543
4534
  default:
4544
- if (k(T, P)) {
4545
- c = !1;
4535
+ if (k(_, P)) {
4536
+ l = !1;
4546
4537
  continue;
4547
4538
  }
4548
4539
  throw m(P);
@@ -4931,8 +4922,8 @@ function getRawTag(r) {
4931
4922
  var a = !0;
4932
4923
  } catch {
4933
4924
  }
4934
- var l = nativeObjectToString$1.call(r);
4935
- return a && (t ? r[symToStringTag$1] = e : delete r[symToStringTag$1]), l;
4925
+ var c = nativeObjectToString$1.call(r);
4926
+ return a && (t ? r[symToStringTag$1] = e : delete r[symToStringTag$1]), c;
4936
4927
  }
4937
4928
  var objectProto$5 = Object.prototype, nativeObjectToString = objectProto$5.toString;
4938
4929
  function objectToString(r) {
@@ -5043,8 +5034,8 @@ var HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
5043
5034
  function shortOut(r) {
5044
5035
  var t = 0, e = 0;
5045
5036
  return function() {
5046
- var a = nativeNow(), l = HOT_SPAN - (a - e);
5047
- if (e = a, l > 0) {
5037
+ var a = nativeNow(), c = HOT_SPAN - (a - e);
5038
+ if (e = a, c > 0) {
5048
5039
  if (++t >= HOT_COUNT)
5049
5040
  return arguments[0];
5050
5041
  } else
@@ -5081,11 +5072,11 @@ function eq(r, t) {
5081
5072
  var nativeMax$1 = Math.max;
5082
5073
  function overRest(r, t, e) {
5083
5074
  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];
5075
+ for (var a = arguments, c = -1, n = nativeMax$1(a.length - t, 0), o = Array(n); ++c < n; )
5076
+ o[c] = a[t + c];
5077
+ c = -1;
5078
+ for (var s = Array(t + 1); ++c < t; )
5079
+ s[c] = a[c];
5089
5080
  return s[t] = e(o), apply(r, this, s);
5090
5081
  };
5091
5082
  }
@@ -5146,11 +5137,11 @@ var freeExports = typeof exports == "object" && exports && !exports.nodeType &&
5146
5137
  }
5147
5138
  }(), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
5148
5139
  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;
5140
+ 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
5141
  for (var i in r)
5151
5142
  o && // Safari 9 has enumerable `arguments.length` in strict mode.
5152
5143
  (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.
5144
+ c && (i == "offset" || i == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
5154
5145
  n && (i == "buffer" || i == "byteLength" || i == "byteOffset") || // Skip index properties.
5155
5146
  isIndex(i, u)) || s.push(i);
5156
5147
  return s;
@@ -5178,65 +5169,177 @@ var now = function() {
5178
5169
  return root.Date.now();
5179
5170
  }, FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min;
5180
5171
  function debounce(r, t, e) {
5181
- var a, l, n, o, s, u, i = 0, c = !1, h = !1, p = !0;
5172
+ var a, c, n, o, s, u, i = 0, l = !1, h = !1, p = !0;
5182
5173
  if (typeof r != "function")
5183
5174
  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;
5175
+ 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);
5176
+ function d(T) {
5177
+ var R = a, q = c;
5178
+ return a = c = void 0, i = T, o = r.apply(q, R), o;
5188
5179
  }
5189
- function y(O) {
5190
- return i = O, s = setTimeout(_, t), c ? d(O) : o;
5180
+ function y(T) {
5181
+ return i = T, s = setTimeout(w, t), l ? d(T) : o;
5191
5182
  }
5192
- function g(O) {
5193
- var E = O - u, q = O - i, S = t - E;
5194
- return h ? nativeMin(S, n - q) : S;
5183
+ function g(T) {
5184
+ var R = T - u, q = T - i, A = t - R;
5185
+ return h ? nativeMin(A, n - q) : A;
5195
5186
  }
5196
- function T(O) {
5197
- var E = O - u, q = O - i;
5198
- return u === void 0 || E >= t || E < 0 || h && q >= n;
5187
+ function _(T) {
5188
+ var R = T - u, q = T - i;
5189
+ return u === void 0 || R >= t || R < 0 || h && q >= n;
5199
5190
  }
5200
- function _() {
5201
- var O = now();
5202
- if (T(O))
5203
- return m(O);
5204
- s = setTimeout(_, g(O));
5191
+ function w() {
5192
+ var T = now();
5193
+ if (_(T))
5194
+ return m(T);
5195
+ s = setTimeout(w, g(T));
5205
5196
  }
5206
- function m(O) {
5207
- return s = void 0, p && a ? d(O) : (a = l = void 0, o);
5197
+ function m(T) {
5198
+ return s = void 0, p && a ? d(T) : (a = c = void 0, o);
5208
5199
  }
5209
5200
  function b() {
5210
- s !== void 0 && clearTimeout(s), i = 0, a = u = l = s = void 0;
5201
+ s !== void 0 && clearTimeout(s), i = 0, a = u = c = s = void 0;
5211
5202
  }
5212
5203
  function v() {
5213
5204
  return s === void 0 ? o : m(now());
5214
5205
  }
5215
- function x() {
5216
- var O = now(), E = T(O);
5217
- if (a = arguments, l = this, u = O, E) {
5206
+ function E() {
5207
+ var T = now(), R = _(T);
5208
+ if (a = arguments, c = this, u = T, R) {
5218
5209
  if (s === void 0)
5219
5210
  return y(u);
5220
5211
  if (h)
5221
- return clearTimeout(s), s = setTimeout(_, t), d(u);
5212
+ return clearTimeout(s), s = setTimeout(w, t), d(u);
5222
5213
  }
5223
- return s === void 0 && (s = setTimeout(_, t)), o;
5214
+ return s === void 0 && (s = setTimeout(w, t)), o;
5224
5215
  }
5225
- return x.cancel = b, x.flush = v, x;
5216
+ return E.cancel = b, E.flush = v, E;
5226
5217
  }
5227
5218
  var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, defaults = baseRest(function(r, t) {
5228
5219
  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; )
5220
+ var e = -1, a = t.length, c = a > 2 ? t[2] : void 0;
5221
+ for (c && isIterateeCall(t[0], t[1], c) && (a = 1); ++e < a; )
5231
5222
  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]);
5223
+ var i = o[s], l = r[i];
5224
+ (l === void 0 || eq(l, objectProto[i]) && !hasOwnProperty.call(r, i)) && (r[i] = n[i]);
5234
5225
  }
5235
5226
  return r;
5236
5227
  });
5228
+ function getDefaultExportFromCjs(r) {
5229
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5230
+ }
5231
+ var eventemitter3 = { exports: {} }, hasRequiredEventemitter3;
5232
+ function requireEventemitter3() {
5233
+ return hasRequiredEventemitter3 || (hasRequiredEventemitter3 = 1, function(r) {
5234
+ var t = Object.prototype.hasOwnProperty, e = "~";
5235
+ function a() {
5236
+ }
5237
+ Object.create && (a.prototype = /* @__PURE__ */ Object.create(null), new a().__proto__ || (e = !1));
5238
+ function c(u, i, l) {
5239
+ this.fn = u, this.context = i, this.once = l || !1;
5240
+ }
5241
+ function n(u, i, l, h, p) {
5242
+ if (typeof l != "function")
5243
+ throw new TypeError("The listener must be a function");
5244
+ var d = new c(l, h || u, p), y = e ? e + i : i;
5245
+ 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;
5246
+ }
5247
+ function o(u, i) {
5248
+ --u._eventsCount === 0 ? u._events = new a() : delete u._events[i];
5249
+ }
5250
+ function s() {
5251
+ this._events = new a(), this._eventsCount = 0;
5252
+ }
5253
+ s.prototype.eventNames = function() {
5254
+ var i = [], l, h;
5255
+ if (this._eventsCount === 0) return i;
5256
+ for (h in l = this._events)
5257
+ t.call(l, h) && i.push(e ? h.slice(1) : h);
5258
+ return Object.getOwnPropertySymbols ? i.concat(Object.getOwnPropertySymbols(l)) : i;
5259
+ }, s.prototype.listeners = function(i) {
5260
+ var l = e ? e + i : i, h = this._events[l];
5261
+ if (!h) return [];
5262
+ if (h.fn) return [h.fn];
5263
+ for (var p = 0, d = h.length, y = new Array(d); p < d; p++)
5264
+ y[p] = h[p].fn;
5265
+ return y;
5266
+ }, s.prototype.listenerCount = function(i) {
5267
+ var l = e ? e + i : i, h = this._events[l];
5268
+ return h ? h.fn ? 1 : h.length : 0;
5269
+ }, s.prototype.emit = function(i, l, h, p, d, y) {
5270
+ var g = e ? e + i : i;
5271
+ if (!this._events[g]) return !1;
5272
+ var _ = this._events[g], w = arguments.length, m, b;
5273
+ if (_.fn) {
5274
+ switch (_.once && this.removeListener(i, _.fn, void 0, !0), w) {
5275
+ case 1:
5276
+ return _.fn.call(_.context), !0;
5277
+ case 2:
5278
+ return _.fn.call(_.context, l), !0;
5279
+ case 3:
5280
+ return _.fn.call(_.context, l, h), !0;
5281
+ case 4:
5282
+ return _.fn.call(_.context, l, h, p), !0;
5283
+ case 5:
5284
+ return _.fn.call(_.context, l, h, p, d), !0;
5285
+ case 6:
5286
+ return _.fn.call(_.context, l, h, p, d, y), !0;
5287
+ }
5288
+ for (b = 1, m = new Array(w - 1); b < w; b++)
5289
+ m[b - 1] = arguments[b];
5290
+ _.fn.apply(_.context, m);
5291
+ } else {
5292
+ var v = _.length, E;
5293
+ for (b = 0; b < v; b++)
5294
+ switch (_[b].once && this.removeListener(i, _[b].fn, void 0, !0), w) {
5295
+ case 1:
5296
+ _[b].fn.call(_[b].context);
5297
+ break;
5298
+ case 2:
5299
+ _[b].fn.call(_[b].context, l);
5300
+ break;
5301
+ case 3:
5302
+ _[b].fn.call(_[b].context, l, h);
5303
+ break;
5304
+ case 4:
5305
+ _[b].fn.call(_[b].context, l, h, p);
5306
+ break;
5307
+ default:
5308
+ if (!m) for (E = 1, m = new Array(w - 1); E < w; E++)
5309
+ m[E - 1] = arguments[E];
5310
+ _[b].fn.apply(_[b].context, m);
5311
+ }
5312
+ }
5313
+ return !0;
5314
+ }, s.prototype.on = function(i, l, h) {
5315
+ return n(this, i, l, h, !1);
5316
+ }, s.prototype.once = function(i, l, h) {
5317
+ return n(this, i, l, h, !0);
5318
+ }, s.prototype.removeListener = function(i, l, h, p) {
5319
+ var d = e ? e + i : i;
5320
+ if (!this._events[d]) return this;
5321
+ if (!l)
5322
+ return o(this, d), this;
5323
+ var y = this._events[d];
5324
+ if (y.fn)
5325
+ y.fn === l && (!p || y.once) && (!h || y.context === h) && o(this, d);
5326
+ else {
5327
+ for (var g = 0, _ = [], w = y.length; g < w; g++)
5328
+ (y[g].fn !== l || p && !y[g].once || h && y[g].context !== h) && _.push(y[g]);
5329
+ _.length ? this._events[d] = _.length === 1 ? _[0] : _ : o(this, d);
5330
+ }
5331
+ return this;
5332
+ }, s.prototype.removeAllListeners = function(i) {
5333
+ var l;
5334
+ return i ? (l = e ? e + i : i, this._events[l] && o(this, l)) : (this._events = new a(), this._eventsCount = 0), this;
5335
+ }, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prefixed = e, s.EventEmitter = s, r.exports = s;
5336
+ }(eventemitter3)), eventemitter3.exports;
5337
+ }
5338
+ var eventemitter3Exports = requireEventemitter3();
5339
+ const EventEmitter = /* @__PURE__ */ getDefaultExportFromCjs(eventemitter3Exports);
5237
5340
  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);
5341
+ constructor(t, e, a, c = 1 / 0) {
5342
+ this.ctrl = t, this.key = e, this.layer = a, this.zIndex = c, this.ctrl.registerLayer(this);
5240
5343
  }
5241
5344
  show(t) {
5242
5345
  this.ctrl.showLayer(t, this.key);
@@ -5245,25 +5348,27 @@ class WmsLayer {
5245
5348
  this.ctrl.hideLayer(t, this.key);
5246
5349
  }
5247
5350
  }
5248
- class WmsLayerController {
5249
- constructor(t) {
5250
- W(this, "layerMap", /* @__PURE__ */ new Map());
5251
- W(this, "showLayers", Array());
5252
- W(this, "imgLayer");
5351
+ class WmsLayerController extends EventEmitter {
5352
+ constructor(e) {
5353
+ super();
5354
+ H(this, "layerMap", /* @__PURE__ */ new Map());
5355
+ H(this, "showLayers", Array());
5356
+ H(this, "imgLayer");
5253
5357
  /**更新底图,加了个的防抖 */
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;
5358
+ H(this, "update", debounce((e) => {
5359
+ if (this.imgLayer && e.imageryLayers.remove(this.imgLayer, !0), this.showLayers.length === 0) {
5360
+ this.imgLayer = void 0, this.destroyHandler();
5257
5361
  return;
5258
5362
  }
5259
- this.imgLayer = new ImageryLayer(
5363
+ this.handler || this.hookClickEvent(e), this.imgLayer = new ImageryLayer(
5260
5364
  new WebMapServiceImageryProvider({
5261
5365
  ...this.args,
5262
- layers: this.showLayers.map((e) => this.layerMap.get(e).layer).join(",")
5366
+ layers: this.showLayers.map((a) => this.layerMap.get(a).layer).join(",")
5263
5367
  })
5264
- ), this.imgLayer.show = !0, t.imageryLayers.add(this.imgLayer);
5368
+ ), this.imgLayer.show = !0, e.imageryLayers.add(this.imgLayer);
5265
5369
  }, 200));
5266
- this.args = t, this.args.parameters = defaults(this.args.parameters, {
5370
+ H(this, "handler");
5371
+ this.args = e, this.args.parameters = defaults(this.args.parameters, {
5267
5372
  service: "WMS",
5268
5373
  version: "1.1.1",
5269
5374
  request: "GetMap",
@@ -5275,22 +5380,31 @@ class WmsLayerController {
5275
5380
  height: 256
5276
5381
  });
5277
5382
  }
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));
5383
+ registerLayer(e) {
5384
+ if (this.layerMap.has(e.key))
5385
+ throw new Error(`Layer with key 【${e.key}】 is already registered`);
5386
+ this.layerMap.set(e.key, e);
5387
+ }
5388
+ showLayer(e, a) {
5389
+ if (!this.layerMap.has(a))
5390
+ throw new Error(`Layer with key 【${a}】 is not registered`);
5391
+ this.showLayers.push(a), this.showLayers.sort((c, n) => {
5392
+ const o = this.layerMap.get(c).zIndex, s = this.layerMap.get(n).zIndex;
5393
+ return o - s;
5394
+ }), this.update(e);
5395
+ }
5396
+ hideLayer(e, a) {
5397
+ const c = this.showLayers.indexOf(a);
5398
+ c !== -1 && (this.showLayers.splice(c, 1), this.update(e));
5399
+ }
5400
+ hookClickEvent(e) {
5401
+ this.handler = new ScreenSpaceEventHandler(e.scene.canvas), this.handler.setInputAction(async (a) => {
5402
+ const c = e.scene, n = c.camera.getPickRay(a.position), o = await c.imageryLayers.pickImageryLayerFeatures(n, e.scene);
5403
+ this.emit("click", o);
5404
+ }, ScreenSpaceEventType.LEFT_CLICK);
5405
+ }
5406
+ destroyHandler() {
5407
+ this.handler && (this.handler.destroy(), this.handler = void 0);
5294
5408
  }
5295
5409
  }
5296
5410
  export {