@poor-knight/cesium-utils 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium-utils.cjs +15 -15
- package/dist/cesium-utils.d.ts +14 -4
- package/dist/cesium-utils.js +660 -636
- package/dist/cesium-utils.umd.cjs +15 -15
- package/package.json +1 -1
package/dist/cesium-utils.js
CHANGED
|
@@ -2,18 +2,18 @@ var ue = Object.defineProperty;
|
|
|
2
2
|
var le = (s, i, r) => i in s ? ue(s, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[i] = r;
|
|
3
3
|
var z = (s, i, r) => le(s, typeof i != "symbol" ? i + "" : i, r);
|
|
4
4
|
import * as Cesium from "cesium";
|
|
5
|
-
import { Cartesian2, Cartesian3, VerticalOrigin, HorizontalOrigin, Color, LabelStyle, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle as Rectangle$1,
|
|
5
|
+
import { Cartesian2, Cartesian3, VerticalOrigin, HorizontalOrigin, Color, LabelStyle, defined, DeveloperError, Event, Credit, Ellipsoid, GeographicTilingScheme, TerrainProvider, HeightmapTerrainData, Resource, Rectangle as Rectangle$1, ScreenSpaceEventHandler, ScreenSpaceEventType, ImageryLayer, WebMapServiceImageryProvider, HeightReference, NearFarScalar, SceneMode, BoundingSphere, Occluder, SceneTransforms } from "cesium";
|
|
6
6
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, inflate$2 = {};
|
|
7
7
|
const adler32$1 = (s, i, r, u) => {
|
|
8
|
-
let
|
|
8
|
+
let h = s & 65535 | 0, o = s >>> 16 & 65535 | 0, l = 0;
|
|
9
9
|
for (; r !== 0; ) {
|
|
10
10
|
l = r > 2e3 ? 2e3 : r, r -= l;
|
|
11
11
|
do
|
|
12
|
-
|
|
12
|
+
h = h + i[u++] | 0, o = o + h | 0;
|
|
13
13
|
while (--l);
|
|
14
|
-
|
|
14
|
+
h %= 65521, o %= 65521;
|
|
15
15
|
}
|
|
16
|
-
return
|
|
16
|
+
return h | o << 16 | 0;
|
|
17
17
|
};
|
|
18
18
|
var adler32_1 = adler32$1;
|
|
19
19
|
const makeTable = () => {
|
|
@@ -26,18 +26,18 @@ const makeTable = () => {
|
|
|
26
26
|
}
|
|
27
27
|
return i;
|
|
28
28
|
}, crcTable = new Uint32Array(makeTable()), crc32$1 = (s, i, r, u) => {
|
|
29
|
-
const
|
|
29
|
+
const h = crcTable, o = u + r;
|
|
30
30
|
s ^= -1;
|
|
31
31
|
for (let l = u; l < o; l++)
|
|
32
|
-
s = s >>> 8 ^
|
|
32
|
+
s = s >>> 8 ^ h[(s ^ i[l]) & 255];
|
|
33
33
|
return s ^ -1;
|
|
34
34
|
};
|
|
35
35
|
var crc32_1 = crc32$1;
|
|
36
36
|
const BAD$1 = 16209, TYPE$1 = 16191;
|
|
37
37
|
var inffast = function(i, r) {
|
|
38
|
-
let u,
|
|
38
|
+
let u, h, o, l, c, d, a, m, y, g, p, v, b, _, T, w, x, O, E, R, S, P, C, D;
|
|
39
39
|
const I = i.state;
|
|
40
|
-
u = i.next_in, C = i.input,
|
|
40
|
+
u = i.next_in, C = i.input, h = u + (i.avail_in - 5), o = i.next_out, D = i.output, l = o - (r - i.avail_out), c = o + (i.avail_out - 257), d = I.dmax, a = I.wsize, m = I.whave, y = I.wnext, g = I.window, p = I.hold, v = I.bits, b = I.lencode, _ = I.distcode, T = (1 << I.lenbits) - 1, w = (1 << I.distbits) - 1;
|
|
41
41
|
e: do {
|
|
42
42
|
v < 15 && (p += C[u++] << v, v += 8, p += C[u++] << v, v += 8), x = b[p & T];
|
|
43
43
|
t: for (; ; ) {
|
|
@@ -47,7 +47,7 @@ var inffast = function(i, r) {
|
|
|
47
47
|
E = x & 65535, O &= 15, O && (v < O && (p += C[u++] << v, v += 8), E += p & (1 << O) - 1, p >>>= O, v -= O), v < 15 && (p += C[u++] << v, v += 8, p += C[u++] << v, v += 8), x = _[p & w];
|
|
48
48
|
r: for (; ; ) {
|
|
49
49
|
if (O = x >>> 24, p >>>= O, v -= O, O = x >>> 16 & 255, O & 16) {
|
|
50
|
-
if (R = x & 65535, O &= 15, v < O && (p += C[u++] << v, v += 8, v < O && (p += C[u++] << v, v += 8)), R += p & (1 << O) - 1, R >
|
|
50
|
+
if (R = x & 65535, O &= 15, v < O && (p += C[u++] << v, v += 8, v < O && (p += C[u++] << v, v += 8)), R += p & (1 << O) - 1, R > d) {
|
|
51
51
|
i.msg = "invalid distance too far back", I.mode = BAD$1;
|
|
52
52
|
break e;
|
|
53
53
|
}
|
|
@@ -116,8 +116,8 @@ var inffast = function(i, r) {
|
|
|
116
116
|
}
|
|
117
117
|
break;
|
|
118
118
|
}
|
|
119
|
-
} while (u <
|
|
120
|
-
E = v >> 3, u -= E, v -= E << 3, p &= (1 << v) - 1, i.next_in = u, i.next_out = o, i.avail_in = u <
|
|
119
|
+
} while (u < h && o < c);
|
|
120
|
+
E = v >> 3, u -= E, v -= E << 3, p &= (1 << v) - 1, i.next_in = u, i.next_out = o, i.avail_in = u < h ? 5 + (h - u) : 5 - (u - h), i.avail_out = o < c ? 257 + (c - o) : 257 - (o - c), I.hold = p, I.bits = v;
|
|
121
121
|
};
|
|
122
122
|
const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS$1 = 1, DISTS$1 = 2, lbase = new Uint16Array([
|
|
123
123
|
/* Length codes 257..285 base */
|
|
@@ -253,19 +253,19 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
|
|
|
253
253
|
29,
|
|
254
254
|
64,
|
|
255
255
|
64
|
|
256
|
-
]), inflate_table$1 = (s, i, r, u,
|
|
257
|
-
const
|
|
256
|
+
]), inflate_table$1 = (s, i, r, u, h, o, l, c) => {
|
|
257
|
+
const d = c.bits;
|
|
258
258
|
let a = 0, m = 0, y = 0, g = 0, p = 0, v = 0, b = 0, _ = 0, T = 0, w = 0, x, O, E, R, S, P = null, C;
|
|
259
259
|
const D = new Uint16Array(MAXBITS + 1), I = new Uint16Array(MAXBITS + 1);
|
|
260
|
-
let
|
|
260
|
+
let M = null, q, F, U;
|
|
261
261
|
for (a = 0; a <= MAXBITS; a++)
|
|
262
262
|
D[a] = 0;
|
|
263
263
|
for (m = 0; m < u; m++)
|
|
264
264
|
D[i[r + m]]++;
|
|
265
|
-
for (p =
|
|
265
|
+
for (p = d, g = MAXBITS; g >= 1 && D[g] === 0; g--)
|
|
266
266
|
;
|
|
267
267
|
if (p > g && (p = g), g === 0)
|
|
268
|
-
return
|
|
268
|
+
return h[o++] = 1 << 24 | 64 << 16 | 0, h[o++] = 1 << 24 | 64 << 16 | 0, c.bits = 1, 0;
|
|
269
269
|
for (y = 1; y < g && D[y] === 0; y++)
|
|
270
270
|
;
|
|
271
271
|
for (p < y && (p = y), _ = 1, a = 1; a <= MAXBITS; a++)
|
|
@@ -277,12 +277,12 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
|
|
|
277
277
|
I[a + 1] = I[a] + D[a];
|
|
278
278
|
for (m = 0; m < u; m++)
|
|
279
279
|
i[r + m] !== 0 && (l[I[i[r + m]]++] = m);
|
|
280
|
-
if (s === CODES$1 ? (P =
|
|
280
|
+
if (s === CODES$1 ? (P = M = l, C = 20) : s === LENS$1 ? (P = lbase, M = lext, C = 257) : (P = dbase, M = dext, C = 0), w = 0, m = 0, a = y, S = o, v = p, b = 0, E = -1, T = 1 << p, R = T - 1, s === LENS$1 && T > ENOUGH_LENS$1 || s === DISTS$1 && T > ENOUGH_DISTS$1)
|
|
281
281
|
return 1;
|
|
282
282
|
for (; ; ) {
|
|
283
|
-
q = a - b, l[m] + 1 < C ? (F = 0, U = l[m]) : l[m] >= C ? (F =
|
|
283
|
+
q = a - b, l[m] + 1 < C ? (F = 0, U = l[m]) : l[m] >= C ? (F = M[l[m] - C], U = P[l[m] - C]) : (F = 96, U = 0), x = 1 << a - b, O = 1 << v, y = O;
|
|
284
284
|
do
|
|
285
|
-
O -= x,
|
|
285
|
+
O -= x, h[S + (w >> b) + O] = q << 24 | F << 16 | U | 0;
|
|
286
286
|
while (O !== 0);
|
|
287
287
|
for (x = 1 << a - 1; w & x; )
|
|
288
288
|
x >>= 1;
|
|
@@ -296,10 +296,10 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
|
|
|
296
296
|
v++, _ <<= 1;
|
|
297
297
|
if (T += 1 << v, s === LENS$1 && T > ENOUGH_LENS$1 || s === DISTS$1 && T > ENOUGH_DISTS$1)
|
|
298
298
|
return 1;
|
|
299
|
-
E = w & R,
|
|
299
|
+
E = w & R, h[E] = p << 24 | v << 16 | S - o | 0;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
return w !== 0 && (
|
|
302
|
+
return w !== 0 && (h[S + w] = a - b << 24 | 64 << 16 | 0), c.bits = p, 0;
|
|
303
303
|
};
|
|
304
304
|
var inftrees = inflate_table$1, constants = {
|
|
305
305
|
/* Allowed flush values; see deflate() and inflate() below for details */
|
|
@@ -389,20 +389,20 @@ const fixedtables = (s) => {
|
|
|
389
389
|
}
|
|
390
390
|
s.lencode = lenfix, s.lenbits = 9, s.distcode = distfix, s.distbits = 5;
|
|
391
391
|
}, updatewindow = (s, i, r, u) => {
|
|
392
|
-
let
|
|
392
|
+
let h;
|
|
393
393
|
const o = s.state;
|
|
394
|
-
return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new Uint8Array(o.wsize)), u >= o.wsize ? (o.window.set(i.subarray(r - o.wsize, r), 0), o.wnext = 0, o.whave = o.wsize) : (
|
|
394
|
+
return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new Uint8Array(o.wsize)), u >= o.wsize ? (o.window.set(i.subarray(r - o.wsize, r), 0), o.wnext = 0, o.whave = o.wsize) : (h = o.wsize - o.wnext, h > u && (h = u), o.window.set(i.subarray(r - u, r - u + h), o.wnext), u -= h, u ? (o.window.set(i.subarray(r - u, r), 0), o.wnext = u, o.whave = o.wsize) : (o.wnext += h, o.wnext === o.wsize && (o.wnext = 0), o.whave < o.wsize && (o.whave += h))), 0;
|
|
395
395
|
}, inflate$1 = (s, i) => {
|
|
396
|
-
let r, u,
|
|
396
|
+
let r, u, h, o, l, c, d, a, m, y, g, p, v, b, _ = 0, T, w, x, O, E, R, S, P;
|
|
397
397
|
const C = new Uint8Array(4);
|
|
398
398
|
let D, I;
|
|
399
|
-
const
|
|
399
|
+
const M = (
|
|
400
400
|
/* permutation of code lengths */
|
|
401
401
|
new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
|
|
402
402
|
);
|
|
403
403
|
if (inflateStateCheck(s) || !s.output || !s.input && s.avail_in !== 0)
|
|
404
404
|
return Z_STREAM_ERROR$1;
|
|
405
|
-
r = s.state, r.mode === TYPE && (r.mode = TYPEDO), l = s.next_out,
|
|
405
|
+
r = s.state, r.mode === TYPE && (r.mode = TYPEDO), l = s.next_out, h = s.output, d = s.avail_out, o = s.next_in, u = s.input, c = s.avail_in, a = r.hold, m = r.bits, y = c, g = d, P = Z_OK$1;
|
|
406
406
|
e: for (; ; )
|
|
407
407
|
switch (r.mode) {
|
|
408
408
|
case HEAD:
|
|
@@ -540,7 +540,7 @@ const fixedtables = (s) => {
|
|
|
540
540
|
/* falls through */
|
|
541
541
|
case DICT:
|
|
542
542
|
if (r.havedict === 0)
|
|
543
|
-
return s.next_out = l, s.avail_out =
|
|
543
|
+
return s.next_out = l, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = a, r.bits = m, Z_NEED_DICT$1;
|
|
544
544
|
s.adler = r.check = 1, r.mode = TYPE;
|
|
545
545
|
/* falls through */
|
|
546
546
|
case TYPE:
|
|
@@ -593,9 +593,9 @@ const fixedtables = (s) => {
|
|
|
593
593
|
/* falls through */
|
|
594
594
|
case COPY:
|
|
595
595
|
if (p = r.length, p) {
|
|
596
|
-
if (p > c && (p = c), p >
|
|
596
|
+
if (p > c && (p = c), p > d && (p = d), p === 0)
|
|
597
597
|
break e;
|
|
598
|
-
|
|
598
|
+
h.set(u.subarray(o, o + p), l), c -= p, o += p, d -= p, l += p, r.length -= p;
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
r.mode = TYPE;
|
|
@@ -619,10 +619,10 @@ const fixedtables = (s) => {
|
|
|
619
619
|
break e;
|
|
620
620
|
c--, a += u[o++] << m, m += 8;
|
|
621
621
|
}
|
|
622
|
-
r.lens[
|
|
622
|
+
r.lens[M[r.have++]] = a & 7, a >>>= 3, m -= 3;
|
|
623
623
|
}
|
|
624
624
|
for (; r.have < 19; )
|
|
625
|
-
r.lens[
|
|
625
|
+
r.lens[M[r.have++]] = 0;
|
|
626
626
|
if (r.lencode = r.lendyn, r.lenbits = 7, D = {
|
|
627
627
|
bits: r.lenbits
|
|
628
628
|
}, P = inflate_table(CODES, r.lens, 0, 19, r.lencode, 0, r.work, D), r.lenbits = D.bits, P) {
|
|
@@ -709,8 +709,8 @@ const fixedtables = (s) => {
|
|
|
709
709
|
r.mode = LEN;
|
|
710
710
|
/* falls through */
|
|
711
711
|
case LEN:
|
|
712
|
-
if (c >= 6 &&
|
|
713
|
-
s.next_out = l, s.avail_out =
|
|
712
|
+
if (c >= 6 && d >= 258) {
|
|
713
|
+
s.next_out = l, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = a, r.bits = m, inflate_fast(s, g), l = s.next_out, h = s.output, d = s.avail_out, o = s.next_in, u = s.input, c = s.avail_in, a = r.hold, m = r.bits, r.mode === TYPE && (r.back = -1);
|
|
714
714
|
break;
|
|
715
715
|
}
|
|
716
716
|
for (r.back = 0; _ = r.lencode[a & (1 << r.lenbits) - 1], T = _ >>> 24, w = _ >>> 16 & 255, x = _ & 65535, !(T <= m); ) {
|
|
@@ -787,26 +787,26 @@ const fixedtables = (s) => {
|
|
|
787
787
|
r.mode = MATCH;
|
|
788
788
|
/* falls through */
|
|
789
789
|
case MATCH:
|
|
790
|
-
if (
|
|
790
|
+
if (d === 0)
|
|
791
791
|
break e;
|
|
792
|
-
if (p = g -
|
|
792
|
+
if (p = g - d, r.offset > p) {
|
|
793
793
|
if (p = r.offset - p, p > r.whave && r.sane) {
|
|
794
794
|
s.msg = "invalid distance too far back", r.mode = BAD;
|
|
795
795
|
break;
|
|
796
796
|
}
|
|
797
797
|
p > r.wnext ? (p -= r.wnext, v = r.wsize - p) : v = r.wnext - p, p > r.length && (p = r.length), b = r.window;
|
|
798
798
|
} else
|
|
799
|
-
b =
|
|
800
|
-
p >
|
|
799
|
+
b = h, v = l - r.offset, p = r.length;
|
|
800
|
+
p > d && (p = d), d -= p, r.length -= p;
|
|
801
801
|
do
|
|
802
|
-
|
|
802
|
+
h[l++] = b[v++];
|
|
803
803
|
while (--p);
|
|
804
804
|
r.length === 0 && (r.mode = LEN);
|
|
805
805
|
break;
|
|
806
806
|
case LIT:
|
|
807
|
-
if (
|
|
807
|
+
if (d === 0)
|
|
808
808
|
break e;
|
|
809
|
-
|
|
809
|
+
h[l++] = r.length, d--, r.mode = LEN;
|
|
810
810
|
break;
|
|
811
811
|
case CHECK:
|
|
812
812
|
if (r.wrap) {
|
|
@@ -815,8 +815,8 @@ const fixedtables = (s) => {
|
|
|
815
815
|
break e;
|
|
816
816
|
c--, a |= u[o++] << m, m += 8;
|
|
817
817
|
}
|
|
818
|
-
if (g -=
|
|
819
|
-
r.flags ? crc32(r.check,
|
|
818
|
+
if (g -= d, s.total_out += g, r.total += g, r.wrap & 4 && g && (s.adler = r.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
|
|
819
|
+
r.flags ? crc32(r.check, h, g, l - g) : adler32(r.check, h, g, l - g)), g = d, r.wrap & 4 && (r.flags ? a : zswap32(a)) !== r.check) {
|
|
820
820
|
s.msg = "incorrect data check", r.mode = BAD;
|
|
821
821
|
break;
|
|
822
822
|
}
|
|
@@ -852,8 +852,8 @@ const fixedtables = (s) => {
|
|
|
852
852
|
default:
|
|
853
853
|
return Z_STREAM_ERROR$1;
|
|
854
854
|
}
|
|
855
|
-
return s.next_out = l, s.avail_out =
|
|
856
|
-
r.flags ? crc32(r.check,
|
|
855
|
+
return s.next_out = l, s.avail_out = d, s.next_in = o, s.avail_in = c, r.hold = a, r.bits = m, (r.wsize || g !== s.avail_out && r.mode < BAD && (r.mode < CHECK || i !== Z_FINISH$1)) && updatewindow(s, s.output, s.next_out, g - s.avail_out), y -= s.avail_in, g -= s.avail_out, s.total_in += y, s.total_out += g, r.total += g, r.wrap & 4 && g && (s.adler = r.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
|
|
856
|
+
r.flags ? crc32(r.check, h, g, s.next_out - g) : adler32(r.check, h, g, s.next_out - g)), s.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === TYPE ? 128 : 0) + (r.mode === LEN_ || r.mode === COPY_ ? 256 : 0), (y === 0 && g === 0 || i === Z_FINISH$1) && P === Z_OK$1 && (P = Z_BUF_ERROR), P;
|
|
857
857
|
}, inflateEnd = (s) => {
|
|
858
858
|
if (inflateStateCheck(s))
|
|
859
859
|
return Z_STREAM_ERROR$1;
|
|
@@ -866,8 +866,8 @@ const fixedtables = (s) => {
|
|
|
866
866
|
return (r.wrap & 2) === 0 ? Z_STREAM_ERROR$1 : (r.head = i, i.done = !1, Z_OK$1);
|
|
867
867
|
}, inflateSetDictionary = (s, i) => {
|
|
868
868
|
const r = i.length;
|
|
869
|
-
let u,
|
|
870
|
-
return inflateStateCheck(s) || (u = s.state, u.wrap !== 0 && u.mode !== DICT) ? Z_STREAM_ERROR$1 : u.mode === DICT && (
|
|
869
|
+
let u, h, o;
|
|
870
|
+
return inflateStateCheck(s) || (u = s.state, u.wrap !== 0 && u.mode !== DICT) ? Z_STREAM_ERROR$1 : u.mode === DICT && (h = 1, h = adler32(h, i, r, 0), h !== u.check) ? Z_DATA_ERROR$1 : (o = updatewindow(s, i, r, r), o ? (u.mode = MEM, Z_MEM_ERROR$1) : (u.havedict = 1, Z_OK$1));
|
|
871
871
|
};
|
|
872
872
|
inflate$2.inflateReset = inflateReset;
|
|
873
873
|
inflate$2.inflateReset2 = inflateReset2;
|
|
@@ -896,12 +896,12 @@ common$1.assign = function(s) {
|
|
|
896
896
|
};
|
|
897
897
|
common$1.flattenChunks = (s) => {
|
|
898
898
|
let i = 0;
|
|
899
|
-
for (let u = 0,
|
|
899
|
+
for (let u = 0, h = s.length; u < h; u++)
|
|
900
900
|
i += s[u].length;
|
|
901
901
|
const r = new Uint8Array(i);
|
|
902
|
-
for (let u = 0,
|
|
902
|
+
for (let u = 0, h = 0, o = s.length; u < o; u++) {
|
|
903
903
|
let l = s[u];
|
|
904
|
-
r.set(l,
|
|
904
|
+
r.set(l, h), h += l.length;
|
|
905
905
|
}
|
|
906
906
|
return r;
|
|
907
907
|
};
|
|
@@ -919,11 +919,11 @@ _utf8len[254] = _utf8len[254] = 1;
|
|
|
919
919
|
strings$1.string2buf = (s) => {
|
|
920
920
|
if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
|
|
921
921
|
return new TextEncoder().encode(s);
|
|
922
|
-
let i, r, u,
|
|
923
|
-
for (
|
|
924
|
-
r = s.charCodeAt(
|
|
925
|
-
for (i = new Uint8Array(c), o = 0,
|
|
926
|
-
r = s.charCodeAt(
|
|
922
|
+
let i, r, u, h, o, l = s.length, c = 0;
|
|
923
|
+
for (h = 0; h < l; h++)
|
|
924
|
+
r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < l && (u = s.charCodeAt(h + 1), (u & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (u - 56320), h++)), c += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
|
|
925
|
+
for (i = new Uint8Array(c), o = 0, h = 0; o < c; h++)
|
|
926
|
+
r = s.charCodeAt(h), (r & 64512) === 55296 && h + 1 < l && (u = s.charCodeAt(h + 1), (u & 64512) === 56320 && (r = 65536 + (r - 55296 << 10) + (u - 56320), h++)), r < 128 ? i[o++] = r : r < 2048 ? (i[o++] = 192 | r >>> 6, i[o++] = 128 | r & 63) : r < 65536 ? (i[o++] = 224 | r >>> 12, i[o++] = 128 | r >>> 6 & 63, i[o++] = 128 | r & 63) : (i[o++] = 240 | r >>> 18, i[o++] = 128 | r >>> 12 & 63, i[o++] = 128 | r >>> 6 & 63, i[o++] = 128 | r & 63);
|
|
927
927
|
return i;
|
|
928
928
|
};
|
|
929
929
|
const buf2binstring = (s, i) => {
|
|
@@ -938,28 +938,28 @@ strings$1.buf2string = (s, i) => {
|
|
|
938
938
|
const r = i || s.length;
|
|
939
939
|
if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
|
|
940
940
|
return new TextDecoder().decode(s.subarray(0, i));
|
|
941
|
-
let u,
|
|
941
|
+
let u, h;
|
|
942
942
|
const o = new Array(r * 2);
|
|
943
|
-
for (
|
|
943
|
+
for (h = 0, u = 0; u < r; ) {
|
|
944
944
|
let l = s[u++];
|
|
945
945
|
if (l < 128) {
|
|
946
|
-
o[
|
|
946
|
+
o[h++] = l;
|
|
947
947
|
continue;
|
|
948
948
|
}
|
|
949
949
|
let c = _utf8len[l];
|
|
950
950
|
if (c > 4) {
|
|
951
|
-
o[
|
|
951
|
+
o[h++] = 65533, u += c - 1;
|
|
952
952
|
continue;
|
|
953
953
|
}
|
|
954
954
|
for (l &= c === 2 ? 31 : c === 3 ? 15 : 7; c > 1 && u < r; )
|
|
955
955
|
l = l << 6 | s[u++] & 63, c--;
|
|
956
956
|
if (c > 1) {
|
|
957
|
-
o[
|
|
957
|
+
o[h++] = 65533;
|
|
958
958
|
continue;
|
|
959
959
|
}
|
|
960
|
-
l < 65536 ? o[
|
|
960
|
+
l < 65536 ? o[h++] = l : (l -= 65536, o[h++] = 55296 | l >> 10 & 1023, o[h++] = 56320 | l & 1023);
|
|
961
961
|
}
|
|
962
|
-
return buf2binstring(o,
|
|
962
|
+
return buf2binstring(o, h);
|
|
963
963
|
};
|
|
964
964
|
strings$1.utf8border = (s, i) => {
|
|
965
965
|
i = i || s.length, i > s.length && (i = s.length);
|
|
@@ -1023,11 +1023,11 @@ function Inflate(s) {
|
|
|
1023
1023
|
throw new Error(msg[r]);
|
|
1024
1024
|
}
|
|
1025
1025
|
Inflate.prototype.push = function(s, i) {
|
|
1026
|
-
const r = this.strm, u = this.options.chunkSize,
|
|
1026
|
+
const r = this.strm, u = this.options.chunkSize, h = this.options.dictionary;
|
|
1027
1027
|
let o, l, c;
|
|
1028
1028
|
if (this.ended) return !1;
|
|
1029
1029
|
for (i === ~~i ? l = i : l = i === !0 ? Z_FINISH : Z_NO_FLUSH, toString.call(s) === "[object ArrayBuffer]" ? r.input = new Uint8Array(s) : r.input = s, r.next_in = 0, r.avail_in = r.input.length; ; ) {
|
|
1030
|
-
for (r.avail_out === 0 && (r.output = new Uint8Array(u), r.next_out = 0, r.avail_out = u), o = zlib_inflate.inflate(r, l), o === Z_NEED_DICT &&
|
|
1030
|
+
for (r.avail_out === 0 && (r.output = new Uint8Array(u), r.next_out = 0, r.avail_out = u), o = zlib_inflate.inflate(r, l), o === Z_NEED_DICT && h && (o = zlib_inflate.inflateSetDictionary(r, h), o === Z_OK ? o = zlib_inflate.inflate(r, l) : o === Z_DATA_ERROR && (o = Z_NEED_DICT)); r.avail_in > 0 && o === Z_STREAM_END && r.state.wrap > 0 && s[r.next_in] !== 0; )
|
|
1031
1031
|
zlib_inflate.inflateReset(r), o = zlib_inflate.inflate(r, l);
|
|
1032
1032
|
switch (o) {
|
|
1033
1033
|
case Z_STREAM_ERROR:
|
|
@@ -1038,8 +1038,8 @@ Inflate.prototype.push = function(s, i) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
if (c = r.avail_out, r.next_out && (r.avail_out === 0 || o === Z_STREAM_END))
|
|
1040
1040
|
if (this.options.to === "string") {
|
|
1041
|
-
let
|
|
1042
|
-
r.next_out = a, r.avail_out = u - a, a && r.output.set(r.output.subarray(
|
|
1041
|
+
let d = strings.utf8border(r.output, r.next_out), a = r.next_out - d, m = strings.buf2string(r.output, d);
|
|
1042
|
+
r.next_out = a, r.avail_out = u - a, a && r.output.set(r.output.subarray(d, d + a), 0), this.onData(m);
|
|
1043
1043
|
} else
|
|
1044
1044
|
this.onData(
|
|
1045
1045
|
r.output.length === r.next_out ? r.output : r.output.subarray(0, r.next_out)
|
|
@@ -1064,8 +1064,8 @@ function inflate(s, i) {
|
|
|
1064
1064
|
return r.result;
|
|
1065
1065
|
}
|
|
1066
1066
|
var inflate_2 = inflate;
|
|
1067
|
-
function f(s, i, r, u,
|
|
1068
|
-
let l = s.tileXYToRectangle(r, u,
|
|
1067
|
+
function f(s, i, r, u, h, o) {
|
|
1068
|
+
let l = s.tileXYToRectangle(r, u, h);
|
|
1069
1069
|
return defined(Rectangle$1.intersection(l, i, o));
|
|
1070
1070
|
}
|
|
1071
1071
|
class GeoTerrainProvider {
|
|
@@ -1113,7 +1113,7 @@ class GeoTerrainProvider {
|
|
|
1113
1113
|
this._tilingScheme.getNumberOfXTilesAtLevel(0)
|
|
1114
1114
|
), this._ready = !0, this._topLevel = i.topLevel ?? 5, this._bottomLevel = i.bottomLevel ?? 25;
|
|
1115
1115
|
}
|
|
1116
|
-
requestTileGeometry(i, r, u,
|
|
1116
|
+
requestTileGeometry(i, r, u, h) {
|
|
1117
1117
|
if (!this.ready)
|
|
1118
1118
|
throw new DeveloperError("requestTileGeometry must not be called before ready returns true.");
|
|
1119
1119
|
if (u >= this._bottomLevel) return Promise.reject(`${u}该级别不发送请求!`);
|
|
@@ -1131,12 +1131,12 @@ class GeoTerrainProvider {
|
|
|
1131
1131
|
Array.isArray(this._subdomains) && this._subdomains.length && (o = this._subdomains[(i + r) % this._subdomains.length], l = l.replace("{s}", o)), l = l.replace("{token}", this._token).replace("{x}", i).replace("{y}", r).replace("{z}", u + 1);
|
|
1132
1132
|
const c = Resource.fetchArrayBuffer({
|
|
1133
1133
|
url: l,
|
|
1134
|
-
request:
|
|
1134
|
+
request: h
|
|
1135
1135
|
});
|
|
1136
1136
|
if (c)
|
|
1137
|
-
return c.then((
|
|
1137
|
+
return c.then((d) => d.byteLength < 1e3 ? Promise.reject("无效数据") : inflate_2(d)).then((d) => {
|
|
1138
1138
|
const a = new HeightmapTerrainData({
|
|
1139
|
-
buffer: this.transformBuffer(
|
|
1139
|
+
buffer: this.transformBuffer(d),
|
|
1140
1140
|
width: this._heightmapWidth,
|
|
1141
1141
|
height: this._heightmapHeight,
|
|
1142
1142
|
childTileMask: this.getChildTileMask(i, r, u),
|
|
@@ -1158,11 +1158,11 @@ class GeoTerrainProvider {
|
|
|
1158
1158
|
this._dataType === "int" ? r = 2 : this._dataType === "float" && (r = 4);
|
|
1159
1159
|
let u = i;
|
|
1160
1160
|
if (u.length !== 22500 * r) return null;
|
|
1161
|
-
let
|
|
1161
|
+
let h, o, l, c, d = new ArrayBuffer(r), a = new DataView(d), m = this._heightmapWidth, y = this._heightmapHeight, g = new Uint8Array(m * y * 4);
|
|
1162
1162
|
for (let p = 0; p < y; p++)
|
|
1163
1163
|
for (let v = 0; v < m; v++) {
|
|
1164
|
-
l = parseInt(149 * p / (y - 1)), c = parseInt(149 * v / (m - 1)), o = r * (150 * l + c), r === 4 ? (a.setInt8(0, u[o]), a.setInt8(1, u[o + 1]), a.setInt8(2, u[o + 2]), a.setInt8(3, u[o + 3]),
|
|
1165
|
-
let b = (
|
|
1164
|
+
l = parseInt(149 * p / (y - 1)), c = parseInt(149 * v / (m - 1)), o = r * (150 * l + c), r === 4 ? (a.setInt8(0, u[o]), a.setInt8(1, u[o + 1]), a.setInt8(2, u[o + 2]), a.setInt8(3, u[o + 3]), h = a.getFloat32(0, !0)) : h = u[o] + 256 * u[o + 1], (1e4 < h || h < -2e3) && (h = 0);
|
|
1165
|
+
let b = (h + 1e3) / 1e-3, _ = 4 * (p * m + v);
|
|
1166
1166
|
g[_] = b / 65536, g[1 + _] = (b - 256 * g[_] * 256) / 256, g[2 + _] = b - 256 * g[_] * 256 - 256 * g[1 + _], g[3 + _] = 255;
|
|
1167
1167
|
}
|
|
1168
1168
|
return g;
|
|
@@ -1178,15 +1178,15 @@ class GeoTerrainProvider {
|
|
|
1178
1178
|
return i;
|
|
1179
1179
|
}
|
|
1180
1180
|
getChildTileMask(i, r, u) {
|
|
1181
|
-
let
|
|
1182
|
-
for (let a = 0; a < l.length &&
|
|
1181
|
+
let h = new Rectangle$1(), o = this._tilingScheme, l = this._rectangles, c = o.tileXYToRectangle(i, r, u), d = 0;
|
|
1182
|
+
for (let a = 0; a < l.length && d !== 15; ++a) {
|
|
1183
1183
|
let m = l[a];
|
|
1184
1184
|
if (!(m.maxLevel <= u)) {
|
|
1185
|
-
let y = m.rectangle, g = Rectangle$1.intersection(y, c,
|
|
1186
|
-
defined(g) && (f(o, y, 2 * i, 2 * r, u + 1,
|
|
1185
|
+
let y = m.rectangle, g = Rectangle$1.intersection(y, c, h);
|
|
1186
|
+
defined(g) && (f(o, y, 2 * i, 2 * r, u + 1, h) && (d |= 4), f(o, y, 2 * i + 1, 2 * r, u + 1, h) && (d |= 8), f(o, y, 2 * i, 2 * r + 1, u + 1, h) && (d |= 1), f(o, y, 2 * i + 1, 2 * r + 1, u + 1, h) && (d |= 2));
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
return
|
|
1189
|
+
return d;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
var src = { exports: {} }, indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise, hasRequiredAspromise;
|
|
@@ -1194,14 +1194,14 @@ function requireAspromise() {
|
|
|
1194
1194
|
if (hasRequiredAspromise) return aspromise;
|
|
1195
1195
|
hasRequiredAspromise = 1, aspromise = s;
|
|
1196
1196
|
function s(i, r) {
|
|
1197
|
-
for (var u = new Array(arguments.length - 1),
|
|
1198
|
-
return new Promise(function(
|
|
1199
|
-
u[
|
|
1197
|
+
for (var u = new Array(arguments.length - 1), h = 0, o = 2, l = !0; o < arguments.length; ) u[h++] = arguments[o++];
|
|
1198
|
+
return new Promise(function(d, a) {
|
|
1199
|
+
u[h] = function(y) {
|
|
1200
1200
|
if (l)
|
|
1201
1201
|
if (l = !1, y) a(y);
|
|
1202
1202
|
else {
|
|
1203
1203
|
for (var g = new Array(arguments.length - 1), p = 0; p < g.length; ) g[p++] = arguments[p];
|
|
1204
|
-
|
|
1204
|
+
d.apply(null, g);
|
|
1205
1205
|
}
|
|
1206
1206
|
};
|
|
1207
1207
|
try {
|
|
@@ -1218,16 +1218,16 @@ function requireBase64() {
|
|
|
1218
1218
|
return hasRequiredBase64 || (hasRequiredBase64 = 1, function(s) {
|
|
1219
1219
|
var i = s;
|
|
1220
1220
|
i.length = function(c) {
|
|
1221
|
-
var
|
|
1222
|
-
if (!
|
|
1223
|
-
for (var a = 0; --
|
|
1221
|
+
var d = c.length;
|
|
1222
|
+
if (!d) return 0;
|
|
1223
|
+
for (var a = 0; --d % 4 > 1 && c.charAt(d) === "="; ) ++a;
|
|
1224
1224
|
return Math.ceil(c.length * 3) / 4 - a;
|
|
1225
1225
|
};
|
|
1226
|
-
for (var r = new Array(64), u = new Array(123),
|
|
1227
|
-
u[r[
|
|
1228
|
-
i.encode = function(c,
|
|
1229
|
-
for (var m = null, y = [], g = 0, p = 0, v;
|
|
1230
|
-
var b = c[
|
|
1226
|
+
for (var r = new Array(64), u = new Array(123), h = 0; h < 64; )
|
|
1227
|
+
u[r[h] = h < 26 ? h + 65 : h < 52 ? h + 71 : h < 62 ? h - 4 : h - 59 | 43] = h++;
|
|
1228
|
+
i.encode = function(c, d, a) {
|
|
1229
|
+
for (var m = null, y = [], g = 0, p = 0, v; d < a; ) {
|
|
1230
|
+
var b = c[d++];
|
|
1231
1231
|
switch (p) {
|
|
1232
1232
|
case 0:
|
|
1233
1233
|
y[g++] = r[b >> 2], v = (b & 3) << 4, p = 1;
|
|
@@ -1244,7 +1244,7 @@ function requireBase64() {
|
|
|
1244
1244
|
return p && (y[g++] = r[v], y[g++] = 61, p === 1 && (y[g++] = 61)), m ? (g && m.push(String.fromCharCode.apply(String, y.slice(0, g))), m.join("")) : String.fromCharCode.apply(String, y.slice(0, g));
|
|
1245
1245
|
};
|
|
1246
1246
|
var o = "invalid encoding";
|
|
1247
|
-
i.decode = function(c,
|
|
1247
|
+
i.decode = function(c, d, a) {
|
|
1248
1248
|
for (var m = a, y = 0, g, p = 0; p < c.length; ) {
|
|
1249
1249
|
var v = c.charCodeAt(p++);
|
|
1250
1250
|
if (v === 61 && y > 1) break;
|
|
@@ -1254,13 +1254,13 @@ function requireBase64() {
|
|
|
1254
1254
|
g = v, y = 1;
|
|
1255
1255
|
break;
|
|
1256
1256
|
case 1:
|
|
1257
|
-
|
|
1257
|
+
d[a++] = g << 2 | (v & 48) >> 4, g = v, y = 2;
|
|
1258
1258
|
break;
|
|
1259
1259
|
case 2:
|
|
1260
|
-
|
|
1260
|
+
d[a++] = (g & 15) << 4 | (v & 60) >> 2, g = v, y = 3;
|
|
1261
1261
|
break;
|
|
1262
1262
|
case 3:
|
|
1263
|
-
|
|
1263
|
+
d[a++] = (g & 3) << 6 | v, y = 0;
|
|
1264
1264
|
break;
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
@@ -1278,23 +1278,23 @@ function requireEventemitter() {
|
|
|
1278
1278
|
function s() {
|
|
1279
1279
|
this._listeners = {};
|
|
1280
1280
|
}
|
|
1281
|
-
return s.prototype.on = function(r, u,
|
|
1281
|
+
return s.prototype.on = function(r, u, h) {
|
|
1282
1282
|
return (this._listeners[r] || (this._listeners[r] = [])).push({
|
|
1283
1283
|
fn: u,
|
|
1284
|
-
ctx:
|
|
1284
|
+
ctx: h || this
|
|
1285
1285
|
}), this;
|
|
1286
1286
|
}, s.prototype.off = function(r, u) {
|
|
1287
1287
|
if (r === void 0) this._listeners = {};
|
|
1288
1288
|
else if (u === void 0) this._listeners[r] = [];
|
|
1289
1289
|
else
|
|
1290
|
-
for (var
|
|
1291
|
-
|
|
1290
|
+
for (var h = this._listeners[r], o = 0; o < h.length; )
|
|
1291
|
+
h[o].fn === u ? h.splice(o, 1) : ++o;
|
|
1292
1292
|
return this;
|
|
1293
1293
|
}, s.prototype.emit = function(r) {
|
|
1294
1294
|
var u = this._listeners[r];
|
|
1295
1295
|
if (u) {
|
|
1296
|
-
for (var
|
|
1297
|
-
for (o = 0; o < u.length; ) u[o].fn.apply(u[o++].ctx,
|
|
1296
|
+
for (var h = [], o = 1; o < arguments.length; ) h.push(arguments[o++]);
|
|
1297
|
+
for (o = 0; o < u.length; ) u[o].fn.apply(u[o++].ctx, h);
|
|
1298
1298
|
}
|
|
1299
1299
|
return this;
|
|
1300
1300
|
}, eventemitter;
|
|
@@ -1305,69 +1305,69 @@ function requireFloat() {
|
|
|
1305
1305
|
hasRequiredFloat = 1, float = s(s);
|
|
1306
1306
|
function s(o) {
|
|
1307
1307
|
return typeof Float32Array < "u" ? function() {
|
|
1308
|
-
var l = new Float32Array([-0]), c = new Uint8Array(l.buffer),
|
|
1308
|
+
var l = new Float32Array([-0]), c = new Uint8Array(l.buffer), d = c[3] === 128;
|
|
1309
1309
|
function a(p, v, b) {
|
|
1310
1310
|
l[0] = p, v[b] = c[0], v[b + 1] = c[1], v[b + 2] = c[2], v[b + 3] = c[3];
|
|
1311
1311
|
}
|
|
1312
1312
|
function m(p, v, b) {
|
|
1313
1313
|
l[0] = p, v[b] = c[3], v[b + 1] = c[2], v[b + 2] = c[1], v[b + 3] = c[0];
|
|
1314
1314
|
}
|
|
1315
|
-
o.writeFloatLE =
|
|
1315
|
+
o.writeFloatLE = d ? a : m, o.writeFloatBE = d ? m : a;
|
|
1316
1316
|
function y(p, v) {
|
|
1317
1317
|
return c[0] = p[v], c[1] = p[v + 1], c[2] = p[v + 2], c[3] = p[v + 3], l[0];
|
|
1318
1318
|
}
|
|
1319
1319
|
function g(p, v) {
|
|
1320
1320
|
return c[3] = p[v], c[2] = p[v + 1], c[1] = p[v + 2], c[0] = p[v + 3], l[0];
|
|
1321
1321
|
}
|
|
1322
|
-
o.readFloatLE =
|
|
1322
|
+
o.readFloatLE = d ? y : g, o.readFloatBE = d ? g : y;
|
|
1323
1323
|
}() : function() {
|
|
1324
|
-
function l(
|
|
1324
|
+
function l(d, a, m, y) {
|
|
1325
1325
|
var g = a < 0 ? 1 : 0;
|
|
1326
1326
|
if (g && (a = -a), a === 0)
|
|
1327
|
-
|
|
1327
|
+
d(1 / a > 0 ? (
|
|
1328
1328
|
/* positive */
|
|
1329
1329
|
0
|
|
1330
1330
|
) : (
|
|
1331
1331
|
/* negative 0 */
|
|
1332
1332
|
2147483648
|
|
1333
1333
|
), m, y);
|
|
1334
|
-
else if (isNaN(a))
|
|
1334
|
+
else if (isNaN(a)) d(2143289344, m, y);
|
|
1335
1335
|
else if (a > 34028234663852886e22)
|
|
1336
|
-
|
|
1336
|
+
d((g << 31 | 2139095040) >>> 0, m, y);
|
|
1337
1337
|
else if (a < 11754943508222875e-54)
|
|
1338
|
-
|
|
1338
|
+
d((g << 31 | Math.round(a / 1401298464324817e-60)) >>> 0, m, y);
|
|
1339
1339
|
else {
|
|
1340
1340
|
var p = Math.floor(Math.log(a) / Math.LN2), v = Math.round(a * Math.pow(2, -p) * 8388608) & 8388607;
|
|
1341
|
-
|
|
1341
|
+
d((g << 31 | p + 127 << 23 | v) >>> 0, m, y);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
o.writeFloatLE = l.bind(null, i), o.writeFloatBE = l.bind(null, r);
|
|
1345
|
-
function c(
|
|
1346
|
-
var y =
|
|
1345
|
+
function c(d, a, m) {
|
|
1346
|
+
var y = d(a, m), g = (y >> 31) * 2 + 1, p = y >>> 23 & 255, v = y & 8388607;
|
|
1347
1347
|
return p === 255 ? v ? NaN : g * (1 / 0) : p === 0 ? g * 1401298464324817e-60 * v : g * Math.pow(2, p - 150) * (v + 8388608);
|
|
1348
1348
|
}
|
|
1349
|
-
o.readFloatLE = c.bind(null, u), o.readFloatBE = c.bind(null,
|
|
1349
|
+
o.readFloatLE = c.bind(null, u), o.readFloatBE = c.bind(null, h);
|
|
1350
1350
|
}(), typeof Float64Array < "u" ? function() {
|
|
1351
|
-
var l = new Float64Array([-0]), c = new Uint8Array(l.buffer),
|
|
1351
|
+
var l = new Float64Array([-0]), c = new Uint8Array(l.buffer), d = c[7] === 128;
|
|
1352
1352
|
function a(p, v, b) {
|
|
1353
1353
|
l[0] = p, v[b] = c[0], v[b + 1] = c[1], v[b + 2] = c[2], v[b + 3] = c[3], v[b + 4] = c[4], v[b + 5] = c[5], v[b + 6] = c[6], v[b + 7] = c[7];
|
|
1354
1354
|
}
|
|
1355
1355
|
function m(p, v, b) {
|
|
1356
1356
|
l[0] = p, v[b] = c[7], v[b + 1] = c[6], v[b + 2] = c[5], v[b + 3] = c[4], v[b + 4] = c[3], v[b + 5] = c[2], v[b + 6] = c[1], v[b + 7] = c[0];
|
|
1357
1357
|
}
|
|
1358
|
-
o.writeDoubleLE =
|
|
1358
|
+
o.writeDoubleLE = d ? a : m, o.writeDoubleBE = d ? m : a;
|
|
1359
1359
|
function y(p, v) {
|
|
1360
1360
|
return c[0] = p[v], c[1] = p[v + 1], c[2] = p[v + 2], c[3] = p[v + 3], c[4] = p[v + 4], c[5] = p[v + 5], c[6] = p[v + 6], c[7] = p[v + 7], l[0];
|
|
1361
1361
|
}
|
|
1362
1362
|
function g(p, v) {
|
|
1363
1363
|
return c[7] = p[v], c[6] = p[v + 1], c[5] = p[v + 2], c[4] = p[v + 3], c[3] = p[v + 4], c[2] = p[v + 5], c[1] = p[v + 6], c[0] = p[v + 7], l[0];
|
|
1364
1364
|
}
|
|
1365
|
-
o.readDoubleLE =
|
|
1365
|
+
o.readDoubleLE = d ? y : g, o.readDoubleBE = d ? g : y;
|
|
1366
1366
|
}() : function() {
|
|
1367
|
-
function l(
|
|
1367
|
+
function l(d, a, m, y, g, p) {
|
|
1368
1368
|
var v = y < 0 ? 1 : 0;
|
|
1369
1369
|
if (v && (y = -y), y === 0)
|
|
1370
|
-
|
|
1370
|
+
d(0, g, p + a), d(1 / y > 0 ? (
|
|
1371
1371
|
/* positive */
|
|
1372
1372
|
0
|
|
1373
1373
|
) : (
|
|
@@ -1375,16 +1375,16 @@ function requireFloat() {
|
|
|
1375
1375
|
2147483648
|
|
1376
1376
|
), g, p + m);
|
|
1377
1377
|
else if (isNaN(y))
|
|
1378
|
-
|
|
1378
|
+
d(0, g, p + a), d(2146959360, g, p + m);
|
|
1379
1379
|
else if (y > 17976931348623157e292)
|
|
1380
|
-
|
|
1380
|
+
d(0, g, p + a), d((v << 31 | 2146435072) >>> 0, g, p + m);
|
|
1381
1381
|
else {
|
|
1382
1382
|
var b;
|
|
1383
1383
|
if (y < 22250738585072014e-324)
|
|
1384
|
-
b = y / 5e-324,
|
|
1384
|
+
b = y / 5e-324, d(b >>> 0, g, p + a), d((v << 31 | b / 4294967296) >>> 0, g, p + m);
|
|
1385
1385
|
else {
|
|
1386
1386
|
var _ = Math.floor(Math.log(y) / Math.LN2);
|
|
1387
|
-
_ === 1024 && (_ = 1023), b = y * Math.pow(2, -_),
|
|
1387
|
+
_ === 1024 && (_ = 1023), b = y * Math.pow(2, -_), d(b * 4503599627370496 >>> 0, g, p + a), d(
|
|
1388
1388
|
(v << 31 | _ + 1023 << 20 | b * 1048576 & 1048575) >>> 0,
|
|
1389
1389
|
g,
|
|
1390
1390
|
p + m
|
|
@@ -1393,11 +1393,11 @@ function requireFloat() {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
o.writeDoubleLE = l.bind(null, i, 0, 4), o.writeDoubleBE = l.bind(null, r, 4, 0);
|
|
1396
|
-
function c(
|
|
1397
|
-
var p =
|
|
1396
|
+
function c(d, a, m, y, g) {
|
|
1397
|
+
var p = d(y, g + a), v = d(y, g + m), b = (v >> 31) * 2 + 1, _ = v >>> 20 & 2047, T = 4294967296 * (v & 1048575) + p;
|
|
1398
1398
|
return _ === 2047 ? T ? NaN : b * (1 / 0) : _ === 0 ? b * 5e-324 * T : b * Math.pow(2, _ - 1075) * (T + 4503599627370496);
|
|
1399
1399
|
}
|
|
1400
|
-
o.readDoubleLE = c.bind(null, u, 0, 4), o.readDoubleBE = c.bind(null,
|
|
1400
|
+
o.readDoubleLE = c.bind(null, u, 0, 4), o.readDoubleBE = c.bind(null, h, 4, 0);
|
|
1401
1401
|
}(), o;
|
|
1402
1402
|
}
|
|
1403
1403
|
function i(o, l, c) {
|
|
@@ -1409,7 +1409,7 @@ function requireFloat() {
|
|
|
1409
1409
|
function u(o, l) {
|
|
1410
1410
|
return (o[l] | o[l + 1] << 8 | o[l + 2] << 16 | o[l + 3] << 24) >>> 0;
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function h(o, l) {
|
|
1413
1413
|
return (o[l] << 24 | o[l + 1] << 16 | o[l + 2] << 8 | o[l + 3]) >>> 0;
|
|
1414
1414
|
}
|
|
1415
1415
|
return float;
|
|
@@ -1433,18 +1433,18 @@ function requireUtf8() {
|
|
|
1433
1433
|
return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(s) {
|
|
1434
1434
|
var i = s;
|
|
1435
1435
|
i.length = function(u) {
|
|
1436
|
-
for (var
|
|
1437
|
-
o = u.charCodeAt(l), o < 128 ?
|
|
1438
|
-
return
|
|
1439
|
-
}, i.read = function(u,
|
|
1440
|
-
var l = o -
|
|
1436
|
+
for (var h = 0, o = 0, l = 0; l < u.length; ++l)
|
|
1437
|
+
o = u.charCodeAt(l), o < 128 ? h += 1 : o < 2048 ? h += 2 : (o & 64512) === 55296 && (u.charCodeAt(l + 1) & 64512) === 56320 ? (++l, h += 4) : h += 3;
|
|
1438
|
+
return h;
|
|
1439
|
+
}, i.read = function(u, h, o) {
|
|
1440
|
+
var l = o - h;
|
|
1441
1441
|
if (l < 1) return "";
|
|
1442
|
-
for (var c = null,
|
|
1443
|
-
m = u[
|
|
1444
|
-
return c ? (a && c.push(String.fromCharCode.apply(String,
|
|
1445
|
-
}, i.write = function(u,
|
|
1446
|
-
for (var l = o, c,
|
|
1447
|
-
c = u.charCodeAt(a), c < 128 ?
|
|
1442
|
+
for (var c = null, d = [], a = 0, m; h < o; )
|
|
1443
|
+
m = u[h++], m < 128 ? d[a++] = m : m > 191 && m < 224 ? d[a++] = (m & 31) << 6 | u[h++] & 63 : m > 239 && m < 365 ? (m = ((m & 7) << 18 | (u[h++] & 63) << 12 | (u[h++] & 63) << 6 | u[h++] & 63) - 65536, d[a++] = 55296 + (m >> 10), d[a++] = 56320 + (m & 1023)) : d[a++] = (m & 15) << 12 | (u[h++] & 63) << 6 | u[h++] & 63, a > 8191 && ((c || (c = [])).push(String.fromCharCode.apply(String, d)), a = 0);
|
|
1444
|
+
return c ? (a && c.push(String.fromCharCode.apply(String, d.slice(0, a))), c.join("")) : String.fromCharCode.apply(String, d.slice(0, a));
|
|
1445
|
+
}, i.write = function(u, h, o) {
|
|
1446
|
+
for (var l = o, c, d, a = 0; a < u.length; ++a)
|
|
1447
|
+
c = u.charCodeAt(a), c < 128 ? h[o++] = c : c < 2048 ? (h[o++] = c >> 6 | 192, h[o++] = c & 63 | 128) : (c & 64512) === 55296 && ((d = u.charCodeAt(a + 1)) & 64512) === 56320 ? (c = 65536 + ((c & 1023) << 10) + (d & 1023), ++a, h[o++] = c >> 18 | 240, h[o++] = c >> 12 & 63 | 128, h[o++] = c >> 6 & 63 | 128, h[o++] = c & 63 | 128) : (h[o++] = c >> 12 | 224, h[o++] = c >> 6 & 63 | 128, h[o++] = c & 63 | 128);
|
|
1448
1448
|
return o - l;
|
|
1449
1449
|
};
|
|
1450
1450
|
}(utf8$2)), utf8$2;
|
|
@@ -1454,10 +1454,10 @@ function requirePool() {
|
|
|
1454
1454
|
if (hasRequiredPool) return pool_1;
|
|
1455
1455
|
hasRequiredPool = 1, pool_1 = s;
|
|
1456
1456
|
function s(i, r, u) {
|
|
1457
|
-
var
|
|
1457
|
+
var h = u || 8192, o = h >>> 1, l = null, c = h;
|
|
1458
1458
|
return function(a) {
|
|
1459
1459
|
if (a < 1 || a > o) return i(a);
|
|
1460
|
-
c + a >
|
|
1460
|
+
c + a > h && (l = i(h), c = 0);
|
|
1461
1461
|
var m = r.call(l, c, c += a);
|
|
1462
1462
|
return c & 7 && (c = (c | 7) + 1), m;
|
|
1463
1463
|
};
|
|
@@ -1485,8 +1485,8 @@ function requireLongbits() {
|
|
|
1485
1485
|
if (l === 0) return r;
|
|
1486
1486
|
var c = l < 0;
|
|
1487
1487
|
c && (l = -l);
|
|
1488
|
-
var
|
|
1489
|
-
return c && (a = ~a >>> 0,
|
|
1488
|
+
var d = l >>> 0, a = (l - d) / 4294967296 >>> 0;
|
|
1489
|
+
return c && (a = ~a >>> 0, d = ~d >>> 0, ++d > 4294967295 && (d = 0, ++a > 4294967295 && (a = 0))), new i(d, a);
|
|
1490
1490
|
}, i.from = function(l) {
|
|
1491
1491
|
if (typeof l == "number") return i.fromNumber(l);
|
|
1492
1492
|
if (s.isString(l))
|
|
@@ -1495,8 +1495,8 @@ function requireLongbits() {
|
|
|
1495
1495
|
return l.low || l.high ? new i(l.low >>> 0, l.high >>> 0) : r;
|
|
1496
1496
|
}, i.prototype.toNumber = function(l) {
|
|
1497
1497
|
if (!l && this.hi >>> 31) {
|
|
1498
|
-
var c = ~this.lo + 1 >>> 0,
|
|
1499
|
-
return c || (
|
|
1498
|
+
var c = ~this.lo + 1 >>> 0, d = ~this.hi >>> 0;
|
|
1499
|
+
return c || (d = d + 1 >>> 0), -(c + d * 4294967296);
|
|
1500
1500
|
}
|
|
1501
1501
|
return this.lo + this.hi * 4294967296;
|
|
1502
1502
|
}, i.prototype.toLong = function(l) {
|
|
@@ -1509,11 +1509,11 @@ function requireLongbits() {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
);
|
|
1511
1511
|
};
|
|
1512
|
-
var
|
|
1512
|
+
var h = String.prototype.charCodeAt;
|
|
1513
1513
|
return i.fromHash = function(l) {
|
|
1514
1514
|
return l === u ? r : new i(
|
|
1515
|
-
(
|
|
1516
|
-
(
|
|
1515
|
+
(h.call(l, 0) | h.call(l, 1) << 8 | h.call(l, 2) << 16 | h.call(l, 3) << 24) >>> 0,
|
|
1516
|
+
(h.call(l, 4) | h.call(l, 5) << 8 | h.call(l, 6) << 16 | h.call(l, 7) << 24) >>> 0
|
|
1517
1517
|
);
|
|
1518
1518
|
}, i.prototype.toHash = function() {
|
|
1519
1519
|
return String.fromCharCode(
|
|
@@ -1533,8 +1533,8 @@ function requireLongbits() {
|
|
|
1533
1533
|
var l = -(this.lo & 1);
|
|
1534
1534
|
return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ l) >>> 0, this.hi = (this.hi >>> 1 ^ l) >>> 0, this;
|
|
1535
1535
|
}, i.prototype.length = function() {
|
|
1536
|
-
var l = this.lo, c = (this.lo >>> 28 | this.hi << 4) >>> 0,
|
|
1537
|
-
return
|
|
1536
|
+
var l = this.lo, c = (this.lo >>> 28 | this.hi << 4) >>> 0, d = this.hi >>> 24;
|
|
1537
|
+
return d === 0 ? c === 0 ? l < 16384 ? l < 128 ? 1 : 2 : l < 2097152 ? 3 : 4 : c < 16384 ? c < 128 ? 5 : 6 : c < 2097152 ? 7 : 8 : d < 128 ? 9 : 10;
|
|
1538
1538
|
}, longbits;
|
|
1539
1539
|
}
|
|
1540
1540
|
var hasRequiredMinimal;
|
|
@@ -1565,8 +1565,8 @@ function requireMinimal() {
|
|
|
1565
1565
|
return c != null && o.hasOwnProperty(l) ? typeof c != "object" || (Array.isArray(c) ? c.length : Object.keys(c).length) > 0 : !1;
|
|
1566
1566
|
}, i.Buffer = function() {
|
|
1567
1567
|
try {
|
|
1568
|
-
var
|
|
1569
|
-
return
|
|
1568
|
+
var h = i.inquire("buffer").Buffer;
|
|
1569
|
+
return h.prototype.utf8Write ? h : (
|
|
1570
1570
|
/* istanbul ignore next */
|
|
1571
1571
|
null
|
|
1572
1572
|
);
|
|
@@ -1584,15 +1584,15 @@ function requireMinimal() {
|
|
|
1584
1584
|
var c = i.LongBits.fromHash(o);
|
|
1585
1585
|
return i.Long ? i.Long.fromBits(c.lo, c.hi, l) : c.toNumber(!!l);
|
|
1586
1586
|
};
|
|
1587
|
-
function r(
|
|
1588
|
-
for (var c = Object.keys(o),
|
|
1589
|
-
(
|
|
1590
|
-
return
|
|
1587
|
+
function r(h, o, l) {
|
|
1588
|
+
for (var c = Object.keys(o), d = 0; d < c.length; ++d)
|
|
1589
|
+
(h[c[d]] === void 0 || !l) && (h[c[d]] = o[c[d]]);
|
|
1590
|
+
return h;
|
|
1591
1591
|
}
|
|
1592
1592
|
i.merge = r, i.lcFirst = function(o) {
|
|
1593
1593
|
return o.charAt(0).toLowerCase() + o.substring(1);
|
|
1594
1594
|
};
|
|
1595
|
-
function u(
|
|
1595
|
+
function u(h) {
|
|
1596
1596
|
function o(l, c) {
|
|
1597
1597
|
if (!(this instanceof o)) return new o(l, c);
|
|
1598
1598
|
Object.defineProperty(this, "message", {
|
|
@@ -1612,7 +1612,7 @@ function requireMinimal() {
|
|
|
1612
1612
|
},
|
|
1613
1613
|
name: {
|
|
1614
1614
|
get: function() {
|
|
1615
|
-
return
|
|
1615
|
+
return h;
|
|
1616
1616
|
},
|
|
1617
1617
|
set: void 0,
|
|
1618
1618
|
enumerable: !1,
|
|
@@ -1635,9 +1635,9 @@ function requireMinimal() {
|
|
|
1635
1635
|
i.newError = u, i.ProtocolError = u("ProtocolError"), i.oneOfGetter = function(o) {
|
|
1636
1636
|
for (var l = {}, c = 0; c < o.length; ++c) l[o[c]] = 1;
|
|
1637
1637
|
return function() {
|
|
1638
|
-
for (var
|
|
1639
|
-
if (l[
|
|
1640
|
-
return
|
|
1638
|
+
for (var d = Object.keys(this), a = d.length - 1; a > -1; --a)
|
|
1639
|
+
if (l[d[a]] === 1 && this[d[a]] !== void 0 && this[d[a]] !== null)
|
|
1640
|
+
return d[a];
|
|
1641
1641
|
};
|
|
1642
1642
|
}, i.oneOfSetter = function(o) {
|
|
1643
1643
|
return function(l) {
|
|
@@ -1650,15 +1650,15 @@ function requireMinimal() {
|
|
|
1650
1650
|
bytes: String,
|
|
1651
1651
|
json: !0
|
|
1652
1652
|
}, i._configure = function() {
|
|
1653
|
-
var
|
|
1654
|
-
if (!
|
|
1653
|
+
var h = i.Buffer;
|
|
1654
|
+
if (!h) {
|
|
1655
1655
|
i._Buffer_from = i._Buffer_allocUnsafe = null;
|
|
1656
1656
|
return;
|
|
1657
1657
|
}
|
|
1658
|
-
i._Buffer_from =
|
|
1659
|
-
return new
|
|
1660
|
-
}, i._Buffer_allocUnsafe =
|
|
1661
|
-
return new
|
|
1658
|
+
i._Buffer_from = h.from !== Uint8Array.from && h.from || function(l, c) {
|
|
1659
|
+
return new h(l, c);
|
|
1660
|
+
}, i._Buffer_allocUnsafe = h.allocUnsafe || function(l) {
|
|
1661
|
+
return new h(l);
|
|
1662
1662
|
};
|
|
1663
1663
|
};
|
|
1664
1664
|
}(minimal)), minimal;
|
|
@@ -1762,7 +1762,7 @@ var writeBytes = util$7.Array.prototype.set ? function s(i, r, u) {
|
|
|
1762
1762
|
} : (
|
|
1763
1763
|
/* istanbul ignore next */
|
|
1764
1764
|
function s(i, r, u) {
|
|
1765
|
-
for (var
|
|
1765
|
+
for (var h = 0; h < i.length; ++h) r[u + h] = i[h];
|
|
1766
1766
|
}
|
|
1767
1767
|
);
|
|
1768
1768
|
Writer$1.prototype.bytes = function s(i) {
|
|
@@ -1811,8 +1811,8 @@ BufferWriter._configure = function() {
|
|
|
1811
1811
|
if (i.copy)
|
|
1812
1812
|
i.copy(r, u, 0, i.length);
|
|
1813
1813
|
else
|
|
1814
|
-
for (var
|
|
1815
|
-
r[u++] = i[
|
|
1814
|
+
for (var h = 0; h < i.length; )
|
|
1815
|
+
r[u++] = i[h++];
|
|
1816
1816
|
}
|
|
1817
1817
|
);
|
|
1818
1818
|
};
|
|
@@ -1849,10 +1849,10 @@ var create_array = typeof Uint8Array < "u" ? function s(i) {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
), create = function s() {
|
|
1851
1851
|
return util$5.Buffer ? function(r) {
|
|
1852
|
-
return (Reader$1.create = function(
|
|
1853
|
-
return util$5.Buffer.isBuffer(
|
|
1852
|
+
return (Reader$1.create = function(h) {
|
|
1853
|
+
return util$5.Buffer.isBuffer(h) ? new BufferReader$1(h) : (
|
|
1854
1854
|
/* istanbul ignore next */
|
|
1855
|
-
create_array(
|
|
1855
|
+
create_array(h)
|
|
1856
1856
|
);
|
|
1857
1857
|
})(r);
|
|
1858
1858
|
} : (
|
|
@@ -1940,8 +1940,8 @@ Reader$1.prototype.bytes = function s() {
|
|
|
1940
1940
|
if (this.pos += i, Array.isArray(this.buf))
|
|
1941
1941
|
return this.buf.slice(r, u);
|
|
1942
1942
|
if (r === u) {
|
|
1943
|
-
var
|
|
1944
|
-
return
|
|
1943
|
+
var h = util$5.Buffer;
|
|
1944
|
+
return h ? h.alloc(0) : new this.buf.constructor(0);
|
|
1945
1945
|
}
|
|
1946
1946
|
return this._slice.call(this.buf, r, u);
|
|
1947
1947
|
};
|
|
@@ -2027,10 +2027,10 @@ function Service$1(s, i, r) {
|
|
|
2027
2027
|
if (typeof s != "function") throw TypeError("rpcImpl must be a function");
|
|
2028
2028
|
util$3.EventEmitter.call(this), this.rpcImpl = s, this.requestDelimited = !!i, this.responseDelimited = !!r;
|
|
2029
2029
|
}
|
|
2030
|
-
Service$1.prototype.rpcCall = function s(i, r, u,
|
|
2031
|
-
if (!
|
|
2030
|
+
Service$1.prototype.rpcCall = function s(i, r, u, h, o) {
|
|
2031
|
+
if (!h) throw TypeError("request must be specified");
|
|
2032
2032
|
var l = this;
|
|
2033
|
-
if (!o) return util$3.asPromise(s, l, i, r, u,
|
|
2033
|
+
if (!o) return util$3.asPromise(s, l, i, r, u, h);
|
|
2034
2034
|
if (!l.rpcImpl) {
|
|
2035
2035
|
setTimeout(function() {
|
|
2036
2036
|
o(Error("already ended"));
|
|
@@ -2040,10 +2040,10 @@ Service$1.prototype.rpcCall = function s(i, r, u, d, o) {
|
|
|
2040
2040
|
try {
|
|
2041
2041
|
return l.rpcImpl(
|
|
2042
2042
|
i,
|
|
2043
|
-
r[l.requestDelimited ? "encodeDelimited" : "encode"](
|
|
2044
|
-
function(
|
|
2045
|
-
if (
|
|
2046
|
-
return l.emit("error",
|
|
2043
|
+
r[l.requestDelimited ? "encodeDelimited" : "encode"](h).finish(),
|
|
2044
|
+
function(d, a) {
|
|
2045
|
+
if (d)
|
|
2046
|
+
return l.emit("error", d, i), o(d);
|
|
2047
2047
|
if (a === null) {
|
|
2048
2048
|
l.end(
|
|
2049
2049
|
/* endedByRPC */
|
|
@@ -2089,11 +2089,11 @@ function codegen(s, i) {
|
|
|
2089
2089
|
var r = [];
|
|
2090
2090
|
function u(o) {
|
|
2091
2091
|
if (typeof o != "string") {
|
|
2092
|
-
var l =
|
|
2092
|
+
var l = h();
|
|
2093
2093
|
if (codegen.verbose && console.warn("codegen: " + l), l = "return " + l, o) {
|
|
2094
|
-
for (var c = Object.keys(o),
|
|
2095
|
-
|
|
2096
|
-
return
|
|
2094
|
+
for (var c = Object.keys(o), d = new Array(c.length + 1), a = new Array(c.length), m = 0; m < c.length; )
|
|
2095
|
+
d[m] = c[m], a[m] = o[c[m++]];
|
|
2096
|
+
return d[m] = l, Function.apply(null, d).apply(null, a);
|
|
2097
2097
|
}
|
|
2098
2098
|
return Function(l)();
|
|
2099
2099
|
}
|
|
@@ -2116,38 +2116,38 @@ function codegen(s, i) {
|
|
|
2116
2116
|
}), g !== y.length) throw Error("parameter count mismatch");
|
|
2117
2117
|
return r.push(o), u;
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2119
|
+
function h(o) {
|
|
2120
2120
|
return "function " + (o || i || "") + "(" + (s && s.join(",") || "") + `){
|
|
2121
2121
|
` + r.join(`
|
|
2122
2122
|
`) + `
|
|
2123
2123
|
}`;
|
|
2124
2124
|
}
|
|
2125
|
-
return u.toString =
|
|
2125
|
+
return u.toString = h, u;
|
|
2126
2126
|
}
|
|
2127
2127
|
codegen.verbose = !1;
|
|
2128
2128
|
var fetch_1 = fetch, asPromise = requireAspromise(), inquire = requireInquire(), fs = inquire("fs");
|
|
2129
2129
|
function fetch(s, i, r) {
|
|
2130
|
-
return typeof i == "function" ? (r = i, i = {}) : i || (i = {}), r ? !i.xhr && fs && fs.readFile ? fs.readFile(s, function(
|
|
2131
|
-
return
|
|
2130
|
+
return typeof i == "function" ? (r = i, i = {}) : i || (i = {}), r ? !i.xhr && fs && fs.readFile ? fs.readFile(s, function(h, o) {
|
|
2131
|
+
return h && typeof XMLHttpRequest < "u" ? fetch.xhr(s, i, r) : h ? r(h) : r(null, i.binary ? o : o.toString("utf8"));
|
|
2132
2132
|
}) : fetch.xhr(s, i, r) : asPromise(fetch, this, s, i);
|
|
2133
2133
|
}
|
|
2134
2134
|
fetch.xhr = function s(i, r, u) {
|
|
2135
|
-
var
|
|
2136
|
-
|
|
2137
|
-
if (
|
|
2138
|
-
if (
|
|
2135
|
+
var h = new XMLHttpRequest();
|
|
2136
|
+
h.onreadystatechange = function() {
|
|
2137
|
+
if (h.readyState === 4) {
|
|
2138
|
+
if (h.status !== 0 && h.status !== 200) return u(Error("status " + h.status));
|
|
2139
2139
|
if (r.binary) {
|
|
2140
|
-
var l =
|
|
2140
|
+
var l = h.response;
|
|
2141
2141
|
if (!l) {
|
|
2142
2142
|
l = [];
|
|
2143
|
-
for (var c = 0; c <
|
|
2144
|
-
l.push(
|
|
2143
|
+
for (var c = 0; c < h.responseText.length; ++c)
|
|
2144
|
+
l.push(h.responseText.charCodeAt(c) & 255);
|
|
2145
2145
|
}
|
|
2146
2146
|
return u(null, typeof Uint8Array < "u" ? new Uint8Array(l) : l);
|
|
2147
2147
|
}
|
|
2148
|
-
return u(null,
|
|
2148
|
+
return u(null, h.responseText);
|
|
2149
2149
|
}
|
|
2150
|
-
}, r.binary && ("overrideMimeType" in
|
|
2150
|
+
}, r.binary && ("overrideMimeType" in h && h.overrideMimeType("text/plain; charset=x-user-defined"), h.responseType = "arraybuffer"), h.open("GET", i), h.send();
|
|
2151
2151
|
};
|
|
2152
2152
|
var path = {};
|
|
2153
2153
|
(function(s) {
|
|
@@ -2168,11 +2168,11 @@ var path = {};
|
|
|
2168
2168
|
*/
|
|
2169
2169
|
i.normalize = function(o) {
|
|
2170
2170
|
o = o.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
2171
|
-
var l = o.split("/"), c = r(o),
|
|
2172
|
-
c && (
|
|
2171
|
+
var l = o.split("/"), c = r(o), d = "";
|
|
2172
|
+
c && (d = l.shift() + "/");
|
|
2173
2173
|
for (var a = 0; a < l.length; )
|
|
2174
2174
|
l[a] === ".." ? a > 0 && l[a - 1] !== ".." ? l.splice(--a, 2) : c ? l.splice(a, 1) : ++a : l[a] === "." ? l.splice(a, 1) : ++a;
|
|
2175
|
-
return
|
|
2175
|
+
return d + l.join("/");
|
|
2176
2176
|
}
|
|
2177
2177
|
);
|
|
2178
2178
|
i.resolve = function(o, l, c) {
|
|
@@ -2214,12 +2214,12 @@ function requireTypes() {
|
|
|
2214
2214
|
"bytes"
|
|
2215
2215
|
// 14
|
|
2216
2216
|
];
|
|
2217
|
-
function
|
|
2218
|
-
var c = 0,
|
|
2219
|
-
for (l |= 0; c < o.length; )
|
|
2220
|
-
return
|
|
2217
|
+
function h(o, l) {
|
|
2218
|
+
var c = 0, d = {};
|
|
2219
|
+
for (l |= 0; c < o.length; ) d[u[c + l]] = o[c++];
|
|
2220
|
+
return d;
|
|
2221
2221
|
}
|
|
2222
|
-
i.basic =
|
|
2222
|
+
i.basic = h([
|
|
2223
2223
|
/* double */
|
|
2224
2224
|
1,
|
|
2225
2225
|
/* float */
|
|
@@ -2250,7 +2250,7 @@ function requireTypes() {
|
|
|
2250
2250
|
2,
|
|
2251
2251
|
/* bytes */
|
|
2252
2252
|
2
|
|
2253
|
-
]), i.defaults =
|
|
2253
|
+
]), i.defaults = h([
|
|
2254
2254
|
/* double */
|
|
2255
2255
|
0,
|
|
2256
2256
|
/* float */
|
|
@@ -2283,7 +2283,7 @@ function requireTypes() {
|
|
|
2283
2283
|
r.emptyArray,
|
|
2284
2284
|
/* message */
|
|
2285
2285
|
null
|
|
2286
|
-
]), i.long =
|
|
2286
|
+
]), i.long = h(
|
|
2287
2287
|
[
|
|
2288
2288
|
/* int64 */
|
|
2289
2289
|
0,
|
|
@@ -2297,7 +2297,7 @@ function requireTypes() {
|
|
|
2297
2297
|
1
|
|
2298
2298
|
],
|
|
2299
2299
|
7
|
|
2300
|
-
), i.mapKey =
|
|
2300
|
+
), i.mapKey = h(
|
|
2301
2301
|
[
|
|
2302
2302
|
/* int32 */
|
|
2303
2303
|
0,
|
|
@@ -2325,7 +2325,7 @@ function requireTypes() {
|
|
|
2325
2325
|
2
|
|
2326
2326
|
],
|
|
2327
2327
|
2
|
|
2328
|
-
), i.packed =
|
|
2328
|
+
), i.packed = h([
|
|
2329
2329
|
/* double */
|
|
2330
2330
|
1,
|
|
2331
2331
|
/* float */
|
|
@@ -2361,17 +2361,17 @@ function requireField() {
|
|
|
2361
2361
|
hasRequiredField = 1, field = l;
|
|
2362
2362
|
var s = requireObject();
|
|
2363
2363
|
((l.prototype = Object.create(s.prototype)).constructor = l).className = "Field";
|
|
2364
|
-
var i = require_enum(), r = requireTypes(), u = requireUtil(),
|
|
2365
|
-
l.fromJSON = function(
|
|
2366
|
-
return new l(
|
|
2364
|
+
var i = require_enum(), r = requireTypes(), u = requireUtil(), h, o = /^required|optional|repeated$/;
|
|
2365
|
+
l.fromJSON = function(d, a) {
|
|
2366
|
+
return new l(d, a.id, a.type, a.rule, a.extend, a.options, a.comment);
|
|
2367
2367
|
};
|
|
2368
|
-
function l(c,
|
|
2369
|
-
if (u.isObject(m) ? (p = y, g = m, m = y = void 0) : u.isObject(y) && (p = g, g = y, y = void 0), s.call(this, c, g), !u.isInteger(
|
|
2368
|
+
function l(c, d, a, m, y, g, p) {
|
|
2369
|
+
if (u.isObject(m) ? (p = y, g = m, m = y = void 0) : u.isObject(y) && (p = g, g = y, y = void 0), s.call(this, c, g), !u.isInteger(d) || d < 0) throw TypeError("id must be a non-negative integer");
|
|
2370
2370
|
if (!u.isString(a)) throw TypeError("type must be a string");
|
|
2371
2371
|
if (m !== void 0 && !o.test(m = m.toString().toLowerCase()))
|
|
2372
2372
|
throw TypeError("rule must be a string rule");
|
|
2373
2373
|
if (y !== void 0 && !u.isString(y)) throw TypeError("extend must be a string");
|
|
2374
|
-
m === "proto3_optional" && (m = "optional"), this.rule = m && m !== "optional" ? m : void 0, this.type = a, this.id =
|
|
2374
|
+
m === "proto3_optional" && (m = "optional"), this.rule = m && m !== "optional" ? m : void 0, this.type = a, this.id = d, this.extend = y || void 0, this.required = m === "required", this.optional = !this.required, this.repeated = m === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = u.Long ? r.long[a] !== void 0 : (
|
|
2375
2375
|
/* istanbul ignore next */
|
|
2376
2376
|
!1
|
|
2377
2377
|
), this.bytes = a === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = p;
|
|
@@ -2380,10 +2380,10 @@ function requireField() {
|
|
|
2380
2380
|
get: function() {
|
|
2381
2381
|
return this._packed === null && (this._packed = this.getOption("packed") !== !1), this._packed;
|
|
2382
2382
|
}
|
|
2383
|
-
}), l.prototype.setOption = function(
|
|
2384
|
-
return
|
|
2385
|
-
}, l.prototype.toJSON = function(
|
|
2386
|
-
var a =
|
|
2383
|
+
}), l.prototype.setOption = function(d, a, m) {
|
|
2384
|
+
return d === "packed" && (this._packed = null), s.prototype.setOption.call(this, d, a, m);
|
|
2385
|
+
}, l.prototype.toJSON = function(d) {
|
|
2386
|
+
var a = d ? !!d.keepComments : !1;
|
|
2387
2387
|
return u.toObject([
|
|
2388
2388
|
"rule",
|
|
2389
2389
|
this.rule !== "optional" && this.rule || void 0,
|
|
@@ -2400,31 +2400,31 @@ function requireField() {
|
|
|
2400
2400
|
]);
|
|
2401
2401
|
}, l.prototype.resolve = function() {
|
|
2402
2402
|
if (this.resolved) return this;
|
|
2403
|
-
if ((this.typeDefault = r.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof
|
|
2403
|
+
if ((this.typeDefault = r.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof h ? 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 i && 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 i)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
|
|
2404
2404
|
this.typeDefault = u.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
|
|
2405
2405
|
else if (this.bytes && typeof this.typeDefault == "string") {
|
|
2406
|
-
var
|
|
2406
|
+
var d;
|
|
2407
2407
|
u.base64.test(this.typeDefault) ? u.base64.decode(
|
|
2408
2408
|
this.typeDefault,
|
|
2409
|
-
|
|
2409
|
+
d = u.newBuffer(u.base64.length(this.typeDefault)),
|
|
2410
2410
|
0
|
|
2411
2411
|
) : u.utf8.write(
|
|
2412
2412
|
this.typeDefault,
|
|
2413
|
-
|
|
2413
|
+
d = u.newBuffer(u.utf8.length(this.typeDefault)),
|
|
2414
2414
|
0
|
|
2415
|
-
), this.typeDefault =
|
|
2415
|
+
), this.typeDefault = d;
|
|
2416
2416
|
}
|
|
2417
|
-
return this.map ? this.defaultValue = u.emptyObject : this.repeated ? this.defaultValue = u.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof
|
|
2418
|
-
}, l.d = function(
|
|
2417
|
+
return this.map ? this.defaultValue = u.emptyObject : this.repeated ? this.defaultValue = u.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof h && (this.parent.ctor.prototype[this.name] = this.defaultValue), s.prototype.resolve.call(this);
|
|
2418
|
+
}, l.d = function(d, a, m, y) {
|
|
2419
2419
|
return typeof a == "function" ? a = u.decorateType(a).name : a && typeof a == "object" && (a = u.decorateEnum(a).name), function(p, v) {
|
|
2420
2420
|
u.decorateType(p.constructor).add(
|
|
2421
|
-
new l(v,
|
|
2421
|
+
new l(v, d, a, m, {
|
|
2422
2422
|
default: y
|
|
2423
2423
|
})
|
|
2424
2424
|
);
|
|
2425
2425
|
};
|
|
2426
|
-
}, l._configure = function(
|
|
2427
|
-
|
|
2426
|
+
}, l._configure = function(d) {
|
|
2427
|
+
h = d;
|
|
2428
2428
|
}, field;
|
|
2429
2429
|
}
|
|
2430
2430
|
var oneof, hasRequiredOneof;
|
|
@@ -2434,10 +2434,10 @@ function requireOneof() {
|
|
|
2434
2434
|
var s = requireObject();
|
|
2435
2435
|
((u.prototype = Object.create(s.prototype)).constructor = u).className = "OneOf";
|
|
2436
2436
|
var i = requireField(), r = requireUtil();
|
|
2437
|
-
function u(o, l, c,
|
|
2437
|
+
function u(o, l, c, d) {
|
|
2438
2438
|
if (Array.isArray(l) || (c = l, l = void 0), s.call(this, o, c), !(l === void 0 || Array.isArray(l)))
|
|
2439
2439
|
throw TypeError("fieldNames must be an Array");
|
|
2440
|
-
this.oneof = l || [], this.fieldsArray = [], this.comment =
|
|
2440
|
+
this.oneof = l || [], this.fieldsArray = [], this.comment = d;
|
|
2441
2441
|
}
|
|
2442
2442
|
u.fromJSON = function(l, c) {
|
|
2443
2443
|
return new u(l, c.oneof, c.options, c.comment);
|
|
@@ -2452,14 +2452,14 @@ function requireOneof() {
|
|
|
2452
2452
|
c ? this.comment : void 0
|
|
2453
2453
|
]);
|
|
2454
2454
|
};
|
|
2455
|
-
function
|
|
2455
|
+
function h(o) {
|
|
2456
2456
|
if (o.parent)
|
|
2457
2457
|
for (var l = 0; l < o.fieldsArray.length; ++l)
|
|
2458
2458
|
o.fieldsArray[l].parent || o.parent.add(o.fieldsArray[l]);
|
|
2459
2459
|
}
|
|
2460
2460
|
return u.prototype.add = function(l) {
|
|
2461
2461
|
if (!(l instanceof i)) throw TypeError("field must be a Field");
|
|
2462
|
-
return l.parent && l.parent !== this.parent && l.parent.remove(l), this.oneof.push(l.name), this.fieldsArray.push(l), l.partOf = this,
|
|
2462
|
+
return l.parent && l.parent !== this.parent && l.parent.remove(l), this.oneof.push(l.name), this.fieldsArray.push(l), l.partOf = this, h(this), this;
|
|
2463
2463
|
}, u.prototype.remove = function(l) {
|
|
2464
2464
|
if (!(l instanceof i)) throw TypeError("field must be a Field");
|
|
2465
2465
|
var c = this.fieldsArray.indexOf(l);
|
|
@@ -2467,14 +2467,14 @@ function requireOneof() {
|
|
|
2467
2467
|
return this.fieldsArray.splice(c, 1), c = this.oneof.indexOf(l.name), c > -1 && this.oneof.splice(c, 1), l.partOf = null, this;
|
|
2468
2468
|
}, u.prototype.onAdd = function(l) {
|
|
2469
2469
|
s.prototype.onAdd.call(this, l);
|
|
2470
|
-
for (var c = this,
|
|
2471
|
-
var a = l.get(this.oneof[
|
|
2470
|
+
for (var c = this, d = 0; d < this.oneof.length; ++d) {
|
|
2471
|
+
var a = l.get(this.oneof[d]);
|
|
2472
2472
|
a && !a.partOf && (a.partOf = c, c.fieldsArray.push(a));
|
|
2473
2473
|
}
|
|
2474
|
-
|
|
2474
|
+
h(this);
|
|
2475
2475
|
}, u.prototype.onRemove = function(l) {
|
|
2476
|
-
for (var c = 0,
|
|
2477
|
-
(
|
|
2476
|
+
for (var c = 0, d; c < this.fieldsArray.length; ++c)
|
|
2477
|
+
(d = this.fieldsArray[c]).parent && d.parent.remove(d);
|
|
2478
2478
|
s.prototype.onRemove.call(this, l);
|
|
2479
2479
|
}, u.d = function() {
|
|
2480
2480
|
for (var l = new Array(arguments.length), c = 0; c < arguments.length; ) l[c] = arguments[c++];
|
|
@@ -2489,12 +2489,12 @@ function requireOneof() {
|
|
|
2489
2489
|
var namespace, hasRequiredNamespace;
|
|
2490
2490
|
function requireNamespace() {
|
|
2491
2491
|
if (hasRequiredNamespace) return namespace;
|
|
2492
|
-
hasRequiredNamespace = 1, namespace =
|
|
2492
|
+
hasRequiredNamespace = 1, namespace = d;
|
|
2493
2493
|
var s = requireObject();
|
|
2494
|
-
((
|
|
2495
|
-
var i = requireField(), r = requireUtil(), u = requireOneof(),
|
|
2496
|
-
|
|
2497
|
-
return new
|
|
2494
|
+
((d.prototype = Object.create(s.prototype)).constructor = d).className = "Namespace";
|
|
2495
|
+
var i = requireField(), r = requireUtil(), u = requireOneof(), h, o, l;
|
|
2496
|
+
d.fromJSON = function(y, g) {
|
|
2497
|
+
return new d(y, g.options).addJSON(g.nested);
|
|
2498
2498
|
};
|
|
2499
2499
|
function c(m, y) {
|
|
2500
2500
|
if (m && m.length) {
|
|
@@ -2502,83 +2502,83 @@ function requireNamespace() {
|
|
|
2502
2502
|
return g;
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
|
-
|
|
2505
|
+
d.arrayToJSON = c, d.isReservedId = function(y, g) {
|
|
2506
2506
|
if (y) {
|
|
2507
2507
|
for (var p = 0; p < y.length; ++p)
|
|
2508
2508
|
if (typeof y[p] != "string" && y[p][0] <= g && y[p][1] > g)
|
|
2509
2509
|
return !0;
|
|
2510
2510
|
}
|
|
2511
2511
|
return !1;
|
|
2512
|
-
},
|
|
2512
|
+
}, d.isReservedName = function(y, g) {
|
|
2513
2513
|
if (y) {
|
|
2514
2514
|
for (var p = 0; p < y.length; ++p) if (y[p] === g) return !0;
|
|
2515
2515
|
}
|
|
2516
2516
|
return !1;
|
|
2517
2517
|
};
|
|
2518
|
-
function
|
|
2518
|
+
function d(m, y) {
|
|
2519
2519
|
s.call(this, m, y), this.nested = void 0, this._nestedArray = null;
|
|
2520
2520
|
}
|
|
2521
2521
|
function a(m) {
|
|
2522
2522
|
return m._nestedArray = null, m;
|
|
2523
2523
|
}
|
|
2524
|
-
return Object.defineProperty(
|
|
2524
|
+
return Object.defineProperty(d.prototype, "nestedArray", {
|
|
2525
2525
|
get: function() {
|
|
2526
2526
|
return this._nestedArray || (this._nestedArray = r.toArray(this.nested));
|
|
2527
2527
|
}
|
|
2528
|
-
}),
|
|
2528
|
+
}), d.prototype.toJSON = function(y) {
|
|
2529
2529
|
return r.toObject([
|
|
2530
2530
|
"options",
|
|
2531
2531
|
this.options,
|
|
2532
2532
|
"nested",
|
|
2533
2533
|
c(this.nestedArray, y)
|
|
2534
2534
|
]);
|
|
2535
|
-
},
|
|
2535
|
+
}, d.prototype.addJSON = function(y) {
|
|
2536
2536
|
var g = this;
|
|
2537
2537
|
if (y)
|
|
2538
2538
|
for (var p = Object.keys(y), v = 0, b; v < p.length; ++v)
|
|
2539
2539
|
b = y[p[v]], g.add(
|
|
2540
2540
|
// most to least likely
|
|
2541
|
-
(b.fields !== void 0 ?
|
|
2541
|
+
(b.fields !== void 0 ? h.fromJSON : b.values !== void 0 ? l.fromJSON : b.methods !== void 0 ? o.fromJSON : b.id !== void 0 ? i.fromJSON : d.fromJSON)(p[v], b)
|
|
2542
2542
|
);
|
|
2543
2543
|
return this;
|
|
2544
|
-
},
|
|
2544
|
+
}, d.prototype.get = function(y) {
|
|
2545
2545
|
return this.nested && this.nested[y] || null;
|
|
2546
|
-
},
|
|
2546
|
+
}, d.prototype.getEnum = function(y) {
|
|
2547
2547
|
if (this.nested && this.nested[y] instanceof l) return this.nested[y].values;
|
|
2548
2548
|
throw Error("no such enum: " + y);
|
|
2549
|
-
},
|
|
2550
|
-
if (!(y instanceof i && y.extend !== void 0 || y instanceof
|
|
2549
|
+
}, d.prototype.add = function(y) {
|
|
2550
|
+
if (!(y instanceof i && y.extend !== void 0 || y instanceof h || y instanceof u || y instanceof l || y instanceof o || y instanceof d))
|
|
2551
2551
|
throw TypeError("object must be a valid nested object");
|
|
2552
2552
|
if (!this.nested) this.nested = {};
|
|
2553
2553
|
else {
|
|
2554
2554
|
var g = this.get(y.name);
|
|
2555
2555
|
if (g)
|
|
2556
|
-
if (g instanceof
|
|
2556
|
+
if (g instanceof d && y instanceof d && !(g instanceof h || g instanceof o)) {
|
|
2557
2557
|
for (var p = g.nestedArray, v = 0; v < p.length; ++v) y.add(p[v]);
|
|
2558
2558
|
this.remove(g), this.nested || (this.nested = {}), y.setOptions(g.options, !0);
|
|
2559
2559
|
} else throw Error("duplicate name '" + y.name + "' in " + this);
|
|
2560
2560
|
}
|
|
2561
2561
|
return this.nested[y.name] = y, y.onAdd(this), a(this);
|
|
2562
|
-
},
|
|
2562
|
+
}, d.prototype.remove = function(y) {
|
|
2563
2563
|
if (!(y instanceof s)) throw TypeError("object must be a ReflectionObject");
|
|
2564
2564
|
if (y.parent !== this) throw Error(y + " is not a member of " + this);
|
|
2565
2565
|
return delete this.nested[y.name], Object.keys(this.nested).length || (this.nested = void 0), y.onRemove(this), a(this);
|
|
2566
|
-
},
|
|
2566
|
+
}, d.prototype.define = function(y, g) {
|
|
2567
2567
|
if (r.isString(y)) y = y.split(".");
|
|
2568
2568
|
else if (!Array.isArray(y)) throw TypeError("illegal path");
|
|
2569
2569
|
if (y && y.length && y[0] === "") throw Error("path must be relative");
|
|
2570
2570
|
for (var p = this; y.length > 0; ) {
|
|
2571
2571
|
var v = y.shift();
|
|
2572
2572
|
if (p.nested && p.nested[v]) {
|
|
2573
|
-
if (p = p.nested[v], !(p instanceof
|
|
2574
|
-
} else p.add(p = new
|
|
2573
|
+
if (p = p.nested[v], !(p instanceof d)) throw Error("path conflicts with non-namespace objects");
|
|
2574
|
+
} else p.add(p = new d(v));
|
|
2575
2575
|
}
|
|
2576
2576
|
return g && p.addJSON(g), p;
|
|
2577
|
-
},
|
|
2577
|
+
}, d.prototype.resolveAll = function() {
|
|
2578
2578
|
for (var y = this.nestedArray, g = 0; g < y.length; )
|
|
2579
|
-
y[g] instanceof
|
|
2579
|
+
y[g] instanceof d ? y[g++].resolveAll() : y[g++].resolve();
|
|
2580
2580
|
return this.resolve();
|
|
2581
|
-
},
|
|
2581
|
+
}, d.prototype.lookup = function(y, g, p) {
|
|
2582
2582
|
if (typeof g == "boolean" ? (p = g, g = void 0) : g && !Array.isArray(g) && (g = [g]), r.isString(y) && y.length) {
|
|
2583
2583
|
if (y === ".") return this.root;
|
|
2584
2584
|
y = y.split(".");
|
|
@@ -2588,31 +2588,31 @@ function requireNamespace() {
|
|
|
2588
2588
|
if (v) {
|
|
2589
2589
|
if (y.length === 1) {
|
|
2590
2590
|
if (!g || g.indexOf(v.constructor) > -1) return v;
|
|
2591
|
-
} else if (v instanceof
|
|
2591
|
+
} else if (v instanceof d && (v = v.lookup(y.slice(1), g, !0)))
|
|
2592
2592
|
return v;
|
|
2593
2593
|
} else
|
|
2594
2594
|
for (var b = 0; b < this.nestedArray.length; ++b)
|
|
2595
|
-
if (this._nestedArray[b] instanceof
|
|
2595
|
+
if (this._nestedArray[b] instanceof d && (v = this._nestedArray[b].lookup(y, g, !0)))
|
|
2596
2596
|
return v;
|
|
2597
2597
|
return this.parent === null || p ? null : this.parent.lookup(y, g);
|
|
2598
|
-
},
|
|
2599
|
-
var g = this.lookup(y, [
|
|
2598
|
+
}, d.prototype.lookupType = function(y) {
|
|
2599
|
+
var g = this.lookup(y, [h]);
|
|
2600
2600
|
if (!g) throw Error("no such type: " + y);
|
|
2601
2601
|
return g;
|
|
2602
|
-
},
|
|
2602
|
+
}, d.prototype.lookupEnum = function(y) {
|
|
2603
2603
|
var g = this.lookup(y, [l]);
|
|
2604
2604
|
if (!g) throw Error("no such Enum '" + y + "' in " + this);
|
|
2605
2605
|
return g;
|
|
2606
|
-
},
|
|
2607
|
-
var g = this.lookup(y, [
|
|
2606
|
+
}, d.prototype.lookupTypeOrEnum = function(y) {
|
|
2607
|
+
var g = this.lookup(y, [h, l]);
|
|
2608
2608
|
if (!g) throw Error("no such Type or Enum '" + y + "' in " + this);
|
|
2609
2609
|
return g;
|
|
2610
|
-
},
|
|
2610
|
+
}, d.prototype.lookupService = function(y) {
|
|
2611
2611
|
var g = this.lookup(y, [o]);
|
|
2612
2612
|
if (!g) throw Error("no such Service '" + y + "' in " + this);
|
|
2613
2613
|
return g;
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2614
|
+
}, d._configure = function(m, y, g) {
|
|
2615
|
+
h = m, o = y, l = g;
|
|
2616
2616
|
}, namespace;
|
|
2617
2617
|
}
|
|
2618
2618
|
var mapfield, hasRequiredMapfield;
|
|
@@ -2622,8 +2622,8 @@ function requireMapfield() {
|
|
|
2622
2622
|
var s = requireField();
|
|
2623
2623
|
((u.prototype = Object.create(s.prototype)).constructor = u).className = "MapField";
|
|
2624
2624
|
var i = requireTypes(), r = requireUtil();
|
|
2625
|
-
function u(
|
|
2626
|
-
if (s.call(this,
|
|
2625
|
+
function u(h, o, l, c, d, a) {
|
|
2626
|
+
if (s.call(this, h, o, c, void 0, void 0, d, a), !r.isString(l)) throw TypeError("keyType must be a string");
|
|
2627
2627
|
this.keyType = l, this.resolvedKeyType = null, this.map = !0;
|
|
2628
2628
|
}
|
|
2629
2629
|
return u.fromJSON = function(o, l) {
|
|
@@ -2661,15 +2661,15 @@ function requireMethod() {
|
|
|
2661
2661
|
var s = requireObject();
|
|
2662
2662
|
((r.prototype = Object.create(s.prototype)).constructor = r).className = "Method";
|
|
2663
2663
|
var i = requireUtil();
|
|
2664
|
-
function r(u,
|
|
2665
|
-
if (i.isObject(c) ? (a = c, c =
|
|
2664
|
+
function r(u, h, o, l, c, d, a, m, y) {
|
|
2665
|
+
if (i.isObject(c) ? (a = c, c = d = void 0) : i.isObject(d) && (a = d, d = void 0), !(h === void 0 || i.isString(h))) throw TypeError("type must be a string");
|
|
2666
2666
|
if (!i.isString(o)) throw TypeError("requestType must be a string");
|
|
2667
2667
|
if (!i.isString(l)) throw TypeError("responseType must be a string");
|
|
2668
|
-
s.call(this, u, a), this.type =
|
|
2668
|
+
s.call(this, u, a), this.type = h || "rpc", this.requestType = o, this.requestStream = c ? !0 : void 0, this.responseType = l, this.responseStream = d ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = m, this.parsedOptions = y;
|
|
2669
2669
|
}
|
|
2670
|
-
return r.fromJSON = function(
|
|
2670
|
+
return r.fromJSON = function(h, o) {
|
|
2671
2671
|
return new r(
|
|
2672
|
-
|
|
2672
|
+
h,
|
|
2673
2673
|
o.type,
|
|
2674
2674
|
o.requestType,
|
|
2675
2675
|
o.responseType,
|
|
@@ -2679,8 +2679,8 @@ function requireMethod() {
|
|
|
2679
2679
|
o.comment,
|
|
2680
2680
|
o.parsedOptions
|
|
2681
2681
|
);
|
|
2682
|
-
}, r.prototype.toJSON = function(
|
|
2683
|
-
var o =
|
|
2682
|
+
}, r.prototype.toJSON = function(h) {
|
|
2683
|
+
var o = h ? !!h.keepComments : !1;
|
|
2684
2684
|
return i.toObject([
|
|
2685
2685
|
"type",
|
|
2686
2686
|
this.type !== "rpc" && /* istanbul ignore next */
|
|
@@ -2707,33 +2707,33 @@ function requireMethod() {
|
|
|
2707
2707
|
var service, hasRequiredService;
|
|
2708
2708
|
function requireService() {
|
|
2709
2709
|
if (hasRequiredService) return service;
|
|
2710
|
-
hasRequiredService = 1, service =
|
|
2710
|
+
hasRequiredService = 1, service = h;
|
|
2711
2711
|
var s = requireNamespace();
|
|
2712
|
-
((
|
|
2712
|
+
((h.prototype = Object.create(s.prototype)).constructor = h).className = "Service";
|
|
2713
2713
|
var i = requireMethod(), r = requireUtil(), u = rpc;
|
|
2714
|
-
function
|
|
2714
|
+
function h(l, c) {
|
|
2715
2715
|
s.call(this, l, c), this.methods = {}, this._methodsArray = null;
|
|
2716
2716
|
}
|
|
2717
|
-
|
|
2718
|
-
var a = new
|
|
2719
|
-
if (
|
|
2720
|
-
for (var m = Object.keys(
|
|
2721
|
-
a.add(i.fromJSON(m[y],
|
|
2722
|
-
return
|
|
2723
|
-
},
|
|
2724
|
-
var
|
|
2717
|
+
h.fromJSON = function(c, d) {
|
|
2718
|
+
var a = new h(c, d.options);
|
|
2719
|
+
if (d.methods)
|
|
2720
|
+
for (var m = Object.keys(d.methods), y = 0; y < m.length; ++y)
|
|
2721
|
+
a.add(i.fromJSON(m[y], d.methods[m[y]]));
|
|
2722
|
+
return d.nested && a.addJSON(d.nested), a.comment = d.comment, a;
|
|
2723
|
+
}, h.prototype.toJSON = function(c) {
|
|
2724
|
+
var d = s.prototype.toJSON.call(this, c), a = c ? !!c.keepComments : !1;
|
|
2725
2725
|
return r.toObject([
|
|
2726
2726
|
"options",
|
|
2727
|
-
|
|
2727
|
+
d && d.options || void 0,
|
|
2728
2728
|
"methods",
|
|
2729
2729
|
s.arrayToJSON(this.methodsArray, c) || /* istanbul ignore next */
|
|
2730
2730
|
{},
|
|
2731
2731
|
"nested",
|
|
2732
|
-
|
|
2732
|
+
d && d.nested || void 0,
|
|
2733
2733
|
"comment",
|
|
2734
2734
|
a ? this.comment : void 0
|
|
2735
2735
|
]);
|
|
2736
|
-
}, Object.defineProperty(
|
|
2736
|
+
}, Object.defineProperty(h.prototype, "methodsArray", {
|
|
2737
2737
|
get: function() {
|
|
2738
2738
|
return this._methodsArray || (this._methodsArray = r.toArray(this.methods));
|
|
2739
2739
|
}
|
|
@@ -2741,22 +2741,22 @@ function requireService() {
|
|
|
2741
2741
|
function o(l) {
|
|
2742
2742
|
return l._methodsArray = null, l;
|
|
2743
2743
|
}
|
|
2744
|
-
return
|
|
2744
|
+
return h.prototype.get = function(c) {
|
|
2745
2745
|
return this.methods[c] || s.prototype.get.call(this, c);
|
|
2746
|
-
},
|
|
2747
|
-
for (var c = this.methodsArray,
|
|
2746
|
+
}, h.prototype.resolveAll = function() {
|
|
2747
|
+
for (var c = this.methodsArray, d = 0; d < c.length; ++d) c[d].resolve();
|
|
2748
2748
|
return s.prototype.resolve.call(this);
|
|
2749
|
-
},
|
|
2749
|
+
}, h.prototype.add = function(c) {
|
|
2750
2750
|
if (this.get(c.name)) throw Error("duplicate name '" + c.name + "' in " + this);
|
|
2751
2751
|
return c instanceof i ? (this.methods[c.name] = c, c.parent = this, o(this)) : s.prototype.add.call(this, c);
|
|
2752
|
-
},
|
|
2752
|
+
}, h.prototype.remove = function(c) {
|
|
2753
2753
|
if (c instanceof i) {
|
|
2754
2754
|
if (this.methods[c.name] !== c) throw Error(c + " is not a member of " + this);
|
|
2755
2755
|
return delete this.methods[c.name], c.parent = null, o(this);
|
|
2756
2756
|
}
|
|
2757
2757
|
return s.prototype.remove.call(this, c);
|
|
2758
|
-
},
|
|
2759
|
-
for (var m = new u.Service(c,
|
|
2758
|
+
}, h.prototype.create = function(c, d, a) {
|
|
2759
|
+
for (var m = new u.Service(c, d, a), y = 0, g; y < /* initializes */
|
|
2760
2760
|
this.methodsArray.length; ++y) {
|
|
2761
2761
|
var p = r.lcFirst((g = this._methodsArray[y]).resolve().name).replace(/[^$\w_]/g, "");
|
|
2762
2762
|
m[p] = r.codegen(
|
|
@@ -2807,12 +2807,12 @@ Message.prototype.toJSON = function s() {
|
|
|
2807
2807
|
var decoder_1, hasRequiredDecoder;
|
|
2808
2808
|
function requireDecoder() {
|
|
2809
2809
|
if (hasRequiredDecoder) return decoder_1;
|
|
2810
|
-
hasRequiredDecoder = 1, decoder_1 =
|
|
2810
|
+
hasRequiredDecoder = 1, decoder_1 = h;
|
|
2811
2811
|
var s = require_enum(), i = requireTypes(), r = requireUtil();
|
|
2812
2812
|
function u(o) {
|
|
2813
2813
|
return "missing required '" + o.name + "'";
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2815
|
+
function h(o) {
|
|
2816
2816
|
var l = r.codegen(["r", "l"], o.name + "$decode")("if(!(r instanceof Reader))")(
|
|
2817
2817
|
"r=Reader.create(r)"
|
|
2818
2818
|
)(
|
|
@@ -2823,20 +2823,20 @@ function requireDecoder() {
|
|
|
2823
2823
|
o.group && l("if((t&7)===4)")("break"), l("switch(t>>>3){");
|
|
2824
2824
|
for (var c = 0; c < /* initializes */
|
|
2825
2825
|
o.fieldsArray.length; ++c) {
|
|
2826
|
-
var
|
|
2827
|
-
l("case %i: {",
|
|
2826
|
+
var d = o._fieldsArray[c].resolve(), a = d.resolvedType instanceof s ? "int32" : d.type, m = "m" + r.safeProp(d.name);
|
|
2827
|
+
l("case %i: {", d.id), d.map ? (l("if(%s===util.emptyObject)", m)("%s={}", m)("var c2 = r.uint32()+r.pos"), i.defaults[d.keyType] !== void 0 ? l("k=%j", i.defaults[d.keyType]) : l("k=null"), i.defaults[a] !== void 0 ? l("value=%j", i.defaults[a]) : l("value=null"), l("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")(
|
|
2828
2828
|
"case 1: k=r.%s(); break",
|
|
2829
|
-
|
|
2830
|
-
)("case 2:"), i.basic[a] === void 0 ? l("value=types[%i].decode(r,r.uint32())", c) : l("value=r.%s()", a), l("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), i.long[
|
|
2829
|
+
d.keyType
|
|
2830
|
+
)("case 2:"), i.basic[a] === void 0 ? l("value=types[%i].decode(r,r.uint32())", c) : l("value=r.%s()", a), l("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), i.long[d.keyType] !== void 0 ? l('%s[typeof k==="object"?util.longToHash(k):k]=value', m) : l("%s[k]=value", m)) : d.repeated ? (l("if(!(%s&&%s.length))", m, m)("%s=[]", m), i.packed[a] !== void 0 && l("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")(
|
|
2831
2831
|
"%s.push(r.%s())",
|
|
2832
2832
|
m,
|
|
2833
2833
|
a
|
|
2834
2834
|
)("}else"), i.basic[a] === void 0 ? l(
|
|
2835
|
-
|
|
2835
|
+
d.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))",
|
|
2836
2836
|
m,
|
|
2837
2837
|
c
|
|
2838
2838
|
) : l("%s.push(r.%s())", m, a)) : i.basic[a] === void 0 ? l(
|
|
2839
|
-
|
|
2839
|
+
d.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())",
|
|
2840
2840
|
m,
|
|
2841
2841
|
c
|
|
2842
2842
|
) : l("%s=r.%s()", m, a), l("break")("}");
|
|
@@ -2860,7 +2860,7 @@ function requireVerifier() {
|
|
|
2860
2860
|
function r(l, c) {
|
|
2861
2861
|
return l.name + ": " + c + (l.repeated && c !== "array" ? "[]" : l.map && c !== "object" ? "{k:" + l.keyType + "}" : "") + " expected";
|
|
2862
2862
|
}
|
|
2863
|
-
function u(l, c,
|
|
2863
|
+
function u(l, c, d, a) {
|
|
2864
2864
|
if (c.resolvedType)
|
|
2865
2865
|
if (c.resolvedType instanceof s) {
|
|
2866
2866
|
l("switch(%s){", a)("default:")("return%j", r(c, "enum value"));
|
|
@@ -2868,7 +2868,7 @@ function requireVerifier() {
|
|
|
2868
2868
|
l("case %i:", c.resolvedType.values[m[y]]);
|
|
2869
2869
|
l("break")("}");
|
|
2870
2870
|
} else
|
|
2871
|
-
l("{")("var e=types[%i].verify(%s);",
|
|
2871
|
+
l("{")("var e=types[%i].verify(%s);", d, a)("if(e)")(
|
|
2872
2872
|
"return%j+e",
|
|
2873
2873
|
c.name + "."
|
|
2874
2874
|
)("}");
|
|
@@ -2915,28 +2915,28 @@ function requireVerifier() {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
return l;
|
|
2917
2917
|
}
|
|
2918
|
-
function
|
|
2918
|
+
function h(l, c, d) {
|
|
2919
2919
|
switch (c.keyType) {
|
|
2920
2920
|
case "int32":
|
|
2921
2921
|
case "uint32":
|
|
2922
2922
|
case "sint32":
|
|
2923
2923
|
case "fixed32":
|
|
2924
2924
|
case "sfixed32":
|
|
2925
|
-
l("if(!util.key32Re.test(%s))",
|
|
2925
|
+
l("if(!util.key32Re.test(%s))", d)("return%j", r(c, "integer key"));
|
|
2926
2926
|
break;
|
|
2927
2927
|
case "int64":
|
|
2928
2928
|
case "uint64":
|
|
2929
2929
|
case "sint64":
|
|
2930
2930
|
case "fixed64":
|
|
2931
2931
|
case "sfixed64":
|
|
2932
|
-
l("if(!util.key64Re.test(%s))",
|
|
2932
|
+
l("if(!util.key64Re.test(%s))", d)(
|
|
2933
2933
|
// see comment above: x is ok, d is not
|
|
2934
2934
|
"return%j",
|
|
2935
2935
|
r(c, "integer|Long key")
|
|
2936
2936
|
);
|
|
2937
2937
|
break;
|
|
2938
2938
|
case "bool":
|
|
2939
|
-
l("if(!util.key2Re.test(%s))",
|
|
2939
|
+
l("if(!util.key2Re.test(%s))", d)("return%j", r(c, "boolean key"));
|
|
2940
2940
|
break;
|
|
2941
2941
|
}
|
|
2942
2942
|
return l;
|
|
@@ -2945,8 +2945,8 @@ function requireVerifier() {
|
|
|
2945
2945
|
var c = i.codegen(["m"], l.name + "$verify")('if(typeof m!=="object"||m===null)')(
|
|
2946
2946
|
"return%j",
|
|
2947
2947
|
"object expected"
|
|
2948
|
-
),
|
|
2949
|
-
|
|
2948
|
+
), d = l.oneofsArray, a = {};
|
|
2949
|
+
d.length && c("var p={}");
|
|
2950
2950
|
for (var m = 0; m < /* initializes */
|
|
2951
2951
|
l.fieldsArray.length; ++m) {
|
|
2952
2952
|
var y = l._fieldsArray[m].resolve(), g = "m" + i.safeProp(y.name);
|
|
@@ -2954,7 +2954,7 @@ function requireVerifier() {
|
|
|
2954
2954
|
c("if(!util.isObject(%s))", g)("return%j", r(y, "object"))(
|
|
2955
2955
|
"var k=Object.keys(%s)",
|
|
2956
2956
|
g
|
|
2957
|
-
)("for(var i=0;i<k.length;++i){"),
|
|
2957
|
+
)("for(var i=0;i<k.length;++i){"), h(c, y, "k[i]"), u(c, y, m, g + "[k[i]]")("}");
|
|
2958
2958
|
else if (y.repeated)
|
|
2959
2959
|
c("if(!Array.isArray(%s))", g)("return%j", r(y, "array"))(
|
|
2960
2960
|
"for(var i=0;i<%s.length;++i){",
|
|
@@ -2977,7 +2977,7 @@ var converter = {}, hasRequiredConverter;
|
|
|
2977
2977
|
function requireConverter() {
|
|
2978
2978
|
return hasRequiredConverter || (hasRequiredConverter = 1, function(s) {
|
|
2979
2979
|
var i = s, r = require_enum(), u = requireUtil();
|
|
2980
|
-
function
|
|
2980
|
+
function h(l, c, d, a) {
|
|
2981
2981
|
var m = !1;
|
|
2982
2982
|
if (c.resolvedType)
|
|
2983
2983
|
if (c.resolvedType instanceof r) {
|
|
@@ -2995,7 +2995,7 @@ function requireConverter() {
|
|
|
2995
2995
|
l('if(typeof d%s!=="object")', a)(
|
|
2996
2996
|
"throw TypeError(%j)",
|
|
2997
2997
|
c.fullName + ": object expected"
|
|
2998
|
-
)("m%s=types[%i].fromObject(d%s)", a,
|
|
2998
|
+
)("m%s=types[%i].fromObject(d%s)", a, d, a);
|
|
2999
2999
|
else {
|
|
3000
3000
|
var v = !1;
|
|
3001
3001
|
switch (c.type) {
|
|
@@ -3058,17 +3058,17 @@ function requireConverter() {
|
|
|
3058
3058
|
return l;
|
|
3059
3059
|
}
|
|
3060
3060
|
i.fromObject = function(c) {
|
|
3061
|
-
var
|
|
3061
|
+
var d = c.fieldsArray, a = u.codegen(["d"], c.name + "$fromObject")("if(d instanceof this.ctor)")(
|
|
3062
3062
|
"return d"
|
|
3063
3063
|
);
|
|
3064
|
-
if (!
|
|
3064
|
+
if (!d.length) return a("return new this.ctor");
|
|
3065
3065
|
a("var m=new this.ctor");
|
|
3066
|
-
for (var m = 0; m <
|
|
3067
|
-
var y =
|
|
3066
|
+
for (var m = 0; m < d.length; ++m) {
|
|
3067
|
+
var y = d[m].resolve(), g = u.safeProp(y.name);
|
|
3068
3068
|
y.map ? (a("if(d%s){", g)('if(typeof d%s!=="object")', g)(
|
|
3069
3069
|
"throw TypeError(%j)",
|
|
3070
3070
|
y.fullName + ": object expected"
|
|
3071
|
-
)("m%s={}", g)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", g),
|
|
3071
|
+
)("m%s={}", g)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", g), h(
|
|
3072
3072
|
a,
|
|
3073
3073
|
y,
|
|
3074
3074
|
/* not sorted */
|
|
@@ -3077,7 +3077,7 @@ function requireConverter() {
|
|
|
3077
3077
|
)("}")("}")) : y.repeated ? (a("if(d%s){", g)("if(!Array.isArray(d%s))", g)(
|
|
3078
3078
|
"throw TypeError(%j)",
|
|
3079
3079
|
y.fullName + ": array expected"
|
|
3080
|
-
)("m%s=[]", g)("for(var i=0;i<d%s.length;++i){", g),
|
|
3080
|
+
)("m%s=[]", g)("for(var i=0;i<d%s.length;++i){", g), h(
|
|
3081
3081
|
a,
|
|
3082
3082
|
y,
|
|
3083
3083
|
/* not sorted */
|
|
@@ -3087,7 +3087,7 @@ function requireConverter() {
|
|
|
3087
3087
|
// no need to test for null/undefined if an enum (uses switch)
|
|
3088
3088
|
"if(d%s!=null){",
|
|
3089
3089
|
g
|
|
3090
|
-
),
|
|
3090
|
+
), h(
|
|
3091
3091
|
a,
|
|
3092
3092
|
y,
|
|
3093
3093
|
/* not sorted */
|
|
@@ -3097,18 +3097,18 @@ function requireConverter() {
|
|
|
3097
3097
|
}
|
|
3098
3098
|
return a("return m");
|
|
3099
3099
|
};
|
|
3100
|
-
function o(l, c,
|
|
3100
|
+
function o(l, c, d, a) {
|
|
3101
3101
|
if (c.resolvedType)
|
|
3102
3102
|
c.resolvedType instanceof r ? l(
|
|
3103
3103
|
"d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",
|
|
3104
3104
|
a,
|
|
3105
|
-
|
|
3105
|
+
d,
|
|
3106
3106
|
a,
|
|
3107
3107
|
a,
|
|
3108
|
-
|
|
3108
|
+
d,
|
|
3109
3109
|
a,
|
|
3110
3110
|
a
|
|
3111
|
-
) : l("d%s=types[%i].toObject(m%s,o)", a,
|
|
3111
|
+
) : l("d%s=types[%i].toObject(m%s,o)", a, d, a);
|
|
3112
3112
|
else {
|
|
3113
3113
|
var m = !1;
|
|
3114
3114
|
switch (c.type) {
|
|
@@ -3156,10 +3156,10 @@ function requireConverter() {
|
|
|
3156
3156
|
return l;
|
|
3157
3157
|
}
|
|
3158
3158
|
i.toObject = function(c) {
|
|
3159
|
-
var
|
|
3160
|
-
if (!
|
|
3161
|
-
for (var a = u.codegen(["m", "o"], c.name + "$toObject")("if(!o)")("o={}")("var d={}"), m = [], y = [], g = [], p = 0; p <
|
|
3162
|
-
|
|
3159
|
+
var d = c.fieldsArray.slice().sort(u.compareFieldsById);
|
|
3160
|
+
if (!d.length) return u.codegen()("return {}");
|
|
3161
|
+
for (var a = u.codegen(["m", "o"], c.name + "$toObject")("if(!o)")("o={}")("var d={}"), m = [], y = [], g = [], p = 0; p < d.length; ++p)
|
|
3162
|
+
d[p].partOf || (d[p].resolve().repeated ? m : d[p].map ? y : g).push(d[p]);
|
|
3163
3163
|
if (m.length) {
|
|
3164
3164
|
for (a("if(o.arrays||o.defaults){"), p = 0; p < m.length; ++p)
|
|
3165
3165
|
a("d%s=[]", u.safeProp(m[p].name));
|
|
@@ -3210,8 +3210,8 @@ function requireConverter() {
|
|
|
3210
3210
|
a("}");
|
|
3211
3211
|
}
|
|
3212
3212
|
var T = !1;
|
|
3213
|
-
for (p = 0; p <
|
|
3214
|
-
var v =
|
|
3213
|
+
for (p = 0; p < d.length; ++p) {
|
|
3214
|
+
var v = d[p], w = c._fieldsArray.indexOf(v), b = u.safeProp(v.name);
|
|
3215
3215
|
v.map ? (T || (T = !0, a("var ks2")), a("if(m%s&&(ks2=Object.keys(m%s)).length){", b, b)("d%s={}", b)(
|
|
3216
3216
|
"for(var j=0;j<ks2.length;++j){"
|
|
3217
3217
|
), o(
|
|
@@ -3247,7 +3247,7 @@ var wrappers = {};
|
|
|
3247
3247
|
i[".google.protobuf.Any"] = {
|
|
3248
3248
|
fromObject: function(u) {
|
|
3249
3249
|
if (u && u["@type"]) {
|
|
3250
|
-
var
|
|
3250
|
+
var h = u["@type"].substring(u["@type"].lastIndexOf("/") + 1), o = this.lookup(h);
|
|
3251
3251
|
if (o) {
|
|
3252
3252
|
var l = u["@type"].charAt(0) === "." ? u["@type"].slice(1) : u["@type"];
|
|
3253
3253
|
return l.indexOf("/") === -1 && (l = "/" + l), this.create({
|
|
@@ -3258,18 +3258,18 @@ var wrappers = {};
|
|
|
3258
3258
|
}
|
|
3259
3259
|
return this.fromObject(u);
|
|
3260
3260
|
},
|
|
3261
|
-
toObject: function(u,
|
|
3261
|
+
toObject: function(u, h) {
|
|
3262
3262
|
var o = "type.googleapis.com/", l = "", c = "";
|
|
3263
|
-
if (
|
|
3263
|
+
if (h && h.json && u.type_url && u.value) {
|
|
3264
3264
|
c = u.type_url.substring(u.type_url.lastIndexOf("/") + 1), l = u.type_url.substring(0, u.type_url.lastIndexOf("/") + 1);
|
|
3265
|
-
var
|
|
3266
|
-
|
|
3265
|
+
var d = this.lookup(c);
|
|
3266
|
+
d && (u = d.decode(u.value));
|
|
3267
3267
|
}
|
|
3268
3268
|
if (!(u instanceof this.ctor) && u instanceof r) {
|
|
3269
|
-
var a = u.$type.toObject(u,
|
|
3269
|
+
var a = u.$type.toObject(u, h), m = u.$type.fullName[0] === "." ? u.$type.fullName.slice(1) : u.$type.fullName;
|
|
3270
3270
|
return l === "" && (l = o), c = l + m, a["@type"] = c, a;
|
|
3271
3271
|
}
|
|
3272
|
-
return this.toObject(u,
|
|
3272
|
+
return this.toObject(u, h);
|
|
3273
3273
|
}
|
|
3274
3274
|
};
|
|
3275
3275
|
})(wrappers);
|
|
@@ -3279,7 +3279,7 @@ function requireType() {
|
|
|
3279
3279
|
hasRequiredType = 1, type = b;
|
|
3280
3280
|
var s = requireNamespace();
|
|
3281
3281
|
((b.prototype = Object.create(s.prototype)).constructor = b).className = "Type";
|
|
3282
|
-
var i = require_enum(), r = requireOneof(), u = requireField(),
|
|
3282
|
+
var i = require_enum(), r = requireOneof(), u = requireField(), h = requireMapfield(), o = requireService(), l = message, c = reader, d = writer, a = requireUtil(), m = requireEncoder(), y = requireDecoder(), g = requireVerifier(), p = requireConverter(), v = wrappers;
|
|
3283
3283
|
function b(T, w) {
|
|
3284
3284
|
s.call(this, T, w), 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;
|
|
3285
3285
|
}
|
|
@@ -3365,7 +3365,7 @@ function requireType() {
|
|
|
3365
3365
|
O.extensions = x.extensions, O.reserved = x.reserved;
|
|
3366
3366
|
for (var E = Object.keys(x.fields), R = 0; R < E.length; ++R)
|
|
3367
3367
|
O.add(
|
|
3368
|
-
(typeof x.fields[E[R]].keyType < "u" ?
|
|
3368
|
+
(typeof x.fields[E[R]].keyType < "u" ? h.fromJSON : u.fromJSON)(
|
|
3369
3369
|
E[R],
|
|
3370
3370
|
x.fields[E[R]]
|
|
3371
3371
|
)
|
|
@@ -3451,7 +3451,7 @@ function requireType() {
|
|
|
3451
3451
|
this.fieldsArray.length; ++O)
|
|
3452
3452
|
x.push(this._fieldsArray[O].resolve().resolvedType);
|
|
3453
3453
|
this.encode = m(this)({
|
|
3454
|
-
Writer:
|
|
3454
|
+
Writer: d,
|
|
3455
3455
|
types: x,
|
|
3456
3456
|
util: a
|
|
3457
3457
|
}), this.decode = y(this)({
|
|
@@ -3497,22 +3497,22 @@ function requireType() {
|
|
|
3497
3497
|
var root$1, hasRequiredRoot;
|
|
3498
3498
|
function requireRoot() {
|
|
3499
3499
|
if (hasRequiredRoot) return root$1;
|
|
3500
|
-
hasRequiredRoot = 1, root$1 =
|
|
3500
|
+
hasRequiredRoot = 1, root$1 = d;
|
|
3501
3501
|
var s = requireNamespace();
|
|
3502
|
-
((
|
|
3503
|
-
var i = requireField(), r = require_enum(), u = requireOneof(),
|
|
3504
|
-
function
|
|
3502
|
+
((d.prototype = Object.create(s.prototype)).constructor = d).className = "Root";
|
|
3503
|
+
var i = requireField(), r = require_enum(), u = requireOneof(), h = requireUtil(), o, l, c;
|
|
3504
|
+
function d(g) {
|
|
3505
3505
|
s.call(this, "", g), this.deferred = [], this.files = [];
|
|
3506
3506
|
}
|
|
3507
|
-
|
|
3508
|
-
return v || (v = new
|
|
3509
|
-
},
|
|
3507
|
+
d.fromJSON = function(p, v) {
|
|
3508
|
+
return v || (v = new d()), p.options && v.setOptions(p.options), v.addJSON(p.nested);
|
|
3509
|
+
}, d.prototype.resolvePath = h.path.resolve, d.prototype.fetch = h.fetch;
|
|
3510
3510
|
function a() {
|
|
3511
3511
|
}
|
|
3512
|
-
|
|
3512
|
+
d.prototype.load = function g(p, v, b) {
|
|
3513
3513
|
typeof v == "function" && (b = v, v = void 0);
|
|
3514
3514
|
var _ = this;
|
|
3515
|
-
if (!b) return
|
|
3515
|
+
if (!b) return h.asPromise(g, _, p, v);
|
|
3516
3516
|
var T = b === a;
|
|
3517
3517
|
function w(C, D) {
|
|
3518
3518
|
if (b) {
|
|
@@ -3531,16 +3531,16 @@ function requireRoot() {
|
|
|
3531
3531
|
}
|
|
3532
3532
|
function O(C, D) {
|
|
3533
3533
|
try {
|
|
3534
|
-
if (
|
|
3534
|
+
if (h.isString(D) && D.charAt(0) === "{" && (D = JSON.parse(D)), !h.isString(D)) _.setOptions(D.options).addJSON(D.nested);
|
|
3535
3535
|
else {
|
|
3536
3536
|
l.filename = C;
|
|
3537
|
-
var I = l(D, _, v),
|
|
3537
|
+
var I = l(D, _, v), M, q = 0;
|
|
3538
3538
|
if (I.imports)
|
|
3539
3539
|
for (; q < I.imports.length; ++q)
|
|
3540
|
-
(
|
|
3540
|
+
(M = x(I.imports[q]) || _.resolvePath(C, I.imports[q])) && E(M);
|
|
3541
3541
|
if (I.weakImports)
|
|
3542
3542
|
for (q = 0; q < I.weakImports.length; ++q)
|
|
3543
|
-
(
|
|
3543
|
+
(M = x(I.weakImports[q]) || _.resolvePath(C, I.weakImports[q])) && E(M, !0);
|
|
3544
3544
|
}
|
|
3545
3545
|
} catch (F) {
|
|
3546
3546
|
w(F);
|
|
@@ -3558,17 +3558,17 @@ function requireRoot() {
|
|
|
3558
3558
|
if (T) {
|
|
3559
3559
|
var I;
|
|
3560
3560
|
try {
|
|
3561
|
-
I =
|
|
3562
|
-
} catch (
|
|
3563
|
-
D || w(
|
|
3561
|
+
I = h.fs.readFileSync(C).toString("utf8");
|
|
3562
|
+
} catch (M) {
|
|
3563
|
+
D || w(M);
|
|
3564
3564
|
return;
|
|
3565
3565
|
}
|
|
3566
3566
|
O(C, I);
|
|
3567
3567
|
} else
|
|
3568
|
-
++R, _.fetch(C, function(
|
|
3568
|
+
++R, _.fetch(C, function(M, q) {
|
|
3569
3569
|
if (--R, !!b) {
|
|
3570
|
-
if (
|
|
3571
|
-
D ? R || w(null, _) : w(
|
|
3570
|
+
if (M) {
|
|
3571
|
+
D ? R || w(null, _) : w(M);
|
|
3572
3572
|
return;
|
|
3573
3573
|
}
|
|
3574
3574
|
O(C, q);
|
|
@@ -3577,15 +3577,15 @@ function requireRoot() {
|
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
3579
|
var R = 0;
|
|
3580
|
-
|
|
3580
|
+
h.isString(p) && (p = [p]);
|
|
3581
3581
|
for (var S = 0, P; S < p.length; ++S)
|
|
3582
3582
|
(P = _.resolvePath("", p[S])) && E(P);
|
|
3583
3583
|
if (T) return _;
|
|
3584
3584
|
R || w(null, _);
|
|
3585
|
-
},
|
|
3586
|
-
if (!
|
|
3585
|
+
}, d.prototype.loadSync = function(p, v) {
|
|
3586
|
+
if (!h.isNode) throw Error("not supported");
|
|
3587
3587
|
return this.load(p, v, a);
|
|
3588
|
-
},
|
|
3588
|
+
}, d.prototype.resolveAll = function() {
|
|
3589
3589
|
if (this.deferred.length)
|
|
3590
3590
|
throw Error(
|
|
3591
3591
|
"unresolvable extensions: " + this.deferred.map(function(p) {
|
|
@@ -3610,7 +3610,7 @@ function requireRoot() {
|
|
|
3610
3610
|
}
|
|
3611
3611
|
return !1;
|
|
3612
3612
|
}
|
|
3613
|
-
return
|
|
3613
|
+
return d.prototype._handleAdd = function(p) {
|
|
3614
3614
|
if (p instanceof i)
|
|
3615
3615
|
/* an extension field (implies not part of a oneof) */
|
|
3616
3616
|
p.extend !== void 0 && /* not already handled */
|
|
@@ -3626,7 +3626,7 @@ function requireRoot() {
|
|
|
3626
3626
|
this._handleAdd(p._nestedArray[b]);
|
|
3627
3627
|
m.test(p.name) && (p.parent[p.name] = p);
|
|
3628
3628
|
}
|
|
3629
|
-
},
|
|
3629
|
+
}, d.prototype._handleRemove = function(p) {
|
|
3630
3630
|
if (p instanceof i) {
|
|
3631
3631
|
if (
|
|
3632
3632
|
/* an extension field */
|
|
@@ -3649,7 +3649,7 @@ function requireRoot() {
|
|
|
3649
3649
|
this._handleRemove(p._nestedArray[b]);
|
|
3650
3650
|
m.test(p.name) && delete p.parent[p.name];
|
|
3651
3651
|
}
|
|
3652
|
-
},
|
|
3652
|
+
}, d._configure = function(g, p, v) {
|
|
3653
3653
|
o = g, l = p, c = v;
|
|
3654
3654
|
}, root$1;
|
|
3655
3655
|
}
|
|
@@ -3671,13 +3671,13 @@ function requireUtil() {
|
|
|
3671
3671
|
}
|
|
3672
3672
|
return m;
|
|
3673
3673
|
};
|
|
3674
|
-
var
|
|
3674
|
+
var h = /\\/g, o = /"/g;
|
|
3675
3675
|
s.isReserved = function(a) {
|
|
3676
3676
|
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(
|
|
3677
3677
|
a
|
|
3678
3678
|
);
|
|
3679
3679
|
}, s.safeProp = function(a) {
|
|
3680
|
-
return !/^[$\w_]+$/.test(a) || s.isReserved(a) ? '["' + a.replace(
|
|
3680
|
+
return !/^[$\w_]+$/.test(a) || s.isReserved(a) ? '["' + a.replace(h, "\\\\").replace(o, '\\"') + '"]' : "." + a;
|
|
3681
3681
|
}, s.ucFirst = function(a) {
|
|
3682
3682
|
return a.charAt(0).toUpperCase() + a.substring(1);
|
|
3683
3683
|
};
|
|
@@ -3737,10 +3737,10 @@ function requireObject() {
|
|
|
3737
3737
|
if (hasRequiredObject) return object;
|
|
3738
3738
|
hasRequiredObject = 1, object = r, r.className = "ReflectionObject";
|
|
3739
3739
|
var s = requireUtil(), i;
|
|
3740
|
-
function r(u,
|
|
3740
|
+
function r(u, h) {
|
|
3741
3741
|
if (!s.isString(u)) throw TypeError("name must be a string");
|
|
3742
|
-
if (
|
|
3743
|
-
this.options =
|
|
3742
|
+
if (h && !s.isObject(h)) throw TypeError("options must be an object");
|
|
3743
|
+
this.options = h, this.parsedOptions = null, this.name = u, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
|
|
3744
3744
|
}
|
|
3745
3745
|
return Object.defineProperties(r.prototype, {
|
|
3746
3746
|
/**
|
|
@@ -3763,52 +3763,52 @@ function requireObject() {
|
|
|
3763
3763
|
*/
|
|
3764
3764
|
fullName: {
|
|
3765
3765
|
get: function() {
|
|
3766
|
-
for (var u = [this.name],
|
|
3767
|
-
u.unshift(
|
|
3766
|
+
for (var u = [this.name], h = this.parent; h; )
|
|
3767
|
+
u.unshift(h.name), h = h.parent;
|
|
3768
3768
|
return u.join(".");
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
3771
|
}), r.prototype.toJSON = /* istanbul ignore next */
|
|
3772
3772
|
function() {
|
|
3773
3773
|
throw Error();
|
|
3774
|
-
}, r.prototype.onAdd = function(
|
|
3775
|
-
this.parent && this.parent !==
|
|
3776
|
-
var o =
|
|
3774
|
+
}, r.prototype.onAdd = function(h) {
|
|
3775
|
+
this.parent && this.parent !== h && this.parent.remove(this), this.parent = h, this.resolved = !1;
|
|
3776
|
+
var o = h.root;
|
|
3777
3777
|
o instanceof i && o._handleAdd(this);
|
|
3778
|
-
}, r.prototype.onRemove = function(
|
|
3779
|
-
var o =
|
|
3778
|
+
}, r.prototype.onRemove = function(h) {
|
|
3779
|
+
var o = h.root;
|
|
3780
3780
|
o instanceof i && o._handleRemove(this), this.parent = null, this.resolved = !1;
|
|
3781
3781
|
}, r.prototype.resolve = function() {
|
|
3782
3782
|
return this.resolved ? this : (this.root instanceof i && (this.resolved = !0), this);
|
|
3783
|
-
}, r.prototype.getOption = function(
|
|
3784
|
-
if (this.options) return this.options[
|
|
3785
|
-
}, r.prototype.setOption = function(
|
|
3786
|
-
return (!l || !this.options || this.options[
|
|
3787
|
-
}, r.prototype.setParsedOption = function(
|
|
3783
|
+
}, r.prototype.getOption = function(h) {
|
|
3784
|
+
if (this.options) return this.options[h];
|
|
3785
|
+
}, r.prototype.setOption = function(h, o, l) {
|
|
3786
|
+
return (!l || !this.options || this.options[h] === void 0) && ((this.options || (this.options = {}))[h] = o), this;
|
|
3787
|
+
}, r.prototype.setParsedOption = function(h, o, l) {
|
|
3788
3788
|
this.parsedOptions || (this.parsedOptions = []);
|
|
3789
3789
|
var c = this.parsedOptions;
|
|
3790
3790
|
if (l) {
|
|
3791
|
-
var
|
|
3792
|
-
return Object.prototype.hasOwnProperty.call(y,
|
|
3791
|
+
var d = c.find(function(y) {
|
|
3792
|
+
return Object.prototype.hasOwnProperty.call(y, h);
|
|
3793
3793
|
});
|
|
3794
|
-
if (
|
|
3795
|
-
var a = h
|
|
3794
|
+
if (d) {
|
|
3795
|
+
var a = d[h];
|
|
3796
3796
|
s.setProperty(a, l, o);
|
|
3797
3797
|
} else
|
|
3798
|
-
|
|
3798
|
+
d = {}, d[h] = s.setProperty({}, l, o), c.push(d);
|
|
3799
3799
|
} else {
|
|
3800
3800
|
var m = {};
|
|
3801
|
-
m[
|
|
3801
|
+
m[h] = o, c.push(m);
|
|
3802
3802
|
}
|
|
3803
3803
|
return this;
|
|
3804
|
-
}, r.prototype.setOptions = function(
|
|
3805
|
-
if (
|
|
3806
|
-
for (var l = Object.keys(
|
|
3807
|
-
this.setOption(l[c],
|
|
3804
|
+
}, r.prototype.setOptions = function(h, o) {
|
|
3805
|
+
if (h)
|
|
3806
|
+
for (var l = Object.keys(h), c = 0; c < l.length; ++c)
|
|
3807
|
+
this.setOption(l[c], h[l[c]], o);
|
|
3808
3808
|
return this;
|
|
3809
3809
|
}, r.prototype.toString = function() {
|
|
3810
|
-
var
|
|
3811
|
-
return o.length ?
|
|
3810
|
+
var h = this.constructor.className, o = this.fullName;
|
|
3811
|
+
return o.length ? h + " " + o : h;
|
|
3812
3812
|
}, r._configure = function(u) {
|
|
3813
3813
|
i = u;
|
|
3814
3814
|
}, object;
|
|
@@ -3820,9 +3820,9 @@ function require_enum() {
|
|
|
3820
3820
|
var s = requireObject();
|
|
3821
3821
|
((u.prototype = Object.create(s.prototype)).constructor = u).className = "Enum";
|
|
3822
3822
|
var i = requireNamespace(), r = requireUtil();
|
|
3823
|
-
function u(
|
|
3824
|
-
if (s.call(this,
|
|
3825
|
-
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = c, this.comments =
|
|
3823
|
+
function u(h, o, l, c, d, a) {
|
|
3824
|
+
if (s.call(this, h, l), o && typeof o != "object") throw TypeError("values must be an object");
|
|
3825
|
+
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = c, this.comments = d || {}, this.valuesOptions = a, this.reserved = void 0, o)
|
|
3826
3826
|
for (var m = Object.keys(o), y = 0; y < m.length; ++y)
|
|
3827
3827
|
typeof o[m[y]] == "number" && (this.valuesById[this.values[m[y]] = o[m[y]]] = m[y]);
|
|
3828
3828
|
}
|
|
@@ -3845,7 +3845,7 @@ function require_enum() {
|
|
|
3845
3845
|
"comments",
|
|
3846
3846
|
l ? this.comments : void 0
|
|
3847
3847
|
]);
|
|
3848
|
-
}, u.prototype.add = function(o, l, c,
|
|
3848
|
+
}, u.prototype.add = function(o, l, c, d) {
|
|
3849
3849
|
if (!r.isString(o)) throw TypeError("name must be a string");
|
|
3850
3850
|
if (!r.isInteger(l)) throw TypeError("id must be an integer");
|
|
3851
3851
|
if (this.values[o] !== void 0) throw Error("duplicate name '" + o + "' in " + this);
|
|
@@ -3856,7 +3856,7 @@ function require_enum() {
|
|
|
3856
3856
|
throw Error("duplicate id " + l + " in " + this);
|
|
3857
3857
|
this.values[o] = l;
|
|
3858
3858
|
} else this.valuesById[this.values[o] = l] = o;
|
|
3859
|
-
return
|
|
3859
|
+
return d && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[o] = d || null), this.comments[o] = c || null, this;
|
|
3860
3860
|
}, u.prototype.remove = function(o) {
|
|
3861
3861
|
if (!r.isString(o)) throw TypeError("name must be a string");
|
|
3862
3862
|
var l = this.values[o];
|
|
@@ -3871,49 +3871,49 @@ function require_enum() {
|
|
|
3871
3871
|
var encoder_1, hasRequiredEncoder;
|
|
3872
3872
|
function requireEncoder() {
|
|
3873
3873
|
if (hasRequiredEncoder) return encoder_1;
|
|
3874
|
-
hasRequiredEncoder = 1, encoder_1 =
|
|
3874
|
+
hasRequiredEncoder = 1, encoder_1 = h;
|
|
3875
3875
|
var s = require_enum(), i = requireTypes(), r = requireUtil();
|
|
3876
|
-
function u(o, l, c,
|
|
3876
|
+
function u(o, l, c, d) {
|
|
3877
3877
|
return l.resolvedType.group ? o(
|
|
3878
3878
|
"types[%i].encode(%s,w.uint32(%i)).uint32(%i)",
|
|
3879
3879
|
c,
|
|
3880
|
-
|
|
3880
|
+
d,
|
|
3881
3881
|
(l.id << 3 | 3) >>> 0,
|
|
3882
3882
|
(l.id << 3 | 4) >>> 0
|
|
3883
3883
|
) : o(
|
|
3884
3884
|
"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",
|
|
3885
3885
|
c,
|
|
3886
|
-
|
|
3886
|
+
d,
|
|
3887
3887
|
(l.id << 3 | 2) >>> 0
|
|
3888
3888
|
);
|
|
3889
3889
|
}
|
|
3890
|
-
function
|
|
3891
|
-
for (var l = r.codegen(["m", "w"], o.name + "$encode")("if(!w)")("w=Writer.create()"), c,
|
|
3890
|
+
function h(o) {
|
|
3891
|
+
for (var l = r.codegen(["m", "w"], o.name + "$encode")("if(!w)")("w=Writer.create()"), c, d, a = (
|
|
3892
3892
|
/* initializes */
|
|
3893
3893
|
o.fieldsArray.slice().sort(r.compareFieldsById)
|
|
3894
3894
|
), c = 0; c < a.length; ++c) {
|
|
3895
3895
|
var m = a[c].resolve(), y = o._fieldsArray.indexOf(m), g = m.resolvedType instanceof s ? "int32" : m.type, p = i.basic[g];
|
|
3896
|
-
|
|
3896
|
+
d = "m" + r.safeProp(m.name), m.map ? (l(
|
|
3897
3897
|
"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",
|
|
3898
|
-
|
|
3898
|
+
d,
|
|
3899
3899
|
m.name
|
|
3900
3900
|
)(
|
|
3901
3901
|
// !== undefined && !== null
|
|
3902
3902
|
"for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",
|
|
3903
|
-
|
|
3903
|
+
d
|
|
3904
3904
|
)(
|
|
3905
3905
|
"w.uint32(%i).fork().uint32(%i).%s(ks[i])",
|
|
3906
3906
|
(m.id << 3 | 2) >>> 0,
|
|
3907
3907
|
8 | i.mapKey[m.keyType],
|
|
3908
3908
|
m.keyType
|
|
3909
|
-
), p === void 0 ? l("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", y,
|
|
3909
|
+
), p === void 0 ? l("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", y, d) : l(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | p, g, d), l("}")("}")) : m.repeated ? (l("if(%s!=null&&%s.length){", d, d), m.packed && i.packed[g] !== void 0 ? l("w.uint32(%i).fork()", (m.id << 3 | 2) >>> 0)(
|
|
3910
3910
|
"for(var i=0;i<%s.length;++i)",
|
|
3911
|
-
|
|
3911
|
+
d
|
|
3912
3912
|
)(
|
|
3913
3913
|
"w.%s(%s[i])",
|
|
3914
3914
|
g,
|
|
3915
|
-
|
|
3916
|
-
)("w.ldelim()") : (l("for(var i=0;i<%s.length;++i)",
|
|
3915
|
+
d
|
|
3916
|
+
)("w.ldelim()") : (l("for(var i=0;i<%s.length;++i)", d), p === void 0 ? u(l, m, y, d + "[i]") : l("w.uint32(%i).%s(%s[i])", (m.id << 3 | p) >>> 0, g, d)), l("}")) : (m.optional && l("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", d, m.name), p === void 0 ? u(l, m, y, d) : l("w.uint32(%i).%s(%s)", (m.id << 3 | p) >>> 0, g, d));
|
|
3917
3917
|
}
|
|
3918
3918
|
return l("return w");
|
|
3919
3919
|
}
|
|
@@ -3972,16 +3972,16 @@ function unescape(s) {
|
|
|
3972
3972
|
tokenize$1.unescape = unescape;
|
|
3973
3973
|
function tokenize$1(s, i) {
|
|
3974
3974
|
s = s.toString();
|
|
3975
|
-
var r = 0, u = s.length,
|
|
3975
|
+
var r = 0, u = s.length, h = 1, o = 0, l = {}, c = [], d = null;
|
|
3976
3976
|
function a(O) {
|
|
3977
|
-
return Error("illegal " + O + " (line " +
|
|
3977
|
+
return Error("illegal " + O + " (line " + h + ")");
|
|
3978
3978
|
}
|
|
3979
3979
|
function m() {
|
|
3980
|
-
var O =
|
|
3980
|
+
var O = d === "'" ? stringSingleRe : stringDoubleRe;
|
|
3981
3981
|
O.lastIndex = r - 1;
|
|
3982
3982
|
var E = O.exec(s);
|
|
3983
3983
|
if (!E) throw a("string");
|
|
3984
|
-
return r = O.lastIndex, _(
|
|
3984
|
+
return r = O.lastIndex, _(d), d = null, unescape(E[1]);
|
|
3985
3985
|
}
|
|
3986
3986
|
function y(O) {
|
|
3987
3987
|
return s.charAt(O);
|
|
@@ -4001,10 +4001,10 @@ function tokenize$1(s, i) {
|
|
|
4001
4001
|
break;
|
|
4002
4002
|
}
|
|
4003
4003
|
while (D === " " || D === " ");
|
|
4004
|
-
for (var I = s.substring(O, E).split(setCommentSplitRe),
|
|
4005
|
-
I[
|
|
4004
|
+
for (var I = s.substring(O, E).split(setCommentSplitRe), M = 0; M < I.length; ++M)
|
|
4005
|
+
I[M] = I[M].replace(i ? setCommentAltRe : setCommentRe, "").trim();
|
|
4006
4006
|
S.text = I.join(`
|
|
4007
|
-
`).trim(), l[
|
|
4007
|
+
`).trim(), l[h] = S, o = h;
|
|
4008
4008
|
}
|
|
4009
4009
|
function p(O) {
|
|
4010
4010
|
var E = v(O), R = s.substring(O, E), S = /^\s*\/\//.test(R);
|
|
@@ -4018,13 +4018,13 @@ function tokenize$1(s, i) {
|
|
|
4018
4018
|
}
|
|
4019
4019
|
function b() {
|
|
4020
4020
|
if (c.length > 0) return c.shift();
|
|
4021
|
-
if (
|
|
4021
|
+
if (d) return m();
|
|
4022
4022
|
var O, E, R, S, P, C = r === 0;
|
|
4023
4023
|
do {
|
|
4024
4024
|
if (r === u) return null;
|
|
4025
4025
|
for (O = !1; whitespaceRe.test(R = y(r)); )
|
|
4026
4026
|
if (R === `
|
|
4027
|
-
` && (C = !0, ++
|
|
4027
|
+
` && (C = !0, ++h), ++r === u) return null;
|
|
4028
4028
|
if (y(r) === "/") {
|
|
4029
4029
|
if (++r === u)
|
|
4030
4030
|
throw a("comment");
|
|
@@ -4038,19 +4038,19 @@ function tokenize$1(s, i) {
|
|
|
4038
4038
|
while (p(r));
|
|
4039
4039
|
} else
|
|
4040
4040
|
r = Math.min(u, v(r) + 1);
|
|
4041
|
-
P && (g(S, r, C), C = !0),
|
|
4041
|
+
P && (g(S, r, C), C = !0), h++, O = !0;
|
|
4042
4042
|
} else {
|
|
4043
4043
|
for (P = y(S = r + 1) === "/"; y(++r) !== `
|
|
4044
4044
|
`; )
|
|
4045
4045
|
if (r === u)
|
|
4046
4046
|
return null;
|
|
4047
|
-
++r, P && (g(S, r - 1, C), C = !0), ++
|
|
4047
|
+
++r, P && (g(S, r - 1, C), C = !0), ++h, O = !0;
|
|
4048
4048
|
}
|
|
4049
4049
|
else if ((R = y(r)) === "*") {
|
|
4050
4050
|
S = r + 1, P = i || y(S) === "*";
|
|
4051
4051
|
do {
|
|
4052
4052
|
if (R === `
|
|
4053
|
-
` && ++
|
|
4053
|
+
` && ++h, ++r === u)
|
|
4054
4054
|
throw a("comment");
|
|
4055
4055
|
E = R, R = y(r);
|
|
4056
4056
|
} while (E !== "*" || R !== "/");
|
|
@@ -4063,8 +4063,8 @@ function tokenize$1(s, i) {
|
|
|
4063
4063
|
delimRe.lastIndex = 0;
|
|
4064
4064
|
var I = delimRe.test(y(D++));
|
|
4065
4065
|
if (!I) for (; D < u && !delimRe.test(y(D)); ) ++D;
|
|
4066
|
-
var
|
|
4067
|
-
return (
|
|
4066
|
+
var M = s.substring(r, r = D);
|
|
4067
|
+
return (M === '"' || M === "'") && (d = M), M;
|
|
4068
4068
|
}
|
|
4069
4069
|
function _(O) {
|
|
4070
4070
|
c.push(O);
|
|
@@ -4086,7 +4086,7 @@ function tokenize$1(s, i) {
|
|
|
4086
4086
|
}
|
|
4087
4087
|
function x(O) {
|
|
4088
4088
|
var E = null, R;
|
|
4089
|
-
return O === void 0 ? (R = l[
|
|
4089
|
+
return O === void 0 ? (R = l[h - 1], delete l[h - 1], R && (i || R.type === "*" || R.lineEmpty) && (E = R.leading ? R.text : null)) : (o < O && T(), R = l[O], delete l[O], R && !R.lineEmpty && (i || R.type === "/") && (E = R.leading ? null : R.text)), E;
|
|
4090
4090
|
}
|
|
4091
4091
|
return Object.defineProperty(
|
|
4092
4092
|
{
|
|
@@ -4099,7 +4099,7 @@ function tokenize$1(s, i) {
|
|
|
4099
4099
|
"line",
|
|
4100
4100
|
{
|
|
4101
4101
|
get: function() {
|
|
4102
|
-
return
|
|
4102
|
+
return h;
|
|
4103
4103
|
}
|
|
4104
4104
|
}
|
|
4105
4105
|
);
|
|
@@ -4112,20 +4112,20 @@ parse.defaults = {
|
|
|
4112
4112
|
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]*)+$/;
|
|
4113
4113
|
function parse(s, i, r) {
|
|
4114
4114
|
i instanceof Root || (r = i, i = new Root()), r || (r = parse.defaults);
|
|
4115
|
-
var u = r.preferTrailingComment || !1,
|
|
4115
|
+
var u = r.preferTrailingComment || !1, h = tokenize(s, r.alternateCommentMode || !1), o = h.next, l = h.push, c = h.peek, d = h.skip, a = h.cmnt, m = !0, y, g, p, v, b = !1, _ = i, T = r.keepCase ? function(A) {
|
|
4116
4116
|
return A;
|
|
4117
4117
|
} : util.camelCase;
|
|
4118
4118
|
function w(A, k, N) {
|
|
4119
4119
|
var L = parse.filename;
|
|
4120
4120
|
return N || (parse.filename = null), Error(
|
|
4121
|
-
"illegal " + (k || "token") + " '" + A + "' (" + (L ? L + ", " : "") + "line " +
|
|
4121
|
+
"illegal " + (k || "token") + " '" + A + "' (" + (L ? L + ", " : "") + "line " + h.line + ")"
|
|
4122
4122
|
);
|
|
4123
4123
|
}
|
|
4124
4124
|
function x() {
|
|
4125
4125
|
var A = [], k;
|
|
4126
4126
|
do {
|
|
4127
4127
|
if ((k = o()) !== '"' && k !== "'") throw w(k);
|
|
4128
|
-
A.push(o()),
|
|
4128
|
+
A.push(o()), d(k), k = c();
|
|
4129
4129
|
} while (k === '"' || k === "'");
|
|
4130
4130
|
return A.join("");
|
|
4131
4131
|
}
|
|
@@ -4156,18 +4156,18 @@ function parse(s, i, r) {
|
|
|
4156
4156
|
function E(A, k) {
|
|
4157
4157
|
var N, L;
|
|
4158
4158
|
do
|
|
4159
|
-
k && ((N = c()) === '"' || N === "'") ? A.push(x()) : A.push([L = S(o()),
|
|
4160
|
-
while (
|
|
4159
|
+
k && ((N = c()) === '"' || N === "'") ? A.push(x()) : A.push([L = S(o()), d("to", !0) ? S(o()) : L]);
|
|
4160
|
+
while (d(",", !0));
|
|
4161
4161
|
var B = {
|
|
4162
4162
|
options: void 0
|
|
4163
4163
|
};
|
|
4164
|
-
B.setOption = function(
|
|
4165
|
-
this.options === void 0 && (this.options = {}), this.options[
|
|
4166
|
-
},
|
|
4164
|
+
B.setOption = function($, j) {
|
|
4165
|
+
this.options === void 0 && (this.options = {}), this.options[$] = j;
|
|
4166
|
+
}, M(
|
|
4167
4167
|
B,
|
|
4168
4168
|
function(j) {
|
|
4169
4169
|
if (j === "option")
|
|
4170
|
-
Z(B, j),
|
|
4170
|
+
Z(B, j), d(";");
|
|
4171
4171
|
else throw w(j);
|
|
4172
4172
|
},
|
|
4173
4173
|
function() {
|
|
@@ -4214,7 +4214,7 @@ function parse(s, i, r) {
|
|
|
4214
4214
|
function P() {
|
|
4215
4215
|
if (y !== void 0) throw w("package");
|
|
4216
4216
|
if (y = o(), !typeRefRe.test(y)) throw w(y, "name");
|
|
4217
|
-
_ = _.define(y),
|
|
4217
|
+
_ = _.define(y), d(";");
|
|
4218
4218
|
}
|
|
4219
4219
|
function C() {
|
|
4220
4220
|
var A = c(), k;
|
|
@@ -4228,16 +4228,16 @@ function parse(s, i, r) {
|
|
|
4228
4228
|
k = g || (g = []);
|
|
4229
4229
|
break;
|
|
4230
4230
|
}
|
|
4231
|
-
A = x(),
|
|
4231
|
+
A = x(), d(";"), k.push(A);
|
|
4232
4232
|
}
|
|
4233
4233
|
function D() {
|
|
4234
|
-
if (
|
|
4235
|
-
i.setOption("syntax", v),
|
|
4234
|
+
if (d("="), v = x(), b = v === "proto3", !b && v !== "proto2") throw w(v, "syntax");
|
|
4235
|
+
i.setOption("syntax", v), d(";");
|
|
4236
4236
|
}
|
|
4237
4237
|
function I(A, k) {
|
|
4238
4238
|
switch (k) {
|
|
4239
4239
|
case "option":
|
|
4240
|
-
return Z(A, k),
|
|
4240
|
+
return Z(A, k), d(";"), !0;
|
|
4241
4241
|
case "message":
|
|
4242
4242
|
return q(A, k), !0;
|
|
4243
4243
|
case "enum":
|
|
@@ -4249,18 +4249,18 @@ function parse(s, i, r) {
|
|
|
4249
4249
|
}
|
|
4250
4250
|
return !1;
|
|
4251
4251
|
}
|
|
4252
|
-
function
|
|
4253
|
-
var L =
|
|
4254
|
-
if (A && (typeof A.comment != "string" && (A.comment = a()), A.filename = parse.filename),
|
|
4252
|
+
function M(A, k, N) {
|
|
4253
|
+
var L = h.line;
|
|
4254
|
+
if (A && (typeof A.comment != "string" && (A.comment = a()), A.filename = parse.filename), d("{", !0)) {
|
|
4255
4255
|
for (var B; (B = o()) !== "}"; ) k(B);
|
|
4256
|
-
|
|
4256
|
+
d(";", !0);
|
|
4257
4257
|
} else
|
|
4258
|
-
N && N(),
|
|
4258
|
+
N && N(), d(";"), A && (typeof A.comment != "string" || u) && (A.comment = a(L) || A.comment);
|
|
4259
4259
|
}
|
|
4260
4260
|
function q(A, k) {
|
|
4261
4261
|
if (!nameRe.test(k = o())) throw w(k, "type name");
|
|
4262
4262
|
var N = new Type(k);
|
|
4263
|
-
|
|
4263
|
+
M(N, function(B) {
|
|
4264
4264
|
if (!I(N, B))
|
|
4265
4265
|
switch (B) {
|
|
4266
4266
|
case "map":
|
|
@@ -4300,24 +4300,24 @@ function parse(s, i, r) {
|
|
|
4300
4300
|
if (!typeRefRe.test(L)) throw w(L, "type");
|
|
4301
4301
|
var B = o();
|
|
4302
4302
|
if (!nameRe.test(B)) throw w(B, "name");
|
|
4303
|
-
B = T(B),
|
|
4304
|
-
var
|
|
4305
|
-
if (
|
|
4306
|
-
|
|
4303
|
+
B = T(B), d("=");
|
|
4304
|
+
var $ = new Field(B, S(o()), L, k, N);
|
|
4305
|
+
if (M(
|
|
4306
|
+
$,
|
|
4307
4307
|
function(W) {
|
|
4308
4308
|
if (W === "option")
|
|
4309
|
-
Z(
|
|
4309
|
+
Z($, W), d(";");
|
|
4310
4310
|
else throw w(W);
|
|
4311
4311
|
},
|
|
4312
4312
|
function() {
|
|
4313
|
-
X(
|
|
4313
|
+
X($);
|
|
4314
4314
|
}
|
|
4315
4315
|
), k === "proto3_optional") {
|
|
4316
4316
|
var j = new OneOf("_" + B);
|
|
4317
|
-
|
|
4317
|
+
$.setOption("proto3_optional", !0), j.add($), A.add(j);
|
|
4318
4318
|
} else
|
|
4319
|
-
A.add(
|
|
4320
|
-
!b &&
|
|
4319
|
+
A.add($);
|
|
4320
|
+
!b && $.repeated && (types.packed[L] !== void 0 || types.basic[L] === void 0) && $.setOption(
|
|
4321
4321
|
"packed",
|
|
4322
4322
|
!1,
|
|
4323
4323
|
/* ifNotSet */
|
|
@@ -4328,51 +4328,51 @@ function parse(s, i, r) {
|
|
|
4328
4328
|
var N = o();
|
|
4329
4329
|
if (!nameRe.test(N)) throw w(N, "name");
|
|
4330
4330
|
var L = util.lcFirst(N);
|
|
4331
|
-
N === L && (N = util.ucFirst(N)),
|
|
4332
|
-
var B = S(o()),
|
|
4333
|
-
|
|
4331
|
+
N === L && (N = util.ucFirst(N)), d("=");
|
|
4332
|
+
var B = S(o()), $ = new Type(N);
|
|
4333
|
+
$.group = !0;
|
|
4334
4334
|
var j = new Field(L, B, N, k);
|
|
4335
|
-
j.filename = parse.filename,
|
|
4335
|
+
j.filename = parse.filename, M($, function(W) {
|
|
4336
4336
|
switch (W) {
|
|
4337
4337
|
case "option":
|
|
4338
|
-
Z(
|
|
4338
|
+
Z($, W), d(";");
|
|
4339
4339
|
break;
|
|
4340
4340
|
case "required":
|
|
4341
4341
|
case "repeated":
|
|
4342
|
-
F(
|
|
4342
|
+
F($, W);
|
|
4343
4343
|
break;
|
|
4344
4344
|
case "optional":
|
|
4345
|
-
b ? F(
|
|
4345
|
+
b ? F($, "proto3_optional") : F($, "optional");
|
|
4346
4346
|
break;
|
|
4347
4347
|
case "message":
|
|
4348
|
-
q(
|
|
4348
|
+
q($, W);
|
|
4349
4349
|
break;
|
|
4350
4350
|
case "enum":
|
|
4351
|
-
Q(
|
|
4351
|
+
Q($, W);
|
|
4352
4352
|
break;
|
|
4353
4353
|
/* istanbul ignore next */
|
|
4354
4354
|
default:
|
|
4355
4355
|
throw w(W);
|
|
4356
4356
|
}
|
|
4357
|
-
}), A.add(
|
|
4357
|
+
}), A.add($).add(j);
|
|
4358
4358
|
}
|
|
4359
4359
|
function te(A) {
|
|
4360
|
-
|
|
4360
|
+
d("<");
|
|
4361
4361
|
var k = o();
|
|
4362
4362
|
if (types.mapKey[k] === void 0) throw w(k, "type");
|
|
4363
|
-
|
|
4363
|
+
d(",");
|
|
4364
4364
|
var N = o();
|
|
4365
4365
|
if (!typeRefRe.test(N)) throw w(N, "type");
|
|
4366
|
-
|
|
4366
|
+
d(">");
|
|
4367
4367
|
var L = o();
|
|
4368
4368
|
if (!nameRe.test(L)) throw w(L, "name");
|
|
4369
|
-
|
|
4369
|
+
d("=");
|
|
4370
4370
|
var B = new MapField(T(L), S(o()), k, N);
|
|
4371
|
-
|
|
4371
|
+
M(
|
|
4372
4372
|
B,
|
|
4373
4373
|
function(j) {
|
|
4374
4374
|
if (j === "option")
|
|
4375
|
-
Z(B, j),
|
|
4375
|
+
Z(B, j), d(";");
|
|
4376
4376
|
else throw w(j);
|
|
4377
4377
|
},
|
|
4378
4378
|
function() {
|
|
@@ -4383,17 +4383,17 @@ function parse(s, i, r) {
|
|
|
4383
4383
|
function re(A, k) {
|
|
4384
4384
|
if (!nameRe.test(k = o())) throw w(k, "name");
|
|
4385
4385
|
var N = new OneOf(T(k));
|
|
4386
|
-
|
|
4387
|
-
B === "option" ? (Z(N, B),
|
|
4386
|
+
M(N, function(B) {
|
|
4387
|
+
B === "option" ? (Z(N, B), d(";")) : (l(B), F(N, "optional"));
|
|
4388
4388
|
}), A.add(N);
|
|
4389
4389
|
}
|
|
4390
4390
|
function Q(A, k) {
|
|
4391
4391
|
if (!nameRe.test(k = o())) throw w(k, "name");
|
|
4392
4392
|
var N = new Enum(k);
|
|
4393
|
-
|
|
4393
|
+
M(N, function(B) {
|
|
4394
4394
|
switch (B) {
|
|
4395
4395
|
case "option":
|
|
4396
|
-
Z(N, B),
|
|
4396
|
+
Z(N, B), d(";");
|
|
4397
4397
|
break;
|
|
4398
4398
|
case "reserved":
|
|
4399
4399
|
E(N.reserved || (N.reserved = []), !0);
|
|
@@ -4405,18 +4405,18 @@ function parse(s, i, r) {
|
|
|
4405
4405
|
}
|
|
4406
4406
|
function ie(A, k) {
|
|
4407
4407
|
if (!nameRe.test(k)) throw w(k, "name");
|
|
4408
|
-
|
|
4408
|
+
d("=");
|
|
4409
4409
|
var N = S(o(), !0), L = {
|
|
4410
4410
|
options: void 0
|
|
4411
4411
|
};
|
|
4412
|
-
L.setOption = function(B,
|
|
4413
|
-
this.options === void 0 && (this.options = {}), this.options[B] =
|
|
4414
|
-
},
|
|
4412
|
+
L.setOption = function(B, $) {
|
|
4413
|
+
this.options === void 0 && (this.options = {}), this.options[B] = $;
|
|
4414
|
+
}, M(
|
|
4415
4415
|
L,
|
|
4416
|
-
function(
|
|
4417
|
-
if (
|
|
4418
|
-
Z(L,
|
|
4419
|
-
else throw w(
|
|
4416
|
+
function($) {
|
|
4417
|
+
if ($ === "option")
|
|
4418
|
+
Z(L, $), d(";");
|
|
4419
|
+
else throw w($);
|
|
4420
4420
|
},
|
|
4421
4421
|
function() {
|
|
4422
4422
|
X(L);
|
|
@@ -4424,35 +4424,35 @@ function parse(s, i, r) {
|
|
|
4424
4424
|
), A.add(k, N, L.comment, L.options);
|
|
4425
4425
|
}
|
|
4426
4426
|
function Z(A, k) {
|
|
4427
|
-
var N =
|
|
4427
|
+
var N = d("(", !0);
|
|
4428
4428
|
if (!typeRefRe.test(k = o())) throw w(k, "name");
|
|
4429
|
-
var L = k, B = L,
|
|
4430
|
-
N && (
|
|
4429
|
+
var L = k, B = L, $;
|
|
4430
|
+
N && (d(")"), L = "(" + L + ")", B = L, k = c(), fqTypeRefRe.test(k) && ($ = k.slice(1), L += k, o())), d("=");
|
|
4431
4431
|
var j = ee(A, L);
|
|
4432
|
-
ne(A, B, j,
|
|
4432
|
+
ne(A, B, j, $);
|
|
4433
4433
|
}
|
|
4434
4434
|
function ee(A, k) {
|
|
4435
|
-
if (
|
|
4436
|
-
for (var N = {}; !
|
|
4435
|
+
if (d("{", !0)) {
|
|
4436
|
+
for (var N = {}; !d("}", !0); ) {
|
|
4437
4437
|
if (!nameRe.test(H = o()))
|
|
4438
4438
|
throw w(H, "name");
|
|
4439
4439
|
if (H === null)
|
|
4440
4440
|
throw w(H, "end of input");
|
|
4441
4441
|
var L, B = H;
|
|
4442
|
-
if (
|
|
4442
|
+
if (d(":", !0), c() === "{") L = ee(A, k + "." + H);
|
|
4443
4443
|
else if (c() === "[") {
|
|
4444
4444
|
L = [];
|
|
4445
|
-
var
|
|
4446
|
-
if (
|
|
4445
|
+
var $;
|
|
4446
|
+
if (d("[", !0)) {
|
|
4447
4447
|
do
|
|
4448
|
-
|
|
4449
|
-
while (
|
|
4450
|
-
|
|
4448
|
+
$ = O(), L.push($);
|
|
4449
|
+
while (d(",", !0));
|
|
4450
|
+
d("]"), typeof $ < "u" && K(A, k + "." + H, $);
|
|
4451
4451
|
}
|
|
4452
4452
|
} else
|
|
4453
4453
|
L = O(), K(A, k + "." + H, L);
|
|
4454
4454
|
var j = N[B];
|
|
4455
|
-
j && (L = [].concat(j).concat(L)), N[B] = L,
|
|
4455
|
+
j && (L = [].concat(j).concat(L)), N[B] = L, d(",", !0), d(";", !0);
|
|
4456
4456
|
}
|
|
4457
4457
|
return N;
|
|
4458
4458
|
}
|
|
@@ -4466,18 +4466,18 @@ function parse(s, i, r) {
|
|
|
4466
4466
|
A.setParsedOption && A.setParsedOption(k, N, L);
|
|
4467
4467
|
}
|
|
4468
4468
|
function X(A) {
|
|
4469
|
-
if (
|
|
4469
|
+
if (d("[", !0)) {
|
|
4470
4470
|
do
|
|
4471
4471
|
Z(A, "option");
|
|
4472
|
-
while (
|
|
4473
|
-
|
|
4472
|
+
while (d(",", !0));
|
|
4473
|
+
d("]");
|
|
4474
4474
|
}
|
|
4475
4475
|
return A;
|
|
4476
4476
|
}
|
|
4477
4477
|
function se(A, k) {
|
|
4478
4478
|
if (!nameRe.test(k = o())) throw w(k, "service name");
|
|
4479
4479
|
var N = new Service(k);
|
|
4480
|
-
|
|
4480
|
+
M(N, function(B) {
|
|
4481
4481
|
if (!I(N, B))
|
|
4482
4482
|
if (B === "rpc") ae(N, B);
|
|
4483
4483
|
else throw w(B);
|
|
@@ -4486,20 +4486,20 @@ function parse(s, i, r) {
|
|
|
4486
4486
|
function ae(A, k) {
|
|
4487
4487
|
var N = a(), L = k;
|
|
4488
4488
|
if (!nameRe.test(k = o())) throw w(k, "name");
|
|
4489
|
-
var B = k,
|
|
4490
|
-
if (
|
|
4491
|
-
V = k,
|
|
4492
|
-
var J = new Method(B, L,
|
|
4493
|
-
J.comment = N,
|
|
4489
|
+
var B = k, $, j, V, W;
|
|
4490
|
+
if (d("("), d("stream", !0) && (j = !0), !typeRefRe.test(k = o()) || ($ = k, d(")"), d("returns"), d("("), d("stream", !0) && (W = !0), !typeRefRe.test(k = o()))) throw w(k);
|
|
4491
|
+
V = k, d(")");
|
|
4492
|
+
var J = new Method(B, L, $, V, j, W);
|
|
4493
|
+
J.comment = N, M(J, function(Y) {
|
|
4494
4494
|
if (Y === "option")
|
|
4495
|
-
Z(J, Y),
|
|
4495
|
+
Z(J, Y), d(";");
|
|
4496
4496
|
else throw w(Y);
|
|
4497
4497
|
}), A.add(J);
|
|
4498
4498
|
}
|
|
4499
4499
|
function oe(A, k) {
|
|
4500
4500
|
if (!typeRefRe.test(k = o())) throw w(k, "reference");
|
|
4501
4501
|
var N = k;
|
|
4502
|
-
|
|
4502
|
+
M(null, function(B) {
|
|
4503
4503
|
switch (B) {
|
|
4504
4504
|
case "required":
|
|
4505
4505
|
case "repeated":
|
|
@@ -4530,7 +4530,7 @@ function parse(s, i, r) {
|
|
|
4530
4530
|
D();
|
|
4531
4531
|
break;
|
|
4532
4532
|
case "option":
|
|
4533
|
-
Z(_, H),
|
|
4533
|
+
Z(_, H), d(";");
|
|
4534
4534
|
break;
|
|
4535
4535
|
default:
|
|
4536
4536
|
if (I(_, H)) {
|
|
@@ -4894,16 +4894,39 @@ HorizontalOrigin.CENTER, VerticalOrigin.CENTER, Cartesian3.ZERO, Cartesian2.ZERO
|
|
|
4894
4894
|
var index = {
|
|
4895
4895
|
GeoTerrainProvider
|
|
4896
4896
|
};
|
|
4897
|
+
function invertToCanvas(s) {
|
|
4898
|
+
var c;
|
|
4899
|
+
const i = s.width, r = s.height, u = document.createElement("canvas");
|
|
4900
|
+
u.width = i, u.height = r;
|
|
4901
|
+
const h = u.getContext("2d");
|
|
4902
|
+
h.translate(0, r), h.scale(1, -1), h.drawImage(s, 0, 0);
|
|
4903
|
+
const o = h.getImageData(0, 0, i, r), l = o.data;
|
|
4904
|
+
for (let d = 0; d < l.length; d += 4)
|
|
4905
|
+
l[d] = 255 - l[d], l[d + 1] = 255 - l[d + 1], l[d + 2] = 255 - l[d + 2];
|
|
4906
|
+
return h.putImageData(o, 0, 0), "close" in s && ((c = s.close) == null || c.call(s)), u;
|
|
4907
|
+
}
|
|
4908
|
+
class CustomWebMapTileServiceImageryProvider extends Cesium.WebMapTileServiceImageryProvider {
|
|
4909
|
+
constructor(i) {
|
|
4910
|
+
super(i), this.options = i;
|
|
4911
|
+
}
|
|
4912
|
+
requestImage(i, r, u, h) {
|
|
4913
|
+
const o = super.requestImage(i, r, u, h);
|
|
4914
|
+
return o && o.then((l) => {
|
|
4915
|
+
var c, d;
|
|
4916
|
+
return ((d = (c = this.options).requestInterceptor) == null ? void 0 : d.call(c, l)) ?? l;
|
|
4917
|
+
});
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4897
4920
|
function createTdtProvider(s, i) {
|
|
4898
4921
|
const { token: r, ...u } = i;
|
|
4899
|
-
return new
|
|
4922
|
+
return new CustomWebMapTileServiceImageryProvider({
|
|
4900
4923
|
url: `https://t0.tianditu.gov.cn/${s}_w/wmts?tk=${r}`,
|
|
4901
4924
|
layer: s,
|
|
4902
4925
|
style: "default",
|
|
4903
4926
|
format: "tiles",
|
|
4904
4927
|
tileMatrixSetID: "w",
|
|
4905
4928
|
maximumLevel: 18,
|
|
4906
|
-
credit: new Credit("TianDiTu"),
|
|
4929
|
+
credit: new Cesium.Credit("TianDiTu"),
|
|
4907
4930
|
...u
|
|
4908
4931
|
});
|
|
4909
4932
|
}
|
|
@@ -4923,8 +4946,8 @@ function getRawTag(s) {
|
|
|
4923
4946
|
var u = !0;
|
|
4924
4947
|
} catch {
|
|
4925
4948
|
}
|
|
4926
|
-
var
|
|
4927
|
-
return u && (i ? s[symToStringTag$1] = r : delete s[symToStringTag$1]),
|
|
4949
|
+
var h = nativeObjectToString$1.call(s);
|
|
4950
|
+
return u && (i ? s[symToStringTag$1] = r : delete s[symToStringTag$1]), h;
|
|
4928
4951
|
}
|
|
4929
4952
|
var objectProto$7 = Object.prototype, nativeObjectToString = objectProto$7.toString;
|
|
4930
4953
|
function objectToString(s) {
|
|
@@ -5035,8 +5058,8 @@ var HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
|
|
|
5035
5058
|
function shortOut(s) {
|
|
5036
5059
|
var i = 0, r = 0;
|
|
5037
5060
|
return function() {
|
|
5038
|
-
var u = nativeNow(),
|
|
5039
|
-
if (r = u,
|
|
5061
|
+
var u = nativeNow(), h = HOT_SPAN - (u - r);
|
|
5062
|
+
if (r = u, h > 0) {
|
|
5040
5063
|
if (++i >= HOT_COUNT)
|
|
5041
5064
|
return arguments[0];
|
|
5042
5065
|
} else
|
|
@@ -5073,11 +5096,11 @@ function eq(s, i) {
|
|
|
5073
5096
|
var nativeMax$1 = Math.max;
|
|
5074
5097
|
function overRest(s, i, r) {
|
|
5075
5098
|
return i = nativeMax$1(i === void 0 ? s.length - 1 : i, 0), function() {
|
|
5076
|
-
for (var u = arguments,
|
|
5077
|
-
l[
|
|
5078
|
-
|
|
5079
|
-
for (var c = Array(i + 1); ++
|
|
5080
|
-
c[
|
|
5099
|
+
for (var u = arguments, h = -1, o = nativeMax$1(u.length - i, 0), l = Array(o); ++h < o; )
|
|
5100
|
+
l[h] = u[i + h];
|
|
5101
|
+
h = -1;
|
|
5102
|
+
for (var c = Array(i + 1); ++h < i; )
|
|
5103
|
+
c[h] = u[h];
|
|
5081
5104
|
return c[i] = r(l), apply(s, this, c);
|
|
5082
5105
|
};
|
|
5083
5106
|
}
|
|
@@ -5138,13 +5161,13 @@ var freeExports = typeof exports == "object" && exports && !exports.nodeType &&
|
|
|
5138
5161
|
}
|
|
5139
5162
|
}(), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
5140
5163
|
function arrayLikeKeys(s, i) {
|
|
5141
|
-
var r = isArray(s), u = !r && isArguments(s),
|
|
5164
|
+
var r = isArray(s), u = !r && isArguments(s), h = !r && !u && isBuffer(s), o = !r && !u && !h && isTypedArray(s), l = r || u || h || o, c = l ? baseTimes(s.length, String) : [], d = c.length;
|
|
5142
5165
|
for (var a in s)
|
|
5143
5166
|
l && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
5144
5167
|
(a == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
5145
|
-
|
|
5168
|
+
h && (a == "offset" || a == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
5146
5169
|
o && (a == "buffer" || a == "byteLength" || a == "byteOffset") || // Skip index properties.
|
|
5147
|
-
isIndex(a,
|
|
5170
|
+
isIndex(a, d)) || c.push(a);
|
|
5148
5171
|
return c;
|
|
5149
5172
|
}
|
|
5150
5173
|
function nativeKeysIn(s) {
|
|
@@ -5292,11 +5315,11 @@ function memoize(s, i) {
|
|
|
5292
5315
|
if (typeof s != "function" || i != null && typeof i != "function")
|
|
5293
5316
|
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
5294
5317
|
var r = function() {
|
|
5295
|
-
var u = arguments,
|
|
5296
|
-
if (o.has(
|
|
5297
|
-
return o.get(
|
|
5318
|
+
var u = arguments, h = i ? i.apply(this, u) : u[0], o = r.cache;
|
|
5319
|
+
if (o.has(h))
|
|
5320
|
+
return o.get(h);
|
|
5298
5321
|
var l = s.apply(this, u);
|
|
5299
|
-
return r.cache = o.set(
|
|
5322
|
+
return r.cache = o.set(h, l) || o, l;
|
|
5300
5323
|
};
|
|
5301
5324
|
return r.cache = new (memoize.Cache || MapCache)(), r;
|
|
5302
5325
|
}
|
|
@@ -5305,24 +5328,24 @@ var now = function() {
|
|
|
5305
5328
|
return root.Date.now();
|
|
5306
5329
|
}, FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min;
|
|
5307
5330
|
function debounce(s, i, r) {
|
|
5308
|
-
var u,
|
|
5331
|
+
var u, h, o, l, c, d, a = 0, m = !1, y = !1, g = !0;
|
|
5309
5332
|
if (typeof s != "function")
|
|
5310
5333
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
5311
5334
|
i = toNumber(i) || 0, isObject(r) && (m = !!r.leading, y = "maxWait" in r, o = y ? nativeMax(toNumber(r.maxWait) || 0, i) : o, g = "trailing" in r ? !!r.trailing : g);
|
|
5312
5335
|
function p(R) {
|
|
5313
|
-
var S = u, P =
|
|
5314
|
-
return u =
|
|
5336
|
+
var S = u, P = h;
|
|
5337
|
+
return u = h = void 0, a = R, l = s.apply(P, S), l;
|
|
5315
5338
|
}
|
|
5316
5339
|
function v(R) {
|
|
5317
5340
|
return a = R, c = setTimeout(T, i), m ? p(R) : l;
|
|
5318
5341
|
}
|
|
5319
5342
|
function b(R) {
|
|
5320
|
-
var S = R -
|
|
5343
|
+
var S = R - d, P = R - a, C = i - S;
|
|
5321
5344
|
return y ? nativeMin(C, o - P) : C;
|
|
5322
5345
|
}
|
|
5323
5346
|
function _(R) {
|
|
5324
|
-
var S = R -
|
|
5325
|
-
return
|
|
5347
|
+
var S = R - d, P = R - a;
|
|
5348
|
+
return d === void 0 || S >= i || S < 0 || y && P >= o;
|
|
5326
5349
|
}
|
|
5327
5350
|
function T() {
|
|
5328
5351
|
var R = now();
|
|
@@ -5331,21 +5354,21 @@ function debounce(s, i, r) {
|
|
|
5331
5354
|
c = setTimeout(T, b(R));
|
|
5332
5355
|
}
|
|
5333
5356
|
function w(R) {
|
|
5334
|
-
return c = void 0, g && u ? p(R) : (u =
|
|
5357
|
+
return c = void 0, g && u ? p(R) : (u = h = void 0, l);
|
|
5335
5358
|
}
|
|
5336
5359
|
function x() {
|
|
5337
|
-
c !== void 0 && clearTimeout(c), a = 0, u =
|
|
5360
|
+
c !== void 0 && clearTimeout(c), a = 0, u = d = h = c = void 0;
|
|
5338
5361
|
}
|
|
5339
5362
|
function O() {
|
|
5340
5363
|
return c === void 0 ? l : w(now());
|
|
5341
5364
|
}
|
|
5342
5365
|
function E() {
|
|
5343
5366
|
var R = now(), S = _(R);
|
|
5344
|
-
if (u = arguments,
|
|
5367
|
+
if (u = arguments, h = this, d = R, S) {
|
|
5345
5368
|
if (c === void 0)
|
|
5346
|
-
return v(
|
|
5369
|
+
return v(d);
|
|
5347
5370
|
if (y)
|
|
5348
|
-
return clearTimeout(c), c = setTimeout(T, i), p(
|
|
5371
|
+
return clearTimeout(c), c = setTimeout(T, i), p(d);
|
|
5349
5372
|
}
|
|
5350
5373
|
return c === void 0 && (c = setTimeout(T, i)), l;
|
|
5351
5374
|
}
|
|
@@ -5353,9 +5376,9 @@ function debounce(s, i, r) {
|
|
|
5353
5376
|
}
|
|
5354
5377
|
var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, defaults = baseRest(function(s, i) {
|
|
5355
5378
|
s = Object(s);
|
|
5356
|
-
var r = -1, u = i.length,
|
|
5357
|
-
for (
|
|
5358
|
-
for (var o = i[r], l = keysIn(o), c = -1,
|
|
5379
|
+
var r = -1, u = i.length, h = u > 2 ? i[2] : void 0;
|
|
5380
|
+
for (h && isIterateeCall(i[0], i[1], h) && (u = 1); ++r < u; )
|
|
5381
|
+
for (var o = i[r], l = keysIn(o), c = -1, d = l.length; ++c < d; ) {
|
|
5359
5382
|
var a = l[c], m = s[a];
|
|
5360
5383
|
(m === void 0 || eq(m, objectProto[a]) && !hasOwnProperty.call(s, a)) && (s[a] = o[a]);
|
|
5361
5384
|
}
|
|
@@ -5371,17 +5394,17 @@ function requireEventemitter3() {
|
|
|
5371
5394
|
function u() {
|
|
5372
5395
|
}
|
|
5373
5396
|
Object.create && (u.prototype = /* @__PURE__ */ Object.create(null), new u().__proto__ || (r = !1));
|
|
5374
|
-
function d
|
|
5375
|
-
this.fn =
|
|
5397
|
+
function h(d, a, m) {
|
|
5398
|
+
this.fn = d, this.context = a, this.once = m || !1;
|
|
5376
5399
|
}
|
|
5377
|
-
function o(
|
|
5400
|
+
function o(d, a, m, y, g) {
|
|
5378
5401
|
if (typeof m != "function")
|
|
5379
5402
|
throw new TypeError("The listener must be a function");
|
|
5380
|
-
var p = new
|
|
5381
|
-
return
|
|
5403
|
+
var p = new h(m, y || d, g), v = r ? r + a : a;
|
|
5404
|
+
return d._events[v] ? d._events[v].fn ? d._events[v] = [d._events[v], p] : d._events[v].push(p) : (d._events[v] = p, d._eventsCount++), d;
|
|
5382
5405
|
}
|
|
5383
|
-
function l(
|
|
5384
|
-
--
|
|
5406
|
+
function l(d, a) {
|
|
5407
|
+
--d._eventsCount === 0 ? d._events = new u() : delete d._events[a];
|
|
5385
5408
|
}
|
|
5386
5409
|
function c() {
|
|
5387
5410
|
this._events = new u(), this._eventsCount = 0;
|
|
@@ -5474,8 +5497,8 @@ function requireEventemitter3() {
|
|
|
5474
5497
|
var eventemitter3Exports = requireEventemitter3();
|
|
5475
5498
|
const EventEmitter = /* @__PURE__ */ getDefaultExportFromCjs(eventemitter3Exports);
|
|
5476
5499
|
class WmsLayer {
|
|
5477
|
-
constructor(i, r, u,
|
|
5478
|
-
this.ctrl = i, this.key = r, this.layer = u, this.zIndex =
|
|
5500
|
+
constructor(i, r, u, h = 1 / 0) {
|
|
5501
|
+
this.ctrl = i, this.key = r, this.layer = u, this.zIndex = h, this.ctrl.registerLayer(this);
|
|
5479
5502
|
}
|
|
5480
5503
|
show(i) {
|
|
5481
5504
|
this.ctrl.showLayer(i, this.key);
|
|
@@ -5524,18 +5547,18 @@ class WmsLayerController extends EventEmitter {
|
|
|
5524
5547
|
showLayer(r, u) {
|
|
5525
5548
|
if (!this.layerMap.has(u))
|
|
5526
5549
|
throw new Error(`Layer with key 【${u}】 is not registered`);
|
|
5527
|
-
this.showLayers.push(u), this.showLayers.sort((
|
|
5528
|
-
const l = this.layerMap.get(
|
|
5550
|
+
this.showLayers.push(u), this.showLayers.sort((h, o) => {
|
|
5551
|
+
const l = this.layerMap.get(h).zIndex, c = this.layerMap.get(o).zIndex;
|
|
5529
5552
|
return l - c;
|
|
5530
5553
|
}), this.update(r);
|
|
5531
5554
|
}
|
|
5532
5555
|
hideLayer(r, u) {
|
|
5533
|
-
const
|
|
5534
|
-
|
|
5556
|
+
const h = this.showLayers.indexOf(u);
|
|
5557
|
+
h !== -1 && (this.showLayers.splice(h, 1), this.update(r));
|
|
5535
5558
|
}
|
|
5536
5559
|
hookClickEvent(r) {
|
|
5537
5560
|
this.handler = new ScreenSpaceEventHandler(r.scene.canvas), this.handler.setInputAction(async (u) => {
|
|
5538
|
-
const
|
|
5561
|
+
const h = r.scene, o = h.camera.getPickRay(u.position), l = await h.imageryLayers.pickImageryLayerFeatures(o, r.scene);
|
|
5539
5562
|
this.emit("click", l);
|
|
5540
5563
|
}, ScreenSpaceEventType.LEFT_CLICK);
|
|
5541
5564
|
}
|
|
@@ -5581,11 +5604,11 @@ const createShipIconUrl = memoize(
|
|
|
5581
5604
|
(s, i) => `${s},${i}`
|
|
5582
5605
|
), createShipIconV2 = memoize(
|
|
5583
5606
|
(s) => {
|
|
5584
|
-
const i = s.designBeam, r = s.designLength, u = s.aisFromBow != null && s.aisFromCenter != null ? { x: s.aisFromCenter, y: s.designLength - s.aisFromBow } : { x: 0, y: r / 2 },
|
|
5585
|
-
C${
|
|
5586
|
-
V${-
|
|
5587
|
-
C${i / 2 + u.x} ${u.y -
|
|
5588
|
-
C${-2 + u.x} ${-r + u.y} ${-i / 2 + u.x} ${u.y -
|
|
5607
|
+
const i = s.designBeam, r = s.designLength, u = s.aisFromBow != null && s.aisFromCenter != null ? { x: s.aisFromCenter, y: s.designLength - s.aisFromBow } : { x: 0, y: r / 2 }, h = `${i / 2 + u.x} ${u.y}`, o = `${-i / 2 + u.x} ${u.y}`, l = `${u.x} ${u.y}`, c = `${u.x} ${-r + u.y}`, d = Math.floor(r * 4 / 5), a = Math.floor((r - d) * 2 / 3), m = `M${l}
|
|
5608
|
+
C${h} ${h} ${i / 2 + u.x} ${u.y - 3}
|
|
5609
|
+
V${-d + u.y}
|
|
5610
|
+
C${i / 2 + u.x} ${u.y - d - a} ${2 + u.x} ${-r + u.y} ${c}
|
|
5611
|
+
C${-2 + u.x} ${-r + u.y} ${-i / 2 + u.x} ${u.y - d - a} ${-i / 2 + u.x} ${-d + u.y}
|
|
5589
5612
|
V${-3 + u.y}
|
|
5590
5613
|
C${o} ${o} ${l}`, y = Math.max(Math.abs(i / 2 + u.x), Math.abs(-i / 2 + u.x)), g = Math.max(
|
|
5591
5614
|
Math.abs(-r + u.y + (s.isMoving ? -5 : 0)),
|
|
@@ -5673,8 +5696,8 @@ const createShipIconUrl = memoize(
|
|
|
5673
5696
|
// 油船
|
|
5674
5697
|
]);
|
|
5675
5698
|
function createAlphaSampled(s) {
|
|
5676
|
-
const i = new Cesium.SampledProperty(Cesium.Color), r = (s == null ? void 0 : s.startTime) ?? Cesium.JulianDate.now(), u = Cesium.JulianDate.addMinutes(r, 1, new Cesium.JulianDate()),
|
|
5677
|
-
return i.addSample(r, l.withAlpha(1)), i.addSample(u, l.withAlpha(1)), i.addSample(
|
|
5699
|
+
const i = new Cesium.SampledProperty(Cesium.Color), r = (s == null ? void 0 : s.startTime) ?? Cesium.JulianDate.now(), u = Cesium.JulianDate.addMinutes(r, 1, new Cesium.JulianDate()), h = Cesium.JulianDate.addMinutes(r, 5, new Cesium.JulianDate()), o = Cesium.JulianDate.fromIso8601("2100-01-01T00:00:00Z"), l = (s == null ? void 0 : s.color) ?? Cesium.Color.WHITE;
|
|
5700
|
+
return i.addSample(r, l.withAlpha(1)), i.addSample(u, l.withAlpha(1)), i.addSample(h, l.withAlpha(0.2)), i.addSample(o, l.withAlpha(0.1)), i;
|
|
5678
5701
|
}
|
|
5679
5702
|
function getHideAfterFiveMinutesProperty(s) {
|
|
5680
5703
|
const i = s ?? Cesium.JulianDate.now(), r = Cesium.JulianDate.addMinutes(i, 5, new Cesium.JulianDate());
|
|
@@ -5707,17 +5730,17 @@ class ShipLayer extends EventEmitter {
|
|
|
5707
5730
|
}
|
|
5708
5731
|
/**渲染feature */
|
|
5709
5732
|
renderFeature(r) {
|
|
5710
|
-
var
|
|
5711
|
-
const u = String(r.id),
|
|
5712
|
-
|
|
5733
|
+
var d, a;
|
|
5734
|
+
const u = String(r.id), h = new Cesium.SampledPositionProperty();
|
|
5735
|
+
h.backwardExtrapolationType = Cesium.ExtrapolationType.HOLD, h.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
|
|
5713
5736
|
const o = Cesium.Cartesian3.fromDegrees(
|
|
5714
5737
|
r.geometry.coordinates[0],
|
|
5715
5738
|
r.geometry.coordinates[1]
|
|
5716
5739
|
);
|
|
5717
|
-
|
|
5740
|
+
h.addSample(((d = this._viewer) == null ? void 0 : d.clock.currentTime) ?? Cesium.JulianDate.now(), o);
|
|
5718
5741
|
const l = ((a = r.properties) == null ? void 0 : a.courseOverGroundTrue) ?? 0, c = new Cesium.Entity({
|
|
5719
5742
|
id: u,
|
|
5720
|
-
position:
|
|
5743
|
+
position: h,
|
|
5721
5744
|
orientation: new Cesium.ConstantProperty(
|
|
5722
5745
|
Cesium.Transforms.headingPitchRollQuaternion(
|
|
5723
5746
|
o,
|
|
@@ -5730,10 +5753,10 @@ class ShipLayer extends EventEmitter {
|
|
|
5730
5753
|
}
|
|
5731
5754
|
/**更新or新增feature */
|
|
5732
5755
|
update(r) {
|
|
5733
|
-
var
|
|
5756
|
+
var h, o, l, c, d, a, m, y;
|
|
5734
5757
|
const u = this.db.entities.getById(String(r.id));
|
|
5735
5758
|
if (u) {
|
|
5736
|
-
const g = this.shadowEntityMap.get(u), p = ((
|
|
5759
|
+
const g = this.shadowEntityMap.get(u), p = ((h = r.properties) == null ? void 0 : h.shipTypeId) ?? -1, v = shipTypeColorMap.get(p) ?? shipTypeColorMap.get(-1), [b, _] = r.geometry.coordinates, T = ((o = this._viewer) == null ? void 0 : o.clock.currentTime) ?? Cesium.JulianDate.now(), w = (l = u.position) == null ? void 0 : l.getValue(T), x = Cesium.JulianDate.addSeconds(T, 3, new Cesium.JulianDate()), O = Cesium.Cartesian3.fromDegrees(b, _), E = new Cesium.SampledPositionProperty();
|
|
5737
5760
|
if (E.backwardExtrapolationType = Cesium.ExtrapolationType.HOLD, E.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD, E instanceof Cesium.SampledPositionProperty && (E.addSample(
|
|
5738
5761
|
Cesium.JulianDate.addSeconds(T, 1, new Cesium.JulianDate()),
|
|
5739
5762
|
w ?? O
|
|
@@ -5744,17 +5767,17 @@ class ShipLayer extends EventEmitter {
|
|
|
5744
5767
|
if (C !== D && (u.billboard && (u.billboard.image = new Cesium.ConstantProperty(
|
|
5745
5768
|
createShipIconUrl(v, D)
|
|
5746
5769
|
)), g != null && g.plane)) {
|
|
5747
|
-
const I = ((c = r.properties) == null ? void 0 : c.designBeam) ?? 8,
|
|
5770
|
+
const I = ((c = r.properties) == null ? void 0 : c.designBeam) ?? 8, M = ((d = r.properties) == null ? void 0 : d.designLength) ?? 20, q = createShipIconV2({
|
|
5748
5771
|
color: v,
|
|
5749
5772
|
isMoving: D,
|
|
5750
5773
|
...r.properties,
|
|
5751
5774
|
designBeam: I,
|
|
5752
|
-
designLength:
|
|
5775
|
+
designLength: M
|
|
5753
5776
|
}), F = (a = g.plane) == null ? void 0 : a.material;
|
|
5754
5777
|
F && (F.image = new Cesium.ConstantProperty(q.url), g.plane.dimensions = new Cesium.ConstantProperty(
|
|
5755
|
-
new Cesium.Cartesian2(I * q.scale.x,
|
|
5778
|
+
new Cesium.Cartesian2(I * q.scale.x, M * q.scale.y)
|
|
5756
5779
|
)), g.plane.dimensions = new Cesium.CallbackProperty(
|
|
5757
|
-
() => new Cesium.Cartesian2(I * q.scale.x,
|
|
5780
|
+
() => new Cesium.Cartesian2(I * q.scale.x, M * q.scale.y),
|
|
5758
5781
|
!0
|
|
5759
5782
|
);
|
|
5760
5783
|
}
|
|
@@ -5792,13 +5815,13 @@ class ShipLayer extends EventEmitter {
|
|
|
5792
5815
|
// 判定移动的速度阈值(米/秒)
|
|
5793
5816
|
renderEntity(r) {
|
|
5794
5817
|
var m, y, g, p, v, b, _;
|
|
5795
|
-
const u = (m = r.properties) == null ? void 0 : m.getValue(),
|
|
5818
|
+
const u = (m = r.properties) == null ? void 0 : m.getValue(), h = (u == null ? void 0 : u.shipTypeId) ?? -1, o = shipTypeColorMap.get(h) ?? shipTypeColorMap.get(-1), l = Number((u == null ? void 0 : u.speedOverGround) ?? 0), c = u != null && u.updateTime ? new Date(u.updateTime) : /* @__PURE__ */ new Date(), d = Cesium.JulianDate.fromDate(c), a = createShipIconUrl(o, l > this.IS_MOVING_THRESHOLD);
|
|
5796
5819
|
r.point = new Cesium.PointGraphics({
|
|
5797
5820
|
pixelSize: 4,
|
|
5798
5821
|
color: Cesium.Color.fromCssColorString("#8AF22C"),
|
|
5799
5822
|
disableDepthTestDistance: 3e6,
|
|
5800
5823
|
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(15e3),
|
|
5801
|
-
show: getHideAfterFiveMinutesProperty(
|
|
5824
|
+
show: getHideAfterFiveMinutesProperty(d)
|
|
5802
5825
|
}), r.billboard = new Cesium.BillboardGraphics({
|
|
5803
5826
|
image: a,
|
|
5804
5827
|
width: 14,
|
|
@@ -5807,7 +5830,7 @@ class ShipLayer extends EventEmitter {
|
|
|
5807
5830
|
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(4e3, 15e3),
|
|
5808
5831
|
pixelOffset: new Cesium.Cartesian2(0, 0),
|
|
5809
5832
|
alignedAxis: Cesium.Cartesian3.UNIT_Z,
|
|
5810
|
-
color: createAlphaSampled({ startTime:
|
|
5833
|
+
color: createAlphaSampled({ startTime: d }),
|
|
5811
5834
|
// 设置透明度
|
|
5812
5835
|
rotation: new Cesium.ConstantProperty(
|
|
5813
5836
|
(g = (y = r.properties) == null ? void 0 : y.getValue()) != null && g.courseOverGroundTrue ? -1 * r.properties.getValue().courseOverGroundTrue : 0
|
|
@@ -5829,7 +5852,7 @@ class ShipLayer extends EventEmitter {
|
|
|
5829
5852
|
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
|
5830
5853
|
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 15e3),
|
|
5831
5854
|
disableDepthTestDistance: 5e3,
|
|
5832
|
-
show: getHideAfterFiveMinutesProperty(
|
|
5855
|
+
show: getHideAfterFiveMinutesProperty(d)
|
|
5833
5856
|
}), this.createShipPlane(r);
|
|
5834
5857
|
}
|
|
5835
5858
|
createShipPlane(r) {
|
|
@@ -5841,16 +5864,16 @@ class ShipLayer extends EventEmitter {
|
|
|
5841
5864
|
properties: r.properties
|
|
5842
5865
|
});
|
|
5843
5866
|
this.shadowEntityMap.set(r, u), this.db.entities.add(u);
|
|
5844
|
-
const
|
|
5867
|
+
const h = (p = r.properties) == null ? void 0 : p.getValue(), o = h != null && h.updateTime ? new Date(h.updateTime) : /* @__PURE__ */ new Date(), l = Cesium.JulianDate.fromDate(o), c = Number((h == null ? void 0 : h.speedOverGround) ?? 0), d = (h == null ? void 0 : h.designLength) ?? 20, a = (h == null ? void 0 : h.designBeam) ?? 8, m = (h == null ? void 0 : h.shipTypeId) ?? -1, y = shipTypeColorMap.get(m) ?? shipTypeColorMap.get(-1), g = createShipIconV2({
|
|
5845
5868
|
color: y,
|
|
5846
5869
|
isMoving: c > this.IS_MOVING_THRESHOLD,
|
|
5847
|
-
...
|
|
5848
|
-
designBeam: (
|
|
5849
|
-
designLength: (
|
|
5870
|
+
...h,
|
|
5871
|
+
designBeam: (h == null ? void 0 : h.designBeam) ?? 8,
|
|
5872
|
+
designLength: (h == null ? void 0 : h.designLength) ?? 20
|
|
5850
5873
|
});
|
|
5851
5874
|
u.plane = new Cesium.PlaneGraphics({
|
|
5852
5875
|
plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Z, 0),
|
|
5853
|
-
dimensions: new Cesium.Cartesian2(a * g.scale.x,
|
|
5876
|
+
dimensions: new Cesium.Cartesian2(a * g.scale.x, d * g.scale.y),
|
|
5854
5877
|
show: new Cesium.CallbackProperty(() => {
|
|
5855
5878
|
var T;
|
|
5856
5879
|
if (!this._viewer) return !0;
|
|
@@ -5869,13 +5892,13 @@ class ShipLayer extends EventEmitter {
|
|
|
5869
5892
|
}
|
|
5870
5893
|
hideEntityByCondition(r) {
|
|
5871
5894
|
this.hookFilterEntityFn && this.off("createEntity", this.hookFilterEntityFn), this.hookFilterEntityFn = (u) => {
|
|
5872
|
-
const
|
|
5873
|
-
u.show =
|
|
5895
|
+
const h = (r == null ? void 0 : r(u)) ?? !0;
|
|
5896
|
+
u.show = h;
|
|
5874
5897
|
const o = this.shadowEntityMap.get(u);
|
|
5875
|
-
o && (o.show =
|
|
5898
|
+
o && (o.show = h);
|
|
5876
5899
|
}, this.db.entities.values.forEach((u) => {
|
|
5877
|
-
var
|
|
5878
|
-
(
|
|
5900
|
+
var h;
|
|
5901
|
+
(h = this.hookFilterEntityFn) == null || h.call(this, u);
|
|
5879
5902
|
}), r && this.on("createEntity", this.hookFilterEntityFn);
|
|
5880
5903
|
}
|
|
5881
5904
|
}
|
|
@@ -5886,18 +5909,18 @@ new Array(4);
|
|
|
5886
5909
|
var e$2 = [], t$2 = [];
|
|
5887
5910
|
function n$2(s, i) {
|
|
5888
5911
|
if (s && typeof document < "u") {
|
|
5889
|
-
var r, u = i.prepend === !0 ? "prepend" : "append",
|
|
5890
|
-
if (
|
|
5912
|
+
var r, u = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
|
|
5913
|
+
if (h) {
|
|
5891
5914
|
var l = e$2.indexOf(o);
|
|
5892
5915
|
l === -1 && (l = e$2.push(o) - 1, t$2[l] = {}), r = t$2[l] && t$2[l][u] ? t$2[l][u] : t$2[l][u] = c();
|
|
5893
5916
|
} else r = c();
|
|
5894
5917
|
s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
|
|
5895
5918
|
}
|
|
5896
5919
|
function c() {
|
|
5897
|
-
var
|
|
5898
|
-
if (
|
|
5920
|
+
var d = document.createElement("style");
|
|
5921
|
+
if (d.setAttribute("type", "text/css"), i.attributes) for (var a = Object.keys(i.attributes), m = 0; m < a.length; m++) d.setAttribute(a[m], i.attributes[a[m]]);
|
|
5899
5922
|
var y = u === "prepend" ? "afterbegin" : "beforeend";
|
|
5900
|
-
return o.insertAdjacentElement(y,
|
|
5923
|
+
return o.insertAdjacentElement(y, d), d;
|
|
5901
5924
|
}
|
|
5902
5925
|
}
|
|
5903
5926
|
var css$2 = '.cesium-tool-tip{background:rgba(0,0,0,.6);border-radius:4px;color:#fff;left:0;line-height:30px;min-height:30px;min-width:100px;padding:0 10px;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-1}.cesium-tool-tip:before{border-bottom:10px solid transparent;border-right:10px solid rgba(0,0,0,.6);border-top:10px solid transparent;content:"";display:block;left:-10px;pointer-events:none;position:absolute;top:calc(50% - 10px)}';
|
|
@@ -5919,11 +5942,11 @@ class Popup {
|
|
|
5919
5942
|
z(this, "setPosition", () => {
|
|
5920
5943
|
if (this._position && this._viewer && this._position) {
|
|
5921
5944
|
if (this._viewer.scene.mode === SceneMode.SCENE3D) {
|
|
5922
|
-
const u = this._viewer.scene.camera.position,
|
|
5945
|
+
const u = this._viewer.scene.camera.position, h = new BoundingSphere(
|
|
5923
5946
|
new Cartesian3(0, 0, 0),
|
|
5924
5947
|
635e4
|
|
5925
5948
|
);
|
|
5926
|
-
if (!new Occluder(
|
|
5949
|
+
if (!new Occluder(h, u).isPointVisible(this._position)) {
|
|
5927
5950
|
this.switchElementShow(!1);
|
|
5928
5951
|
return;
|
|
5929
5952
|
}
|
|
@@ -5936,16 +5959,16 @@ class Popup {
|
|
|
5936
5959
|
if (this._screenPosition && this._screenPosition.x === i.x && this._screenPosition.y === i.y)
|
|
5937
5960
|
return;
|
|
5938
5961
|
this.switchElementShow(!0);
|
|
5939
|
-
const u = i.x - r.clientWidth / 2 + this._offset[0],
|
|
5940
|
-
r.style.left = `${u}px`, r.style.top = `${
|
|
5962
|
+
const u = i.x - r.clientWidth / 2 + this._offset[0], h = i.y - r.clientHeight + this._offset[1];
|
|
5963
|
+
r.style.left = `${u}px`, r.style.top = `${h}px`, this._screenPosition = i;
|
|
5941
5964
|
}
|
|
5942
5965
|
}
|
|
5943
5966
|
});
|
|
5944
5967
|
this._viewer = i, this._options = r;
|
|
5945
|
-
const { position: u, element:
|
|
5946
|
-
if (!
|
|
5968
|
+
const { position: u, element: h, offset: o } = r;
|
|
5969
|
+
if (!h)
|
|
5947
5970
|
throw Error("no element!");
|
|
5948
|
-
this._position = u ? Cartesian3.fromDegrees(u[0], u[1], u[2]) : null, this._element =
|
|
5971
|
+
this._position = u ? Cartesian3.fromDegrees(u[0], u[1], u[2]) : null, this._element = h, this._offset = [(o == null ? void 0 : o[0]) ?? 0, (o == null ? void 0 : o[1]) ?? 0], this.addMapListener();
|
|
5949
5972
|
}
|
|
5950
5973
|
set position(i) {
|
|
5951
5974
|
if (!i) {
|
|
@@ -5977,18 +6000,18 @@ class Popup {
|
|
|
5977
6000
|
var e$1 = [], t$1 = [];
|
|
5978
6001
|
function n$1(s, i) {
|
|
5979
6002
|
if (s && typeof document < "u") {
|
|
5980
|
-
var r, u = i.prepend === !0 ? "prepend" : "append",
|
|
5981
|
-
if (
|
|
6003
|
+
var r, u = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
|
|
6004
|
+
if (h) {
|
|
5982
6005
|
var l = e$1.indexOf(o);
|
|
5983
6006
|
l === -1 && (l = e$1.push(o) - 1, t$1[l] = {}), r = t$1[l] && t$1[l][u] ? t$1[l][u] : t$1[l][u] = c();
|
|
5984
6007
|
} else r = c();
|
|
5985
6008
|
s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
|
|
5986
6009
|
}
|
|
5987
6010
|
function c() {
|
|
5988
|
-
var
|
|
5989
|
-
if (
|
|
6011
|
+
var d = document.createElement("style");
|
|
6012
|
+
if (d.setAttribute("type", "text/css"), i.attributes) for (var a = Object.keys(i.attributes), m = 0; m < a.length; m++) d.setAttribute(a[m], i.attributes[a[m]]);
|
|
5990
6013
|
var y = u === "prepend" ? "afterbegin" : "beforeend";
|
|
5991
|
-
return o.insertAdjacentElement(y,
|
|
6014
|
+
return o.insertAdjacentElement(y, d), d;
|
|
5992
6015
|
}
|
|
5993
6016
|
}
|
|
5994
6017
|
var css$1 = ".cesium-compass{cursor:pointer;height:60px;pointer-events:auto;position:absolute;right:15px;top:100px;user-select:none;width:60px}.cesium-compass .out-ring{fill:rgba(23,49,71,.702);background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px;left:0;position:absolute;top:0;transition:all .3s ease;width:60px}.cesium-compass .out-ring svg{height:60px;width:60px}.cesium-compass:hover .rotation_marker svg{height:70.2px;width:70.2px}.cesium-compass .gyro{align-items:center;background:#fff;border-radius:50%;box-sizing:border-box;display:flex;height:30px;justify-content:center;margin:0 auto;padding:4px;position:relative;text-align:center;top:50%;transform:translateY(-50%);transition:all .3s ease;width:30px}.cesium-compass .gyro svg{height:20px;width:20px}.rotation_marker{background-repeat:no-repeat;background-size:contain;border-radius:50%;position:relative}.rotation_marker svg{height:60px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);transition:all .3s ease;width:60px}.cesium-compass .gyro-active,.cesium-compass .gyro:hover{fill:#68adfe}";
|
|
@@ -5996,18 +6019,18 @@ n$1(css$1, {});
|
|
|
5996
6019
|
var e = [], t = [];
|
|
5997
6020
|
function n(s, i) {
|
|
5998
6021
|
if (s && typeof document < "u") {
|
|
5999
|
-
var r, u = i.prepend === !0 ? "prepend" : "append",
|
|
6000
|
-
if (
|
|
6022
|
+
var r, u = i.prepend === !0 ? "prepend" : "append", h = i.singleTag === !0, o = typeof i.container == "string" ? document.querySelector(i.container) : document.getElementsByTagName("head")[0];
|
|
6023
|
+
if (h) {
|
|
6001
6024
|
var l = e.indexOf(o);
|
|
6002
6025
|
l === -1 && (l = e.push(o) - 1, t[l] = {}), r = t[l] && t[l][u] ? t[l][u] : t[l][u] = c();
|
|
6003
6026
|
} else r = c();
|
|
6004
6027
|
s.charCodeAt(0) === 65279 && (s = s.substring(1)), r.styleSheet ? r.styleSheet.cssText += s : r.appendChild(document.createTextNode(s));
|
|
6005
6028
|
}
|
|
6006
6029
|
function c() {
|
|
6007
|
-
var
|
|
6008
|
-
if (
|
|
6030
|
+
var d = document.createElement("style");
|
|
6031
|
+
if (d.setAttribute("type", "text/css"), i.attributes) for (var a = Object.keys(i.attributes), m = 0; m < a.length; m++) d.setAttribute(a[m], i.attributes[a[m]]);
|
|
6009
6032
|
var y = u === "prepend" ? "afterbegin" : "beforeend";
|
|
6010
|
-
return o.insertAdjacentElement(y,
|
|
6033
|
+
return o.insertAdjacentElement(y, d), d;
|
|
6011
6034
|
}
|
|
6012
6035
|
}
|
|
6013
6036
|
var css = ".cesium-zoom-controller{border-radius:100px;box-sizing:border-box;display:flex;flex-direction:column;line-height:1.2rem;pointer-events:auto;position:absolute;right:30px;text-align:center;top:187px;user-select:none}.cesium-zoom-controller .refresh,.cesium-zoom-controller .zoom-in,.cesium-zoom-controller .zoom-out{border-radius:14%;margin-bottom:5px}.cesium-zoom-controller .cesium-button{background:#2a2e39;border:none;margin-right:0;transition:all .3s cubic-bezier(.645,.045,.355,1);transition-delay:0s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.645,.045,.355,1)}.cesium-zoom-controller .cesium-button:hover{background:#48b;box-shadow:none}.cesium-zoom-controller .cesium-button:active{fill:#edffff;background:#adf;color:#edffff}.cesium-zoom-controller .cesium-toolbar-button{align-items:center;display:flex;height:30px;justify-content:center;width:30px}";
|
|
@@ -6219,18 +6242,18 @@ function requireHeatmap() {
|
|
|
6219
6242
|
for (var v = this._min = _.min, b = this._max = _.max, _ = _.data || [], T = _.length, w = 1 - this._blur; T--; ) {
|
|
6220
6243
|
var x = _[T], O = x.x, E = x.y, R = x.radius, S = Math.min(x.value, b), P = O - R, C = E - R, D = this.shadowCtx, I;
|
|
6221
6244
|
this._templates[R] ? I = this._templates[R] : this._templates[R] = I = m(R, w);
|
|
6222
|
-
var
|
|
6223
|
-
D.globalAlpha =
|
|
6245
|
+
var M = (S - v) / (b - v);
|
|
6246
|
+
D.globalAlpha = M < 0.01 ? 0.01 : M, D.drawImage(I, P, C), P < this._renderBoundaries[0] && (this._renderBoundaries[0] = P), C < this._renderBoundaries[1] && (this._renderBoundaries[1] = C), P + 2 * R > this._renderBoundaries[2] && (this._renderBoundaries[2] = P + 2 * R), C + 2 * R > this._renderBoundaries[3] && (this._renderBoundaries[3] = C + 2 * R);
|
|
6224
6247
|
}
|
|
6225
6248
|
},
|
|
6226
6249
|
_colorize: function() {
|
|
6227
6250
|
var p = this._renderBoundaries[0], v = this._renderBoundaries[1], b = this._renderBoundaries[2] - p, _ = this._renderBoundaries[3] - v, T = this._width, w = this._height, x = this._opacity, O = this._maxOpacity, E = this._minOpacity, R = this._useGradientOpacity;
|
|
6228
6251
|
p < 0 && (p = 0), v < 0 && (v = 0), p + b > T && (b = T - p), v + _ > w && (_ = w - v);
|
|
6229
6252
|
for (var S = this.shadowCtx.getImageData(p, v, b, _), P = S.data, C = P.length, D = this._palette, I = 3; I < C; I += 4) {
|
|
6230
|
-
var
|
|
6253
|
+
var M = P[I], q = M * 4;
|
|
6231
6254
|
if (q) {
|
|
6232
6255
|
var F;
|
|
6233
|
-
x > 0 ? F = x :
|
|
6256
|
+
x > 0 ? F = x : M < O ? M < E ? F = E : F = M : F = O, P[I - 3] = D[q], P[I - 2] = D[q + 1], P[I - 1] = D[q + 2], P[I] = R ? D[q + 3] : F;
|
|
6234
6257
|
}
|
|
6235
6258
|
}
|
|
6236
6259
|
this.ctx.putImageData(S, p, v), this._renderBoundaries = [1e3, 1e3, 0, 0];
|
|
@@ -6243,17 +6266,17 @@ function requireHeatmap() {
|
|
|
6243
6266
|
return this.canvas.toDataURL();
|
|
6244
6267
|
}
|
|
6245
6268
|
}, g;
|
|
6246
|
-
}(),
|
|
6269
|
+
}(), h = function() {
|
|
6247
6270
|
var a = !1;
|
|
6248
6271
|
return i.defaultRenderer === "canvas2d" && (a = u), a;
|
|
6249
6272
|
}(), o = {
|
|
6250
6273
|
merge: function() {
|
|
6251
|
-
for (var
|
|
6274
|
+
for (var d = {}, a = arguments.length, m = 0; m < a; m++) {
|
|
6252
6275
|
var y = arguments[m];
|
|
6253
6276
|
for (var g in y)
|
|
6254
|
-
|
|
6277
|
+
d[g] = y[g];
|
|
6255
6278
|
}
|
|
6256
|
-
return
|
|
6279
|
+
return d;
|
|
6257
6280
|
}
|
|
6258
6281
|
}, l = function() {
|
|
6259
6282
|
var a = function() {
|
|
@@ -6296,7 +6319,7 @@ function requireHeatmap() {
|
|
|
6296
6319
|
} else
|
|
6297
6320
|
throw new Error("Plugin '" + p + "' not found. Maybe it was not registered.");
|
|
6298
6321
|
} else
|
|
6299
|
-
this._renderer = new
|
|
6322
|
+
this._renderer = new h(g), this._store = new r(g);
|
|
6300
6323
|
m(this);
|
|
6301
6324
|
}
|
|
6302
6325
|
return y.prototype = {
|
|
@@ -6332,11 +6355,11 @@ function requireHeatmap() {
|
|
|
6332
6355
|
}
|
|
6333
6356
|
}, y;
|
|
6334
6357
|
}(), c = {
|
|
6335
|
-
create: function(
|
|
6336
|
-
return new l(
|
|
6358
|
+
create: function(d) {
|
|
6359
|
+
return new l(d);
|
|
6337
6360
|
},
|
|
6338
|
-
register: function(
|
|
6339
|
-
i.plugins[
|
|
6361
|
+
register: function(d, a) {
|
|
6362
|
+
i.plugins[d] = a;
|
|
6340
6363
|
}
|
|
6341
6364
|
};
|
|
6342
6365
|
return c;
|
|
@@ -6356,10 +6379,10 @@ const G = class G extends EventEmitter {
|
|
|
6356
6379
|
var c;
|
|
6357
6380
|
const u = r.element;
|
|
6358
6381
|
u.style.position = "absolute";
|
|
6359
|
-
const
|
|
6360
|
-
l && (l.destroy(),
|
|
6382
|
+
const h = r.viewer.container, o = () => {
|
|
6383
|
+
l && (l.destroy(), h.removeChild(u), this.popupMap.delete(r.id), this.emit("onUnmount", r.id));
|
|
6361
6384
|
};
|
|
6362
|
-
|
|
6385
|
+
h.appendChild(u), this.emit("onMount", r.id), (c = this.popupMap.get(r.id)) == null || c.destroy();
|
|
6363
6386
|
const l = new Popup(r.viewer, {
|
|
6364
6387
|
position: r.position,
|
|
6365
6388
|
offset: r.offset ?? [0, 0],
|
|
@@ -6420,5 +6443,6 @@ export {
|
|
|
6420
6443
|
createTdtProvider,
|
|
6421
6444
|
createTdtTerrain,
|
|
6422
6445
|
flyToCameraParams,
|
|
6446
|
+
invertToCanvas,
|
|
6423
6447
|
saveCameraParams
|
|
6424
6448
|
};
|