mezon-js-protobuf 1.7.18 → 1.7.20

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.
@@ -30,1378 +30,10 @@ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__
30
30
  ));
31
31
  var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
32
32
 
33
- // ../../node_modules/@protobufjs/aspromise/index.js
34
- var require_aspromise = __commonJS({
35
- "../../node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
36
- "use strict";
37
- module2.exports = asPromise;
38
- function asPromise(fn, ctx) {
39
- var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
40
- while (index < arguments.length)
41
- params[offset++] = arguments[index++];
42
- return new Promise(function executor(resolve, reject) {
43
- params[offset] = function callback(err) {
44
- if (pending) {
45
- pending = false;
46
- if (err)
47
- reject(err);
48
- else {
49
- var params2 = new Array(arguments.length - 1), offset2 = 0;
50
- while (offset2 < params2.length)
51
- params2[offset2++] = arguments[offset2];
52
- resolve.apply(null, params2);
53
- }
54
- }
55
- };
56
- try {
57
- fn.apply(ctx || null, params);
58
- } catch (err) {
59
- if (pending) {
60
- pending = false;
61
- reject(err);
62
- }
63
- }
64
- });
65
- }
66
- }
67
- });
68
-
69
- // ../../node_modules/@protobufjs/base64/index.js
70
- var require_base64 = __commonJS({
71
- "../../node_modules/@protobufjs/base64/index.js"(exports2) {
72
- "use strict";
73
- var base64 = exports2;
74
- base64.length = function length(string) {
75
- var p = string.length;
76
- if (!p)
77
- return 0;
78
- var n = 0;
79
- while (--p % 4 > 1 && string.charAt(p) === "=")
80
- ++n;
81
- return Math.ceil(string.length * 3) / 4 - n;
82
- };
83
- var b64 = new Array(64);
84
- var s64 = new Array(123);
85
- for (i = 0; i < 64; )
86
- s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
87
- var i;
88
- base64.encode = function encode(buffer, start, end) {
89
- var parts = null, chunk = [];
90
- var i2 = 0, j = 0, t;
91
- while (start < end) {
92
- var b = buffer[start++];
93
- switch (j) {
94
- case 0:
95
- chunk[i2++] = b64[b >> 2];
96
- t = (b & 3) << 4;
97
- j = 1;
98
- break;
99
- case 1:
100
- chunk[i2++] = b64[t | b >> 4];
101
- t = (b & 15) << 2;
102
- j = 2;
103
- break;
104
- case 2:
105
- chunk[i2++] = b64[t | b >> 6];
106
- chunk[i2++] = b64[b & 63];
107
- j = 0;
108
- break;
109
- }
110
- if (i2 > 8191) {
111
- (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
112
- i2 = 0;
113
- }
114
- }
115
- if (j) {
116
- chunk[i2++] = b64[t];
117
- chunk[i2++] = 61;
118
- if (j === 1)
119
- chunk[i2++] = 61;
120
- }
121
- if (parts) {
122
- if (i2)
123
- parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
124
- return parts.join("");
125
- }
126
- return String.fromCharCode.apply(String, chunk.slice(0, i2));
127
- };
128
- var invalidEncoding = "invalid encoding";
129
- base64.decode = function decode(string, buffer, offset) {
130
- var start = offset;
131
- var j = 0, t;
132
- for (var i2 = 0; i2 < string.length; ) {
133
- var c = string.charCodeAt(i2++);
134
- if (c === 61 && j > 1)
135
- break;
136
- if ((c = s64[c]) === void 0)
137
- throw Error(invalidEncoding);
138
- switch (j) {
139
- case 0:
140
- t = c;
141
- j = 1;
142
- break;
143
- case 1:
144
- buffer[offset++] = t << 2 | (c & 48) >> 4;
145
- t = c;
146
- j = 2;
147
- break;
148
- case 2:
149
- buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
150
- t = c;
151
- j = 3;
152
- break;
153
- case 3:
154
- buffer[offset++] = (t & 3) << 6 | c;
155
- j = 0;
156
- break;
157
- }
158
- }
159
- if (j === 1)
160
- throw Error(invalidEncoding);
161
- return offset - start;
162
- };
163
- base64.test = function test(string) {
164
- return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
165
- };
166
- }
167
- });
168
-
169
- // ../../node_modules/@protobufjs/eventemitter/index.js
170
- var require_eventemitter = __commonJS({
171
- "../../node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
172
- "use strict";
173
- module2.exports = EventEmitter;
174
- function EventEmitter() {
175
- this._listeners = {};
176
- }
177
- EventEmitter.prototype.on = function on(evt, fn, ctx) {
178
- (this._listeners[evt] || (this._listeners[evt] = [])).push({
179
- fn,
180
- ctx: ctx || this
181
- });
182
- return this;
183
- };
184
- EventEmitter.prototype.off = function off(evt, fn) {
185
- if (evt === void 0)
186
- this._listeners = {};
187
- else {
188
- if (fn === void 0)
189
- this._listeners[evt] = [];
190
- else {
191
- var listeners = this._listeners[evt];
192
- for (var i = 0; i < listeners.length; )
193
- if (listeners[i].fn === fn)
194
- listeners.splice(i, 1);
195
- else
196
- ++i;
197
- }
198
- }
199
- return this;
200
- };
201
- EventEmitter.prototype.emit = function emit(evt) {
202
- var listeners = this._listeners[evt];
203
- if (listeners) {
204
- var args = [], i = 1;
205
- for (; i < arguments.length; )
206
- args.push(arguments[i++]);
207
- for (i = 0; i < listeners.length; )
208
- listeners[i].fn.apply(listeners[i++].ctx, args);
209
- }
210
- return this;
211
- };
212
- }
213
- });
214
-
215
- // ../../node_modules/@protobufjs/float/index.js
216
- var require_float = __commonJS({
217
- "../../node_modules/@protobufjs/float/index.js"(exports2, module2) {
218
- "use strict";
219
- module2.exports = factory(factory);
220
- function factory(exports3) {
221
- if (typeof Float32Array !== "undefined")
222
- (function() {
223
- var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
224
- function writeFloat_f32_cpy(val, buf, pos) {
225
- f32[0] = val;
226
- buf[pos] = f8b[0];
227
- buf[pos + 1] = f8b[1];
228
- buf[pos + 2] = f8b[2];
229
- buf[pos + 3] = f8b[3];
230
- }
231
- function writeFloat_f32_rev(val, buf, pos) {
232
- f32[0] = val;
233
- buf[pos] = f8b[3];
234
- buf[pos + 1] = f8b[2];
235
- buf[pos + 2] = f8b[1];
236
- buf[pos + 3] = f8b[0];
237
- }
238
- exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
239
- exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
240
- function readFloat_f32_cpy(buf, pos) {
241
- f8b[0] = buf[pos];
242
- f8b[1] = buf[pos + 1];
243
- f8b[2] = buf[pos + 2];
244
- f8b[3] = buf[pos + 3];
245
- return f32[0];
246
- }
247
- function readFloat_f32_rev(buf, pos) {
248
- f8b[3] = buf[pos];
249
- f8b[2] = buf[pos + 1];
250
- f8b[1] = buf[pos + 2];
251
- f8b[0] = buf[pos + 3];
252
- return f32[0];
253
- }
254
- exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
255
- exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
256
- })();
257
- else
258
- (function() {
259
- function writeFloat_ieee754(writeUint, val, buf, pos) {
260
- var sign = val < 0 ? 1 : 0;
261
- if (sign)
262
- val = -val;
263
- if (val === 0)
264
- writeUint(1 / val > 0 ? (
265
- /* positive */
266
- 0
267
- ) : (
268
- /* negative 0 */
269
- 2147483648
270
- ), buf, pos);
271
- else if (isNaN(val))
272
- writeUint(2143289344, buf, pos);
273
- else if (val > 34028234663852886e22)
274
- writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
275
- else if (val < 11754943508222875e-54)
276
- writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
277
- else {
278
- var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
279
- writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
280
- }
281
- }
282
- exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
283
- exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
284
- function readFloat_ieee754(readUint, buf, pos) {
285
- var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
286
- return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
287
- }
288
- exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
289
- exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
290
- })();
291
- if (typeof Float64Array !== "undefined")
292
- (function() {
293
- var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
294
- function writeDouble_f64_cpy(val, buf, pos) {
295
- f64[0] = val;
296
- buf[pos] = f8b[0];
297
- buf[pos + 1] = f8b[1];
298
- buf[pos + 2] = f8b[2];
299
- buf[pos + 3] = f8b[3];
300
- buf[pos + 4] = f8b[4];
301
- buf[pos + 5] = f8b[5];
302
- buf[pos + 6] = f8b[6];
303
- buf[pos + 7] = f8b[7];
304
- }
305
- function writeDouble_f64_rev(val, buf, pos) {
306
- f64[0] = val;
307
- buf[pos] = f8b[7];
308
- buf[pos + 1] = f8b[6];
309
- buf[pos + 2] = f8b[5];
310
- buf[pos + 3] = f8b[4];
311
- buf[pos + 4] = f8b[3];
312
- buf[pos + 5] = f8b[2];
313
- buf[pos + 6] = f8b[1];
314
- buf[pos + 7] = f8b[0];
315
- }
316
- exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
317
- exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
318
- function readDouble_f64_cpy(buf, pos) {
319
- f8b[0] = buf[pos];
320
- f8b[1] = buf[pos + 1];
321
- f8b[2] = buf[pos + 2];
322
- f8b[3] = buf[pos + 3];
323
- f8b[4] = buf[pos + 4];
324
- f8b[5] = buf[pos + 5];
325
- f8b[6] = buf[pos + 6];
326
- f8b[7] = buf[pos + 7];
327
- return f64[0];
328
- }
329
- function readDouble_f64_rev(buf, pos) {
330
- f8b[7] = buf[pos];
331
- f8b[6] = buf[pos + 1];
332
- f8b[5] = buf[pos + 2];
333
- f8b[4] = buf[pos + 3];
334
- f8b[3] = buf[pos + 4];
335
- f8b[2] = buf[pos + 5];
336
- f8b[1] = buf[pos + 6];
337
- f8b[0] = buf[pos + 7];
338
- return f64[0];
339
- }
340
- exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
341
- exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
342
- })();
343
- else
344
- (function() {
345
- function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
346
- var sign = val < 0 ? 1 : 0;
347
- if (sign)
348
- val = -val;
349
- if (val === 0) {
350
- writeUint(0, buf, pos + off0);
351
- writeUint(1 / val > 0 ? (
352
- /* positive */
353
- 0
354
- ) : (
355
- /* negative 0 */
356
- 2147483648
357
- ), buf, pos + off1);
358
- } else if (isNaN(val)) {
359
- writeUint(0, buf, pos + off0);
360
- writeUint(2146959360, buf, pos + off1);
361
- } else if (val > 17976931348623157e292) {
362
- writeUint(0, buf, pos + off0);
363
- writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
364
- } else {
365
- var mantissa;
366
- if (val < 22250738585072014e-324) {
367
- mantissa = val / 5e-324;
368
- writeUint(mantissa >>> 0, buf, pos + off0);
369
- writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
370
- } else {
371
- var exponent = Math.floor(Math.log(val) / Math.LN2);
372
- if (exponent === 1024)
373
- exponent = 1023;
374
- mantissa = val * Math.pow(2, -exponent);
375
- writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
376
- writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
377
- }
378
- }
379
- }
380
- exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
381
- exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
382
- function readDouble_ieee754(readUint, off0, off1, buf, pos) {
383
- var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
384
- var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
385
- return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
386
- }
387
- exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
388
- exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
389
- })();
390
- return exports3;
391
- }
392
- function writeUintLE(val, buf, pos) {
393
- buf[pos] = val & 255;
394
- buf[pos + 1] = val >>> 8 & 255;
395
- buf[pos + 2] = val >>> 16 & 255;
396
- buf[pos + 3] = val >>> 24;
397
- }
398
- function writeUintBE(val, buf, pos) {
399
- buf[pos] = val >>> 24;
400
- buf[pos + 1] = val >>> 16 & 255;
401
- buf[pos + 2] = val >>> 8 & 255;
402
- buf[pos + 3] = val & 255;
403
- }
404
- function readUintLE(buf, pos) {
405
- return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
406
- }
407
- function readUintBE(buf, pos) {
408
- return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
409
- }
410
- }
411
- });
412
-
413
- // ../../node_modules/@protobufjs/inquire/index.js
414
- var require_inquire = __commonJS({
415
- "../../node_modules/@protobufjs/inquire/index.js"(exports, module) {
416
- "use strict";
417
- module.exports = inquire;
418
- function inquire(moduleName) {
419
- try {
420
- var mod = eval("quire".replace(/^/, "re"))(moduleName);
421
- if (mod && (mod.length || Object.keys(mod).length))
422
- return mod;
423
- } catch (e) {
424
- }
425
- return null;
426
- }
427
- }
428
- });
429
-
430
- // ../../node_modules/@protobufjs/utf8/index.js
431
- var require_utf8 = __commonJS({
432
- "../../node_modules/@protobufjs/utf8/index.js"(exports2) {
433
- "use strict";
434
- var utf8 = exports2;
435
- utf8.length = function utf8_length(string) {
436
- var len = 0, c = 0;
437
- for (var i = 0; i < string.length; ++i) {
438
- c = string.charCodeAt(i);
439
- if (c < 128)
440
- len += 1;
441
- else if (c < 2048)
442
- len += 2;
443
- else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
444
- ++i;
445
- len += 4;
446
- } else
447
- len += 3;
448
- }
449
- return len;
450
- };
451
- utf8.read = function utf8_read(buffer, start, end) {
452
- var len = end - start;
453
- if (len < 1)
454
- return "";
455
- var parts = null, chunk = [], i = 0, t;
456
- while (start < end) {
457
- t = buffer[start++];
458
- if (t < 128)
459
- chunk[i++] = t;
460
- else if (t > 191 && t < 224)
461
- chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
462
- else if (t > 239 && t < 365) {
463
- t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
464
- chunk[i++] = 55296 + (t >> 10);
465
- chunk[i++] = 56320 + (t & 1023);
466
- } else
467
- chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
468
- if (i > 8191) {
469
- (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
470
- i = 0;
471
- }
472
- }
473
- if (parts) {
474
- if (i)
475
- parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
476
- return parts.join("");
477
- }
478
- return String.fromCharCode.apply(String, chunk.slice(0, i));
479
- };
480
- utf8.write = function utf8_write(string, buffer, offset) {
481
- var start = offset, c1, c2;
482
- for (var i = 0; i < string.length; ++i) {
483
- c1 = string.charCodeAt(i);
484
- if (c1 < 128) {
485
- buffer[offset++] = c1;
486
- } else if (c1 < 2048) {
487
- buffer[offset++] = c1 >> 6 | 192;
488
- buffer[offset++] = c1 & 63 | 128;
489
- } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
490
- c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
491
- ++i;
492
- buffer[offset++] = c1 >> 18 | 240;
493
- buffer[offset++] = c1 >> 12 & 63 | 128;
494
- buffer[offset++] = c1 >> 6 & 63 | 128;
495
- buffer[offset++] = c1 & 63 | 128;
496
- } else {
497
- buffer[offset++] = c1 >> 12 | 224;
498
- buffer[offset++] = c1 >> 6 & 63 | 128;
499
- buffer[offset++] = c1 & 63 | 128;
500
- }
501
- }
502
- return offset - start;
503
- };
504
- }
505
- });
506
-
507
- // ../../node_modules/@protobufjs/pool/index.js
508
- var require_pool = __commonJS({
509
- "../../node_modules/@protobufjs/pool/index.js"(exports2, module2) {
510
- "use strict";
511
- module2.exports = pool;
512
- function pool(alloc, slice, size) {
513
- var SIZE = size || 8192;
514
- var MAX = SIZE >>> 1;
515
- var slab = null;
516
- var offset = SIZE;
517
- return function pool_alloc(size2) {
518
- if (size2 < 1 || size2 > MAX)
519
- return alloc(size2);
520
- if (offset + size2 > SIZE) {
521
- slab = alloc(SIZE);
522
- offset = 0;
523
- }
524
- var buf = slice.call(slab, offset, offset += size2);
525
- if (offset & 7)
526
- offset = (offset | 7) + 1;
527
- return buf;
528
- };
529
- }
530
- }
531
- });
532
-
533
- // ../../node_modules/protobufjs/src/util/longbits.js
534
- var require_longbits = __commonJS({
535
- "../../node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
536
- "use strict";
537
- module2.exports = LongBits;
538
- var util = require_minimal();
539
- function LongBits(lo, hi) {
540
- this.lo = lo >>> 0;
541
- this.hi = hi >>> 0;
542
- }
543
- var zero = LongBits.zero = new LongBits(0, 0);
544
- zero.toNumber = function() {
545
- return 0;
546
- };
547
- zero.zzEncode = zero.zzDecode = function() {
548
- return this;
549
- };
550
- zero.length = function() {
551
- return 1;
552
- };
553
- var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
554
- LongBits.fromNumber = function fromNumber(value) {
555
- if (value === 0)
556
- return zero;
557
- var sign = value < 0;
558
- if (sign)
559
- value = -value;
560
- var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
561
- if (sign) {
562
- hi = ~hi >>> 0;
563
- lo = ~lo >>> 0;
564
- if (++lo > 4294967295) {
565
- lo = 0;
566
- if (++hi > 4294967295)
567
- hi = 0;
568
- }
569
- }
570
- return new LongBits(lo, hi);
571
- };
572
- LongBits.from = function from(value) {
573
- if (typeof value === "number")
574
- return LongBits.fromNumber(value);
575
- if (util.isString(value)) {
576
- if (util.Long)
577
- value = util.Long.fromString(value);
578
- else
579
- return LongBits.fromNumber(parseInt(value, 10));
580
- }
581
- return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
582
- };
583
- LongBits.prototype.toNumber = function toNumber(unsigned) {
584
- if (!unsigned && this.hi >>> 31) {
585
- var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
586
- if (!lo)
587
- hi = hi + 1 >>> 0;
588
- return -(lo + hi * 4294967296);
589
- }
590
- return this.lo + this.hi * 4294967296;
591
- };
592
- LongBits.prototype.toLong = function toLong(unsigned) {
593
- return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
594
- };
595
- var charCodeAt = String.prototype.charCodeAt;
596
- LongBits.fromHash = function fromHash(hash) {
597
- if (hash === zeroHash)
598
- return zero;
599
- return new LongBits(
600
- (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
601
- (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
602
- );
603
- };
604
- LongBits.prototype.toHash = function toHash() {
605
- return String.fromCharCode(
606
- this.lo & 255,
607
- this.lo >>> 8 & 255,
608
- this.lo >>> 16 & 255,
609
- this.lo >>> 24,
610
- this.hi & 255,
611
- this.hi >>> 8 & 255,
612
- this.hi >>> 16 & 255,
613
- this.hi >>> 24
614
- );
615
- };
616
- LongBits.prototype.zzEncode = function zzEncode() {
617
- var mask = this.hi >> 31;
618
- this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
619
- this.lo = (this.lo << 1 ^ mask) >>> 0;
620
- return this;
621
- };
622
- LongBits.prototype.zzDecode = function zzDecode() {
623
- var mask = -(this.lo & 1);
624
- this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
625
- this.hi = (this.hi >>> 1 ^ mask) >>> 0;
626
- return this;
627
- };
628
- LongBits.prototype.length = function length() {
629
- var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
630
- return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
631
- };
632
- }
633
- });
634
-
635
- // ../../node_modules/protobufjs/src/util/minimal.js
636
- var require_minimal = __commonJS({
637
- "../../node_modules/protobufjs/src/util/minimal.js"(exports2) {
638
- "use strict";
639
- var util = exports2;
640
- util.asPromise = require_aspromise();
641
- util.base64 = require_base64();
642
- util.EventEmitter = require_eventemitter();
643
- util.float = require_float();
644
- util.inquire = require_inquire();
645
- util.utf8 = require_utf8();
646
- util.pool = require_pool();
647
- util.LongBits = require_longbits();
648
- util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
649
- util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
650
- util.emptyArray = Object.freeze ? Object.freeze([]) : (
651
- /* istanbul ignore next */
652
- []
653
- );
654
- util.emptyObject = Object.freeze ? Object.freeze({}) : (
655
- /* istanbul ignore next */
656
- {}
657
- );
658
- util.isInteger = Number.isInteger || /* istanbul ignore next */
659
- function isInteger(value) {
660
- return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
661
- };
662
- util.isString = function isString(value) {
663
- return typeof value === "string" || value instanceof String;
664
- };
665
- util.isObject = function isObject2(value) {
666
- return value && typeof value === "object";
667
- };
668
- util.isset = /**
669
- * Checks if a property on a message is considered to be present.
670
- * @param {Object} obj Plain object or message instance
671
- * @param {string} prop Property name
672
- * @returns {boolean} `true` if considered to be present, otherwise `false`
673
- */
674
- util.isSet = function isSet5(obj, prop) {
675
- var value = obj[prop];
676
- if (value != null && obj.hasOwnProperty(prop))
677
- return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
678
- return false;
679
- };
680
- util.Buffer = function() {
681
- try {
682
- var Buffer2 = util.inquire("buffer").Buffer;
683
- return Buffer2.prototype.utf8Write ? Buffer2 : (
684
- /* istanbul ignore next */
685
- null
686
- );
687
- } catch (e) {
688
- return null;
689
- }
690
- }();
691
- util._Buffer_from = null;
692
- util._Buffer_allocUnsafe = null;
693
- util.newBuffer = function newBuffer(sizeOrArray) {
694
- return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
695
- };
696
- util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
697
- util.Long = /* istanbul ignore next */
698
- util.global.dcodeIO && /* istanbul ignore next */
699
- util.global.dcodeIO.Long || /* istanbul ignore next */
700
- util.global.Long || util.inquire("long");
701
- util.key2Re = /^true|false|0|1$/;
702
- util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
703
- util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
704
- util.longToHash = function longToHash(value) {
705
- return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
706
- };
707
- util.longFromHash = function longFromHash(hash, unsigned) {
708
- var bits = util.LongBits.fromHash(hash);
709
- if (util.Long)
710
- return util.Long.fromBits(bits.lo, bits.hi, unsigned);
711
- return bits.toNumber(Boolean(unsigned));
712
- };
713
- function merge(dst, src, ifNotSet) {
714
- for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
715
- if (dst[keys[i]] === void 0 || !ifNotSet)
716
- dst[keys[i]] = src[keys[i]];
717
- return dst;
718
- }
719
- util.merge = merge;
720
- util.lcFirst = function lcFirst(str) {
721
- return str.charAt(0).toLowerCase() + str.substring(1);
722
- };
723
- function newError(name) {
724
- function CustomError(message, properties) {
725
- if (!(this instanceof CustomError))
726
- return new CustomError(message, properties);
727
- Object.defineProperty(this, "message", { get: function() {
728
- return message;
729
- } });
730
- if (Error.captureStackTrace)
731
- Error.captureStackTrace(this, CustomError);
732
- else
733
- Object.defineProperty(this, "stack", { value: new Error().stack || "" });
734
- if (properties)
735
- merge(this, properties);
736
- }
737
- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
738
- Object.defineProperty(CustomError.prototype, "name", { get: function() {
739
- return name;
740
- } });
741
- CustomError.prototype.toString = function toString() {
742
- return this.name + ": " + this.message;
743
- };
744
- return CustomError;
745
- }
746
- util.newError = newError;
747
- util.ProtocolError = newError("ProtocolError");
748
- util.oneOfGetter = function getOneOf(fieldNames) {
749
- var fieldMap = {};
750
- for (var i = 0; i < fieldNames.length; ++i)
751
- fieldMap[fieldNames[i]] = 1;
752
- return function() {
753
- for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
754
- if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
755
- return keys[i2];
756
- };
757
- };
758
- util.oneOfSetter = function setOneOf(fieldNames) {
759
- return function(name) {
760
- for (var i = 0; i < fieldNames.length; ++i)
761
- if (fieldNames[i] !== name)
762
- delete this[fieldNames[i]];
763
- };
764
- };
765
- util.toJSONOptions = {
766
- longs: String,
767
- enums: String,
768
- bytes: String,
769
- json: true
770
- };
771
- util._configure = function() {
772
- var Buffer2 = util.Buffer;
773
- if (!Buffer2) {
774
- util._Buffer_from = util._Buffer_allocUnsafe = null;
775
- return;
776
- }
777
- util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
778
- function Buffer_from(value, encoding) {
779
- return new Buffer2(value, encoding);
780
- };
781
- util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
782
- function Buffer_allocUnsafe(size) {
783
- return new Buffer2(size);
784
- };
785
- };
786
- }
787
- });
788
-
789
- // ../../node_modules/protobufjs/src/writer.js
790
- var require_writer = __commonJS({
791
- "../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
792
- "use strict";
793
- module2.exports = Writer;
794
- var util = require_minimal();
795
- var BufferWriter;
796
- var LongBits = util.LongBits;
797
- var base64 = util.base64;
798
- var utf8 = util.utf8;
799
- function Op(fn, len, val) {
800
- this.fn = fn;
801
- this.len = len;
802
- this.next = void 0;
803
- this.val = val;
804
- }
805
- function noop() {
806
- }
807
- function State(writer) {
808
- this.head = writer.head;
809
- this.tail = writer.tail;
810
- this.len = writer.len;
811
- this.next = writer.states;
812
- }
813
- function Writer() {
814
- this.len = 0;
815
- this.head = new Op(noop, 0, 0);
816
- this.tail = this.head;
817
- this.states = null;
818
- }
819
- var create = function create2() {
820
- return util.Buffer ? function create_buffer_setup() {
821
- return (Writer.create = function create_buffer() {
822
- return new BufferWriter();
823
- })();
824
- } : function create_array() {
825
- return new Writer();
826
- };
827
- };
828
- Writer.create = create();
829
- Writer.alloc = function alloc(size) {
830
- return new util.Array(size);
831
- };
832
- if (util.Array !== Array)
833
- Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
834
- Writer.prototype._push = function push(fn, len, val) {
835
- this.tail = this.tail.next = new Op(fn, len, val);
836
- this.len += len;
837
- return this;
838
- };
839
- function writeByte(val, buf, pos) {
840
- buf[pos] = val & 255;
841
- }
842
- function writeVarint32(val, buf, pos) {
843
- while (val > 127) {
844
- buf[pos++] = val & 127 | 128;
845
- val >>>= 7;
846
- }
847
- buf[pos] = val;
848
- }
849
- function VarintOp(len, val) {
850
- this.len = len;
851
- this.next = void 0;
852
- this.val = val;
853
- }
854
- VarintOp.prototype = Object.create(Op.prototype);
855
- VarintOp.prototype.fn = writeVarint32;
856
- Writer.prototype.uint32 = function write_uint32(value) {
857
- this.len += (this.tail = this.tail.next = new VarintOp(
858
- (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
859
- value
860
- )).len;
861
- return this;
862
- };
863
- Writer.prototype.int32 = function write_int32(value) {
864
- return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
865
- };
866
- Writer.prototype.sint32 = function write_sint32(value) {
867
- return this.uint32((value << 1 ^ value >> 31) >>> 0);
868
- };
869
- function writeVarint64(val, buf, pos) {
870
- while (val.hi) {
871
- buf[pos++] = val.lo & 127 | 128;
872
- val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
873
- val.hi >>>= 7;
874
- }
875
- while (val.lo > 127) {
876
- buf[pos++] = val.lo & 127 | 128;
877
- val.lo = val.lo >>> 7;
878
- }
879
- buf[pos++] = val.lo;
880
- }
881
- Writer.prototype.uint64 = function write_uint64(value) {
882
- var bits = LongBits.from(value);
883
- return this._push(writeVarint64, bits.length(), bits);
884
- };
885
- Writer.prototype.int64 = Writer.prototype.uint64;
886
- Writer.prototype.sint64 = function write_sint64(value) {
887
- var bits = LongBits.from(value).zzEncode();
888
- return this._push(writeVarint64, bits.length(), bits);
889
- };
890
- Writer.prototype.bool = function write_bool(value) {
891
- return this._push(writeByte, 1, value ? 1 : 0);
892
- };
893
- function writeFixed32(val, buf, pos) {
894
- buf[pos] = val & 255;
895
- buf[pos + 1] = val >>> 8 & 255;
896
- buf[pos + 2] = val >>> 16 & 255;
897
- buf[pos + 3] = val >>> 24;
898
- }
899
- Writer.prototype.fixed32 = function write_fixed32(value) {
900
- return this._push(writeFixed32, 4, value >>> 0);
901
- };
902
- Writer.prototype.sfixed32 = Writer.prototype.fixed32;
903
- Writer.prototype.fixed64 = function write_fixed64(value) {
904
- var bits = LongBits.from(value);
905
- return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
906
- };
907
- Writer.prototype.sfixed64 = Writer.prototype.fixed64;
908
- Writer.prototype.float = function write_float(value) {
909
- return this._push(util.float.writeFloatLE, 4, value);
910
- };
911
- Writer.prototype.double = function write_double(value) {
912
- return this._push(util.float.writeDoubleLE, 8, value);
913
- };
914
- var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
915
- buf.set(val, pos);
916
- } : function writeBytes_for(val, buf, pos) {
917
- for (var i = 0; i < val.length; ++i)
918
- buf[pos + i] = val[i];
919
- };
920
- Writer.prototype.bytes = function write_bytes(value) {
921
- var len = value.length >>> 0;
922
- if (!len)
923
- return this._push(writeByte, 1, 0);
924
- if (util.isString(value)) {
925
- var buf = Writer.alloc(len = base64.length(value));
926
- base64.decode(value, buf, 0);
927
- value = buf;
928
- }
929
- return this.uint32(len)._push(writeBytes, len, value);
930
- };
931
- Writer.prototype.string = function write_string(value) {
932
- var len = utf8.length(value);
933
- return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
934
- };
935
- Writer.prototype.fork = function fork() {
936
- this.states = new State(this);
937
- this.head = this.tail = new Op(noop, 0, 0);
938
- this.len = 0;
939
- return this;
940
- };
941
- Writer.prototype.reset = function reset() {
942
- if (this.states) {
943
- this.head = this.states.head;
944
- this.tail = this.states.tail;
945
- this.len = this.states.len;
946
- this.states = this.states.next;
947
- } else {
948
- this.head = this.tail = new Op(noop, 0, 0);
949
- this.len = 0;
950
- }
951
- return this;
952
- };
953
- Writer.prototype.ldelim = function ldelim() {
954
- var head = this.head, tail = this.tail, len = this.len;
955
- this.reset().uint32(len);
956
- if (len) {
957
- this.tail.next = head.next;
958
- this.tail = tail;
959
- this.len += len;
960
- }
961
- return this;
962
- };
963
- Writer.prototype.finish = function finish() {
964
- var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
965
- while (head) {
966
- head.fn(head.val, buf, pos);
967
- pos += head.len;
968
- head = head.next;
969
- }
970
- return buf;
971
- };
972
- Writer._configure = function(BufferWriter_) {
973
- BufferWriter = BufferWriter_;
974
- Writer.create = create();
975
- BufferWriter._configure();
976
- };
977
- }
978
- });
979
-
980
- // ../../node_modules/protobufjs/src/writer_buffer.js
981
- var require_writer_buffer = __commonJS({
982
- "../../node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
983
- "use strict";
984
- module2.exports = BufferWriter;
985
- var Writer = require_writer();
986
- (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
987
- var util = require_minimal();
988
- function BufferWriter() {
989
- Writer.call(this);
990
- }
991
- BufferWriter._configure = function() {
992
- BufferWriter.alloc = util._Buffer_allocUnsafe;
993
- BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
994
- buf.set(val, pos);
995
- } : function writeBytesBuffer_copy(val, buf, pos) {
996
- if (val.copy)
997
- val.copy(buf, pos, 0, val.length);
998
- else
999
- for (var i = 0; i < val.length; )
1000
- buf[pos++] = val[i++];
1001
- };
1002
- };
1003
- BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
1004
- if (util.isString(value))
1005
- value = util._Buffer_from(value, "base64");
1006
- var len = value.length >>> 0;
1007
- this.uint32(len);
1008
- if (len)
1009
- this._push(BufferWriter.writeBytesBuffer, len, value);
1010
- return this;
1011
- };
1012
- function writeStringBuffer(val, buf, pos) {
1013
- if (val.length < 40)
1014
- util.utf8.write(val, buf, pos);
1015
- else if (buf.utf8Write)
1016
- buf.utf8Write(val, pos);
1017
- else
1018
- buf.write(val, pos);
1019
- }
1020
- BufferWriter.prototype.string = function write_string_buffer(value) {
1021
- var len = util.Buffer.byteLength(value);
1022
- this.uint32(len);
1023
- if (len)
1024
- this._push(writeStringBuffer, len, value);
1025
- return this;
1026
- };
1027
- BufferWriter._configure();
1028
- }
1029
- });
1030
-
1031
- // ../../node_modules/protobufjs/src/reader.js
1032
- var require_reader = __commonJS({
1033
- "../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
1034
- "use strict";
1035
- module2.exports = Reader;
1036
- var util = require_minimal();
1037
- var BufferReader;
1038
- var LongBits = util.LongBits;
1039
- var utf8 = util.utf8;
1040
- function indexOutOfRange(reader, writeLength) {
1041
- return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
1042
- }
1043
- function Reader(buffer) {
1044
- this.buf = buffer;
1045
- this.pos = 0;
1046
- this.len = buffer.length;
1047
- }
1048
- var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
1049
- if (buffer instanceof Uint8Array || Array.isArray(buffer))
1050
- return new Reader(buffer);
1051
- throw Error("illegal buffer");
1052
- } : function create_array2(buffer) {
1053
- if (Array.isArray(buffer))
1054
- return new Reader(buffer);
1055
- throw Error("illegal buffer");
1056
- };
1057
- var create = function create2() {
1058
- return util.Buffer ? function create_buffer_setup(buffer) {
1059
- return (Reader.create = function create_buffer(buffer2) {
1060
- return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
1061
- })(buffer);
1062
- } : create_array;
1063
- };
1064
- Reader.create = create();
1065
- Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
1066
- util.Array.prototype.slice;
1067
- Reader.prototype.uint32 = function read_uint32_setup() {
1068
- var value = 4294967295;
1069
- return function read_uint32() {
1070
- value = (this.buf[this.pos] & 127) >>> 0;
1071
- if (this.buf[this.pos++] < 128)
1072
- return value;
1073
- value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
1074
- if (this.buf[this.pos++] < 128)
1075
- return value;
1076
- value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
1077
- if (this.buf[this.pos++] < 128)
1078
- return value;
1079
- value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
1080
- if (this.buf[this.pos++] < 128)
1081
- return value;
1082
- value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
1083
- if (this.buf[this.pos++] < 128)
1084
- return value;
1085
- if ((this.pos += 5) > this.len) {
1086
- this.pos = this.len;
1087
- throw indexOutOfRange(this, 10);
1088
- }
1089
- return value;
1090
- };
1091
- }();
1092
- Reader.prototype.int32 = function read_int32() {
1093
- return this.uint32() | 0;
1094
- };
1095
- Reader.prototype.sint32 = function read_sint32() {
1096
- var value = this.uint32();
1097
- return value >>> 1 ^ -(value & 1) | 0;
1098
- };
1099
- function readLongVarint() {
1100
- var bits = new LongBits(0, 0);
1101
- var i = 0;
1102
- if (this.len - this.pos > 4) {
1103
- for (; i < 4; ++i) {
1104
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1105
- if (this.buf[this.pos++] < 128)
1106
- return bits;
1107
- }
1108
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1109
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1110
- if (this.buf[this.pos++] < 128)
1111
- return bits;
1112
- i = 0;
1113
- } else {
1114
- for (; i < 3; ++i) {
1115
- if (this.pos >= this.len)
1116
- throw indexOutOfRange(this);
1117
- bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1118
- if (this.buf[this.pos++] < 128)
1119
- return bits;
1120
- }
1121
- bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1122
- return bits;
1123
- }
1124
- if (this.len - this.pos > 4) {
1125
- for (; i < 5; ++i) {
1126
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1127
- if (this.buf[this.pos++] < 128)
1128
- return bits;
1129
- }
1130
- } else {
1131
- for (; i < 5; ++i) {
1132
- if (this.pos >= this.len)
1133
- throw indexOutOfRange(this);
1134
- bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1135
- if (this.buf[this.pos++] < 128)
1136
- return bits;
1137
- }
1138
- }
1139
- throw Error("invalid varint encoding");
1140
- }
1141
- Reader.prototype.bool = function read_bool() {
1142
- return this.uint32() !== 0;
1143
- };
1144
- function readFixed32_end(buf, end) {
1145
- return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
1146
- }
1147
- Reader.prototype.fixed32 = function read_fixed32() {
1148
- if (this.pos + 4 > this.len)
1149
- throw indexOutOfRange(this, 4);
1150
- return readFixed32_end(this.buf, this.pos += 4);
1151
- };
1152
- Reader.prototype.sfixed32 = function read_sfixed32() {
1153
- if (this.pos + 4 > this.len)
1154
- throw indexOutOfRange(this, 4);
1155
- return readFixed32_end(this.buf, this.pos += 4) | 0;
1156
- };
1157
- function readFixed64() {
1158
- if (this.pos + 8 > this.len)
1159
- throw indexOutOfRange(this, 8);
1160
- return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
1161
- }
1162
- Reader.prototype.float = function read_float() {
1163
- if (this.pos + 4 > this.len)
1164
- throw indexOutOfRange(this, 4);
1165
- var value = util.float.readFloatLE(this.buf, this.pos);
1166
- this.pos += 4;
1167
- return value;
1168
- };
1169
- Reader.prototype.double = function read_double() {
1170
- if (this.pos + 8 > this.len)
1171
- throw indexOutOfRange(this, 4);
1172
- var value = util.float.readDoubleLE(this.buf, this.pos);
1173
- this.pos += 8;
1174
- return value;
1175
- };
1176
- Reader.prototype.bytes = function read_bytes() {
1177
- var length = this.uint32(), start = this.pos, end = this.pos + length;
1178
- if (end > this.len)
1179
- throw indexOutOfRange(this, length);
1180
- this.pos += length;
1181
- if (Array.isArray(this.buf))
1182
- return this.buf.slice(start, end);
1183
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
1184
- };
1185
- Reader.prototype.string = function read_string() {
1186
- var bytes = this.bytes();
1187
- return utf8.read(bytes, 0, bytes.length);
1188
- };
1189
- Reader.prototype.skip = function skip(length) {
1190
- if (typeof length === "number") {
1191
- if (this.pos + length > this.len)
1192
- throw indexOutOfRange(this, length);
1193
- this.pos += length;
1194
- } else {
1195
- do {
1196
- if (this.pos >= this.len)
1197
- throw indexOutOfRange(this);
1198
- } while (this.buf[this.pos++] & 128);
1199
- }
1200
- return this;
1201
- };
1202
- Reader.prototype.skipType = function(wireType) {
1203
- switch (wireType) {
1204
- case 0:
1205
- this.skip();
1206
- break;
1207
- case 1:
1208
- this.skip(8);
1209
- break;
1210
- case 2:
1211
- this.skip(this.uint32());
1212
- break;
1213
- case 3:
1214
- while ((wireType = this.uint32() & 7) !== 4) {
1215
- this.skipType(wireType);
1216
- }
1217
- break;
1218
- case 5:
1219
- this.skip(4);
1220
- break;
1221
- default:
1222
- throw Error("invalid wire type " + wireType + " at offset " + this.pos);
1223
- }
1224
- return this;
1225
- };
1226
- Reader._configure = function(BufferReader_) {
1227
- BufferReader = BufferReader_;
1228
- Reader.create = create();
1229
- BufferReader._configure();
1230
- var fn = util.Long ? "toLong" : (
1231
- /* istanbul ignore next */
1232
- "toNumber"
1233
- );
1234
- util.merge(Reader.prototype, {
1235
- int64: function read_int64() {
1236
- return readLongVarint.call(this)[fn](false);
1237
- },
1238
- uint64: function read_uint64() {
1239
- return readLongVarint.call(this)[fn](true);
1240
- },
1241
- sint64: function read_sint64() {
1242
- return readLongVarint.call(this).zzDecode()[fn](false);
1243
- },
1244
- fixed64: function read_fixed64() {
1245
- return readFixed64.call(this)[fn](true);
1246
- },
1247
- sfixed64: function read_sfixed64() {
1248
- return readFixed64.call(this)[fn](false);
1249
- }
1250
- });
1251
- };
1252
- }
1253
- });
1254
-
1255
- // ../../node_modules/protobufjs/src/reader_buffer.js
1256
- var require_reader_buffer = __commonJS({
1257
- "../../node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
1258
- "use strict";
1259
- module2.exports = BufferReader;
1260
- var Reader = require_reader();
1261
- (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
1262
- var util = require_minimal();
1263
- function BufferReader(buffer) {
1264
- Reader.call(this, buffer);
1265
- }
1266
- BufferReader._configure = function() {
1267
- if (util.Buffer)
1268
- BufferReader.prototype._slice = util.Buffer.prototype.slice;
1269
- };
1270
- BufferReader.prototype.string = function read_string_buffer() {
1271
- var len = this.uint32();
1272
- return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
1273
- };
1274
- BufferReader._configure();
1275
- }
1276
- });
1277
-
1278
- // ../../node_modules/protobufjs/src/rpc/service.js
1279
- var require_service = __commonJS({
1280
- "../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
1281
- "use strict";
1282
- module2.exports = Service;
1283
- var util = require_minimal();
1284
- (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
1285
- function Service(rpcImpl, requestDelimited, responseDelimited) {
1286
- if (typeof rpcImpl !== "function")
1287
- throw TypeError("rpcImpl must be a function");
1288
- util.EventEmitter.call(this);
1289
- this.rpcImpl = rpcImpl;
1290
- this.requestDelimited = Boolean(requestDelimited);
1291
- this.responseDelimited = Boolean(responseDelimited);
1292
- }
1293
- Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
1294
- if (!request)
1295
- throw TypeError("request must be specified");
1296
- var self2 = this;
1297
- if (!callback)
1298
- return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
1299
- if (!self2.rpcImpl) {
1300
- setTimeout(function() {
1301
- callback(Error("already ended"));
1302
- }, 0);
1303
- return void 0;
1304
- }
1305
- try {
1306
- return self2.rpcImpl(
1307
- method,
1308
- requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
1309
- function rpcCallback(err, response) {
1310
- if (err) {
1311
- self2.emit("error", err, method);
1312
- return callback(err);
1313
- }
1314
- if (response === null) {
1315
- self2.end(
1316
- /* endedByRPC */
1317
- true
1318
- );
1319
- return void 0;
1320
- }
1321
- if (!(response instanceof responseCtor)) {
1322
- try {
1323
- response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
1324
- } catch (err2) {
1325
- self2.emit("error", err2, method);
1326
- return callback(err2);
1327
- }
1328
- }
1329
- self2.emit("data", response, method);
1330
- return callback(null, response);
1331
- }
1332
- );
1333
- } catch (err) {
1334
- self2.emit("error", err, method);
1335
- setTimeout(function() {
1336
- callback(err);
1337
- }, 0);
1338
- return void 0;
1339
- }
1340
- };
1341
- Service.prototype.end = function end(endedByRPC) {
1342
- if (this.rpcImpl) {
1343
- if (!endedByRPC)
1344
- this.rpcImpl(null, null, null);
1345
- this.rpcImpl = null;
1346
- this.emit("end").off();
1347
- }
1348
- return this;
1349
- };
1350
- }
1351
- });
1352
-
1353
- // ../../node_modules/protobufjs/src/rpc.js
1354
- var require_rpc = __commonJS({
1355
- "../../node_modules/protobufjs/src/rpc.js"(exports2) {
1356
- "use strict";
1357
- var rpc = exports2;
1358
- rpc.Service = require_service();
1359
- }
1360
- });
1361
-
1362
- // ../../node_modules/protobufjs/src/roots.js
1363
- var require_roots = __commonJS({
1364
- "../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
1365
- "use strict";
1366
- module2.exports = {};
1367
- }
1368
- });
1369
-
1370
- // ../../node_modules/protobufjs/src/index-minimal.js
1371
- var require_index_minimal = __commonJS({
1372
- "../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
1373
- "use strict";
1374
- var protobuf = exports2;
1375
- protobuf.build = "minimal";
1376
- protobuf.Writer = require_writer();
1377
- protobuf.BufferWriter = require_writer_buffer();
1378
- protobuf.Reader = require_reader();
1379
- protobuf.BufferReader = require_reader_buffer();
1380
- protobuf.util = require_minimal();
1381
- protobuf.rpc = require_rpc();
1382
- protobuf.roots = require_roots();
1383
- protobuf.configure = configure;
1384
- function configure() {
1385
- protobuf.util._configure();
1386
- protobuf.Writer._configure(protobuf.BufferWriter);
1387
- protobuf.Reader._configure(protobuf.BufferReader);
1388
- }
1389
- configure();
1390
- }
1391
- });
1392
-
1393
- // ../../node_modules/protobufjs/minimal.js
1394
- var require_minimal2 = __commonJS({
1395
- "../../node_modules/protobufjs/minimal.js"(exports2, module2) {
1396
- "use strict";
1397
- module2.exports = require_index_minimal();
1398
- }
1399
- });
1400
-
1401
33
  // ../../node_modules/long/src/long.js
