@ylink-sdk/mobile-web 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3979 @@
1
+ /*!
2
+ * protobuf.js v6.11.0 (c) 2016, daniel wirtz
3
+ * compiled thu, 29 apr 2021 02:20:46 utc
4
+ * licensed under the bsd-3-clause license
5
+ * see: https://github.com/dcodeio/protobuf.js for details
6
+ */
7
+ !(function (Q) {
8
+ 'use strict';
9
+ var r, e, t, i;
10
+ (r = {
11
+ 1: [
12
+ function (t, i, n) {
13
+ i.exports = function (t, i) {
14
+ var n = Array(arguments.length - 1),
15
+ s = 0,
16
+ r = 2,
17
+ o = !0;
18
+ for (; r < arguments.length; ) n[s++] = arguments[r++];
19
+ return new Promise(function (r, e) {
20
+ n[s] = function (t) {
21
+ if (o)
22
+ if (((o = !1), t)) e(t);
23
+ else {
24
+ for (var i = Array(arguments.length - 1), n = 0; n < i.length; )
25
+ i[n++] = arguments[n];
26
+ r.apply(null, i);
27
+ }
28
+ };
29
+ try {
30
+ t.apply(i || null, n);
31
+ } catch (t) {
32
+ o && ((o = !1), e(t));
33
+ }
34
+ });
35
+ };
36
+ },
37
+ {}
38
+ ],
39
+ 2: [
40
+ function (t, i, n) {
41
+ n.length = function (t) {
42
+ var i = t.length;
43
+ if (!i) return 0;
44
+ for (var n = 0; 1 < --i % 4 && '=' == (t[0 | i] || ''); ) ++n;
45
+ return Math.ceil(3 * t.length) / 4 - n;
46
+ };
47
+ for (var h = Array(64), f = Array(123), r = 0; r < 64; )
48
+ f[(h[r] = r < 26 ? r + 65 : r < 52 ? r + 71 : r < 62 ? r - 4 : (r - 59) | 43)] = r++;
49
+ n.encode = function (t, i, n) {
50
+ for (var r, e = null, s = [], o = 0, u = 0; i < n; ) {
51
+ var f = t[i++];
52
+ switch (u) {
53
+ case 0:
54
+ (s[o++] = h[f >> 2]), (r = (3 & f) << 4), (u = 1);
55
+ break;
56
+ case 1:
57
+ (s[o++] = h[r | (f >> 4)]), (r = (15 & f) << 2), (u = 2);
58
+ break;
59
+ case 2:
60
+ (s[o++] = h[r | (f >> 6)]), (s[o++] = h[63 & f]), (u = 0);
61
+ }
62
+ 8191 < o && ((e = e || []).push(String.fromCharCode.apply(String, s)), (o = 0));
63
+ }
64
+ return (
65
+ u && ((s[o++] = h[r]), (s[o++] = 61), 1 === u && (s[o++] = 61)),
66
+ e
67
+ ? (o && e.push(String.fromCharCode.apply(String, s.slice(0, o))), e.join(''))
68
+ : String.fromCharCode.apply(String, s.slice(0, o))
69
+ );
70
+ };
71
+ var a = 'invalid encoding';
72
+ (n.decode = function (t, i, n) {
73
+ for (var r, e = n, s = 0, o = 0; o < t.length; ) {
74
+ var u = t.charCodeAt(o++);
75
+ if (61 == u && 1 < s) break;
76
+ if ((u = f[u]) === Q) throw Error(a);
77
+ switch (s) {
78
+ case 0:
79
+ (r = u), (s = 1);
80
+ break;
81
+ case 1:
82
+ (i[n++] = (r << 2) | ((48 & u) >> 4)), (r = u), (s = 2);
83
+ break;
84
+ case 2:
85
+ (i[n++] = ((15 & r) << 4) | ((60 & u) >> 2)), (r = u), (s = 3);
86
+ break;
87
+ case 3:
88
+ (i[n++] = ((3 & r) << 6) | u), (s = 0);
89
+ }
90
+ }
91
+ if (1 === s) throw Error(a);
92
+ return n - e;
93
+ }),
94
+ (n.test = function (t) {
95
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
96
+ });
97
+ },
98
+ {}
99
+ ],
100
+ 3: [
101
+ function (t, i, n) {
102
+ function c(i, n) {
103
+ 'string' == typeof i && ((n = i), (i = Q));
104
+ var f = [];
105
+ function h(t) {
106
+ if ('string' != typeof t) {
107
+ var i = a();
108
+ if ((c.verbose && console.log('codegen: ' + i), (i = 'return ' + i), t)) {
109
+ for (
110
+ var n = Object.keys(t), r = Array(n.length + 1), e = Array(n.length), s = 0;
111
+ s < n.length;
112
+
113
+ )
114
+ (r[s] = n[s]), (e[s] = t[n[s++]]);
115
+ return (r[s] = i), Function.apply(null, r).apply(null, e);
116
+ }
117
+ return Function(i)();
118
+ }
119
+ for (var o = Array(arguments.length - 1), u = 0; u < o.length; ) o[u] = arguments[++u];
120
+ if (
121
+ ((u = 0),
122
+ (t = t.replace(/%([%dfijs])/g, function (t, i) {
123
+ var n = o[u++];
124
+ switch (i) {
125
+ case 'd':
126
+ case 'f':
127
+ return '' + +('' + n);
128
+ case 'i':
129
+ return '' + Math.floor(n);
130
+ case 'j':
131
+ return JSON.stringify(n);
132
+ case 's':
133
+ return '' + n;
134
+ }
135
+ return '%';
136
+ })),
137
+ u !== o.length)
138
+ )
139
+ throw Error('parameter count mismatch');
140
+ return f.push(t), h;
141
+ }
142
+ function a(t) {
143
+ return (
144
+ 'function ' +
145
+ (t || n || '') +
146
+ '(' +
147
+ ((i && i.join(',')) || '') +
148
+ '){\n ' +
149
+ f.join('\n ') +
150
+ '\n}'
151
+ );
152
+ }
153
+ return (h.toString = a), h;
154
+ }
155
+ (i.exports = c).verbose = !1;
156
+ },
157
+ {}
158
+ ],
159
+ 4: [
160
+ function (t, i, n) {
161
+ function r() {
162
+ this.i = {};
163
+ }
164
+ ((i.exports = r).prototype.on = function (t, i, n) {
165
+ return (this.i[t] || (this.i[t] = [])).push({ fn: i, ctx: n || this }), this;
166
+ }),
167
+ (r.prototype.off = function (t, i) {
168
+ if (t === Q) this.i = {};
169
+ else if (i === Q) this.i[t] = [];
170
+ else
171
+ for (var n = this.i[t], r = 0; r < n.length; ) n[r].fn === i ? n.splice(r, 1) : ++r;
172
+ return this;
173
+ }),
174
+ (r.prototype.emit = function (t) {
175
+ var i = this.i[t];
176
+ if (i) {
177
+ for (var n = [], r = 1; r < arguments.length; ) n.push(arguments[r++]);
178
+ for (r = 0; r < i.length; ) i[r].fn.apply(i[r++].ctx, n);
179
+ }
180
+ return this;
181
+ });
182
+ },
183
+ {}
184
+ ],
185
+ 5: [
186
+ function (t, i, n) {
187
+ i.exports = u;
188
+ var s = t(1),
189
+ o = t(7)('fs');
190
+ function u(n, r, e) {
191
+ return (
192
+ (r = 'function' == typeof r ? ((e = r), {}) : r || {}),
193
+ e
194
+ ? !r.xhr && o && o.readFile
195
+ ? o.readFile(n, function (t, i) {
196
+ return t && 'undefined' != typeof XMLHttpRequest
197
+ ? u.xhr(n, r, e)
198
+ : t
199
+ ? e(t)
200
+ : e(null, r.binary ? i : i.toString('utf8'));
201
+ })
202
+ : u.xhr(n, r, e)
203
+ : s(u, this, n, r)
204
+ );
205
+ }
206
+ u.xhr = function (t, n, r) {
207
+ var e = new XMLHttpRequest();
208
+ (e.onreadystatechange = function () {
209
+ if (4 !== e.readyState) return Q;
210
+ if (0 !== e.status && 200 !== e.status) return r(Error('status ' + e.status));
211
+ if (n.binary) {
212
+ if (!(t = e.response))
213
+ for (var t = [], i = 0; i < e.responseText.length; ++i)
214
+ t.push(255 & e.responseText.charCodeAt(i));
215
+ return r(null, 'undefined' != typeof Uint8Array ? new Uint8Array(t) : t);
216
+ }
217
+ return r(null, e.responseText);
218
+ }),
219
+ n.binary &&
220
+ ('overrideMimeType' in e && e.overrideMimeType('text/plain; charset=x-user-defined'),
221
+ (e.responseType = 'arraybuffer')),
222
+ e.open('GET', t),
223
+ e.send();
224
+ };
225
+ },
226
+ { 1: 1, 7: 7 }
227
+ ],
228
+ 6: [
229
+ function (t, i, n) {
230
+ function r(t) {
231
+ function i(t, i, n, r) {
232
+ var e = i < 0 ? 1 : 0;
233
+ t(
234
+ 0 === (i = e ? -i : i)
235
+ ? 0 < 1 / i
236
+ ? 0
237
+ : 2147483648
238
+ : isNaN(i)
239
+ ? 2143289344
240
+ : 34028234663852886e22 < i
241
+ ? ((e << 31) | 2139095040) >>> 0
242
+ : i < 11754943508222875e-54
243
+ ? ((e << 31) | Math.round(i / 1401298464324817e-60)) >>> 0
244
+ : ((e << 31) |
245
+ ((127 + (e = Math.floor(Math.log(i) / Math.LN2))) << 23) |
246
+ (8388607 & Math.round(i * Math.pow(2, -e) * 8388608))) >>>
247
+ 0,
248
+ n,
249
+ r
250
+ );
251
+ }
252
+ function n(t, i, n) {
253
+ (t = t(i, n)), (i = 2 * (t >> 31) + 1), (n = (t >>> 23) & 255), (t &= 8388607);
254
+ return 255 == n
255
+ ? t
256
+ ? NaN
257
+ : (1 / 0) * i
258
+ : 0 == n
259
+ ? 1401298464324817e-60 * i * t
260
+ : i * Math.pow(2, n - 150) * (8388608 + t);
261
+ }
262
+ function r(t, i, n) {
263
+ (u[0] = t), (i[n] = f[0]), (i[n + 1] = f[1]), (i[n + 2] = f[2]), (i[n + 3] = f[3]);
264
+ }
265
+ function e(t, i, n) {
266
+ (u[0] = t), (i[n] = f[3]), (i[n + 1] = f[2]), (i[n + 2] = f[1]), (i[n + 3] = f[0]);
267
+ }
268
+ function s(t, i) {
269
+ return (f[0] = t[i]), (f[1] = t[i + 1]), (f[2] = t[i + 2]), (f[3] = t[i + 3]), u[0];
270
+ }
271
+ function o(t, i) {
272
+ return (f[3] = t[i]), (f[2] = t[i + 1]), (f[1] = t[i + 2]), (f[0] = t[i + 3]), u[0];
273
+ }
274
+ var u, f, h, a, c;
275
+ function l(t, i, n, r, e, s) {
276
+ var o,
277
+ u = r < 0 ? 1 : 0;
278
+ 0 === (r = u ? -r : r)
279
+ ? (t(0, e, s + i), t(0 < 1 / r ? 0 : 2147483648, e, s + n))
280
+ : isNaN(r)
281
+ ? (t(0, e, s + i), t(2146959360, e, s + n))
282
+ : 17976931348623157e292 < r
283
+ ? (t(0, e, s + i), t(((u << 31) | 2146435072) >>> 0, e, s + n))
284
+ : r < 22250738585072014e-324
285
+ ? (t((o = r / 5e-324) >>> 0, e, s + i),
286
+ t(((u << 31) | (o / 4294967296)) >>> 0, e, s + n))
287
+ : (t(
288
+ (4503599627370496 *
289
+ (o =
290
+ r *
291
+ Math.pow(
292
+ 2,
293
+ -(r = 1024 === (r = Math.floor(Math.log(r) / Math.LN2)) ? 1023 : r)
294
+ ))) >>>
295
+ 0,
296
+ e,
297
+ s + i
298
+ ),
299
+ t(((u << 31) | ((r + 1023) << 20) | ((1048576 * o) & 1048575)) >>> 0, e, s + n));
300
+ }
301
+ function v(t, i, n, r, e) {
302
+ (i = t(r, e + i)),
303
+ (r = t(r, e + n)),
304
+ (e = 2 * (r >> 31) + 1),
305
+ (n = (r >>> 20) & 2047),
306
+ (i = 4294967296 * (1048575 & r) + i);
307
+ return 2047 == n
308
+ ? i
309
+ ? NaN
310
+ : (1 / 0) * e
311
+ : 0 == n
312
+ ? 5e-324 * e * i
313
+ : e * Math.pow(2, n - 1075) * (i + 4503599627370496);
314
+ }
315
+ function d(t, i, n) {
316
+ (h[0] = t),
317
+ (i[n] = a[0]),
318
+ (i[n + 1] = a[1]),
319
+ (i[n + 2] = a[2]),
320
+ (i[n + 3] = a[3]),
321
+ (i[n + 4] = a[4]),
322
+ (i[n + 5] = a[5]),
323
+ (i[n + 6] = a[6]),
324
+ (i[n + 7] = a[7]);
325
+ }
326
+ function p(t, i, n) {
327
+ (h[0] = t),
328
+ (i[n] = a[7]),
329
+ (i[n + 1] = a[6]),
330
+ (i[n + 2] = a[5]),
331
+ (i[n + 3] = a[4]),
332
+ (i[n + 4] = a[3]),
333
+ (i[n + 5] = a[2]),
334
+ (i[n + 6] = a[1]),
335
+ (i[n + 7] = a[0]);
336
+ }
337
+ function b(t, i) {
338
+ return (
339
+ (a[0] = t[i]),
340
+ (a[1] = t[i + 1]),
341
+ (a[2] = t[i + 2]),
342
+ (a[3] = t[i + 3]),
343
+ (a[4] = t[i + 4]),
344
+ (a[5] = t[i + 5]),
345
+ (a[6] = t[i + 6]),
346
+ (a[7] = t[i + 7]),
347
+ h[0]
348
+ );
349
+ }
350
+ function w(t, i) {
351
+ return (
352
+ (a[7] = t[i]),
353
+ (a[6] = t[i + 1]),
354
+ (a[5] = t[i + 2]),
355
+ (a[4] = t[i + 3]),
356
+ (a[3] = t[i + 4]),
357
+ (a[2] = t[i + 5]),
358
+ (a[1] = t[i + 6]),
359
+ (a[0] = t[i + 7]),
360
+ h[0]
361
+ );
362
+ }
363
+ return (
364
+ 'undefined' != typeof Float32Array
365
+ ? ((u = new Float32Array([-0])),
366
+ (f = new Uint8Array(u.buffer)),
367
+ (c = 128 === f[3]),
368
+ (t.writeFloatLE = c ? r : e),
369
+ (t.writeFloatBE = c ? e : r),
370
+ (t.readFloatLE = c ? s : o),
371
+ (t.readFloatBE = c ? o : s))
372
+ : ((t.writeFloatLE = i.bind(null, y)),
373
+ (t.writeFloatBE = i.bind(null, m)),
374
+ (t.readFloatLE = n.bind(null, g)),
375
+ (t.readFloatBE = n.bind(null, j))),
376
+ 'undefined' != typeof Float64Array
377
+ ? ((h = new Float64Array([-0])),
378
+ (a = new Uint8Array(h.buffer)),
379
+ (c = 128 === a[7]),
380
+ (t.writeDoubleLE = c ? d : p),
381
+ (t.writeDoubleBE = c ? p : d),
382
+ (t.readDoubleLE = c ? b : w),
383
+ (t.readDoubleBE = c ? w : b))
384
+ : ((t.writeDoubleLE = l.bind(null, y, 0, 4)),
385
+ (t.writeDoubleBE = l.bind(null, m, 4, 0)),
386
+ (t.readDoubleLE = v.bind(null, g, 0, 4)),
387
+ (t.readDoubleBE = v.bind(null, j, 4, 0))),
388
+ t
389
+ );
390
+ }
391
+ function y(t, i, n) {
392
+ (i[n] = 255 & t),
393
+ (i[n + 1] = (t >>> 8) & 255),
394
+ (i[n + 2] = (t >>> 16) & 255),
395
+ (i[n + 3] = t >>> 24);
396
+ }
397
+ function m(t, i, n) {
398
+ (i[n] = t >>> 24),
399
+ (i[n + 1] = (t >>> 16) & 255),
400
+ (i[n + 2] = (t >>> 8) & 255),
401
+ (i[n + 3] = 255 & t);
402
+ }
403
+ function g(t, i) {
404
+ return (t[i] | (t[i + 1] << 8) | (t[i + 2] << 16) | (t[i + 3] << 24)) >>> 0;
405
+ }
406
+ function j(t, i) {
407
+ return ((t[i] << 24) | (t[i + 1] << 16) | (t[i + 2] << 8) | t[i + 3]) >>> 0;
408
+ }
409
+ i.exports = r(r);
410
+ },
411
+ {}
412
+ ],
413
+ 7: [
414
+ function (t, i, n) {
415
+ function r(t) {
416
+ try {
417
+ var i = eval('require')(t);
418
+ if (i && (i.length || Object.keys(i).length)) return i;
419
+ } catch (t) {}
420
+ return null;
421
+ }
422
+ i.exports = r;
423
+ },
424
+ {}
425
+ ],
426
+ 8: [
427
+ function (t, i, n) {
428
+ var n = n,
429
+ e = (n.isAbsolute = function (t) {
430
+ return /^(?:\/|\w+:)/.test(t);
431
+ }),
432
+ r = (n.normalize = function (t) {
433
+ var i = (t = t.replace(/\\/g, '/').replace(/\/{2,}/g, '/')).split('/'),
434
+ n = e(t),
435
+ t = '';
436
+ n && (t = i.shift() + '/');
437
+ for (var r = 0; r < i.length; )
438
+ '..' === i[r]
439
+ ? 0 < r && '..' !== i[r - 1]
440
+ ? i.splice(--r, 2)
441
+ : n
442
+ ? i.splice(r, 1)
443
+ : ++r
444
+ : '.' === i[r]
445
+ ? i.splice(r, 1)
446
+ : ++r;
447
+ return t + i.join('/');
448
+ });
449
+ n.resolve = function (t, i, n) {
450
+ return (
451
+ n || (i = r(i)),
452
+ !e(i) && (t = (t = !n ? r(t) : t).replace(/(?:\/|^)[^/]+$/, '')).length
453
+ ? r(t + '/' + i)
454
+ : i
455
+ );
456
+ };
457
+ },
458
+ {}
459
+ ],
460
+ 9: [
461
+ function (t, i, n) {
462
+ i.exports = function (i, n, t) {
463
+ var r = t || 8192,
464
+ e = r >>> 1,
465
+ s = null,
466
+ o = r;
467
+ return function (t) {
468
+ if (t < 1 || e < t) return i(t);
469
+ r < o + t && ((s = i(r)), (o = 0));
470
+ t = n.call(s, o, (o += t));
471
+ return 7 & o && (o = 1 + (7 | o)), t;
472
+ };
473
+ };
474
+ },
475
+ {}
476
+ ],
477
+ 10: [
478
+ function (t, i, n) {
479
+ (n.length = function (t) {
480
+ for (var i, n = 0, r = 0; r < t.length; ++r)
481
+ (i = t.charCodeAt(r)) < 128
482
+ ? (n += 1)
483
+ : i < 2048
484
+ ? (n += 2)
485
+ : 55296 == (64512 & i) && 56320 == (64512 & t.charCodeAt(r + 1))
486
+ ? (++r, (n += 4))
487
+ : (n += 3);
488
+ return n;
489
+ }),
490
+ (n.read = function (t, i, n) {
491
+ if (n - i < 1) return '';
492
+ for (var r, e = null, s = [], o = 0; i < n; )
493
+ (r = t[i++]) < 128
494
+ ? (s[o++] = r)
495
+ : 191 < r && r < 224
496
+ ? (s[o++] = ((31 & r) << 6) | (63 & t[i++]))
497
+ : 239 < r && r < 365
498
+ ? ((r =
499
+ (((7 & r) << 18) |
500
+ ((63 & t[i++]) << 12) |
501
+ ((63 & t[i++]) << 6) |
502
+ (63 & t[i++])) -
503
+ 65536),
504
+ (s[o++] = 55296 + (r >> 10)),
505
+ (s[o++] = 56320 + (1023 & r)))
506
+ : (s[o++] = ((15 & r) << 12) | ((63 & t[i++]) << 6) | (63 & t[i++])),
507
+ 8191 < o && ((e = e || []).push(String.fromCharCode.apply(String, s)), (o = 0));
508
+ return e
509
+ ? (o && e.push(String.fromCharCode.apply(String, s.slice(0, o))), e.join(''))
510
+ : String.fromCharCode.apply(String, s.slice(0, o));
511
+ }),
512
+ (n.write = function (t, i, n) {
513
+ for (var r, e, s = n, o = 0; o < t.length; ++o)
514
+ (r = t.charCodeAt(o)) < 128
515
+ ? (i[n++] = r)
516
+ : (r < 2048
517
+ ? (i[n++] = (r >> 6) | 192)
518
+ : (55296 == (64512 & r) && 56320 == (64512 & (e = t.charCodeAt(o + 1)))
519
+ ? (++o,
520
+ (i[n++] = ((r = 65536 + ((1023 & r) << 10) + (1023 & e)) >> 18) | 240),
521
+ (i[n++] = ((r >> 12) & 63) | 128))
522
+ : (i[n++] = (r >> 12) | 224),
523
+ (i[n++] = ((r >> 6) & 63) | 128)),
524
+ (i[n++] = (63 & r) | 128));
525
+ return n - s;
526
+ });
527
+ },
528
+ {}
529
+ ],
530
+ 11: [
531
+ function (t, i, n) {
532
+ i.exports = e;
533
+ var r = /\/|\./;
534
+ function e(t, i) {
535
+ r.test(t) ||
536
+ ((t = 'google/protobuf/' + t + '.proto'),
537
+ (i = { nested: { google: { nested: { protobuf: { nested: i } } } } })),
538
+ (e[t] = i);
539
+ }
540
+ e('any', {
541
+ Any: { fields: { type_url: { type: 'string', id: 1 }, value: { type: 'bytes', id: 2 } } }
542
+ }),
543
+ e('duration', {
544
+ Duration: (i = {
545
+ fields: { seconds: { type: 'int64', id: 1 }, nanos: { type: 'int32', id: 2 } }
546
+ })
547
+ }),
548
+ e('timestamp', { Timestamp: i }),
549
+ e('empty', { Empty: { fields: {} } }),
550
+ e('struct', {
551
+ Struct: { fields: { fields: { keyType: 'string', type: 'Value', id: 1 } } },
552
+ Value: {
553
+ oneofs: {
554
+ kind: {
555
+ oneof: [
556
+ 'nullValue',
557
+ 'numberValue',
558
+ 'stringValue',
559
+ 'boolValue',
560
+ 'structValue',
561
+ 'listValue'
562
+ ]
563
+ }
564
+ },
565
+ fields: {
566
+ nullValue: { type: 'NullValue', id: 1 },
567
+ numberValue: { type: 'double', id: 2 },
568
+ stringValue: { type: 'string', id: 3 },
569
+ boolValue: { type: 'bool', id: 4 },
570
+ structValue: { type: 'Struct', id: 5 },
571
+ listValue: { type: 'ListValue', id: 6 }
572
+ }
573
+ },
574
+ NullValue: { values: { NULL_VALUE: 0 } },
575
+ ListValue: { fields: { values: { rule: 'repeated', type: 'Value', id: 1 } } }
576
+ }),
577
+ e('wrappers', {
578
+ DoubleValue: { fields: { value: { type: 'double', id: 1 } } },
579
+ FloatValue: { fields: { value: { type: 'float', id: 1 } } },
580
+ Int64Value: { fields: { value: { type: 'int64', id: 1 } } },
581
+ UInt64Value: { fields: { value: { type: 'uint64', id: 1 } } },
582
+ Int32Value: { fields: { value: { type: 'int32', id: 1 } } },
583
+ UInt32Value: { fields: { value: { type: 'uint32', id: 1 } } },
584
+ BoolValue: { fields: { value: { type: 'bool', id: 1 } } },
585
+ StringValue: { fields: { value: { type: 'string', id: 1 } } },
586
+ BytesValue: { fields: { value: { type: 'bytes', id: 1 } } }
587
+ }),
588
+ e('field_mask', {
589
+ FieldMask: { fields: { paths: { rule: 'repeated', type: 'string', id: 1 } } }
590
+ }),
591
+ (e.get = function (t) {
592
+ return e[t] || null;
593
+ });
594
+ },
595
+ {}
596
+ ],
597
+ 12: [
598
+ function (t, i, n) {
599
+ var n = n,
600
+ l = t(15),
601
+ v = t(37);
602
+ function o(t, i, n, r) {
603
+ if (i.resolvedType)
604
+ if (i.resolvedType instanceof l) {
605
+ t('switch(d%s){', r);
606
+ for (var e = i.resolvedType.values, s = Object.keys(e), o = 0; o < s.length; ++o)
607
+ i.repeated && e[s[o]] === i.typeDefault && t('default:'),
608
+ t('case%j:', s[o])('case %i:', e[s[o]])('m%s=%j', r, e[s[o]])('break');
609
+ t('}');
610
+ } else
611
+ t('if(typeof d%s!=="object")', r)(
612
+ 'throw TypeError(%j)',
613
+ i.fullName + ': object expected'
614
+ )('m%s=types[%i].fromObject(d%s)', r, n, r);
615
+ else {
616
+ var u = !1;
617
+ switch (i.type) {
618
+ case 'double':
619
+ case 'float':
620
+ t('m%s=Number(d%s)', r, r);
621
+ break;
622
+ case 'uint32':
623
+ case 'fixed32':
624
+ t('m%s=d%s>>>0', r, r);
625
+ break;
626
+ case 'int32':
627
+ case 'sint32':
628
+ case 'sfixed32':
629
+ t('m%s=d%s|0', r, r);
630
+ break;
631
+ case 'uint64':
632
+ u = !0;
633
+ case 'int64':
634
+ case 'sint64':
635
+ case 'fixed64':
636
+ case 'sfixed64':
637
+ t('if(util.Long)')('(m%s=util.Long.fromValue(d%s)).unsigned=%j', r, r, u)(
638
+ 'else if(typeof d%s==="string")',
639
+ r
640
+ )(
641
+ 'm%s=parseInt(d%s,10)',
642
+ r,
643
+ r
644
+ )('else if(typeof d%s==="number")', r)(
645
+ 'm%s=d%s',
646
+ r,
647
+ r
648
+ )('else if(typeof d%s==="object")', r)(
649
+ 'm%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)',
650
+ r,
651
+ r,
652
+ r,
653
+ u ? 'true' : ''
654
+ );
655
+ break;
656
+ case 'bytes':
657
+ t('if(typeof d%s==="string")', r)(
658
+ 'util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)',
659
+ r,
660
+ r,
661
+ r
662
+ )('else if(d%s.length)', r)('m%s=d%s', r, r);
663
+ break;
664
+ case 'string':
665
+ t('m%s=String(d%s)', r, r);
666
+ break;
667
+ case 'bool':
668
+ t('m%s=Boolean(d%s)', r, r);
669
+ }
670
+ }
671
+ return t;
672
+ }
673
+ function d(t, i, n, r) {
674
+ if (i.resolvedType)
675
+ i.resolvedType instanceof l
676
+ ? t('d%s=o.enums===String?types[%i].values[m%s]:m%s', r, n, r, r)
677
+ : t('d%s=types[%i].toObject(m%s,o)', r, n, r);
678
+ else {
679
+ var e = !1;
680
+ switch (i.type) {
681
+ case 'double':
682
+ case 'float':
683
+ t('d%s=o.json&&!isFinite(m%s)?String(m%s):m%s', r, r, r, r);
684
+ break;
685
+ case 'uint64':
686
+ e = !0;
687
+ case 'int64':
688
+ case 'sint64':
689
+ case 'fixed64':
690
+ case 'sfixed64':
691
+ t('if(typeof m%s==="number")', r)('d%s=o.longs===String?String(m%s):m%s', r, r, r)(
692
+ 'else'
693
+ )(
694
+ 'd%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s',
695
+ r,
696
+ r,
697
+ r,
698
+ r,
699
+ e ? 'true' : '',
700
+ r
701
+ );
702
+ break;
703
+ case 'bytes':
704
+ t(
705
+ 'd%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s',
706
+ r,
707
+ r,
708
+ r,
709
+ r,
710
+ r
711
+ );
712
+ break;
713
+ default:
714
+ t('d%s=m%s', r, r);
715
+ }
716
+ }
717
+ return t;
718
+ }
719
+ (n.fromObject = function (t) {
720
+ var i = t.fieldsArray,
721
+ n = v.codegen(['d'], t.name + '$fromObject')('if(d instanceof this.ctor)')('return d');
722
+ if (!i.length) return n('return new this.ctor');
723
+ n('var m=new this.ctor');
724
+ for (var r = 0; r < i.length; ++r) {
725
+ var e = i[r].resolve(),
726
+ s = v.safeProp(e.name);
727
+ e.map
728
+ ? (n('if(d%s){', s)('if(typeof d%s!=="object")', s)(
729
+ 'throw TypeError(%j)',
730
+ e.fullName + ': object expected'
731
+ )('m%s={}', s)('for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){', s),
732
+ o(n, e, r, s + '[ks[i]]')('}')('}'))
733
+ : e.repeated
734
+ ? (n('if(d%s){', s)('if(!Array.isArray(d%s))', s)(
735
+ 'throw TypeError(%j)',
736
+ e.fullName + ': array expected'
737
+ )('m%s=[]', s)('for(var i=0;i<d%s.length;++i){', s),
738
+ o(n, e, r, s + '[i]')('}')('}'))
739
+ : (e.resolvedType instanceof l || n('if(d%s!=null){', s),
740
+ o(n, e, r, s),
741
+ e.resolvedType instanceof l || n('}'));
742
+ }
743
+ return n('return m');
744
+ }),
745
+ (n.toObject = function (t) {
746
+ var i = t.fieldsArray.slice().sort(v.compareFieldsById);
747
+ if (!i.length) return v.codegen()('return {}');
748
+ for (
749
+ var n = v.codegen(['m', 'o'], t.name + '$toObject')('if(!o)')('o={}')('var d={}'),
750
+ r = [],
751
+ e = [],
752
+ s = [],
753
+ o = 0;
754
+ o < i.length;
755
+ ++o
756
+ )
757
+ i[o].partOf || (i[o].resolve().repeated ? r : i[o].map ? e : s).push(i[o]);
758
+ if (r.length) {
759
+ for (n('if(o.arrays||o.defaults){'), o = 0; o < r.length; ++o)
760
+ n('d%s=[]', v.safeProp(r[o].name));
761
+ n('}');
762
+ }
763
+ if (e.length) {
764
+ for (n('if(o.objects||o.defaults){'), o = 0; o < e.length; ++o)
765
+ n('d%s={}', v.safeProp(e[o].name));
766
+ n('}');
767
+ }
768
+ if (s.length) {
769
+ for (n('if(o.defaults){'), o = 0; o < s.length; ++o) {
770
+ var u,
771
+ f = s[o],
772
+ h = v.safeProp(f.name);
773
+ f.resolvedType instanceof l
774
+ ? n(
775
+ 'd%s=o.enums===String?%j:%j',
776
+ h,
777
+ f.resolvedType.valuesById[f.typeDefault],
778
+ f.typeDefault
779
+ )
780
+ : f.long
781
+ ? n('if(util.Long){')(
782
+ 'var n=new util.Long(%i,%i,%j)',
783
+ f.typeDefault.low,
784
+ f.typeDefault.high,
785
+ f.typeDefault.unsigned
786
+ )(
787
+ 'd%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n',
788
+ h
789
+ )('}else')(
790
+ 'd%s=o.longs===String?%j:%i',
791
+ h,
792
+ f.typeDefault.toString(),
793
+ f.typeDefault.toNumber()
794
+ )
795
+ : f.bytes
796
+ ? ((u = '[' + Array.prototype.slice.call(f.typeDefault).join(',') + ']'),
797
+ n(
798
+ 'if(o.bytes===String)d%s=%j',
799
+ h,
800
+ String.fromCharCode.apply(String, f.typeDefault)
801
+ )('else{')('d%s=%s', h, u)(
802
+ 'if(o.bytes!==Array)d%s=util.newBuffer(d%s)',
803
+ h,
804
+ h
805
+ )('}'))
806
+ : n('d%s=%j', h, f.typeDefault);
807
+ }
808
+ n('}');
809
+ }
810
+ for (var a = !1, o = 0; o < i.length; ++o) {
811
+ var f = i[o],
812
+ c = t.e.indexOf(f),
813
+ h = v.safeProp(f.name);
814
+ f.map
815
+ ? (a || ((a = !0), n('var ks2')),
816
+ n('if(m%s&&(ks2=Object.keys(m%s)).length){', h, h)('d%s={}', h)(
817
+ 'for(var j=0;j<ks2.length;++j){'
818
+ ),
819
+ d(n, f, c, h + '[ks2[j]]')('}'))
820
+ : f.repeated
821
+ ? (n('if(m%s&&m%s.length){', h, h)('d%s=[]', h)(
822
+ 'for(var j=0;j<m%s.length;++j){',
823
+ h
824
+ ),
825
+ d(n, f, c, h + '[j]')('}'))
826
+ : (n('if(m%s!=null&&m.hasOwnProperty(%j)){', h, f.name),
827
+ d(n, f, c, h),
828
+ f.partOf && n('if(o.oneofs)')('d%s=%j', v.safeProp(f.partOf.name), f.name)),
829
+ n('}');
830
+ }
831
+ return n('return d');
832
+ });
833
+ },
834
+ { 15: 15, 37: 37 }
835
+ ],
836
+ 13: [
837
+ function (t, i, n) {
838
+ i.exports = function (t) {
839
+ var i = h.codegen(['r', 'l'], t.name + '$decode')('if(!(r instanceof Reader))')(
840
+ 'r=Reader.create(r)'
841
+ )(
842
+ 'var c=l===undefined?r.len:r.pos+l,m=new this.ctor' +
843
+ (t.fieldsArray.filter(function (t) {
844
+ return t.map;
845
+ }).length
846
+ ? ',k,value'
847
+ : '')
848
+ )('while(r.pos<c){')('var t=r.uint32()');
849
+ t.group && i('if((t&7)===4)')('break');
850
+ i('switch(t>>>3){');
851
+ for (var n = 0; n < t.fieldsArray.length; ++n) {
852
+ var r = t.e[n].resolve(),
853
+ e = r.resolvedType instanceof u ? 'int32' : r.type,
854
+ s = 'm' + h.safeProp(r.name);
855
+ i('case %i:', r.id),
856
+ r.map
857
+ ? (i('if(%s===util.emptyObject)', s)('%s={}', s)('var c2 = r.uint32()+r.pos'),
858
+ f.defaults[r.keyType] !== Q ? i('k=%j', f.defaults[r.keyType]) : i('k=null'),
859
+ f.defaults[e] !== Q ? i('value=%j', f.defaults[e]) : i('value=null'),
860
+ i('while(r.pos<c2){')('var tag2=r.uint32()')('switch(tag2>>>3){')(
861
+ 'case 1: k=r.%s(); break',
862
+ r.keyType
863
+ )('case 2:'),
864
+ f.basic[e] === Q
865
+ ? i('value=types[%i].decode(r,r.uint32())', n)
866
+ : i('value=r.%s()', e),
867
+ i('break')('default:')('r.skipType(tag2&7)')('break')('}')('}'),
868
+ f.long[r.keyType] !== Q
869
+ ? i('%s[typeof k==="object"?util.longToHash(k):k]=value', s)
870
+ : i('%s[k]=value', s))
871
+ : r.repeated
872
+ ? (i('if(!(%s&&%s.length))', s, s)('%s=[]', s),
873
+ f.packed[e] !== Q &&
874
+ i('if((t&7)===2){')('var c2=r.uint32()+r.pos')('while(r.pos<c2)')(
875
+ '%s.push(r.%s())',
876
+ s,
877
+ e
878
+ )('}else'),
879
+ f.basic[e] === Q
880
+ ? i(
881
+ r.resolvedType.group
882
+ ? '%s.push(types[%i].decode(r))'
883
+ : '%s.push(types[%i].decode(r,r.uint32()))',
884
+ s,
885
+ n
886
+ )
887
+ : i('%s.push(r.%s())', s, e))
888
+ : f.basic[e] === Q
889
+ ? i(
890
+ r.resolvedType.group
891
+ ? '%s=types[%i].decode(r)'
892
+ : '%s=types[%i].decode(r,r.uint32())',
893
+ s,
894
+ n
895
+ )
896
+ : i('%s=r.%s()', s, e),
897
+ i('break');
898
+ }
899
+ for (i('default:')('r.skipType(t&7)')('break')('}')('}'), n = 0; n < t.e.length; ++n) {
900
+ var o = t.e[n];
901
+ o.required &&
902
+ i('if(!m.hasOwnProperty(%j))', o.name)(
903
+ 'throw util.ProtocolError(%j,{instance:m})',
904
+ "missing required '" + o.name + "'"
905
+ );
906
+ }
907
+ return i('return m');
908
+ };
909
+ var u = t(15),
910
+ f = t(36),
911
+ h = t(37);
912
+ },
913
+ { 15: 15, 36: 36, 37: 37 }
914
+ ],
915
+ 14: [
916
+ function (t, i, n) {
917
+ i.exports = function (t) {
918
+ for (
919
+ var i,
920
+ n = c.codegen(['m', 'w'], t.name + '$encode')('if(!w)')('w=Writer.create()'),
921
+ r = t.fieldsArray.slice().sort(c.compareFieldsById),
922
+ e = 0;
923
+ e < r.length;
924
+ ++e
925
+ ) {
926
+ var s = r[e].resolve(),
927
+ o = t.e.indexOf(s),
928
+ u = s.resolvedType instanceof h ? 'int32' : s.type,
929
+ f = a.basic[u];
930
+ (i = 'm' + c.safeProp(s.name)),
931
+ s.map
932
+ ? (n(
933
+ 'if(%s!=null&&Object.hasOwnProperty.call(m,%j)){',
934
+ i,
935
+ s.name
936
+ )('for(var ks=Object.keys(%s),i=0;i<ks.length;++i){', i)(
937
+ 'w.uint32(%i).fork().uint32(%i).%s(ks[i])',
938
+ ((s.id << 3) | 2) >>> 0,
939
+ 8 | a.mapKey[s.keyType],
940
+ s.keyType
941
+ ),
942
+ f === Q
943
+ ? n('types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()', o, i)
944
+ : n('.uint32(%i).%s(%s[ks[i]]).ldelim()', 16 | f, u, i),
945
+ n('}')('}'))
946
+ : s.repeated
947
+ ? (n('if(%s!=null&&%s.length){', i, i),
948
+ s.packed && a.packed[u] !== Q
949
+ ? n('w.uint32(%i).fork()', ((s.id << 3) | 2) >>> 0)(
950
+ 'for(var i=0;i<%s.length;++i)',
951
+ i
952
+ )(
953
+ 'w.%s(%s[i])',
954
+ u,
955
+ i
956
+ )('w.ldelim()')
957
+ : (n('for(var i=0;i<%s.length;++i)', i),
958
+ f === Q
959
+ ? l(n, s, o, i + '[i]')
960
+ : n('w.uint32(%i).%s(%s[i])', ((s.id << 3) | f) >>> 0, u, i)),
961
+ n('}'))
962
+ : (s.optional && n('if(%s!=null&&Object.hasOwnProperty.call(m,%j))', i, s.name),
963
+ f === Q
964
+ ? l(n, s, o, i)
965
+ : n('w.uint32(%i).%s(%s)', ((s.id << 3) | f) >>> 0, u, i));
966
+ }
967
+ return n('return w');
968
+ };
969
+ var h = t(15),
970
+ a = t(36),
971
+ c = t(37);
972
+ function l(t, i, n, r) {
973
+ return i.resolvedType.group
974
+ ? t(
975
+ 'types[%i].encode(%s,w.uint32(%i)).uint32(%i)',
976
+ n,
977
+ r,
978
+ ((i.id << 3) | 3) >>> 0,
979
+ ((i.id << 3) | 4) >>> 0
980
+ )
981
+ : t('types[%i].encode(%s,w.uint32(%i).fork()).ldelim()', n, r, ((i.id << 3) | 2) >>> 0);
982
+ }
983
+ },
984
+ { 15: 15, 36: 36, 37: 37 }
985
+ ],
986
+ 15: [
987
+ function (t, i, n) {
988
+ i.exports = s;
989
+ var u = t(24);
990
+ ((s.prototype = Object.create(u.prototype)).constructor = s).className = 'Enum';
991
+ var r = t(23),
992
+ e = t(37);
993
+ function s(t, i, n, r, e) {
994
+ if ((u.call(this, t, n), i && 'object' != typeof i))
995
+ throw TypeError('values must be an object');
996
+ if (
997
+ ((this.valuesById = {}),
998
+ (this.values = Object.create(this.valuesById)),
999
+ (this.comment = r),
1000
+ (this.comments = e || {}),
1001
+ (this.reserved = Q),
1002
+ i)
1003
+ )
1004
+ for (var s = Object.keys(i), o = 0; o < s.length; ++o)
1005
+ 'number' == typeof i[s[o]] && (this.valuesById[(this.values[s[o]] = i[s[o]])] = s[o]);
1006
+ }
1007
+ (s.fromJSON = function (t, i) {
1008
+ t = new s(t, i.values, i.options, i.comment, i.comments);
1009
+ return (t.reserved = i.reserved), t;
1010
+ }),
1011
+ (s.prototype.toJSON = function (t) {
1012
+ t = !!t && !!t.keepComments;
1013
+ return e.toObject([
1014
+ 'options',
1015
+ this.options,
1016
+ 'values',
1017
+ this.values,
1018
+ 'reserved',
1019
+ this.reserved && this.reserved.length ? this.reserved : Q,
1020
+ 'comment',
1021
+ t ? this.comment : Q,
1022
+ 'comments',
1023
+ t ? this.comments : Q
1024
+ ]);
1025
+ }),
1026
+ (s.prototype.add = function (t, i, n) {
1027
+ if (!e.isString(t)) throw TypeError('name must be a string');
1028
+ if (!e.isInteger(i)) throw TypeError('id must be an integer');
1029
+ if (this.values[t] !== Q) throw Error("duplicate name '" + t + "' in " + this);
1030
+ if (this.isReservedId(i)) throw Error('id ' + i + ' is reserved in ' + this);
1031
+ if (this.isReservedName(t)) throw Error("name '" + t + "' is reserved in " + this);
1032
+ if (this.valuesById[i] !== Q) {
1033
+ if (!this.options || !this.options.allow_alias)
1034
+ throw Error('duplicate id ' + i + ' in ' + this);
1035
+ this.values[t] = i;
1036
+ } else this.valuesById[(this.values[t] = i)] = t;
1037
+ return (this.comments[t] = n || null), this;
1038
+ }),
1039
+ (s.prototype.remove = function (t) {
1040
+ if (!e.isString(t)) throw TypeError('name must be a string');
1041
+ var i = this.values[t];
1042
+ if (null == i) throw Error("name '" + t + "' does not exist in " + this);
1043
+ return delete this.valuesById[i], delete this.values[t], delete this.comments[t], this;
1044
+ }),
1045
+ (s.prototype.isReservedId = function (t) {
1046
+ return r.isReservedId(this.reserved, t);
1047
+ }),
1048
+ (s.prototype.isReservedName = function (t) {
1049
+ return r.isReservedName(this.reserved, t);
1050
+ });
1051
+ },
1052
+ { 23: 23, 24: 24, 37: 37 }
1053
+ ],
1054
+ 16: [
1055
+ function (t, i, n) {
1056
+ i.exports = o;
1057
+ var u = t(24);
1058
+ ((o.prototype = Object.create(u.prototype)).constructor = o).className = 'Field';
1059
+ var r,
1060
+ e = t(15),
1061
+ f = t(36),
1062
+ h = t(37),
1063
+ a = /^required|optional|repeated$/;
1064
+ function o(t, i, n, r, e, s, o) {
1065
+ if (
1066
+ (h.isObject(r)
1067
+ ? ((o = e), (s = r), (r = e = Q))
1068
+ : h.isObject(e) && ((o = s), (s = e), (e = Q)),
1069
+ u.call(this, t, s),
1070
+ !h.isInteger(i) || i < 0)
1071
+ )
1072
+ throw TypeError('id must be a non-negative integer');
1073
+ if (!h.isString(n)) throw TypeError('type must be a string');
1074
+ if (r !== Q && !a.test((r = r.toString().toLowerCase())))
1075
+ throw TypeError('rule must be a string rule');
1076
+ if (e !== Q && !h.isString(e)) throw TypeError('extend must be a string');
1077
+ (this.rule = (r = 'proto3_optional' === r ? 'optional' : r) && 'optional' !== r ? r : Q),
1078
+ (this.type = n),
1079
+ (this.id = i),
1080
+ (this.extend = e || Q),
1081
+ (this.required = 'required' === r),
1082
+ (this.optional = !this.required),
1083
+ (this.repeated = 'repeated' === r),
1084
+ (this.map = !1),
1085
+ (this.message = null),
1086
+ (this.partOf = null),
1087
+ (this.typeDefault = null),
1088
+ (this.defaultValue = null),
1089
+ (this.long = !!h.Long && f.long[n] !== Q),
1090
+ (this.bytes = 'bytes' === n),
1091
+ (this.resolvedType = null),
1092
+ (this.extensionField = null),
1093
+ (this.declaringField = null),
1094
+ (this.o = null),
1095
+ (this.comment = o);
1096
+ }
1097
+ (o.fromJSON = function (t, i) {
1098
+ return new o(t, i.id, i.type, i.rule, i.extend, i.options, i.comment);
1099
+ }),
1100
+ Object.defineProperty(o.prototype, 'packed', {
1101
+ get: function () {
1102
+ return null === this.o && (this.o = !1 !== this.getOption('packed')), this.o;
1103
+ }
1104
+ }),
1105
+ (o.prototype.setOption = function (t, i, n) {
1106
+ return 'packed' === t && (this.o = null), u.prototype.setOption.call(this, t, i, n);
1107
+ }),
1108
+ (o.prototype.toJSON = function (t) {
1109
+ t = !!t && !!t.keepComments;
1110
+ return h.toObject([
1111
+ 'rule',
1112
+ ('optional' !== this.rule && this.rule) || Q,
1113
+ 'type',
1114
+ this.type,
1115
+ 'id',
1116
+ this.id,
1117
+ 'extend',
1118
+ this.extend,
1119
+ 'options',
1120
+ this.options,
1121
+ 'comment',
1122
+ t ? this.comment : Q
1123
+ ]);
1124
+ }),
1125
+ (o.prototype.resolve = function () {
1126
+ return this.resolved
1127
+ ? this
1128
+ : ((this.typeDefault = f.defaults[this.type]) === Q &&
1129
+ ((this.resolvedType = (this.declaringField || this).parent.lookupTypeOrEnum(
1130
+ this.type
1131
+ )),
1132
+ this.resolvedType instanceof r
1133
+ ? (this.typeDefault = null)
1134
+ : (this.typeDefault =
1135
+ this.resolvedType.values[Object.keys(this.resolvedType.values)[0]])),
1136
+ this.options &&
1137
+ null != this.options.default &&
1138
+ ((this.typeDefault = this.options.default),
1139
+ this.resolvedType instanceof e &&
1140
+ 'string' == typeof this.typeDefault &&
1141
+ (this.typeDefault = this.resolvedType.values[this.typeDefault])),
1142
+ this.options &&
1143
+ ((!0 !== this.options.packed &&
1144
+ (this.options.packed === Q ||
1145
+ !this.resolvedType ||
1146
+ this.resolvedType instanceof e)) ||
1147
+ delete this.options.packed,
1148
+ Object.keys(this.options).length || (this.options = Q)),
1149
+ this.long
1150
+ ? ((this.typeDefault = h.Long.fromNumber(
1151
+ this.typeDefault,
1152
+ 'u' == (this.type[0] || '')
1153
+ )),
1154
+ Object.freeze && Object.freeze(this.typeDefault))
1155
+ : this.bytes &&
1156
+ 'string' == typeof this.typeDefault &&
1157
+ (h.base64.test(this.typeDefault)
1158
+ ? h.base64.decode(
1159
+ this.typeDefault,
1160
+ (t = h.newBuffer(h.base64.length(this.typeDefault))),
1161
+ 0
1162
+ )
1163
+ : h.utf8.write(
1164
+ this.typeDefault,
1165
+ (t = h.newBuffer(h.utf8.length(this.typeDefault))),
1166
+ 0
1167
+ ),
1168
+ (this.typeDefault = t)),
1169
+ this.map
1170
+ ? (this.defaultValue = h.emptyObject)
1171
+ : this.repeated
1172
+ ? (this.defaultValue = h.emptyArray)
1173
+ : (this.defaultValue = this.typeDefault),
1174
+ this.parent instanceof r &&
1175
+ (this.parent.ctor.prototype[this.name] = this.defaultValue),
1176
+ u.prototype.resolve.call(this));
1177
+ var t;
1178
+ }),
1179
+ (o.d = function (n, r, e, s) {
1180
+ return (
1181
+ 'function' == typeof r
1182
+ ? (r = h.decorateType(r).name)
1183
+ : r && 'object' == typeof r && (r = h.decorateEnum(r).name),
1184
+ function (t, i) {
1185
+ h.decorateType(t.constructor).add(new o(i, n, r, e, { default: s }));
1186
+ }
1187
+ );
1188
+ }),
1189
+ (o.u = function (t) {
1190
+ r = t;
1191
+ });
1192
+ },
1193
+ { 15: 15, 24: 24, 36: 36, 37: 37 }
1194
+ ],
1195
+ 17: [
1196
+ function (t, i, n) {
1197
+ var r = (i.exports = t(18));
1198
+ (r.build = 'light'),
1199
+ (r.load = function (t, i, n) {
1200
+ return (i = 'function' == typeof i ? ((n = i), new r.Root()) : i || new r.Root()).load(
1201
+ t,
1202
+ n
1203
+ );
1204
+ }),
1205
+ (r.loadSync = function (t, i) {
1206
+ return (i = i || new r.Root()).loadSync(t);
1207
+ }),
1208
+ (r.encoder = t(14)),
1209
+ (r.decoder = t(13)),
1210
+ (r.verifier = t(40)),
1211
+ (r.converter = t(12)),
1212
+ (r.ReflectionObject = t(24)),
1213
+ (r.Namespace = t(23)),
1214
+ (r.Root = t(29)),
1215
+ (r.Enum = t(15)),
1216
+ (r.Type = t(35)),
1217
+ (r.Field = t(16)),
1218
+ (r.OneOf = t(25)),
1219
+ (r.MapField = t(20)),
1220
+ (r.Service = t(33)),
1221
+ (r.Method = t(22)),
1222
+ (r.Message = t(21)),
1223
+ (r.wrappers = t(41)),
1224
+ (r.types = t(36)),
1225
+ (r.util = t(37)),
1226
+ r.ReflectionObject.u(r.Root),
1227
+ r.Namespace.u(r.Type, r.Service, r.Enum),
1228
+ r.Root.u(r.Type),
1229
+ r.Field.u(r.Type);
1230
+ },
1231
+ {
1232
+ 12: 12,
1233
+ 13: 13,
1234
+ 14: 14,
1235
+ 15: 15,
1236
+ 16: 16,
1237
+ 18: 18,
1238
+ 20: 20,
1239
+ 21: 21,
1240
+ 22: 22,
1241
+ 23: 23,
1242
+ 24: 24,
1243
+ 25: 25,
1244
+ 29: 29,
1245
+ 33: 33,
1246
+ 35: 35,
1247
+ 36: 36,
1248
+ 37: 37,
1249
+ 40: 40,
1250
+ 41: 41
1251
+ }
1252
+ ],
1253
+ 18: [
1254
+ function (t, i, n) {
1255
+ var r = n;
1256
+ function e() {
1257
+ r.util.u(), r.Writer.u(r.BufferWriter), r.Reader.u(r.BufferReader);
1258
+ }
1259
+ (r.build = 'minimal'),
1260
+ (r.Writer = t(42)),
1261
+ (r.BufferWriter = t(43)),
1262
+ (r.Reader = t(27)),
1263
+ (r.BufferReader = t(28)),
1264
+ (r.util = t(39)),
1265
+ (r.rpc = t(31)),
1266
+ (r.roots = t(30)),
1267
+ (r.configure = e),
1268
+ e();
1269
+ },
1270
+ { 27: 27, 28: 28, 30: 30, 31: 31, 39: 39, 42: 42, 43: 43 }
1271
+ ],
1272
+ 19: [
1273
+ function (t, i, n) {
1274
+ i = i.exports = t(17);
1275
+ (i.build = 'full'),
1276
+ (i.tokenize = t(34)),
1277
+ (i.parse = t(26)),
1278
+ (i.common = t(11)),
1279
+ i.Root.u(i.Type, i.parse, i.common);
1280
+ },
1281
+ { 11: 11, 17: 17, 26: 26, 34: 34 }
1282
+ ],
1283
+ 20: [
1284
+ function (t, i, n) {
1285
+ i.exports = s;
1286
+ var o = t(16);
1287
+ ((s.prototype = Object.create(o.prototype)).constructor = s).className = 'MapField';
1288
+ var r = t(36),
1289
+ u = t(37);
1290
+ function s(t, i, n, r, e, s) {
1291
+ if ((o.call(this, t, i, r, Q, Q, e, s), !u.isString(n)))
1292
+ throw TypeError('keyType must be a string');
1293
+ (this.keyType = n), (this.resolvedKeyType = null), (this.map = !0);
1294
+ }
1295
+ (s.fromJSON = function (t, i) {
1296
+ return new s(t, i.id, i.keyType, i.type, i.options, i.comment);
1297
+ }),
1298
+ (s.prototype.toJSON = function (t) {
1299
+ t = !!t && !!t.keepComments;
1300
+ return u.toObject([
1301
+ 'keyType',
1302
+ this.keyType,
1303
+ 'type',
1304
+ this.type,
1305
+ 'id',
1306
+ this.id,
1307
+ 'extend',
1308
+ this.extend,
1309
+ 'options',
1310
+ this.options,
1311
+ 'comment',
1312
+ t ? this.comment : Q
1313
+ ]);
1314
+ }),
1315
+ (s.prototype.resolve = function () {
1316
+ if (this.resolved) return this;
1317
+ if (r.mapKey[this.keyType] === Q) throw Error('invalid key type: ' + this.keyType);
1318
+ return o.prototype.resolve.call(this);
1319
+ }),
1320
+ (s.d = function (n, r, e) {
1321
+ return (
1322
+ 'function' == typeof e
1323
+ ? (e = u.decorateType(e).name)
1324
+ : e && 'object' == typeof e && (e = u.decorateEnum(e).name),
1325
+ function (t, i) {
1326
+ u.decorateType(t.constructor).add(new s(i, n, r, e));
1327
+ }
1328
+ );
1329
+ });
1330
+ },
1331
+ { 16: 16, 36: 36, 37: 37 }
1332
+ ],
1333
+ 21: [
1334
+ function (t, i, n) {
1335
+ i.exports = e;
1336
+ var r = t(39);
1337
+ function e(t) {
1338
+ if (t) for (var i = Object.keys(t), n = 0; n < i.length; ++n) this[i[n]] = t[i[n]];
1339
+ }
1340
+ (e.create = function (t) {
1341
+ return this.$type.create(t);
1342
+ }),
1343
+ (e.encode = function (t, i) {
1344
+ return this.$type.encode(t, i);
1345
+ }),
1346
+ (e.encodeDelimited = function (t, i) {
1347
+ return this.$type.encodeDelimited(t, i);
1348
+ }),
1349
+ (e.decode = function (t) {
1350
+ return this.$type.decode(t);
1351
+ }),
1352
+ (e.decodeDelimited = function (t) {
1353
+ return this.$type.decodeDelimited(t);
1354
+ }),
1355
+ (e.verify = function (t) {
1356
+ return this.$type.verify(t);
1357
+ }),
1358
+ (e.fromObject = function (t) {
1359
+ return this.$type.fromObject(t);
1360
+ }),
1361
+ (e.toObject = function (t, i) {
1362
+ return this.$type.toObject(t, i);
1363
+ }),
1364
+ (e.prototype.toJSON = function () {
1365
+ return this.$type.toObject(this, r.toJSONOptions);
1366
+ });
1367
+ },
1368
+ { 39: 39 }
1369
+ ],
1370
+ 22: [
1371
+ function (t, i, n) {
1372
+ i.exports = r;
1373
+ var h = t(24);
1374
+ ((r.prototype = Object.create(h.prototype)).constructor = r).className = 'Method';
1375
+ var a = t(37);
1376
+ function r(t, i, n, r, e, s, o, u, f) {
1377
+ if (
1378
+ (a.isObject(e) ? ((o = e), (e = s = Q)) : a.isObject(s) && ((o = s), (s = Q)),
1379
+ i !== Q && !a.isString(i))
1380
+ )
1381
+ throw TypeError('type must be a string');
1382
+ if (!a.isString(n)) throw TypeError('requestType must be a string');
1383
+ if (!a.isString(r)) throw TypeError('responseType must be a string');
1384
+ h.call(this, t, o),
1385
+ (this.type = i || 'rpc'),
1386
+ (this.requestType = n),
1387
+ (this.requestStream = !!e || Q),
1388
+ (this.responseType = r),
1389
+ (this.responseStream = !!s || Q),
1390
+ (this.resolvedRequestType = null),
1391
+ (this.resolvedResponseType = null),
1392
+ (this.comment = u),
1393
+ (this.parsedOptions = f);
1394
+ }
1395
+ (r.fromJSON = function (t, i) {
1396
+ return new r(
1397
+ t,
1398
+ i.type,
1399
+ i.requestType,
1400
+ i.responseType,
1401
+ i.requestStream,
1402
+ i.responseStream,
1403
+ i.options,
1404
+ i.comment,
1405
+ i.parsedOptions
1406
+ );
1407
+ }),
1408
+ (r.prototype.toJSON = function (t) {
1409
+ t = !!t && !!t.keepComments;
1410
+ return a.toObject([
1411
+ 'type',
1412
+ ('rpc' !== this.type && this.type) || Q,
1413
+ 'requestType',
1414
+ this.requestType,
1415
+ 'requestStream',
1416
+ this.requestStream,
1417
+ 'responseType',
1418
+ this.responseType,
1419
+ 'responseStream',
1420
+ this.responseStream,
1421
+ 'options',
1422
+ this.options,
1423
+ 'comment',
1424
+ t ? this.comment : Q,
1425
+ 'parsedOptions',
1426
+ this.parsedOptions
1427
+ ]);
1428
+ }),
1429
+ (r.prototype.resolve = function () {
1430
+ return this.resolved
1431
+ ? this
1432
+ : ((this.resolvedRequestType = this.parent.lookupType(this.requestType)),
1433
+ (this.resolvedResponseType = this.parent.lookupType(this.responseType)),
1434
+ h.prototype.resolve.call(this));
1435
+ });
1436
+ },
1437
+ { 24: 24, 37: 37 }
1438
+ ],
1439
+ 23: [
1440
+ function (t, i, n) {
1441
+ i.exports = a;
1442
+ var r = t(24);
1443
+ ((a.prototype = Object.create(r.prototype)).constructor = a).className = 'Namespace';
1444
+ var e,
1445
+ s,
1446
+ o,
1447
+ u = t(16),
1448
+ f = t(37);
1449
+ function h(t, i) {
1450
+ if (!t || !t.length) return Q;
1451
+ for (var n = {}, r = 0; r < t.length; ++r) n[t[r].name] = t[r].toJSON(i);
1452
+ return n;
1453
+ }
1454
+ function a(t, i) {
1455
+ r.call(this, t, i), (this.nested = Q), (this.f = null);
1456
+ }
1457
+ function c(t) {
1458
+ return (t.f = null), t;
1459
+ }
1460
+ (a.fromJSON = function (t, i) {
1461
+ return new a(t, i.options).addJSON(i.nested);
1462
+ }),
1463
+ (a.arrayToJSON = h),
1464
+ (a.isReservedId = function (t, i) {
1465
+ if (t)
1466
+ for (var n = 0; n < t.length; ++n)
1467
+ if ('string' != typeof t[n] && t[n][0] <= i && t[n][1] > i) return !0;
1468
+ return !1;
1469
+ }),
1470
+ (a.isReservedName = function (t, i) {
1471
+ if (t) for (var n = 0; n < t.length; ++n) if (t[n] === i) return !0;
1472
+ return !1;
1473
+ }),
1474
+ Object.defineProperty(a.prototype, 'nestedArray', {
1475
+ get: function () {
1476
+ return this.f || (this.f = f.toArray(this.nested));
1477
+ }
1478
+ }),
1479
+ (a.prototype.toJSON = function (t) {
1480
+ return f.toObject(['options', this.options, 'nested', h(this.nestedArray, t)]);
1481
+ }),
1482
+ (a.prototype.addJSON = function (t) {
1483
+ if (t)
1484
+ for (var i, n = Object.keys(t), r = 0; r < n.length; ++r)
1485
+ (i = t[n[r]]),
1486
+ this.add(
1487
+ (i.fields !== Q
1488
+ ? e
1489
+ : i.values !== Q
1490
+ ? o
1491
+ : i.methods !== Q
1492
+ ? s
1493
+ : i.id !== Q
1494
+ ? u
1495
+ : a
1496
+ ).fromJSON(n[r], i)
1497
+ );
1498
+ return this;
1499
+ }),
1500
+ (a.prototype.get = function (t) {
1501
+ return (this.nested && this.nested[t]) || null;
1502
+ }),
1503
+ (a.prototype.getEnum = function (t) {
1504
+ if (this.nested && this.nested[t] instanceof o) return this.nested[t].values;
1505
+ throw Error('no such enum: ' + t);
1506
+ }),
1507
+ (a.prototype.add = function (t) {
1508
+ if (
1509
+ !(
1510
+ (t instanceof u && t.extend !== Q) ||
1511
+ t instanceof e ||
1512
+ t instanceof o ||
1513
+ t instanceof s ||
1514
+ t instanceof a
1515
+ )
1516
+ )
1517
+ throw TypeError('object must be a valid nested object');
1518
+ if (this.nested) {
1519
+ var i = this.get(t.name);
1520
+ if (i) {
1521
+ if (!(i instanceof a && t instanceof a) || i instanceof e || i instanceof s)
1522
+ throw Error("duplicate name '" + t.name + "' in " + this);
1523
+ for (var n = i.nestedArray, r = 0; r < n.length; ++r) t.add(n[r]);
1524
+ this.remove(i), this.nested || (this.nested = {}), t.setOptions(i.options, !0);
1525
+ }
1526
+ } else this.nested = {};
1527
+ return (this.nested[t.name] = t).onAdd(this), c(this);
1528
+ }),
1529
+ (a.prototype.remove = function (t) {
1530
+ if (!(t instanceof r)) throw TypeError('object must be a ReflectionObject');
1531
+ if (t.parent !== this) throw Error(t + ' is not a member of ' + this);
1532
+ return (
1533
+ delete this.nested[t.name],
1534
+ Object.keys(this.nested).length || (this.nested = Q),
1535
+ t.onRemove(this),
1536
+ c(this)
1537
+ );
1538
+ }),
1539
+ (a.prototype.define = function (t, i) {
1540
+ if (f.isString(t)) t = t.split('.');
1541
+ else if (!Array.isArray(t)) throw TypeError('illegal path');
1542
+ if (t && t.length && '' === t[0]) throw Error('path must be relative');
1543
+ for (var n = this; 0 < t.length; ) {
1544
+ var r = t.shift();
1545
+ if (n.nested && n.nested[r]) {
1546
+ if (!((n = n.nested[r]) instanceof a))
1547
+ throw Error('path conflicts with non-namespace objects');
1548
+ } else n.add((n = new a(r)));
1549
+ }
1550
+ return i && n.addJSON(i), n;
1551
+ }),
1552
+ (a.prototype.resolveAll = function () {
1553
+ for (var t = this.nestedArray, i = 0; i < t.length; )
1554
+ t[i] instanceof a ? t[i++].resolveAll() : t[i++].resolve();
1555
+ return this.resolve();
1556
+ }),
1557
+ (a.prototype.lookup = function (t, i, n) {
1558
+ if (
1559
+ ('boolean' == typeof i ? ((n = i), (i = Q)) : i && !Array.isArray(i) && (i = [i]),
1560
+ f.isString(t) && t.length)
1561
+ ) {
1562
+ if ('.' === t) return this.root;
1563
+ t = t.split('.');
1564
+ } else if (!t.length) return this;
1565
+ if ('' === t[0]) return this.root.lookup(t.slice(1), i);
1566
+ var r = this.get(t[0]);
1567
+ if (r) {
1568
+ if (1 === t.length) {
1569
+ if (!i || ~i.indexOf(r.constructor)) return r;
1570
+ } else if (r instanceof a && (r = r.lookup(t.slice(1), i, !0))) return r;
1571
+ } else
1572
+ for (var e = 0; e < this.nestedArray.length; ++e)
1573
+ if (this.f[e] instanceof a && (r = this.f[e].lookup(t, i, !0))) return r;
1574
+ return null === this.parent || n ? null : this.parent.lookup(t, i);
1575
+ }),
1576
+ (a.prototype.lookupType = function (t) {
1577
+ var i = this.lookup(t, [e]);
1578
+ if (!i) throw Error('no such type: ' + t);
1579
+ return i;
1580
+ }),
1581
+ (a.prototype.lookupEnum = function (t) {
1582
+ var i = this.lookup(t, [o]);
1583
+ if (!i) throw Error("no such Enum '" + t + "' in " + this);
1584
+ return i;
1585
+ }),
1586
+ (a.prototype.lookupTypeOrEnum = function (t) {
1587
+ var i = this.lookup(t, [e, o]);
1588
+ if (!i) throw Error("no such Type or Enum '" + t + "' in " + this);
1589
+ return i;
1590
+ }),
1591
+ (a.prototype.lookupService = function (t) {
1592
+ var i = this.lookup(t, [s]);
1593
+ if (!i) throw Error("no such Service '" + t + "' in " + this);
1594
+ return i;
1595
+ }),
1596
+ (a.u = function (t, i, n) {
1597
+ (e = t), (s = i), (o = n);
1598
+ });
1599
+ },
1600
+ { 16: 16, 24: 24, 37: 37 }
1601
+ ],
1602
+ 24: [
1603
+ function (t, i, n) {
1604
+ (i.exports = e).className = 'ReflectionObject';
1605
+ var r,
1606
+ o = t(37);
1607
+ function e(t, i) {
1608
+ if (!o.isString(t)) throw TypeError('name must be a string');
1609
+ if (i && !o.isObject(i)) throw TypeError('options must be an object');
1610
+ (this.options = i),
1611
+ (this.parsedOptions = null),
1612
+ (this.name = t),
1613
+ (this.parent = null),
1614
+ (this.resolved = !1),
1615
+ (this.comment = null),
1616
+ (this.filename = null);
1617
+ }
1618
+ Object.defineProperties(e.prototype, {
1619
+ root: {
1620
+ get: function () {
1621
+ for (var t = this; null !== t.parent; ) t = t.parent;
1622
+ return t;
1623
+ }
1624
+ },
1625
+ fullName: {
1626
+ get: function () {
1627
+ for (var t = [this.name], i = this.parent; i; ) t.unshift(i.name), (i = i.parent);
1628
+ return t.join('.');
1629
+ }
1630
+ }
1631
+ }),
1632
+ (e.prototype.toJSON = function () {
1633
+ throw Error();
1634
+ }),
1635
+ (e.prototype.onAdd = function (t) {
1636
+ this.parent && this.parent !== t && this.parent.remove(this),
1637
+ (this.parent = t),
1638
+ (this.resolved = !1);
1639
+ t = t.root;
1640
+ t instanceof r && t.h(this);
1641
+ }),
1642
+ (e.prototype.onRemove = function (t) {
1643
+ t = t.root;
1644
+ t instanceof r && t.a(this), (this.parent = null), (this.resolved = !1);
1645
+ }),
1646
+ (e.prototype.resolve = function () {
1647
+ return this.resolved || (this.root instanceof r && (this.resolved = !0)), this;
1648
+ }),
1649
+ (e.prototype.getOption = function (t) {
1650
+ return this.options ? this.options[t] : Q;
1651
+ }),
1652
+ (e.prototype.setOption = function (t, i, n) {
1653
+ return (
1654
+ (n && this.options && this.options[t] !== Q) ||
1655
+ ((this.options || (this.options = {}))[t] = i),
1656
+ this
1657
+ );
1658
+ }),
1659
+ (e.prototype.setParsedOption = function (i, t, n) {
1660
+ this.parsedOptions || (this.parsedOptions = []);
1661
+ var r,
1662
+ e,
1663
+ s = this.parsedOptions;
1664
+ return (
1665
+ n
1666
+ ? (e = s.find(function (t) {
1667
+ return Object.prototype.hasOwnProperty.call(t, i);
1668
+ }))
1669
+ ? ((r = e[i]), o.setProperty(r, n, t))
1670
+ : (((e = {})[i] = o.setProperty({}, n, t)), s.push(e))
1671
+ : (((e = {})[i] = t), s.push(e)),
1672
+ this
1673
+ );
1674
+ }),
1675
+ (e.prototype.setOptions = function (t, i) {
1676
+ if (t)
1677
+ for (var n = Object.keys(t), r = 0; r < n.length; ++r)
1678
+ this.setOption(n[r], t[n[r]], i);
1679
+ return this;
1680
+ }),
1681
+ (e.prototype.toString = function () {
1682
+ var t = this.constructor.className,
1683
+ i = this.fullName;
1684
+ return i.length ? t + ' ' + i : t;
1685
+ }),
1686
+ (e.u = function (t) {
1687
+ r = t;
1688
+ });
1689
+ },
1690
+ { 37: 37 }
1691
+ ],
1692
+ 25: [
1693
+ function (t, i, n) {
1694
+ i.exports = o;
1695
+ var e = t(24);
1696
+ ((o.prototype = Object.create(e.prototype)).constructor = o).className = 'OneOf';
1697
+ var r = t(16),
1698
+ s = t(37);
1699
+ function o(t, i, n, r) {
1700
+ if (
1701
+ (Array.isArray(i) || ((n = i), (i = Q)),
1702
+ e.call(this, t, n),
1703
+ i !== Q && !Array.isArray(i))
1704
+ )
1705
+ throw TypeError('fieldNames must be an Array');
1706
+ (this.oneof = i || []), (this.fieldsArray = []), (this.comment = r);
1707
+ }
1708
+ function u(t) {
1709
+ if (t.parent)
1710
+ for (var i = 0; i < t.fieldsArray.length; ++i)
1711
+ t.fieldsArray[i].parent || t.parent.add(t.fieldsArray[i]);
1712
+ }
1713
+ (o.fromJSON = function (t, i) {
1714
+ return new o(t, i.oneof, i.options, i.comment);
1715
+ }),
1716
+ (o.prototype.toJSON = function (t) {
1717
+ t = !!t && !!t.keepComments;
1718
+ return s.toObject([
1719
+ 'options',
1720
+ this.options,
1721
+ 'oneof',
1722
+ this.oneof,
1723
+ 'comment',
1724
+ t ? this.comment : Q
1725
+ ]);
1726
+ }),
1727
+ (o.prototype.add = function (t) {
1728
+ if (!(t instanceof r)) throw TypeError('field must be a Field');
1729
+ return (
1730
+ t.parent && t.parent !== this.parent && t.parent.remove(t),
1731
+ this.oneof.push(t.name),
1732
+ this.fieldsArray.push(t),
1733
+ u((t.partOf = this)),
1734
+ this
1735
+ );
1736
+ }),
1737
+ (o.prototype.remove = function (t) {
1738
+ if (!(t instanceof r)) throw TypeError('field must be a Field');
1739
+ var i = this.fieldsArray.indexOf(t);
1740
+ if (i < 0) throw Error(t + ' is not a member of ' + this);
1741
+ return (
1742
+ this.fieldsArray.splice(i, 1),
1743
+ -1 < (i = this.oneof.indexOf(t.name)) && this.oneof.splice(i, 1),
1744
+ (t.partOf = null),
1745
+ this
1746
+ );
1747
+ }),
1748
+ (o.prototype.onAdd = function (t) {
1749
+ e.prototype.onAdd.call(this, t);
1750
+ for (var i = 0; i < this.oneof.length; ++i) {
1751
+ var n = t.get(this.oneof[i]);
1752
+ n && !n.partOf && (n.partOf = this).fieldsArray.push(n);
1753
+ }
1754
+ u(this);
1755
+ }),
1756
+ (o.prototype.onRemove = function (t) {
1757
+ for (var i, n = 0; n < this.fieldsArray.length; ++n)
1758
+ (i = this.fieldsArray[n]).parent && i.parent.remove(i);
1759
+ e.prototype.onRemove.call(this, t);
1760
+ }),
1761
+ (o.d = function () {
1762
+ for (var n = Array(arguments.length), t = 0; t < arguments.length; )
1763
+ n[t] = arguments[t++];
1764
+ return function (t, i) {
1765
+ s.decorateType(t.constructor).add(new o(i, n)),
1766
+ Object.defineProperty(t, i, { get: s.oneOfGetter(n), set: s.oneOfSetter(n) });
1767
+ };
1768
+ });
1769
+ },
1770
+ { 16: 16, 24: 24, 37: 37 }
1771
+ ],
1772
+ 26: [
1773
+ function (t, i, n) {
1774
+ ((i.exports = K).filename = null), (K.defaults = { keepCase: !1 });
1775
+ var V = t(34),
1776
+ $ = t(29),
1777
+ M = t(35),
1778
+ _ = t(16),
1779
+ I = t(20),
1780
+ F = t(25),
1781
+ L = t(15),
1782
+ U = t(33),
1783
+ q = t(22),
1784
+ R = t(36),
1785
+ z = t(37),
1786
+ Z = /^[1-9][0-9]*$/,
1787
+ B = /^-?[1-9][0-9]*$/,
1788
+ P = /^0[x][0-9a-fA-F]+$/,
1789
+ H = /^-?0[x][0-9a-fA-F]+$/,
1790
+ X = /^0[0-7]+$/,
1791
+ C = /^-?0[0-7]+$/,
1792
+ D = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,
1793
+ J = /^[a-zA-Z_][a-zA-Z_0-9]*$/,
1794
+ W = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,
1795
+ G = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;
1796
+ function K(t, i, n) {
1797
+ i instanceof $ || ((n = i), (i = new $()));
1798
+ var r,
1799
+ e,
1800
+ s,
1801
+ o,
1802
+ f,
1803
+ u = (n = n || K.defaults).preferTrailingComment || !1,
1804
+ h = V(t, n.alternateCommentMode || !1),
1805
+ a = h.next,
1806
+ c = h.push,
1807
+ l = h.peek,
1808
+ v = h.skip,
1809
+ d = h.cmnt,
1810
+ p = !0,
1811
+ b = !1,
1812
+ w = i,
1813
+ y = n.keepCase
1814
+ ? function (t) {
1815
+ return t;
1816
+ }
1817
+ : z.camelCase;
1818
+ function m(t, i, n) {
1819
+ var r = K.filename;
1820
+ return (
1821
+ n || (K.filename = null),
1822
+ Error(
1823
+ 'illegal ' +
1824
+ (i || 'token') +
1825
+ " '" +
1826
+ t +
1827
+ "' (" +
1828
+ (r ? r + ', ' : '') +
1829
+ 'line ' +
1830
+ h.line +
1831
+ ')'
1832
+ )
1833
+ );
1834
+ }
1835
+ function g() {
1836
+ var t,
1837
+ i = [];
1838
+ do {
1839
+ if ('"' !== (t = a()) && "'" !== t) throw m(t);
1840
+ } while ((i.push(a()), v(t), '"' === (t = l()) || "'" === t));
1841
+ return i.join('');
1842
+ }
1843
+ function j(i) {
1844
+ var n = a();
1845
+ switch (n) {
1846
+ case "'":
1847
+ case '"':
1848
+ return c(n), g();
1849
+ case 'true':
1850
+ case 'TRUE':
1851
+ return !0;
1852
+ case 'false':
1853
+ case 'FALSE':
1854
+ return !1;
1855
+ }
1856
+ try {
1857
+ return (function (t, i) {
1858
+ var n = 1;
1859
+ '-' == (t[0] || '') && ((n = -1), (t = t.substring(1)));
1860
+ switch (t) {
1861
+ case 'inf':
1862
+ case 'INF':
1863
+ case 'Inf':
1864
+ return n * (1 / 0);
1865
+ case 'nan':
1866
+ case 'NAN':
1867
+ case 'Nan':
1868
+ case 'NaN':
1869
+ return NaN;
1870
+ case '0':
1871
+ return 0;
1872
+ }
1873
+ if (Z.test(t)) return n * parseInt(t, 10);
1874
+ if (P.test(t)) return n * parseInt(t, 16);
1875
+ if (X.test(t)) return n * parseInt(t, 8);
1876
+ if (D.test(t)) return n * parseFloat(t);
1877
+ throw m(t, 'number', i);
1878
+ })(n, !0);
1879
+ } catch (t) {
1880
+ if (i && W.test(n)) return n;
1881
+ throw m(n, 'value');
1882
+ }
1883
+ }
1884
+ function k(t, i) {
1885
+ for (
1886
+ var n;
1887
+ !i || ('"' !== (n = l()) && "'" !== n)
1888
+ ? t.push([(n = O(a())), v('to', !0) ? O(a()) : n])
1889
+ : t.push(g()),
1890
+ v(',', !0);
1891
+
1892
+ );
1893
+ v(';');
1894
+ }
1895
+ function O(t, i) {
1896
+ switch (t) {
1897
+ case 'max':
1898
+ case 'MAX':
1899
+ case 'Max':
1900
+ return 536870911;
1901
+ case '0':
1902
+ return 0;
1903
+ }
1904
+ if (!i && '-' == (t[0] || '')) throw m(t, 'id');
1905
+ if (B.test(t)) return parseInt(t, 10);
1906
+ if (H.test(t)) return parseInt(t, 16);
1907
+ if (C.test(t)) return parseInt(t, 8);
1908
+ throw m(t, 'id');
1909
+ }
1910
+ function E(t, i) {
1911
+ switch (i) {
1912
+ case 'option':
1913
+ return T(t, i), v(';'), 1;
1914
+ case 'message':
1915
+ return (
1916
+ (function (t, i) {
1917
+ if (!J.test((i = a()))) throw m(i, 'type name');
1918
+ var n = new M(i);
1919
+ A(n, function (t) {
1920
+ if (!E(n, t))
1921
+ switch (t) {
1922
+ case 'map':
1923
+ !(function (t) {
1924
+ v('<');
1925
+ var i = a();
1926
+ if (R.mapKey[i] === Q) throw m(i, 'type');
1927
+ v(',');
1928
+ var n = a();
1929
+ if (!W.test(n)) throw m(n, 'type');
1930
+ v('>');
1931
+ var r = a();
1932
+ if (!J.test(r)) throw m(r, 'name');
1933
+ v('=');
1934
+ var e = new I(y(r), O(a()), i, n);
1935
+ A(
1936
+ e,
1937
+ function (t) {
1938
+ if ('option' !== t) throw m(t);
1939
+ T(e, t), v(';');
1940
+ },
1941
+ function () {
1942
+ N(e);
1943
+ }
1944
+ ),
1945
+ t.add(e);
1946
+ })(n);
1947
+ break;
1948
+ case 'required':
1949
+ case 'repeated':
1950
+ x(n, t);
1951
+ break;
1952
+ case 'optional':
1953
+ x(n, b ? 'proto3_optional' : 'optional');
1954
+ break;
1955
+ case 'oneof':
1956
+ !(function (t, i) {
1957
+ if (!J.test((i = a()))) throw m(i, 'name');
1958
+ var n = new F(y(i));
1959
+ A(n, function (t) {
1960
+ 'option' === t ? (T(n, t), v(';')) : (c(t), x(n, 'optional'));
1961
+ }),
1962
+ t.add(n);
1963
+ })(n, t);
1964
+ break;
1965
+ case 'extensions':
1966
+ k(n.extensions || (n.extensions = []));
1967
+ break;
1968
+ case 'reserved':
1969
+ k(n.reserved || (n.reserved = []), !0);
1970
+ break;
1971
+ default:
1972
+ if (!b || !W.test(t)) throw m(t);
1973
+ c(t), x(n, 'optional');
1974
+ }
1975
+ }),
1976
+ t.add(n);
1977
+ })(t, i),
1978
+ 1
1979
+ );
1980
+ case 'enum':
1981
+ return (
1982
+ (function (t, i) {
1983
+ if (!J.test((i = a()))) throw m(i, 'name');
1984
+ var n = new L(i);
1985
+ A(n, function (t) {
1986
+ switch (t) {
1987
+ case 'option':
1988
+ T(n, t), v(';');
1989
+ break;
1990
+ case 'reserved':
1991
+ k(n.reserved || (n.reserved = []), !0);
1992
+ break;
1993
+ default:
1994
+ !(function (t, i) {
1995
+ if (!J.test(i)) throw m(i, 'name');
1996
+ v('=');
1997
+ var n = O(a(), !0),
1998
+ r = {};
1999
+ A(
2000
+ r,
2001
+ function (t) {
2002
+ if ('option' !== t) throw m(t);
2003
+ T(r, t), v(';');
2004
+ },
2005
+ function () {
2006
+ N(r);
2007
+ }
2008
+ ),
2009
+ t.add(i, n, r.comment);
2010
+ })(n, t);
2011
+ }
2012
+ }),
2013
+ t.add(n);
2014
+ })(t, i),
2015
+ 1
2016
+ );
2017
+ case 'service':
2018
+ return (
2019
+ (function (t, i) {
2020
+ if (!J.test((i = a()))) throw m(i, 'service name');
2021
+ var n = new U(i);
2022
+ A(n, function (t) {
2023
+ if (!E(n, t)) {
2024
+ if ('rpc' !== t) throw m(t);
2025
+ !(function (t, i) {
2026
+ var n = d(),
2027
+ r = i;
2028
+ if (!J.test((i = a()))) throw m(i, 'name');
2029
+ var e,
2030
+ s,
2031
+ o,
2032
+ u = i;
2033
+ v('('), v('stream', !0) && (s = !0);
2034
+ if (!W.test((i = a()))) throw m(i);
2035
+ (e = i), v(')'), v('returns'), v('('), v('stream', !0) && (o = !0);
2036
+ if (!W.test((i = a()))) throw m(i);
2037
+ (i = i), v(')');
2038
+ var f = new q(u, r, e, i, s, o);
2039
+ (f.comment = n),
2040
+ A(f, function (t) {
2041
+ if ('option' !== t) throw m(t);
2042
+ T(f, t), v(';');
2043
+ }),
2044
+ t.add(f);
2045
+ })(n, t);
2046
+ }
2047
+ }),
2048
+ t.add(n);
2049
+ })(t, i),
2050
+ 1
2051
+ );
2052
+ case 'extend':
2053
+ return (
2054
+ (function (i, t) {
2055
+ if (!W.test((t = a()))) throw m(t, 'reference');
2056
+ var n = t;
2057
+ A(null, function (t) {
2058
+ switch (t) {
2059
+ case 'required':
2060
+ case 'repeated':
2061
+ x(i, t, n);
2062
+ break;
2063
+ case 'optional':
2064
+ x(i, b ? 'proto3_optional' : 'optional', n);
2065
+ break;
2066
+ default:
2067
+ if (!b || !W.test(t)) throw m(t);
2068
+ c(t), x(i, 'optional', n);
2069
+ }
2070
+ });
2071
+ })(t, i),
2072
+ 1
2073
+ );
2074
+ }
2075
+ }
2076
+ function A(t, i, n) {
2077
+ var r,
2078
+ e = h.line;
2079
+ if (
2080
+ (t && ('string' != typeof t.comment && (t.comment = d()), (t.filename = K.filename)),
2081
+ v('{', !0))
2082
+ ) {
2083
+ for (; '}' !== (r = a()); ) i(r);
2084
+ v(';', !0);
2085
+ } else
2086
+ n && n(),
2087
+ v(';'),
2088
+ t && ('string' != typeof t.comment || u) && (t.comment = d(e) || t.comment);
2089
+ }
2090
+ function x(t, i, n) {
2091
+ var r = a();
2092
+ if ('group' !== r) {
2093
+ if (!W.test(r)) throw m(r, 'type');
2094
+ var e = a();
2095
+ if (!J.test(e)) throw m(e, 'name');
2096
+ (e = y(e)), v('=');
2097
+ var s = new _(e, O(a()), r, i, n);
2098
+ A(
2099
+ s,
2100
+ function (t) {
2101
+ if ('option' !== t) throw m(t);
2102
+ T(s, t), v(';');
2103
+ },
2104
+ function () {
2105
+ N(s);
2106
+ }
2107
+ ),
2108
+ 'proto3_optional' === i
2109
+ ? ((e = new F('_' + e)), s.setOption('proto3_optional', !0), e.add(s), t.add(e))
2110
+ : t.add(s),
2111
+ b ||
2112
+ !s.repeated ||
2113
+ (R.packed[r] === Q && R.basic[r] !== Q) ||
2114
+ s.setOption('packed', !1, !0);
2115
+ } else
2116
+ !(function (t, i) {
2117
+ var n = a();
2118
+ if (!J.test(n)) throw m(n, 'name');
2119
+ var r = z.lcFirst(n);
2120
+ n === r && (n = z.ucFirst(n));
2121
+ v('=');
2122
+ var e = O(a()),
2123
+ s = new M(n);
2124
+ s.group = !0;
2125
+ i = new _(r, e, n, i);
2126
+ (i.filename = K.filename),
2127
+ A(s, function (t) {
2128
+ switch (t) {
2129
+ case 'option':
2130
+ T(s, t), v(';');
2131
+ break;
2132
+ case 'required':
2133
+ case 'repeated':
2134
+ x(s, t);
2135
+ break;
2136
+ case 'optional':
2137
+ x(s, b ? 'proto3_optional' : 'optional');
2138
+ break;
2139
+ default:
2140
+ throw m(t);
2141
+ }
2142
+ }),
2143
+ t.add(s).add(i);
2144
+ })(t, i);
2145
+ }
2146
+ function T(t, i) {
2147
+ var n = v('(', !0);
2148
+ if (!W.test((i = a()))) throw m(i, 'name');
2149
+ var r = i,
2150
+ e = r;
2151
+ n &&
2152
+ (v(')'),
2153
+ (e = r = '(' + r + ')'),
2154
+ (i = l()),
2155
+ G.test(i) && ((s = i.substr(1)), (r += i), a())),
2156
+ v('=');
2157
+ var s,
2158
+ r = (function t(i, n) {
2159
+ if (v('{', !0)) {
2160
+ for (var r = {}; !v('}', !0); ) {
2161
+ if (!J.test((f = a()))) throw m(f, 'name');
2162
+ var e,
2163
+ s = f;
2164
+ '{' === l()
2165
+ ? (e = t(i, n + '.' + f))
2166
+ : (v(':'),
2167
+ '{' === l()
2168
+ ? (e = t(i, n + '.' + f))
2169
+ : ((e = j(!0)), S(i, n + '.' + f, e)));
2170
+ var o = r[s];
2171
+ o && (e = [].concat(o).concat(e)), (r[s] = e), v(',', !0);
2172
+ }
2173
+ return r;
2174
+ }
2175
+ var u = j(!0);
2176
+ S(i, n, u);
2177
+ return u;
2178
+ })(t, r);
2179
+ (e = e), (r = r), (s = s), (t = t).setParsedOption && t.setParsedOption(e, r, s);
2180
+ }
2181
+ function S(t, i, n) {
2182
+ t.setOption && t.setOption(i, n);
2183
+ }
2184
+ function N(t) {
2185
+ if (v('[', !0)) {
2186
+ for (; T(t, 'option'), v(',', !0); );
2187
+ v(']');
2188
+ }
2189
+ return t;
2190
+ }
2191
+ for (; null !== (f = a()); )
2192
+ switch (f) {
2193
+ case 'package':
2194
+ if (!p) throw m(f);
2195
+ !(function () {
2196
+ if (r !== Q) throw m('package');
2197
+ if (((r = a()), !W.test(r))) throw m(r, 'name');
2198
+ (w = w.define(r)), v(';');
2199
+ })();
2200
+ break;
2201
+ case 'import':
2202
+ if (!p) throw m(f);
2203
+ !(function () {
2204
+ var t,
2205
+ i = l();
2206
+ switch (i) {
2207
+ case 'weak':
2208
+ (t = s = s || []), a();
2209
+ break;
2210
+ case 'public':
2211
+ a();
2212
+ default:
2213
+ t = e = e || [];
2214
+ }
2215
+ (i = g()), v(';'), t.push(i);
2216
+ })();
2217
+ break;
2218
+ case 'syntax':
2219
+ if (!p) throw m(f);
2220
+ !(function () {
2221
+ if ((v('='), (o = g()), !(b = 'proto3' === o) && 'proto2' !== o))
2222
+ throw m(o, 'syntax');
2223
+ v(';');
2224
+ })();
2225
+ break;
2226
+ case 'option':
2227
+ T(w, f), v(';');
2228
+ break;
2229
+ default:
2230
+ if (E(w, f)) {
2231
+ p = !1;
2232
+ continue;
2233
+ }
2234
+ throw m(f);
2235
+ }
2236
+ return (
2237
+ (K.filename = null), { package: r, imports: e, weakImports: s, syntax: o, root: i }
2238
+ );
2239
+ }
2240
+ },
2241
+ { 15: 15, 16: 16, 20: 20, 22: 22, 25: 25, 29: 29, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37 }
2242
+ ],
2243
+ 27: [
2244
+ function (t, i, n) {
2245
+ i.exports = f;
2246
+ var r,
2247
+ e = t(39),
2248
+ s = e.LongBits,
2249
+ o = e.utf8;
2250
+ function u(t, i) {
2251
+ return RangeError('index out of range: ' + t.pos + ' + ' + (i || 1) + ' > ' + t.len);
2252
+ }
2253
+ function f(t) {
2254
+ (this.buf = t), (this.pos = 0), (this.len = t.length);
2255
+ }
2256
+ function h() {
2257
+ return e.Buffer
2258
+ ? function (t) {
2259
+ return (f.create = function (t) {
2260
+ return e.Buffer.isBuffer(t) ? new r(t) : c(t);
2261
+ })(t);
2262
+ }
2263
+ : c;
2264
+ }
2265
+ var a,
2266
+ c =
2267
+ 'undefined' != typeof Uint8Array
2268
+ ? function (t) {
2269
+ if (t instanceof Uint8Array || Array.isArray(t)) return new f(t);
2270
+ throw Error('illegal buffer');
2271
+ }
2272
+ : function (t) {
2273
+ if (Array.isArray(t)) return new f(t);
2274
+ throw Error('illegal buffer');
2275
+ };
2276
+ function l() {
2277
+ var t = new s(0, 0),
2278
+ i = 0;
2279
+ if (!(4 < this.len - this.pos)) {
2280
+ for (; i < 3; ++i) {
2281
+ if (this.pos >= this.len) throw u(this);
2282
+ if (
2283
+ ((t.lo = (t.lo | ((127 & this.buf[this.pos]) << (7 * i))) >>> 0),
2284
+ this.buf[this.pos++] < 128)
2285
+ )
2286
+ return t;
2287
+ }
2288
+ return (t.lo = (t.lo | ((127 & this.buf[this.pos++]) << (7 * i))) >>> 0), t;
2289
+ }
2290
+ for (; i < 4; ++i)
2291
+ if (
2292
+ ((t.lo = (t.lo | ((127 & this.buf[this.pos]) << (7 * i))) >>> 0),
2293
+ this.buf[this.pos++] < 128)
2294
+ )
2295
+ return t;
2296
+ if (
2297
+ ((t.lo = (t.lo | ((127 & this.buf[this.pos]) << 28)) >>> 0),
2298
+ (t.hi = (t.hi | ((127 & this.buf[this.pos]) >> 4)) >>> 0),
2299
+ this.buf[this.pos++] < 128)
2300
+ )
2301
+ return t;
2302
+ if (((i = 0), 4 < this.len - this.pos)) {
2303
+ for (; i < 5; ++i)
2304
+ if (
2305
+ ((t.hi = (t.hi | ((127 & this.buf[this.pos]) << (7 * i + 3))) >>> 0),
2306
+ this.buf[this.pos++] < 128)
2307
+ )
2308
+ return t;
2309
+ } else
2310
+ for (; i < 5; ++i) {
2311
+ if (this.pos >= this.len) throw u(this);
2312
+ if (
2313
+ ((t.hi = (t.hi | ((127 & this.buf[this.pos]) << (7 * i + 3))) >>> 0),
2314
+ this.buf[this.pos++] < 128)
2315
+ )
2316
+ return t;
2317
+ }
2318
+ throw Error('invalid varint encoding');
2319
+ }
2320
+ function v(t, i) {
2321
+ return (t[i - 4] | (t[i - 3] << 8) | (t[i - 2] << 16) | (t[i - 1] << 24)) >>> 0;
2322
+ }
2323
+ function d() {
2324
+ if (this.pos + 8 > this.len) throw u(this, 8);
2325
+ return new s(v(this.buf, (this.pos += 4)), v(this.buf, (this.pos += 4)));
2326
+ }
2327
+ (f.create = h()),
2328
+ (f.prototype.c = e.Array.prototype.subarray || e.Array.prototype.slice),
2329
+ (f.prototype.uint32 =
2330
+ ((a = 4294967295),
2331
+ function () {
2332
+ if (((a = (127 & this.buf[this.pos]) >>> 0), this.buf[this.pos++] < 128)) return a;
2333
+ if (((a = (a | ((127 & this.buf[this.pos]) << 7)) >>> 0), this.buf[this.pos++] < 128))
2334
+ return a;
2335
+ if (
2336
+ ((a = (a | ((127 & this.buf[this.pos]) << 14)) >>> 0), this.buf[this.pos++] < 128)
2337
+ )
2338
+ return a;
2339
+ if (
2340
+ ((a = (a | ((127 & this.buf[this.pos]) << 21)) >>> 0), this.buf[this.pos++] < 128)
2341
+ )
2342
+ return a;
2343
+ if (((a = (a | ((15 & this.buf[this.pos]) << 28)) >>> 0), this.buf[this.pos++] < 128))
2344
+ return a;
2345
+ if ((this.pos += 5) > this.len) throw ((this.pos = this.len), u(this, 10));
2346
+ return a;
2347
+ })),
2348
+ (f.prototype.int32 = function () {
2349
+ return 0 | this.uint32();
2350
+ }),
2351
+ (f.prototype.sint32 = function () {
2352
+ var t = this.uint32();
2353
+ return ((t >>> 1) ^ -(1 & t)) | 0;
2354
+ }),
2355
+ (f.prototype.bool = function () {
2356
+ return 0 !== this.uint32();
2357
+ }),
2358
+ (f.prototype.fixed32 = function () {
2359
+ if (this.pos + 4 > this.len) throw u(this, 4);
2360
+ return v(this.buf, (this.pos += 4));
2361
+ }),
2362
+ (f.prototype.sfixed32 = function () {
2363
+ if (this.pos + 4 > this.len) throw u(this, 4);
2364
+ return 0 | v(this.buf, (this.pos += 4));
2365
+ }),
2366
+ (f.prototype.float = function () {
2367
+ if (this.pos + 4 > this.len) throw u(this, 4);
2368
+ var t = e.float.readFloatLE(this.buf, this.pos);
2369
+ return (this.pos += 4), t;
2370
+ }),
2371
+ (f.prototype.double = function () {
2372
+ if (this.pos + 8 > this.len) throw u(this, 4);
2373
+ var t = e.float.readDoubleLE(this.buf, this.pos);
2374
+ return (this.pos += 8), t;
2375
+ }),
2376
+ (f.prototype.bytes = function () {
2377
+ var t = this.uint32(),
2378
+ i = this.pos,
2379
+ n = this.pos + t;
2380
+ if (n > this.len) throw u(this, t);
2381
+ return (
2382
+ (this.pos += t),
2383
+ Array.isArray(this.buf)
2384
+ ? this.buf.slice(i, n)
2385
+ : i === n
2386
+ ? new this.buf.constructor(0)
2387
+ : this.c.call(this.buf, i, n)
2388
+ );
2389
+ }),
2390
+ (f.prototype.string = function () {
2391
+ var t = this.bytes();
2392
+ return o.read(t, 0, t.length);
2393
+ }),
2394
+ (f.prototype.skip = function (t) {
2395
+ if ('number' == typeof t) {
2396
+ if (this.pos + t > this.len) throw u(this, t);
2397
+ this.pos += t;
2398
+ } else
2399
+ do {
2400
+ if (this.pos >= this.len) throw u(this);
2401
+ } while (128 & this.buf[this.pos++]);
2402
+ return this;
2403
+ }),
2404
+ (f.prototype.skipType = function (t) {
2405
+ switch (t) {
2406
+ case 0:
2407
+ this.skip();
2408
+ break;
2409
+ case 1:
2410
+ this.skip(8);
2411
+ break;
2412
+ case 2:
2413
+ this.skip(this.uint32());
2414
+ break;
2415
+ case 3:
2416
+ for (; 4 != (t = 7 & this.uint32()); ) this.skipType(t);
2417
+ break;
2418
+ case 5:
2419
+ this.skip(4);
2420
+ break;
2421
+ default:
2422
+ throw Error('invalid wire type ' + t + ' at offset ' + this.pos);
2423
+ }
2424
+ return this;
2425
+ }),
2426
+ (f.u = function (t) {
2427
+ (r = t), (f.create = h()), r.u();
2428
+ var i = e.Long ? 'toLong' : 'toNumber';
2429
+ e.merge(f.prototype, {
2430
+ int64: function () {
2431
+ return l.call(this)[i](!1);
2432
+ },
2433
+ uint64: function () {
2434
+ return l.call(this)[i](!0);
2435
+ },
2436
+ sint64: function () {
2437
+ return l.call(this).zzDecode()[i](!1);
2438
+ },
2439
+ fixed64: function () {
2440
+ return d.call(this)[i](!0);
2441
+ },
2442
+ sfixed64: function () {
2443
+ return d.call(this)[i](!1);
2444
+ }
2445
+ });
2446
+ });
2447
+ },
2448
+ { 39: 39 }
2449
+ ],
2450
+ 28: [
2451
+ function (t, i, n) {
2452
+ i.exports = s;
2453
+ var r = t(27);
2454
+ (s.prototype = Object.create(r.prototype)).constructor = s;
2455
+ var e = t(39);
2456
+ function s(t) {
2457
+ r.call(this, t);
2458
+ }
2459
+ (s.u = function () {
2460
+ e.Buffer && (s.prototype.c = e.Buffer.prototype.slice);
2461
+ }),
2462
+ (s.prototype.string = function () {
2463
+ var t = this.uint32();
2464
+ return this.buf.utf8Slice
2465
+ ? this.buf.utf8Slice(this.pos, (this.pos = Math.min(this.pos + t, this.len)))
2466
+ : this.buf.toString('utf-8', this.pos, (this.pos = Math.min(this.pos + t, this.len)));
2467
+ }),
2468
+ s.u();
2469
+ },
2470
+ { 27: 27, 39: 39 }
2471
+ ],
2472
+ 29: [
2473
+ function (t, i, n) {
2474
+ i.exports = f;
2475
+ var r = t(23);
2476
+ ((f.prototype = Object.create(r.prototype)).constructor = f).className = 'Root';
2477
+ var e,
2478
+ v,
2479
+ d,
2480
+ s = t(16),
2481
+ o = t(15),
2482
+ u = t(25),
2483
+ p = t(37);
2484
+ function f(t) {
2485
+ r.call(this, '', t), (this.deferred = []), (this.files = []);
2486
+ }
2487
+ function b() {}
2488
+ (f.fromJSON = function (t, i) {
2489
+ return (i = i || new f()), t.options && i.setOptions(t.options), i.addJSON(t.nested);
2490
+ }),
2491
+ (f.prototype.resolvePath = p.path.resolve),
2492
+ (f.prototype.fetch = p.fetch),
2493
+ (f.prototype.load = function t(i, s, e) {
2494
+ 'function' == typeof s && ((e = s), (s = Q));
2495
+ var o = this;
2496
+ if (!e) return p.asPromise(t, o, i, s);
2497
+ var u = e === b;
2498
+ function f(t, i) {
2499
+ if (e) {
2500
+ var n = e;
2501
+ if (((e = null), u)) throw t;
2502
+ n(t, i);
2503
+ }
2504
+ }
2505
+ function h(t) {
2506
+ var i = t.lastIndexOf('google/protobuf/');
2507
+ if (-1 < i) {
2508
+ i = t.substring(i);
2509
+ if (i in d) return i;
2510
+ }
2511
+ return null;
2512
+ }
2513
+ function a(t, i) {
2514
+ try {
2515
+ if ((p.isString(i) && '{' == (i[0] || '') && (i = JSON.parse(i)), p.isString(i))) {
2516
+ v.filename = t;
2517
+ var n,
2518
+ r = v(i, o, s),
2519
+ e = 0;
2520
+ if (r.imports)
2521
+ for (; e < r.imports.length; ++e)
2522
+ (n = h(r.imports[e]) || o.resolvePath(t, r.imports[e])) && c(n);
2523
+ if (r.weakImports)
2524
+ for (e = 0; e < r.weakImports.length; ++e)
2525
+ (n = h(r.weakImports[e]) || o.resolvePath(t, r.weakImports[e])) && c(n, !0);
2526
+ } else o.setOptions(i.options).addJSON(i.nested);
2527
+ } catch (t) {
2528
+ f(t);
2529
+ }
2530
+ u || l || f(null, o);
2531
+ }
2532
+ function c(n, r) {
2533
+ if (!~o.files.indexOf(n))
2534
+ if ((o.files.push(n), n in d))
2535
+ u
2536
+ ? a(n, d[n])
2537
+ : (++l,
2538
+ setTimeout(function () {
2539
+ --l, a(n, d[n]);
2540
+ }));
2541
+ else if (u) {
2542
+ var t;
2543
+ try {
2544
+ t = p.fs.readFileSync(n).toString('utf8');
2545
+ } catch (t) {
2546
+ return void (r || f(t));
2547
+ }
2548
+ a(n, t);
2549
+ } else
2550
+ ++l,
2551
+ o.fetch(n, function (t, i) {
2552
+ --l, e && (t ? (r ? l || f(null, o) : f(t)) : a(n, i));
2553
+ });
2554
+ }
2555
+ var l = 0;
2556
+ p.isString(i) && (i = [i]);
2557
+ for (var n, r = 0; r < i.length; ++r) (n = o.resolvePath('', i[r])) && c(n);
2558
+ return u ? o : (l || f(null, o), Q);
2559
+ }),
2560
+ (f.prototype.loadSync = function (t, i) {
2561
+ if (!p.isNode) throw Error('not supported');
2562
+ return this.load(t, i, b);
2563
+ }),
2564
+ (f.prototype.resolveAll = function () {
2565
+ if (this.deferred.length)
2566
+ throw Error(
2567
+ 'unresolvable extensions: ' +
2568
+ this.deferred
2569
+ .map(function (t) {
2570
+ return "'extend " + t.extend + "' in " + t.parent.fullName;
2571
+ })
2572
+ .join(', ')
2573
+ );
2574
+ return r.prototype.resolveAll.call(this);
2575
+ });
2576
+ var h = /^[A-Z]/;
2577
+ function a(t, i) {
2578
+ var n = i.parent.lookup(i.extend);
2579
+ if (n) {
2580
+ var r = new s(i.fullName, i.id, i.type, i.rule, Q, i.options);
2581
+ return ((r.declaringField = i).extensionField = r), n.add(r), 1;
2582
+ }
2583
+ }
2584
+ (f.prototype.h = function (t) {
2585
+ if (t instanceof s)
2586
+ t.extend === Q || t.extensionField || a(0, t) || this.deferred.push(t);
2587
+ else if (t instanceof o) h.test(t.name) && (t.parent[t.name] = t.values);
2588
+ else if (!(t instanceof u)) {
2589
+ if (t instanceof e)
2590
+ for (var i = 0; i < this.deferred.length; )
2591
+ a(0, this.deferred[i]) ? this.deferred.splice(i, 1) : ++i;
2592
+ for (var n = 0; n < t.nestedArray.length; ++n) this.h(t.f[n]);
2593
+ h.test(t.name) && (t.parent[t.name] = t);
2594
+ }
2595
+ }),
2596
+ (f.prototype.a = function (t) {
2597
+ var i;
2598
+ if (t instanceof s)
2599
+ t.extend !== Q &&
2600
+ (t.extensionField
2601
+ ? (t.extensionField.parent.remove(t.extensionField), (t.extensionField = null))
2602
+ : -1 < (i = this.deferred.indexOf(t)) && this.deferred.splice(i, 1));
2603
+ else if (t instanceof o) h.test(t.name) && delete t.parent[t.name];
2604
+ else if (t instanceof r) {
2605
+ for (var n = 0; n < t.nestedArray.length; ++n) this.a(t.f[n]);
2606
+ h.test(t.name) && delete t.parent[t.name];
2607
+ }
2608
+ }),
2609
+ (f.u = function (t, i, n) {
2610
+ (e = t), (v = i), (d = n);
2611
+ });
2612
+ },
2613
+ { 15: 15, 16: 16, 23: 23, 25: 25, 37: 37 }
2614
+ ],
2615
+ 30: [
2616
+ function (t, i, n) {
2617
+ i.exports = {};
2618
+ },
2619
+ {}
2620
+ ],
2621
+ 31: [
2622
+ function (t, i, n) {
2623
+ n.Service = t(32);
2624
+ },
2625
+ { 32: 32 }
2626
+ ],
2627
+ 32: [
2628
+ function (t, i, n) {
2629
+ i.exports = r;
2630
+ var u = t(39);
2631
+ function r(t, i, n) {
2632
+ if ('function' != typeof t) throw TypeError('rpcImpl must be a function');
2633
+ u.EventEmitter.call(this),
2634
+ (this.rpcImpl = t),
2635
+ (this.requestDelimited = !!i),
2636
+ (this.responseDelimited = !!n);
2637
+ }
2638
+ (((r.prototype = Object.create(u.EventEmitter.prototype)).constructor =
2639
+ r).prototype.rpcCall = function t(n, i, r, e, s) {
2640
+ if (!e) throw TypeError('request must be specified');
2641
+ var o = this;
2642
+ if (!s) return u.asPromise(t, o, n, i, r, e);
2643
+ if (!o.rpcImpl)
2644
+ return (
2645
+ setTimeout(function () {
2646
+ s(Error('already ended'));
2647
+ }, 0),
2648
+ Q
2649
+ );
2650
+ try {
2651
+ return o.rpcImpl(
2652
+ n,
2653
+ i[o.requestDelimited ? 'encodeDelimited' : 'encode'](e).finish(),
2654
+ function (t, i) {
2655
+ if (t) return o.emit('error', t, n), s(t);
2656
+ if (null === i) return o.end(!0), Q;
2657
+ if (!(i instanceof r))
2658
+ try {
2659
+ i = r[o.responseDelimited ? 'decodeDelimited' : 'decode'](i);
2660
+ } catch (t) {
2661
+ return o.emit('error', t, n), s(t);
2662
+ }
2663
+ return o.emit('data', i, n), s(null, i);
2664
+ }
2665
+ );
2666
+ } catch (t) {
2667
+ return (
2668
+ o.emit('error', t, n),
2669
+ setTimeout(function () {
2670
+ s(t);
2671
+ }, 0),
2672
+ Q
2673
+ );
2674
+ }
2675
+ }),
2676
+ (r.prototype.end = function (t) {
2677
+ return (
2678
+ this.rpcImpl &&
2679
+ (t || this.rpcImpl(null, null, null),
2680
+ (this.rpcImpl = null),
2681
+ this.emit('end').off()),
2682
+ this
2683
+ );
2684
+ });
2685
+ },
2686
+ { 39: 39 }
2687
+ ],
2688
+ 33: [
2689
+ function (t, i, n) {
2690
+ i.exports = o;
2691
+ var r = t(23);
2692
+ ((o.prototype = Object.create(r.prototype)).constructor = o).className = 'Service';
2693
+ var s = t(22),
2694
+ u = t(37),
2695
+ f = t(31);
2696
+ function o(t, i) {
2697
+ r.call(this, t, i), (this.methods = {}), (this.l = null);
2698
+ }
2699
+ function e(t) {
2700
+ return (t.l = null), t;
2701
+ }
2702
+ (o.fromJSON = function (t, i) {
2703
+ var n = new o(t, i.options);
2704
+ if (i.methods)
2705
+ for (var r = Object.keys(i.methods), e = 0; e < r.length; ++e)
2706
+ n.add(s.fromJSON(r[e], i.methods[r[e]]));
2707
+ return i.nested && n.addJSON(i.nested), (n.comment = i.comment), n;
2708
+ }),
2709
+ (o.prototype.toJSON = function (t) {
2710
+ var i = r.prototype.toJSON.call(this, t),
2711
+ n = !!t && !!t.keepComments;
2712
+ return u.toObject([
2713
+ 'options',
2714
+ (i && i.options) || Q,
2715
+ 'methods',
2716
+ r.arrayToJSON(this.methodsArray, t) || {},
2717
+ 'nested',
2718
+ (i && i.nested) || Q,
2719
+ 'comment',
2720
+ n ? this.comment : Q
2721
+ ]);
2722
+ }),
2723
+ Object.defineProperty(o.prototype, 'methodsArray', {
2724
+ get: function () {
2725
+ return this.l || (this.l = u.toArray(this.methods));
2726
+ }
2727
+ }),
2728
+ (o.prototype.get = function (t) {
2729
+ return this.methods[t] || r.prototype.get.call(this, t);
2730
+ }),
2731
+ (o.prototype.resolveAll = function () {
2732
+ for (var t = this.methodsArray, i = 0; i < t.length; ++i) t[i].resolve();
2733
+ return r.prototype.resolve.call(this);
2734
+ }),
2735
+ (o.prototype.add = function (t) {
2736
+ if (this.get(t.name)) throw Error("duplicate name '" + t.name + "' in " + this);
2737
+ return t instanceof s
2738
+ ? e(((this.methods[t.name] = t).parent = this))
2739
+ : r.prototype.add.call(this, t);
2740
+ }),
2741
+ (o.prototype.remove = function (t) {
2742
+ if (t instanceof s) {
2743
+ if (this.methods[t.name] !== t) throw Error(t + ' is not a member of ' + this);
2744
+ return delete this.methods[t.name], (t.parent = null), e(this);
2745
+ }
2746
+ return r.prototype.remove.call(this, t);
2747
+ }),
2748
+ (o.prototype.create = function (t, i, n) {
2749
+ for (var r, e = new f.Service(t, i, n), s = 0; s < this.methodsArray.length; ++s) {
2750
+ var o = u.lcFirst((r = this.l[s]).resolve().name).replace(/[^$\w_]/g, '');
2751
+ e[o] = u.codegen(
2752
+ ['r', 'c'],
2753
+ u.isReserved(o) ? o + '_' : o
2754
+ )('return this.rpcCall(m,q,s,r,c)')({
2755
+ m: r,
2756
+ q: r.resolvedRequestType.ctor,
2757
+ s: r.resolvedResponseType.ctor
2758
+ });
2759
+ }
2760
+ return e;
2761
+ });
2762
+ },
2763
+ { 22: 22, 23: 23, 31: 31, 37: 37 }
2764
+ ],
2765
+ 34: [
2766
+ function (t, i, n) {
2767
+ i.exports = s;
2768
+ var A = /[\s{}=;:[\],'"()<>]/g,
2769
+ x = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,
2770
+ T = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,
2771
+ S = /^ *[*/]+ */,
2772
+ N = /^\s*\*?\/*/,
2773
+ V = /\n/g,
2774
+ $ = /\s/,
2775
+ r = /\\(.?)/g,
2776
+ e = { 0: '\0', r: '\r', n: '\n', t: '\t' };
2777
+ function M(t) {
2778
+ return t.replace(r, function (t, i) {
2779
+ switch (i) {
2780
+ case '\\':
2781
+ case '':
2782
+ return i;
2783
+ default:
2784
+ return e[i] || '';
2785
+ }
2786
+ });
2787
+ }
2788
+ function s(f, h) {
2789
+ f = f.toString();
2790
+ var a = 0,
2791
+ c = f.length,
2792
+ l = 1,
2793
+ u = null,
2794
+ v = null,
2795
+ d = 0,
2796
+ p = !1,
2797
+ b = !1,
2798
+ w = [],
2799
+ y = null;
2800
+ function m(t) {
2801
+ return Error('illegal ' + t + ' (line ' + l + ')');
2802
+ }
2803
+ function g(t) {
2804
+ return f[0 | t] || '';
2805
+ }
2806
+ function j(t, i, n) {
2807
+ (u = f[0 | t++] || ''), (d = l), (p = !1), (b = n);
2808
+ var r,
2809
+ e = t - (h ? 2 : 3);
2810
+ do {
2811
+ if (--e < 0 || '\n' == (r = f[0 | e] || '')) {
2812
+ p = !0;
2813
+ break;
2814
+ }
2815
+ } while (' ' === r || '\t' === r);
2816
+ for (var s = f.substring(t, i).split(V), o = 0; o < s.length; ++o)
2817
+ s[o] = s[o].replace(h ? N : S, '').trim();
2818
+ v = s.join('\n').trim();
2819
+ }
2820
+ function k(t) {
2821
+ var i = O(t),
2822
+ i = f.substring(t, i);
2823
+ return /^\s*\/{1,2}/.test(i);
2824
+ }
2825
+ function O(t) {
2826
+ for (var i = t; i < c && '\n' !== g(i); ) i++;
2827
+ return i;
2828
+ }
2829
+ function r() {
2830
+ if (0 < w.length) return w.shift();
2831
+ if (y)
2832
+ return (function () {
2833
+ var t = "'" === y ? T : x;
2834
+ t.lastIndex = a - 1;
2835
+ var i = t.exec(f);
2836
+ if (!i) throw m('string');
2837
+ return (a = t.lastIndex), E(y), (y = null), M(i[1]);
2838
+ })();
2839
+ var t,
2840
+ i,
2841
+ n,
2842
+ r,
2843
+ e,
2844
+ s = 0 === a;
2845
+ do {
2846
+ if (a === c) return null;
2847
+ for (t = !1; $.test((n = g(a))); )
2848
+ if (('\n' === n && ((s = !0), ++l), ++a === c)) return null;
2849
+ if ('/' === g(a)) {
2850
+ if (++a === c) throw m('comment');
2851
+ if ('/' === g(a))
2852
+ if (h) {
2853
+ if (((e = !1), k((r = a)))) for (e = !0; (a = O(a)) !== c && k(++a); );
2854
+ else a = Math.min(c, O(a) + 1);
2855
+ e && j(r, a, s), l++, (t = !0);
2856
+ } else {
2857
+ for (e = '/' === g((r = a + 1)); '\n' !== g(++a); ) if (a === c) return null;
2858
+ ++a, e && j(r, a - 1, s), ++l, (t = !0);
2859
+ }
2860
+ else {
2861
+ if ('*' !== (n = g(a))) return '/';
2862
+ (r = a + 1), (e = h || '*' === g(r));
2863
+ do {
2864
+ if (('\n' === n && ++l, ++a === c)) throw m('comment');
2865
+ } while (((i = n), (n = g(a)), '*' !== i || '/' !== n));
2866
+ ++a, e && j(r, a - 2, s), (t = !0);
2867
+ }
2868
+ }
2869
+ } while (t);
2870
+ var o = a;
2871
+ if (((A.lastIndex = 0), !A.test(g(o++)))) for (; o < c && !A.test(g(o)); ) ++o;
2872
+ var u = f.substring(a, (a = o));
2873
+ return ('"' != u && "'" != u) || (y = u), u;
2874
+ }
2875
+ function E(t) {
2876
+ w.push(t);
2877
+ }
2878
+ function e() {
2879
+ if (!w.length) {
2880
+ var t = r();
2881
+ if (null === t) return null;
2882
+ E(t);
2883
+ }
2884
+ return w[0];
2885
+ }
2886
+ return Object.defineProperty(
2887
+ {
2888
+ next: r,
2889
+ peek: e,
2890
+ push: E,
2891
+ skip: function (t, i) {
2892
+ var n = e();
2893
+ if (n === t) return r(), !0;
2894
+ if (!i) throw m("token '" + n + "', '" + t + "' expected");
2895
+ return !1;
2896
+ },
2897
+ cmnt: function (t) {
2898
+ var i = null;
2899
+ return (
2900
+ t === Q
2901
+ ? d === l - 1 && (h || '*' === u || p) && (i = b ? v : null)
2902
+ : (d < t && e(), d !== t || p || (!h && '/' !== u) || (i = b ? null : v)),
2903
+ i
2904
+ );
2905
+ }
2906
+ },
2907
+ 'line',
2908
+ {
2909
+ get: function () {
2910
+ return l;
2911
+ }
2912
+ }
2913
+ );
2914
+ }
2915
+ s.unescape = M;
2916
+ },
2917
+ {}
2918
+ ],
2919
+ 35: [
2920
+ function (t, i, n) {
2921
+ i.exports = m;
2922
+ var o = t(23);
2923
+ ((m.prototype = Object.create(o.prototype)).constructor = m).className = 'Type';
2924
+ var u = t(15),
2925
+ f = t(25),
2926
+ h = t(16),
2927
+ a = t(20),
2928
+ c = t(33),
2929
+ e = t(21),
2930
+ s = t(27),
2931
+ l = t(42),
2932
+ v = t(37),
2933
+ d = t(14),
2934
+ p = t(13),
2935
+ b = t(40),
2936
+ w = t(12),
2937
+ y = t(41);
2938
+ function m(t, i) {
2939
+ o.call(this, t, i),
2940
+ (this.fields = {}),
2941
+ (this.oneofs = Q),
2942
+ (this.extensions = Q),
2943
+ (this.reserved = Q),
2944
+ (this.group = Q),
2945
+ (this.v = null),
2946
+ (this.e = null),
2947
+ (this.p = null),
2948
+ (this.b = null);
2949
+ }
2950
+ function r(t) {
2951
+ return (t.v = t.e = t.p = null), delete t.encode, delete t.decode, delete t.verify, t;
2952
+ }
2953
+ Object.defineProperties(m.prototype, {
2954
+ fieldsById: {
2955
+ get: function () {
2956
+ if (this.v) return this.v;
2957
+ this.v = {};
2958
+ for (var t = Object.keys(this.fields), i = 0; i < t.length; ++i) {
2959
+ var n = this.fields[t[i]],
2960
+ r = n.id;
2961
+ if (this.v[r]) throw Error('duplicate id ' + r + ' in ' + this);
2962
+ this.v[r] = n;
2963
+ }
2964
+ return this.v;
2965
+ }
2966
+ },
2967
+ fieldsArray: {
2968
+ get: function () {
2969
+ return this.e || (this.e = v.toArray(this.fields));
2970
+ }
2971
+ },
2972
+ oneofsArray: {
2973
+ get: function () {
2974
+ return this.p || (this.p = v.toArray(this.oneofs));
2975
+ }
2976
+ },
2977
+ ctor: {
2978
+ get: function () {
2979
+ return this.b || (this.ctor = m.generateConstructor(this)());
2980
+ },
2981
+ set: function (t) {
2982
+ var i = t.prototype;
2983
+ i instanceof e ||
2984
+ (((t.prototype = new e()).constructor = t), v.merge(t.prototype, i)),
2985
+ (t.$type = t.prototype.$type = this),
2986
+ v.merge(t, e, !0),
2987
+ (this.b = t);
2988
+ for (var n = 0; n < this.fieldsArray.length; ++n) this.e[n].resolve();
2989
+ for (var r = {}, n = 0; n < this.oneofsArray.length; ++n)
2990
+ r[this.p[n].resolve().name] = {
2991
+ get: v.oneOfGetter(this.p[n].oneof),
2992
+ set: v.oneOfSetter(this.p[n].oneof)
2993
+ };
2994
+ n && Object.defineProperties(t.prototype, r);
2995
+ }
2996
+ }
2997
+ }),
2998
+ (m.generateConstructor = function (t) {
2999
+ for (var i, n = v.codegen(['p'], t.name), r = 0; r < t.fieldsArray.length; ++r)
3000
+ (i = t.e[r]).map
3001
+ ? n('this%s={}', v.safeProp(i.name))
3002
+ : i.repeated && n('this%s=[]', v.safeProp(i.name));
3003
+ return n('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)')(
3004
+ 'this[ks[i]]=p[ks[i]]'
3005
+ );
3006
+ }),
3007
+ (m.fromJSON = function (t, i) {
3008
+ var n = new m(t, i.options);
3009
+ (n.extensions = i.extensions), (n.reserved = i.reserved);
3010
+ for (var r = Object.keys(i.fields), e = 0; e < r.length; ++e)
3011
+ n.add((void 0 !== i.fields[r[e]].keyType ? a : h).fromJSON(r[e], i.fields[r[e]]));
3012
+ if (i.oneofs)
3013
+ for (r = Object.keys(i.oneofs), e = 0; e < r.length; ++e)
3014
+ n.add(f.fromJSON(r[e], i.oneofs[r[e]]));
3015
+ if (i.nested)
3016
+ for (r = Object.keys(i.nested), e = 0; e < r.length; ++e) {
3017
+ var s = i.nested[r[e]];
3018
+ n.add(
3019
+ (s.id !== Q
3020
+ ? h
3021
+ : s.fields !== Q
3022
+ ? m
3023
+ : s.values !== Q
3024
+ ? u
3025
+ : s.methods !== Q
3026
+ ? c
3027
+ : o
3028
+ ).fromJSON(r[e], s)
3029
+ );
3030
+ }
3031
+ return (
3032
+ i.extensions && i.extensions.length && (n.extensions = i.extensions),
3033
+ i.reserved && i.reserved.length && (n.reserved = i.reserved),
3034
+ i.group && (n.group = !0),
3035
+ i.comment && (n.comment = i.comment),
3036
+ n
3037
+ );
3038
+ }),
3039
+ (m.prototype.toJSON = function (t) {
3040
+ var i = o.prototype.toJSON.call(this, t),
3041
+ n = !!t && !!t.keepComments;
3042
+ return v.toObject([
3043
+ 'options',
3044
+ (i && i.options) || Q,
3045
+ 'oneofs',
3046
+ o.arrayToJSON(this.oneofsArray, t),
3047
+ 'fields',
3048
+ o.arrayToJSON(
3049
+ this.fieldsArray.filter(function (t) {
3050
+ return !t.declaringField;
3051
+ }),
3052
+ t
3053
+ ) || {},
3054
+ 'extensions',
3055
+ this.extensions && this.extensions.length ? this.extensions : Q,
3056
+ 'reserved',
3057
+ this.reserved && this.reserved.length ? this.reserved : Q,
3058
+ 'group',
3059
+ this.group || Q,
3060
+ 'nested',
3061
+ (i && i.nested) || Q,
3062
+ 'comment',
3063
+ n ? this.comment : Q
3064
+ ]);
3065
+ }),
3066
+ (m.prototype.resolveAll = function () {
3067
+ for (var t = this.fieldsArray, i = 0; i < t.length; ) t[i++].resolve();
3068
+ for (var n = this.oneofsArray, i = 0; i < n.length; ) n[i++].resolve();
3069
+ return o.prototype.resolveAll.call(this);
3070
+ }),
3071
+ (m.prototype.get = function (t) {
3072
+ return (
3073
+ this.fields[t] ||
3074
+ (this.oneofs && this.oneofs[t]) ||
3075
+ (this.nested && this.nested[t]) ||
3076
+ null
3077
+ );
3078
+ }),
3079
+ (m.prototype.add = function (t) {
3080
+ if (this.get(t.name)) throw Error("duplicate name '" + t.name + "' in " + this);
3081
+ if (t instanceof h && t.extend === Q) {
3082
+ if ((this.v || this.fieldsById)[t.id])
3083
+ throw Error('duplicate id ' + t.id + ' in ' + this);
3084
+ if (this.isReservedId(t.id)) throw Error('id ' + t.id + ' is reserved in ' + this);
3085
+ if (this.isReservedName(t.name))
3086
+ throw Error("name '" + t.name + "' is reserved in " + this);
3087
+ return (
3088
+ t.parent && t.parent.remove(t),
3089
+ ((this.fields[t.name] = t).message = this),
3090
+ t.onAdd(this),
3091
+ r(this)
3092
+ );
3093
+ }
3094
+ return t instanceof f
3095
+ ? (this.oneofs || (this.oneofs = {}), (this.oneofs[t.name] = t).onAdd(this), r(this))
3096
+ : o.prototype.add.call(this, t);
3097
+ }),
3098
+ (m.prototype.remove = function (t) {
3099
+ if (t instanceof h && t.extend === Q) {
3100
+ if (!this.fields || this.fields[t.name] !== t)
3101
+ throw Error(t + ' is not a member of ' + this);
3102
+ return delete this.fields[t.name], (t.parent = null), t.onRemove(this), r(this);
3103
+ }
3104
+ if (t instanceof f) {
3105
+ if (!this.oneofs || this.oneofs[t.name] !== t)
3106
+ throw Error(t + ' is not a member of ' + this);
3107
+ return delete this.oneofs[t.name], (t.parent = null), t.onRemove(this), r(this);
3108
+ }
3109
+ return o.prototype.remove.call(this, t);
3110
+ }),
3111
+ (m.prototype.isReservedId = function (t) {
3112
+ return o.isReservedId(this.reserved, t);
3113
+ }),
3114
+ (m.prototype.isReservedName = function (t) {
3115
+ return o.isReservedName(this.reserved, t);
3116
+ }),
3117
+ (m.prototype.create = function (t) {
3118
+ return new this.ctor(t);
3119
+ }),
3120
+ (m.prototype.setup = function () {
3121
+ for (var t = this.fullName, i = [], n = 0; n < this.fieldsArray.length; ++n)
3122
+ i.push(this.e[n].resolve().resolvedType);
3123
+ (this.encode = d(this)({ Writer: l, types: i, util: v })),
3124
+ (this.decode = p(this)({ Reader: s, types: i, util: v })),
3125
+ (this.verify = b(this)({ types: i, util: v })),
3126
+ (this.fromObject = w.fromObject(this)({ types: i, util: v })),
3127
+ (this.toObject = w.toObject(this)({ types: i, util: v }));
3128
+ var r = y[t];
3129
+ return (
3130
+ r &&
3131
+ (((t = Object.create(this)).fromObject = this.fromObject),
3132
+ (this.fromObject = r.fromObject.bind(t)),
3133
+ (t.toObject = this.toObject),
3134
+ (this.toObject = r.toObject.bind(t))),
3135
+ this
3136
+ );
3137
+ }),
3138
+ (m.prototype.encode = function (t, i) {
3139
+ return this.setup().encode(t, i);
3140
+ }),
3141
+ (m.prototype.encodeDelimited = function (t, i) {
3142
+ return this.encode(t, i && i.len ? i.fork() : i).ldelim();
3143
+ }),
3144
+ (m.prototype.decode = function (t, i) {
3145
+ return this.setup().decode(t, i);
3146
+ }),
3147
+ (m.prototype.decodeDelimited = function (t) {
3148
+ return t instanceof s || (t = s.create(t)), this.decode(t, t.uint32());
3149
+ }),
3150
+ (m.prototype.verify = function (t) {
3151
+ return this.setup().verify(t);
3152
+ }),
3153
+ (m.prototype.fromObject = function (t) {
3154
+ return this.setup().fromObject(t);
3155
+ }),
3156
+ (m.prototype.toObject = function (t, i) {
3157
+ return this.setup().toObject(t, i);
3158
+ }),
3159
+ (m.d = function (i) {
3160
+ return function (t) {
3161
+ v.decorateType(t, i);
3162
+ };
3163
+ });
3164
+ },
3165
+ {
3166
+ 12: 12,
3167
+ 13: 13,
3168
+ 14: 14,
3169
+ 15: 15,
3170
+ 16: 16,
3171
+ 20: 20,
3172
+ 21: 21,
3173
+ 23: 23,
3174
+ 25: 25,
3175
+ 27: 27,
3176
+ 33: 33,
3177
+ 37: 37,
3178
+ 40: 40,
3179
+ 41: 41,
3180
+ 42: 42
3181
+ }
3182
+ ],
3183
+ 36: [
3184
+ function (t, i, n) {
3185
+ var n = n,
3186
+ t = t(37),
3187
+ e = [
3188
+ 'double',
3189
+ 'float',
3190
+ 'int32',
3191
+ 'uint32',
3192
+ 'sint32',
3193
+ 'fixed32',
3194
+ 'sfixed32',
3195
+ 'int64',
3196
+ 'uint64',
3197
+ 'sint64',
3198
+ 'fixed64',
3199
+ 'sfixed64',
3200
+ 'bool',
3201
+ 'string',
3202
+ 'bytes'
3203
+ ];
3204
+ function r(t, i) {
3205
+ var n = 0,
3206
+ r = {};
3207
+ for (i |= 0; n < t.length; ) r[e[n + i]] = t[n++];
3208
+ return r;
3209
+ }
3210
+ (n.basic = r([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2])),
3211
+ (n.defaults = r([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, !1, '', t.emptyArray, null])),
3212
+ (n.long = r([0, 0, 0, 1, 1], 7)),
3213
+ (n.mapKey = r([0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2], 2)),
3214
+ (n.packed = r([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0]));
3215
+ },
3216
+ { 37: 37 }
3217
+ ],
3218
+ 37: [
3219
+ function (n, t, i) {
3220
+ var r,
3221
+ e,
3222
+ s = (t.exports = n(39)),
3223
+ o = n(30);
3224
+ (s.codegen = n(3)),
3225
+ (s.fetch = n(5)),
3226
+ (s.path = n(8)),
3227
+ (s.fs = s.inquire('fs')),
3228
+ (s.toArray = function (t) {
3229
+ if (t) {
3230
+ for (var i = Object.keys(t), n = Array(i.length), r = 0; r < i.length; )
3231
+ n[r] = t[i[r++]];
3232
+ return n;
3233
+ }
3234
+ return [];
3235
+ }),
3236
+ (s.toObject = function (t) {
3237
+ for (var i = {}, n = 0; n < t.length; ) {
3238
+ var r = t[n++],
3239
+ e = t[n++];
3240
+ e !== Q && (i[r] = e);
3241
+ }
3242
+ return i;
3243
+ });
3244
+ var u = /\\/g,
3245
+ f = /"/g;
3246
+ (s.isReserved = function (t) {
3247
+ 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(
3248
+ t
3249
+ );
3250
+ }),
3251
+ (s.safeProp = function (t) {
3252
+ return !/^[$\w_]+$/.test(t) || s.isReserved(t)
3253
+ ? '["' + t.replace(u, '\\\\').replace(f, '\\"') + '"]'
3254
+ : '.' + t;
3255
+ }),
3256
+ (s.ucFirst = function (t) {
3257
+ return (t[0] || '').toUpperCase() + t.substring(1);
3258
+ });
3259
+ var h = /_([a-z])/g;
3260
+ (s.camelCase = function (t) {
3261
+ return (
3262
+ t.substring(0, 1) +
3263
+ t.substring(1).replace(h, function (t, i) {
3264
+ return i.toUpperCase();
3265
+ })
3266
+ );
3267
+ }),
3268
+ (s.compareFieldsById = function (t, i) {
3269
+ return t.id - i.id;
3270
+ }),
3271
+ (s.decorateType = function (t, i) {
3272
+ if (t.$type)
3273
+ return (
3274
+ i &&
3275
+ t.$type.name !== i &&
3276
+ (s.decorateRoot.remove(t.$type), (t.$type.name = i), s.decorateRoot.add(t.$type)),
3277
+ t.$type
3278
+ );
3279
+ i = new (r = r || n(35))(i || t.name);
3280
+ return (
3281
+ s.decorateRoot.add(i),
3282
+ (i.ctor = t),
3283
+ Object.defineProperty(t, '$type', { value: i, enumerable: !1 }),
3284
+ Object.defineProperty(t.prototype, '$type', { value: i, enumerable: !1 }),
3285
+ i
3286
+ );
3287
+ });
3288
+ var a = 0;
3289
+ (s.decorateEnum = function (t) {
3290
+ if (t.$type) return t.$type;
3291
+ var i = new (e = e || n(15))('Enum' + a++, t);
3292
+ return (
3293
+ s.decorateRoot.add(i),
3294
+ Object.defineProperty(t, '$type', { value: i, enumerable: !1 }),
3295
+ i
3296
+ );
3297
+ }),
3298
+ (s.setProperty = function (t, i, n) {
3299
+ if ('object' != typeof t) throw TypeError('dst must be an object');
3300
+ if (!i) throw TypeError('path must be specified');
3301
+ return (function t(i, n, r) {
3302
+ var e = n.shift();
3303
+ return (
3304
+ 0 < n.length
3305
+ ? (i[e] = t(i[e] || {}, n, r))
3306
+ : ((n = i[e]) && (r = [].concat(n).concat(r)), (i[e] = r)),
3307
+ i
3308
+ );
3309
+ })(t, (i = i.split('.')), n);
3310
+ }),
3311
+ Object.defineProperty(s, 'decorateRoot', {
3312
+ get: function () {
3313
+ return o.decorated || (o.decorated = new (n(29))());
3314
+ }
3315
+ });
3316
+ },
3317
+ { 15: 15, 29: 29, 3: 3, 30: 30, 35: 35, 39: 39, 5: 5, 8: 8 }
3318
+ ],
3319
+ 38: [
3320
+ function (t, i, n) {
3321
+ i.exports = e;
3322
+ var r = t(39);
3323
+ function e(t, i) {
3324
+ (this.lo = t >>> 0), (this.hi = i >>> 0);
3325
+ }
3326
+ var s = (e.zero = new e(0, 0));
3327
+ (s.toNumber = function () {
3328
+ return 0;
3329
+ }),
3330
+ (s.zzEncode = s.zzDecode =
3331
+ function () {
3332
+ return this;
3333
+ }),
3334
+ (s.length = function () {
3335
+ return 1;
3336
+ });
3337
+ e.zeroHash = '\0\0\0\0\0\0\0\0';
3338
+ (e.fromNumber = function (t) {
3339
+ if (0 === t) return s;
3340
+ var i = t < 0,
3341
+ n = (t = i ? -t : t) >>> 0,
3342
+ t = ((t - n) / 4294967296) >>> 0;
3343
+ return (
3344
+ i &&
3345
+ ((t = ~t >>> 0),
3346
+ (n = ~n >>> 0),
3347
+ 4294967295 < ++n && ((n = 0), 4294967295 < ++t && (t = 0))),
3348
+ new e(n, t)
3349
+ );
3350
+ }),
3351
+ (e.from = function (t) {
3352
+ if ('number' == typeof t) return e.fromNumber(t);
3353
+ if (r.isString(t)) {
3354
+ if (!r.Long) return e.fromNumber(parseInt(t, 10));
3355
+ t = r.Long.fromString(t);
3356
+ }
3357
+ return t.low || t.high ? new e(t.low >>> 0, t.high >>> 0) : s;
3358
+ }),
3359
+ (e.prototype.toNumber = function (t) {
3360
+ if (!t && this.hi >>> 31) {
3361
+ var i = (1 + ~this.lo) >>> 0,
3362
+ t = ~this.hi >>> 0;
3363
+ return -(i + 4294967296 * (t = !i ? (t + 1) >>> 0 : t));
3364
+ }
3365
+ return this.lo + 4294967296 * this.hi;
3366
+ }),
3367
+ (e.prototype.toLong = function (t) {
3368
+ return r.Long
3369
+ ? new r.Long(0 | this.lo, 0 | this.hi, !!t)
3370
+ : { low: 0 | this.lo, high: 0 | this.hi, unsigned: !!t };
3371
+ });
3372
+ var o = String.prototype.charCodeAt;
3373
+ (e.fromHash = function (t) {
3374
+ return '\0\0\0\0\0\0\0\0' === t
3375
+ ? s
3376
+ : new e(
3377
+ (o.call(t, 0) |
3378
+ (o.call(t, 1) << 8) |
3379
+ (o.call(t, 2) << 16) |
3380
+ (o.call(t, 3) << 24)) >>>
3381
+ 0,
3382
+ (o.call(t, 4) |
3383
+ (o.call(t, 5) << 8) |
3384
+ (o.call(t, 6) << 16) |
3385
+ (o.call(t, 7) << 24)) >>>
3386
+ 0
3387
+ );
3388
+ }),
3389
+ (e.prototype.toHash = function () {
3390
+ return String.fromCharCode(
3391
+ 255 & this.lo,
3392
+ (this.lo >>> 8) & 255,
3393
+ (this.lo >>> 16) & 255,
3394
+ this.lo >>> 24,
3395
+ 255 & this.hi,
3396
+ (this.hi >>> 8) & 255,
3397
+ (this.hi >>> 16) & 255,
3398
+ this.hi >>> 24
3399
+ );
3400
+ }),
3401
+ (e.prototype.zzEncode = function () {
3402
+ var t = this.hi >> 31;
3403
+ return (
3404
+ (this.hi = (((this.hi << 1) | (this.lo >>> 31)) ^ t) >>> 0),
3405
+ (this.lo = ((this.lo << 1) ^ t) >>> 0),
3406
+ this
3407
+ );
3408
+ }),
3409
+ (e.prototype.zzDecode = function () {
3410
+ var t = -(1 & this.lo);
3411
+ return (
3412
+ (this.lo = (((this.lo >>> 1) | (this.hi << 31)) ^ t) >>> 0),
3413
+ (this.hi = ((this.hi >>> 1) ^ t) >>> 0),
3414
+ this
3415
+ );
3416
+ }),
3417
+ (e.prototype.length = function () {
3418
+ var t = this.lo,
3419
+ i = ((this.lo >>> 28) | (this.hi << 4)) >>> 0,
3420
+ n = this.hi >>> 24;
3421
+ return 0 == n
3422
+ ? 0 == i
3423
+ ? t < 16384
3424
+ ? t < 128
3425
+ ? 1
3426
+ : 2
3427
+ : t < 2097152
3428
+ ? 3
3429
+ : 4
3430
+ : i < 16384
3431
+ ? i < 128
3432
+ ? 5
3433
+ : 6
3434
+ : i < 2097152
3435
+ ? 7
3436
+ : 8
3437
+ : n < 128
3438
+ ? 9
3439
+ : 10;
3440
+ });
3441
+ },
3442
+ { 39: 39 }
3443
+ ],
3444
+ 39: [
3445
+ function (t, i, n) {
3446
+ var r = n;
3447
+ function e(t, i, n) {
3448
+ for (var r = Object.keys(i), e = 0; e < r.length; ++e)
3449
+ (t[r[e]] !== Q && n) || (t[r[e]] = i[r[e]]);
3450
+ return t;
3451
+ }
3452
+ function s(t) {
3453
+ function n(t, i) {
3454
+ if (!(this instanceof n)) return new n(t, i);
3455
+ Object.defineProperty(this, 'message', {
3456
+ get: function () {
3457
+ return t;
3458
+ }
3459
+ }),
3460
+ Error.captureStackTrace
3461
+ ? Error.captureStackTrace(this, n)
3462
+ : Object.defineProperty(this, 'stack', { value: Error().stack || '' }),
3463
+ i && e(this, i);
3464
+ }
3465
+ return (
3466
+ ((n.prototype = Object.create(Error.prototype)).constructor = n),
3467
+ Object.defineProperty(n.prototype, 'name', {
3468
+ get: function () {
3469
+ return t;
3470
+ }
3471
+ }),
3472
+ (n.prototype.toString = function () {
3473
+ return this.name + ': ' + this.message;
3474
+ }),
3475
+ n
3476
+ );
3477
+ }
3478
+ (r.asPromise = t(1)),
3479
+ (r.base64 = t(2)),
3480
+ (r.EventEmitter = t(4)),
3481
+ (r.float = t(6)),
3482
+ (r.inquire = t(7)),
3483
+ (r.utf8 = t(10)),
3484
+ (r.pool = t(9)),
3485
+ (r.LongBits = t(38)),
3486
+ (r.isNode = !!(
3487
+ 'undefined' != typeof global &&
3488
+ global &&
3489
+ global.process &&
3490
+ global.process.versions &&
3491
+ global.process.versions.node
3492
+ )),
3493
+ (r.global =
3494
+ (r.isNode && global) ||
3495
+ ('undefined' != typeof window && window) ||
3496
+ ('undefined' != typeof self && self) ||
3497
+ this),
3498
+ (r.emptyArray = Object.freeze ? Object.freeze([]) : []),
3499
+ (r.emptyObject = Object.freeze ? Object.freeze({}) : {}),
3500
+ (r.isInteger =
3501
+ Number.isInteger ||
3502
+ function (t) {
3503
+ return 'number' == typeof t && isFinite(t) && Math.floor(t) === t;
3504
+ }),
3505
+ (r.isString = function (t) {
3506
+ return 'string' == typeof t || t instanceof String;
3507
+ }),
3508
+ (r.isObject = function (t) {
3509
+ return t && 'object' == typeof t;
3510
+ }),
3511
+ (r.isset = r.isSet =
3512
+ function (t, i) {
3513
+ var n = t[i];
3514
+ return (
3515
+ null != n &&
3516
+ t.hasOwnProperty(i) &&
3517
+ ('object' != typeof n || 0 < (Array.isArray(n) ? n : Object.keys(n)).length)
3518
+ );
3519
+ }),
3520
+ (r.Buffer = (function () {
3521
+ try {
3522
+ var t = r.inquire('buffer').Buffer;
3523
+ return t.prototype.utf8Write ? t : null;
3524
+ } catch (t) {
3525
+ return null;
3526
+ }
3527
+ })()),
3528
+ (r.w = null),
3529
+ (r.y = null),
3530
+ (r.newBuffer = function (t) {
3531
+ return 'number' == typeof t
3532
+ ? r.Buffer
3533
+ ? r.y(t)
3534
+ : new r.Array(t)
3535
+ : r.Buffer
3536
+ ? r.w(t)
3537
+ : 'undefined' == typeof Uint8Array
3538
+ ? t
3539
+ : new Uint8Array(t);
3540
+ }),
3541
+ (r.Array = 'undefined' != typeof Uint8Array ? Uint8Array : Array),
3542
+ (r.Long =
3543
+ (r.global.dcodeIO && r.global.dcodeIO.Long) || r.global.Long || r.inquire('long')),
3544
+ (r.key2Re = /^true|false|0|1$/),
3545
+ (r.key32Re = /^-?(?:0|[1-9][0-9]*)$/),
3546
+ (r.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/),
3547
+ (r.longToHash = function (t) {
3548
+ return t ? r.LongBits.from(t).toHash() : r.LongBits.zeroHash;
3549
+ }),
3550
+ (r.longFromHash = function (t, i) {
3551
+ t = r.LongBits.fromHash(t);
3552
+ return r.Long ? r.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i);
3553
+ }),
3554
+ (r.merge = e),
3555
+ (r.lcFirst = function (t) {
3556
+ return (t[0] || '').toLowerCase() + t.substring(1);
3557
+ }),
3558
+ (r.newError = s),
3559
+ (r.ProtocolError = s('ProtocolError')),
3560
+ (r.oneOfGetter = function (t) {
3561
+ for (var n = {}, i = 0; i < t.length; ++i) n[t[i]] = 1;
3562
+ return function () {
3563
+ for (var t = Object.keys(this), i = t.length - 1; -1 < i; --i)
3564
+ if (1 === n[t[i]] && this[t[i]] !== Q && null !== this[t[i]]) return t[i];
3565
+ };
3566
+ }),
3567
+ (r.oneOfSetter = function (n) {
3568
+ return function (t) {
3569
+ for (var i = 0; i < n.length; ++i) n[i] !== t && delete this[n[i]];
3570
+ };
3571
+ }),
3572
+ (r.toJSONOptions = { longs: String, enums: String, bytes: String, json: !0 }),
3573
+ (r.u = function () {
3574
+ var n = r.Buffer;
3575
+ n
3576
+ ? ((r.w =
3577
+ (n.from !== Uint8Array.from && n.from) ||
3578
+ function (t, i) {
3579
+ return new n(t, i);
3580
+ }),
3581
+ (r.y =
3582
+ n.allocUnsafe ||
3583
+ function (t) {
3584
+ return new n(t);
3585
+ }))
3586
+ : (r.w = r.y = null);
3587
+ });
3588
+ },
3589
+ { 1: 1, 10: 10, 2: 2, 38: 38, 4: 4, 6: 6, 7: 7, 9: 9 }
3590
+ ],
3591
+ 40: [
3592
+ function (t, i, n) {
3593
+ i.exports = function (t) {
3594
+ var i = f.codegen(['m'], t.name + '$verify')('if(typeof m!=="object"||m===null)')(
3595
+ 'return%j',
3596
+ 'object expected'
3597
+ ),
3598
+ n = t.oneofsArray,
3599
+ r = {};
3600
+ n.length && i('var p={}');
3601
+ for (var e = 0; e < t.fieldsArray.length; ++e) {
3602
+ var s,
3603
+ o = t.e[e].resolve(),
3604
+ u = 'm' + f.safeProp(o.name);
3605
+ o.optional && i('if(%s!=null&&m.hasOwnProperty(%j)){', u, o.name),
3606
+ o.map
3607
+ ? (i('if(!util.isObject(%s))', u)('return%j', h(o, 'object'))(
3608
+ 'var k=Object.keys(%s)',
3609
+ u
3610
+ )('for(var i=0;i<k.length;++i){'),
3611
+ (function (t, i, n) {
3612
+ switch (i.keyType) {
3613
+ case 'int32':
3614
+ case 'uint32':
3615
+ case 'sint32':
3616
+ case 'fixed32':
3617
+ case 'sfixed32':
3618
+ t('if(!util.key32Re.test(%s))', n)('return%j', h(i, 'integer key'));
3619
+ break;
3620
+ case 'int64':
3621
+ case 'uint64':
3622
+ case 'sint64':
3623
+ case 'fixed64':
3624
+ case 'sfixed64':
3625
+ t('if(!util.key64Re.test(%s))', n)('return%j', h(i, 'integer|Long key'));
3626
+ break;
3627
+ case 'bool':
3628
+ t('if(!util.key2Re.test(%s))', n)('return%j', h(i, 'boolean key'));
3629
+ }
3630
+ })(i, o, 'k[i]'),
3631
+ a(i, o, e, u + '[k[i]]')('}'))
3632
+ : o.repeated
3633
+ ? (i('if(!Array.isArray(%s))', u)('return%j', h(o, 'array'))(
3634
+ 'for(var i=0;i<%s.length;++i){',
3635
+ u
3636
+ ),
3637
+ a(i, o, e, u + '[i]')('}'))
3638
+ : (o.partOf &&
3639
+ ((s = f.safeProp(o.partOf.name)),
3640
+ 1 === r[o.partOf.name] &&
3641
+ i('if(p%s===1)', s)('return%j', o.partOf.name + ': multiple values'),
3642
+ (r[o.partOf.name] = 1),
3643
+ i('p%s=1', s)),
3644
+ a(i, o, e, u)),
3645
+ o.optional && i('}');
3646
+ }
3647
+ return i('return null');
3648
+ };
3649
+ var o = t(15),
3650
+ f = t(37);
3651
+ function h(t, i) {
3652
+ return (
3653
+ t.name +
3654
+ ': ' +
3655
+ i +
3656
+ (t.repeated && 'array' !== i
3657
+ ? '[]'
3658
+ : t.map && 'object' !== i
3659
+ ? '{k:' + t.keyType + '}'
3660
+ : '') +
3661
+ ' expected'
3662
+ );
3663
+ }
3664
+ function a(t, i, n, r) {
3665
+ if (i.resolvedType)
3666
+ if (i.resolvedType instanceof o) {
3667
+ t('switch(%s){', r)('default:')('return%j', h(i, 'enum value'));
3668
+ for (var e = Object.keys(i.resolvedType.values), s = 0; s < e.length; ++s)
3669
+ t('case %i:', i.resolvedType.values[e[s]]);
3670
+ t('break')('}');
3671
+ } else
3672
+ t('{')('var e=types[%i].verify(%s);', n, r)('if(e)')('return%j+e', i.name + '.')('}');
3673
+ else
3674
+ switch (i.type) {
3675
+ case 'int32':
3676
+ case 'uint32':
3677
+ case 'sint32':
3678
+ case 'fixed32':
3679
+ case 'sfixed32':
3680
+ t('if(!util.isInteger(%s))', r)('return%j', h(i, 'integer'));
3681
+ break;
3682
+ case 'int64':
3683
+ case 'uint64':
3684
+ case 'sint64':
3685
+ case 'fixed64':
3686
+ case 'sfixed64':
3687
+ t(
3688
+ 'if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))',
3689
+ r,
3690
+ r,
3691
+ r,
3692
+ r
3693
+ )('return%j', h(i, 'integer|Long'));
3694
+ break;
3695
+ case 'float':
3696
+ case 'double':
3697
+ t('if(typeof %s!=="number")', r)('return%j', h(i, 'number'));
3698
+ break;
3699
+ case 'bool':
3700
+ t('if(typeof %s!=="boolean")', r)('return%j', h(i, 'boolean'));
3701
+ break;
3702
+ case 'string':
3703
+ t('if(!util.isString(%s))', r)('return%j', h(i, 'string'));
3704
+ break;
3705
+ case 'bytes':
3706
+ t(
3707
+ 'if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',
3708
+ r,
3709
+ r,
3710
+ r
3711
+ )('return%j', h(i, 'buffer'));
3712
+ }
3713
+ return t;
3714
+ }
3715
+ },
3716
+ { 15: 15, 37: 37 }
3717
+ ],
3718
+ 41: [
3719
+ function (t, i, n) {
3720
+ var n = n,
3721
+ s = t(21);
3722
+ n['.google.protobuf.Any'] = {
3723
+ fromObject: function (t) {
3724
+ if (t && t['@type']) {
3725
+ var i = t['@type'].substring(1 + t['@type'].lastIndexOf('/')),
3726
+ n = this.lookup(i);
3727
+ if (n) {
3728
+ i = '.' == (t['@type'][0] || '') ? t['@type'].substr(1) : t['@type'];
3729
+ return (
3730
+ ~i.indexOf('/') || (i = '/' + i),
3731
+ this.create({ type_url: i, value: n.encode(n.fromObject(t)).finish() })
3732
+ );
3733
+ }
3734
+ }
3735
+ return this.fromObject(t);
3736
+ },
3737
+ toObject: function (t, i) {
3738
+ var n,
3739
+ r = '',
3740
+ e = '';
3741
+ if (
3742
+ (i &&
3743
+ i.json &&
3744
+ t.type_url &&
3745
+ t.value &&
3746
+ ((e = t.type_url.substring(1 + t.type_url.lastIndexOf('/'))),
3747
+ (r = t.type_url.substring(0, 1 + t.type_url.lastIndexOf('/'))),
3748
+ (n = this.lookup(e)) && (t = n.decode(t.value))),
3749
+ t instanceof this.ctor || !(t instanceof s))
3750
+ )
3751
+ return this.toObject(t, i);
3752
+ (i = t.$type.toObject(t, i)),
3753
+ (t = '.' === t.$type.fullName[0] ? t.$type.fullName.substr(1) : t.$type.fullName);
3754
+ return (i['@type'] = e = (r = '' === r ? 'type.googleapis.com/' : r) + t), i;
3755
+ }
3756
+ };
3757
+ },
3758
+ { 21: 21 }
3759
+ ],
3760
+ 42: [
3761
+ function (t, i, n) {
3762
+ i.exports = c;
3763
+ var r,
3764
+ e = t(39),
3765
+ s = e.LongBits,
3766
+ o = e.base64,
3767
+ u = e.utf8;
3768
+ function f(t, i, n) {
3769
+ (this.fn = t), (this.len = i), (this.next = Q), (this.val = n);
3770
+ }
3771
+ function h() {}
3772
+ function a(t) {
3773
+ (this.head = t.head), (this.tail = t.tail), (this.len = t.len), (this.next = t.states);
3774
+ }
3775
+ function c() {
3776
+ (this.len = 0),
3777
+ (this.head = new f(h, 0, 0)),
3778
+ (this.tail = this.head),
3779
+ (this.states = null);
3780
+ }
3781
+ function l() {
3782
+ return e.Buffer
3783
+ ? function () {
3784
+ return (c.create = function () {
3785
+ return new r();
3786
+ })();
3787
+ }
3788
+ : function () {
3789
+ return new c();
3790
+ };
3791
+ }
3792
+ function v(t, i, n) {
3793
+ i[n] = 255 & t;
3794
+ }
3795
+ function d(t, i) {
3796
+ (this.len = t), (this.next = Q), (this.val = i);
3797
+ }
3798
+ function p(t, i, n) {
3799
+ for (; t.hi; )
3800
+ (i[n++] = (127 & t.lo) | 128),
3801
+ (t.lo = ((t.lo >>> 7) | (t.hi << 25)) >>> 0),
3802
+ (t.hi >>>= 7);
3803
+ for (; 127 < t.lo; ) (i[n++] = (127 & t.lo) | 128), (t.lo = t.lo >>> 7);
3804
+ i[n++] = t.lo;
3805
+ }
3806
+ function b(t, i, n) {
3807
+ (i[n] = 255 & t),
3808
+ (i[n + 1] = (t >>> 8) & 255),
3809
+ (i[n + 2] = (t >>> 16) & 255),
3810
+ (i[n + 3] = t >>> 24);
3811
+ }
3812
+ (c.create = l()),
3813
+ (c.alloc = function (t) {
3814
+ return new e.Array(t);
3815
+ }),
3816
+ e.Array !== Array && (c.alloc = e.pool(c.alloc, e.Array.prototype.subarray)),
3817
+ (c.prototype.g = function (t, i, n) {
3818
+ return (this.tail = this.tail.next = new f(t, i, n)), (this.len += i), this;
3819
+ }),
3820
+ ((d.prototype = Object.create(f.prototype)).fn = function (t, i, n) {
3821
+ for (; 127 < t; ) (i[n++] = (127 & t) | 128), (t >>>= 7);
3822
+ i[n] = t;
3823
+ }),
3824
+ (c.prototype.uint32 = function (t) {
3825
+ return (
3826
+ (this.len += (this.tail = this.tail.next =
3827
+ new d(
3828
+ (t >>>= 0) < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5,
3829
+ t
3830
+ )).len),
3831
+ this
3832
+ );
3833
+ }),
3834
+ (c.prototype.int32 = function (t) {
3835
+ return t < 0 ? this.g(p, 10, s.fromNumber(t)) : this.uint32(t);
3836
+ }),
3837
+ (c.prototype.sint32 = function (t) {
3838
+ return this.uint32(((t << 1) ^ (t >> 31)) >>> 0);
3839
+ }),
3840
+ (c.prototype.int64 = c.prototype.uint64 =
3841
+ function (t) {
3842
+ t = s.from(t);
3843
+ return this.g(p, t.length(), t);
3844
+ }),
3845
+ (c.prototype.sint64 = function (t) {
3846
+ t = s.from(t).zzEncode();
3847
+ return this.g(p, t.length(), t);
3848
+ }),
3849
+ (c.prototype.bool = function (t) {
3850
+ return this.g(v, 1, t ? 1 : 0);
3851
+ }),
3852
+ (c.prototype.sfixed32 = c.prototype.fixed32 =
3853
+ function (t) {
3854
+ return this.g(b, 4, t >>> 0);
3855
+ }),
3856
+ (c.prototype.sfixed64 = c.prototype.fixed64 =
3857
+ function (t) {
3858
+ t = s.from(t);
3859
+ return this.g(b, 4, t.lo).g(b, 4, t.hi);
3860
+ }),
3861
+ (c.prototype.float = function (t) {
3862
+ return this.g(e.float.writeFloatLE, 4, t);
3863
+ }),
3864
+ (c.prototype.double = function (t) {
3865
+ return this.g(e.float.writeDoubleLE, 8, t);
3866
+ });
3867
+ var w = e.Array.prototype.set
3868
+ ? function (t, i, n) {
3869
+ i.set(t, n);
3870
+ }
3871
+ : function (t, i, n) {
3872
+ for (var r = 0; r < t.length; ++r) i[n + r] = t[r];
3873
+ };
3874
+ (c.prototype.bytes = function (t) {
3875
+ var i,
3876
+ n = t.length >>> 0;
3877
+ return n
3878
+ ? (e.isString(t) && ((i = c.alloc((n = o.length(t)))), o.decode(t, i, 0), (t = i)),
3879
+ this.uint32(n).g(w, n, t))
3880
+ : this.g(v, 1, 0);
3881
+ }),
3882
+ (c.prototype.string = function (t) {
3883
+ var i = u.length(t);
3884
+ return i ? this.uint32(i).g(u.write, i, t) : this.g(v, 1, 0);
3885
+ }),
3886
+ (c.prototype.fork = function () {
3887
+ return (
3888
+ (this.states = new a(this)),
3889
+ (this.head = this.tail = new f(h, 0, 0)),
3890
+ (this.len = 0),
3891
+ this
3892
+ );
3893
+ }),
3894
+ (c.prototype.reset = function () {
3895
+ return (
3896
+ this.states
3897
+ ? ((this.head = this.states.head),
3898
+ (this.tail = this.states.tail),
3899
+ (this.len = this.states.len),
3900
+ (this.states = this.states.next))
3901
+ : ((this.head = this.tail = new f(h, 0, 0)), (this.len = 0)),
3902
+ this
3903
+ );
3904
+ }),
3905
+ (c.prototype.ldelim = function () {
3906
+ var t = this.head,
3907
+ i = this.tail,
3908
+ n = this.len;
3909
+ return (
3910
+ this.reset().uint32(n),
3911
+ n && ((this.tail.next = t.next), (this.tail = i), (this.len += n)),
3912
+ this
3913
+ );
3914
+ }),
3915
+ (c.prototype.finish = function () {
3916
+ for (var t = this.head.next, i = this.constructor.alloc(this.len), n = 0; t; )
3917
+ t.fn(t.val, i, n), (n += t.len), (t = t.next);
3918
+ return i;
3919
+ }),
3920
+ (c.u = function (t) {
3921
+ (r = t), (c.create = l()), r.u();
3922
+ });
3923
+ },
3924
+ { 39: 39 }
3925
+ ],
3926
+ 43: [
3927
+ function (t, i, n) {
3928
+ i.exports = s;
3929
+ var r = t(42);
3930
+ (s.prototype = Object.create(r.prototype)).constructor = s;
3931
+ var e = t(39);
3932
+ function s() {
3933
+ r.call(this);
3934
+ }
3935
+ function o(t, i, n) {
3936
+ t.length < 40 ? e.utf8.write(t, i, n) : i.utf8Write ? i.utf8Write(t, n) : i.write(t, n);
3937
+ }
3938
+ (s.u = function () {
3939
+ (s.alloc = e.y),
3940
+ (s.writeBytesBuffer =
3941
+ e.Buffer &&
3942
+ e.Buffer.prototype instanceof Uint8Array &&
3943
+ 'set' === e.Buffer.prototype.set.name
3944
+ ? function (t, i, n) {
3945
+ i.set(t, n);
3946
+ }
3947
+ : function (t, i, n) {
3948
+ if (t.copy) t.copy(i, n, 0, t.length);
3949
+ else for (var r = 0; r < t.length; ) i[n++] = t[r++];
3950
+ });
3951
+ }),
3952
+ (s.prototype.bytes = function (t) {
3953
+ var i = (t = e.isString(t) ? e.w(t, 'base64') : t).length >>> 0;
3954
+ return this.uint32(i), i && this.g(s.writeBytesBuffer, i, t), this;
3955
+ }),
3956
+ (s.prototype.string = function (t) {
3957
+ var i = e.Buffer.byteLength(t);
3958
+ return this.uint32(i), i && this.g(o, i, t), this;
3959
+ }),
3960
+ s.u();
3961
+ },
3962
+ { 39: 39, 42: 42 }
3963
+ ]
3964
+ }),
3965
+ (e = {}),
3966
+ (t = [19]),
3967
+ (i = (function t(i) {
3968
+ var n = e[i];
3969
+ return n || r[i][0].call((n = e[i] = { exports: {} }), t, n, n.exports), n.exports;
3970
+ })(t[0])),
3971
+ (i.util.global.protobuf = i),
3972
+ 'function' == typeof define &&
3973
+ define.amd &&
3974
+ define(['long'], function (t) {
3975
+ return t && t.isLong && ((i.util.Long = t), i.configure()), i;
3976
+ }),
3977
+ 'object' == typeof module && module && module.exports && (module.exports = i);
3978
+ })();
3979
+ //# sourceMappingURL=protobuf.min.js.map