1402
34
  var require_long = __commonJS({
1403
35
  "../../node_modules/long/src/long.js"(exports2, module2) {
1404
- module2.exports = Long4;
36
+ module2.exports = Long5;
1405
37
  var wasm = null;
1406
38
  try {
1407
39
  wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
@@ -1694,573 +326,1941 @@ var require_long = __commonJS({
1694
326
  ])), {}).exports;
1695
327
  } catch (e) {
1696
328
  }
1697
- function Long4(low, high, unsigned) {
1698
- this.low = low | 0;
1699
- this.high = high | 0;
1700
- this.unsigned = !!unsigned;
329
+ function Long5(low, high, unsigned) {
330
+ this.low = low | 0;
331
+ this.high = high | 0;
332
+ this.unsigned = !!unsigned;
333
+ }
334
+ Long5.prototype.__isLong__;
335
+ Object.defineProperty(Long5.prototype, "__isLong__", { value: true });
336
+ function isLong(obj) {
337
+ return (obj && obj["__isLong__"]) === true;
338
+ }
339
+ Long5.isLong = isLong;
340
+ var INT_CACHE = {};
341
+ var UINT_CACHE = {};
342
+ function fromInt(value, unsigned) {
343
+ var obj, cachedObj, cache;
344
+ if (unsigned) {
345
+ value >>>= 0;
346
+ if (cache = 0 <= value && value < 256) {
347
+ cachedObj = UINT_CACHE[value];
348
+ if (cachedObj)
349
+ return cachedObj;
350
+ }
351
+ obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
352
+ if (cache)
353
+ UINT_CACHE[value] = obj;
354
+ return obj;
355
+ } else {
356
+ value |= 0;
357
+ if (cache = -128 <= value && value < 128) {
358
+ cachedObj = INT_CACHE[value];
359
+ if (cachedObj)
360
+ return cachedObj;
361
+ }
362
+ obj = fromBits(value, value < 0 ? -1 : 0, false);
363
+ if (cache)
364
+ INT_CACHE[value] = obj;
365
+ return obj;
366
+ }
367
+ }
368
+ Long5.fromInt = fromInt;
369
+ function fromNumber(value, unsigned) {
370
+ if (isNaN(value))
371
+ return unsigned ? UZERO : ZERO;
372
+ if (unsigned) {
373
+ if (value < 0)
374
+ return UZERO;
375
+ if (value >= TWO_PWR_64_DBL)
376
+ return MAX_UNSIGNED_VALUE;
377
+ } else {
378
+ if (value <= -TWO_PWR_63_DBL)
379
+ return MIN_VALUE;
380
+ if (value + 1 >= TWO_PWR_63_DBL)
381
+ return MAX_VALUE;
382
+ }
383
+ if (value < 0)
384
+ return fromNumber(-value, unsigned).neg();
385
+ return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
386
+ }
387
+ Long5.fromNumber = fromNumber;
388
+ function fromBits(lowBits, highBits, unsigned) {
389
+ return new Long5(lowBits, highBits, unsigned);
390
+ }
391
+ Long5.fromBits = fromBits;
392
+ var pow_dbl = Math.pow;
393
+ function fromString(str, unsigned, radix) {
394
+ if (str.length === 0)
395
+ throw Error("empty string");
396
+ if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
397
+ return ZERO;
398
+ if (typeof unsigned === "number") {
399
+ radix = unsigned, unsigned = false;
400
+ } else {
401
+ unsigned = !!unsigned;
402
+ }
403
+ radix = radix || 10;
404
+ if (radix < 2 || 36 < radix)
405
+ throw RangeError("radix");
406
+ var p;
407
+ if ((p = str.indexOf("-")) > 0)
408
+ throw Error("interior hyphen");
409
+ else if (p === 0) {
410
+ return fromString(str.substring(1), unsigned, radix).neg();
411
+ }
412
+ var radixToPower = fromNumber(pow_dbl(radix, 8));
413
+ var result = ZERO;
414
+ for (var i = 0; i < str.length; i += 8) {
415
+ var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
416
+ if (size < 8) {
417
+ var power = fromNumber(pow_dbl(radix, size));
418
+ result = result.mul(power).add(fromNumber(value));
419
+ } else {
420
+ result = result.mul(radixToPower);
421
+ result = result.add(fromNumber(value));
422
+ }
423
+ }
424
+ result.unsigned = unsigned;
425
+ return result;
426
+ }
427
+ Long5.fromString = fromString;
428
+ function fromValue(val, unsigned) {
429
+ if (typeof val === "number")
430
+ return fromNumber(val, unsigned);
431
+ if (typeof val === "string")
432
+ return fromString(val, unsigned);
433
+ return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
434
+ }
435
+ Long5.fromValue = fromValue;
436
+ var TWO_PWR_16_DBL = 1 << 16;
437
+ var TWO_PWR_24_DBL = 1 << 24;
438
+ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
439
+ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
440
+ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
441
+ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
442
+ var ZERO = fromInt(0);
443
+ Long5.ZERO = ZERO;
444
+ var UZERO = fromInt(0, true);
445
+ Long5.UZERO = UZERO;
446
+ var ONE = fromInt(1);
447
+ Long5.ONE = ONE;
448
+ var UONE = fromInt(1, true);
449
+ Long5.UONE = UONE;
450
+ var NEG_ONE = fromInt(-1);
451
+ Long5.NEG_ONE = NEG_ONE;
452
+ var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
453
+ Long5.MAX_VALUE = MAX_VALUE;
454
+ var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
455
+ Long5.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
456
+ var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
457
+ Long5.MIN_VALUE = MIN_VALUE;
458
+ var LongPrototype = Long5.prototype;
459
+ LongPrototype.toInt = function toInt() {
460
+ return this.unsigned ? this.low >>> 0 : this.low;
461
+ };
462
+ LongPrototype.toNumber = function toNumber() {
463
+ if (this.unsigned)
464
+ return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
465
+ return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
466
+ };
467
+ LongPrototype.toString = function toString(radix) {
468
+ radix = radix || 10;
469
+ if (radix < 2 || 36 < radix)
470
+ throw RangeError("radix");
471
+ if (this.isZero())
472
+ return "0";
473
+ if (this.isNegative()) {
474
+ if (this.eq(MIN_VALUE)) {
475
+ var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
476
+ return div.toString(radix) + rem1.toInt().toString(radix);
477
+ } else
478
+ return "-" + this.neg().toString(radix);
479
+ }
480
+ var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
481
+ var result = "";
482
+ while (true) {
483
+ var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
484
+ rem = remDiv;
485
+ if (rem.isZero())
486
+ return digits + result;
487
+ else {
488
+ while (digits.length < 6)
489
+ digits = "0" + digits;
490
+ result = "" + digits + result;
491
+ }
492
+ }
493
+ };
494
+ LongPrototype.getHighBits = function getHighBits() {
495
+ return this.high;
496
+ };
497
+ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
498
+ return this.high >>> 0;
499
+ };
500
+ LongPrototype.getLowBits = function getLowBits() {
501
+ return this.low;
502
+ };
503
+ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
504
+ return this.low >>> 0;
505
+ };
506
+ LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
507
+ if (this.isNegative())
508
+ return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
509
+ var val = this.high != 0 ? this.high : this.low;
510
+ for (var bit = 31; bit > 0; bit--)
511
+ if ((val & 1 << bit) != 0)
512
+ break;
513
+ return this.high != 0 ? bit + 33 : bit + 1;
514
+ };
515
+ LongPrototype.isZero = function isZero() {
516
+ return this.high === 0 && this.low === 0;
517
+ };
518
+ LongPrototype.eqz = LongPrototype.isZero;
519
+ LongPrototype.isNegative = function isNegative() {
520
+ return !this.unsigned && this.high < 0;
521
+ };
522
+ LongPrototype.isPositive = function isPositive() {
523
+ return this.unsigned || this.high >= 0;
524
+ };
525
+ LongPrototype.isOdd = function isOdd() {
526
+ return (this.low & 1) === 1;
527
+ };
528
+ LongPrototype.isEven = function isEven() {
529
+ return (this.low & 1) === 0;
530
+ };
531
+ LongPrototype.equals = function equals(other) {
532
+ if (!isLong(other))
533
+ other = fromValue(other);
534
+ if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
535
+ return false;
536
+ return this.high === other.high && this.low === other.low;
537
+ };
538
+ LongPrototype.eq = LongPrototype.equals;
539
+ LongPrototype.notEquals = function notEquals(other) {
540
+ return !this.eq(
541
+ /* validates */
542
+ other
543
+ );
544
+ };
545
+ LongPrototype.neq = LongPrototype.notEquals;
546
+ LongPrototype.ne = LongPrototype.notEquals;
547
+ LongPrototype.lessThan = function lessThan(other) {
548
+ return this.comp(
549
+ /* validates */
550
+ other
551
+ ) < 0;
552
+ };
553
+ LongPrototype.lt = LongPrototype.lessThan;
554
+ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
555
+ return this.comp(
556
+ /* validates */
557
+ other
558
+ ) <= 0;
559
+ };
560
+ LongPrototype.lte = LongPrototype.lessThanOrEqual;
561
+ LongPrototype.le = LongPrototype.lessThanOrEqual;
562
+ LongPrototype.greaterThan = function greaterThan(other) {
563
+ return this.comp(
564
+ /* validates */
565
+ other
566
+ ) > 0;
567
+ };
568
+ LongPrototype.gt = LongPrototype.greaterThan;
569
+ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
570
+ return this.comp(
571
+ /* validates */
572
+ other
573
+ ) >= 0;
574
+ };
575
+ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
576
+ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
577
+ LongPrototype.compare = function compare(other) {
578
+ if (!isLong(other))
579
+ other = fromValue(other);
580
+ if (this.eq(other))
581
+ return 0;
582
+ var thisNeg = this.isNegative(), otherNeg = other.isNegative();
583
+ if (thisNeg && !otherNeg)
584
+ return -1;
585
+ if (!thisNeg && otherNeg)
586
+ return 1;
587
+ if (!this.unsigned)
588
+ return this.sub(other).isNegative() ? -1 : 1;
589
+ return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
590
+ };
591
+ LongPrototype.comp = LongPrototype.compare;
592
+ LongPrototype.negate = function negate() {
593
+ if (!this.unsigned && this.eq(MIN_VALUE))
594
+ return MIN_VALUE;
595
+ return this.not().add(ONE);
596
+ };
597
+ LongPrototype.neg = LongPrototype.negate;
598
+ LongPrototype.add = function add(addend) {
599
+ if (!isLong(addend))
600
+ addend = fromValue(addend);
601
+ var a48 = this.high >>> 16;
602
+ var a32 = this.high & 65535;
603
+ var a16 = this.low >>> 16;
604
+ var a00 = this.low & 65535;
605
+ var b48 = addend.high >>> 16;
606
+ var b32 = addend.high & 65535;
607
+ var b16 = addend.low >>> 16;
608
+ var b00 = addend.low & 65535;
609
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
610
+ c00 += a00 + b00;
611
+ c16 += c00 >>> 16;
612
+ c00 &= 65535;
613
+ c16 += a16 + b16;
614
+ c32 += c16 >>> 16;
615
+ c16 &= 65535;
616
+ c32 += a32 + b32;
617
+ c48 += c32 >>> 16;
618
+ c32 &= 65535;
619
+ c48 += a48 + b48;
620
+ c48 &= 65535;
621
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
622
+ };
623
+ LongPrototype.subtract = function subtract(subtrahend) {
624
+ if (!isLong(subtrahend))
625
+ subtrahend = fromValue(subtrahend);
626
+ return this.add(subtrahend.neg());
627
+ };
628
+ LongPrototype.sub = LongPrototype.subtract;
629
+ LongPrototype.multiply = function multiply(multiplier) {
630
+ if (this.isZero())
631
+ return ZERO;
632
+ if (!isLong(multiplier))
633
+ multiplier = fromValue(multiplier);
634
+ if (wasm) {
635
+ var low = wasm.mul(
636
+ this.low,
637
+ this.high,
638
+ multiplier.low,
639
+ multiplier.high
640
+ );
641
+ return fromBits(low, wasm.get_high(), this.unsigned);
642
+ }
643
+ if (multiplier.isZero())
644
+ return ZERO;
645
+ if (this.eq(MIN_VALUE))
646
+ return multiplier.isOdd() ? MIN_VALUE : ZERO;
647
+ if (multiplier.eq(MIN_VALUE))
648
+ return this.isOdd() ? MIN_VALUE : ZERO;
649
+ if (this.isNegative()) {
650
+ if (multiplier.isNegative())
651
+ return this.neg().mul(multiplier.neg());
652
+ else
653
+ return this.neg().mul(multiplier).neg();
654
+ } else if (multiplier.isNegative())
655
+ return this.mul(multiplier.neg()).neg();
656
+ if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
657
+ return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
658
+ var a48 = this.high >>> 16;
659
+ var a32 = this.high & 65535;
660
+ var a16 = this.low >>> 16;
661
+ var a00 = this.low & 65535;
662
+ var b48 = multiplier.high >>> 16;
663
+ var b32 = multiplier.high & 65535;
664
+ var b16 = multiplier.low >>> 16;
665
+ var b00 = multiplier.low & 65535;
666
+ var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
667
+ c00 += a00 * b00;
668
+ c16 += c00 >>> 16;
669
+ c00 &= 65535;
670
+ c16 += a16 * b00;
671
+ c32 += c16 >>> 16;
672
+ c16 &= 65535;
673
+ c16 += a00 * b16;
674
+ c32 += c16 >>> 16;
675
+ c16 &= 65535;
676
+ c32 += a32 * b00;
677
+ c48 += c32 >>> 16;
678
+ c32 &= 65535;
679
+ c32 += a16 * b16;
680
+ c48 += c32 >>> 16;
681
+ c32 &= 65535;
682
+ c32 += a00 * b32;
683
+ c48 += c32 >>> 16;
684
+ c32 &= 65535;
685
+ c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
686
+ c48 &= 65535;
687
+ return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
688
+ };
689
+ LongPrototype.mul = LongPrototype.multiply;
690
+ LongPrototype.divide = function divide(divisor) {
691
+ if (!isLong(divisor))
692
+ divisor = fromValue(divisor);
693
+ if (divisor.isZero())
694
+ throw Error("division by zero");
695
+ if (wasm) {
696
+ if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
697
+ return this;
698
+ }
699
+ var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
700
+ this.low,
701
+ this.high,
702
+ divisor.low,
703
+ divisor.high
704
+ );
705
+ return fromBits(low, wasm.get_high(), this.unsigned);
706
+ }
707
+ if (this.isZero())
708
+ return this.unsigned ? UZERO : ZERO;
709
+ var approx, rem, res;
710
+ if (!this.unsigned) {
711
+ if (this.eq(MIN_VALUE)) {
712
+ if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
713
+ return MIN_VALUE;
714
+ else if (divisor.eq(MIN_VALUE))
715
+ return ONE;
716
+ else {
717
+ var halfThis = this.shr(1);
718
+ approx = halfThis.div(divisor).shl(1);
719
+ if (approx.eq(ZERO)) {
720
+ return divisor.isNegative() ? ONE : NEG_ONE;
721
+ } else {
722
+ rem = this.sub(divisor.mul(approx));
723
+ res = approx.add(rem.div(divisor));
724
+ return res;
725
+ }
726
+ }
727
+ } else if (divisor.eq(MIN_VALUE))
728
+ return this.unsigned ? UZERO : ZERO;
729
+ if (this.isNegative()) {
730
+ if (divisor.isNegative())
731
+ return this.neg().div(divisor.neg());
732
+ return this.neg().div(divisor).neg();
733
+ } else if (divisor.isNegative())
734
+ return this.div(divisor.neg()).neg();
735
+ res = ZERO;
736
+ } else {
737
+ if (!divisor.unsigned)
738
+ divisor = divisor.toUnsigned();
739
+ if (divisor.gt(this))
740
+ return UZERO;
741
+ if (divisor.gt(this.shru(1)))
742
+ return UONE;
743
+ res = UZERO;
744
+ }
745
+ rem = this;
746
+ while (rem.gte(divisor)) {
747
+ approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
748
+ var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
749
+ while (approxRem.isNegative() || approxRem.gt(rem)) {
750
+ approx -= delta;
751
+ approxRes = fromNumber(approx, this.unsigned);
752
+ approxRem = approxRes.mul(divisor);
753
+ }
754
+ if (approxRes.isZero())
755
+ approxRes = ONE;
756
+ res = res.add(approxRes);
757
+ rem = rem.sub(approxRem);
758
+ }
759
+ return res;
760
+ };
761
+ LongPrototype.div = LongPrototype.divide;
762
+ LongPrototype.modulo = function modulo(divisor) {
763
+ if (!isLong(divisor))
764
+ divisor = fromValue(divisor);
765
+ if (wasm) {
766
+ var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
767
+ this.low,
768
+ this.high,
769
+ divisor.low,
770
+ divisor.high
771
+ );
772
+ return fromBits(low, wasm.get_high(), this.unsigned);
773
+ }
774
+ return this.sub(this.div(divisor).mul(divisor));
775
+ };
776
+ LongPrototype.mod = LongPrototype.modulo;
777
+ LongPrototype.rem = LongPrototype.modulo;
778
+ LongPrototype.not = function not() {
779
+ return fromBits(~this.low, ~this.high, this.unsigned);
780
+ };
781
+ LongPrototype.and = function and(other) {
782
+ if (!isLong(other))
783
+ other = fromValue(other);
784
+ return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
785
+ };
786
+ LongPrototype.or = function or(other) {
787
+ if (!isLong(other))
788
+ other = fromValue(other);
789
+ return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
790
+ };
791
+ LongPrototype.xor = function xor(other) {
792
+ if (!isLong(other))
793
+ other = fromValue(other);
794
+ return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
795
+ };
796
+ LongPrototype.shiftLeft = function shiftLeft(numBits) {
797
+ if (isLong(numBits))
798
+ numBits = numBits.toInt();
799
+ if ((numBits &= 63) === 0)
800
+ return this;
801
+ else if (numBits < 32)
802
+ return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
803
+ else
804
+ return fromBits(0, this.low << numBits - 32, this.unsigned);
805
+ };
806
+ LongPrototype.shl = LongPrototype.shiftLeft;
807
+ LongPrototype.shiftRight = function shiftRight(numBits) {
808
+ if (isLong(numBits))
809
+ numBits = numBits.toInt();
810
+ if ((numBits &= 63) === 0)
811
+ return this;
812
+ else if (numBits < 32)
813
+ return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
814
+ else
815
+ return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
816
+ };
817
+ LongPrototype.shr = LongPrototype.shiftRight;
818
+ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
819
+ if (isLong(numBits))
820
+ numBits = numBits.toInt();
821
+ numBits &= 63;
822
+ if (numBits === 0)
823
+ return this;
824
+ else {
825
+ var high = this.high;
826
+ if (numBits < 32) {
827
+ var low = this.low;
828
+ return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
829
+ } else if (numBits === 32)
830
+ return fromBits(high, 0, this.unsigned);
831
+ else
832
+ return fromBits(high >>> numBits - 32, 0, this.unsigned);
833
+ }
834
+ };
835
+ LongPrototype.shru = LongPrototype.shiftRightUnsigned;
836
+ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
837
+ LongPrototype.toSigned = function toSigned() {
838
+ if (!this.unsigned)
839
+ return this;
840
+ return fromBits(this.low, this.high, false);
841
+ };
842
+ LongPrototype.toUnsigned = function toUnsigned() {
843
+ if (this.unsigned)
844
+ return this;
845
+ return fromBits(this.low, this.high, true);
846
+ };
847
+ LongPrototype.toBytes = function toBytes(le) {
848
+ return le ? this.toBytesLE() : this.toBytesBE();
849
+ };
850
+ LongPrototype.toBytesLE = function toBytesLE() {
851
+ var hi = this.high, lo = this.low;
852
+ return [
853
+ lo & 255,
854
+ lo >>> 8 & 255,
855
+ lo >>> 16 & 255,
856
+ lo >>> 24,
857
+ hi & 255,
858
+ hi >>> 8 & 255,
859
+ hi >>> 16 & 255,
860
+ hi >>> 24
861
+ ];
862
+ };
863
+ LongPrototype.toBytesBE = function toBytesBE() {
864
+ var hi = this.high, lo = this.low;
865
+ return [
866
+ hi >>> 24,
867
+ hi >>> 16 & 255,
868
+ hi >>> 8 & 255,
869
+ hi & 255,
870
+ lo >>> 24,
871
+ lo >>> 16 & 255,
872
+ lo >>> 8 & 255,
873
+ lo & 255
874
+ ];
875
+ };
876
+ Long5.fromBytes = function fromBytes(bytes, unsigned, le) {
877
+ return le ? Long5.fromBytesLE(bytes, unsigned) : Long5.fromBytesBE(bytes, unsigned);
878
+ };
879
+ Long5.fromBytesLE = function fromBytesLE(bytes, unsigned) {
880
+ return new Long5(
881
+ bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
882
+ bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
883
+ unsigned
884
+ );
885
+ };
886
+ Long5.fromBytesBE = function fromBytesBE(bytes, unsigned) {
887
+ return new Long5(
888
+ bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
889
+ bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
890
+ unsigned
891
+ );
892
+ };
893
+ }
894
+ });
895
+
896
+ // ../../node_modules/@protobufjs/aspromise/index.js
897
+ var require_aspromise = __commonJS({
898
+ "../../node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
899
+ "use strict";
900
+ module2.exports = asPromise;
901
+ function asPromise(fn, ctx) {
902
+ var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
903
+ while (index < arguments.length)
904
+ params[offset++] = arguments[index++];
905
+ return new Promise(function executor(resolve, reject) {
906
+ params[offset] = function callback(err) {
907
+ if (pending) {
908
+ pending = false;
909
+ if (err)
910
+ reject(err);
911
+ else {
912
+ var params2 = new Array(arguments.length - 1), offset2 = 0;
913
+ while (offset2 < params2.length)
914
+ params2[offset2++] = arguments[offset2];
915
+ resolve.apply(null, params2);
916
+ }
917
+ }
918
+ };
919
+ try {
920
+ fn.apply(ctx || null, params);
921
+ } catch (err) {
922
+ if (pending) {
923
+ pending = false;
924
+ reject(err);
925
+ }
926
+ }
927
+ });
928
+ }
929
+ }
930
+ });
931
+
932
+ // ../../node_modules/@protobufjs/base64/index.js
933
+ var require_base64 = __commonJS({
934
+ "../../node_modules/@protobufjs/base64/index.js"(exports2) {
935
+ "use strict";
936
+ var base64 = exports2;
937
+ base64.length = function length(string) {
938
+ var p = string.length;
939
+ if (!p)
940
+ return 0;
941
+ var n = 0;
942
+ while (--p % 4 > 1 && string.charAt(p) === "=")
943
+ ++n;
944
+ return Math.ceil(string.length * 3) / 4 - n;
945
+ };
946
+ var b64 = new Array(64);
947
+ var s64 = new Array(123);
948
+ for (i = 0; i < 64; )
949
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
950
+ var i;
951
+ base64.encode = function encode(buffer, start, end) {
952
+ var parts = null, chunk = [];
953
+ var i2 = 0, j = 0, t;
954
+ while (start < end) {
955
+ var b = buffer[start++];
956
+ switch (j) {
957
+ case 0:
958
+ chunk[i2++] = b64[b >> 2];
959
+ t = (b & 3) << 4;
960
+ j = 1;
961
+ break;
962
+ case 1:
963
+ chunk[i2++] = b64[t | b >> 4];
964
+ t = (b & 15) << 2;
965
+ j = 2;
966
+ break;
967
+ case 2:
968
+ chunk[i2++] = b64[t | b >> 6];
969
+ chunk[i2++] = b64[b & 63];
970
+ j = 0;
971
+ break;
972
+ }
973
+ if (i2 > 8191) {
974
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
975
+ i2 = 0;
976
+ }
977
+ }
978
+ if (j) {
979
+ chunk[i2++] = b64[t];
980
+ chunk[i2++] = 61;
981
+ if (j === 1)
982
+ chunk[i2++] = 61;
983
+ }
984
+ if (parts) {
985
+ if (i2)
986
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
987
+ return parts.join("");
988
+ }
989
+ return String.fromCharCode.apply(String, chunk.slice(0, i2));
990
+ };
991
+ var invalidEncoding = "invalid encoding";
992
+ base64.decode = function decode(string, buffer, offset) {
993
+ var start = offset;
994
+ var j = 0, t;
995
+ for (var i2 = 0; i2 < string.length; ) {
996
+ var c = string.charCodeAt(i2++);
997
+ if (c === 61 && j > 1)
998
+ break;
999
+ if ((c = s64[c]) === void 0)
1000
+ throw Error(invalidEncoding);
1001
+ switch (j) {
1002
+ case 0:
1003
+ t = c;
1004
+ j = 1;
1005
+ break;
1006
+ case 1:
1007
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
1008
+ t = c;
1009
+ j = 2;
1010
+ break;
1011
+ case 2:
1012
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
1013
+ t = c;
1014
+ j = 3;
1015
+ break;
1016
+ case 3:
1017
+ buffer[offset++] = (t & 3) << 6 | c;
1018
+ j = 0;
1019
+ break;
1020
+ }
1021
+ }
1022
+ if (j === 1)
1023
+ throw Error(invalidEncoding);
1024
+ return offset - start;
1025
+ };
1026
+ base64.test = function test(string) {
1027
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
1028
+ };
1029
+ }
1030
+ });
1031
+
1032
+ // ../../node_modules/@protobufjs/eventemitter/index.js
1033
+ var require_eventemitter = __commonJS({
1034
+ "../../node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
1035
+ "use strict";
1036
+ module2.exports = EventEmitter;
1037
+ function EventEmitter() {
1038
+ this._listeners = {};
1039
+ }
1040
+ EventEmitter.prototype.on = function on(evt, fn, ctx) {
1041
+ (this._listeners[evt] || (this._listeners[evt] = [])).push({
1042
+ fn,
1043
+ ctx: ctx || this
1044
+ });
1045
+ return this;
1046
+ };
1047
+ EventEmitter.prototype.off = function off(evt, fn) {
1048
+ if (evt === void 0)
1049
+ this._listeners = {};
1050
+ else {
1051
+ if (fn === void 0)
1052
+ this._listeners[evt] = [];
1053
+ else {
1054
+ var listeners = this._listeners[evt];
1055
+ for (var i = 0; i < listeners.length; )
1056
+ if (listeners[i].fn === fn)
1057
+ listeners.splice(i, 1);
1058
+ else
1059
+ ++i;
1060
+ }
1061
+ }
1062
+ return this;
1063
+ };
1064
+ EventEmitter.prototype.emit = function emit(evt) {
1065
+ var listeners = this._listeners[evt];
1066
+ if (listeners) {
1067
+ var args = [], i = 1;
1068
+ for (; i < arguments.length; )
1069
+ args.push(arguments[i++]);
1070
+ for (i = 0; i < listeners.length; )
1071
+ listeners[i].fn.apply(listeners[i++].ctx, args);
1072
+ }
1073
+ return this;
1074
+ };
1075
+ }
1076
+ });
1077
+
1078
+ // ../../node_modules/@protobufjs/float/index.js
1079
+ var require_float = __commonJS({
1080
+ "../../node_modules/@protobufjs/float/index.js"(exports2, module2) {
1081
+ "use strict";
1082
+ module2.exports = factory(factory);
1083
+ function factory(exports3) {
1084
+ if (typeof Float32Array !== "undefined")
1085
+ (function() {
1086
+ var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
1087
+ function writeFloat_f32_cpy(val, buf, pos) {
1088
+ f32[0] = val;
1089
+ buf[pos] = f8b[0];
1090
+ buf[pos + 1] = f8b[1];
1091
+ buf[pos + 2] = f8b[2];
1092
+ buf[pos + 3] = f8b[3];
1093
+ }
1094
+ function writeFloat_f32_rev(val, buf, pos) {
1095
+ f32[0] = val;
1096
+ buf[pos] = f8b[3];
1097
+ buf[pos + 1] = f8b[2];
1098
+ buf[pos + 2] = f8b[1];
1099
+ buf[pos + 3] = f8b[0];
1100
+ }
1101
+ exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
1102
+ exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
1103
+ function readFloat_f32_cpy(buf, pos) {
1104
+ f8b[0] = buf[pos];
1105
+ f8b[1] = buf[pos + 1];
1106
+ f8b[2] = buf[pos + 2];
1107
+ f8b[3] = buf[pos + 3];
1108
+ return f32[0];
1109
+ }
1110
+ function readFloat_f32_rev(buf, pos) {
1111
+ f8b[3] = buf[pos];
1112
+ f8b[2] = buf[pos + 1];
1113
+ f8b[1] = buf[pos + 2];
1114
+ f8b[0] = buf[pos + 3];
1115
+ return f32[0];
1116
+ }
1117
+ exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
1118
+ exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
1119
+ })();
1120
+ else
1121
+ (function() {
1122
+ function writeFloat_ieee754(writeUint, val, buf, pos) {
1123
+ var sign = val < 0 ? 1 : 0;
1124
+ if (sign)
1125
+ val = -val;
1126
+ if (val === 0)
1127
+ writeUint(1 / val > 0 ? (
1128
+ /* positive */
1129
+ 0
1130
+ ) : (
1131
+ /* negative 0 */
1132
+ 2147483648
1133
+ ), buf, pos);
1134
+ else if (isNaN(val))
1135
+ writeUint(2143289344, buf, pos);
1136
+ else if (val > 34028234663852886e22)
1137
+ writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
1138
+ else if (val < 11754943508222875e-54)
1139
+ writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
1140
+ else {
1141
+ var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
1142
+ writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
1143
+ }
1144
+ }
1145
+ exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
1146
+ exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
1147
+ function readFloat_ieee754(readUint, buf, pos) {
1148
+ var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
1149
+ return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
1150
+ }
1151
+ exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
1152
+ exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
1153
+ })();
1154
+ if (typeof Float64Array !== "undefined")
1155
+ (function() {
1156
+ var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
1157
+ function writeDouble_f64_cpy(val, buf, pos) {
1158
+ f64[0] = val;
1159
+ buf[pos] = f8b[0];
1160
+ buf[pos + 1] = f8b[1];
1161
+ buf[pos + 2] = f8b[2];
1162
+ buf[pos + 3] = f8b[3];
1163
+ buf[pos + 4] = f8b[4];
1164
+ buf[pos + 5] = f8b[5];
1165
+ buf[pos + 6] = f8b[6];
1166
+ buf[pos + 7] = f8b[7];
1167
+ }
1168
+ function writeDouble_f64_rev(val, buf, pos) {
1169
+ f64[0] = val;
1170
+ buf[pos] = f8b[7];
1171
+ buf[pos + 1] = f8b[6];
1172
+ buf[pos + 2] = f8b[5];
1173
+ buf[pos + 3] = f8b[4];
1174
+ buf[pos + 4] = f8b[3];
1175
+ buf[pos + 5] = f8b[2];
1176
+ buf[pos + 6] = f8b[1];
1177
+ buf[pos + 7] = f8b[0];
1178
+ }
1179
+ exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
1180
+ exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
1181
+ function readDouble_f64_cpy(buf, pos) {
1182
+ f8b[0] = buf[pos];
1183
+ f8b[1] = buf[pos + 1];
1184
+ f8b[2] = buf[pos + 2];
1185
+ f8b[3] = buf[pos + 3];
1186
+ f8b[4] = buf[pos + 4];
1187
+ f8b[5] = buf[pos + 5];
1188
+ f8b[6] = buf[pos + 6];
1189
+ f8b[7] = buf[pos + 7];
1190
+ return f64[0];
1191
+ }
1192
+ function readDouble_f64_rev(buf, pos) {
1193
+ f8b[7] = buf[pos];
1194
+ f8b[6] = buf[pos + 1];
1195
+ f8b[5] = buf[pos + 2];
1196
+ f8b[4] = buf[pos + 3];
1197
+ f8b[3] = buf[pos + 4];
1198
+ f8b[2] = buf[pos + 5];
1199
+ f8b[1] = buf[pos + 6];
1200
+ f8b[0] = buf[pos + 7];
1201
+ return f64[0];
1202
+ }
1203
+ exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
1204
+ exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
1205
+ })();
1206
+ else
1207
+ (function() {
1208
+ function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
1209
+ var sign = val < 0 ? 1 : 0;
1210
+ if (sign)
1211
+ val = -val;
1212
+ if (val === 0) {
1213
+ writeUint(0, buf, pos + off0);
1214
+ writeUint(1 / val > 0 ? (
1215
+ /* positive */
1216
+ 0
1217
+ ) : (
1218
+ /* negative 0 */
1219
+ 2147483648
1220
+ ), buf, pos + off1);
1221
+ } else if (isNaN(val)) {
1222
+ writeUint(0, buf, pos + off0);
1223
+ writeUint(2146959360, buf, pos + off1);
1224
+ } else if (val > 17976931348623157e292) {
1225
+ writeUint(0, buf, pos + off0);
1226
+ writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
1227
+ } else {
1228
+ var mantissa;
1229
+ if (val < 22250738585072014e-324) {
1230
+ mantissa = val / 5e-324;
1231
+ writeUint(mantissa >>> 0, buf, pos + off0);
1232
+ writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
1233
+ } else {
1234
+ var exponent = Math.floor(Math.log(val) / Math.LN2);
1235
+ if (exponent === 1024)
1236
+ exponent = 1023;
1237
+ mantissa = val * Math.pow(2, -exponent);
1238
+ writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
1239
+ writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
1240
+ }
1241
+ }
1242
+ }
1243
+ exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
1244
+ exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
1245
+ function readDouble_ieee754(readUint, off0, off1, buf, pos) {
1246
+ var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
1247
+ var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
1248
+ return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
1249
+ }
1250
+ exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
1251
+ exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
1252
+ })();
1253
+ return exports3;
1254
+ }
1255
+ function writeUintLE(val, buf, pos) {
1256
+ buf[pos] = val & 255;
1257
+ buf[pos + 1] = val >>> 8 & 255;
1258
+ buf[pos + 2] = val >>> 16 & 255;
1259
+ buf[pos + 3] = val >>> 24;
1701
1260
  }
1702
- Long4.prototype.__isLong__;
1703
- Object.defineProperty(Long4.prototype, "__isLong__", { value: true });
1704
- function isLong(obj) {
1705
- return (obj && obj["__isLong__"]) === true;
1261
+ function writeUintBE(val, buf, pos) {
1262
+ buf[pos] = val >>> 24;
1263
+ buf[pos + 1] = val >>> 16 & 255;
1264
+ buf[pos + 2] = val >>> 8 & 255;
1265
+ buf[pos + 3] = val & 255;
1266
+ }
1267
+ function readUintLE(buf, pos) {
1268
+ return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
1269
+ }
1270
+ function readUintBE(buf, pos) {
1271
+ return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
1272
+ }
1273
+ }
1274
+ });
1275
+
1276
+ // ../../node_modules/@protobufjs/inquire/index.js
1277
+ var require_inquire = __commonJS({
1278
+ "../../node_modules/@protobufjs/inquire/index.js"(exports, module) {
1279
+ "use strict";
1280
+ module.exports = inquire;
1281
+ function inquire(moduleName) {
1282
+ try {
1283
+ var mod = eval("quire".replace(/^/, "re"))(moduleName);
1284
+ if (mod && (mod.length || Object.keys(mod).length))
1285
+ return mod;
1286
+ } catch (e) {
1287
+ }
1288
+ return null;
1289
+ }
1290
+ }
1291
+ });
1292
+
1293
+ // ../../node_modules/@protobufjs/utf8/index.js
1294
+ var require_utf8 = __commonJS({
1295
+ "../../node_modules/@protobufjs/utf8/index.js"(exports2) {
1296
+ "use strict";
1297
+ var utf8 = exports2;
1298
+ utf8.length = function utf8_length(string) {
1299
+ var len = 0, c = 0;
1300
+ for (var i = 0; i < string.length; ++i) {
1301
+ c = string.charCodeAt(i);
1302
+ if (c < 128)
1303
+ len += 1;
1304
+ else if (c < 2048)
1305
+ len += 2;
1306
+ else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
1307
+ ++i;
1308
+ len += 4;
1309
+ } else
1310
+ len += 3;
1311
+ }
1312
+ return len;
1313
+ };
1314
+ utf8.read = function utf8_read(buffer, start, end) {
1315
+ var len = end - start;
1316
+ if (len < 1)
1317
+ return "";
1318
+ var parts = null, chunk = [], i = 0, t;
1319
+ while (start < end) {
1320
+ t = buffer[start++];
1321
+ if (t < 128)
1322
+ chunk[i++] = t;
1323
+ else if (t > 191 && t < 224)
1324
+ chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
1325
+ else if (t > 239 && t < 365) {
1326
+ t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
1327
+ chunk[i++] = 55296 + (t >> 10);
1328
+ chunk[i++] = 56320 + (t & 1023);
1329
+ } else
1330
+ chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
1331
+ if (i > 8191) {
1332
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
1333
+ i = 0;
1334
+ }
1335
+ }
1336
+ if (parts) {
1337
+ if (i)
1338
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
1339
+ return parts.join("");
1340
+ }
1341
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
1342
+ };
1343
+ utf8.write = function utf8_write(string, buffer, offset) {
1344
+ var start = offset, c1, c2;
1345
+ for (var i = 0; i < string.length; ++i) {
1346
+ c1 = string.charCodeAt(i);
1347
+ if (c1 < 128) {
1348
+ buffer[offset++] = c1;
1349
+ } else if (c1 < 2048) {
1350
+ buffer[offset++] = c1 >> 6 | 192;
1351
+ buffer[offset++] = c1 & 63 | 128;
1352
+ } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
1353
+ c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
1354
+ ++i;
1355
+ buffer[offset++] = c1 >> 18 | 240;
1356
+ buffer[offset++] = c1 >> 12 & 63 | 128;
1357
+ buffer[offset++] = c1 >> 6 & 63 | 128;
1358
+ buffer[offset++] = c1 & 63 | 128;
1359
+ } else {
1360
+ buffer[offset++] = c1 >> 12 | 224;
1361
+ buffer[offset++] = c1 >> 6 & 63 | 128;
1362
+ buffer[offset++] = c1 & 63 | 128;
1363
+ }
1364
+ }
1365
+ return offset - start;
1366
+ };
1367
+ }
1368
+ });
1369
+
1370
+ // ../../node_modules/@protobufjs/pool/index.js
1371
+ var require_pool = __commonJS({
1372
+ "../../node_modules/@protobufjs/pool/index.js"(exports2, module2) {
1373
+ "use strict";
1374
+ module2.exports = pool;
1375
+ function pool(alloc, slice, size) {
1376
+ var SIZE = size || 8192;
1377
+ var MAX = SIZE >>> 1;
1378
+ var slab = null;
1379
+ var offset = SIZE;
1380
+ return function pool_alloc(size2) {
1381
+ if (size2 < 1 || size2 > MAX)
1382
+ return alloc(size2);
1383
+ if (offset + size2 > SIZE) {
1384
+ slab = alloc(SIZE);
1385
+ offset = 0;
1386
+ }
1387
+ var buf = slice.call(slab, offset, offset += size2);
1388
+ if (offset & 7)
1389
+ offset = (offset | 7) + 1;
1390
+ return buf;
1391
+ };
1392
+ }
1393
+ }
1394
+ });
1395
+
1396
+ // ../../node_modules/protobufjs/src/util/longbits.js
1397
+ var require_longbits = __commonJS({
1398
+ "../../node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
1399
+ "use strict";
1400
+ module2.exports = LongBits;
1401
+ var util = require_minimal();
1402
+ function LongBits(lo, hi) {
1403
+ this.lo = lo >>> 0;
1404
+ this.hi = hi >>> 0;
1405
+ }
1406
+ var zero = LongBits.zero = new LongBits(0, 0);
1407
+ zero.toNumber = function() {
1408
+ return 0;
1409
+ };
1410
+ zero.zzEncode = zero.zzDecode = function() {
1411
+ return this;
1412
+ };
1413
+ zero.length = function() {
1414
+ return 1;
1415
+ };
1416
+ var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
1417
+ LongBits.fromNumber = function fromNumber(value) {
1418
+ if (value === 0)
1419
+ return zero;
1420
+ var sign = value < 0;
1421
+ if (sign)
1422
+ value = -value;
1423
+ var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
1424
+ if (sign) {
1425
+ hi = ~hi >>> 0;
1426
+ lo = ~lo >>> 0;
1427
+ if (++lo > 4294967295) {
1428
+ lo = 0;
1429
+ if (++hi > 4294967295)
1430
+ hi = 0;
1431
+ }
1432
+ }
1433
+ return new LongBits(lo, hi);
1434
+ };
1435
+ LongBits.from = function from(value) {
1436
+ if (typeof value === "number")
1437
+ return LongBits.fromNumber(value);
1438
+ if (util.isString(value)) {
1439
+ if (util.Long)
1440
+ value = util.Long.fromString(value);
1441
+ else
1442
+ return LongBits.fromNumber(parseInt(value, 10));
1443
+ }
1444
+ return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
1445
+ };
1446
+ LongBits.prototype.toNumber = function toNumber(unsigned) {
1447
+ if (!unsigned && this.hi >>> 31) {
1448
+ var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
1449
+ if (!lo)
1450
+ hi = hi + 1 >>> 0;
1451
+ return -(lo + hi * 4294967296);
1452
+ }
1453
+ return this.lo + this.hi * 4294967296;
1454
+ };
1455
+ LongBits.prototype.toLong = function toLong(unsigned) {
1456
+ return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
1457
+ };
1458
+ var charCodeAt = String.prototype.charCodeAt;
1459
+ LongBits.fromHash = function fromHash(hash) {
1460
+ if (hash === zeroHash)
1461
+ return zero;
1462
+ return new LongBits(
1463
+ (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
1464
+ (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
1465
+ );
1466
+ };
1467
+ LongBits.prototype.toHash = function toHash() {
1468
+ return String.fromCharCode(
1469
+ this.lo & 255,
1470
+ this.lo >>> 8 & 255,
1471
+ this.lo >>> 16 & 255,
1472
+ this.lo >>> 24,
1473
+ this.hi & 255,
1474
+ this.hi >>> 8 & 255,
1475
+ this.hi >>> 16 & 255,
1476
+ this.hi >>> 24
1477
+ );
1478
+ };
1479
+ LongBits.prototype.zzEncode = function zzEncode() {
1480
+ var mask = this.hi >> 31;
1481
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
1482
+ this.lo = (this.lo << 1 ^ mask) >>> 0;
1483
+ return this;
1484
+ };
1485
+ LongBits.prototype.zzDecode = function zzDecode() {
1486
+ var mask = -(this.lo & 1);
1487
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
1488
+ this.hi = (this.hi >>> 1 ^ mask) >>> 0;
1489
+ return this;
1490
+ };
1491
+ LongBits.prototype.length = function length() {
1492
+ var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
1493
+ return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
1494
+ };
1495
+ }
1496
+ });
1497
+
1498
+ // ../../node_modules/protobufjs/src/util/minimal.js
1499
+ var require_minimal = __commonJS({
1500
+ "../../node_modules/protobufjs/src/util/minimal.js"(exports2) {
1501
+ "use strict";
1502
+ var util = exports2;
1503
+ util.asPromise = require_aspromise();
1504
+ util.base64 = require_base64();
1505
+ util.EventEmitter = require_eventemitter();
1506
+ util.float = require_float();
1507
+ util.inquire = require_inquire();
1508
+ util.utf8 = require_utf8();
1509
+ util.pool = require_pool();
1510
+ util.LongBits = require_longbits();
1511
+ util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
1512
+ util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
1513
+ util.emptyArray = Object.freeze ? Object.freeze([]) : (
1514
+ /* istanbul ignore next */
1515
+ []
1516
+ );
1517
+ util.emptyObject = Object.freeze ? Object.freeze({}) : (
1518
+ /* istanbul ignore next */
1519
+ {}
1520
+ );
1521
+ util.isInteger = Number.isInteger || /* istanbul ignore next */
1522
+ function isInteger(value) {
1523
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
1524
+ };
1525
+ util.isString = function isString(value) {
1526
+ return typeof value === "string" || value instanceof String;
1527
+ };
1528
+ util.isObject = function isObject2(value) {
1529
+ return value && typeof value === "object";
1530
+ };
1531
+ util.isset = /**
1532
+ * Checks if a property on a message is considered to be present.
1533
+ * @param {Object} obj Plain object or message instance
1534
+ * @param {string} prop Property name
1535
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
1536
+ */
1537
+ util.isSet = function isSet5(obj, prop) {
1538
+ var value = obj[prop];
1539
+ if (value != null && obj.hasOwnProperty(prop))
1540
+ return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
1541
+ return false;
1542
+ };
1543
+ util.Buffer = function() {
1544
+ try {
1545
+ var Buffer2 = util.inquire("buffer").Buffer;
1546
+ return Buffer2.prototype.utf8Write ? Buffer2 : (
1547
+ /* istanbul ignore next */
1548
+ null
1549
+ );
1550
+ } catch (e) {
1551
+ return null;
1552
+ }
1553
+ }();
1554
+ util._Buffer_from = null;
1555
+ util._Buffer_allocUnsafe = null;
1556
+ util.newBuffer = function newBuffer(sizeOrArray) {
1557
+ return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
1558
+ };
1559
+ util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
1560
+ util.Long = /* istanbul ignore next */
1561
+ util.global.dcodeIO && /* istanbul ignore next */
1562
+ util.global.dcodeIO.Long || /* istanbul ignore next */
1563
+ util.global.Long || util.inquire("long");
1564
+ util.key2Re = /^true|false|0|1$/;
1565
+ util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
1566
+ util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
1567
+ util.longToHash = function longToHash(value) {
1568
+ return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
1569
+ };
1570
+ util.longFromHash = function longFromHash(hash, unsigned) {
1571
+ var bits = util.LongBits.fromHash(hash);
1572
+ if (util.Long)
1573
+ return util.Long.fromBits(bits.lo, bits.hi, unsigned);
1574
+ return bits.toNumber(Boolean(unsigned));
1575
+ };
1576
+ function merge(dst, src, ifNotSet) {
1577
+ for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
1578
+ if (dst[keys[i]] === void 0 || !ifNotSet)
1579
+ dst[keys[i]] = src[keys[i]];
1580
+ return dst;
1706
1581
  }
1707
- Long4.isLong = isLong;
1708
- var INT_CACHE = {};
1709
- var UINT_CACHE = {};
1710
- function fromInt(value, unsigned) {
1711
- var obj, cachedObj, cache;
1712
- if (unsigned) {
1713
- value >>>= 0;
1714
- if (cache = 0 <= value && value < 256) {
1715
- cachedObj = UINT_CACHE[value];
1716
- if (cachedObj)
1717
- return cachedObj;
1718
- }
1719
- obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
1720
- if (cache)
1721
- UINT_CACHE[value] = obj;
1722
- return obj;
1723
- } else {
1724
- value |= 0;
1725
- if (cache = -128 <= value && value < 128) {
1726
- cachedObj = INT_CACHE[value];
1727
- if (cachedObj)
1728
- return cachedObj;
1729
- }
1730
- obj = fromBits(value, value < 0 ? -1 : 0, false);
1731
- if (cache)
1732
- INT_CACHE[value] = obj;
1733
- return obj;
1582
+ util.merge = merge;
1583
+ util.lcFirst = function lcFirst(str) {
1584
+ return str.charAt(0).toLowerCase() + str.substring(1);
1585
+ };
1586
+ function newError(name) {
1587
+ function CustomError(message, properties) {
1588
+ if (!(this instanceof CustomError))
1589
+ return new CustomError(message, properties);
1590
+ Object.defineProperty(this, "message", { get: function() {
1591
+ return message;
1592
+ } });
1593
+ if (Error.captureStackTrace)
1594
+ Error.captureStackTrace(this, CustomError);
1595
+ else
1596
+ Object.defineProperty(this, "stack", { value: new Error().stack || "" });
1597
+ if (properties)
1598
+ merge(this, properties);
1734
1599
  }
1600
+ (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
1601
+ Object.defineProperty(CustomError.prototype, "name", { get: function() {
1602
+ return name;
1603
+ } });
1604
+ CustomError.prototype.toString = function toString() {
1605
+ return this.name + ": " + this.message;
1606
+ };
1607
+ return CustomError;
1735
1608
  }
1736
- Long4.fromInt = fromInt;
1737
- function fromNumber(value, unsigned) {
1738
- if (isNaN(value))
1739
- return unsigned ? UZERO : ZERO;
1740
- if (unsigned) {
1741
- if (value < 0)
1742
- return UZERO;
1743
- if (value >= TWO_PWR_64_DBL)
1744
- return MAX_UNSIGNED_VALUE;
1745
- } else {
1746
- if (value <= -TWO_PWR_63_DBL)
1747
- return MIN_VALUE;
1748
- if (value + 1 >= TWO_PWR_63_DBL)
1749
- return MAX_VALUE;
1609
+ util.newError = newError;
1610
+ util.ProtocolError = newError("ProtocolError");
1611
+ util.oneOfGetter = function getOneOf(fieldNames) {
1612
+ var fieldMap = {};
1613
+ for (var i = 0; i < fieldNames.length; ++i)
1614
+ fieldMap[fieldNames[i]] = 1;
1615
+ return function() {
1616
+ for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
1617
+ if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
1618
+ return keys[i2];
1619
+ };
1620
+ };
1621
+ util.oneOfSetter = function setOneOf(fieldNames) {
1622
+ return function(name) {
1623
+ for (var i = 0; i < fieldNames.length; ++i)
1624
+ if (fieldNames[i] !== name)
1625
+ delete this[fieldNames[i]];
1626
+ };
1627
+ };
1628
+ util.toJSONOptions = {
1629
+ longs: String,
1630
+ enums: String,
1631
+ bytes: String,
1632
+ json: true
1633
+ };
1634
+ util._configure = function() {
1635
+ var Buffer2 = util.Buffer;
1636
+ if (!Buffer2) {
1637
+ util._Buffer_from = util._Buffer_allocUnsafe = null;
1638
+ return;
1750
1639
  }
1751
- if (value < 0)
1752
- return fromNumber(-value, unsigned).neg();
1753
- return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
1640
+ util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
1641
+ function Buffer_from(value, encoding) {
1642
+ return new Buffer2(value, encoding);
1643
+ };
1644
+ util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
1645
+ function Buffer_allocUnsafe(size) {
1646
+ return new Buffer2(size);
1647
+ };
1648
+ };
1649
+ }
1650
+ });
1651
+
1652
+ // ../../node_modules/protobufjs/src/writer.js
1653
+ var require_writer = __commonJS({
1654
+ "../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
1655
+ "use strict";
1656
+ module2.exports = Writer;
1657
+ var util = require_minimal();
1658
+ var BufferWriter;
1659
+ var LongBits = util.LongBits;
1660
+ var base64 = util.base64;
1661
+ var utf8 = util.utf8;
1662
+ function Op(fn, len, val) {
1663
+ this.fn = fn;
1664
+ this.len = len;
1665
+ this.next = void 0;
1666
+ this.val = val;
1754
1667
  }
1755
- Long4.fromNumber = fromNumber;
1756
- function fromBits(lowBits, highBits, unsigned) {
1757
- return new Long4(lowBits, highBits, unsigned);
1668
+ function noop() {
1669
+ }
1670
+ function State(writer) {
1671
+ this.head = writer.head;
1672
+ this.tail = writer.tail;
1673
+ this.len = writer.len;
1674
+ this.next = writer.states;
1675
+ }
1676
+ function Writer() {
1677
+ this.len = 0;
1678
+ this.head = new Op(noop, 0, 0);
1679
+ this.tail = this.head;
1680
+ this.states = null;
1681
+ }
1682
+ var create = function create2() {
1683
+ return util.Buffer ? function create_buffer_setup() {
1684
+ return (Writer.create = function create_buffer() {
1685
+ return new BufferWriter();
1686
+ })();
1687
+ } : function create_array() {
1688
+ return new Writer();
1689
+ };
1690
+ };
1691
+ Writer.create = create();
1692
+ Writer.alloc = function alloc(size) {
1693
+ return new util.Array(size);
1694
+ };
1695
+ if (util.Array !== Array)
1696
+ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
1697
+ Writer.prototype._push = function push(fn, len, val) {
1698
+ this.tail = this.tail.next = new Op(fn, len, val);
1699
+ this.len += len;
1700
+ return this;
1701
+ };
1702
+ function writeByte(val, buf, pos) {
1703
+ buf[pos] = val & 255;
1758
1704
  }
1759
- Long4.fromBits = fromBits;
1760
- var pow_dbl = Math.pow;
1761
- function fromString(str, unsigned, radix) {
1762
- if (str.length === 0)
1763
- throw Error("empty string");
1764
- if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
1765
- return ZERO;
1766
- if (typeof unsigned === "number") {
1767
- radix = unsigned, unsigned = false;
1768
- } else {
1769
- unsigned = !!unsigned;
1770
- }
1771
- radix = radix || 10;
1772
- if (radix < 2 || 36 < radix)
1773
- throw RangeError("radix");
1774
- var p;
1775
- if ((p = str.indexOf("-")) > 0)
1776
- throw Error("interior hyphen");
1777
- else if (p === 0) {
1778
- return fromString(str.substring(1), unsigned, radix).neg();
1779
- }
1780
- var radixToPower = fromNumber(pow_dbl(radix, 8));
1781
- var result = ZERO;
1782
- for (var i = 0; i < str.length; i += 8) {
1783
- var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
1784
- if (size < 8) {
1785
- var power = fromNumber(pow_dbl(radix, size));
1786
- result = result.mul(power).add(fromNumber(value));
1787
- } else {
1788
- result = result.mul(radixToPower);
1789
- result = result.add(fromNumber(value));
1790
- }
1705
+ function writeVarint32(val, buf, pos) {
1706
+ while (val > 127) {
1707
+ buf[pos++] = val & 127 | 128;
1708
+ val >>>= 7;
1791
1709
  }
1792
- result.unsigned = unsigned;
1793
- return result;
1710
+ buf[pos] = val;
1794
1711
  }
1795
- Long4.fromString = fromString;
1796
- function fromValue(val, unsigned) {
1797
- if (typeof val === "number")
1798
- return fromNumber(val, unsigned);
1799
- if (typeof val === "string")
1800
- return fromString(val, unsigned);
1801
- return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
1712
+ function VarintOp(len, val) {
1713
+ this.len = len;
1714
+ this.next = void 0;
1715
+ this.val = val;
1802
1716
  }
1803
- Long4.fromValue = fromValue;
1804
- var TWO_PWR_16_DBL = 1 << 16;
1805
- var TWO_PWR_24_DBL = 1 << 24;
1806
- var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
1807
- var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
1808
- var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
1809
- var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
1810
- var ZERO = fromInt(0);
1811
- Long4.ZERO = ZERO;
1812
- var UZERO = fromInt(0, true);
1813
- Long4.UZERO = UZERO;
1814
- var ONE = fromInt(1);
1815
- Long4.ONE = ONE;
1816
- var UONE = fromInt(1, true);
1817
- Long4.UONE = UONE;
1818
- var NEG_ONE = fromInt(-1);
1819
- Long4.NEG_ONE = NEG_ONE;
1820
- var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
1821
- Long4.MAX_VALUE = MAX_VALUE;
1822
- var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
1823
- Long4.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
1824
- var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
1825
- Long4.MIN_VALUE = MIN_VALUE;
1826
- var LongPrototype = Long4.prototype;
1827
- LongPrototype.toInt = function toInt() {
1828
- return this.unsigned ? this.low >>> 0 : this.low;
1717
+ VarintOp.prototype = Object.create(Op.prototype);
1718
+ VarintOp.prototype.fn = writeVarint32;
1719
+ Writer.prototype.uint32 = function write_uint32(value) {
1720
+ this.len += (this.tail = this.tail.next = new VarintOp(
1721
+ (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
1722
+ value
1723
+ )).len;
1724
+ return this;
1829
1725
  };
1830
- LongPrototype.toNumber = function toNumber() {
1831
- if (this.unsigned)
1832
- return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
1833
- return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
1726
+ Writer.prototype.int32 = function write_int32(value) {
1727
+ return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
1834
1728
  };
1835
- LongPrototype.toString = function toString(radix) {
1836
- radix = radix || 10;
1837
- if (radix < 2 || 36 < radix)
1838
- throw RangeError("radix");
1839
- if (this.isZero())
1840
- return "0";
1841
- if (this.isNegative()) {
1842
- if (this.eq(MIN_VALUE)) {
1843
- var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
1844
- return div.toString(radix) + rem1.toInt().toString(radix);
1845
- } else
1846
- return "-" + this.neg().toString(radix);
1729
+ Writer.prototype.sint32 = function write_sint32(value) {
1730
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
1731
+ };
1732
+ function writeVarint64(val, buf, pos) {
1733
+ while (val.hi) {
1734
+ buf[pos++] = val.lo & 127 | 128;
1735
+ val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
1736
+ val.hi >>>= 7;
1847
1737
  }
1848
- var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
1849
- var result = "";
1850
- while (true) {
1851
- var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
1852
- rem = remDiv;
1853
- if (rem.isZero())
1854
- return digits + result;
1855
- else {
1856
- while (digits.length < 6)
1857
- digits = "0" + digits;
1858
- result = "" + digits + result;
1859
- }
1738
+ while (val.lo > 127) {
1739
+ buf[pos++] = val.lo & 127 | 128;
1740
+ val.lo = val.lo >>> 7;
1860
1741
  }
1742
+ buf[pos++] = val.lo;
1743
+ }
1744
+ Writer.prototype.uint64 = function write_uint64(value) {
1745
+ var bits = LongBits.from(value);
1746
+ return this._push(writeVarint64, bits.length(), bits);
1861
1747
  };
1862
- LongPrototype.getHighBits = function getHighBits() {
1863
- return this.high;
1864
- };
1865
- LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
1866
- return this.high >>> 0;
1748
+ Writer.prototype.int64 = Writer.prototype.uint64;
1749
+ Writer.prototype.sint64 = function write_sint64(value) {
1750
+ var bits = LongBits.from(value).zzEncode();
1751
+ return this._push(writeVarint64, bits.length(), bits);
1867
1752
  };
1868
- LongPrototype.getLowBits = function getLowBits() {
1869
- return this.low;
1753
+ Writer.prototype.bool = function write_bool(value) {
1754
+ return this._push(writeByte, 1, value ? 1 : 0);
1870
1755
  };
1871
- LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
1872
- return this.low >>> 0;
1756
+ function writeFixed32(val, buf, pos) {
1757
+ buf[pos] = val & 255;
1758
+ buf[pos + 1] = val >>> 8 & 255;
1759
+ buf[pos + 2] = val >>> 16 & 255;
1760
+ buf[pos + 3] = val >>> 24;
1761
+ }
1762
+ Writer.prototype.fixed32 = function write_fixed32(value) {
1763
+ return this._push(writeFixed32, 4, value >>> 0);
1873
1764
  };
1874
- LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
1875
- if (this.isNegative())
1876
- return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
1877
- var val = this.high != 0 ? this.high : this.low;
1878
- for (var bit = 31; bit > 0; bit--)
1879
- if ((val & 1 << bit) != 0)
1880
- break;
1881
- return this.high != 0 ? bit + 33 : bit + 1;
1765
+ Writer.prototype.sfixed32 = Writer.prototype.fixed32;
1766
+ Writer.prototype.fixed64 = function write_fixed64(value) {
1767
+ var bits = LongBits.from(value);
1768
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
1882
1769
  };
1883
- LongPrototype.isZero = function isZero() {
1884
- return this.high === 0 && this.low === 0;
1770
+ Writer.prototype.sfixed64 = Writer.prototype.fixed64;
1771
+ Writer.prototype.float = function write_float(value) {
1772
+ return this._push(util.float.writeFloatLE, 4, value);
1885
1773
  };
1886
- LongPrototype.eqz = LongPrototype.isZero;
1887
- LongPrototype.isNegative = function isNegative() {
1888
- return !this.unsigned && this.high < 0;
1774
+ Writer.prototype.double = function write_double(value) {
1775
+ return this._push(util.float.writeDoubleLE, 8, value);
1889
1776
  };
1890
- LongPrototype.isPositive = function isPositive() {
1891
- return this.unsigned || this.high >= 0;
1777
+ var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
1778
+ buf.set(val, pos);
1779
+ } : function writeBytes_for(val, buf, pos) {
1780
+ for (var i = 0; i < val.length; ++i)
1781
+ buf[pos + i] = val[i];
1892
1782
  };
1893
- LongPrototype.isOdd = function isOdd() {
1894
- return (this.low & 1) === 1;
1783
+ Writer.prototype.bytes = function write_bytes(value) {
1784
+ var len = value.length >>> 0;
1785
+ if (!len)
1786
+ return this._push(writeByte, 1, 0);
1787
+ if (util.isString(value)) {
1788
+ var buf = Writer.alloc(len = base64.length(value));
1789
+ base64.decode(value, buf, 0);
1790
+ value = buf;
1791
+ }
1792
+ return this.uint32(len)._push(writeBytes, len, value);
1895
1793
  };
1896
- LongPrototype.isEven = function isEven() {
1897
- return (this.low & 1) === 0;
1794
+ Writer.prototype.string = function write_string(value) {
1795
+ var len = utf8.length(value);
1796
+ return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
1898
1797
  };
1899
- LongPrototype.equals = function equals(other) {
1900
- if (!isLong(other))
1901
- other = fromValue(other);
1902
- if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
1903
- return false;
1904
- return this.high === other.high && this.low === other.low;
1798
+ Writer.prototype.fork = function fork() {
1799
+ this.states = new State(this);
1800
+ this.head = this.tail = new Op(noop, 0, 0);
1801
+ this.len = 0;
1802
+ return this;
1905
1803
  };
1906
- LongPrototype.eq = LongPrototype.equals;
1907
- LongPrototype.notEquals = function notEquals(other) {
1908
- return !this.eq(
1909
- /* validates */
1910
- other
1911
- );
1804
+ Writer.prototype.reset = function reset() {
1805
+ if (this.states) {
1806
+ this.head = this.states.head;
1807
+ this.tail = this.states.tail;
1808
+ this.len = this.states.len;
1809
+ this.states = this.states.next;
1810
+ } else {
1811
+ this.head = this.tail = new Op(noop, 0, 0);
1812
+ this.len = 0;
1813
+ }
1814
+ return this;
1912
1815
  };
1913
- LongPrototype.neq = LongPrototype.notEquals;
1914
- LongPrototype.ne = LongPrototype.notEquals;
1915
- LongPrototype.lessThan = function lessThan(other) {
1916
- return this.comp(
1917
- /* validates */
1918
- other
1919
- ) < 0;
1816
+ Writer.prototype.ldelim = function ldelim() {
1817
+ var head = this.head, tail = this.tail, len = this.len;
1818
+ this.reset().uint32(len);
1819
+ if (len) {
1820
+ this.tail.next = head.next;
1821
+ this.tail = tail;
1822
+ this.len += len;
1823
+ }
1824
+ return this;
1920
1825
  };
1921
- LongPrototype.lt = LongPrototype.lessThan;
1922
- LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
1923
- return this.comp(
1924
- /* validates */
1925
- other
1926
- ) <= 0;
1826
+ Writer.prototype.finish = function finish() {
1827
+ var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
1828
+ while (head) {
1829
+ head.fn(head.val, buf, pos);
1830
+ pos += head.len;
1831
+ head = head.next;
1832
+ }
1833
+ return buf;
1927
1834
  };
1928
- LongPrototype.lte = LongPrototype.lessThanOrEqual;
1929
- LongPrototype.le = LongPrototype.lessThanOrEqual;
1930
- LongPrototype.greaterThan = function greaterThan(other) {
1931
- return this.comp(
1932
- /* validates */
1933
- other
1934
- ) > 0;
1835
+ Writer._configure = function(BufferWriter_) {
1836
+ BufferWriter = BufferWriter_;
1837
+ Writer.create = create();
1838
+ BufferWriter._configure();
1935
1839
  };
1936
- LongPrototype.gt = LongPrototype.greaterThan;
1937
- LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
1938
- return this.comp(
1939
- /* validates */
1940
- other
1941
- ) >= 0;
1840
+ }
1841
+ });
1842
+
1843
+ // ../../node_modules/protobufjs/src/writer_buffer.js
1844
+ var require_writer_buffer = __commonJS({
1845
+ "../../node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
1846
+ "use strict";
1847
+ module2.exports = BufferWriter;
1848
+ var Writer = require_writer();
1849
+ (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
1850
+ var util = require_minimal();
1851
+ function BufferWriter() {
1852
+ Writer.call(this);
1853
+ }
1854
+ BufferWriter._configure = function() {
1855
+ BufferWriter.alloc = util._Buffer_allocUnsafe;
1856
+ BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
1857
+ buf.set(val, pos);
1858
+ } : function writeBytesBuffer_copy(val, buf, pos) {
1859
+ if (val.copy)
1860
+ val.copy(buf, pos, 0, val.length);
1861
+ else
1862
+ for (var i = 0; i < val.length; )
1863
+ buf[pos++] = val[i++];
1864
+ };
1942
1865
  };
1943
- LongPrototype.gte = LongPrototype.greaterThanOrEqual;
1944
- LongPrototype.ge = LongPrototype.greaterThanOrEqual;
1945
- LongPrototype.compare = function compare(other) {
1946
- if (!isLong(other))
1947
- other = fromValue(other);
1948
- if (this.eq(other))
1949
- return 0;
1950
- var thisNeg = this.isNegative(), otherNeg = other.isNegative();
1951
- if (thisNeg && !otherNeg)
1952
- return -1;
1953
- if (!thisNeg && otherNeg)
1954
- return 1;
1955
- if (!this.unsigned)
1956
- return this.sub(other).isNegative() ? -1 : 1;
1957
- return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
1866
+ BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
1867
+ if (util.isString(value))
1868
+ value = util._Buffer_from(value, "base64");
1869
+ var len = value.length >>> 0;
1870
+ this.uint32(len);
1871
+ if (len)
1872
+ this._push(BufferWriter.writeBytesBuffer, len, value);
1873
+ return this;
1958
1874
  };
1959
- LongPrototype.comp = LongPrototype.compare;
1960
- LongPrototype.negate = function negate() {
1961
- if (!this.unsigned && this.eq(MIN_VALUE))
1962
- return MIN_VALUE;
1963
- return this.not().add(ONE);
1875
+ function writeStringBuffer(val, buf, pos) {
1876
+ if (val.length < 40)
1877
+ util.utf8.write(val, buf, pos);
1878
+ else if (buf.utf8Write)
1879
+ buf.utf8Write(val, pos);
1880
+ else
1881
+ buf.write(val, pos);
1882
+ }
1883
+ BufferWriter.prototype.string = function write_string_buffer(value) {
1884
+ var len = util.Buffer.byteLength(value);
1885
+ this.uint32(len);
1886
+ if (len)
1887
+ this._push(writeStringBuffer, len, value);
1888
+ return this;
1964
1889
  };
1965
- LongPrototype.neg = LongPrototype.negate;
1966
- LongPrototype.add = function add(addend) {
1967
- if (!isLong(addend))
1968
- addend = fromValue(addend);
1969
- var a48 = this.high >>> 16;
1970
- var a32 = this.high & 65535;
1971
- var a16 = this.low >>> 16;
1972
- var a00 = this.low & 65535;
1973
- var b48 = addend.high >>> 16;
1974
- var b32 = addend.high & 65535;
1975
- var b16 = addend.low >>> 16;
1976
- var b00 = addend.low & 65535;
1977
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
1978
- c00 += a00 + b00;
1979
- c16 += c00 >>> 16;
1980
- c00 &= 65535;
1981
- c16 += a16 + b16;
1982
- c32 += c16 >>> 16;
1983
- c16 &= 65535;
1984
- c32 += a32 + b32;
1985
- c48 += c32 >>> 16;
1986
- c32 &= 65535;
1987
- c48 += a48 + b48;
1988
- c48 &= 65535;
1989
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1890
+ BufferWriter._configure();
1891
+ }
1892
+ });
1893
+
1894
+ // ../../node_modules/protobufjs/src/reader.js
1895
+ var require_reader = __commonJS({
1896
+ "../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
1897
+ "use strict";
1898
+ module2.exports = Reader;
1899
+ var util = require_minimal();
1900
+ var BufferReader;
1901
+ var LongBits = util.LongBits;
1902
+ var utf8 = util.utf8;
1903
+ function indexOutOfRange(reader, writeLength) {
1904
+ return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
1905
+ }
1906
+ function Reader(buffer) {
1907
+ this.buf = buffer;
1908
+ this.pos = 0;
1909
+ this.len = buffer.length;
1910
+ }
1911
+ var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
1912
+ if (buffer instanceof Uint8Array || Array.isArray(buffer))
1913
+ return new Reader(buffer);
1914
+ throw Error("illegal buffer");
1915
+ } : function create_array2(buffer) {
1916
+ if (Array.isArray(buffer))
1917
+ return new Reader(buffer);
1918
+ throw Error("illegal buffer");
1990
1919
  };
1991
- LongPrototype.subtract = function subtract(subtrahend) {
1992
- if (!isLong(subtrahend))
1993
- subtrahend = fromValue(subtrahend);
1994
- return this.add(subtrahend.neg());
1920
+ var create = function create2() {
1921
+ return util.Buffer ? function create_buffer_setup(buffer) {
1922
+ return (Reader.create = function create_buffer(buffer2) {
1923
+ return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
1924
+ })(buffer);
1925
+ } : create_array;
1995
1926
  };
1996
- LongPrototype.sub = LongPrototype.subtract;
1997
- LongPrototype.multiply = function multiply(multiplier) {
1998
- if (this.isZero())
1999
- return ZERO;
2000
- if (!isLong(multiplier))
2001
- multiplier = fromValue(multiplier);
2002
- if (wasm) {
2003
- var low = wasm.mul(
2004
- this.low,
2005
- this.high,
2006
- multiplier.low,
2007
- multiplier.high
2008
- );
2009
- return fromBits(low, wasm.get_high(), this.unsigned);
2010
- }
2011
- if (multiplier.isZero())
2012
- return ZERO;
2013
- if (this.eq(MIN_VALUE))
2014
- return multiplier.isOdd() ? MIN_VALUE : ZERO;
2015
- if (multiplier.eq(MIN_VALUE))
2016
- return this.isOdd() ? MIN_VALUE : ZERO;
2017
- if (this.isNegative()) {
2018
- if (multiplier.isNegative())
2019
- return this.neg().mul(multiplier.neg());
2020
- else
2021
- return this.neg().mul(multiplier).neg();
2022
- } else if (multiplier.isNegative())
2023
- return this.mul(multiplier.neg()).neg();
2024
- if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
2025
- return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
2026
- var a48 = this.high >>> 16;
2027
- var a32 = this.high & 65535;
2028
- var a16 = this.low >>> 16;
2029
- var a00 = this.low & 65535;
2030
- var b48 = multiplier.high >>> 16;
2031
- var b32 = multiplier.high & 65535;
2032
- var b16 = multiplier.low >>> 16;
2033
- var b00 = multiplier.low & 65535;
2034
- var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
2035
- c00 += a00 * b00;
2036
- c16 += c00 >>> 16;
2037
- c00 &= 65535;
2038
- c16 += a16 * b00;
2039
- c32 += c16 >>> 16;
2040
- c16 &= 65535;
2041
- c16 += a00 * b16;
2042
- c32 += c16 >>> 16;
2043
- c16 &= 65535;
2044
- c32 += a32 * b00;
2045
- c48 += c32 >>> 16;
2046
- c32 &= 65535;
2047
- c32 += a16 * b16;
2048
- c48 += c32 >>> 16;
2049
- c32 &= 65535;
2050
- c32 += a00 * b32;
2051
- c48 += c32 >>> 16;
2052
- c32 &= 65535;
2053
- c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
2054
- c48 &= 65535;
2055
- return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
1927
+ Reader.create = create();
1928
+ Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
1929
+ util.Array.prototype.slice;
1930
+ Reader.prototype.uint32 = function read_uint32_setup() {
1931
+ var value = 4294967295;
1932
+ return function read_uint32() {
1933
+ value = (this.buf[this.pos] & 127) >>> 0;
1934
+ if (this.buf[this.pos++] < 128)
1935
+ return value;
1936
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
1937
+ if (this.buf[this.pos++] < 128)
1938
+ return value;
1939
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
1940
+ if (this.buf[this.pos++] < 128)
1941
+ return value;
1942
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
1943
+ if (this.buf[this.pos++] < 128)
1944
+ return value;
1945
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
1946
+ if (this.buf[this.pos++] < 128)
1947
+ return value;
1948
+ if ((this.pos += 5) > this.len) {
1949
+ this.pos = this.len;
1950
+ throw indexOutOfRange(this, 10);
1951
+ }
1952
+ return value;
1953
+ };
1954
+ }();
1955
+ Reader.prototype.int32 = function read_int32() {
1956
+ return this.uint32() | 0;
2056
1957
  };
2057
- LongPrototype.mul = LongPrototype.multiply;
2058
- LongPrototype.divide = function divide(divisor) {
2059
- if (!isLong(divisor))
2060
- divisor = fromValue(divisor);
2061
- if (divisor.isZero())
2062
- throw Error("division by zero");
2063
- if (wasm) {
2064
- if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
2065
- return this;
1958
+ Reader.prototype.sint32 = function read_sint32() {
1959
+ var value = this.uint32();
1960
+ return value >>> 1 ^ -(value & 1) | 0;
1961
+ };
1962
+ function readLongVarint() {
1963
+ var bits = new LongBits(0, 0);
1964
+ var i = 0;
1965
+ if (this.len - this.pos > 4) {
1966
+ for (; i < 4; ++i) {
1967
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1968
+ if (this.buf[this.pos++] < 128)
1969
+ return bits;
2066
1970
  }
2067
- var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
2068
- this.low,
2069
- this.high,
2070
- divisor.low,
2071
- divisor.high
2072
- );
2073
- return fromBits(low, wasm.get_high(), this.unsigned);
2074
- }
2075
- if (this.isZero())
2076
- return this.unsigned ? UZERO : ZERO;
2077
- var approx, rem, res;
2078
- if (!this.unsigned) {
2079
- if (this.eq(MIN_VALUE)) {
2080
- if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
2081
- return MIN_VALUE;
2082
- else if (divisor.eq(MIN_VALUE))
2083
- return ONE;
2084
- else {
2085
- var halfThis = this.shr(1);
2086
- approx = halfThis.div(divisor).shl(1);
2087
- if (approx.eq(ZERO)) {
2088
- return divisor.isNegative() ? ONE : NEG_ONE;
2089
- } else {
2090
- rem = this.sub(divisor.mul(approx));
2091
- res = approx.add(rem.div(divisor));
2092
- return res;
2093
- }
2094
- }
2095
- } else if (divisor.eq(MIN_VALUE))
2096
- return this.unsigned ? UZERO : ZERO;
2097
- if (this.isNegative()) {
2098
- if (divisor.isNegative())
2099
- return this.neg().div(divisor.neg());
2100
- return this.neg().div(divisor).neg();
2101
- } else if (divisor.isNegative())
2102
- return this.div(divisor.neg()).neg();
2103
- res = ZERO;
1971
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1972
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1973
+ if (this.buf[this.pos++] < 128)
1974
+ return bits;
1975
+ i = 0;
2104
1976
  } else {
2105
- if (!divisor.unsigned)
2106
- divisor = divisor.toUnsigned();
2107
- if (divisor.gt(this))
2108
- return UZERO;
2109
- if (divisor.gt(this.shru(1)))
2110
- return UONE;
2111
- res = UZERO;
2112
- }
2113
- rem = this;
2114
- while (rem.gte(divisor)) {
2115
- approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
2116
- var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
2117
- while (approxRem.isNegative() || approxRem.gt(rem)) {
2118
- approx -= delta;
2119
- approxRes = fromNumber(approx, this.unsigned);
2120
- approxRem = approxRes.mul(divisor);
1977
+ for (; i < 3; ++i) {
1978
+ if (this.pos >= this.len)
1979
+ throw indexOutOfRange(this);
1980
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1981
+ if (this.buf[this.pos++] < 128)
1982
+ return bits;
2121
1983
  }
2122
- if (approxRes.isZero())
2123
- approxRes = ONE;
2124
- res = res.add(approxRes);
2125
- rem = rem.sub(approxRem);
1984
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1985
+ return bits;
2126
1986
  }
2127
- return res;
2128
- };
2129
- LongPrototype.div = LongPrototype.divide;
2130
- LongPrototype.modulo = function modulo(divisor) {
2131
- if (!isLong(divisor))
2132
- divisor = fromValue(divisor);
2133
- if (wasm) {
2134
- var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
2135
- this.low,
2136
- this.high,
2137
- divisor.low,
2138
- divisor.high
2139
- );
2140
- return fromBits(low, wasm.get_high(), this.unsigned);
1987
+ if (this.len - this.pos > 4) {
1988
+ for (; i < 5; ++i) {
1989
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1990
+ if (this.buf[this.pos++] < 128)
1991
+ return bits;
1992
+ }
1993
+ } else {
1994
+ for (; i < 5; ++i) {
1995
+ if (this.pos >= this.len)
1996
+ throw indexOutOfRange(this);
1997
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1998
+ if (this.buf[this.pos++] < 128)
1999
+ return bits;
2000
+ }
2141
2001
  }
2142
- return this.sub(this.div(divisor).mul(divisor));
2002
+ throw Error("invalid varint encoding");
2003
+ }
2004
+ Reader.prototype.bool = function read_bool() {
2005
+ return this.uint32() !== 0;
2143
2006
  };
2144
- LongPrototype.mod = LongPrototype.modulo;
2145
- LongPrototype.rem = LongPrototype.modulo;
2146
- LongPrototype.not = function not() {
2147
- return fromBits(~this.low, ~this.high, this.unsigned);
2007
+ function readFixed32_end(buf, end) {
2008
+ return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
2009
+ }
2010
+ Reader.prototype.fixed32 = function read_fixed32() {
2011
+ if (this.pos + 4 > this.len)
2012
+ throw indexOutOfRange(this, 4);
2013
+ return readFixed32_end(this.buf, this.pos += 4);
2148
2014
  };
2149
- LongPrototype.and = function and(other) {
2150
- if (!isLong(other))
2151
- other = fromValue(other);
2152
- return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
2015
+ Reader.prototype.sfixed32 = function read_sfixed32() {
2016
+ if (this.pos + 4 > this.len)
2017
+ throw indexOutOfRange(this, 4);
2018
+ return readFixed32_end(this.buf, this.pos += 4) | 0;
2153
2019
  };
2154
- LongPrototype.or = function or(other) {
2155
- if (!isLong(other))
2156
- other = fromValue(other);
2157
- return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
2020
+ function readFixed64() {
2021
+ if (this.pos + 8 > this.len)
2022
+ throw indexOutOfRange(this, 8);
2023
+ return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
2024
+ }
2025
+ Reader.prototype.float = function read_float() {
2026
+ if (this.pos + 4 > this.len)
2027
+ throw indexOutOfRange(this, 4);
2028
+ var value = util.float.readFloatLE(this.buf, this.pos);
2029
+ this.pos += 4;
2030
+ return value;
2158
2031
  };
2159
- LongPrototype.xor = function xor(other) {
2160
- if (!isLong(other))
2161
- other = fromValue(other);
2162
- return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
2032
+ Reader.prototype.double = function read_double() {
2033
+ if (this.pos + 8 > this.len)
2034
+ throw indexOutOfRange(this, 4);
2035
+ var value = util.float.readDoubleLE(this.buf, this.pos);
2036
+ this.pos += 8;
2037
+ return value;
2163
2038
  };
2164
- LongPrototype.shiftLeft = function shiftLeft(numBits) {
2165
- if (isLong(numBits))
2166
- numBits = numBits.toInt();
2167
- if ((numBits &= 63) === 0)
2168
- return this;
2169
- else if (numBits < 32)
2170
- return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
2171
- else
2172
- return fromBits(0, this.low << numBits - 32, this.unsigned);
2039
+ Reader.prototype.bytes = function read_bytes() {
2040
+ var length = this.uint32(), start = this.pos, end = this.pos + length;
2041
+ if (end > this.len)
2042
+ throw indexOutOfRange(this, length);
2043
+ this.pos += length;
2044
+ if (Array.isArray(this.buf))
2045
+ return this.buf.slice(start, end);
2046
+ return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
2173
2047
  };
2174
- LongPrototype.shl = LongPrototype.shiftLeft;
2175
- LongPrototype.shiftRight = function shiftRight(numBits) {
2176
- if (isLong(numBits))
2177
- numBits = numBits.toInt();
2178
- if ((numBits &= 63) === 0)
2179
- return this;
2180
- else if (numBits < 32)
2181
- return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
2182
- else
2183
- return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
2048
+ Reader.prototype.string = function read_string() {
2049
+ var bytes = this.bytes();
2050
+ return utf8.read(bytes, 0, bytes.length);
2184
2051
  };
2185
- LongPrototype.shr = LongPrototype.shiftRight;
2186
- LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
2187
- if (isLong(numBits))
2188
- numBits = numBits.toInt();
2189
- numBits &= 63;
2190
- if (numBits === 0)
2191
- return this;
2192
- else {
2193
- var high = this.high;
2194
- if (numBits < 32) {
2195
- var low = this.low;
2196
- return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
2197
- } else if (numBits === 32)
2198
- return fromBits(high, 0, this.unsigned);
2199
- else
2200
- return fromBits(high >>> numBits - 32, 0, this.unsigned);
2052
+ Reader.prototype.skip = function skip(length) {
2053
+ if (typeof length === "number") {
2054
+ if (this.pos + length > this.len)
2055
+ throw indexOutOfRange(this, length);
2056
+ this.pos += length;
2057
+ } else {
2058
+ do {
2059
+ if (this.pos >= this.len)
2060
+ throw indexOutOfRange(this);
2061
+ } while (this.buf[this.pos++] & 128);
2201
2062
  }
2063
+ return this;
2202
2064
  };
2203
- LongPrototype.shru = LongPrototype.shiftRightUnsigned;
2204
- LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
2205
- LongPrototype.toSigned = function toSigned() {
2206
- if (!this.unsigned)
2207
- return this;
2208
- return fromBits(this.low, this.high, false);
2209
- };
2210
- LongPrototype.toUnsigned = function toUnsigned() {
2211
- if (this.unsigned)
2212
- return this;
2213
- return fromBits(this.low, this.high, true);
2214
- };
2215
- LongPrototype.toBytes = function toBytes(le) {
2216
- return le ? this.toBytesLE() : this.toBytesBE();
2065
+ Reader.prototype.skipType = function(wireType) {
2066
+ switch (wireType) {
2067
+ case 0:
2068
+ this.skip();
2069
+ break;
2070
+ case 1:
2071
+ this.skip(8);
2072
+ break;
2073
+ case 2:
2074
+ this.skip(this.uint32());
2075
+ break;
2076
+ case 3:
2077
+ while ((wireType = this.uint32() & 7) !== 4) {
2078
+ this.skipType(wireType);
2079
+ }
2080
+ break;
2081
+ case 5:
2082
+ this.skip(4);
2083
+ break;
2084
+ default:
2085
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
2086
+ }
2087
+ return this;
2217
2088
  };
2218
- LongPrototype.toBytesLE = function toBytesLE() {
2219
- var hi = this.high, lo = this.low;
2220
- return [
2221
- lo & 255,
2222
- lo >>> 8 & 255,
2223
- lo >>> 16 & 255,
2224
- lo >>> 24,
2225
- hi & 255,
2226
- hi >>> 8 & 255,
2227
- hi >>> 16 & 255,
2228
- hi >>> 24
2229
- ];
2089
+ Reader._configure = function(BufferReader_) {
2090
+ BufferReader = BufferReader_;
2091
+ Reader.create = create();
2092
+ BufferReader._configure();
2093
+ var fn = util.Long ? "toLong" : (
2094
+ /* istanbul ignore next */
2095
+ "toNumber"
2096
+ );
2097
+ util.merge(Reader.prototype, {
2098
+ int64: function read_int64() {
2099
+ return readLongVarint.call(this)[fn](false);
2100
+ },
2101
+ uint64: function read_uint64() {
2102
+ return readLongVarint.call(this)[fn](true);
2103
+ },
2104
+ sint64: function read_sint64() {
2105
+ return readLongVarint.call(this).zzDecode()[fn](false);
2106
+ },
2107
+ fixed64: function read_fixed64() {
2108
+ return readFixed64.call(this)[fn](true);
2109
+ },
2110
+ sfixed64: function read_sfixed64() {
2111
+ return readFixed64.call(this)[fn](false);
2112
+ }
2113
+ });
2230
2114
  };
2231
- LongPrototype.toBytesBE = function toBytesBE() {
2232
- var hi = this.high, lo = this.low;
2233
- return [
2234
- hi >>> 24,
2235
- hi >>> 16 & 255,
2236
- hi >>> 8 & 255,
2237
- hi & 255,
2238
- lo >>> 24,
2239
- lo >>> 16 & 255,
2240
- lo >>> 8 & 255,
2241
- lo & 255
2242
- ];
2115
+ }
2116
+ });
2117
+
2118
+ // ../../node_modules/protobufjs/src/reader_buffer.js
2119
+ var require_reader_buffer = __commonJS({
2120
+ "../../node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
2121
+ "use strict";
2122
+ module2.exports = BufferReader;
2123
+ var Reader = require_reader();
2124
+ (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
2125
+ var util = require_minimal();
2126
+ function BufferReader(buffer) {
2127
+ Reader.call(this, buffer);
2128
+ }
2129
+ BufferReader._configure = function() {
2130
+ if (util.Buffer)
2131
+ BufferReader.prototype._slice = util.Buffer.prototype.slice;
2243
2132
  };
2244
- Long4.fromBytes = function fromBytes(bytes, unsigned, le) {
2245
- return le ? Long4.fromBytesLE(bytes, unsigned) : Long4.fromBytesBE(bytes, unsigned);
2133
+ BufferReader.prototype.string = function read_string_buffer() {
2134
+ var len = this.uint32();
2135
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
2246
2136
  };
2247
- Long4.fromBytesLE = function fromBytesLE(bytes, unsigned) {
2248
- return new Long4(
2249
- bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
2250
- bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
2251
- unsigned
2252
- );
2137
+ BufferReader._configure();
2138
+ }
2139
+ });
2140
+
2141
+ // ../../node_modules/protobufjs/src/rpc/service.js
2142
+ var require_service = __commonJS({
2143
+ "../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
2144
+ "use strict";
2145
+ module2.exports = Service;
2146
+ var util = require_minimal();
2147
+ (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
2148
+ function Service(rpcImpl, requestDelimited, responseDelimited) {
2149
+ if (typeof rpcImpl !== "function")
2150
+ throw TypeError("rpcImpl must be a function");
2151
+ util.EventEmitter.call(this);
2152
+ this.rpcImpl = rpcImpl;
2153
+ this.requestDelimited = Boolean(requestDelimited);
2154
+ this.responseDelimited = Boolean(responseDelimited);
2155
+ }
2156
+ Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
2157
+ if (!request)
2158
+ throw TypeError("request must be specified");
2159
+ var self2 = this;
2160
+ if (!callback)
2161
+ return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
2162
+ if (!self2.rpcImpl) {
2163
+ setTimeout(function() {
2164
+ callback(Error("already ended"));
2165
+ }, 0);
2166
+ return void 0;
2167
+ }
2168
+ try {
2169
+ return self2.rpcImpl(
2170
+ method,
2171
+ requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
2172
+ function rpcCallback(err, response) {
2173
+ if (err) {
2174
+ self2.emit("error", err, method);
2175
+ return callback(err);
2176
+ }
2177
+ if (response === null) {
2178
+ self2.end(
2179
+ /* endedByRPC */
2180
+ true
2181
+ );
2182
+ return void 0;
2183
+ }
2184
+ if (!(response instanceof responseCtor)) {
2185
+ try {
2186
+ response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
2187
+ } catch (err2) {
2188
+ self2.emit("error", err2, method);
2189
+ return callback(err2);
2190
+ }
2191
+ }
2192
+ self2.emit("data", response, method);
2193
+ return callback(null, response);
2194
+ }
2195
+ );
2196
+ } catch (err) {
2197
+ self2.emit("error", err, method);
2198
+ setTimeout(function() {
2199
+ callback(err);
2200
+ }, 0);
2201
+ return void 0;
2202
+ }
2253
2203
  };
2254
- Long4.fromBytesBE = function fromBytesBE(bytes, unsigned) {
2255
- return new Long4(
2256
- bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
2257
- bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
2258
- unsigned
2259
- );
2204
+ Service.prototype.end = function end(endedByRPC) {
2205
+ if (this.rpcImpl) {
2206
+ if (!endedByRPC)
2207
+ this.rpcImpl(null, null, null);
2208
+ this.rpcImpl = null;
2209
+ this.emit("end").off();
2210
+ }
2211
+ return this;
2260
2212
  };
2261
2213
  }
2262
2214
  });
2263
2215
 
2216
+ // ../../node_modules/protobufjs/src/rpc.js
2217
+ var require_rpc = __commonJS({
2218
+ "../../node_modules/protobufjs/src/rpc.js"(exports2) {
2219
+ "use strict";
2220
+ var rpc = exports2;
2221
+ rpc.Service = require_service();
2222
+ }
2223
+ });
2224
+
2225
+ // ../../node_modules/protobufjs/src/roots.js
2226
+ var require_roots = __commonJS({
2227
+ "../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
2228
+ "use strict";
2229
+ module2.exports = {};
2230
+ }
2231
+ });
2232
+
2233
+ // ../../node_modules/protobufjs/src/index-minimal.js
2234
+ var require_index_minimal = __commonJS({
2235
+ "../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
2236
+ "use strict";
2237
+ var protobuf = exports2;
2238
+ protobuf.build = "minimal";
2239
+ protobuf.Writer = require_writer();
2240
+ protobuf.BufferWriter = require_writer_buffer();
2241
+ protobuf.Reader = require_reader();
2242
+ protobuf.BufferReader = require_reader_buffer();
2243
+ protobuf.util = require_minimal();
2244
+ protobuf.rpc = require_rpc();
2245
+ protobuf.roots = require_roots();
2246
+ protobuf.configure = configure;
2247
+ function configure() {
2248
+ protobuf.util._configure();
2249
+ protobuf.Writer._configure(protobuf.BufferWriter);
2250
+ protobuf.Reader._configure(protobuf.BufferReader);
2251
+ }
2252
+ configure();
2253
+ }
2254
+ });
2255
+
2256
+ // ../../node_modules/protobufjs/minimal.js
2257
+ var require_minimal2 = __commonJS({
2258
+ "../../node_modules/protobufjs/minimal.js"(exports2, module2) {
2259
+ "use strict";
2260
+ module2.exports = require_index_minimal();
2261
+ }
2262
+ });
2263
+
2264
2264
  // index.ts
2265
2265
  var mezon_js_protobuf_exports = {};
2266
2266
  __export(mezon_js_protobuf_exports, {
@@ -2269,6 +2269,7 @@ __export(mezon_js_protobuf_exports, {
2269
2269
  module.exports = __toCommonJS(mezon_js_protobuf_exports);
2270
2270
 
2271
2271
  // rtapi/realtime.ts
2272
+ var import_long4 = __toESM(require_long());
2272
2273
  var import_minimal5 = __toESM(require_minimal2());
2273
2274
 
2274
2275
  // api/api.ts
@@ -13637,7 +13638,8 @@ function createBaseUserProfileRedis() {
13637
13638
  fcm_tokens: [],
13638
13639
  online: false,
13639
13640
  metadata: "",
13640
- is_disabled: false
13641
+ is_disabled: false,
13642
+ joined_clans: []
13641
13643
  };
13642
13644
  }
13643
13645
  var UserProfileRedis = {
@@ -13675,6 +13677,11 @@ var UserProfileRedis = {
13675
13677
  if (message.is_disabled !== false) {
13676
13678
  writer.uint32(88).bool(message.is_disabled);
13677
13679
  }
13680
+ writer.uint32(98).fork();
13681
+ for (const v of message.joined_clans) {
13682
+ writer.int64(v);
13683
+ }
13684
+ writer.ldelim();
13678
13685
  return writer;
13679
13686
  },
13680
13687
  decode(input, length) {
@@ -13750,6 +13757,19 @@ var UserProfileRedis = {
13750
13757
  }
13751
13758
  message.is_disabled = reader.bool();
13752
13759
  continue;
13760
+ case 12:
13761
+ if (tag === 96) {
13762
+ message.joined_clans.push(longToNumber3(reader.int64()));
13763
+ continue;
13764
+ }
13765
+ if (tag === 98) {
13766
+ const end2 = reader.uint32() + reader.pos;
13767
+ while (reader.pos < end2) {
13768
+ message.joined_clans.push(longToNumber3(reader.int64()));
13769
+ }
13770
+ continue;
13771
+ }
13772
+ break;
13753
13773
  }
13754
13774
  if ((tag & 7) === 4 || tag === 0) {
13755
13775
  break;
@@ -13770,11 +13790,12 @@ var UserProfileRedis = {
13770
13790
  fcm_tokens: globalThis.Array.isArray(object == null ? void 0 : object.fcm_tokens) ? object.fcm_tokens.map((e) => FCMTokens.fromJSON(e)) : [],
13771
13791
  online: isSet4(object.online) ? globalThis.Boolean(object.online) : false,
13772
13792
  metadata: isSet4(object.metadata) ? globalThis.String(object.metadata) : "",
13773
- is_disabled: isSet4(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false
13793
+ is_disabled: isSet4(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false,
13794
+ joined_clans: globalThis.Array.isArray(object == null ? void 0 : object.joined_clans) ? object.joined_clans.map((e) => globalThis.Number(e)) : []
13774
13795
  };
13775
13796
  },
13776
13797
  toJSON(message) {
13777
- var _a;
13798
+ var _a, _b;
13778
13799
  const obj = {};
13779
13800
  if (message.user_id !== "") {
13780
13801
  obj.user_id = message.user_id;
@@ -13809,13 +13830,16 @@ var UserProfileRedis = {
13809
13830
  if (message.is_disabled !== false) {
13810
13831
  obj.is_disabled = message.is_disabled;
13811
13832
  }
13833
+ if ((_b = message.joined_clans) == null ? void 0 : _b.length) {
13834
+ obj.joined_clans = message.joined_clans.map((e) => Math.round(e));
13835
+ }
13812
13836
  return obj;
13813
13837
  },
13814
13838
  create(base) {
13815
13839
  return UserProfileRedis.fromPartial(base != null ? base : {});
13816
13840
  },
13817
13841
  fromPartial(object) {
13818
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
13842
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
13819
13843
  const message = createBaseUserProfileRedis();
13820
13844
  message.user_id = (_a = object.user_id) != null ? _a : "";
13821
13845
  message.username = (_b = object.username) != null ? _b : "";
@@ -13828,6 +13852,7 @@ var UserProfileRedis = {
13828
13852
  message.online = (_i = object.online) != null ? _i : false;
13829
13853
  message.metadata = (_j = object.metadata) != null ? _j : "";
13830
13854
  message.is_disabled = (_k = object.is_disabled) != null ? _k : false;
13855
+ message.joined_clans = ((_l = object.joined_clans) == null ? void 0 : _l.map((e) => e)) || [];
13831
13856
  return message;
13832
13857
  }
13833
13858
  };
@@ -14785,7 +14810,15 @@ var DropdownBoxSelected = {
14785
14810
  }
14786
14811
  };
14787
14812
  function createBaseSdTopicEvent() {
14788
- return { id: "", clan_id: "", channel_id: "", message_id: "" };
14813
+ return {
14814
+ id: "",
14815
+ clan_id: "",
14816
+ channel_id: "",
14817
+ message_id: "",
14818
+ user_id: "",
14819
+ last_sent_message: void 0,
14820
+ message: void 0
14821
+ };
14789
14822
  }
14790
14823
  var SdTopicEvent = {
14791
14824
  encode(message, writer = import_minimal5.default.Writer.create()) {
@@ -14801,6 +14834,15 @@ var SdTopicEvent = {
14801
14834
  if (message.message_id !== "") {
14802
14835
  writer.uint32(34).string(message.message_id);
14803
14836
  }
14837
+ if (message.user_id !== "") {
14838
+ writer.uint32(42).string(message.user_id);
14839
+ }
14840
+ if (message.last_sent_message !== void 0) {
14841
+ ChannelMessageHeader.encode(message.last_sent_message, writer.uint32(50).fork()).ldelim();
14842
+ }
14843
+ if (message.message !== void 0) {
14844
+ ChannelMessage.encode(message.message, writer.uint32(58).fork()).ldelim();
14845
+ }
14804
14846
  return writer;
14805
14847
  },
14806
14848
  decode(input, length) {
@@ -14834,6 +14876,24 @@ var SdTopicEvent = {
14834
14876
  }
14835
14877
  message.message_id = reader.string();
14836
14878
  continue;
14879
+ case 5:
14880
+ if (tag !== 42) {
14881
+ break;
14882
+ }
14883
+ message.user_id = reader.string();
14884
+ continue;
14885
+ case 6:
14886
+ if (tag !== 50) {
14887
+ break;
14888
+ }
14889
+ message.last_sent_message = ChannelMessageHeader.decode(reader, reader.uint32());
14890
+ continue;
14891
+ case 7:
14892
+ if (tag !== 58) {
14893
+ break;
14894
+ }
14895
+ message.message = ChannelMessage.decode(reader, reader.uint32());
14896
+ continue;
14837
14897
  }
14838
14898
  if ((tag & 7) === 4 || tag === 0) {
14839
14899
  break;
@@ -14847,7 +14907,10 @@ var SdTopicEvent = {
14847
14907
  id: isSet4(object.id) ? globalThis.String(object.id) : "",
14848
14908
  clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : "",
14849
14909
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
14850
- message_id: isSet4(object.message_id) ? globalThis.String(object.message_id) : ""
14910
+ message_id: isSet4(object.message_id) ? globalThis.String(object.message_id) : "",
14911
+ user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "",
14912
+ last_sent_message: isSet4(object.last_sent_message) ? ChannelMessageHeader.fromJSON(object.last_sent_message) : void 0,
14913
+ message: isSet4(object.message) ? ChannelMessage.fromJSON(object.message) : void 0
14851
14914
  };
14852
14915
  },
14853
14916
  toJSON(message) {
@@ -14864,18 +14927,30 @@ var SdTopicEvent = {
14864
14927
  if (message.message_id !== "") {
14865
14928
  obj.message_id = message.message_id;
14866
14929
  }
14930
+ if (message.user_id !== "") {
14931
+ obj.user_id = message.user_id;
14932
+ }
14933
+ if (message.last_sent_message !== void 0) {
14934
+ obj.last_sent_message = ChannelMessageHeader.toJSON(message.last_sent_message);
14935
+ }
14936
+ if (message.message !== void 0) {
14937
+ obj.message = ChannelMessage.toJSON(message.message);
14938
+ }
14867
14939
  return obj;
14868
14940
  },
14869
14941
  create(base) {
14870
14942
  return SdTopicEvent.fromPartial(base != null ? base : {});
14871
14943
  },
14872
14944
  fromPartial(object) {
14873
- var _a, _b, _c, _d;
14945
+ var _a, _b, _c, _d, _e;
14874
14946
  const message = createBaseSdTopicEvent();
14875
14947
  message.id = (_a = object.id) != null ? _a : "";
14876
14948
  message.clan_id = (_b = object.clan_id) != null ? _b : "";
14877
14949
  message.channel_id = (_c = object.channel_id) != null ? _c : "";
14878
14950
  message.message_id = (_d = object.message_id) != null ? _d : "";
14951
+ message.user_id = (_e = object.user_id) != null ? _e : "";
14952
+ message.last_sent_message = object.last_sent_message !== void 0 && object.last_sent_message !== null ? ChannelMessageHeader.fromPartial(object.last_sent_message) : void 0;
14953
+ message.message = object.message !== void 0 && object.message !== null ? ChannelMessage.fromPartial(object.message) : void 0;
14879
14954
  return message;
14880
14955
  }
14881
14956
  };
@@ -15155,6 +15230,19 @@ function fromJsonTimestamp2(o) {
15155
15230
  return fromTimestamp2(Timestamp.fromJSON(o));
15156
15231
  }
15157
15232
  }
15233
+ function longToNumber3(long) {
15234
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
15235
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
15236
+ }
15237
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
15238
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
15239
+ }
15240
+ return long.toNumber();
15241
+ }
15242
+ if (import_minimal5.default.util.Long !== import_long4.default) {
15243
+ import_minimal5.default.util.Long = import_long4.default;
15244
+ import_minimal5.default.configure();
15245
+ }
15158
15246
  function isObject(value) {
15159
15247
  return typeof value === "object" && value !== null;
15160
15248
  }