From 54283d39c4c955b6a84f7f53d4940eec39e4df5e Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Sun, 4 Dec 2016 14:15:06 +0100 Subject: [PATCH] Handle oneofs in prototype ctor, add non-ES5 fallbacks, test case --- dist/protobuf.js | 23 +++++++++++++++++------ dist/protobuf.js.map | 2 +- dist/protobuf.min.js | 6 +++--- dist/protobuf.min.js.gz | Bin 15872 -> 15913 bytes dist/protobuf.min.js.map | 2 +- src/inherits.js | 7 ++++--- src/oneof.js | 6 ++++++ src/prototype.js | 8 ++++++-- tests/data/oneof.proto | 8 ++++++++ tests/oneof.js | 30 ++++++++++++++++++++++++++++++ 10 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 tests/data/oneof.proto create mode 100644 tests/oneof.js diff --git a/dist/protobuf.js b/dist/protobuf.js index 77fbab02e..d042a8c08 100644 --- a/dist/protobuf.js +++ b/dist/protobuf.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.0.1 (c) 2016 Daniel Wirtz - * Compiled Sun, 04 Dec 2016 12:05:15 UTC + * Compiled Sun, 04 Dec 2016 13:14:24 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -1194,8 +1194,9 @@ inherits.defineProperties = function defineProperties(prototype, type) { // Define each oneof with a non-enumerable getter and setter for the present field type.getOneofsArray().forEach(function(oneof) { - prototypeProperties[oneof.resolve().name] = { - get: function() { + oneof.resolve(); + prototypeProperties[oneof.name] = { + get: prototype['get' + oneof.ucName] = function() { var keys = oneof.oneof; for (var i = 0; i < keys.length; ++i) { var field = oneof.parent.fields[keys[i]]; @@ -1204,7 +1205,7 @@ inherits.defineProperties = function defineProperties(prototype, type) { } return undefined; }, - set: function(value) { + set: prototype['set' + oneof.ucName] = function(value) { var keys = oneof.oneof; for (var i = 0; i < keys.length; ++i) { if (keys[i] !== value) @@ -1954,6 +1955,12 @@ function OneOf(name, fieldNames, options) { if (fieldNames && !Array.isArray(fieldNames)) throw _TypeError("fieldNames", "an Array"); + /** + * Upper cased name for getter/setter calls. + * @type {string} + */ + this.ucName = this.name.substring(0, 1).toUpperCase() + this.name.substring(1); + /** * Field names that belong to this oneof. * @type {Array.} @@ -2658,9 +2665,13 @@ function Prototype(properties, options) { var any = !(options && options.fieldsOnly), fields = this.constructor.$type.fields, keys = Object.keys(properties); - for (var i = 0; i < keys.length; ++i) - if (fields[keys[i]] || any) + for (var i = 0; i < keys.length; ++i) { + var field = fields[keys[i]]; + if (field && field.partOf) + this['set' + field.partOf.ucName](field.name); + if (field || any) this[keys[i]] = properties[keys[i]]; + } } } diff --git a/dist/protobuf.js.map b/dist/protobuf.js.map index 4e11ca0ee..7ed99772d 100644 --- a/dist/protobuf.js.map +++ b/dist/protobuf.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/common.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/inherits.js","src/mapfield.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/prototype.js","src/reader.js","src/root.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/codegen.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 1,\r\n nBits = -7,\r\n i = isBE ? 0 : (nBytes - 1),\r\n d = isBE ? 1 : -1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n};\r\n\r\nexports.write = function writeIEEE754(buffer, value, offset, isBE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isBE ? (nBytes - 1) : 0,\r\n d = isBE ? -1 : 1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n// - google/protobuf/wrappers.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar decoder = exports;\r\n\r\nvar Enum = require(5),\r\n Reader = require(15),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Decodes a message of `this` message's type.\r\n * @param {Reader} reader Reader to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Populated runtime message\r\n * @this Type\r\n */\r\ndecoder.fallback = function fallback(reader, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = reader instanceof Reader ? reader : Reader(reader),\r\n limit = length === undefined ? reader.len : reader.pos + length,\r\n message = new (this.getCtor())();\r\n while (reader.pos < limit) {\r\n var tag = reader.tag(),\r\n field = fields[tag.id].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type;\r\n \r\n // Known fields\r\n if (field) {\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType,\r\n length = reader.uint32();\r\n var map = message[field.name] = {};\r\n if (length) {\r\n length += reader.pos;\r\n var ks = [], vs = [];\r\n while (reader.pos < length) {\r\n if (reader.tag().id === 1)\r\n ks[ks.length] = reader[keyType]();\r\n else if (types.basic[type] !== undefined)\r\n vs[vs.length] = reader[type]();\r\n else\r\n vs[vs.length] = field.resolvedType.decode(reader, reader.uint32());\r\n }\r\n for (var i = 0; i < ks.length; ++i)\r\n map[typeof ks[i] === 'object' ? util.longToHash(ks[i]) : ks[i]] = vs[i];\r\n }\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n var values = message[field.name] || (message[field.name] = []);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined && tag.wireType === 2) {\r\n var plimit = reader.uint32() + reader.pos;\r\n while (reader.pos < plimit)\r\n values[values.length] = reader[type]();\r\n\r\n // Non-packed\r\n } else if (types.basic[type] !== undefined)\r\n values[values.length] = reader[type]();\r\n else\r\n values[values.length] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Non-repeated\r\n } else if (types.basic[type] !== undefined)\r\n message[field.name] = reader[type]();\r\n else\r\n message[field.name] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Unknown fields\r\n } else\r\n reader.skipType(tag.wireType);\r\n }\r\n return message;\r\n /* eslint-enable no-invalid-this, block-scoped-var, no-redeclare */\r\n};\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\ndecoder.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nObject.defineProperties(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: EnumPrototype.getValuesById = function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (this.values[name] !== undefined)\r\n throw Error('duplicate name \"' + name + '\" in ' + this);\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error('\"' + name + '\" is not a name of ' + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(19),\r\n Enum = require(5),\r\n MapField = require(8),\r\n types = require(20),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string} [rule=optional] Field rule\r\n * @param {string} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (extend !== undefined && !util.isString(extend))\r\n throw _TypeError(\"extend\");\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw _TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== 'optional' ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nObject.defineProperties(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined)\r\n return MapField.fromJSON(name, json);\r\n return new Field(name, json.id, json.type, json.role, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n var resolved = this.parent.lookup(this.type);\r\n if (resolved instanceof Type) {\r\n this.resolvedType = resolved;\r\n typeDefault = null;\r\n } else if (resolved instanceof Enum) {\r\n this.resolvedType = resolved;\r\n typeDefault = 0;\r\n } else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved determine the default value\r\n var optionDefault;\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else if (this.options && (optionDefault = this.options['default']) !== undefined) // eslint-disable-line dot-notation\r\n this.defaultValue = optionDefault;\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long)\r\n this.defaultValue = util.Long.fromValue(this.defaultValue);\r\n \r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Converts a field value to JSON using the specified options. Note that this method does not account for repeated fields and must be called once for each repeated element instead.\r\n * @param {*} value Field value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {*} Converted value\r\n * @see {@link Prototype#asJSON}\r\n */\r\nFieldPrototype.jsonConvert = function(value, options) {\r\n if (options) {\r\n if (this.resolvedType instanceof Enum && options['enum'] === String) // eslint-disable-line dot-notation\r\n return this.resolvedType.getValuesById()[value];\r\n else if (this.long && options.long)\r\n return options.long === Number\r\n ? typeof value === 'number'\r\n ? value\r\n : util.Long.fromValue(value).toNumber()\r\n : util.Long.fromValue(value, this.type.charAt(0) === 'u').toString();\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = inherits;\r\n\r\nvar Prototype = require(14),\r\n Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Options passed to {@link inherits}, modifying its behavior.\r\n * @typedef InheritanceOptions\r\n * @type {Object}\r\n * @property {boolean} [noStatics=false] Skips adding the default static methods on top of the constructor\r\n * @property {boolean} [noRegister=false] Skips registering the constructor with the reflected type\r\n */\r\n\r\n/**\r\n * Inherits a custom class from the message prototype of the specified message type.\r\n * @param {Function} clazz Inheriting class\r\n * @param {Type} type Inherited message type\r\n * @param {InheritanceOptions} [options] Inheritance options\r\n * @returns {Prototype} Created prototype\r\n */\r\nfunction inherits(clazz, type, options) {\r\n if (typeof clazz !== 'function')\r\n throw _TypeError(\"clazz\", \"a function\");\r\n if (!(type instanceof Type))\r\n throw _TypeError(\"type\", \"a Type\");\r\n if (!options)\r\n options = {};\r\n\r\n /**\r\n * This is not an actual type but stands as a reference for any constructor of a custom message class that you pass to the library.\r\n * @name Class\r\n * @extends Prototype\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set on the message\r\n * @see {@link inherits}\r\n */\r\n\r\n var classProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Class.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n if (!options.noStatics)\r\n util.merge(classProperties, {\r\n\r\n /**\r\n * Encodes a message of this type to a buffer.\r\n * @name Class.encode\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encode: {\r\n value: function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Encodes a message of this type preceeded by its length as a varint to a buffer.\r\n * @name Class.encodeDelimited\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encodeDelimited: {\r\n value: function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type from a buffer.\r\n * @name Class.decode\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decode: {\r\n value: function decode(buffer) {\r\n return this.$type.decode(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type preceeded by its length as a varint from a buffer.\r\n * @name Class.decodeDelimited\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decodeDelimited: {\r\n value: function decodeDelimited(buffer) {\r\n return this.$type.decodeDelimited(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Verifies a message of this type.\r\n * @name Class.verify\r\n * @function\r\n * @param {Prototype|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n verify: {\r\n value: function verify(message) {\r\n return this.$type.verify(message);\r\n }\r\n }\r\n\r\n }, true);\r\n\r\n Object.defineProperties(clazz, classProperties);\r\n var prototype = inherits.defineProperties(new Prototype(), type);\r\n clazz.prototype = prototype;\r\n prototype.constructor = clazz;\r\n\r\n if (!options.noRegister)\r\n type.setCtor(clazz);\r\n\r\n return prototype;\r\n}\r\n\r\n/**\r\n * Defines the reflected type's default values and virtual oneof properties on the specified prototype.\r\n * @memberof inherits\r\n * @param {Prototype} prototype Prototype to define properties upon\r\n * @param {Type} type Reflected message type\r\n * @returns {Prototype} The specified prototype\r\n */\r\ninherits.defineProperties = function defineProperties(prototype, type) {\r\n\r\n var prototypeProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Prototype#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n // Initialize default values\r\n type.getFieldsArray().forEach(function(field) {\r\n field.resolve();\r\n if (!util.isObject(field.defaultValue))\r\n // objects are mutable (i.e. would modify the array on the prototype, not the instance)\r\n prototype[field.name] = field.defaultValue;\r\n });\r\n\r\n // Define each oneof with a non-enumerable getter and setter for the present field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n prototypeProperties[oneof.resolve().name] = {\r\n get: function() {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = oneof.parent.fields[keys[i]];\r\n if (this[keys[i]] != field.defaultValue) // eslint-disable-line eqeqeq\r\n return keys[i];\r\n }\r\n return undefined;\r\n },\r\n set: function(value) {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperties(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(6);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nvar Enum = require(5),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new map field.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n \r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n \r\n // Besides a value type, map fields have a key type to resolve\r\n var keyWireType = types.mapKey[this.keyType];\r\n if (keyWireType === undefined) {\r\n var resolved = this.parent.lookup(this.keyType);\r\n if (!(resolved instanceof Enum))\r\n throw Error(\"unresolvable map key type: \" + this.keyType);\r\n this.resolvedKeyType = resolved;\r\n }\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean} [requestStream] Whether the request is streamed\r\n * @param {boolean} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (!util.isString(requestType))\r\n throw _TypeError(\"requestType\");\r\n if (!util.isString(responseType))\r\n throw _TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var resolved = this.parent.lookup(this.requestType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n this.resolvedRequestType = resolved;\r\n resolved = this.parent.lookup(this.responseType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n this.resolvedResponseType = resolved;\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n Field = require(6),\r\n Service = require(17),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\nvar nestedTypes = [ Enum, Type, Service, Field, Namespace ],\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(', ');\r\n\r\n/**\r\n * Constructs a new namespace.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n return namespace;\r\n}\r\n\r\nObject.defineProperties(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: NamespacePrototype.getNestedArray = function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson)\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw _TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw _TypeError(\"object\", nestedError);\r\n if (object instanceof Field && object.extend === undefined)\r\n throw _TypeError(\"object\", \"an extension field when not part of a type\");\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n if (!(object instanceof ReflectionObject))\r\n throw _TypeError(\"object\", \"a ReflectionObject\");\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split('.');\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolve() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, parentAlreadyChecked) {\r\n if (util.isString(path)) {\r\n if (!path.length)\r\n return null;\r\n path = path.split('.');\r\n } else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1));\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && (path.length === 1 || found instanceof Namespace && (found = found.lookup(path.slice(1), true))))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path);\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nReflectionObject.extend = extend;\r\n\r\nvar Root = require(16),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (options && !util.isObject(options))\r\n throw _TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nObject.defineProperties(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: ReflectionObjectPrototype.getRoot = function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join('.');\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Lets the specified constructor extend this class.\r\n * @memberof ReflectionObject\r\n * @param {Function} constructor Extending constructor\r\n * @returns {Object} Prototype\r\n * @this ReflectionObject\r\n */\r\nfunction extend(constructor) {\r\n var proto = constructor.prototype = Object.create(this.prototype);\r\n proto.constructor = constructor;\r\n constructor.extend = extend;\r\n return proto;\r\n}\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Constructor name, space, full name\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n return this.constructor.name + \" \" + this.getFullName();\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(6),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw _TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {Array.}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._fields = [];\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent)\r\n oneof._fields.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fields.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n var index = this._fields.indexOf(field);\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n this._fields.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fields.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(18),\r\n Root = require(16),\r\n Type = require(19),\r\n Field = require(6),\r\n MapField = require(8),\r\n OneOf = require(12),\r\n Enum = require(5),\r\n Service = require(17),\r\n Method = require(9),\r\n types = require(20);\r\n\r\nvar nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n fqTypeRefRe = /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/;\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(name) {\r\n return name.substring(0,1)\r\n + name.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\nvar s_required = \"required\",\r\n s_repeated = \"repeated\",\r\n s_optional = \"optional\",\r\n s_option = \"option\",\r\n s_name = \"name\",\r\n s_type = \"type\";\r\nvar s_open = \"{\",\r\n s_close = \"}\",\r\n s_bopen = '(',\r\n s_bclose = ')',\r\n s_semi = \";\",\r\n s_dq = '\"',\r\n s_sq = \"'\";\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @param {string} source Source contents\r\n * @param {Root} [root] Root to populate\r\n * @returns {ParserResult} Parser result\r\n */\r\nfunction parse(source, root) {\r\n /* eslint-disable default-case, callback-return */\r\n if (!root)\r\n root = new Root();\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n function illegal(token, name) {\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (line \" + tn.line() + s_bclose);\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== s_dq && token !== s_sq)\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === s_dq || token === s_sq);\r\n return values.join('');\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case s_sq:\r\n case s_dq:\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && typeRefRe.test(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(s_semi);\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === '-') {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, 'number');\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"min\": return 1;\r\n case \"max\": return 0x1FFFFFFF;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === '-' && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!typeRefRe.test(pkg))\r\n throw illegal(pkg, s_name);\r\n ptr = ptr.define(pkg);\r\n skip(s_semi);\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(s_semi);\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n var p3;\r\n if ([ \"proto2\", p3 = \"proto3\" ].indexOf(syntax) < 0)\r\n throw illegal(syntax, \"syntax\");\r\n isProto3 = syntax === p3;\r\n skip(s_semi);\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case s_option:\r\n parseOption(parent, token);\r\n skip(s_semi);\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n case s_required:\r\n case s_optional:\r\n case s_repeated:\r\n parseField(type, tokenLower);\r\n break;\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, s_optional);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (!typeRefRe.test(type))\r\n throw illegal(type, s_type);\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n if (field.repeated)\r\n field.setOption(\"packed\", isProto3, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, s_type);\r\n skip(\",\");\r\n var valueType = next();\r\n if (!typeRefRe.test(valueType))\r\n throw illegal(valueType, s_type);\r\n skip(\">\");\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (token === s_option) {\r\n parseOption(oneof, token);\r\n skip(s_semi);\r\n } else {\r\n push(token);\r\n parseField(oneof, s_optional);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (lower(token) === s_option)\r\n parseOption(enm);\r\n else\r\n parseEnumField(enm, token);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(s_bopen, true);\r\n var name = next();\r\n if (!typeRefRe.test(name))\r\n throw illegal(name, s_name);\r\n if (custom) {\r\n skip(s_bclose);\r\n name = s_bopen + name + s_bclose;\r\n token = peek();\r\n if (fqTypeRefRe.test(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, s_option);\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(s_semi);\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n if (!nameRe.test(token))\r\n throw illegal(token, \"service name\");\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(service, tokenLower);\r\n skip(s_semi);\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(s_bopen);\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(s_bclose); skip(\"returns\"); skip(s_bopen);\r\n if (skip(st, true))\r\n responseStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n responseType = token;\r\n skip(s_bclose);\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(method, tokenLower);\r\n skip(s_semi);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n if (!typeRefRe.test(reference))\r\n throw illegal(reference, \"reference\");\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_required:\r\n case s_repeated:\r\n case s_optional:\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, s_optional, reference);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case s_option:\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(s_semi);\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n return {\r\n 'package' : pkg,\r\n 'imports' : imports,\r\n 'weakImports' : weakImports,\r\n 'syntax' : syntax,\r\n 'root' : root\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = Prototype;\r\n\r\n/**\r\n * Options passed to the {@link Prototype|prototype constructor}, modifying its behavior.\r\n * @typedef PrototypeOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Sets only properties that reference a field\r\n */\r\n\r\n/**\r\n * Constructs a new prototype.\r\n * This method should be called from your custom constructors, i.e. `Prototype.call(this, properties)`.\r\n * @classdesc Runtime message prototype ready to be extended by custom classes or generated code.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @param {PrototypeOptions} [options] Prototype options\r\n * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties, options) {\r\n if (properties) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (fields[keys[i]] || any)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Converts a runtime message to a JSON object.\r\n * @param {Object.} [options] Conversion options\r\n * @param {boolean} [options.fieldsOnly=false] Converts only properties that reference a field\r\n * @param {Function} [options.long] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @param {Function} [options.enum=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys = Object.keys(this);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = fields[key = keys[i]],\r\n value = this[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value && value.length) {\r\n var array = new Array(value.length);\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n array[j] = field.jsonConvert(value[j], options);\r\n json[key] = array;\r\n }\r\n } else\r\n json[key] = field.jsonConvert(value, options);\r\n } else if (any)\r\n json[key] = value;\r\n }\r\n return json;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nReader.BufferReader = BufferReader;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Configures the Reader interface according to the environment.\r\n * @memberof Reader\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n ReaderPrototype._slice = ArrayImpl.prototype.slice || ArrayImpl.prototype.subarray;\r\n\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader.configure = configure;\r\n\r\n/**\r\n * Constructs a new reader using the specified buffer.\r\n * When called as a function, returns an appropriate reader for the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n if (!(this instanceof Reader))\r\n return util.Buffer && (!buffer || util.Buffer.isBuffer(buffer)) && new BufferReader(buffer) || new Reader(buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\n/**\r\n * Tag read.\r\n * @constructor\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @ignore\r\n */\r\nfunction Tag(id, wireType) {\r\n this.id = id;\r\n this.wireType = wireType;\r\n}\r\n\r\n/**\r\n * Reads a tag.\r\n * @returns {{id: number, wireType: number}} Field id and wire type\r\n */\r\nReaderPrototype.tag = function read_tag() {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n return new Tag(this.buf[this.pos] >>> 3, this.buf[this.pos++] & 7);\r\n};\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n var value = 0,\r\n shift = 0,\r\n octet = 0;\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n octet = this.buf[this.pos++];\r\n if (shift < 32)\r\n value |= (octet & 127) << shift;\r\n shift += 7;\r\n } while (octet & 128);\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = function read_uint32() {\r\n return this.int32() >>> 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.int32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n var lo = 0, hi = 0,\r\n i = 0, b = 0;\r\n if (this.len - this.pos > 9) { // fast route\r\n for (i = 0; i < 4; ++i) {\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.int32() !== 0;\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n this.pos += 4;\r\n return this.buf[this.pos - 4]\r\n | this.buf[this.pos - 3] << 8\r\n | this.buf[this.pos - 2] << 16\r\n | this.buf[this.pos - 1] << 24;\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongFixed() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n return new LongBits(\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n ,\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n );\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readLongFixed.call(this).toLong(true);\r\n}\r\n\r\nfunction read_fixed64_number() {\r\n return readLongFixed.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readLongFixed.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sfixed64_number() {\r\n return readLongFixed.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 23, 4);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 52, 8);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n // ref: https://github.com/google/closure-library/blob/master/closure/goog/crypt/crypt.js\r\n var bytes = this.bytes(),\r\n len = bytes.length;\r\n if (len) {\r\n var out = new Array(len), p = 0, c = 0;\r\n while (p < len) {\r\n var c1 = bytes[p++];\r\n if (c1 < 128)\r\n out[c++] = c1;\r\n else if (c1 > 191 && c1 < 224)\r\n out[c++] = (c1 & 31) << 6 | bytes[p++] & 63;\r\n else if (c1 > 239 && c1 < 365) {\r\n var u = ((c1 & 7) << 18 | (bytes[p++] & 63) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63) - 0x10000;\r\n out[c++] = 0xD800 + (u >> 10);\r\n out[c++] = 0xDC00 + (u & 1023);\r\n } else\r\n out[c++] = (c1 & 15) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63;\r\n }\r\n return String.fromCharCode.apply(String, out.slice(0, c));\r\n }\r\n return \"\";\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (length === undefined) {\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n } else {\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n var tag = this.tag();\r\n if (tag.wireType === 4)\r\n break;\r\n this.skipType(tag.wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance and frees all resources.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.reset = function reset(buffer) {\r\n if (buffer) {\r\n this.buf = buffer;\r\n this.len = buffer.length;\r\n } else {\r\n this.buf = null; // makes it throw\r\n this.len = 0;\r\n }\r\n this.pos = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of read operations, frees all resources and returns the remaining buffer.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nReaderPrototype.finish = function finish(buffer) {\r\n var remain = this.pos\r\n ? this._slice.call(this.buf, this.pos)\r\n : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\n// One time function to initialize BufferReader with the now-known buffer implementation's slice method\r\nvar initBufferReader = function() {\r\n if (!util.Buffer)\r\n throw Error(\"Buffer is not supported\");\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n initBufferReader = false;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer reader.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n if (initBufferReader)\r\n initBufferReader();\r\n Reader.call(this, buffer);\r\n}\r\n\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\n\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.float = function read_float_buffer() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = this.buf.readFloatLE(this.pos, true);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.double = function read_double_buffer() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n var value = this.buf.readDoubleLE(this.pos, true);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return this.buf.toString(\"utf8\", start, end);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.finish = function finish_buffer(buffer) {\r\n var remain = this.pos ? this.buf.slice(this.pos) : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(6),\r\n util = require(21),\r\n common = require(2);\r\n\r\n/**\r\n * Constructs a new root namespace.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files. \r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.resolvePath;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {function(?Error, Root=)} [callback] Node-style callback function\r\n * @returns {Promise|undefined} A promise if `callback` has been omitted\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nRootPrototype.load = function load(filename, callback) {\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n var parsed = require(13)(source, self);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.indexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (!queued)\r\n finish(null);\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nRootPrototype.toString = function toString() {\r\n return this.constructor.name;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nvar Method = require(9),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new service.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nObject.defineProperties(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: ServicePrototype.getMethodsArray = function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolve() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @function\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {function(?Error, Uint8Array=)} callback Node-style callback called with the error, if any, and the response data\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpc RPC implementation ({@link RPCImpl|see})\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {Object} Runtime service\r\n */\r\nServicePrototype.create = function create(rpc, requestDelimited, responseDelimited) {\r\n var rpcService = {};\r\n Object.defineProperty(rpcService, \"$rpc\", {\r\n value: rpc\r\n });\r\n this.getMethodsArray().forEach(function(method) {\r\n var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1);\r\n rpcService[lcName] = function(request, callback) {\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited && method.resolvedRequestType.encodeDelimited(request) || method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === 'function' && setImmediate || setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpc(method, requestData, function(err, responseData) {\r\n if (err) {\r\n callback(err);\r\n return;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited && method.resolvedResponseType.decodeDelimited(responseData) || method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n callback(err2);\r\n return;\r\n }\r\n callback(null, response);\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n\r\nvar s_nl = \"\\n\",\r\n s_sl = '/',\r\n s_as = '*';\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable default-case, callback-return */\r\n source = source.toString();\r\n \r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n \r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === '\"' ? stringDoubleRe : stringSingleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === s_sl) {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === s_sl) { // Line\r\n while (charAt(++offset) !== s_nl)\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === s_as) { /* Block */\r\n do {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== s_as || curr !== s_sl);\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return s_sl;\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === '\"' || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable default-case, callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type; \r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nvar Enum = require(5),\r\n OneOf = require(12),\r\n Field = require(6),\r\n Service = require(17),\r\n Prototype = require(14),\r\n Reader = require(15),\r\n Writer = require(26),\r\n encoder = require(4),\r\n decoder = require(3),\r\n verifier = require(25),\r\n inherits = require(7),\r\n util = require(21);\r\n\r\nvar codegen = util.codegen;\r\n\r\n/**\r\n * Constructs a new message type.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {?Function}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nObject.defineProperties(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: TypePrototype.getFieldsById = function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: TypePrototype.getFieldsArray = function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: TypePrototype.getOneofsArray = function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Prototype}\r\n */\r\n ctor: {\r\n get: TypePrototype.getCtor = function getCtor() {\r\n if (this._ctor)\r\n return this._ctor;\r\n var ctor;\r\n if (codegen.supported)\r\n ctor = codegen(\"p\")(\"P.call(this,p)\").eof(this.getFullName() + \"$ctor\", {\r\n P: Prototype\r\n });\r\n else\r\n ctor = function GenericMessage(properties) {\r\n Prototype.call(this, properties);\r\n };\r\n ctor.prototype = inherits(ctor, this);\r\n this._ctor = ctor;\r\n return ctor;\r\n },\r\n set: TypePrototype.setCtor = function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolve() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @param {?Function} [ctor] Constructor to use.\r\n * Defaults to use the internal constuctor.\r\n * @returns {Prototype} Message instance\r\n */\r\nTypePrototype.create = function create(properties, ctor) {\r\n if (typeof properties === 'function') {\r\n ctor = properties;\r\n properties = undefined;\r\n } else if (properties /* already */ instanceof Prototype)\r\n return properties;\r\n if (ctor) {\r\n if (!(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n } else\r\n ctor = this.getCtor();\r\n return new ctor(properties);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode(message, writer) {\r\n return (this.encode = codegen.supported\r\n ? encoder.generate(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : encoder.fallback\r\n ).call(this, message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decode = function decode(readerOrBuffer, length) {\r\n return (this.decode = codegen.supported\r\n ? decoder.generate(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : decoder.fallback\r\n ).call(this, readerOrBuffer, length);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that enum values are valid and that any required fields are present.\r\n * @param {Prototype|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify(message) {\r\n return (this.verify = codegen.supported\r\n ? verifier.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : verifier.fallback\r\n ).call(this, message);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\" // 14\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\nvar emptyArray = [];\r\nif (Object.freeze)\r\n Object.freeze(emptyArray);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ emptyArray\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Utility functions.\r\n * @namespace\r\n */\r\nvar util = exports;\r\n\r\nutil.codegen = require(22);\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @memberof util\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nfunction isString(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\n\r\nutil.isString = isString;\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return Boolean(value && typeof value === 'object');\r\n};\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=a string] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Returns a promise from a node-style function.\r\n * @memberof util\r\n * @param {function(Error, ...*)} fn Function to call\r\n * @param {Object} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var args = [];\r\n for (var i = 2; i < arguments.length; ++i)\r\n args.push(arguments[i]);\r\n return new Promise(function(resolve, reject) {\r\n fn.apply(ctx, args.concat(\r\n function(err/*, varargs */) {\r\n if (err) reject(err);\r\n else resolve.apply(null, Array.prototype.slice.call(arguments, 1));\r\n }\r\n ));\r\n });\r\n}\r\n\r\nutil.asPromise = asPromise;\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {function(?Error, string=)} [callback] Node-style callback\r\n * @returns {Promise|undefined} Promise if callback has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, util, path);\r\n var fs; try { fs = require(\"fs\"); } catch (e) {} // eslint-disable-line no-empty\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", callback);\r\n var xhr = new XMLHttpRequest();\r\n function onload() {\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n if (isString(xhr.responseText))\r\n return callback(null, xhr.responseText);\r\n return callback(Error(\"request failed\"));\r\n }\r\n xhr.onreadystatechange = function() {\r\n if (xhr.readyState === 4)\r\n onload();\r\n };\r\n xhr.open(\"GET\", path, true);\r\n xhr.send();\r\n return undefined;\r\n}\r\n\r\nutil.fetch = fetch;\r\n\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @memberof util\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\nfunction isAbsolutePath(path) {\r\n return /^(?:\\/|[a-zA-Z0-9]+:)/.test(path);\r\n}\r\n\r\nutil.isAbsolutePath = isAbsolutePath;\r\n\r\n/**\r\n * Normalizes the specified path.\r\n * @memberof util\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\nfunction normalizePath(path) {\r\n path = path.replace(/\\\\/g, '/')\r\n .replace(/\\/{2,}/g, '/');\r\n var parts = path.split('/');\r\n var abs = isAbsolutePath(path);\r\n var prefix = \"\";\r\n if (abs)\r\n prefix = parts.shift() + '/';\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === '..') {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (abs)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === '.')\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join('/');\r\n}\r\n\r\nutil.normalizePath = normalizePath;\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path that was used to fetch the origin file\r\n * @param {string} importPath Import path specified in the origin file\r\n * @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the imported file\r\n */\r\nutil.resolvePath = function resolvePath(originPath, importPath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n importPath = normalizePath(importPath);\r\n if (isAbsolutePath(importPath))\r\n return importPath;\r\n if (!alreadyNormalized)\r\n originPath = normalizePath(originPath);\r\n originPath = originPath.replace(/(?:\\/|^)[^/]+$/, '');\r\n return originPath.length ? normalizePath(originPath + '/' + importPath) : importPath;\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n// Reserved words, ref: https://msdn.microsoft.com/en-us/library/ttyab5c8.aspx\r\n// var reserved = \"break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,false,finally,for,function,if,import,in,instanceof,new,null,protected,return,super,switch,this,throw,true,try,typeof,var,while,with,abstract,boolean,byte,char,decimal,double,enum,final,float,get,implements,int,interface,internal,long,package,private,protected,public,sbyte,set,short,static,uint,ulong,ushort,void,assert,ensure,event,goto,invariant,namespace,native,require,synchronized,throws,transient,use,volatile\".split(',');\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n // NOTE: While dot notation looks cleaner it doesn't seem to have a significant impact on performance.\r\n // Hence, we can safe the extra bytes from providing the reserved keywords above for pre-ES5 envs.\r\n return /* /^[a-z_$][a-z0-9_$]*$/i.test(prop) && !reserved.indexOf(prop) ? \".\" + prop : */ \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n return new (util.Buffer || typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size || 0);\r\n};\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(24));\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * Programmatically generates a function.\r\n * @memberof util\r\n * @param {...string} params Function parameter names\r\n * @returns {util.CodegenAppender} Printf-like appender function\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen(/* varargs */) {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'];\r\n\r\n var indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * Appends a printf-like formatted line to the generated source. Returned when calling {@link util.codegen}.\r\n * @typedef CodegenAppender\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} format A printf-like format string\r\n * @param {...*} params Format replacements\r\n * @returns {util.CodegenAppender} Itself\r\n * @property {util.CodegenStringer} str\r\n * @property {util.CodegenEnder} eof\r\n * @see {@link https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args}\r\n */\r\n /**/\r\n function gen() {\r\n var fmt = [];\r\n for (var i = 0; i < arguments.length; ++i)\r\n fmt[i] = arguments[i];\r\n var line = gen.fmt.apply(null, fmt);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (var index = 0; index < level; ++index)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n gen.fmt = function fmt(format) {\r\n var params = Array.prototype.slice.call(arguments, 1),\r\n index = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var param = params[index++];\r\n return $1 === \"j\"\r\n ? JSON.stringify(param)\r\n : String(param);\r\n });\r\n };\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @typedef CodegenStringer\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n */\r\n /**/\r\n gen.str = function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + args.join(\",\") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n };\r\n\r\n /**\r\n * Ends generation and builds the function.\r\n * @typedef CodegenEnder\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object|Array.} [scope] Function scope\r\n * @returns {function} A function to apply the scope manually when `scope` is an array, otherwise the generated function with scope applied\r\n */\r\n /**/\r\n gen.eof = function eof(name, scope) {\r\n if (name && typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var code = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + code.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n code = \"return \" + code;\r\n var params, values = [];\r\n if (Array.isArray(scope)) {\r\n params = scope.slice();\r\n } else if (scope) {\r\n params = Object.keys(scope);\r\n values = params.map(function(key) { return scope[key]; });\r\n } else\r\n params = [];\r\n var fn = Function.apply(null, params.concat(code)); // eslint-disable-line no-new-func\r\n return values ? fn.apply(null, values) : fn();\r\n };\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false;\r\ntry { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\n\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(21);\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nLongBits.from = function from(value) {\r\n switch (typeof value) { // eslint-disable-line default-case\r\n case 'number':\r\n return LongBits.fromNumber(value);\r\n case 'string':\r\n value = util.Long.fromString(value); // throws without a long lib\r\n }\r\n return (value.low || value.high) && new LongBits(value.low >>> 0, value.high >>> 0) || zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return new util.Long(this.lo, this.hi, unsigned);\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 & 255,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24 & 255\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n if (part2 === 0) {\r\n if (part1 === 0)\r\n return part0 < 1 << 14\r\n ? part0 < 1 << 7 ? 1 : 2\r\n : part0 < 1 << 21 ? 3 : 4;\r\n return part1 < 1 << 14\r\n ? part1 < 1 << 7 ? 5 : 6\r\n : part1 < 1 << 21 ? 7 : 8;\r\n }\r\n return part2 < 1 << 7 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nvar isNode = util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Optional buffer class to use.\r\n * If you assign any compatible buffer implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Buffer = null;\r\n\r\nif (isNode)\r\n try { util.Buffer = require(\"buffer\").Buffer; } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Optional Long class to use.\r\n * If you assign any compatible long implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || null;\r\n\r\nif (!util.Long && isNode)\r\n try { util.Long = require(\"long\"); } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? LongBits.from(value).toHash()\r\n : '\\0\\0\\0\\0\\0\\0\\0\\0';\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === 'number'\r\n ? typeof b === 'number'\r\n ? a !== b\r\n : (a = LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === 'number'\r\n ? (b = LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Runtime message verifier using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar verifier = exports;\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n util = require(21);\r\n\r\n/**\r\n * Verifies a runtime message of `this` message type.\r\n * @param {Prototype|Object} message Runtime message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n * @this {Type}\r\n */\r\nverifier.fallback = function fallback(message) {\r\n var fields = this.getFieldsArray(),\r\n i = 0;\r\n while (i < fields.length) {\r\n var field = fields[i++].resolve(),\r\n value = message[field.name];\r\n\r\n if (value === undefined) {\r\n if (field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Enum && field.resolvedType.getValuesById()[value] === undefined) {\r\n return \"invalid enum value \" + field.name + \" = \" + value + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (!value && field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n var reason;\r\n if ((reason = field.resolvedType.verify(value)) !== null)\r\n return reason;\r\n }\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\nverifier.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n var hasReasonVar = false;\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n prop = util.safeProp(field.name);\r\n if (field.required) { gen\r\n\r\n (\"if(m%s===undefined)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n } else if (field.resolvedType instanceof Enum) {\r\n var values = util.toArray(field.resolvedType.values); gen\r\n\r\n (\"switch(m%s){\", prop)\r\n (\"default:\")\r\n (\"return 'invalid enum value %s = '+m%s+' in %s'\", field.name, prop, mtype.getFullName());\r\n\r\n for (var j = 0, l = values.length; j < l; ++j) gen\r\n (\"case %d:\", values[j]); gen\r\n (\"}\");\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (field.required) gen\r\n\r\n (\"if(!m%s)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n if (!hasReasonVar) { gen(\"var r\"); hasReasonVar = true; } gen\r\n\r\n (\"if((r=types[%d].verify(m%s))!==null)\", i, prop)\r\n (\"return r\");\r\n }\r\n }\r\n return gen\r\n (\"return null\");\r\n /* eslint-enable no-unexpected-multiline */\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\n/**\r\n * Configures the writer interface according to the environment.\r\n * @memberof Writer\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n writeBytes = ArrayImpl.prototype.set && writeBytes_set || writeBytes_for;\r\n}\r\n\r\nWriter.configure = configure;\r\n\r\n/**\r\n * Constructs a new writer operation.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {*} val Value to write\r\n * @param {number} len Value byte length\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, val, len) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {?Writer.Op}\r\n */\r\n this.next = null;\r\n}\r\n\r\nWriter.Op = Op;\r\n\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * When called as a function, returns an appropriate writer for the current environment.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @exports Writer\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n if (!(this instanceof Writer))\r\n return util.Buffer && new BufferWriter() || new Writer();\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * State stack.\r\n * @type {Object[]}\r\n */\r\n this.stack = [];\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n var op = new Op(fn, val, len);\r\n this.tail.next = op;\r\n this.tail = op;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(buf, pos, val) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\n/**\r\n * Writes a tag.\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.tag = function write_tag(id, wireType) {\r\n return this.push(writeByte, 1, id << 3 | wireType & 7);\r\n};\r\n\r\nfunction writeVarint32(buf, pos, val) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value >>>= 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32(value << 1 ^ value >> 31);\r\n};\r\n\r\nfunction writeVarint64(buf, pos, val) {\r\n // tends to deoptimize. stays optimized when using bits directly.\r\n while (val.hi || val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(buf, pos, val) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24 & 255;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\nfunction writeFloat(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 23, 4);\r\n}\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nfunction writeDouble(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 52, 8);\r\n}\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes;\r\n\r\nfunction writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n}\r\n\r\nfunction writeBytes_for(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n}\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeString(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i) {\r\n var c1 = val.charCodeAt(i), c2;\r\n if (c1 < 128) {\r\n buf[pos++] = c1;\r\n } else if (c1 < 2048) {\r\n buf[pos++] = c1 >> 6 | 192;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = val.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buf[pos++] = c1 >> 18 | 240;\r\n buf[pos++] = c1 >> 12 & 63 | 128;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else {\r\n buf[pos++] = c1 >> 12 | 224;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n }\r\n }\r\n}\r\n\r\nfunction byteLength(val) {\r\n var strlen = val.length >>> 0;\r\n var len = 0;\r\n for (var i = 0; i < strlen; ++i) {\r\n var c1 = val.charCodeAt(i);\r\n if (c1 < 128)\r\n len += 1;\r\n else if (c1 < 2048)\r\n len += 2;\r\n else if ((c1 & 0xFC00) === 0xD800 && (val.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n}\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeString, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#ldelim}, {@link Writer#reset} or {@link Writer#finish} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.stack.push(new State(this));\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.stack.length) {\r\n var state = this.stack.pop();\r\n this.head = state.head;\r\n this.tail = state.tail;\r\n this.len = state.len;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @param {number} [id] Id with wire type 2 to prepend where applicable\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim(id) {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset();\r\n if (id !== undefined)\r\n this.tag(id, 2);\r\n this.uint32(len);\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of write operations and frees all resources.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = new ArrayImpl(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer writer.\r\n * @classdesc Wire format writer using node buffers.\r\n * @exports BufferWriter\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nfunction writeFloatBuffer(buf, pos, val) {\r\n buf.writeFloatLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.float = function write_float_buffer(value) {\r\n return this.push(writeFloatBuffer, 4, value);\r\n};\r\n\r\nfunction writeDoubleBuffer(buf, pos, val) {\r\n buf.writeDoubleLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.double = function write_double_buffer(value) {\r\n return this.push(writeDoubleBuffer, 8, value);\r\n};\r\n\r\nfunction writeBytesBuffer(buf, pos, val) {\r\n if (val.length)\r\n val.copy(buf, pos, 0, val.length);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytesBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeStringBuffer(buf, pos, val) {\r\n if (val.length < 40) // plain js is faster for short strings\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\t\t\r\n var len = value.length < 40\r\n ? byteLength(value)\r\n : util.Buffer.byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeStringBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.finish = function finish_buffer() {\r\n var head = this.head.next, // skip noop\r\n buf = util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(this.len) || new util.Buffer(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @param {function(?Error, Root=)} [callback] Callback function\r\n * @returns {Promise|Object} A promise if callback has been omitted, otherwise the protobuf namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === 'function') {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback) || protobuf;\r\n}\r\n\r\nprotobuf.load = load;\r\n\r\n// Parser\r\nprotobuf.tokenize = require(\"./tokenize\");\r\nprotobuf.parse = require(\"./parse\");\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = protobuf.Writer.BufferWriter;\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = protobuf.Reader.BufferReader;\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Prototype = require(\"./prototype\");\r\nprotobuf.inherits = require(\"./inherits\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.common = require(\"./common\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\r\n/* eslint-disable no-undef */\r\nif (typeof define === 'function' && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n protobuf.Reader.configure();\r\n protobuf.Writer.configure();\r\n }\r\n return protobuf;\r\n });\r\n/* eslint-enable no-undef */\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/common.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/inherits.js","src/mapfield.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/prototype.js","src/reader.js","src/root.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/codegen.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/index.js"],"names":[],"mappings":";;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 1,\r\n nBits = -7,\r\n i = isBE ? 0 : (nBytes - 1),\r\n d = isBE ? 1 : -1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n};\r\n\r\nexports.write = function writeIEEE754(buffer, value, offset, isBE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isBE ? (nBytes - 1) : 0,\r\n d = isBE ? -1 : 1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n// - google/protobuf/wrappers.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar decoder = exports;\r\n\r\nvar Enum = require(5),\r\n Reader = require(15),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Decodes a message of `this` message's type.\r\n * @param {Reader} reader Reader to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Populated runtime message\r\n * @this Type\r\n */\r\ndecoder.fallback = function fallback(reader, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = reader instanceof Reader ? reader : Reader(reader),\r\n limit = length === undefined ? reader.len : reader.pos + length,\r\n message = new (this.getCtor())();\r\n while (reader.pos < limit) {\r\n var tag = reader.tag(),\r\n field = fields[tag.id].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type;\r\n \r\n // Known fields\r\n if (field) {\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType,\r\n length = reader.uint32();\r\n var map = message[field.name] = {};\r\n if (length) {\r\n length += reader.pos;\r\n var ks = [], vs = [];\r\n while (reader.pos < length) {\r\n if (reader.tag().id === 1)\r\n ks[ks.length] = reader[keyType]();\r\n else if (types.basic[type] !== undefined)\r\n vs[vs.length] = reader[type]();\r\n else\r\n vs[vs.length] = field.resolvedType.decode(reader, reader.uint32());\r\n }\r\n for (var i = 0; i < ks.length; ++i)\r\n map[typeof ks[i] === 'object' ? util.longToHash(ks[i]) : ks[i]] = vs[i];\r\n }\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n var values = message[field.name] || (message[field.name] = []);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined && tag.wireType === 2) {\r\n var plimit = reader.uint32() + reader.pos;\r\n while (reader.pos < plimit)\r\n values[values.length] = reader[type]();\r\n\r\n // Non-packed\r\n } else if (types.basic[type] !== undefined)\r\n values[values.length] = reader[type]();\r\n else\r\n values[values.length] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Non-repeated\r\n } else if (types.basic[type] !== undefined)\r\n message[field.name] = reader[type]();\r\n else\r\n message[field.name] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Unknown fields\r\n } else\r\n reader.skipType(tag.wireType);\r\n }\r\n return message;\r\n /* eslint-enable no-invalid-this, block-scoped-var, no-redeclare */\r\n};\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\ndecoder.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nObject.defineProperties(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: EnumPrototype.getValuesById = function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (this.values[name] !== undefined)\r\n throw Error('duplicate name \"' + name + '\" in ' + this);\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error('\"' + name + '\" is not a name of ' + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(19),\r\n Enum = require(5),\r\n MapField = require(8),\r\n types = require(20),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string} [rule=optional] Field rule\r\n * @param {string} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (extend !== undefined && !util.isString(extend))\r\n throw _TypeError(\"extend\");\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw _TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== 'optional' ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nObject.defineProperties(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined)\r\n return MapField.fromJSON(name, json);\r\n return new Field(name, json.id, json.type, json.role, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n var resolved = this.parent.lookup(this.type);\r\n if (resolved instanceof Type) {\r\n this.resolvedType = resolved;\r\n typeDefault = null;\r\n } else if (resolved instanceof Enum) {\r\n this.resolvedType = resolved;\r\n typeDefault = 0;\r\n } else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved determine the default value\r\n var optionDefault;\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else if (this.options && (optionDefault = this.options['default']) !== undefined) // eslint-disable-line dot-notation\r\n this.defaultValue = optionDefault;\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long)\r\n this.defaultValue = util.Long.fromValue(this.defaultValue);\r\n \r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Converts a field value to JSON using the specified options. Note that this method does not account for repeated fields and must be called once for each repeated element instead.\r\n * @param {*} value Field value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {*} Converted value\r\n * @see {@link Prototype#asJSON}\r\n */\r\nFieldPrototype.jsonConvert = function(value, options) {\r\n if (options) {\r\n if (this.resolvedType instanceof Enum && options['enum'] === String) // eslint-disable-line dot-notation\r\n return this.resolvedType.getValuesById()[value];\r\n else if (this.long && options.long)\r\n return options.long === Number\r\n ? typeof value === 'number'\r\n ? value\r\n : util.Long.fromValue(value).toNumber()\r\n : util.Long.fromValue(value, this.type.charAt(0) === 'u').toString();\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = inherits;\r\n\r\nvar Prototype = require(14),\r\n Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Options passed to {@link inherits}, modifying its behavior.\r\n * @typedef InheritanceOptions\r\n * @type {Object}\r\n * @property {boolean} [noStatics=false] Skips adding the default static methods on top of the constructor\r\n * @property {boolean} [noRegister=false] Skips registering the constructor with the reflected type\r\n */\r\n\r\n/**\r\n * Inherits a custom class from the message prototype of the specified message type.\r\n * @param {Function} clazz Inheriting class\r\n * @param {Type} type Inherited message type\r\n * @param {InheritanceOptions} [options] Inheritance options\r\n * @returns {Prototype} Created prototype\r\n */\r\nfunction inherits(clazz, type, options) {\r\n if (typeof clazz !== 'function')\r\n throw _TypeError(\"clazz\", \"a function\");\r\n if (!(type instanceof Type))\r\n throw _TypeError(\"type\", \"a Type\");\r\n if (!options)\r\n options = {};\r\n\r\n /**\r\n * This is not an actual type but stands as a reference for any constructor of a custom message class that you pass to the library.\r\n * @name Class\r\n * @extends Prototype\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set on the message\r\n * @see {@link inherits}\r\n */\r\n\r\n var classProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Class.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n if (!options.noStatics)\r\n util.merge(classProperties, {\r\n\r\n /**\r\n * Encodes a message of this type to a buffer.\r\n * @name Class.encode\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encode: {\r\n value: function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Encodes a message of this type preceeded by its length as a varint to a buffer.\r\n * @name Class.encodeDelimited\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encodeDelimited: {\r\n value: function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type from a buffer.\r\n * @name Class.decode\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decode: {\r\n value: function decode(buffer) {\r\n return this.$type.decode(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type preceeded by its length as a varint from a buffer.\r\n * @name Class.decodeDelimited\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decodeDelimited: {\r\n value: function decodeDelimited(buffer) {\r\n return this.$type.decodeDelimited(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Verifies a message of this type.\r\n * @name Class.verify\r\n * @function\r\n * @param {Prototype|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n verify: {\r\n value: function verify(message) {\r\n return this.$type.verify(message);\r\n }\r\n }\r\n\r\n }, true);\r\n\r\n Object.defineProperties(clazz, classProperties);\r\n var prototype = inherits.defineProperties(new Prototype(), type);\r\n clazz.prototype = prototype;\r\n prototype.constructor = clazz;\r\n\r\n if (!options.noRegister)\r\n type.setCtor(clazz);\r\n\r\n return prototype;\r\n}\r\n\r\n/**\r\n * Defines the reflected type's default values and virtual oneof properties on the specified prototype.\r\n * @memberof inherits\r\n * @param {Prototype} prototype Prototype to define properties upon\r\n * @param {Type} type Reflected message type\r\n * @returns {Prototype} The specified prototype\r\n */\r\ninherits.defineProperties = function defineProperties(prototype, type) {\r\n\r\n var prototypeProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Prototype#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n // Initialize default values\r\n type.getFieldsArray().forEach(function(field) {\r\n field.resolve();\r\n if (!util.isObject(field.defaultValue))\r\n // objects are mutable (i.e. would modify the array on the prototype, not the instance)\r\n prototype[field.name] = field.defaultValue;\r\n });\r\n\r\n // Define each oneof with a non-enumerable getter and setter for the present field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n oneof.resolve();\r\n prototypeProperties[oneof.name] = {\r\n get: prototype['get' + oneof.ucName] = function() {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = oneof.parent.fields[keys[i]];\r\n if (this[keys[i]] != field.defaultValue) // eslint-disable-line eqeqeq\r\n return keys[i];\r\n }\r\n return undefined;\r\n },\r\n set: prototype['set' + oneof.ucName] = function(value) {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperties(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(6);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nvar Enum = require(5),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new map field.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n \r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n \r\n // Besides a value type, map fields have a key type to resolve\r\n var keyWireType = types.mapKey[this.keyType];\r\n if (keyWireType === undefined) {\r\n var resolved = this.parent.lookup(this.keyType);\r\n if (!(resolved instanceof Enum))\r\n throw Error(\"unresolvable map key type: \" + this.keyType);\r\n this.resolvedKeyType = resolved;\r\n }\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean} [requestStream] Whether the request is streamed\r\n * @param {boolean} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (!util.isString(requestType))\r\n throw _TypeError(\"requestType\");\r\n if (!util.isString(responseType))\r\n throw _TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var resolved = this.parent.lookup(this.requestType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n this.resolvedRequestType = resolved;\r\n resolved = this.parent.lookup(this.responseType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n this.resolvedResponseType = resolved;\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n Field = require(6),\r\n Service = require(17),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\nvar nestedTypes = [ Enum, Type, Service, Field, Namespace ],\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(', ');\r\n\r\n/**\r\n * Constructs a new namespace.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n return namespace;\r\n}\r\n\r\nObject.defineProperties(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: NamespacePrototype.getNestedArray = function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson)\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw _TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw _TypeError(\"object\", nestedError);\r\n if (object instanceof Field && object.extend === undefined)\r\n throw _TypeError(\"object\", \"an extension field when not part of a type\");\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n if (!(object instanceof ReflectionObject))\r\n throw _TypeError(\"object\", \"a ReflectionObject\");\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split('.');\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolve() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, parentAlreadyChecked) {\r\n if (util.isString(path)) {\r\n if (!path.length)\r\n return null;\r\n path = path.split('.');\r\n } else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1));\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && (path.length === 1 || found instanceof Namespace && (found = found.lookup(path.slice(1), true))))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path);\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nReflectionObject.extend = extend;\r\n\r\nvar Root = require(16),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (options && !util.isObject(options))\r\n throw _TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nObject.defineProperties(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: ReflectionObjectPrototype.getRoot = function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join('.');\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Lets the specified constructor extend this class.\r\n * @memberof ReflectionObject\r\n * @param {Function} constructor Extending constructor\r\n * @returns {Object} Prototype\r\n * @this ReflectionObject\r\n */\r\nfunction extend(constructor) {\r\n var proto = constructor.prototype = Object.create(this.prototype);\r\n proto.constructor = constructor;\r\n constructor.extend = extend;\r\n return proto;\r\n}\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Constructor name, space, full name\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n return this.constructor.name + \" \" + this.getFullName();\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(6),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw _TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = this.name.substring(0, 1).toUpperCase() + this.name.substring(1);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {Array.}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._fields = [];\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent)\r\n oneof._fields.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fields.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n var index = this._fields.indexOf(field);\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n this._fields.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fields.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(18),\r\n Root = require(16),\r\n Type = require(19),\r\n Field = require(6),\r\n MapField = require(8),\r\n OneOf = require(12),\r\n Enum = require(5),\r\n Service = require(17),\r\n Method = require(9),\r\n types = require(20);\r\n\r\nvar nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n fqTypeRefRe = /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/;\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(name) {\r\n return name.substring(0,1)\r\n + name.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\nvar s_required = \"required\",\r\n s_repeated = \"repeated\",\r\n s_optional = \"optional\",\r\n s_option = \"option\",\r\n s_name = \"name\",\r\n s_type = \"type\";\r\nvar s_open = \"{\",\r\n s_close = \"}\",\r\n s_bopen = '(',\r\n s_bclose = ')',\r\n s_semi = \";\",\r\n s_dq = '\"',\r\n s_sq = \"'\";\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @param {string} source Source contents\r\n * @param {Root} [root] Root to populate\r\n * @returns {ParserResult} Parser result\r\n */\r\nfunction parse(source, root) {\r\n /* eslint-disable default-case, callback-return */\r\n if (!root)\r\n root = new Root();\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n function illegal(token, name) {\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (line \" + tn.line() + s_bclose);\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== s_dq && token !== s_sq)\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === s_dq || token === s_sq);\r\n return values.join('');\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case s_sq:\r\n case s_dq:\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && typeRefRe.test(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(s_semi);\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === '-') {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, 'number');\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"min\": return 1;\r\n case \"max\": return 0x1FFFFFFF;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === '-' && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!typeRefRe.test(pkg))\r\n throw illegal(pkg, s_name);\r\n ptr = ptr.define(pkg);\r\n skip(s_semi);\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(s_semi);\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n var p3;\r\n if ([ \"proto2\", p3 = \"proto3\" ].indexOf(syntax) < 0)\r\n throw illegal(syntax, \"syntax\");\r\n isProto3 = syntax === p3;\r\n skip(s_semi);\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case s_option:\r\n parseOption(parent, token);\r\n skip(s_semi);\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n case s_required:\r\n case s_optional:\r\n case s_repeated:\r\n parseField(type, tokenLower);\r\n break;\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, s_optional);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (!typeRefRe.test(type))\r\n throw illegal(type, s_type);\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n if (field.repeated)\r\n field.setOption(\"packed\", isProto3, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, s_type);\r\n skip(\",\");\r\n var valueType = next();\r\n if (!typeRefRe.test(valueType))\r\n throw illegal(valueType, s_type);\r\n skip(\">\");\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (token === s_option) {\r\n parseOption(oneof, token);\r\n skip(s_semi);\r\n } else {\r\n push(token);\r\n parseField(oneof, s_optional);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (lower(token) === s_option)\r\n parseOption(enm);\r\n else\r\n parseEnumField(enm, token);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(s_bopen, true);\r\n var name = next();\r\n if (!typeRefRe.test(name))\r\n throw illegal(name, s_name);\r\n if (custom) {\r\n skip(s_bclose);\r\n name = s_bopen + name + s_bclose;\r\n token = peek();\r\n if (fqTypeRefRe.test(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, s_option);\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(s_semi);\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n if (!nameRe.test(token))\r\n throw illegal(token, \"service name\");\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(service, tokenLower);\r\n skip(s_semi);\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(s_bopen);\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(s_bclose); skip(\"returns\"); skip(s_bopen);\r\n if (skip(st, true))\r\n responseStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n responseType = token;\r\n skip(s_bclose);\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(method, tokenLower);\r\n skip(s_semi);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n if (!typeRefRe.test(reference))\r\n throw illegal(reference, \"reference\");\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_required:\r\n case s_repeated:\r\n case s_optional:\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, s_optional, reference);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case s_option:\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(s_semi);\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n return {\r\n 'package' : pkg,\r\n 'imports' : imports,\r\n 'weakImports' : weakImports,\r\n 'syntax' : syntax,\r\n 'root' : root\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = Prototype;\r\n\r\n/**\r\n * Options passed to the {@link Prototype|prototype constructor}, modifying its behavior.\r\n * @typedef PrototypeOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Sets only properties that reference a field\r\n */\r\n\r\n/**\r\n * Constructs a new prototype.\r\n * This method should be called from your custom constructors, i.e. `Prototype.call(this, properties)`.\r\n * @classdesc Runtime message prototype ready to be extended by custom classes or generated code.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @param {PrototypeOptions} [options] Prototype options\r\n * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties, options) {\r\n if (properties) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = fields[keys[i]];\r\n if (field && field.partOf)\r\n this['set' + field.partOf.ucName](field.name);\r\n if (field || any)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Converts a runtime message to a JSON object.\r\n * @param {Object.} [options] Conversion options\r\n * @param {boolean} [options.fieldsOnly=false] Converts only properties that reference a field\r\n * @param {Function} [options.long] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @param {Function} [options.enum=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys = Object.keys(this);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = fields[key = keys[i]],\r\n value = this[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value && value.length) {\r\n var array = new Array(value.length);\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n array[j] = field.jsonConvert(value[j], options);\r\n json[key] = array;\r\n }\r\n } else\r\n json[key] = field.jsonConvert(value, options);\r\n } else if (any)\r\n json[key] = value;\r\n }\r\n return json;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nReader.BufferReader = BufferReader;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Configures the Reader interface according to the environment.\r\n * @memberof Reader\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n ReaderPrototype._slice = ArrayImpl.prototype.slice || ArrayImpl.prototype.subarray;\r\n\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader.configure = configure;\r\n\r\n/**\r\n * Constructs a new reader using the specified buffer.\r\n * When called as a function, returns an appropriate reader for the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n if (!(this instanceof Reader))\r\n return util.Buffer && (!buffer || util.Buffer.isBuffer(buffer)) && new BufferReader(buffer) || new Reader(buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\n/**\r\n * Tag read.\r\n * @constructor\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @ignore\r\n */\r\nfunction Tag(id, wireType) {\r\n this.id = id;\r\n this.wireType = wireType;\r\n}\r\n\r\n/**\r\n * Reads a tag.\r\n * @returns {{id: number, wireType: number}} Field id and wire type\r\n */\r\nReaderPrototype.tag = function read_tag() {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n return new Tag(this.buf[this.pos] >>> 3, this.buf[this.pos++] & 7);\r\n};\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n var value = 0,\r\n shift = 0,\r\n octet = 0;\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n octet = this.buf[this.pos++];\r\n if (shift < 32)\r\n value |= (octet & 127) << shift;\r\n shift += 7;\r\n } while (octet & 128);\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = function read_uint32() {\r\n return this.int32() >>> 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.int32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n var lo = 0, hi = 0,\r\n i = 0, b = 0;\r\n if (this.len - this.pos > 9) { // fast route\r\n for (i = 0; i < 4; ++i) {\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.int32() !== 0;\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n this.pos += 4;\r\n return this.buf[this.pos - 4]\r\n | this.buf[this.pos - 3] << 8\r\n | this.buf[this.pos - 2] << 16\r\n | this.buf[this.pos - 1] << 24;\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongFixed() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n return new LongBits(\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n ,\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n );\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readLongFixed.call(this).toLong(true);\r\n}\r\n\r\nfunction read_fixed64_number() {\r\n return readLongFixed.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readLongFixed.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sfixed64_number() {\r\n return readLongFixed.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 23, 4);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 52, 8);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n // ref: https://github.com/google/closure-library/blob/master/closure/goog/crypt/crypt.js\r\n var bytes = this.bytes(),\r\n len = bytes.length;\r\n if (len) {\r\n var out = new Array(len), p = 0, c = 0;\r\n while (p < len) {\r\n var c1 = bytes[p++];\r\n if (c1 < 128)\r\n out[c++] = c1;\r\n else if (c1 > 191 && c1 < 224)\r\n out[c++] = (c1 & 31) << 6 | bytes[p++] & 63;\r\n else if (c1 > 239 && c1 < 365) {\r\n var u = ((c1 & 7) << 18 | (bytes[p++] & 63) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63) - 0x10000;\r\n out[c++] = 0xD800 + (u >> 10);\r\n out[c++] = 0xDC00 + (u & 1023);\r\n } else\r\n out[c++] = (c1 & 15) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63;\r\n }\r\n return String.fromCharCode.apply(String, out.slice(0, c));\r\n }\r\n return \"\";\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (length === undefined) {\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n } else {\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n var tag = this.tag();\r\n if (tag.wireType === 4)\r\n break;\r\n this.skipType(tag.wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance and frees all resources.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.reset = function reset(buffer) {\r\n if (buffer) {\r\n this.buf = buffer;\r\n this.len = buffer.length;\r\n } else {\r\n this.buf = null; // makes it throw\r\n this.len = 0;\r\n }\r\n this.pos = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of read operations, frees all resources and returns the remaining buffer.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nReaderPrototype.finish = function finish(buffer) {\r\n var remain = this.pos\r\n ? this._slice.call(this.buf, this.pos)\r\n : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\n// One time function to initialize BufferReader with the now-known buffer implementation's slice method\r\nvar initBufferReader = function() {\r\n if (!util.Buffer)\r\n throw Error(\"Buffer is not supported\");\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n initBufferReader = false;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer reader.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n if (initBufferReader)\r\n initBufferReader();\r\n Reader.call(this, buffer);\r\n}\r\n\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\n\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.float = function read_float_buffer() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = this.buf.readFloatLE(this.pos, true);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.double = function read_double_buffer() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n var value = this.buf.readDoubleLE(this.pos, true);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return this.buf.toString(\"utf8\", start, end);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.finish = function finish_buffer(buffer) {\r\n var remain = this.pos ? this.buf.slice(this.pos) : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(6),\r\n util = require(21),\r\n common = require(2);\r\n\r\n/**\r\n * Constructs a new root namespace.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files. \r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.resolvePath;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {function(?Error, Root=)} [callback] Node-style callback function\r\n * @returns {Promise|undefined} A promise if `callback` has been omitted\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nRootPrototype.load = function load(filename, callback) {\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n var parsed = require(13)(source, self);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.indexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (!queued)\r\n finish(null);\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nRootPrototype.toString = function toString() {\r\n return this.constructor.name;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nvar Method = require(9),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new service.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nObject.defineProperties(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: ServicePrototype.getMethodsArray = function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolve() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @function\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {function(?Error, Uint8Array=)} callback Node-style callback called with the error, if any, and the response data\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpc RPC implementation ({@link RPCImpl|see})\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {Object} Runtime service\r\n */\r\nServicePrototype.create = function create(rpc, requestDelimited, responseDelimited) {\r\n var rpcService = {};\r\n Object.defineProperty(rpcService, \"$rpc\", {\r\n value: rpc\r\n });\r\n this.getMethodsArray().forEach(function(method) {\r\n var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1);\r\n rpcService[lcName] = function(request, callback) {\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited && method.resolvedRequestType.encodeDelimited(request) || method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === 'function' && setImmediate || setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpc(method, requestData, function(err, responseData) {\r\n if (err) {\r\n callback(err);\r\n return;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited && method.resolvedResponseType.decodeDelimited(responseData) || method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n callback(err2);\r\n return;\r\n }\r\n callback(null, response);\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n\r\nvar s_nl = \"\\n\",\r\n s_sl = '/',\r\n s_as = '*';\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable default-case, callback-return */\r\n source = source.toString();\r\n \r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n \r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === '\"' ? stringDoubleRe : stringSingleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === s_sl) {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === s_sl) { // Line\r\n while (charAt(++offset) !== s_nl)\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === s_as) { /* Block */\r\n do {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== s_as || curr !== s_sl);\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return s_sl;\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === '\"' || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable default-case, callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type; \r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nvar Enum = require(5),\r\n OneOf = require(12),\r\n Field = require(6),\r\n Service = require(17),\r\n Prototype = require(14),\r\n Reader = require(15),\r\n Writer = require(26),\r\n encoder = require(4),\r\n decoder = require(3),\r\n verifier = require(25),\r\n inherits = require(7),\r\n util = require(21);\r\n\r\nvar codegen = util.codegen;\r\n\r\n/**\r\n * Constructs a new message type.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {?Function}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nObject.defineProperties(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: TypePrototype.getFieldsById = function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: TypePrototype.getFieldsArray = function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: TypePrototype.getOneofsArray = function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Prototype}\r\n */\r\n ctor: {\r\n get: TypePrototype.getCtor = function getCtor() {\r\n if (this._ctor)\r\n return this._ctor;\r\n var ctor;\r\n if (codegen.supported)\r\n ctor = codegen(\"p\")(\"P.call(this,p)\").eof(this.getFullName() + \"$ctor\", {\r\n P: Prototype\r\n });\r\n else\r\n ctor = function GenericMessage(properties) {\r\n Prototype.call(this, properties);\r\n };\r\n ctor.prototype = inherits(ctor, this);\r\n this._ctor = ctor;\r\n return ctor;\r\n },\r\n set: TypePrototype.setCtor = function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolve() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @param {?Function} [ctor] Constructor to use.\r\n * Defaults to use the internal constuctor.\r\n * @returns {Prototype} Message instance\r\n */\r\nTypePrototype.create = function create(properties, ctor) {\r\n if (typeof properties === 'function') {\r\n ctor = properties;\r\n properties = undefined;\r\n } else if (properties /* already */ instanceof Prototype)\r\n return properties;\r\n if (ctor) {\r\n if (!(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n } else\r\n ctor = this.getCtor();\r\n return new ctor(properties);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode(message, writer) {\r\n return (this.encode = codegen.supported\r\n ? encoder.generate(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : encoder.fallback\r\n ).call(this, message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decode = function decode(readerOrBuffer, length) {\r\n return (this.decode = codegen.supported\r\n ? decoder.generate(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : decoder.fallback\r\n ).call(this, readerOrBuffer, length);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that enum values are valid and that any required fields are present.\r\n * @param {Prototype|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify(message) {\r\n return (this.verify = codegen.supported\r\n ? verifier.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : verifier.fallback\r\n ).call(this, message);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\" // 14\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\nvar emptyArray = [];\r\nif (Object.freeze)\r\n Object.freeze(emptyArray);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ emptyArray\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Utility functions.\r\n * @namespace\r\n */\r\nvar util = exports;\r\n\r\nutil.codegen = require(22);\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @memberof util\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nfunction isString(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\n\r\nutil.isString = isString;\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return Boolean(value && typeof value === 'object');\r\n};\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=a string] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Returns a promise from a node-style function.\r\n * @memberof util\r\n * @param {function(Error, ...*)} fn Function to call\r\n * @param {Object} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var args = [];\r\n for (var i = 2; i < arguments.length; ++i)\r\n args.push(arguments[i]);\r\n return new Promise(function(resolve, reject) {\r\n fn.apply(ctx, args.concat(\r\n function(err/*, varargs */) {\r\n if (err) reject(err);\r\n else resolve.apply(null, Array.prototype.slice.call(arguments, 1));\r\n }\r\n ));\r\n });\r\n}\r\n\r\nutil.asPromise = asPromise;\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {function(?Error, string=)} [callback] Node-style callback\r\n * @returns {Promise|undefined} Promise if callback has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, util, path);\r\n var fs; try { fs = require(\"fs\"); } catch (e) {} // eslint-disable-line no-empty\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", callback);\r\n var xhr = new XMLHttpRequest();\r\n function onload() {\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n if (isString(xhr.responseText))\r\n return callback(null, xhr.responseText);\r\n return callback(Error(\"request failed\"));\r\n }\r\n xhr.onreadystatechange = function() {\r\n if (xhr.readyState === 4)\r\n onload();\r\n };\r\n xhr.open(\"GET\", path, true);\r\n xhr.send();\r\n return undefined;\r\n}\r\n\r\nutil.fetch = fetch;\r\n\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @memberof util\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\nfunction isAbsolutePath(path) {\r\n return /^(?:\\/|[a-zA-Z0-9]+:)/.test(path);\r\n}\r\n\r\nutil.isAbsolutePath = isAbsolutePath;\r\n\r\n/**\r\n * Normalizes the specified path.\r\n * @memberof util\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\nfunction normalizePath(path) {\r\n path = path.replace(/\\\\/g, '/')\r\n .replace(/\\/{2,}/g, '/');\r\n var parts = path.split('/');\r\n var abs = isAbsolutePath(path);\r\n var prefix = \"\";\r\n if (abs)\r\n prefix = parts.shift() + '/';\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === '..') {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (abs)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === '.')\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join('/');\r\n}\r\n\r\nutil.normalizePath = normalizePath;\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path that was used to fetch the origin file\r\n * @param {string} importPath Import path specified in the origin file\r\n * @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the imported file\r\n */\r\nutil.resolvePath = function resolvePath(originPath, importPath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n importPath = normalizePath(importPath);\r\n if (isAbsolutePath(importPath))\r\n return importPath;\r\n if (!alreadyNormalized)\r\n originPath = normalizePath(originPath);\r\n originPath = originPath.replace(/(?:\\/|^)[^/]+$/, '');\r\n return originPath.length ? normalizePath(originPath + '/' + importPath) : importPath;\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n// Reserved words, ref: https://msdn.microsoft.com/en-us/library/ttyab5c8.aspx\r\n// var reserved = \"break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,false,finally,for,function,if,import,in,instanceof,new,null,protected,return,super,switch,this,throw,true,try,typeof,var,while,with,abstract,boolean,byte,char,decimal,double,enum,final,float,get,implements,int,interface,internal,long,package,private,protected,public,sbyte,set,short,static,uint,ulong,ushort,void,assert,ensure,event,goto,invariant,namespace,native,require,synchronized,throws,transient,use,volatile\".split(',');\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n // NOTE: While dot notation looks cleaner it doesn't seem to have a significant impact on performance.\r\n // Hence, we can safe the extra bytes from providing the reserved keywords above for pre-ES5 envs.\r\n return /* /^[a-z_$][a-z0-9_$]*$/i.test(prop) && !reserved.indexOf(prop) ? \".\" + prop : */ \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n return new (util.Buffer || typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size || 0);\r\n};\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(24));\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * Programmatically generates a function.\r\n * @memberof util\r\n * @param {...string} params Function parameter names\r\n * @returns {util.CodegenAppender} Printf-like appender function\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen(/* varargs */) {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'];\r\n\r\n var indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * Appends a printf-like formatted line to the generated source. Returned when calling {@link util.codegen}.\r\n * @typedef CodegenAppender\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} format A printf-like format string\r\n * @param {...*} params Format replacements\r\n * @returns {util.CodegenAppender} Itself\r\n * @property {util.CodegenStringer} str\r\n * @property {util.CodegenEnder} eof\r\n * @see {@link https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args}\r\n */\r\n /**/\r\n function gen() {\r\n var fmt = [];\r\n for (var i = 0; i < arguments.length; ++i)\r\n fmt[i] = arguments[i];\r\n var line = gen.fmt.apply(null, fmt);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (var index = 0; index < level; ++index)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n gen.fmt = function fmt(format) {\r\n var params = Array.prototype.slice.call(arguments, 1),\r\n index = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var param = params[index++];\r\n return $1 === \"j\"\r\n ? JSON.stringify(param)\r\n : String(param);\r\n });\r\n };\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @typedef CodegenStringer\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n */\r\n /**/\r\n gen.str = function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + args.join(\",\") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n };\r\n\r\n /**\r\n * Ends generation and builds the function.\r\n * @typedef CodegenEnder\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object|Array.} [scope] Function scope\r\n * @returns {function} A function to apply the scope manually when `scope` is an array, otherwise the generated function with scope applied\r\n */\r\n /**/\r\n gen.eof = function eof(name, scope) {\r\n if (name && typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var code = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + code.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n code = \"return \" + code;\r\n var params, values = [];\r\n if (Array.isArray(scope)) {\r\n params = scope.slice();\r\n } else if (scope) {\r\n params = Object.keys(scope);\r\n values = params.map(function(key) { return scope[key]; });\r\n } else\r\n params = [];\r\n var fn = Function.apply(null, params.concat(code)); // eslint-disable-line no-new-func\r\n return values ? fn.apply(null, values) : fn();\r\n };\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false;\r\ntry { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\n\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(21);\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nLongBits.from = function from(value) {\r\n switch (typeof value) { // eslint-disable-line default-case\r\n case 'number':\r\n return LongBits.fromNumber(value);\r\n case 'string':\r\n value = util.Long.fromString(value); // throws without a long lib\r\n }\r\n return (value.low || value.high) && new LongBits(value.low >>> 0, value.high >>> 0) || zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return new util.Long(this.lo, this.hi, unsigned);\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 & 255,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24 & 255\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n if (part2 === 0) {\r\n if (part1 === 0)\r\n return part0 < 1 << 14\r\n ? part0 < 1 << 7 ? 1 : 2\r\n : part0 < 1 << 21 ? 3 : 4;\r\n return part1 < 1 << 14\r\n ? part1 < 1 << 7 ? 5 : 6\r\n : part1 < 1 << 21 ? 7 : 8;\r\n }\r\n return part2 < 1 << 7 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nvar isNode = util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Optional buffer class to use.\r\n * If you assign any compatible buffer implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Buffer = null;\r\n\r\nif (isNode)\r\n try { util.Buffer = require(\"buffer\").Buffer; } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Optional Long class to use.\r\n * If you assign any compatible long implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || null;\r\n\r\nif (!util.Long && isNode)\r\n try { util.Long = require(\"long\"); } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? LongBits.from(value).toHash()\r\n : '\\0\\0\\0\\0\\0\\0\\0\\0';\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === 'number'\r\n ? typeof b === 'number'\r\n ? a !== b\r\n : (a = LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === 'number'\r\n ? (b = LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Runtime message verifier using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar verifier = exports;\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n util = require(21);\r\n\r\n/**\r\n * Verifies a runtime message of `this` message type.\r\n * @param {Prototype|Object} message Runtime message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n * @this {Type}\r\n */\r\nverifier.fallback = function fallback(message) {\r\n var fields = this.getFieldsArray(),\r\n i = 0;\r\n while (i < fields.length) {\r\n var field = fields[i++].resolve(),\r\n value = message[field.name];\r\n\r\n if (value === undefined) {\r\n if (field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Enum && field.resolvedType.getValuesById()[value] === undefined) {\r\n return \"invalid enum value \" + field.name + \" = \" + value + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (!value && field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n var reason;\r\n if ((reason = field.resolvedType.verify(value)) !== null)\r\n return reason;\r\n }\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\nverifier.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n var hasReasonVar = false;\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n prop = util.safeProp(field.name);\r\n if (field.required) { gen\r\n\r\n (\"if(m%s===undefined)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n } else if (field.resolvedType instanceof Enum) {\r\n var values = util.toArray(field.resolvedType.values); gen\r\n\r\n (\"switch(m%s){\", prop)\r\n (\"default:\")\r\n (\"return 'invalid enum value %s = '+m%s+' in %s'\", field.name, prop, mtype.getFullName());\r\n\r\n for (var j = 0, l = values.length; j < l; ++j) gen\r\n (\"case %d:\", values[j]); gen\r\n (\"}\");\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (field.required) gen\r\n\r\n (\"if(!m%s)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n if (!hasReasonVar) { gen(\"var r\"); hasReasonVar = true; } gen\r\n\r\n (\"if((r=types[%d].verify(m%s))!==null)\", i, prop)\r\n (\"return r\");\r\n }\r\n }\r\n return gen\r\n (\"return null\");\r\n /* eslint-enable no-unexpected-multiline */\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\n/**\r\n * Configures the writer interface according to the environment.\r\n * @memberof Writer\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n writeBytes = ArrayImpl.prototype.set && writeBytes_set || writeBytes_for;\r\n}\r\n\r\nWriter.configure = configure;\r\n\r\n/**\r\n * Constructs a new writer operation.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {*} val Value to write\r\n * @param {number} len Value byte length\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, val, len) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {?Writer.Op}\r\n */\r\n this.next = null;\r\n}\r\n\r\nWriter.Op = Op;\r\n\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * When called as a function, returns an appropriate writer for the current environment.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @exports Writer\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n if (!(this instanceof Writer))\r\n return util.Buffer && new BufferWriter() || new Writer();\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * State stack.\r\n * @type {Object[]}\r\n */\r\n this.stack = [];\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n var op = new Op(fn, val, len);\r\n this.tail.next = op;\r\n this.tail = op;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(buf, pos, val) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\n/**\r\n * Writes a tag.\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.tag = function write_tag(id, wireType) {\r\n return this.push(writeByte, 1, id << 3 | wireType & 7);\r\n};\r\n\r\nfunction writeVarint32(buf, pos, val) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value >>>= 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32(value << 1 ^ value >> 31);\r\n};\r\n\r\nfunction writeVarint64(buf, pos, val) {\r\n // tends to deoptimize. stays optimized when using bits directly.\r\n while (val.hi || val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(buf, pos, val) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24 & 255;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\nfunction writeFloat(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 23, 4);\r\n}\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nfunction writeDouble(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 52, 8);\r\n}\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes;\r\n\r\nfunction writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n}\r\n\r\nfunction writeBytes_for(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n}\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeString(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i) {\r\n var c1 = val.charCodeAt(i), c2;\r\n if (c1 < 128) {\r\n buf[pos++] = c1;\r\n } else if (c1 < 2048) {\r\n buf[pos++] = c1 >> 6 | 192;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = val.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buf[pos++] = c1 >> 18 | 240;\r\n buf[pos++] = c1 >> 12 & 63 | 128;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else {\r\n buf[pos++] = c1 >> 12 | 224;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n }\r\n }\r\n}\r\n\r\nfunction byteLength(val) {\r\n var strlen = val.length >>> 0;\r\n var len = 0;\r\n for (var i = 0; i < strlen; ++i) {\r\n var c1 = val.charCodeAt(i);\r\n if (c1 < 128)\r\n len += 1;\r\n else if (c1 < 2048)\r\n len += 2;\r\n else if ((c1 & 0xFC00) === 0xD800 && (val.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n}\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeString, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#ldelim}, {@link Writer#reset} or {@link Writer#finish} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.stack.push(new State(this));\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.stack.length) {\r\n var state = this.stack.pop();\r\n this.head = state.head;\r\n this.tail = state.tail;\r\n this.len = state.len;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @param {number} [id] Id with wire type 2 to prepend where applicable\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim(id) {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset();\r\n if (id !== undefined)\r\n this.tag(id, 2);\r\n this.uint32(len);\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of write operations and frees all resources.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = new ArrayImpl(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer writer.\r\n * @classdesc Wire format writer using node buffers.\r\n * @exports BufferWriter\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nfunction writeFloatBuffer(buf, pos, val) {\r\n buf.writeFloatLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.float = function write_float_buffer(value) {\r\n return this.push(writeFloatBuffer, 4, value);\r\n};\r\n\r\nfunction writeDoubleBuffer(buf, pos, val) {\r\n buf.writeDoubleLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.double = function write_double_buffer(value) {\r\n return this.push(writeDoubleBuffer, 8, value);\r\n};\r\n\r\nfunction writeBytesBuffer(buf, pos, val) {\r\n if (val.length)\r\n val.copy(buf, pos, 0, val.length);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytesBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeStringBuffer(buf, pos, val) {\r\n if (val.length < 40) // plain js is faster for short strings\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\t\t\r\n var len = value.length < 40\r\n ? byteLength(value)\r\n : util.Buffer.byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeStringBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.finish = function finish_buffer() {\r\n var head = this.head.next, // skip noop\r\n buf = util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(this.len) || new util.Buffer(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @param {function(?Error, Root=)} [callback] Callback function\r\n * @returns {Promise|Object} A promise if callback has been omitted, otherwise the protobuf namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === 'function') {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback) || protobuf;\r\n}\r\n\r\nprotobuf.load = load;\r\n\r\n// Parser\r\nprotobuf.tokenize = require(\"./tokenize\");\r\nprotobuf.parse = require(\"./parse\");\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = protobuf.Writer.BufferWriter;\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = protobuf.Reader.BufferReader;\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Prototype = require(\"./prototype\");\r\nprotobuf.inherits = require(\"./inherits\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.common = require(\"./common\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\r\n/* eslint-disable no-undef */\r\nif (typeof define === 'function' && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n protobuf.Reader.configure();\r\n protobuf.Writer.configure();\r\n }\r\n return protobuf;\r\n });\r\n/* eslint-enable no-undef */\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/protobuf.min.js b/dist/protobuf.min.js index 08748ccce..7a7561b01 100644 --- a/dist/protobuf.min.js +++ b/dist/protobuf.min.js @@ -1,9 +1,9 @@ /*! * protobuf.js v6.0.1 (c) 2016 Daniel Wirtz - * Compiled Sun, 04 Dec 2016 12:05:15 UTC + * Compiled Sun, 04 Dec 2016 13:14:24 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ -!function e(t,i,n){function r(o,u){if(!i[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var h=i[o]={exports:{}};t[o][0].call(h.exports,function(e){var i=t[o][1][e];return r(i?i:e)},h,h.exports,e,t,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o>1,h=-7,l=i?0:r-1,c=i?1:-1,d=e[t+l];for(l+=c,s=d&(1<<-h)-1,d>>=-h,h+=u;h>0;s=256*s+e[t+l],l+=c,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=c,h-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,n),s-=f}return(d?-1:1)*o*Math.pow(2,s-n)},i.write=function(e,t,i,n,r,s){var o,u,a,f=8*s-r-1,h=(1<>1,c=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?s-1:0,p=n?-1:1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),t+=o+l>=1?c/a:c*Math.pow(2,1-l),t*a>=2&&(o++,a/=2),o+l>=h?(u=0,o=h):o+l>=1?(u=(t*a-1)*Math.pow(2,r),o+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,r),o=0));r>=8;e[i+d]=255&u,d+=p,u/=256,r-=8);for(o=o<0;e[i+d]=255&o,d+=p,o/=256,f-=8);e[i+d-p]|=128*v}},{}],2:[function(e,t,i){"use strict";function n(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}t.exports=n,n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var r;n("duration",{Duration:r={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:r}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}})},{}],3:[function(e,t,i){"use strict";var n=i,r=e(5),s=e(15),o=e(20),u=e(21);n.fallback=function(e,t){for(var i=this.getFieldsById(),e=e instanceof s?e:s(e),n=void 0===t?e.len:e.pos+t,a=new(this.getCtor());e.pos0;){var r=e.shift();if(i.nested&&i.nested[r]){if(i=i.nested[r],!(i instanceof n))throw Error("path conflicts with non-namespace objects")}else i.add(i=new n(r))}return t&&i.addJSON(t),i},u.resolveAll=function(){for(var e=this.getNestedArray(),t=0;t-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e),r(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{11:11,21:21,6:6}],13:[function(e,t,i){"use strict";function n(e){return null===e?null:e.toLowerCase()}function r(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function s(e,t){function i(e,t){return Error("illegal "+(t||"token")+" '"+e+"' (line "+ne.line()+j)}function s(){var e,t=[];do{if((e=re())!==F&&e!==J)throw i(e);t.push(re()),ue(e),e=oe()}while(e===F||e===J);return t.join("")}function q(e){var t=re();switch(n(t)){case J:case F:return se(t),s();case"true":return!0;case"false":return!1}try{return V(t)}catch(n){if(e&&g.test(t))return t;throw i(t,"value")}}function B(){var e=L(re()),t=e;return ue("to",!0)&&(t=L(re())),ue(E),[e,t]}function V(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=n(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw i(e,"number")}function L(e,t){var r=n(e);switch(r){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw i(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw i(e,"id")}function z(){if(void 0!==Y)throw i("package");if(Y=re(),!g.test(Y))throw i(Y,x);le=le.define(Y),ue(E)}function R(){var e,t=oe();switch(t){case"weak":e=te||(te=[]),re();break;case"public":re();default:e=ee||(ee=[])}t=s(),ue(E),e.push(t)}function P(){ue("="),ie=n(s());var e;if(["proto2",e="proto3"].indexOf(ie)<0)throw i(ie,"syntax");fe=ie===e,ue(E)}function $(e,t){switch(t){case O:return K(e,t),ue(E),!0;case"message":return I(e,t),!0;case"enum":return U(e,t),!0;case"service":return G(e,t),!0;case"extend":return Q(e,t),!0}return!1}function I(e,t){var r=re();if(!y.test(r))throw i(r,"type name");var s=new a(r);if(ue(T,!0)){for(;(t=re())!==S;){var o=n(t);if(!$(s,t))switch(o){case"map":M(s,o);break;case w:case k:case b:C(s,o);break;case"oneof":D(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(B(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(B(s,o));break;default:if(!fe||!g.test(t))throw i(t);se(t),C(s,k)}}ue(E,!0)}else ue(E);e.add(s)}function C(e,t,n){var s=re();if(!g.test(s))throw i(s,N);var o=re();if(!y.test(o))throw i(o,x);o=r(o),ue("=");var u=L(re()),a=Z(new f(o,u,s,t,n));a.repeated&&a.setOption("packed",fe,!0),e.add(a)}function M(e){ue("<");var t=re();if(void 0===v.mapKey[t])throw i(t,N);ue(",");var n=re();if(!g.test(n))throw i(n,N);ue(">");var s=re();if(!y.test(s))throw i(s,x);s=r(s),ue("=");var o=L(re()),u=Z(new h(s,o,t,n));e.add(u)}function D(e,t){var n=re();if(!y.test(n))throw i(n,x);n=r(n);var s=new l(n);if(ue(T,!0)){for(;(t=re())!==S;)t===O?(K(s,t),ue(E)):(se(t),C(s,k));ue(E,!0)}else ue(E);e.add(s)}function U(e,t){var r=re();if(!y.test(r))throw i(r,x);var s={},o=new c(r,s);if(ue(T,!0)){for(;(t=re())!==S;)n(t)===O?K(o):_(o,t);ue(E,!0)}else ue(E);e.add(o)}function _(e,t){if(!y.test(t))throw i(t,x);var n=t;ue("=");var r=L(re(),!0);e.values[n]=r,Z({})}function K(e,t){var n=ue(A,!0),r=re();if(!g.test(r))throw i(r,x);n&&(ue(j),r=A+r+j,t=oe(),m.test(t)&&(r+=t,re())),ue("="),H(e,r)}function H(e,t){if(ue(T,!0)){for(;(he=re())!==S;){if(!y.test(he))throw i(he,x);t=t+"."+he,ue(":",!0)?W(e,t,q(!0)):H(e,t)}ue(E,!0)}else W(e,t,q(!0))}function W(e,t,i){e.setOption?e.setOption(t,i):e[t]=i}function Z(e){if(ue("[",!0)){do K(e,O);while(ue(",",!0));ue("]")}return ue(E),e}function G(e,t){if(t=re(),!y.test(t))throw i(t,"service name");var r=t,s=new d(r);if(ue(T,!0)){for(;(t=re())!==S;){var o=n(t);switch(o){case O:K(s,o),ue(E);break;case"rpc":X(s,o);break;default:throw i(t)}}ue(E,!0)}else ue(E);e.add(s)}function X(e,t){var r=t,s=re();if(!y.test(s))throw i(s,x);var o,u,a,f;ue(A);var h;if(ue(h="stream",!0)&&(u=!0),!g.test(t=re()))throw i(t);if(o=t,ue(j),ue("returns"),ue(A),ue(h,!0)&&(f=!0),!g.test(t=re()))throw i(t);a=t,ue(j);var l=new p(s,r,o,a,u,f);if(ue(T,!0)){for(;(t=re())!==S;){var c=n(t);switch(c){case O:K(l,c),ue(E);break;default:throw i(t)}}ue(E,!0)}else ue(E);e.add(l)}function Q(e,t){var r=re();if(!g.test(r))throw i(r,"reference");if(ue(T,!0)){for(;(t=re())!==S;){var s=n(t);switch(s){case w:case b:case k:C(e,s,r);break;default:if(!fe||!g.test(t))throw i(t);se(t),C(e,k,r)}}ue(E,!0)}else ue(E)}t||(t=new u);var Y,ee,te,ie,ne=o(e),re=ne.next,se=ne.push,oe=ne.peek,ue=ne.skip,ae=!0,fe=!1;t||(t=new u);for(var he,le=t;null!==(he=re());){var ce=n(he);switch(ce){case"package":if(!ae)throw i(he);z();break;case"import":if(!ae)throw i(he);R();break;case"syntax":if(!ae)throw i(he);P();break;case O:if(!ae)throw i(he);K(le,he),ue(E);break;default:if($(le,he)){ae=!1;continue}throw i(he)}}return{package:Y,imports:ee,weakImports:te,syntax:ie,root:t}}t.exports=s;var o=e(18),u=e(16),a=e(19),f=e(6),h=e(8),l=e(12),c=e(5),d=e(17),p=e(9),v=e(20),y=/^[a-zA-Z_][a-zA-Z_0-9]*$/,g=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,m=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,w="required",b="repeated",k="optional",O="option",x="name",N="type",T="{",S="}",A="(",j=")",E=";",F='"',J="'"},{12:12,16:16,17:17,18:18,19:19,20:20,5:5,6:6,8:8,9:9}],14:[function(e,t,i){"use strict";function n(e,t){if(e)for(var i=!(t&&t.fieldsOnly),n=this.constructor.$type.fields,r=Object.keys(e),s=0;s "+e.len)}function r(){b="undefined"!=typeof Uint8Array?Uint8Array:Array,N.h=b.prototype.slice||b.prototype.subarray,k.Long?(N.int64=a,N.uint64=h,N.sint64=c,N.fixed64=v,N.sfixed64=g):(N.int64=f,N.uint64=l,N.sint64=d,N.fixed64=y,N.sfixed64=m)}function s(e){return this instanceof s?(this.buf=e,this.pos=0,void(this.len=e.length)):k.Buffer&&(!e||k.Buffer.isBuffer(e))&&new w(e)||new s(e)}function o(e,t){this.id=e,this.wireType=t}function u(){var e=0,t=0,i=0,r=0;if(this.len-this.pos>9){for(i=0;i<4;++i)if(r=this.buf[this.pos++],e|=(127&r)<<7*i,r<128)return new x(e>>>0,t>>>0);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new x(e>>>0,t>>>0);for(i=0;i<5;++i)if(r=this.buf[this.pos++],t|=(127&r)<<7*i+3,r<128)return new x(e>>>0,t>>>0)}else{for(i=0;i<4;++i){if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],e|=(127&r)<<7*i,r<128)return new x(e>>>0,t>>>0)}if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new x(e>>>0,t>>>0);for(i=0;i<5;++i){if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],t|=(127&r)<<7*i+3,r<128)return new x(e>>>0,t>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function h(){return u.call(this).toLong(!0)}function l(){return u.call(this).toNumber(!0)}function c(){return u.call(this).zzDecode().toLong()}function d(){return u.call(this).zzDecode().toNumber()}function p(){if(this.pos+8>this.len)throw n(this,8);return new x((this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0,(this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0)}function v(){return p.call(this).toLong(!0)}function y(){return p.call(this).toNumber(!0)}function g(){return p.call(this).zzDecode().toLong()}function m(){return p.call(this).zzDecode().toNumber()}function w(e){T&&T(),s.call(this,e)}t.exports=s,s.BufferReader=w;var b,k=e(24),O=e(1),x=k.LongBits;s.configure=r;var N=s.prototype;N.tag=function(){if(this.pos>=this.len)throw n(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},N.int32=function(){var e=0,t=0,i=0;do{if(this.pos>=this.len)throw n(this);i=this.buf[this.pos++],t<32&&(e|=(127&i)<>>0},N.sint32=function(){var e=this.int32();return e>>>1^-(1&e)},N.bool=function(){return 0!==this.int32()},N.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return this.pos+=4,this.buf[this.pos-4]|this.buf[this.pos-3]<<8|this.buf[this.pos-2]<<16|this.buf[this.pos-1]<<24},N.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)},N.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=O.read(this.buf,this.pos,!1,23,4);return this.pos+=4,e},N.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=O.read(this.buf,this.pos,!1,52,8);return this.pos+=8,e},N.bytes=function(){var e=this.int32()>>>0,t=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this.h.call(this.buf,t,i)},N.string=function(){var e=this.bytes(),t=e.length;if(t){for(var i=new Array(t),n=0,r=0;n191&&s<224)i[r++]=(31&s)<<6|63&e[n++];else if(s>239&&s<365){var o=((7&s)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;i[r++]=55296+(o>>10),i[r++]=56320+(1023&o)}else i[r++]=(15&s)<<12|(63&e[n++])<<6|63&e[n++]}return String.fromCharCode.apply(String,i.slice(0,r))}return""},N.skip=function(e){if(void 0===e){do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++])}else{if(this.pos+e>this.len)throw n(this,e);this.pos+=e}return this},N.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var t=this.tag();if(4===t.wireType)break;this.skipType(t.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+e)}return this},N.reset=function(e){return e?(this.buf=e,this.len=e.length):(this.buf=null,this.len=0),this.pos=0,this},N.finish=function(e){var t=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(e),t};var T=function(){if(!k.Buffer)throw Error("Buffer is not supported");S.h=k.Buffer.prototype.slice,T=!1},S=w.prototype=Object.create(s.prototype);S.constructor=w,S.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,e},S.double=function(){if(this.pos+8>this.len)throw n(this,8);var e=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,e},S.string=function(){var e=this.int32()>>>0,t=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);return this.pos+=e,this.buf.toString("utf8",t,i)},S.finish=function(e){var t=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(e),t},r()},{1:1,24:24}],16:[function(e,t,i){"use strict";function n(e){s.call(this,"",e),this.deferred=[],this.files=[]}function r(e){var t=e.parent.lookup(e.extend);if(t){var i=new u(e.getFullName(),e.id,e.type,e.rule,(void 0),e.options);return i.declaringField=e,e.extensionField=i,t.add(i),!0}return!1}t.exports=n;var s=e(10),o=s.extend(n),u=e(6),a=e(21),f=e(2);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},o.resolvePath=a.resolvePath,o.load=function t(i,n){function r(e,t){if(n){var i=n;n=null,i(e,t)}}function s(t,i){try{if(a.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),a.isString(i)){var n=e(13)(i,u);n.imports&&n.imports.forEach(function(e){o(u.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){o(u.resolvePath(t,e),!0)})}else u.setOptions(i.options).addJSON(i.nested)}catch(e){return void r(e)}h||r(null,u)}function o(e,t){var i=e.indexOf("google/protobuf/");if(i>-1){var o=e.substring(i);o in f&&(e=o)}if(!(u.files.indexOf(e)>-1)){if(u.files.push(e),e in f)return++h,void setTimeout(function(){--h,s(e,f[e])});++h,a.fetch(e,function(i,o){if(--h,n)return i?void(t||r(i)):void s(e,o)})}}var u=this;if(!n)return a.asPromise(t,u,i);var h=0;a.isString(i)&&(i=[i]),i.forEach(function(e){o(u.resolvePath("",e))}),h||r(null)},o.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var i=0;i-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof s)for(var i=e.getNestedArray(),n=0;n0)return m.shift();if(w)return i();var n,o,u;do{if(v===y)return null;for(n=!1;/\s/.test(u=r(v));)if(u===a&&++g,++v===y)return null;if(r(v)===f){if(++v===y)throw t("comment");if(r(v)===f){for(;r(++v)!==a;)if(v===y)return null;++v,++g,n=!0}else{if((u=r(v))!==h)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=r(v)}while(o!==h||u!==f);++v,n=!0}}}while(n);if(v===y)return null;var l=v;s.lastIndex=0;var c=s.test(r(l++));if(!c)for(;l]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",h="*"},{}],19:[function(e,t,i){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.j=null,this.k=null,this.l=null,this.m=null}function r(e){return e.j=e.k=e.l=e.m=null,delete e.encode,delete e.decode,e}t.exports=n;var s=e(10),o=s.prototype,u=s.extend(n),a=e(5),f=e(12),h=e(6),l=e(17),c=e(14),d=e(15),p=e(26),v=e(4),y=e(3),g=e(25),m=e(7),w=e(21),b=w.codegen;Object.defineProperties(u,{fieldsById:{get:u.getFieldsById=function(){if(this.j)return this.j;this.j={};for(var e=Object.keys(this.fields),t=0;t0?t.splice(--r,2):i?t.splice(r,1):++r:"."===t[r]?t.splice(r,1):++r;return n+t.join("/")}var a=i;a.codegen=e(22),a.isString=n,a.isObject=function(e){return Boolean(e&&"object"==typeof e)},a.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},a.toArray=function(e){if(!e)return[];for(var t=Object.keys(e),i=t.length,n=new Array(i),r=0;r ").replace(/\t/g," ")),r="return "+r;var s,o=[];Array.isArray(i)?s=i.slice():i?(s=Object.keys(i),o=s.map(function(e){return i[e]})):s=[];var u=Function.apply(null,s.concat(r));return o?u.apply(null,o):u()},e}t.exports=n;var r=/[{[]$/,s=/^[}\]]/,o=/:$/,u=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue);?$|^\s*return\b/;n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],23:[function(e,t,i){"use strict";function n(e,t){this.lo=e,this.hi=t}t.exports=n;var r=e(21),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1},n.fromNumber=function(e){if(0===e)return o;var t=e<0;e=Math.abs(e);var i=e>>>0,r=(e-i)/4294967296>>>0;return t&&(r=~r>>>0,i=~i>>>0,++i>4294967295&&(i=0,++r>4294967295&&(r=0))),new n(i,r)},n.from=function(e){switch(typeof e){case"number":return n.fromNumber(e);case"string":e=r.Long.fromString(e)}return(e.low||e.high)&&new n(e.low>>>0,e.high>>>0)||o},s.toNumber=function(e){return!e&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(e){return new r.Long(this.lo,this.hi,e)};var u=String.prototype.charCodeAt;n.fromHash=function(e){return new n((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24&255,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24&255)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<1<<21?3:4:t<16384?t<128?5:6:t<1<<21?7:8:i<128?9:10}},{21:21}],24:[function(e,t,i){(function(t){"use strict";var n=i,r=n.LongBits=e(23),s=n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node);if(n.Buffer=null,s)try{n.Buffer=e("buffer").Buffer}catch(e){}if(n.Long=t.dcodeIO&&t.dcodeIO.Long||null,!n.Long&&s)try{n.Long=e("long")}catch(e){}n.longToHash=function(e){return e?r.from(e).toHash():"\0\0\0\0\0\0\0\0"},n.longFromHash=function(e,t){var i=r.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.longNeq=function(e,t){return"number"==typeof e?"number"==typeof t?e!==t:(e=r.fromNumber(e)).lo!==t.low||e.hi!==t.high:"number"==typeof t?(t=r.fromNumber(t)).lo!==e.low||t.hi!==e.high:e.low!==t.low||e.high!==t.high}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{23:23,buffer:"buffer",long:"long"}],25:[function(e,t,i){"use strict";var n=i,r=e(5),s=e(19),o=e(21);n.fallback=function(e){for(var t=this.getFieldsArray(),i=0;i127;)e[t++]=127&i|128,i>>>=7;e[t]=i}function h(e,t,i){for(;i.hi||i.lo>127;)e[t++]=127&i.lo|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;e[t++]=i.lo}function l(e,t,i){e[t++]=255&i,e[t++]=i>>>8&255,e[t++]=i>>>16&255,e[t]=i>>>24&255}function c(e,t,i){T.write(e,i,t,!1,23,4)}function d(e,t,i){T.write(e,i,t,!1,52,8)}function p(e,t,i){e.set(i,t)}function v(e,t,i){for(var n=0;n>6|192,e[t++]=63&s|128):55296===(64512&s)&&56320===(64512&(r=i.charCodeAt(n+1)))?(s=65536+((1023&s)<<10)+(1023&r),++n,e[t++]=s>>18|240,e[t++]=s>>12&63|128,e[t++]=s>>6&63|128,e[t++]=63&s|128):(e[t++]=s>>12|224,e[t++]=s>>6&63|128,e[t++]=63&s|128)}}function g(e){for(var t=e.length>>>0,i=0,n=0;n>>=0,this.push(f,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},A.int32=function(e){return e<0?this.push(h,10,S.fromNumber(e)):this.uint32(e)},A.sint32=function(e){return this.uint32(e<<1^e>>31)},A.uint64=function(e){var t=S.from(e);return this.push(h,t.length(),t)},A.int64=A.uint64,A.sint64=function(e){var t=S.from(e).zzEncode();return this.push(h,t.length(),t)},A.bool=function(e){return this.push(a,1,e?1:0)},A.fixed32=function(e){return this.push(l,4,e>>>0)},A.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},A.fixed64=function(e){var t=S.from(e);return this.push(l,4,t.hi).push(l,4,t.lo)},A.sfixed64=function(e){var t=S.from(e).zzEncode();return this.push(l,4,t.hi).push(l,4,t.lo)},A.float=function(e){return this.push(c,4,e)},A.double=function(e){return this.push(d,8,e)};var j;A.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(j,t,e):this.push(a,1,0)},A.string=function(e){var t=g(e);return t?this.uint32(t).push(y,t,e):this.push(a,1,0)},A.fork=function(){return this.stack.push(new o(this)),this.head=this.tail=new r(s,0,0),this.len=0,this},A.reset=function(){if(this.stack.length){var e=this.stack.pop();this.head=e.head,this.tail=e.tail,this.len=e.len}else this.head=this.tail=new r(s,0,0),this.len=0;return this},A.ldelim=function(e){var t=this.head,i=this.tail,n=this.len;return this.reset(),void 0!==e&&this.tag(e,2),this.uint32(n),this.tail.next=t.next,this.tail=i,this.len+=n,this},A.finish=function(){var e=this.head.next,t=new x(this.len),i=0;for(this.reset();e;)e.fn(t,i,e.val),i+=e.len,e=e.next;return t};var E=m.prototype=Object.create(u.prototype);E.constructor=m,E.float=function(e){return this.push(w,4,e)},E.double=function(e){return this.push(b,8,e)},E.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(k,t,e):this.push(a,1,0)},E.string=function(e){var t=e.length<40?g(e):N.Buffer.byteLength(e);return t?this.uint32(t).push(O,t,e):this.push(a,1,0)},E.finish=function(){var e=this.head.next,t=N.Buffer.allocUnsafe&&N.Buffer.allocUnsafe(this.len)||new N.Buffer(this.len),i=0;for(this.reset();e;)e.fn(t,i,e.val),i+=e.len,e=e.next;return t},n()},{1:1,24:24}],27:[function(e,t,i){(function(t){"use strict";function n(e,t,i){return"function"==typeof t?(i=t,t=new r.Root):t||(t=new r.Root),t.load(e,i)||r}var r=t.protobuf=i;r.load=n,r.tokenize=e(18),r.parse=e(13),r.Writer=e(26),r.BufferWriter=r.Writer.BufferWriter,r.Reader=e(15),r.BufferReader=r.Reader.BufferReader,r.encoder=e(4),r.decoder=e(3),r.verifier=e(25),r.ReflectionObject=e(11),r.Namespace=e(10),r.Root=e(16),r.Enum=e(5),r.Type=e(19),r.Field=e(6),r.OneOf=e(12),r.MapField=e(8),r.Service=e(17),r.Method=e(9),r.Prototype=e(14),r.inherits=e(7),r.types=e(20),r.common=e(2),r.util=e(21),"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(r.util.Long=e,r.Reader.configure(),r.Writer.configure()),r})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,2:2,20:20,21:21,25:25,26:26,3:3,4:4,5:5,6:6,7:7,8:8,9:9}]},{},[27]); +!function e(t,i,n){function r(o,u){if(!i[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var h=i[o]={exports:{}};t[o][0].call(h.exports,function(e){var i=t[o][1][e];return r(i?i:e)},h,h.exports,e,t,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o>1,h=-7,l=i?0:r-1,c=i?1:-1,d=e[t+l];for(l+=c,s=d&(1<<-h)-1,d>>=-h,h+=u;h>0;s=256*s+e[t+l],l+=c,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=256*o+e[t+l],l+=c,h-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,n),s-=f}return(d?-1:1)*o*Math.pow(2,s-n)},i.write=function(e,t,i,n,r,s){var o,u,a,f=8*s-r-1,h=(1<>1,c=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?s-1:0,p=n?-1:1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),t+=o+l>=1?c/a:c*Math.pow(2,1-l),t*a>=2&&(o++,a/=2),o+l>=h?(u=0,o=h):o+l>=1?(u=(t*a-1)*Math.pow(2,r),o+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,r),o=0));r>=8;e[i+d]=255&u,d+=p,u/=256,r-=8);for(o=o<0;e[i+d]=255&o,d+=p,o/=256,f-=8);e[i+d-p]|=128*v}},{}],2:[function(e,t,i){"use strict";function n(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}t.exports=n,n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var r;n("duration",{Duration:r={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:r}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}})},{}],3:[function(e,t,i){"use strict";var n=i,r=e(5),s=e(15),o=e(20),u=e(21);n.fallback=function(e,t){for(var i=this.getFieldsById(),e=e instanceof s?e:s(e),n=void 0===t?e.len:e.pos+t,a=new(this.getCtor());e.pos0;){var r=e.shift();if(i.nested&&i.nested[r]){if(i=i.nested[r],!(i instanceof n))throw Error("path conflicts with non-namespace objects")}else i.add(i=new n(r))}return t&&i.addJSON(t),i},u.resolveAll=function(){for(var e=this.getNestedArray(),t=0;t-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e),r(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{11:11,21:21,6:6}],13:[function(e,t,i){"use strict";function n(e){return null===e?null:e.toLowerCase()}function r(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function s(e,t){function i(e,t){return Error("illegal "+(t||"token")+" '"+e+"' (line "+ne.line()+j)}function s(){var e,t=[];do{if((e=re())!==F&&e!==J)throw i(e);t.push(re()),ue(e),e=oe()}while(e===F||e===J);return t.join("")}function q(e){var t=re();switch(n(t)){case J:case F:return se(t),s();case"true":return!0;case"false":return!1}try{return V(t)}catch(n){if(e&&y.test(t))return t;throw i(t,"value")}}function B(){var e=L(re()),t=e;return ue("to",!0)&&(t=L(re())),ue(E),[e,t]}function V(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=n(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw i(e,"number")}function L(e,t){var r=n(e);switch(r){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw i(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw i(e,"id")}function z(){if(void 0!==Y)throw i("package");if(Y=re(),!y.test(Y))throw i(Y,x);le=le.define(Y),ue(E)}function R(){var e,t=oe();switch(t){case"weak":e=te||(te=[]),re();break;case"public":re();default:e=ee||(ee=[])}t=s(),ue(E),e.push(t)}function P(){ue("="),ie=n(s());var e;if(["proto2",e="proto3"].indexOf(ie)<0)throw i(ie,"syntax");fe=ie===e,ue(E)}function $(e,t){switch(t){case O:return K(e,t),ue(E),!0;case"message":return I(e,t),!0;case"enum":return U(e,t),!0;case"service":return G(e,t),!0;case"extend":return Q(e,t),!0}return!1}function I(e,t){var r=re();if(!g.test(r))throw i(r,"type name");var s=new a(r);if(ue(T,!0)){for(;(t=re())!==S;){var o=n(t);if(!$(s,t))switch(o){case"map":M(s,o);break;case w:case k:case b:C(s,o);break;case"oneof":D(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(B(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(B(s,o));break;default:if(!fe||!y.test(t))throw i(t);se(t),C(s,k)}}ue(E,!0)}else ue(E);e.add(s)}function C(e,t,n){var s=re();if(!y.test(s))throw i(s,N);var o=re();if(!g.test(o))throw i(o,x);o=r(o),ue("=");var u=L(re()),a=Z(new f(o,u,s,t,n));a.repeated&&a.setOption("packed",fe,!0),e.add(a)}function M(e){ue("<");var t=re();if(void 0===v.mapKey[t])throw i(t,N);ue(",");var n=re();if(!y.test(n))throw i(n,N);ue(">");var s=re();if(!g.test(s))throw i(s,x);s=r(s),ue("=");var o=L(re()),u=Z(new h(s,o,t,n));e.add(u)}function D(e,t){var n=re();if(!g.test(n))throw i(n,x);n=r(n);var s=new l(n);if(ue(T,!0)){for(;(t=re())!==S;)t===O?(K(s,t),ue(E)):(se(t),C(s,k));ue(E,!0)}else ue(E);e.add(s)}function U(e,t){var r=re();if(!g.test(r))throw i(r,x);var s={},o=new c(r,s);if(ue(T,!0)){for(;(t=re())!==S;)n(t)===O?K(o):_(o,t);ue(E,!0)}else ue(E);e.add(o)}function _(e,t){if(!g.test(t))throw i(t,x);var n=t;ue("=");var r=L(re(),!0);e.values[n]=r,Z({})}function K(e,t){var n=ue(A,!0),r=re();if(!y.test(r))throw i(r,x);n&&(ue(j),r=A+r+j,t=oe(),m.test(t)&&(r+=t,re())),ue("="),H(e,r)}function H(e,t){if(ue(T,!0)){for(;(he=re())!==S;){if(!g.test(he))throw i(he,x);t=t+"."+he,ue(":",!0)?W(e,t,q(!0)):H(e,t)}ue(E,!0)}else W(e,t,q(!0))}function W(e,t,i){e.setOption?e.setOption(t,i):e[t]=i}function Z(e){if(ue("[",!0)){do K(e,O);while(ue(",",!0));ue("]")}return ue(E),e}function G(e,t){if(t=re(),!g.test(t))throw i(t,"service name");var r=t,s=new d(r);if(ue(T,!0)){for(;(t=re())!==S;){var o=n(t);switch(o){case O:K(s,o),ue(E);break;case"rpc":X(s,o);break;default:throw i(t)}}ue(E,!0)}else ue(E);e.add(s)}function X(e,t){var r=t,s=re();if(!g.test(s))throw i(s,x);var o,u,a,f;ue(A);var h;if(ue(h="stream",!0)&&(u=!0),!y.test(t=re()))throw i(t);if(o=t,ue(j),ue("returns"),ue(A),ue(h,!0)&&(f=!0),!y.test(t=re()))throw i(t);a=t,ue(j);var l=new p(s,r,o,a,u,f);if(ue(T,!0)){for(;(t=re())!==S;){var c=n(t);switch(c){case O:K(l,c),ue(E);break;default:throw i(t)}}ue(E,!0)}else ue(E);e.add(l)}function Q(e,t){var r=re();if(!y.test(r))throw i(r,"reference");if(ue(T,!0)){for(;(t=re())!==S;){var s=n(t);switch(s){case w:case b:case k:C(e,s,r);break;default:if(!fe||!y.test(t))throw i(t);se(t),C(e,k,r)}}ue(E,!0)}else ue(E)}t||(t=new u);var Y,ee,te,ie,ne=o(e),re=ne.next,se=ne.push,oe=ne.peek,ue=ne.skip,ae=!0,fe=!1;t||(t=new u);for(var he,le=t;null!==(he=re());){var ce=n(he);switch(ce){case"package":if(!ae)throw i(he);z();break;case"import":if(!ae)throw i(he);R();break;case"syntax":if(!ae)throw i(he);P();break;case O:if(!ae)throw i(he);K(le,he),ue(E);break;default:if($(le,he)){ae=!1;continue}throw i(he)}}return{package:Y,imports:ee,weakImports:te,syntax:ie,root:t}}t.exports=s;var o=e(18),u=e(16),a=e(19),f=e(6),h=e(8),l=e(12),c=e(5),d=e(17),p=e(9),v=e(20),g=/^[a-zA-Z_][a-zA-Z_0-9]*$/,y=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,m=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,w="required",b="repeated",k="optional",O="option",x="name",N="type",T="{",S="}",A="(",j=")",E=";",F='"',J="'"},{12:12,16:16,17:17,18:18,19:19,20:20,5:5,6:6,8:8,9:9}],14:[function(e,t,i){"use strict";function n(e,t){if(e)for(var i=!(t&&t.fieldsOnly),n=this.constructor.$type.fields,r=Object.keys(e),s=0;s "+e.len)}function r(){b="undefined"!=typeof Uint8Array?Uint8Array:Array,N.h=b.prototype.slice||b.prototype.subarray,k.Long?(N.int64=a,N.uint64=h,N.sint64=c,N.fixed64=v,N.sfixed64=y):(N.int64=f,N.uint64=l,N.sint64=d,N.fixed64=g,N.sfixed64=m)}function s(e){return this instanceof s?(this.buf=e,this.pos=0,void(this.len=e.length)):k.Buffer&&(!e||k.Buffer.isBuffer(e))&&new w(e)||new s(e)}function o(e,t){this.id=e,this.wireType=t}function u(){var e=0,t=0,i=0,r=0;if(this.len-this.pos>9){for(i=0;i<4;++i)if(r=this.buf[this.pos++],e|=(127&r)<<7*i,r<128)return new x(e>>>0,t>>>0);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new x(e>>>0,t>>>0);for(i=0;i<5;++i)if(r=this.buf[this.pos++],t|=(127&r)<<7*i+3,r<128)return new x(e>>>0,t>>>0)}else{for(i=0;i<4;++i){if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],e|=(127&r)<<7*i,r<128)return new x(e>>>0,t>>>0)}if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new x(e>>>0,t>>>0);for(i=0;i<5;++i){if(this.pos>=this.len)throw n(this);if(r=this.buf[this.pos++],t|=(127&r)<<7*i+3,r<128)return new x(e>>>0,t>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function h(){return u.call(this).toLong(!0)}function l(){return u.call(this).toNumber(!0)}function c(){return u.call(this).zzDecode().toLong()}function d(){return u.call(this).zzDecode().toNumber()}function p(){if(this.pos+8>this.len)throw n(this,8);return new x((this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0,(this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0)}function v(){return p.call(this).toLong(!0)}function g(){return p.call(this).toNumber(!0)}function y(){return p.call(this).zzDecode().toLong()}function m(){return p.call(this).zzDecode().toNumber()}function w(e){T&&T(),s.call(this,e)}t.exports=s,s.BufferReader=w;var b,k=e(24),O=e(1),x=k.LongBits;s.configure=r;var N=s.prototype;N.tag=function(){if(this.pos>=this.len)throw n(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},N.int32=function(){var e=0,t=0,i=0;do{if(this.pos>=this.len)throw n(this);i=this.buf[this.pos++],t<32&&(e|=(127&i)<>>0},N.sint32=function(){var e=this.int32();return e>>>1^-(1&e)},N.bool=function(){return 0!==this.int32()},N.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return this.pos+=4,this.buf[this.pos-4]|this.buf[this.pos-3]<<8|this.buf[this.pos-2]<<16|this.buf[this.pos-1]<<24},N.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)},N.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=O.read(this.buf,this.pos,!1,23,4);return this.pos+=4,e},N.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=O.read(this.buf,this.pos,!1,52,8);return this.pos+=8,e},N.bytes=function(){var e=this.int32()>>>0,t=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this.h.call(this.buf,t,i)},N.string=function(){var e=this.bytes(),t=e.length;if(t){for(var i=new Array(t),n=0,r=0;n191&&s<224)i[r++]=(31&s)<<6|63&e[n++];else if(s>239&&s<365){var o=((7&s)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;i[r++]=55296+(o>>10),i[r++]=56320+(1023&o)}else i[r++]=(15&s)<<12|(63&e[n++])<<6|63&e[n++]}return String.fromCharCode.apply(String,i.slice(0,r))}return""},N.skip=function(e){if(void 0===e){do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++])}else{if(this.pos+e>this.len)throw n(this,e);this.pos+=e}return this},N.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var t=this.tag();if(4===t.wireType)break;this.skipType(t.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+e)}return this},N.reset=function(e){return e?(this.buf=e,this.len=e.length):(this.buf=null,this.len=0),this.pos=0,this},N.finish=function(e){var t=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(e),t};var T=function(){if(!k.Buffer)throw Error("Buffer is not supported");S.h=k.Buffer.prototype.slice,T=!1},S=w.prototype=Object.create(s.prototype);S.constructor=w,S.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,e},S.double=function(){if(this.pos+8>this.len)throw n(this,8);var e=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,e},S.string=function(){var e=this.int32()>>>0,t=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);return this.pos+=e,this.buf.toString("utf8",t,i)},S.finish=function(e){var t=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(e),t},r()},{1:1,24:24}],16:[function(e,t,i){"use strict";function n(e){s.call(this,"",e),this.deferred=[],this.files=[]}function r(e){var t=e.parent.lookup(e.extend);if(t){var i=new u(e.getFullName(),e.id,e.type,e.rule,(void 0),e.options);return i.declaringField=e,e.extensionField=i,t.add(i),!0}return!1}t.exports=n;var s=e(10),o=s.extend(n),u=e(6),a=e(21),f=e(2);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},o.resolvePath=a.resolvePath,o.load=function t(i,n){function r(e,t){if(n){var i=n;n=null,i(e,t)}}function s(t,i){try{if(a.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),a.isString(i)){var n=e(13)(i,u);n.imports&&n.imports.forEach(function(e){o(u.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){o(u.resolvePath(t,e),!0)})}else u.setOptions(i.options).addJSON(i.nested)}catch(e){return void r(e)}h||r(null,u)}function o(e,t){var i=e.indexOf("google/protobuf/");if(i>-1){var o=e.substring(i);o in f&&(e=o)}if(!(u.files.indexOf(e)>-1)){if(u.files.push(e),e in f)return++h,void setTimeout(function(){--h,s(e,f[e])});++h,a.fetch(e,function(i,o){if(--h,n)return i?void(t||r(i)):void s(e,o)})}}var u=this;if(!n)return a.asPromise(t,u,i);var h=0;a.isString(i)&&(i=[i]),i.forEach(function(e){o(u.resolvePath("",e))}),h||r(null)},o.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var i=0;i-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof s)for(var i=e.getNestedArray(),n=0;n0)return m.shift();if(w)return i();var n,o,u;do{if(v===g)return null;for(n=!1;/\s/.test(u=r(v));)if(u===a&&++y,++v===g)return null;if(r(v)===f){if(++v===g)throw t("comment");if(r(v)===f){for(;r(++v)!==a;)if(v===g)return null;++v,++y,n=!0}else{if((u=r(v))!==h)return f;do{if(u===a&&++y,++v===g)return null;o=u,u=r(v)}while(o!==h||u!==f);++v,n=!0}}}while(n);if(v===g)return null;var l=v;s.lastIndex=0;var c=s.test(r(l++));if(!c)for(;l]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",h="*"},{}],19:[function(e,t,i){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.j=null,this.k=null,this.l=null,this.m=null}function r(e){return e.j=e.k=e.l=e.m=null,delete e.encode,delete e.decode,e}t.exports=n;var s=e(10),o=s.prototype,u=s.extend(n),a=e(5),f=e(12),h=e(6),l=e(17),c=e(14),d=e(15),p=e(26),v=e(4),g=e(3),y=e(25),m=e(7),w=e(21),b=w.codegen;Object.defineProperties(u,{fieldsById:{get:u.getFieldsById=function(){if(this.j)return this.j;this.j={};for(var e=Object.keys(this.fields),t=0;t0?t.splice(--r,2):i?t.splice(r,1):++r:"."===t[r]?t.splice(r,1):++r;return n+t.join("/")}var a=i;a.codegen=e(22),a.isString=n,a.isObject=function(e){return Boolean(e&&"object"==typeof e)},a.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},a.toArray=function(e){if(!e)return[];for(var t=Object.keys(e),i=t.length,n=new Array(i),r=0;r ").replace(/\t/g," ")),r="return "+r;var s,o=[];Array.isArray(i)?s=i.slice():i?(s=Object.keys(i),o=s.map(function(e){return i[e]})):s=[];var u=Function.apply(null,s.concat(r));return o?u.apply(null,o):u()},e}t.exports=n;var r=/[{[]$/,s=/^[}\]]/,o=/:$/,u=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue);?$|^\s*return\b/;n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],23:[function(e,t,i){"use strict";function n(e,t){this.lo=e,this.hi=t}t.exports=n;var r=e(21),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1},n.fromNumber=function(e){if(0===e)return o;var t=e<0;e=Math.abs(e);var i=e>>>0,r=(e-i)/4294967296>>>0;return t&&(r=~r>>>0,i=~i>>>0,++i>4294967295&&(i=0,++r>4294967295&&(r=0))),new n(i,r)},n.from=function(e){switch(typeof e){case"number":return n.fromNumber(e);case"string":e=r.Long.fromString(e)}return(e.low||e.high)&&new n(e.low>>>0,e.high>>>0)||o},s.toNumber=function(e){return!e&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(e){return new r.Long(this.lo,this.hi,e)};var u=String.prototype.charCodeAt;n.fromHash=function(e){return new n((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24&255,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24&255)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<1<<21?3:4:t<16384?t<128?5:6:t<1<<21?7:8:i<128?9:10}},{21:21}],24:[function(e,t,i){(function(t){"use strict";var n=i,r=n.LongBits=e(23),s=n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node);if(n.Buffer=null,s)try{n.Buffer=e("buffer").Buffer}catch(e){}if(n.Long=t.dcodeIO&&t.dcodeIO.Long||null,!n.Long&&s)try{n.Long=e("long")}catch(e){}n.longToHash=function(e){return e?r.from(e).toHash():"\0\0\0\0\0\0\0\0"},n.longFromHash=function(e,t){var i=r.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.longNeq=function(e,t){return"number"==typeof e?"number"==typeof t?e!==t:(e=r.fromNumber(e)).lo!==t.low||e.hi!==t.high:"number"==typeof t?(t=r.fromNumber(t)).lo!==e.low||t.hi!==e.high:e.low!==t.low||e.high!==t.high}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{23:23,buffer:"buffer",long:"long"}],25:[function(e,t,i){"use strict";var n=i,r=e(5),s=e(19),o=e(21);n.fallback=function(e){for(var t=this.getFieldsArray(),i=0;i127;)e[t++]=127&i|128,i>>>=7;e[t]=i}function h(e,t,i){for(;i.hi||i.lo>127;)e[t++]=127&i.lo|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;e[t++]=i.lo}function l(e,t,i){e[t++]=255&i,e[t++]=i>>>8&255,e[t++]=i>>>16&255,e[t]=i>>>24&255}function c(e,t,i){T.write(e,i,t,!1,23,4)}function d(e,t,i){T.write(e,i,t,!1,52,8)}function p(e,t,i){e.set(i,t)}function v(e,t,i){for(var n=0;n>6|192,e[t++]=63&s|128):55296===(64512&s)&&56320===(64512&(r=i.charCodeAt(n+1)))?(s=65536+((1023&s)<<10)+(1023&r),++n,e[t++]=s>>18|240,e[t++]=s>>12&63|128,e[t++]=s>>6&63|128,e[t++]=63&s|128):(e[t++]=s>>12|224,e[t++]=s>>6&63|128,e[t++]=63&s|128)}}function y(e){for(var t=e.length>>>0,i=0,n=0;n>>=0,this.push(f,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},A.int32=function(e){return e<0?this.push(h,10,S.fromNumber(e)):this.uint32(e)},A.sint32=function(e){return this.uint32(e<<1^e>>31)},A.uint64=function(e){var t=S.from(e);return this.push(h,t.length(),t)},A.int64=A.uint64,A.sint64=function(e){var t=S.from(e).zzEncode();return this.push(h,t.length(),t)},A.bool=function(e){return this.push(a,1,e?1:0)},A.fixed32=function(e){return this.push(l,4,e>>>0)},A.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},A.fixed64=function(e){var t=S.from(e);return this.push(l,4,t.hi).push(l,4,t.lo)},A.sfixed64=function(e){var t=S.from(e).zzEncode();return this.push(l,4,t.hi).push(l,4,t.lo)},A.float=function(e){return this.push(c,4,e)},A.double=function(e){return this.push(d,8,e)};var j;A.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(j,t,e):this.push(a,1,0)},A.string=function(e){var t=y(e);return t?this.uint32(t).push(g,t,e):this.push(a,1,0)},A.fork=function(){return this.stack.push(new o(this)),this.head=this.tail=new r(s,0,0),this.len=0,this},A.reset=function(){if(this.stack.length){var e=this.stack.pop();this.head=e.head,this.tail=e.tail,this.len=e.len}else this.head=this.tail=new r(s,0,0),this.len=0;return this},A.ldelim=function(e){var t=this.head,i=this.tail,n=this.len;return this.reset(),void 0!==e&&this.tag(e,2),this.uint32(n),this.tail.next=t.next,this.tail=i,this.len+=n,this},A.finish=function(){var e=this.head.next,t=new x(this.len),i=0;for(this.reset();e;)e.fn(t,i,e.val),i+=e.len,e=e.next;return t};var E=m.prototype=Object.create(u.prototype);E.constructor=m,E.float=function(e){return this.push(w,4,e)},E.double=function(e){return this.push(b,8,e)},E.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(k,t,e):this.push(a,1,0)},E.string=function(e){var t=e.length<40?y(e):N.Buffer.byteLength(e);return t?this.uint32(t).push(O,t,e):this.push(a,1,0)},E.finish=function(){var e=this.head.next,t=N.Buffer.allocUnsafe&&N.Buffer.allocUnsafe(this.len)||new N.Buffer(this.len),i=0;for(this.reset();e;)e.fn(t,i,e.val),i+=e.len,e=e.next;return t},n()},{1:1,24:24}],27:[function(e,t,i){(function(t){"use strict";function n(e,t,i){return"function"==typeof t?(i=t,t=new r.Root):t||(t=new r.Root),t.load(e,i)||r}var r=t.protobuf=i;r.load=n,r.tokenize=e(18),r.parse=e(13),r.Writer=e(26),r.BufferWriter=r.Writer.BufferWriter,r.Reader=e(15),r.BufferReader=r.Reader.BufferReader,r.encoder=e(4),r.decoder=e(3),r.verifier=e(25),r.ReflectionObject=e(11),r.Namespace=e(10),r.Root=e(16),r.Enum=e(5),r.Type=e(19),r.Field=e(6),r.OneOf=e(12),r.MapField=e(8),r.Service=e(17),r.Method=e(9),r.Prototype=e(14),r.inherits=e(7),r.types=e(20),r.common=e(2),r.util=e(21),"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(r.util.Long=e,r.Reader.configure(),r.Writer.configure()),r})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,2:2,20:20,21:21,25:25,26:26,3:3,4:4,5:5,6:6,7:7,8:8,9:9}]},{},[27]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/protobuf.min.js.gz b/dist/protobuf.min.js.gz index 41fea15de12fe211dea2862e528ef842d1e3bd03..bc14647c74a2b2b007489fa900545051b71b46c1 100644 GIT binary patch delta 15419 zcmV-BJjBC*e5rhpOH19E*}3ihi=98UUbL23TBH}{totc%-5hs&UBBf{yjH*GAGf}a zl9(@A|A@2VSIqlWdcBMneA;?nCal#vY<30D7k{@;!vuoIpCmaV^3*f^-u051@nD(5ii}f9UPm z?4a%#aUS}^$$k_}Y|#083#=kK5Bpf8(_zs*7NPue?0=Q)imU(XfREzNbPOx#s9myYCtR{}AJ-GhtksvEon@<%%{pN= zn8Av(3ZN&w3c9CZ-0FA=9iydz4`HV(1RRrOf72YDrW{HK5#O=pZ^a3$&18avJRkBPhuzJR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&)vE?v_YCpbpRTz?NH*OYt8PPJnA6RhT198xP%nIYo3%R?JG3)$aK4C6@! z)wz|EREzSWYrnLi+*s?~_F93{Ty1jzBbiPVFae4^&k_(V^0Of-8etOKsRdv(7Tltd zs(Y>7db(7xlb$2>3M=NP_j6D=S9&FFdAG%OqAtXyR&^~0RMikO&wpdaCPSWzV2Dgq z@-ut35=+Jw^t})l{+Qm!7LiXhZ0n)^s>*TbtE?sz!OL}+LDKP%t*F)60S8GLHY<3z z%xJ&sA^#_^l6?!-rAH}n|8;o1HCAM4$BKMii4}RxUO#0`-pV!k`blf@Laa&1{rgwr z)wXr>di!eRmXv`jQ%rA%s6TH6ZGUXRzT4jLlP6oZ3zAtn`7uG&OS|2aYA{0V)l{B8 z7E@TV5jC=Z@|@Fx>dCaR%4%?`D2CGfL7eFQkfvy6rNbr46ylTSJRT9;DHBl&MKD5m zlX9YPiq5LSlNCK8N}))JML(#{ANXv+2|Cj95E}FG1FC59Wi;W^GhDz#-dL4&Unk|Y z&?jeI3NI{_%2`(iz;r3syM(_}{^D8pyJ)Gt5`f-|3;(2(fju05_h4mR41|%AT_wJu zvx2lbXqbPY$7#34Z#TN0s%Lj36zgNwB!A*zJXI|ZZ}c1)$=)@SZ6`u1x(57zI75&Q z2e7Vu<#s@E-73xp+pgNe*l%>*){`6)%w=3?Ou|O}ld(7W)BgVdY2|5|O*kOH5~$*j dKfDRm8tPuhN%s>D8T0(<{{q%34lP2;006=5iYx#C diff --git a/dist/protobuf.min.js.map b/dist/protobuf.min.js.map index b8a9bcadc..f48f9e5d8 100644 --- a/dist/protobuf.min.js.map +++ b/dist/protobuf.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/common.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/inherits.js","src/mapfield.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/prototype.js","src/reader.js","src/root.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/codegen.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","read","buffer","offset","isBE","mLen","nBytes","m","eLen","eMax","eBias","nBits","d","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","common","name","json","test","nested","google","protobuf","Any","fields","type_url","type","id","timeType","Duration","seconds","nanos","Timestamp","Empty","Struct","keyType","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","values","NULL_VALUE","ListValue","rule","decoder","Enum","Reader","types","util","fallback","reader","this","getFieldsById","limit","undefined","len","pos","message","getCtor","tag","field","resolve","resolvedType","map","resolvedKeyType","uint32","ks","vs","basic","decode","longToHash","repeated","packed","wireType","plimit","skipType","generate","mtype","getFieldsArray","gen","codegen","prop","safeProp","encoder","Writer","writer","fi","keys","Object","fork","mapKey","encode","ldelim","required","long","longNeq","defaultValue","reset","keyWireType","options","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","extend","_TypeError","defineProperties","valuesById","get","getValuesById","forEach","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","isObject","toString","toLowerCase","optional","partOf","Long","extensionField","declaringField","_packed","FieldPrototype","Type","MapField","isPacked","getOption","setOption","ifNotSet","prototype","role","resolved","typeDefault","defaults","parent","lookup","optionDefault","fromValue","jsonConvert","String","Number","toNumber","charAt","inherits","clazz","classProperties","$type","noStatics","merge","encodeDelimited","decodeDelimited","verify","Prototype","constructor","noRegister","setCtor","prototypeProperties","getOneofsArray","set","MapFieldPrototype","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","Namespace","_nestedArray","namespace","arrayToJSON","array","obj","NamespacePrototype","Service","nestedTypes","nestedError","ctor","join","nestedArray","getNestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","j","object","indexOf","prev","setOptions","onAdd","onRemove","define","path","split","Array","isArray","ptr","part","shift","resolveAll","parentAlreadyChecked","getRoot","slice","found","proto","create","Root","ReflectionObjectPrototype","root","fullName","getFullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","_fields","addFieldsToParent","OneOfPrototype","push","index","splice","lower","token","camelCase","substring","replace","$0","$1","toUpperCase","parse","source","illegal","tn","line","s_bclose","readString","next","s_dq","s_sq","skip","peek","readValue","acceptTypeRef","parseNumber","typeRefRe","readRange","start","parseId","end","s_semi","sign","tokenLower","parseInt","parseFloat","acceptNegative","parsePackage","pkg","s_name","parseImport","whichImports","weakImports","imports","parseSyntax","syntax","p3","isProto3","parseCommon","s_option","parseOption","parseType","parseEnum","parseService","parseExtension","nameRe","s_open","s_close","parseMapField","s_required","s_optional","s_repeated","parseField","parseOneOf","extensions","reserved","s_type","parseInlineOptions","valueType","parseEnumField","custom","s_bopen","fqTypeRefRe","parseOptionValue","service","parseMethod","st","method","reference","tokenize","head","package","properties","any","fieldsOnly","asJSON","key","indexOutOfRange","writeLength","RangeError","configure","ArrayImpl","Uint8Array","ReaderPrototype","_slice","subarray","int64","read_int64_long","uint64","read_uint64_long","sint64","read_sint64_long","fixed64","read_fixed64_long","sfixed64","read_sfixed64_long","read_int64_number","read_uint64_number","read_sint64_number","read_fixed64_number","read_sfixed64_number","buf","Buffer","isBuffer","BufferReader","Tag","readLongVarint","lo","hi","b","LongBits","toLong","zzDecode","readLongFixed","initBufferReader","ieee754","int32","octet","sint32","bool","fixed32","sfixed32","float","double","bytes","string","out","p","c1","fromCharCode","apply","finish","remain","BufferReaderPrototype","readFloatLE","readDoubleLE","deferred","files","handleExtension","extendedType","sisterField","RootPrototype","resolvePath","load","filename","callback","err","cb","process","JSON","parsed","self","fetch","queued","weak","idx","altname","setTimeout","asPromise","newDeferred","_methodsArray","ServicePrototype","methodsArray","getMethodsArray","methodName","inherited","rpc","requestDelimited","responseDelimited","rpcService","defineProperty","lcName","request","requestData","setImmediate","responseData","response","err2","unescape","str","subject","re","stringDelim","stringDoubleRe","stringSingleRe","lastIndex","match","exec","stack","repeat","curr","s_nl","s_sl","s_as","delimRe","delim","expected","actual","equals","_fieldsById","_fieldsArray","_oneofsArray","_ctor","TypePrototype","verifier","fieldsById","names","fieldsArray","oneofsArray","supported","eof","P","fieldName","oneOfName","filter","fld","readerOrBuffer","bake","emptyArray","freeze","fn","ctx","args","arguments","Promise","reject","concat","onload","xhr","status","responseText","fs","readFile","XMLHttpRequest","onreadystatechange","readyState","open","send","isAbsolutePath","normalizePath","parts","prefix","isFinite","description","TypeError","originPath","importPath","alreadyNormalized","dst","src","newBuffer","size","fmt","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","format","params","param","stringify","scope","verbose","console","Function","LongBitsPrototype","zero","zzEncode","fromNumber","from","fromString","low","high","unsigned","charCodeAt","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","dcodeIO","longFromHash","bits","fromBits","reason","hasReasonVar","writeBytes","writeBytes_set","writeBytes_for","Op","val","noop","State","tail","BufferWriter","writeByte","writeVarint32","writeVarint64","writeFixed32","writeFloat","writeDouble","writeString","c2","byteLength","strlen","writeFloatBuffer","writeFloatLE","writeDoubleBuffer","writeDoubleLE","writeBytesBuffer","copy","writeStringBuffer","WriterPrototype","op","state","pop","BufferWriterPrototype","allocUnsafe","amd"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,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EAAAwK,QAAAlN,EAAA,IACA0C,EAAAyJ,OAAAnM,EAAA,GAGA0C,EAAAiJ,UAAA3L,EAAA,IACA0C,EAAAwI,SAAAlL,EAAA,GAGA0C,EAAAgC,MAAA1E,EAAA,IACA0C,EAAAN,OAAApC,EAAA,GACA0C,EAAAiC,KAAA3E,EAAA,IAIA,kBAAAsO,SAAAA,OAAA8W,KACA9W,QAAA,QAAA,SAAA7E,GAMA,MALAA,KACA/G,EAAAiC,KAAA8E,KAAAA,EACA/G,EAAA+B,OAAAmR,YACAlT,EAAAqE,OAAA6O,aAEAlT","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 1,\r\n nBits = -7,\r\n i = isBE ? 0 : (nBytes - 1),\r\n d = isBE ? 1 : -1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n};\r\n\r\nexports.write = function writeIEEE754(buffer, value, offset, isBE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isBE ? (nBytes - 1) : 0,\r\n d = isBE ? -1 : 1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n// - google/protobuf/wrappers.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar decoder = exports;\r\n\r\nvar Enum = require(5),\r\n Reader = require(15),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Decodes a message of `this` message's type.\r\n * @param {Reader} reader Reader to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Populated runtime message\r\n * @this Type\r\n */\r\ndecoder.fallback = function fallback(reader, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = reader instanceof Reader ? reader : Reader(reader),\r\n limit = length === undefined ? reader.len : reader.pos + length,\r\n message = new (this.getCtor())();\r\n while (reader.pos < limit) {\r\n var tag = reader.tag(),\r\n field = fields[tag.id].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type;\r\n \r\n // Known fields\r\n if (field) {\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType,\r\n length = reader.uint32();\r\n var map = message[field.name] = {};\r\n if (length) {\r\n length += reader.pos;\r\n var ks = [], vs = [];\r\n while (reader.pos < length) {\r\n if (reader.tag().id === 1)\r\n ks[ks.length] = reader[keyType]();\r\n else if (types.basic[type] !== undefined)\r\n vs[vs.length] = reader[type]();\r\n else\r\n vs[vs.length] = field.resolvedType.decode(reader, reader.uint32());\r\n }\r\n for (var i = 0; i < ks.length; ++i)\r\n map[typeof ks[i] === 'object' ? util.longToHash(ks[i]) : ks[i]] = vs[i];\r\n }\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n var values = message[field.name] || (message[field.name] = []);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined && tag.wireType === 2) {\r\n var plimit = reader.uint32() + reader.pos;\r\n while (reader.pos < plimit)\r\n values[values.length] = reader[type]();\r\n\r\n // Non-packed\r\n } else if (types.basic[type] !== undefined)\r\n values[values.length] = reader[type]();\r\n else\r\n values[values.length] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Non-repeated\r\n } else if (types.basic[type] !== undefined)\r\n message[field.name] = reader[type]();\r\n else\r\n message[field.name] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Unknown fields\r\n } else\r\n reader.skipType(tag.wireType);\r\n }\r\n return message;\r\n /* eslint-enable no-invalid-this, block-scoped-var, no-redeclare */\r\n};\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\ndecoder.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nObject.defineProperties(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: EnumPrototype.getValuesById = function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (this.values[name] !== undefined)\r\n throw Error('duplicate name \"' + name + '\" in ' + this);\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error('\"' + name + '\" is not a name of ' + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(19),\r\n Enum = require(5),\r\n MapField = require(8),\r\n types = require(20),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string} [rule=optional] Field rule\r\n * @param {string} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (extend !== undefined && !util.isString(extend))\r\n throw _TypeError(\"extend\");\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw _TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== 'optional' ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nObject.defineProperties(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined)\r\n return MapField.fromJSON(name, json);\r\n return new Field(name, json.id, json.type, json.role, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n var resolved = this.parent.lookup(this.type);\r\n if (resolved instanceof Type) {\r\n this.resolvedType = resolved;\r\n typeDefault = null;\r\n } else if (resolved instanceof Enum) {\r\n this.resolvedType = resolved;\r\n typeDefault = 0;\r\n } else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved determine the default value\r\n var optionDefault;\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else if (this.options && (optionDefault = this.options['default']) !== undefined) // eslint-disable-line dot-notation\r\n this.defaultValue = optionDefault;\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long)\r\n this.defaultValue = util.Long.fromValue(this.defaultValue);\r\n \r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Converts a field value to JSON using the specified options. Note that this method does not account for repeated fields and must be called once for each repeated element instead.\r\n * @param {*} value Field value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {*} Converted value\r\n * @see {@link Prototype#asJSON}\r\n */\r\nFieldPrototype.jsonConvert = function(value, options) {\r\n if (options) {\r\n if (this.resolvedType instanceof Enum && options['enum'] === String) // eslint-disable-line dot-notation\r\n return this.resolvedType.getValuesById()[value];\r\n else if (this.long && options.long)\r\n return options.long === Number\r\n ? typeof value === 'number'\r\n ? value\r\n : util.Long.fromValue(value).toNumber()\r\n : util.Long.fromValue(value, this.type.charAt(0) === 'u').toString();\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = inherits;\r\n\r\nvar Prototype = require(14),\r\n Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Options passed to {@link inherits}, modifying its behavior.\r\n * @typedef InheritanceOptions\r\n * @type {Object}\r\n * @property {boolean} [noStatics=false] Skips adding the default static methods on top of the constructor\r\n * @property {boolean} [noRegister=false] Skips registering the constructor with the reflected type\r\n */\r\n\r\n/**\r\n * Inherits a custom class from the message prototype of the specified message type.\r\n * @param {Function} clazz Inheriting class\r\n * @param {Type} type Inherited message type\r\n * @param {InheritanceOptions} [options] Inheritance options\r\n * @returns {Prototype} Created prototype\r\n */\r\nfunction inherits(clazz, type, options) {\r\n if (typeof clazz !== 'function')\r\n throw _TypeError(\"clazz\", \"a function\");\r\n if (!(type instanceof Type))\r\n throw _TypeError(\"type\", \"a Type\");\r\n if (!options)\r\n options = {};\r\n\r\n /**\r\n * This is not an actual type but stands as a reference for any constructor of a custom message class that you pass to the library.\r\n * @name Class\r\n * @extends Prototype\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set on the message\r\n * @see {@link inherits}\r\n */\r\n\r\n var classProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Class.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n if (!options.noStatics)\r\n util.merge(classProperties, {\r\n\r\n /**\r\n * Encodes a message of this type to a buffer.\r\n * @name Class.encode\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encode: {\r\n value: function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Encodes a message of this type preceeded by its length as a varint to a buffer.\r\n * @name Class.encodeDelimited\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encodeDelimited: {\r\n value: function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type from a buffer.\r\n * @name Class.decode\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decode: {\r\n value: function decode(buffer) {\r\n return this.$type.decode(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type preceeded by its length as a varint from a buffer.\r\n * @name Class.decodeDelimited\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decodeDelimited: {\r\n value: function decodeDelimited(buffer) {\r\n return this.$type.decodeDelimited(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Verifies a message of this type.\r\n * @name Class.verify\r\n * @function\r\n * @param {Prototype|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n verify: {\r\n value: function verify(message) {\r\n return this.$type.verify(message);\r\n }\r\n }\r\n\r\n }, true);\r\n\r\n Object.defineProperties(clazz, classProperties);\r\n var prototype = inherits.defineProperties(new Prototype(), type);\r\n clazz.prototype = prototype;\r\n prototype.constructor = clazz;\r\n\r\n if (!options.noRegister)\r\n type.setCtor(clazz);\r\n\r\n return prototype;\r\n}\r\n\r\n/**\r\n * Defines the reflected type's default values and virtual oneof properties on the specified prototype.\r\n * @memberof inherits\r\n * @param {Prototype} prototype Prototype to define properties upon\r\n * @param {Type} type Reflected message type\r\n * @returns {Prototype} The specified prototype\r\n */\r\ninherits.defineProperties = function defineProperties(prototype, type) {\r\n\r\n var prototypeProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Prototype#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n // Initialize default values\r\n type.getFieldsArray().forEach(function(field) {\r\n field.resolve();\r\n if (!util.isObject(field.defaultValue))\r\n // objects are mutable (i.e. would modify the array on the prototype, not the instance)\r\n prototype[field.name] = field.defaultValue;\r\n });\r\n\r\n // Define each oneof with a non-enumerable getter and setter for the present field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n prototypeProperties[oneof.resolve().name] = {\r\n get: function() {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = oneof.parent.fields[keys[i]];\r\n if (this[keys[i]] != field.defaultValue) // eslint-disable-line eqeqeq\r\n return keys[i];\r\n }\r\n return undefined;\r\n },\r\n set: function(value) {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperties(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(6);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nvar Enum = require(5),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new map field.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n \r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n \r\n // Besides a value type, map fields have a key type to resolve\r\n var keyWireType = types.mapKey[this.keyType];\r\n if (keyWireType === undefined) {\r\n var resolved = this.parent.lookup(this.keyType);\r\n if (!(resolved instanceof Enum))\r\n throw Error(\"unresolvable map key type: \" + this.keyType);\r\n this.resolvedKeyType = resolved;\r\n }\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean} [requestStream] Whether the request is streamed\r\n * @param {boolean} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (!util.isString(requestType))\r\n throw _TypeError(\"requestType\");\r\n if (!util.isString(responseType))\r\n throw _TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var resolved = this.parent.lookup(this.requestType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n this.resolvedRequestType = resolved;\r\n resolved = this.parent.lookup(this.responseType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n this.resolvedResponseType = resolved;\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n Field = require(6),\r\n Service = require(17),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\nvar nestedTypes = [ Enum, Type, Service, Field, Namespace ],\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(', ');\r\n\r\n/**\r\n * Constructs a new namespace.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n return namespace;\r\n}\r\n\r\nObject.defineProperties(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: NamespacePrototype.getNestedArray = function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson)\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw _TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw _TypeError(\"object\", nestedError);\r\n if (object instanceof Field && object.extend === undefined)\r\n throw _TypeError(\"object\", \"an extension field when not part of a type\");\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n if (!(object instanceof ReflectionObject))\r\n throw _TypeError(\"object\", \"a ReflectionObject\");\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split('.');\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolve() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, parentAlreadyChecked) {\r\n if (util.isString(path)) {\r\n if (!path.length)\r\n return null;\r\n path = path.split('.');\r\n } else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1));\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && (path.length === 1 || found instanceof Namespace && (found = found.lookup(path.slice(1), true))))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path);\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nReflectionObject.extend = extend;\r\n\r\nvar Root = require(16),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (options && !util.isObject(options))\r\n throw _TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nObject.defineProperties(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: ReflectionObjectPrototype.getRoot = function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join('.');\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Lets the specified constructor extend this class.\r\n * @memberof ReflectionObject\r\n * @param {Function} constructor Extending constructor\r\n * @returns {Object} Prototype\r\n * @this ReflectionObject\r\n */\r\nfunction extend(constructor) {\r\n var proto = constructor.prototype = Object.create(this.prototype);\r\n proto.constructor = constructor;\r\n constructor.extend = extend;\r\n return proto;\r\n}\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Constructor name, space, full name\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n return this.constructor.name + \" \" + this.getFullName();\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(6),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw _TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {Array.}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._fields = [];\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent)\r\n oneof._fields.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fields.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n var index = this._fields.indexOf(field);\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n this._fields.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fields.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(18),\r\n Root = require(16),\r\n Type = require(19),\r\n Field = require(6),\r\n MapField = require(8),\r\n OneOf = require(12),\r\n Enum = require(5),\r\n Service = require(17),\r\n Method = require(9),\r\n types = require(20);\r\n\r\nvar nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n fqTypeRefRe = /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/;\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(name) {\r\n return name.substring(0,1)\r\n + name.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\nvar s_required = \"required\",\r\n s_repeated = \"repeated\",\r\n s_optional = \"optional\",\r\n s_option = \"option\",\r\n s_name = \"name\",\r\n s_type = \"type\";\r\nvar s_open = \"{\",\r\n s_close = \"}\",\r\n s_bopen = '(',\r\n s_bclose = ')',\r\n s_semi = \";\",\r\n s_dq = '\"',\r\n s_sq = \"'\";\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @param {string} source Source contents\r\n * @param {Root} [root] Root to populate\r\n * @returns {ParserResult} Parser result\r\n */\r\nfunction parse(source, root) {\r\n /* eslint-disable default-case, callback-return */\r\n if (!root)\r\n root = new Root();\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n function illegal(token, name) {\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (line \" + tn.line() + s_bclose);\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== s_dq && token !== s_sq)\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === s_dq || token === s_sq);\r\n return values.join('');\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case s_sq:\r\n case s_dq:\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && typeRefRe.test(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(s_semi);\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === '-') {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, 'number');\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"min\": return 1;\r\n case \"max\": return 0x1FFFFFFF;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === '-' && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!typeRefRe.test(pkg))\r\n throw illegal(pkg, s_name);\r\n ptr = ptr.define(pkg);\r\n skip(s_semi);\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(s_semi);\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n var p3;\r\n if ([ \"proto2\", p3 = \"proto3\" ].indexOf(syntax) < 0)\r\n throw illegal(syntax, \"syntax\");\r\n isProto3 = syntax === p3;\r\n skip(s_semi);\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case s_option:\r\n parseOption(parent, token);\r\n skip(s_semi);\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n case s_required:\r\n case s_optional:\r\n case s_repeated:\r\n parseField(type, tokenLower);\r\n break;\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, s_optional);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (!typeRefRe.test(type))\r\n throw illegal(type, s_type);\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n if (field.repeated)\r\n field.setOption(\"packed\", isProto3, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, s_type);\r\n skip(\",\");\r\n var valueType = next();\r\n if (!typeRefRe.test(valueType))\r\n throw illegal(valueType, s_type);\r\n skip(\">\");\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (token === s_option) {\r\n parseOption(oneof, token);\r\n skip(s_semi);\r\n } else {\r\n push(token);\r\n parseField(oneof, s_optional);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (lower(token) === s_option)\r\n parseOption(enm);\r\n else\r\n parseEnumField(enm, token);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(s_bopen, true);\r\n var name = next();\r\n if (!typeRefRe.test(name))\r\n throw illegal(name, s_name);\r\n if (custom) {\r\n skip(s_bclose);\r\n name = s_bopen + name + s_bclose;\r\n token = peek();\r\n if (fqTypeRefRe.test(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, s_option);\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(s_semi);\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n if (!nameRe.test(token))\r\n throw illegal(token, \"service name\");\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(service, tokenLower);\r\n skip(s_semi);\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(s_bopen);\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(s_bclose); skip(\"returns\"); skip(s_bopen);\r\n if (skip(st, true))\r\n responseStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n responseType = token;\r\n skip(s_bclose);\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(method, tokenLower);\r\n skip(s_semi);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n if (!typeRefRe.test(reference))\r\n throw illegal(reference, \"reference\");\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_required:\r\n case s_repeated:\r\n case s_optional:\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, s_optional, reference);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case s_option:\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(s_semi);\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n return {\r\n 'package' : pkg,\r\n 'imports' : imports,\r\n 'weakImports' : weakImports,\r\n 'syntax' : syntax,\r\n 'root' : root\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = Prototype;\r\n\r\n/**\r\n * Options passed to the {@link Prototype|prototype constructor}, modifying its behavior.\r\n * @typedef PrototypeOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Sets only properties that reference a field\r\n */\r\n\r\n/**\r\n * Constructs a new prototype.\r\n * This method should be called from your custom constructors, i.e. `Prototype.call(this, properties)`.\r\n * @classdesc Runtime message prototype ready to be extended by custom classes or generated code.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @param {PrototypeOptions} [options] Prototype options\r\n * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties, options) {\r\n if (properties) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (fields[keys[i]] || any)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n}\r\n\r\n/**\r\n * Converts a runtime message to a JSON object.\r\n * @param {Object.} [options] Conversion options\r\n * @param {boolean} [options.fieldsOnly=false] Converts only properties that reference a field\r\n * @param {Function} [options.long] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @param {Function} [options.enum=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys = Object.keys(this);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = fields[key = keys[i]],\r\n value = this[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value && value.length) {\r\n var array = new Array(value.length);\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n array[j] = field.jsonConvert(value[j], options);\r\n json[key] = array;\r\n }\r\n } else\r\n json[key] = field.jsonConvert(value, options);\r\n } else if (any)\r\n json[key] = value;\r\n }\r\n return json;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nReader.BufferReader = BufferReader;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Configures the Reader interface according to the environment.\r\n * @memberof Reader\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n ReaderPrototype._slice = ArrayImpl.prototype.slice || ArrayImpl.prototype.subarray;\r\n\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader.configure = configure;\r\n\r\n/**\r\n * Constructs a new reader using the specified buffer.\r\n * When called as a function, returns an appropriate reader for the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n if (!(this instanceof Reader))\r\n return util.Buffer && (!buffer || util.Buffer.isBuffer(buffer)) && new BufferReader(buffer) || new Reader(buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\n/**\r\n * Tag read.\r\n * @constructor\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @ignore\r\n */\r\nfunction Tag(id, wireType) {\r\n this.id = id;\r\n this.wireType = wireType;\r\n}\r\n\r\n/**\r\n * Reads a tag.\r\n * @returns {{id: number, wireType: number}} Field id and wire type\r\n */\r\nReaderPrototype.tag = function read_tag() {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n return new Tag(this.buf[this.pos] >>> 3, this.buf[this.pos++] & 7);\r\n};\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n var value = 0,\r\n shift = 0,\r\n octet = 0;\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n octet = this.buf[this.pos++];\r\n if (shift < 32)\r\n value |= (octet & 127) << shift;\r\n shift += 7;\r\n } while (octet & 128);\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = function read_uint32() {\r\n return this.int32() >>> 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.int32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n var lo = 0, hi = 0,\r\n i = 0, b = 0;\r\n if (this.len - this.pos > 9) { // fast route\r\n for (i = 0; i < 4; ++i) {\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.int32() !== 0;\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n this.pos += 4;\r\n return this.buf[this.pos - 4]\r\n | this.buf[this.pos - 3] << 8\r\n | this.buf[this.pos - 2] << 16\r\n | this.buf[this.pos - 1] << 24;\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongFixed() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n return new LongBits(\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n ,\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n );\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readLongFixed.call(this).toLong(true);\r\n}\r\n\r\nfunction read_fixed64_number() {\r\n return readLongFixed.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readLongFixed.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sfixed64_number() {\r\n return readLongFixed.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 23, 4);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 52, 8);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n // ref: https://github.com/google/closure-library/blob/master/closure/goog/crypt/crypt.js\r\n var bytes = this.bytes(),\r\n len = bytes.length;\r\n if (len) {\r\n var out = new Array(len), p = 0, c = 0;\r\n while (p < len) {\r\n var c1 = bytes[p++];\r\n if (c1 < 128)\r\n out[c++] = c1;\r\n else if (c1 > 191 && c1 < 224)\r\n out[c++] = (c1 & 31) << 6 | bytes[p++] & 63;\r\n else if (c1 > 239 && c1 < 365) {\r\n var u = ((c1 & 7) << 18 | (bytes[p++] & 63) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63) - 0x10000;\r\n out[c++] = 0xD800 + (u >> 10);\r\n out[c++] = 0xDC00 + (u & 1023);\r\n } else\r\n out[c++] = (c1 & 15) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63;\r\n }\r\n return String.fromCharCode.apply(String, out.slice(0, c));\r\n }\r\n return \"\";\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (length === undefined) {\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n } else {\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n var tag = this.tag();\r\n if (tag.wireType === 4)\r\n break;\r\n this.skipType(tag.wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance and frees all resources.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.reset = function reset(buffer) {\r\n if (buffer) {\r\n this.buf = buffer;\r\n this.len = buffer.length;\r\n } else {\r\n this.buf = null; // makes it throw\r\n this.len = 0;\r\n }\r\n this.pos = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of read operations, frees all resources and returns the remaining buffer.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nReaderPrototype.finish = function finish(buffer) {\r\n var remain = this.pos\r\n ? this._slice.call(this.buf, this.pos)\r\n : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\n// One time function to initialize BufferReader with the now-known buffer implementation's slice method\r\nvar initBufferReader = function() {\r\n if (!util.Buffer)\r\n throw Error(\"Buffer is not supported\");\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n initBufferReader = false;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer reader.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n if (initBufferReader)\r\n initBufferReader();\r\n Reader.call(this, buffer);\r\n}\r\n\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\n\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.float = function read_float_buffer() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = this.buf.readFloatLE(this.pos, true);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.double = function read_double_buffer() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n var value = this.buf.readDoubleLE(this.pos, true);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return this.buf.toString(\"utf8\", start, end);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.finish = function finish_buffer(buffer) {\r\n var remain = this.pos ? this.buf.slice(this.pos) : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(6),\r\n util = require(21),\r\n common = require(2);\r\n\r\n/**\r\n * Constructs a new root namespace.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files. \r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.resolvePath;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {function(?Error, Root=)} [callback] Node-style callback function\r\n * @returns {Promise|undefined} A promise if `callback` has been omitted\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nRootPrototype.load = function load(filename, callback) {\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n var parsed = require(13)(source, self);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.indexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (!queued)\r\n finish(null);\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nRootPrototype.toString = function toString() {\r\n return this.constructor.name;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nvar Method = require(9),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new service.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nObject.defineProperties(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: ServicePrototype.getMethodsArray = function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolve() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @function\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {function(?Error, Uint8Array=)} callback Node-style callback called with the error, if any, and the response data\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpc RPC implementation ({@link RPCImpl|see})\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {Object} Runtime service\r\n */\r\nServicePrototype.create = function create(rpc, requestDelimited, responseDelimited) {\r\n var rpcService = {};\r\n Object.defineProperty(rpcService, \"$rpc\", {\r\n value: rpc\r\n });\r\n this.getMethodsArray().forEach(function(method) {\r\n var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1);\r\n rpcService[lcName] = function(request, callback) {\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited && method.resolvedRequestType.encodeDelimited(request) || method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === 'function' && setImmediate || setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpc(method, requestData, function(err, responseData) {\r\n if (err) {\r\n callback(err);\r\n return;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited && method.resolvedResponseType.decodeDelimited(responseData) || method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n callback(err2);\r\n return;\r\n }\r\n callback(null, response);\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n\r\nvar s_nl = \"\\n\",\r\n s_sl = '/',\r\n s_as = '*';\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable default-case, callback-return */\r\n source = source.toString();\r\n \r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n \r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === '\"' ? stringDoubleRe : stringSingleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === s_sl) {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === s_sl) { // Line\r\n while (charAt(++offset) !== s_nl)\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === s_as) { /* Block */\r\n do {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== s_as || curr !== s_sl);\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return s_sl;\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === '\"' || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable default-case, callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type; \r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nvar Enum = require(5),\r\n OneOf = require(12),\r\n Field = require(6),\r\n Service = require(17),\r\n Prototype = require(14),\r\n Reader = require(15),\r\n Writer = require(26),\r\n encoder = require(4),\r\n decoder = require(3),\r\n verifier = require(25),\r\n inherits = require(7),\r\n util = require(21);\r\n\r\nvar codegen = util.codegen;\r\n\r\n/**\r\n * Constructs a new message type.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {?Function}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nObject.defineProperties(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: TypePrototype.getFieldsById = function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: TypePrototype.getFieldsArray = function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: TypePrototype.getOneofsArray = function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Prototype}\r\n */\r\n ctor: {\r\n get: TypePrototype.getCtor = function getCtor() {\r\n if (this._ctor)\r\n return this._ctor;\r\n var ctor;\r\n if (codegen.supported)\r\n ctor = codegen(\"p\")(\"P.call(this,p)\").eof(this.getFullName() + \"$ctor\", {\r\n P: Prototype\r\n });\r\n else\r\n ctor = function GenericMessage(properties) {\r\n Prototype.call(this, properties);\r\n };\r\n ctor.prototype = inherits(ctor, this);\r\n this._ctor = ctor;\r\n return ctor;\r\n },\r\n set: TypePrototype.setCtor = function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolve() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @param {?Function} [ctor] Constructor to use.\r\n * Defaults to use the internal constuctor.\r\n * @returns {Prototype} Message instance\r\n */\r\nTypePrototype.create = function create(properties, ctor) {\r\n if (typeof properties === 'function') {\r\n ctor = properties;\r\n properties = undefined;\r\n } else if (properties /* already */ instanceof Prototype)\r\n return properties;\r\n if (ctor) {\r\n if (!(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n } else\r\n ctor = this.getCtor();\r\n return new ctor(properties);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode(message, writer) {\r\n return (this.encode = codegen.supported\r\n ? encoder.generate(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : encoder.fallback\r\n ).call(this, message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decode = function decode(readerOrBuffer, length) {\r\n return (this.decode = codegen.supported\r\n ? decoder.generate(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : decoder.fallback\r\n ).call(this, readerOrBuffer, length);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that enum values are valid and that any required fields are present.\r\n * @param {Prototype|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify(message) {\r\n return (this.verify = codegen.supported\r\n ? verifier.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : verifier.fallback\r\n ).call(this, message);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\" // 14\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\nvar emptyArray = [];\r\nif (Object.freeze)\r\n Object.freeze(emptyArray);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ emptyArray\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Utility functions.\r\n * @namespace\r\n */\r\nvar util = exports;\r\n\r\nutil.codegen = require(22);\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @memberof util\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nfunction isString(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\n\r\nutil.isString = isString;\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return Boolean(value && typeof value === 'object');\r\n};\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=a string] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Returns a promise from a node-style function.\r\n * @memberof util\r\n * @param {function(Error, ...*)} fn Function to call\r\n * @param {Object} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var args = [];\r\n for (var i = 2; i < arguments.length; ++i)\r\n args.push(arguments[i]);\r\n return new Promise(function(resolve, reject) {\r\n fn.apply(ctx, args.concat(\r\n function(err/*, varargs */) {\r\n if (err) reject(err);\r\n else resolve.apply(null, Array.prototype.slice.call(arguments, 1));\r\n }\r\n ));\r\n });\r\n}\r\n\r\nutil.asPromise = asPromise;\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {function(?Error, string=)} [callback] Node-style callback\r\n * @returns {Promise|undefined} Promise if callback has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, util, path);\r\n var fs; try { fs = require(\"fs\"); } catch (e) {} // eslint-disable-line no-empty\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", callback);\r\n var xhr = new XMLHttpRequest();\r\n function onload() {\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n if (isString(xhr.responseText))\r\n return callback(null, xhr.responseText);\r\n return callback(Error(\"request failed\"));\r\n }\r\n xhr.onreadystatechange = function() {\r\n if (xhr.readyState === 4)\r\n onload();\r\n };\r\n xhr.open(\"GET\", path, true);\r\n xhr.send();\r\n return undefined;\r\n}\r\n\r\nutil.fetch = fetch;\r\n\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @memberof util\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\nfunction isAbsolutePath(path) {\r\n return /^(?:\\/|[a-zA-Z0-9]+:)/.test(path);\r\n}\r\n\r\nutil.isAbsolutePath = isAbsolutePath;\r\n\r\n/**\r\n * Normalizes the specified path.\r\n * @memberof util\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\nfunction normalizePath(path) {\r\n path = path.replace(/\\\\/g, '/')\r\n .replace(/\\/{2,}/g, '/');\r\n var parts = path.split('/');\r\n var abs = isAbsolutePath(path);\r\n var prefix = \"\";\r\n if (abs)\r\n prefix = parts.shift() + '/';\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === '..') {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (abs)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === '.')\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join('/');\r\n}\r\n\r\nutil.normalizePath = normalizePath;\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path that was used to fetch the origin file\r\n * @param {string} importPath Import path specified in the origin file\r\n * @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the imported file\r\n */\r\nutil.resolvePath = function resolvePath(originPath, importPath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n importPath = normalizePath(importPath);\r\n if (isAbsolutePath(importPath))\r\n return importPath;\r\n if (!alreadyNormalized)\r\n originPath = normalizePath(originPath);\r\n originPath = originPath.replace(/(?:\\/|^)[^/]+$/, '');\r\n return originPath.length ? normalizePath(originPath + '/' + importPath) : importPath;\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n// Reserved words, ref: https://msdn.microsoft.com/en-us/library/ttyab5c8.aspx\r\n// var reserved = \"break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,false,finally,for,function,if,import,in,instanceof,new,null,protected,return,super,switch,this,throw,true,try,typeof,var,while,with,abstract,boolean,byte,char,decimal,double,enum,final,float,get,implements,int,interface,internal,long,package,private,protected,public,sbyte,set,short,static,uint,ulong,ushort,void,assert,ensure,event,goto,invariant,namespace,native,require,synchronized,throws,transient,use,volatile\".split(',');\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n // NOTE: While dot notation looks cleaner it doesn't seem to have a significant impact on performance.\r\n // Hence, we can safe the extra bytes from providing the reserved keywords above for pre-ES5 envs.\r\n return /* /^[a-z_$][a-z0-9_$]*$/i.test(prop) && !reserved.indexOf(prop) ? \".\" + prop : */ \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n return new (util.Buffer || typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size || 0);\r\n};\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(24));\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * Programmatically generates a function.\r\n * @memberof util\r\n * @param {...string} params Function parameter names\r\n * @returns {util.CodegenAppender} Printf-like appender function\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen(/* varargs */) {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'];\r\n\r\n var indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * Appends a printf-like formatted line to the generated source. Returned when calling {@link util.codegen}.\r\n * @typedef CodegenAppender\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} format A printf-like format string\r\n * @param {...*} params Format replacements\r\n * @returns {util.CodegenAppender} Itself\r\n * @property {util.CodegenStringer} str\r\n * @property {util.CodegenEnder} eof\r\n * @see {@link https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args}\r\n */\r\n /**/\r\n function gen() {\r\n var fmt = [];\r\n for (var i = 0; i < arguments.length; ++i)\r\n fmt[i] = arguments[i];\r\n var line = gen.fmt.apply(null, fmt);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (var index = 0; index < level; ++index)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n gen.fmt = function fmt(format) {\r\n var params = Array.prototype.slice.call(arguments, 1),\r\n index = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var param = params[index++];\r\n return $1 === \"j\"\r\n ? JSON.stringify(param)\r\n : String(param);\r\n });\r\n };\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @typedef CodegenStringer\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n */\r\n /**/\r\n gen.str = function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + args.join(\",\") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n };\r\n\r\n /**\r\n * Ends generation and builds the function.\r\n * @typedef CodegenEnder\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object|Array.} [scope] Function scope\r\n * @returns {function} A function to apply the scope manually when `scope` is an array, otherwise the generated function with scope applied\r\n */\r\n /**/\r\n gen.eof = function eof(name, scope) {\r\n if (name && typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var code = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + code.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n code = \"return \" + code;\r\n var params, values = [];\r\n if (Array.isArray(scope)) {\r\n params = scope.slice();\r\n } else if (scope) {\r\n params = Object.keys(scope);\r\n values = params.map(function(key) { return scope[key]; });\r\n } else\r\n params = [];\r\n var fn = Function.apply(null, params.concat(code)); // eslint-disable-line no-new-func\r\n return values ? fn.apply(null, values) : fn();\r\n };\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false;\r\ntry { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\n\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(21);\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nLongBits.from = function from(value) {\r\n switch (typeof value) { // eslint-disable-line default-case\r\n case 'number':\r\n return LongBits.fromNumber(value);\r\n case 'string':\r\n value = util.Long.fromString(value); // throws without a long lib\r\n }\r\n return (value.low || value.high) && new LongBits(value.low >>> 0, value.high >>> 0) || zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return new util.Long(this.lo, this.hi, unsigned);\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 & 255,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24 & 255\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n if (part2 === 0) {\r\n if (part1 === 0)\r\n return part0 < 1 << 14\r\n ? part0 < 1 << 7 ? 1 : 2\r\n : part0 < 1 << 21 ? 3 : 4;\r\n return part1 < 1 << 14\r\n ? part1 < 1 << 7 ? 5 : 6\r\n : part1 < 1 << 21 ? 7 : 8;\r\n }\r\n return part2 < 1 << 7 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nvar isNode = util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Optional buffer class to use.\r\n * If you assign any compatible buffer implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Buffer = null;\r\n\r\nif (isNode)\r\n try { util.Buffer = require(\"buffer\").Buffer; } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Optional Long class to use.\r\n * If you assign any compatible long implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || null;\r\n\r\nif (!util.Long && isNode)\r\n try { util.Long = require(\"long\"); } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? LongBits.from(value).toHash()\r\n : '\\0\\0\\0\\0\\0\\0\\0\\0';\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === 'number'\r\n ? typeof b === 'number'\r\n ? a !== b\r\n : (a = LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === 'number'\r\n ? (b = LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Runtime message verifier using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar verifier = exports;\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n util = require(21);\r\n\r\n/**\r\n * Verifies a runtime message of `this` message type.\r\n * @param {Prototype|Object} message Runtime message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n * @this {Type}\r\n */\r\nverifier.fallback = function fallback(message) {\r\n var fields = this.getFieldsArray(),\r\n i = 0;\r\n while (i < fields.length) {\r\n var field = fields[i++].resolve(),\r\n value = message[field.name];\r\n\r\n if (value === undefined) {\r\n if (field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Enum && field.resolvedType.getValuesById()[value] === undefined) {\r\n return \"invalid enum value \" + field.name + \" = \" + value + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (!value && field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n var reason;\r\n if ((reason = field.resolvedType.verify(value)) !== null)\r\n return reason;\r\n }\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\nverifier.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n var hasReasonVar = false;\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n prop = util.safeProp(field.name);\r\n if (field.required) { gen\r\n\r\n (\"if(m%s===undefined)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n } else if (field.resolvedType instanceof Enum) {\r\n var values = util.toArray(field.resolvedType.values); gen\r\n\r\n (\"switch(m%s){\", prop)\r\n (\"default:\")\r\n (\"return 'invalid enum value %s = '+m%s+' in %s'\", field.name, prop, mtype.getFullName());\r\n\r\n for (var j = 0, l = values.length; j < l; ++j) gen\r\n (\"case %d:\", values[j]); gen\r\n (\"}\");\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (field.required) gen\r\n\r\n (\"if(!m%s)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n if (!hasReasonVar) { gen(\"var r\"); hasReasonVar = true; } gen\r\n\r\n (\"if((r=types[%d].verify(m%s))!==null)\", i, prop)\r\n (\"return r\");\r\n }\r\n }\r\n return gen\r\n (\"return null\");\r\n /* eslint-enable no-unexpected-multiline */\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\n/**\r\n * Configures the writer interface according to the environment.\r\n * @memberof Writer\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n writeBytes = ArrayImpl.prototype.set && writeBytes_set || writeBytes_for;\r\n}\r\n\r\nWriter.configure = configure;\r\n\r\n/**\r\n * Constructs a new writer operation.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {*} val Value to write\r\n * @param {number} len Value byte length\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, val, len) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {?Writer.Op}\r\n */\r\n this.next = null;\r\n}\r\n\r\nWriter.Op = Op;\r\n\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * When called as a function, returns an appropriate writer for the current environment.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @exports Writer\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n if (!(this instanceof Writer))\r\n return util.Buffer && new BufferWriter() || new Writer();\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * State stack.\r\n * @type {Object[]}\r\n */\r\n this.stack = [];\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n var op = new Op(fn, val, len);\r\n this.tail.next = op;\r\n this.tail = op;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(buf, pos, val) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\n/**\r\n * Writes a tag.\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.tag = function write_tag(id, wireType) {\r\n return this.push(writeByte, 1, id << 3 | wireType & 7);\r\n};\r\n\r\nfunction writeVarint32(buf, pos, val) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value >>>= 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32(value << 1 ^ value >> 31);\r\n};\r\n\r\nfunction writeVarint64(buf, pos, val) {\r\n // tends to deoptimize. stays optimized when using bits directly.\r\n while (val.hi || val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(buf, pos, val) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24 & 255;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\nfunction writeFloat(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 23, 4);\r\n}\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nfunction writeDouble(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 52, 8);\r\n}\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes;\r\n\r\nfunction writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n}\r\n\r\nfunction writeBytes_for(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n}\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeString(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i) {\r\n var c1 = val.charCodeAt(i), c2;\r\n if (c1 < 128) {\r\n buf[pos++] = c1;\r\n } else if (c1 < 2048) {\r\n buf[pos++] = c1 >> 6 | 192;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = val.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buf[pos++] = c1 >> 18 | 240;\r\n buf[pos++] = c1 >> 12 & 63 | 128;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else {\r\n buf[pos++] = c1 >> 12 | 224;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n }\r\n }\r\n}\r\n\r\nfunction byteLength(val) {\r\n var strlen = val.length >>> 0;\r\n var len = 0;\r\n for (var i = 0; i < strlen; ++i) {\r\n var c1 = val.charCodeAt(i);\r\n if (c1 < 128)\r\n len += 1;\r\n else if (c1 < 2048)\r\n len += 2;\r\n else if ((c1 & 0xFC00) === 0xD800 && (val.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n}\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeString, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#ldelim}, {@link Writer#reset} or {@link Writer#finish} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.stack.push(new State(this));\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.stack.length) {\r\n var state = this.stack.pop();\r\n this.head = state.head;\r\n this.tail = state.tail;\r\n this.len = state.len;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @param {number} [id] Id with wire type 2 to prepend where applicable\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim(id) {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset();\r\n if (id !== undefined)\r\n this.tag(id, 2);\r\n this.uint32(len);\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of write operations and frees all resources.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = new ArrayImpl(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer writer.\r\n * @classdesc Wire format writer using node buffers.\r\n * @exports BufferWriter\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nfunction writeFloatBuffer(buf, pos, val) {\r\n buf.writeFloatLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.float = function write_float_buffer(value) {\r\n return this.push(writeFloatBuffer, 4, value);\r\n};\r\n\r\nfunction writeDoubleBuffer(buf, pos, val) {\r\n buf.writeDoubleLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.double = function write_double_buffer(value) {\r\n return this.push(writeDoubleBuffer, 8, value);\r\n};\r\n\r\nfunction writeBytesBuffer(buf, pos, val) {\r\n if (val.length)\r\n val.copy(buf, pos, 0, val.length);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytesBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeStringBuffer(buf, pos, val) {\r\n if (val.length < 40) // plain js is faster for short strings\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\t\t\r\n var len = value.length < 40\r\n ? byteLength(value)\r\n : util.Buffer.byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeStringBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.finish = function finish_buffer() {\r\n var head = this.head.next, // skip noop\r\n buf = util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(this.len) || new util.Buffer(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @param {function(?Error, Root=)} [callback] Callback function\r\n * @returns {Promise|Object} A promise if callback has been omitted, otherwise the protobuf namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === 'function') {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback) || protobuf;\r\n}\r\n\r\nprotobuf.load = load;\r\n\r\n// Parser\r\nprotobuf.tokenize = require(\"./tokenize\");\r\nprotobuf.parse = require(\"./parse\");\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = protobuf.Writer.BufferWriter;\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = protobuf.Reader.BufferReader;\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Prototype = require(\"./prototype\");\r\nprotobuf.inherits = require(\"./inherits\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.common = require(\"./common\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\r\n/* eslint-disable no-undef */\r\nif (typeof define === 'function' && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n protobuf.Reader.configure();\r\n protobuf.Writer.configure();\r\n }\r\n return protobuf;\r\n });\r\n/* eslint-enable no-undef */\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/common.js","src/decoder.js","src/encoder.js","src/enum.js","src/field.js","src/inherits.js","src/mapfield.js","src/method.js","src/namespace.js","src/object.js","src/oneof.js","src/parse.js","src/prototype.js","src/reader.js","src/root.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/codegen.js","src/util/longbits.js","src/util/runtime.js","src/verifier.js","src/writer.js","src/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","read","buffer","offset","isBE","mLen","nBytes","m","eLen","eMax","eBias","nBits","d","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","common","name","json","test","nested","google","protobuf","Any","fields","type_url","type","id","timeType","Duration","seconds","nanos","Timestamp","Empty","Struct","keyType","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","values","NULL_VALUE","ListValue","rule","decoder","Enum","Reader","types","util","fallback","reader","this","getFieldsById","limit","undefined","len","pos","message","getCtor","tag","field","resolve","resolvedType","map","resolvedKeyType","uint32","ks","vs","basic","decode","longToHash","repeated","packed","wireType","plimit","skipType","generate","mtype","getFieldsArray","gen","codegen","prop","safeProp","encoder","Writer","writer","fi","keys","Object","fork","mapKey","encode","ldelim","required","long","longNeq","defaultValue","reset","keyWireType","options","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","extend","_TypeError","defineProperties","valuesById","get","getValuesById","forEach","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","isObject","toString","toLowerCase","optional","partOf","Long","extensionField","declaringField","_packed","FieldPrototype","Type","MapField","isPacked","getOption","setOption","ifNotSet","prototype","role","resolved","typeDefault","defaults","parent","lookup","optionDefault","fromValue","jsonConvert","String","Number","toNumber","charAt","inherits","clazz","classProperties","$type","noStatics","merge","encodeDelimited","decodeDelimited","verify","Prototype","constructor","noRegister","setCtor","prototypeProperties","getOneofsArray","ucName","set","MapFieldPrototype","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","Namespace","_nestedArray","namespace","arrayToJSON","array","obj","NamespacePrototype","Service","nestedTypes","nestedError","ctor","join","nestedArray","getNestedArray","toArray","methods","addJSON","nestedJson","ns","nestedName","j","object","indexOf","prev","setOptions","onAdd","onRemove","define","path","split","Array","isArray","ptr","part","shift","resolveAll","parentAlreadyChecked","getRoot","slice","found","proto","create","Root","ReflectionObjectPrototype","root","fullName","getFullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","substring","toUpperCase","_fields","addFieldsToParent","OneOfPrototype","push","index","splice","lower","token","camelCase","replace","$0","$1","parse","source","illegal","tn","line","s_bclose","readString","next","s_dq","s_sq","skip","peek","readValue","acceptTypeRef","parseNumber","typeRefRe","readRange","start","parseId","end","s_semi","sign","tokenLower","parseInt","parseFloat","acceptNegative","parsePackage","pkg","s_name","parseImport","whichImports","weakImports","imports","parseSyntax","syntax","p3","isProto3","parseCommon","s_option","parseOption","parseType","parseEnum","parseService","parseExtension","nameRe","s_open","s_close","parseMapField","s_required","s_optional","s_repeated","parseField","parseOneOf","extensions","reserved","s_type","parseInlineOptions","valueType","parseEnumField","custom","s_bopen","fqTypeRefRe","parseOptionValue","service","parseMethod","st","method","reference","tokenize","head","package","properties","any","fieldsOnly","asJSON","key","indexOutOfRange","writeLength","RangeError","configure","ArrayImpl","Uint8Array","ReaderPrototype","_slice","subarray","int64","read_int64_long","uint64","read_uint64_long","sint64","read_sint64_long","fixed64","read_fixed64_long","sfixed64","read_sfixed64_long","read_int64_number","read_uint64_number","read_sint64_number","read_fixed64_number","read_sfixed64_number","buf","Buffer","isBuffer","BufferReader","Tag","readLongVarint","lo","hi","b","LongBits","toLong","zzDecode","readLongFixed","initBufferReader","ieee754","int32","octet","sint32","bool","fixed32","sfixed32","float","double","bytes","string","out","p","c1","fromCharCode","apply","finish","remain","BufferReaderPrototype","readFloatLE","readDoubleLE","deferred","files","handleExtension","extendedType","sisterField","RootPrototype","resolvePath","load","filename","callback","err","cb","process","JSON","parsed","self","fetch","queued","weak","idx","altname","setTimeout","asPromise","newDeferred","_methodsArray","ServicePrototype","methodsArray","getMethodsArray","methodName","inherited","rpc","requestDelimited","responseDelimited","rpcService","defineProperty","lcName","request","requestData","setImmediate","responseData","response","err2","unescape","str","subject","re","stringDelim","stringDoubleRe","stringSingleRe","lastIndex","match","exec","stack","repeat","curr","s_nl","s_sl","s_as","delimRe","delim","expected","actual","equals","_fieldsById","_fieldsArray","_oneofsArray","_ctor","TypePrototype","verifier","fieldsById","names","fieldsArray","oneofsArray","supported","eof","P","fieldName","oneOfName","filter","fld","readerOrBuffer","bake","emptyArray","freeze","fn","ctx","args","arguments","Promise","reject","concat","onload","xhr","status","responseText","fs","readFile","XMLHttpRequest","onreadystatechange","readyState","open","send","isAbsolutePath","normalizePath","parts","prefix","isFinite","description","TypeError","originPath","importPath","alreadyNormalized","dst","src","newBuffer","size","fmt","level","indent","blockOpenRe","branchRe","casingRe","inCase","breakRe","blockCloseRe","format","params","param","stringify","scope","verbose","console","Function","LongBitsPrototype","zero","zzEncode","fromNumber","from","fromString","low","high","unsigned","charCodeAt","fromHash","hash","toHash","mask","part0","part1","part2","isNode","global","versions","node","dcodeIO","longFromHash","bits","fromBits","reason","hasReasonVar","writeBytes","writeBytes_set","writeBytes_for","Op","val","noop","State","tail","BufferWriter","writeByte","writeVarint32","writeVarint64","writeFixed32","writeFloat","writeDouble","writeString","c2","byteLength","strlen","writeFloatBuffer","writeFloatLE","writeDoubleBuffer","writeDoubleLE","writeBytesBuffer","copy","writeStringBuffer","WriterPrototype","op","state","pop","BufferWriterPrototype","allocUnsafe","amd"],"mappings":";;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCkCAA,EAAAK,KAAA,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA,GAAAxB,GAAAyB,EACAC,EAAA,EAAA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BAAAuO,SAAAA,OAAA8W,KACA9W,QAAA,QAAA,SAAA9E,GAMA,MALAA,KACA/G,EAAAiC,KAAA8E,KAAAA,EACA/G,EAAA+B,OAAAoR,YACAnT,EAAAqE,OAAA8O,aAEAnT","file":"protobuf.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 1,\r\n nBits = -7,\r\n i = isBE ? 0 : (nBytes - 1),\r\n d = isBE ? 1 : -1,\r\n s = buffer[offset + i];\r\n\r\n i += d;\r\n\r\n e = s & ((1 << (-nBits)) - 1);\r\n s >>= (-nBits);\r\n nBits += eLen;\r\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n m = e & ((1 << (-nBits)) - 1);\r\n e >>= (-nBits);\r\n nBits += mLen;\r\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);\r\n\r\n if (e === 0) {\r\n e = 1 - eBias;\r\n } else if (e === eMax) {\r\n return m ? NaN : ((s ? -1 : 1) * Infinity);\r\n } else {\r\n m = m + Math.pow(2, mLen);\r\n e = e - eBias;\r\n }\r\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\r\n};\r\n\r\nexports.write = function writeIEEE754(buffer, value, offset, isBE, mLen, nBytes) {\r\n var e, m, c,\r\n eLen = nBytes * 8 - mLen - 1,\r\n eMax = (1 << eLen) - 1,\r\n eBias = eMax >> 1,\r\n rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\r\n i = isBE ? (nBytes - 1) : 0,\r\n d = isBE ? -1 : 1,\r\n s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\r\n\r\n value = Math.abs(value);\r\n\r\n if (isNaN(value) || value === Infinity) {\r\n m = isNaN(value) ? 1 : 0;\r\n e = eMax;\r\n } else {\r\n e = Math.floor(Math.log(value) / Math.LN2);\r\n if (value * (c = Math.pow(2, -e)) < 1) {\r\n e--;\r\n c *= 2;\r\n }\r\n if (e + eBias >= 1) {\r\n value += rt / c;\r\n } else {\r\n value += rt * Math.pow(2, 1 - eBias);\r\n }\r\n if (value * c >= 2) {\r\n e++;\r\n c /= 2;\r\n }\r\n\r\n if (e + eBias >= eMax) {\r\n m = 0;\r\n e = eMax;\r\n } else if (e + eBias >= 1) {\r\n m = (value * c - 1) * Math.pow(2, mLen);\r\n e = e + eBias;\r\n } else {\r\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\r\n e = 0;\r\n }\r\n }\r\n\r\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);\r\n\r\n e = (e << mLen) | m;\r\n eLen += mLen;\r\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);\r\n\r\n buffer[offset + i - d] |= s * 128;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = common;\r\n\r\n/**\r\n * Provides common type definitions.\r\n * Can also be used to provide additional google types or your own custom types.\r\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\r\n * @param {Object} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\r\n * @returns {undefined}\r\n * @property {Object} google/protobuf/any.proto Any\r\n * @property {Object} google/protobuf/duration.proto Duration\r\n * @property {Object} google/protobuf/empty.proto Empty\r\n * @property {Object} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\r\n * @property {Object} google/protobuf/timestamp.proto Timestamp\r\n */\r\nfunction common(name, json) {\r\n if (!/\\/|\\./.test(name)) {\r\n name = \"google/protobuf/\" + name + \".proto\";\r\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\r\n }\r\n common[name] = json;\r\n}\r\n\r\n// Not provided because of limited use (feel free to discuss or to provide yourself):\r\n// - google/protobuf/descriptor.proto\r\n// - google/protobuf/field_mask.proto\r\n// - google/protobuf/source_context.proto\r\n// - google/protobuf/type.proto\r\n// - google/protobuf/wrappers.proto\r\n\r\ncommon(\"any\", {\r\n Any: {\r\n fields: {\r\n type_url: {\r\n type: \"string\",\r\n id: 1\r\n },\r\n value: {\r\n type: \"bytes\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\nvar timeType;\r\n\r\ncommon(\"duration\", {\r\n Duration: timeType = {\r\n fields: {\r\n seconds: {\r\n type: \"int64\",\r\n id: 1\r\n },\r\n nanos: {\r\n type: \"int32\",\r\n id: 2\r\n }\r\n }\r\n }\r\n});\r\n\r\ncommon(\"timestamp\", {\r\n Timestamp: timeType\r\n});\r\n\r\ncommon(\"empty\", {\r\n Empty: {\r\n fields: {}\r\n }\r\n});\r\n\r\ncommon(\"struct\", {\r\n Struct: {\r\n fields: {\r\n fields: {\r\n keyType: \"string\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n },\r\n Value: {\r\n oneofs: {\r\n kind: {\r\n oneof: [ \"nullValue\", \"numberValue\", \"stringValue\", \"boolValue\", \"structValue\", \"listValue\" ]\r\n }\r\n },\r\n fields: {\r\n nullValue: {\r\n type: \"NullValue\",\r\n id: 1\r\n },\r\n numberValue: {\r\n type: \"double\",\r\n id: 2\r\n },\r\n stringValue: {\r\n type: \"string\",\r\n id: 3\r\n },\r\n boolValue: {\r\n type: \"bool\",\r\n id: 4\r\n },\r\n structValue: {\r\n type: \"Struct\",\r\n id: 5\r\n },\r\n listValue: {\r\n type: \"ListValue\",\r\n id: 6\r\n }\r\n }\r\n },\r\n NullValue: {\r\n values: {\r\n NULL_VALUE: 0\r\n }\r\n },\r\n ListValue: {\r\n fields: {\r\n values: {\r\n rule: \"repeated\",\r\n type: \"Value\",\r\n id: 1\r\n }\r\n }\r\n }\r\n});\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar decoder = exports;\r\n\r\nvar Enum = require(5),\r\n Reader = require(15),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Decodes a message of `this` message's type.\r\n * @param {Reader} reader Reader to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Populated runtime message\r\n * @this Type\r\n */\r\ndecoder.fallback = function fallback(reader, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = reader instanceof Reader ? reader : Reader(reader),\r\n limit = length === undefined ? reader.len : reader.pos + length,\r\n message = new (this.getCtor())();\r\n while (reader.pos < limit) {\r\n var tag = reader.tag(),\r\n field = fields[tag.id].resolve(),\r\n type = field.resolvedType instanceof Enum ? \"uint32\" : field.type;\r\n \r\n // Known fields\r\n if (field) {\r\n\r\n // Map fields\r\n if (field.map) {\r\n var keyType = field.resolvedKeyType /* only valid is enum */ ? \"uint32\" : field.keyType,\r\n length = reader.uint32();\r\n var map = message[field.name] = {};\r\n if (length) {\r\n length += reader.pos;\r\n var ks = [], vs = [];\r\n while (reader.pos < length) {\r\n if (reader.tag().id === 1)\r\n ks[ks.length] = reader[keyType]();\r\n else if (types.basic[type] !== undefined)\r\n vs[vs.length] = reader[type]();\r\n else\r\n vs[vs.length] = field.resolvedType.decode(reader, reader.uint32());\r\n }\r\n for (var i = 0; i < ks.length; ++i)\r\n map[typeof ks[i] === 'object' ? util.longToHash(ks[i]) : ks[i]] = vs[i];\r\n }\r\n\r\n // Repeated fields\r\n } else if (field.repeated) {\r\n var values = message[field.name] || (message[field.name] = []);\r\n\r\n // Packed\r\n if (field.packed && types.packed[type] !== undefined && tag.wireType === 2) {\r\n var plimit = reader.uint32() + reader.pos;\r\n while (reader.pos < plimit)\r\n values[values.length] = reader[type]();\r\n\r\n // Non-packed\r\n } else if (types.basic[type] !== undefined)\r\n values[values.length] = reader[type]();\r\n else\r\n values[values.length] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Non-repeated\r\n } else if (types.basic[type] !== undefined)\r\n message[field.name] = reader[type]();\r\n else\r\n message[field.name] = field.resolvedType.decode(reader, reader.uint32());\r\n\r\n // Unknown fields\r\n } else\r\n reader.skipType(tag.wireType);\r\n }\r\n return message;\r\n /* eslint-enable no-invalid-this, block-scoped-var, no-redeclare */\r\n};\r\n\r\n/**\r\n * Generates a decoder specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\ndecoder.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = util.codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader(r))\")\r\n (\"var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())\")\r\n (\"while(r.pos} [values] Enum values as an object, by name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Enum(name, values, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Enum values by name.\r\n * @type {Object.}\r\n */\r\n this.values = values || {}; // toJSON, marker\r\n\r\n /**\r\n * Cached values by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._valuesById = null;\r\n}\r\n\r\nObject.defineProperties(EnumPrototype, {\r\n\r\n /**\r\n * Enum values by id.\r\n * @name Enum#valuesById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n valuesById: {\r\n get: EnumPrototype.getValuesById = function getValuesById() {\r\n if (!this._valuesById) {\r\n this._valuesById = {};\r\n Object.keys(this.values).forEach(function(name) {\r\n var id = this.values[name];\r\n if (this._valuesById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._valuesById[id] = name;\r\n }, this);\r\n }\r\n return this._valuesById;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(enm) {\r\n enm._valuesById = null;\r\n return enm;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes an enum.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes an enum\r\n */\r\nEnum.testJSON = function testJSON(json) {\r\n return Boolean(json && json.values);\r\n};\r\n\r\n/**\r\n * Creates an enum from JSON.\r\n * @param {string} name Enum name\r\n * @param {Object.} json JSON object\r\n * @returns {Enum} Created enum\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nEnum.fromJSON = function fromJSON(name, json) {\r\n return new Enum(name, json.values, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nEnumPrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n values : this.values\r\n };\r\n};\r\n\r\n/**\r\n * Adds a value to this enum.\r\n * @param {string} name Value name\r\n * @param {number} id Value id\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a value with this name or id\r\n */\r\nEnumPrototype.add = function(name, id) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (this.values[name] !== undefined)\r\n throw Error('duplicate name \"' + name + '\" in ' + this);\r\n if (this.getValuesById()[id] !== undefined)\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this.values[name] = id;\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a value from this enum\r\n * @param {string} name Value name\r\n * @returns {Enum} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `name` is not a name of this enum\r\n */\r\nEnumPrototype.remove = function(name) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (this.values[name] === undefined)\r\n throw Error('\"' + name + '\" is not a name of ' + this);\r\n delete this.values[name];\r\n return clearCache(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Field;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(19),\r\n Enum = require(5),\r\n MapField = require(8),\r\n types = require(20),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new message field. Note that {@link MapField|map fields} have their own class.\r\n * @classdesc Reflected message field.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} type Value type\r\n * @param {string} [rule=optional] Field rule\r\n * @param {string} [extend] Extended type if different from parent\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Field(name, id, type, rule, extend, options) {\r\n if (util.isObject(rule)) {\r\n options = rule;\r\n rule = extend = undefined;\r\n } else if (util.isObject(extend)) {\r\n options = extend;\r\n extend = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (!util.isInteger(id) || id < 0)\r\n throw _TypeError(\"id\", \"a non-negative integer\");\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (extend !== undefined && !util.isString(extend))\r\n throw _TypeError(\"extend\");\r\n if (rule !== undefined && !/^required|optional|repeated$/.test(rule = rule.toString().toLowerCase()))\r\n throw _TypeError(\"rule\", \"a valid rule string\");\r\n\r\n /**\r\n * Field rule, if any.\r\n * @type {string|undefined}\r\n */\r\n this.rule = rule && rule !== 'optional' ? rule : undefined; // toJSON\r\n\r\n /**\r\n * Field type.\r\n * @type {string}\r\n */\r\n this.type = type; // toJSON\r\n\r\n /**\r\n * Unique field id.\r\n * @type {number}\r\n */\r\n this.id = id; // toJSON, marker\r\n\r\n /**\r\n * Extended type if different from parent.\r\n * @type {string|undefined}\r\n */\r\n this.extend = extend || undefined; // toJSON\r\n\r\n /**\r\n * Whether this field is required.\r\n * @type {boolean}\r\n */\r\n this.required = rule === \"required\";\r\n\r\n /**\r\n * Whether this field is optional.\r\n * @type {boolean}\r\n */\r\n this.optional = !this.required;\r\n\r\n /**\r\n * Whether this field is repeated.\r\n * @type {boolean}\r\n */\r\n this.repeated = rule === \"repeated\";\r\n\r\n /**\r\n * Whether this field is a map or not.\r\n * @type {boolean}\r\n */\r\n this.map = false;\r\n\r\n /**\r\n * Message this field belongs to.\r\n * @type {?Type}\r\n */\r\n this.message = null;\r\n\r\n /**\r\n * OneOf this field belongs to, if any,\r\n * @type {?OneOf}\r\n */\r\n this.partOf = null;\r\n\r\n /**\r\n * The field's default value. Only relevant when working with proto2.\r\n * @type {*}\r\n */\r\n this.defaultValue = null;\r\n\r\n /**\r\n * Whether this field's value should be treated as a long.\r\n * @type {boolean}\r\n */\r\n this.long = util.Long ? types.long[type] !== undefined : false;\r\n\r\n /**\r\n * Resolved type if not a basic type.\r\n * @type {?(Type|Enum)}\r\n */\r\n this.resolvedType = null;\r\n\r\n /**\r\n * Sister-field within the extended type if a declaring extension field.\r\n * @type {?Field}\r\n */\r\n this.extensionField = null;\r\n\r\n /**\r\n * Sister-field within the declaring namespace if an extended field.\r\n * @type {?Field}\r\n */\r\n this.declaringField = null;\r\n\r\n /**\r\n * Internally remembers whether this field is packed.\r\n * @type {?boolean}\r\n * @private\r\n */\r\n this._packed = null;\r\n}\r\n\r\nObject.defineProperties(FieldPrototype, {\r\n\r\n /**\r\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\r\n * @name Field#packed\r\n * @type {boolean}\r\n * @readonly\r\n */\r\n packed: {\r\n get: FieldPrototype.isPacked = function() {\r\n if (this._packed === null)\r\n this._packed = this.getOption(\"packed\") !== false;\r\n return this._packed;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (name === \"packed\")\r\n this._packed = null;\r\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\r\n};\r\n\r\n/**\r\n * Tests if the specified JSON object describes a field.\r\n * @param {*} json Any JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nField.testJSON = function testJSON(json) {\r\n return Boolean(json && json.id !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {Field} Created field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nField.fromJSON = function fromJSON(name, json) {\r\n if (json.keyType !== undefined)\r\n return MapField.fromJSON(name, json);\r\n return new Field(name, json.id, json.type, json.role, json.extend, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n rule : this.rule !== \"optional\" && this.rule || undefined,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Resolves this field's type references.\r\n * @returns {Field} `this`\r\n * @throws {Error} If any reference cannot be resolved\r\n */\r\nFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n\r\n var typeDefault = types.defaults[this.type];\r\n\r\n // if not a basic type, resolve it\r\n if (typeDefault === undefined) {\r\n var resolved = this.parent.lookup(this.type);\r\n if (resolved instanceof Type) {\r\n this.resolvedType = resolved;\r\n typeDefault = null;\r\n } else if (resolved instanceof Enum) {\r\n this.resolvedType = resolved;\r\n typeDefault = 0;\r\n } else\r\n throw Error(\"unresolvable field type: \" + this.type);\r\n }\r\n\r\n // when everything is resolved determine the default value\r\n var optionDefault;\r\n if (this.map)\r\n this.defaultValue = {};\r\n else if (this.repeated)\r\n this.defaultValue = [];\r\n else if (this.options && (optionDefault = this.options['default']) !== undefined) // eslint-disable-line dot-notation\r\n this.defaultValue = optionDefault;\r\n else\r\n this.defaultValue = typeDefault;\r\n\r\n if (this.long)\r\n this.defaultValue = util.Long.fromValue(this.defaultValue);\r\n \r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Converts a field value to JSON using the specified options. Note that this method does not account for repeated fields and must be called once for each repeated element instead.\r\n * @param {*} value Field value\r\n * @param {Object.} [options] Conversion options\r\n * @returns {*} Converted value\r\n * @see {@link Prototype#asJSON}\r\n */\r\nFieldPrototype.jsonConvert = function(value, options) {\r\n if (options) {\r\n if (this.resolvedType instanceof Enum && options['enum'] === String) // eslint-disable-line dot-notation\r\n return this.resolvedType.getValuesById()[value];\r\n else if (this.long && options.long)\r\n return options.long === Number\r\n ? typeof value === 'number'\r\n ? value\r\n : util.Long.fromValue(value).toNumber()\r\n : util.Long.fromValue(value, this.type.charAt(0) === 'u').toString();\r\n }\r\n return value;\r\n};\r\n","\"use strict\";\r\nmodule.exports = inherits;\r\n\r\nvar Prototype = require(14),\r\n Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Options passed to {@link inherits}, modifying its behavior.\r\n * @typedef InheritanceOptions\r\n * @type {Object}\r\n * @property {boolean} [noStatics=false] Skips adding the default static methods on top of the constructor\r\n * @property {boolean} [noRegister=false] Skips registering the constructor with the reflected type\r\n */\r\n\r\n/**\r\n * Inherits a custom class from the message prototype of the specified message type.\r\n * @param {Function} clazz Inheriting class\r\n * @param {Type} type Inherited message type\r\n * @param {InheritanceOptions} [options] Inheritance options\r\n * @returns {Prototype} Created prototype\r\n */\r\nfunction inherits(clazz, type, options) {\r\n if (typeof clazz !== 'function')\r\n throw _TypeError(\"clazz\", \"a function\");\r\n if (!(type instanceof Type))\r\n throw _TypeError(\"type\", \"a Type\");\r\n if (!options)\r\n options = {};\r\n\r\n /**\r\n * This is not an actual type but stands as a reference for any constructor of a custom message class that you pass to the library.\r\n * @name Class\r\n * @extends Prototype\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set on the message\r\n * @see {@link inherits}\r\n */\r\n\r\n var classProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Class.$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n if (!options.noStatics)\r\n util.merge(classProperties, {\r\n\r\n /**\r\n * Encodes a message of this type to a buffer.\r\n * @name Class.encode\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encode: {\r\n value: function encode(message, writer) {\r\n return this.$type.encode(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Encodes a message of this type preceeded by its length as a varint to a buffer.\r\n * @name Class.encodeDelimited\r\n * @function\r\n * @param {Prototype|Object} message Message to encode\r\n * @param {Writer} [writer] Writer to use\r\n * @returns {Writer} Writer\r\n */\r\n encodeDelimited: {\r\n value: function encodeDelimited(message, writer) {\r\n return this.$type.encodeDelimited(message, writer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type from a buffer.\r\n * @name Class.decode\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decode: {\r\n value: function decode(buffer) {\r\n return this.$type.decode(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Decodes a message of this type preceeded by its length as a varint from a buffer.\r\n * @name Class.decodeDelimited\r\n * @function\r\n * @param {Uint8Array} buffer Buffer to decode\r\n * @returns {Prototype} Decoded message\r\n */\r\n decodeDelimited: {\r\n value: function decodeDelimited(buffer) {\r\n return this.$type.decodeDelimited(buffer);\r\n }\r\n },\r\n\r\n /**\r\n * Verifies a message of this type.\r\n * @name Class.verify\r\n * @function\r\n * @param {Prototype|Object} message Message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\n verify: {\r\n value: function verify(message) {\r\n return this.$type.verify(message);\r\n }\r\n }\r\n\r\n }, true);\r\n\r\n Object.defineProperties(clazz, classProperties);\r\n var prototype = inherits.defineProperties(new Prototype(), type);\r\n clazz.prototype = prototype;\r\n prototype.constructor = clazz;\r\n\r\n if (!options.noRegister)\r\n type.setCtor(clazz);\r\n\r\n return prototype;\r\n}\r\n\r\n/**\r\n * Defines the reflected type's default values and virtual oneof properties on the specified prototype.\r\n * @memberof inherits\r\n * @param {Prototype} prototype Prototype to define properties upon\r\n * @param {Type} type Reflected message type\r\n * @returns {Prototype} The specified prototype\r\n */\r\ninherits.defineProperties = function defineProperties(prototype, type) {\r\n\r\n var prototypeProperties = {\r\n\r\n /**\r\n * Reference to the reflected type.\r\n * @name Prototype#$type\r\n * @type {Type}\r\n * @readonly\r\n */\r\n $type: {\r\n value: type\r\n }\r\n };\r\n\r\n // Initialize default values\r\n type.getFieldsArray().forEach(function(field) {\r\n field.resolve();\r\n if (!util.isObject(field.defaultValue))\r\n // objects are mutable (i.e. would modify the array on the prototype, not the instance)\r\n prototype[field.name] = field.defaultValue;\r\n });\r\n\r\n // Define each oneof with a non-enumerable getter and setter for the present field\r\n type.getOneofsArray().forEach(function(oneof) {\r\n oneof.resolve();\r\n prototypeProperties[oneof.name] = {\r\n get: prototype['get' + oneof.ucName] = function() {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = oneof.parent.fields[keys[i]];\r\n if (this[keys[i]] != field.defaultValue) // eslint-disable-line eqeqeq\r\n return keys[i];\r\n }\r\n return undefined;\r\n },\r\n set: prototype['set' + oneof.ucName] = function(value) {\r\n var keys = oneof.oneof;\r\n for (var i = 0; i < keys.length; ++i) {\r\n if (keys[i] !== value)\r\n delete this[keys[i]];\r\n }\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperties(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(6);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = Field.prototype;\r\n/** @alias MapField.prototype */\r\nvar MapFieldPrototype = Field.extend(MapField);\r\n\r\nvar Enum = require(5),\r\n types = require(20),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new map field.\r\n * @classdesc Reflected map field.\r\n * @extends Field\r\n * @constructor\r\n * @param {string} name Unique name within its namespace\r\n * @param {number} id Unique id within its namespace\r\n * @param {string} keyType Key type\r\n * @param {string} type Value type\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction MapField(name, id, keyType, type, options) {\r\n Field.call(this, name, id, type, options);\r\n if (!util.isString(keyType))\r\n throw util._TypeError(\"keyType\");\r\n \r\n /**\r\n * Key type.\r\n * @type {string}\r\n */\r\n this.keyType = keyType; // toJSON, marker\r\n\r\n /**\r\n * Resolved key type if not a basic type.\r\n * @type {?ReflectionObject}\r\n */\r\n this.resolvedKeyType = null;\r\n\r\n // Overrides Field#map\r\n this.map = true;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a map field.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a field\r\n */\r\nMapField.testJSON = function testJSON(json) {\r\n return Field.testJSON(json) && json.keyType !== undefined;\r\n};\r\n\r\n/**\r\n * Constructs a map field from JSON.\r\n * @param {string} name Field name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created map field\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMapField.fromJSON = function fromJSON(name, json) {\r\n return new MapField(name, json.id, json.keyType, json.type, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.toJSON = function toJSON() {\r\n return {\r\n keyType : this.keyType,\r\n type : this.type,\r\n id : this.id,\r\n extend : this.extend,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMapFieldPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n \r\n // Besides a value type, map fields have a key type to resolve\r\n var keyWireType = types.mapKey[this.keyType];\r\n if (keyWireType === undefined) {\r\n var resolved = this.parent.lookup(this.keyType);\r\n if (!(resolved instanceof Enum))\r\n throw Error(\"unresolvable map key type: \" + this.keyType);\r\n this.resolvedKeyType = resolved;\r\n }\r\n\r\n return FieldPrototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Method;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(19),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new service method.\r\n * @classdesc Reflected service method.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Method name\r\n * @param {string|undefined} type Method type, usually `\"rpc\"`\r\n * @param {string} requestType Request message type\r\n * @param {string} responseType Response message type\r\n * @param {boolean} [requestStream] Whether the request is streamed\r\n * @param {boolean} [responseStream] Whether the response is streamed\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\r\n if (util.isObject(requestStream)) {\r\n options = requestStream;\r\n requestStream = responseStream = undefined;\r\n } else if (util.isObject(responseStream)) {\r\n options = responseStream;\r\n responseStream = undefined;\r\n }\r\n if (!util.isString(type))\r\n throw _TypeError(\"type\");\r\n if (!util.isString(requestType))\r\n throw _TypeError(\"requestType\");\r\n if (!util.isString(responseType))\r\n throw _TypeError(\"responseType\");\r\n\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Method type.\r\n * @type {string}\r\n */\r\n this.type = type || \"rpc\"; // toJSON\r\n\r\n /**\r\n * Request type.\r\n * @type {string}\r\n */\r\n this.requestType = requestType; // toJSON, marker\r\n\r\n /**\r\n * Whether requests are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.requestStream = requestStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Response type.\r\n * @type {string}\r\n */\r\n this.responseType = responseType; // toJSON\r\n\r\n /**\r\n * Whether responses are streamed or not.\r\n * @type {boolean|undefined}\r\n */\r\n this.responseStream = responseStream ? true : undefined; // toJSON\r\n\r\n /**\r\n * Resolved request type.\r\n * @type {?Type}\r\n */\r\n this.resolvedRequestType = null;\r\n\r\n /**\r\n * Resolved response type.\r\n * @type {?Type}\r\n */\r\n this.resolvedResponseType = null;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service method.\r\n * @param {Object} json JSON object\r\n * @returns {boolean} `true` if the object describes a map field\r\n */\r\nMethod.testJSON = function testJSON(json) {\r\n return Boolean(json && json.requestType !== undefined);\r\n};\r\n\r\n/**\r\n * Constructs a service method from JSON.\r\n * @param {string} name Method name\r\n * @param {Object} json JSON object\r\n * @returns {Method} Created method\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nMethod.fromJSON = function fromJSON(name, json) {\r\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.toJSON = function toJSON() {\r\n return {\r\n type : this.type !== \"rpc\" && this.type || undefined,\r\n requestType : this.requestType,\r\n requestStream : this.requestStream,\r\n responseType : this.responseType,\r\n responseStream : this.responseStream,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nMethodPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var resolved = this.parent.lookup(this.requestType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable request type: \" + this.requestType);\r\n this.resolvedRequestType = resolved;\r\n resolved = this.parent.lookup(this.responseType);\r\n if (!(resolved && resolved instanceof Type))\r\n throw Error(\"unresolvable response type: \" + this.requestType);\r\n this.resolvedResponseType = resolved;\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n","\"use strict\";\r\nmodule.exports = Namespace;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n Field = require(6),\r\n Service = require(17),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\nvar nestedTypes = [ Enum, Type, Service, Field, Namespace ],\r\n nestedError = \"one of \" + nestedTypes.map(function(ctor) { return ctor.name; }).join(', ');\r\n\r\n/**\r\n * Constructs a new namespace.\r\n * @classdesc Reflected namespace and base class of all reflection objects containing nested objects.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Namespace name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Namespace(name, options) {\r\n ReflectionObject.call(this, name, options);\r\n\r\n /**\r\n * Nested objects by name.\r\n * @type {Object.|undefined}\r\n */\r\n this.nested = undefined; // toJSON\r\n\r\n /**\r\n * Cached nested objects as an array.\r\n * @type {?ReflectionObject[]}\r\n * @private\r\n */\r\n this._nestedArray = null;\r\n}\r\n\r\nfunction clearCache(namespace) {\r\n namespace._nestedArray = null;\r\n return namespace;\r\n}\r\n\r\nObject.defineProperties(NamespacePrototype, {\r\n\r\n /**\r\n * Nested objects of this namespace as an array for iteration.\r\n * @name Namespace#nestedArray\r\n * @type {ReflectionObject[]}\r\n * @readonly\r\n */\r\n nestedArray: {\r\n get: NamespacePrototype.getNestedArray = function getNestedArray() {\r\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Tests if the specified JSON object describes not another reflection object.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes not another reflection object\r\n */\r\nNamespace.testJSON = function testJSON(json) {\r\n return Boolean(json\r\n && !json.fields // Type\r\n && !json.values // Enum\r\n && json.id === undefined // Field, MapField\r\n && !json.oneof // OneOf\r\n && !json.methods // Service\r\n && json.requestType === undefined // Method\r\n );\r\n};\r\n\r\n/**\r\n * Constructs a namespace from JSON.\r\n * @param {string} name Namespace name\r\n * @param {Object} json JSON object\r\n * @returns {Namespace} Created namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nNamespace.fromJSON = function fromJSON(name, json) {\r\n return new Namespace(name, json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nNamespacePrototype.toJSON = function toJSON() {\r\n return {\r\n options : this.options,\r\n nested : arrayToJSON(this.getNestedArray())\r\n };\r\n};\r\n\r\n/**\r\n * Converts an array of reflection objects to JSON.\r\n * @memberof Namespace\r\n * @param {ReflectionObject[]} array Object array\r\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\r\n */\r\nfunction arrayToJSON(array) {\r\n if (!(array && array.length))\r\n return undefined;\r\n var obj = {};\r\n for (var i = 0; i < array.length; ++i)\r\n obj[array[i].name] = array[i].toJSON();\r\n return obj;\r\n}\r\n\r\nNamespace.arrayToJSON = arrayToJSON;\r\n\r\n/**\r\n * Adds nested elements to this namespace from JSON.\r\n * @param {Object.} nestedJson Nested JSON\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.addJSON = function addJSON(nestedJson) {\r\n var ns = this;\r\n if (nestedJson)\r\n Object.keys(nestedJson).forEach(function(nestedName) {\r\n var nested = nestedJson[nestedName];\r\n for (var j = 0; j < nestedTypes.length; ++j)\r\n if (nestedTypes[j].testJSON(nested))\r\n return ns.add(nestedTypes[j].fromJSON(nestedName, nested));\r\n throw _TypeError(\"nested.\" + nestedName, \"JSON for \" + nestedError);\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets the nested object of the specified name.\r\n * @param {string} name Nested object name\r\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\r\n */\r\nNamespacePrototype.get = function get(name) {\r\n if (this.nested === undefined) // prevents deopt\r\n return null;\r\n return this.nested[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this namespace.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name\r\n */\r\nNamespacePrototype.add = function add(object) {\r\n if (!object || nestedTypes.indexOf(object.constructor) < 0)\r\n throw _TypeError(\"object\", nestedError);\r\n if (object instanceof Field && object.extend === undefined)\r\n throw _TypeError(\"object\", \"an extension field when not part of a type\");\r\n if (!this.nested)\r\n this.nested = {};\r\n else {\r\n var prev = this.get(object.name);\r\n if (prev) {\r\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\r\n // replace plain namespace but keep existing nested elements and options\r\n var nested = prev.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i)\r\n object.add(nested[i]);\r\n this.remove(prev);\r\n if (!this.nested)\r\n this.nested = {};\r\n object.setOptions(prev.options, true);\r\n } else\r\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\r\n }\r\n }\r\n this.nested[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this namespace.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Namespace} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this namespace\r\n */\r\nNamespacePrototype.remove = function remove(object) {\r\n if (!(object instanceof ReflectionObject))\r\n throw _TypeError(\"object\", \"a ReflectionObject\");\r\n if (object.parent !== this || !this.nested)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.nested[object.name];\r\n if (!Object.keys(this.nested).length)\r\n this.nested = undefined;\r\n object.onRemove(this);\r\n return clearCache(this);\r\n};\r\n\r\n/**\r\n * Defines additial namespaces within this one if not yet existing.\r\n * @param {string|string[]} path Path to create\r\n * @param {*} [json] Nested types to create from JSON\r\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\r\n */\r\nNamespacePrototype.define = function define(path, json) {\r\n if (util.isString(path))\r\n path = path.split('.');\r\n else if (!Array.isArray(path)) {\r\n json = path;\r\n path = undefined;\r\n }\r\n var ptr = this;\r\n if (path)\r\n while (path.length > 0) {\r\n var part = path.shift();\r\n if (ptr.nested && ptr.nested[part]) {\r\n ptr = ptr.nested[part];\r\n if (!(ptr instanceof Namespace))\r\n throw Error(\"path conflicts with non-namespace objects\");\r\n } else\r\n ptr.add(ptr = new Namespace(part));\r\n }\r\n if (json)\r\n ptr.addJSON(json);\r\n return ptr;\r\n};\r\n\r\n/**\r\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree.\r\n * @returns {Namespace} `this`\r\n */\r\nNamespacePrototype.resolveAll = function resolve() {\r\n var nested = this.getNestedArray(), i = 0;\r\n while (i < nested.length)\r\n if (nested[i] instanceof Namespace)\r\n nested[i++].resolveAll();\r\n else\r\n nested[i++].resolve();\r\n return ReflectionObject.prototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * Looks up the reflection object at the specified path, relative to this namespace.\r\n * @param {string|string[]} path Path to look up\r\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\r\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\r\n */\r\nNamespacePrototype.lookup = function lookup(path, parentAlreadyChecked) {\r\n if (util.isString(path)) {\r\n if (!path.length)\r\n return null;\r\n path = path.split('.');\r\n } else if (!path.length)\r\n return null;\r\n // Start at root if path is absolute\r\n if (path[0] === \"\")\r\n return this.getRoot().lookup(path.slice(1));\r\n // Test if the first part matches any nested object, and if so, traverse if path contains more\r\n var found = this.get(path[0]);\r\n if (found && (path.length === 1 || found instanceof Namespace && (found = found.lookup(path.slice(1), true))))\r\n return found;\r\n // If there hasn't been a match, try again at the parent\r\n if (this.parent === null || parentAlreadyChecked)\r\n return null;\r\n return this.parent.lookup(path);\r\n};\r\n","\"use strict\";\r\nmodule.exports = ReflectionObject;\r\n\r\nReflectionObject.extend = extend;\r\n\r\nvar Root = require(16),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new reflection object.\r\n * @classdesc Base class of all reflection objects.\r\n * @constructor\r\n * @param {string} name Object name\r\n * @param {Object} [options] Declared options\r\n * @abstract\r\n */\r\nfunction ReflectionObject(name, options) {\r\n if (!util.isString(name))\r\n throw _TypeError(\"name\");\r\n if (options && !util.isObject(options))\r\n throw _TypeError(\"options\", \"an object\");\r\n\r\n /**\r\n * Options.\r\n * @type {Object.|undefined}\r\n */\r\n this.options = options; // toJSON\r\n\r\n /**\r\n * Unique name within its namespace.\r\n * @type {string}\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * Parent namespace.\r\n * @type {?Namespace}\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Whether already resolved or not.\r\n * @type {boolean}\r\n */\r\n this.resolved = false;\r\n}\r\n\r\n/** @alias ReflectionObject.prototype */\r\nvar ReflectionObjectPrototype = ReflectionObject.prototype;\r\n\r\nObject.defineProperties(ReflectionObjectPrototype, {\r\n\r\n /**\r\n * Reference to the root namespace.\r\n * @name ReflectionObject#root\r\n * @type {Root}\r\n * @readonly\r\n */\r\n root: {\r\n get: ReflectionObjectPrototype.getRoot = function getRoot() {\r\n var ptr = this;\r\n while (ptr.parent !== null)\r\n ptr = ptr.parent;\r\n return ptr;\r\n }\r\n },\r\n\r\n /**\r\n * Full name including leading dot.\r\n * @name ReflectionObject#fullName\r\n * @type {string}\r\n * @readonly\r\n */\r\n fullName: {\r\n get: ReflectionObjectPrototype.getFullName = function getFullName() {\r\n var path = [ this.name ],\r\n ptr = this.parent;\r\n while (ptr) {\r\n path.unshift(ptr.name);\r\n ptr = ptr.parent;\r\n }\r\n return path.join('.');\r\n }\r\n }\r\n});\r\n\r\n/**\r\n * Lets the specified constructor extend this class.\r\n * @memberof ReflectionObject\r\n * @param {Function} constructor Extending constructor\r\n * @returns {Object} Prototype\r\n * @this ReflectionObject\r\n */\r\nfunction extend(constructor) {\r\n var proto = constructor.prototype = Object.create(this.prototype);\r\n proto.constructor = constructor;\r\n constructor.extend = extend;\r\n return proto;\r\n}\r\n\r\n/**\r\n * Converts this reflection object to its JSON representation.\r\n * @returns {Object} JSON object\r\n * @abstract\r\n */\r\nReflectionObjectPrototype.toJSON = function toJSON() {\r\n throw Error(); // not implemented, shouldn't happen\r\n};\r\n\r\n/**\r\n * Called when this object is added to a parent.\r\n * @param {ReflectionObject} parent Parent added to\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onAdd = function onAdd(parent) {\r\n if (this.parent && this.parent !== parent)\r\n this.parent.remove(this);\r\n this.parent = parent;\r\n this.resolved = false;\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleAdd(this);\r\n};\r\n\r\n/**\r\n * Called when this object is removed from a parent.\r\n * @param {ReflectionObject} parent Parent removed from\r\n * @returns {undefined}\r\n */\r\nReflectionObjectPrototype.onRemove = function onRemove(parent) {\r\n var root = parent.getRoot();\r\n if (root instanceof Root)\r\n root._handleRemove(this);\r\n this.parent = null;\r\n this.resolved = false;\r\n};\r\n\r\n/**\r\n * Resolves this objects type references.\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.resolve = function resolve() {\r\n if (this.resolved)\r\n return this;\r\n var root = this.getRoot();\r\n if (root instanceof Root)\r\n this.resolved = true; // only if part of a root\r\n return this;\r\n};\r\n\r\n/**\r\n * Gets an option value.\r\n * @param {string} name Option name\r\n * @returns {*} Option value or `undefined` if not set\r\n */\r\nReflectionObjectPrototype.getOption = function getOption(name) {\r\n if (this.options)\r\n return this.options[name];\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Sets an option.\r\n * @param {string} name Option name\r\n * @param {*} value Option value\r\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOption = function setOption(name, value, ifNotSet) {\r\n if (!ifNotSet || !this.options || this.options[name] === undefined)\r\n (this.options || (this.options = {}))[name] = value;\r\n return this;\r\n};\r\n\r\n/**\r\n * Sets multiple options.\r\n * @param {Object.} options Options to set\r\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\r\n * @returns {ReflectionObject} `this`\r\n */\r\nReflectionObjectPrototype.setOptions = function setOptions(options, ifNotSet) {\r\n if (options)\r\n Object.keys(options).forEach(function(name) {\r\n this.setOption(name, options[name], ifNotSet);\r\n }, this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Converts this instance to its string representation.\r\n * @returns {string} Constructor name, space, full name\r\n */\r\nReflectionObjectPrototype.toString = function toString() {\r\n return this.constructor.name + \" \" + this.getFullName();\r\n};\r\n","\"use strict\";\r\nmodule.exports = OneOf;\r\n\r\nvar ReflectionObject = require(11);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(6),\r\n util = require(21);\r\n\r\nvar _TypeError = util._TypeError;\r\n\r\n/**\r\n * Constructs a new oneof.\r\n * @classdesc Reflected oneof.\r\n * @extends ReflectionObject\r\n * @constructor\r\n * @param {string} name Oneof name\r\n * @param {string[]} [fieldNames] Field names\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction OneOf(name, fieldNames, options) {\r\n if (!Array.isArray(fieldNames)) {\r\n options = fieldNames;\r\n fieldNames = undefined;\r\n }\r\n ReflectionObject.call(this, name, options);\r\n if (fieldNames && !Array.isArray(fieldNames))\r\n throw _TypeError(\"fieldNames\", \"an Array\");\r\n\r\n /**\r\n * Upper cased name for getter/setter calls.\r\n * @type {string}\r\n */\r\n this.ucName = this.name.substring(0, 1).toUpperCase() + this.name.substring(1);\r\n\r\n /**\r\n * Field names that belong to this oneof.\r\n * @type {Array.}\r\n */\r\n this.oneof = fieldNames || []; // toJSON, marker\r\n\r\n /**\r\n * Fields that belong to this oneof and are possibly not yet added to its parent.\r\n * @type {Array.}\r\n * @private\r\n */\r\n this._fields = [];\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a oneof.\r\n * @param {*} json JSON object\r\n * @returns {boolean} `true` if the object describes a oneof\r\n */\r\nOneOf.testJSON = function testJSON(json) {\r\n return Boolean(json.oneof);\r\n};\r\n\r\n/**\r\n * Constructs a oneof from JSON.\r\n * @param {string} name Oneof name\r\n * @param {Object} json JSON object\r\n * @returns {MapField} Created oneof\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nOneOf.fromJSON = function fromJSON(name, json) {\r\n return new OneOf(name, json.oneof, json.options);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.toJSON = function toJSON() {\r\n return {\r\n oneof : this.oneof,\r\n options : this.options\r\n };\r\n};\r\n\r\n/**\r\n * Adds the fields of the specified oneof to the parent if not already done so.\r\n * @param {OneOf} oneof The oneof\r\n * @returns {undefined}\r\n * @inner\r\n * @ignore\r\n */\r\nfunction addFieldsToParent(oneof) {\r\n if (oneof.parent)\r\n oneof._fields.forEach(function(field) {\r\n if (!field.parent)\r\n oneof.parent.add(field);\r\n });\r\n}\r\n\r\n/**\r\n * Adds a field to this oneof.\r\n * @param {Field} field Field to add\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.add = function add(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n if (field.parent)\r\n field.parent.remove(field);\r\n this.oneof.push(field.name);\r\n this._fields.push(field);\r\n field.partOf = this; // field.parent remains null\r\n addFieldsToParent(this);\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes a field from this oneof.\r\n * @param {Field} field Field to remove\r\n * @returns {OneOf} `this`\r\n */\r\nOneOfPrototype.remove = function remove(field) {\r\n if (!(field instanceof Field))\r\n throw _TypeError(\"field\", \"a Field\");\r\n var index = this._fields.indexOf(field);\r\n if (index < 0)\r\n throw Error(field + \" is not a member of \" + this);\r\n this._fields.splice(index, 1);\r\n index = this.oneof.indexOf(field.name);\r\n if (index > -1)\r\n this.oneof.splice(index, 1);\r\n if (field.parent)\r\n field.parent.remove(field);\r\n field.partOf = null;\r\n return this;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onAdd = function onAdd(parent) {\r\n ReflectionObject.prototype.onAdd.call(this, parent);\r\n addFieldsToParent(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nOneOfPrototype.onRemove = function onRemove(parent) {\r\n this._fields.forEach(function(field) {\r\n if (field.parent)\r\n field.parent.remove(field);\r\n });\r\n ReflectionObject.prototype.onRemove.call(this, parent);\r\n};\r\n","\"use strict\";\r\nmodule.exports = parse;\r\n\r\nvar tokenize = require(18),\r\n Root = require(16),\r\n Type = require(19),\r\n Field = require(6),\r\n MapField = require(8),\r\n OneOf = require(12),\r\n Enum = require(5),\r\n Service = require(17),\r\n Method = require(9),\r\n types = require(20);\r\n\r\nvar nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\r\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\r\n fqTypeRefRe = /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/;\r\n\r\nfunction lower(token) {\r\n return token === null ? null : token.toLowerCase();\r\n}\r\n\r\nfunction camelCase(name) {\r\n return name.substring(0,1)\r\n + name.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n}\r\n\r\nvar s_required = \"required\",\r\n s_repeated = \"repeated\",\r\n s_optional = \"optional\",\r\n s_option = \"option\",\r\n s_name = \"name\",\r\n s_type = \"type\";\r\nvar s_open = \"{\",\r\n s_close = \"}\",\r\n s_bopen = '(',\r\n s_bclose = ')',\r\n s_semi = \";\",\r\n s_dq = '\"',\r\n s_sq = \"'\";\r\n\r\n/**\r\n * Result object returned from {@link parse}.\r\n * @typedef ParserResult\r\n * @type {Object}\r\n * @property {string|undefined} package Package name, if declared\r\n * @property {string[]|undefined} imports Imports, if any\r\n * @property {string[]|undefined} weakImports Weak imports, if any\r\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\r\n * @property {Root} root Populated root instance\r\n */\r\n\r\n/**\r\n * Parses the given .proto source and returns an object with the parsed contents.\r\n * @param {string} source Source contents\r\n * @param {Root} [root] Root to populate\r\n * @returns {ParserResult} Parser result\r\n */\r\nfunction parse(source, root) {\r\n /* eslint-disable default-case, callback-return */\r\n if (!root)\r\n root = new Root();\r\n\r\n var tn = tokenize(source),\r\n next = tn.next,\r\n push = tn.push,\r\n peek = tn.peek,\r\n skip = tn.skip;\r\n\r\n var head = true,\r\n pkg,\r\n imports,\r\n weakImports,\r\n syntax,\r\n isProto3 = false;\r\n\r\n if (!root)\r\n root = new Root();\r\n\r\n var ptr = root;\r\n\r\n function illegal(token, name) {\r\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (line \" + tn.line() + s_bclose);\r\n }\r\n\r\n function readString() {\r\n var values = [],\r\n token;\r\n do {\r\n if ((token = next()) !== s_dq && token !== s_sq)\r\n throw illegal(token);\r\n values.push(next());\r\n skip(token);\r\n token = peek();\r\n } while (token === s_dq || token === s_sq);\r\n return values.join('');\r\n }\r\n\r\n function readValue(acceptTypeRef) {\r\n var token = next();\r\n switch (lower(token)) {\r\n case s_sq:\r\n case s_dq:\r\n push(token);\r\n return readString();\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n }\r\n try {\r\n return parseNumber(token);\r\n } catch (e) {\r\n if (acceptTypeRef && typeRefRe.test(token))\r\n return token;\r\n throw illegal(token, \"value\");\r\n }\r\n }\r\n\r\n function readRange() {\r\n var start = parseId(next());\r\n var end = start;\r\n if (skip(\"to\", true))\r\n end = parseId(next());\r\n skip(s_semi);\r\n return [ start, end ];\r\n }\r\n\r\n function parseNumber(token) {\r\n var sign = 1;\r\n if (token.charAt(0) === '-') {\r\n sign = -1;\r\n token = token.substring(1);\r\n }\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"inf\": return sign * Infinity;\r\n case \"nan\": return NaN;\r\n case \"0\": return 0;\r\n }\r\n if (/^[1-9][0-9]*$/.test(token))\r\n return sign * parseInt(token, 10);\r\n if (/^0[x][0-9a-f]+$/.test(tokenLower))\r\n return sign * parseInt(token, 16);\r\n if (/^0[0-7]+$/.test(token))\r\n return sign * parseInt(token, 8);\r\n if (/^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(tokenLower))\r\n return sign * parseFloat(token);\r\n throw illegal(token, 'number');\r\n }\r\n\r\n function parseId(token, acceptNegative) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case \"min\": return 1;\r\n case \"max\": return 0x1FFFFFFF;\r\n case \"0\": return 0;\r\n }\r\n if (token.charAt(0) === '-' && !acceptNegative)\r\n throw illegal(token, \"id\");\r\n if (/^-?[1-9][0-9]*$/.test(token))\r\n return parseInt(token, 10);\r\n if (/^-?0[x][0-9a-f]+$/.test(tokenLower))\r\n return parseInt(token, 16);\r\n if (/^-?0[0-7]+$/.test(token))\r\n return parseInt(token, 8);\r\n throw illegal(token, \"id\");\r\n }\r\n\r\n function parsePackage() {\r\n if (pkg !== undefined)\r\n throw illegal(\"package\");\r\n pkg = next();\r\n if (!typeRefRe.test(pkg))\r\n throw illegal(pkg, s_name);\r\n ptr = ptr.define(pkg);\r\n skip(s_semi);\r\n }\r\n\r\n function parseImport() {\r\n var token = peek();\r\n var whichImports;\r\n switch (token) {\r\n case \"weak\":\r\n whichImports = weakImports || (weakImports = []);\r\n next();\r\n break;\r\n case \"public\":\r\n next();\r\n // eslint-disable-line no-fallthrough\r\n default:\r\n whichImports = imports || (imports = []);\r\n break;\r\n }\r\n token = readString();\r\n skip(s_semi);\r\n whichImports.push(token);\r\n }\r\n\r\n function parseSyntax() {\r\n skip(\"=\");\r\n syntax = lower(readString());\r\n var p3;\r\n if ([ \"proto2\", p3 = \"proto3\" ].indexOf(syntax) < 0)\r\n throw illegal(syntax, \"syntax\");\r\n isProto3 = syntax === p3;\r\n skip(s_semi);\r\n }\r\n\r\n function parseCommon(parent, token) {\r\n switch (token) {\r\n\r\n case s_option:\r\n parseOption(parent, token);\r\n skip(s_semi);\r\n return true;\r\n\r\n case \"message\":\r\n parseType(parent, token);\r\n return true;\r\n\r\n case \"enum\":\r\n parseEnum(parent, token);\r\n return true;\r\n\r\n case \"service\":\r\n parseService(parent, token);\r\n return true;\r\n\r\n case \"extend\":\r\n parseExtension(parent, token);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function parseType(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, \"type name\");\r\n var type = new Type(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n if (parseCommon(type, token))\r\n continue;\r\n switch (tokenLower) {\r\n case \"map\":\r\n parseMapField(type, tokenLower);\r\n break;\r\n case s_required:\r\n case s_optional:\r\n case s_repeated:\r\n parseField(type, tokenLower);\r\n break;\r\n case \"oneof\":\r\n parseOneOf(type, tokenLower);\r\n break;\r\n case \"extensions\":\r\n (type.extensions || (type.extensions = [])).push(readRange(type, tokenLower));\r\n break;\r\n case \"reserved\":\r\n (type.reserved || (type.reserved = [])).push(readRange(type, tokenLower));\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(type, s_optional);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(type);\r\n }\r\n\r\n function parseField(parent, rule, extend) {\r\n var type = next();\r\n if (!typeRefRe.test(type))\r\n throw illegal(type, s_type);\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new Field(name, id, type, rule, extend));\r\n if (field.repeated)\r\n field.setOption(\"packed\", isProto3, /* ifNotSet */ true);\r\n parent.add(field);\r\n }\r\n\r\n function parseMapField(parent) {\r\n skip(\"<\");\r\n var keyType = next();\r\n if (types.mapKey[keyType] === undefined)\r\n throw illegal(keyType, s_type);\r\n skip(\",\");\r\n var valueType = next();\r\n if (!typeRefRe.test(valueType))\r\n throw illegal(valueType, s_type);\r\n skip(\">\");\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n skip(\"=\");\r\n var id = parseId(next());\r\n var field = parseInlineOptions(new MapField(name, id, keyType, valueType));\r\n parent.add(field);\r\n }\r\n\r\n function parseOneOf(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n name = camelCase(name);\r\n var oneof = new OneOf(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (token === s_option) {\r\n parseOption(oneof, token);\r\n skip(s_semi);\r\n } else {\r\n push(token);\r\n parseField(oneof, s_optional);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(oneof);\r\n }\r\n\r\n function parseEnum(parent, token) {\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var values = {};\r\n var enm = new Enum(name, values);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (lower(token) === s_option)\r\n parseOption(enm);\r\n else\r\n parseEnumField(enm, token);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(enm);\r\n }\r\n\r\n function parseEnumField(parent, token) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n var name = token;\r\n skip(\"=\");\r\n var value = parseId(next(), true);\r\n parent.values[name] = value;\r\n parseInlineOptions({}); // skips enum value options\r\n }\r\n\r\n function parseOption(parent, token) {\r\n var custom = skip(s_bopen, true);\r\n var name = next();\r\n if (!typeRefRe.test(name))\r\n throw illegal(name, s_name);\r\n if (custom) {\r\n skip(s_bclose);\r\n name = s_bopen + name + s_bclose;\r\n token = peek();\r\n if (fqTypeRefRe.test(token)) {\r\n name += token;\r\n next();\r\n }\r\n }\r\n skip(\"=\");\r\n parseOptionValue(parent, name);\r\n }\r\n\r\n function parseOptionValue(parent, name) {\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n if (!nameRe.test(token))\r\n throw illegal(token, s_name);\r\n name = name + \".\" + token;\r\n if (skip(\":\", true))\r\n setOption(parent, name, readValue(true));\r\n else\r\n parseOptionValue(parent, name);\r\n }\r\n skip(s_semi, true);\r\n } else\r\n setOption(parent, name, readValue(true));\r\n // Does not enforce a delimiter to be universal\r\n }\r\n\r\n function setOption(parent, name, value) {\r\n if (parent.setOption)\r\n parent.setOption(name, value);\r\n else\r\n parent[name] = value;\r\n }\r\n\r\n function parseInlineOptions(parent) {\r\n if (skip(\"[\", true)) {\r\n do {\r\n parseOption(parent, s_option);\r\n } while (skip(\",\", true));\r\n skip(\"]\");\r\n }\r\n skip(s_semi);\r\n return parent;\r\n }\r\n\r\n function parseService(parent, token) {\r\n token = next();\r\n if (!nameRe.test(token))\r\n throw illegal(token, \"service name\");\r\n var name = token;\r\n var service = new Service(name);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(service, tokenLower);\r\n skip(s_semi);\r\n break;\r\n case \"rpc\":\r\n parseMethod(service, tokenLower);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(service);\r\n }\r\n\r\n function parseMethod(parent, token) {\r\n var type = token;\r\n var name = next();\r\n if (!nameRe.test(name))\r\n throw illegal(name, s_name);\r\n var requestType, requestStream,\r\n responseType, responseStream;\r\n skip(s_bopen);\r\n var st;\r\n if (skip(st = \"stream\", true))\r\n requestStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n requestType = token;\r\n skip(s_bclose); skip(\"returns\"); skip(s_bopen);\r\n if (skip(st, true))\r\n responseStream = true;\r\n if (!typeRefRe.test(token = next()))\r\n throw illegal(token);\r\n responseType = token;\r\n skip(s_bclose);\r\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_option:\r\n parseOption(method, tokenLower);\r\n skip(s_semi);\r\n break;\r\n default:\r\n throw illegal(token);\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n parent.add(method);\r\n }\r\n\r\n function parseExtension(parent, token) {\r\n var reference = next();\r\n if (!typeRefRe.test(reference))\r\n throw illegal(reference, \"reference\");\r\n if (skip(s_open, true)) {\r\n while ((token = next()) !== s_close) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n case s_required:\r\n case s_repeated:\r\n case s_optional:\r\n parseField(parent, tokenLower, reference);\r\n break;\r\n default:\r\n if (!isProto3 || !typeRefRe.test(token))\r\n throw illegal(token);\r\n push(token);\r\n parseField(parent, s_optional, reference);\r\n break;\r\n }\r\n }\r\n skip(s_semi, true);\r\n } else\r\n skip(s_semi);\r\n }\r\n\r\n var token;\r\n while ((token = next()) !== null) {\r\n var tokenLower = lower(token);\r\n switch (tokenLower) {\r\n\r\n case \"package\":\r\n if (!head)\r\n throw illegal(token);\r\n parsePackage();\r\n break;\r\n\r\n case \"import\":\r\n if (!head)\r\n throw illegal(token);\r\n parseImport();\r\n break;\r\n\r\n case \"syntax\":\r\n if (!head)\r\n throw illegal(token);\r\n parseSyntax();\r\n break;\r\n\r\n case s_option:\r\n if (!head)\r\n throw illegal(token);\r\n parseOption(ptr, token);\r\n skip(s_semi);\r\n break;\r\n\r\n default:\r\n if (parseCommon(ptr, token)) {\r\n head = false;\r\n continue;\r\n }\r\n throw illegal(token);\r\n }\r\n }\r\n\r\n return {\r\n 'package' : pkg,\r\n 'imports' : imports,\r\n 'weakImports' : weakImports,\r\n 'syntax' : syntax,\r\n 'root' : root\r\n };\r\n}\r\n","\"use strict\";\r\nmodule.exports = Prototype;\r\n\r\n/**\r\n * Options passed to the {@link Prototype|prototype constructor}, modifying its behavior.\r\n * @typedef PrototypeOptions\r\n * @type {Object}\r\n * @property {boolean} [fieldsOnly=false] Sets only properties that reference a field\r\n */\r\n\r\n/**\r\n * Constructs a new prototype.\r\n * This method should be called from your custom constructors, i.e. `Prototype.call(this, properties)`.\r\n * @classdesc Runtime message prototype ready to be extended by custom classes or generated code.\r\n * @constructor\r\n * @param {Object.} [properties] Properties to set\r\n * @param {PrototypeOptions} [options] Prototype options\r\n * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties, options) {\r\n if (properties) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i) {\r\n var field = fields[keys[i]];\r\n if (field && field.partOf)\r\n this['set' + field.partOf.ucName](field.name);\r\n if (field || any)\r\n this[keys[i]] = properties[keys[i]];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Converts a runtime message to a JSON object.\r\n * @param {Object.} [options] Conversion options\r\n * @param {boolean} [options.fieldsOnly=false] Converts only properties that reference a field\r\n * @param {Function} [options.long] Long conversion type. Only relevant with a long library.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to a possibly unsafe number without, and a `Long` with a long library.\r\n * @param {Function} [options.enum=Number] Enum value conversion type.\r\n * Valid values are `String` and `Number` (the global types).\r\n * Defaults to the numeric ids.\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n var any = !(options && options.fieldsOnly),\r\n fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys = Object.keys(this);\r\n for (var i = 0, key; i < keys.length; ++i) {\r\n var field = fields[key = keys[i]],\r\n value = this[key];\r\n if (field) {\r\n if (field.repeated) {\r\n if (value && value.length) {\r\n var array = new Array(value.length);\r\n for (var j = 0, l = value.length; j < l; ++j)\r\n array[j] = field.jsonConvert(value[j], options);\r\n json[key] = array;\r\n }\r\n } else\r\n json[key] = field.jsonConvert(value, options);\r\n } else if (any)\r\n json[key] = value;\r\n }\r\n return json;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Reader;\r\n\r\nReader.BufferReader = BufferReader;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\nfunction indexOutOfRange(reader, writeLength) {\r\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\r\n}\r\n\r\n/**\r\n * Configures the Reader interface according to the environment.\r\n * @memberof Reader\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n ReaderPrototype._slice = ArrayImpl.prototype.slice || ArrayImpl.prototype.subarray;\r\n\r\n if (util.Long) {\r\n ReaderPrototype.int64 = read_int64_long;\r\n ReaderPrototype.uint64 = read_uint64_long;\r\n ReaderPrototype.sint64 = read_sint64_long;\r\n ReaderPrototype.fixed64 = read_fixed64_long;\r\n ReaderPrototype.sfixed64 = read_sfixed64_long;\r\n } else {\r\n ReaderPrototype.int64 = read_int64_number;\r\n ReaderPrototype.uint64 = read_uint64_number;\r\n ReaderPrototype.sint64 = read_sint64_number;\r\n ReaderPrototype.fixed64 = read_fixed64_number;\r\n ReaderPrototype.sfixed64 = read_sfixed64_number;\r\n }\r\n}\r\n\r\nReader.configure = configure;\r\n\r\n/**\r\n * Constructs a new reader using the specified buffer.\r\n * When called as a function, returns an appropriate reader for the specified buffer.\r\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n * @param {Uint8Array} buffer Buffer to read from\r\n */\r\nfunction Reader(buffer) {\r\n if (!(this instanceof Reader))\r\n return util.Buffer && (!buffer || util.Buffer.isBuffer(buffer)) && new BufferReader(buffer) || new Reader(buffer);\r\n\r\n /**\r\n * Read buffer.\r\n * @type {Uint8Array}\r\n */\r\n this.buf = buffer;\r\n\r\n /**\r\n * Read buffer position.\r\n * @type {number}\r\n */\r\n this.pos = 0;\r\n\r\n /**\r\n * Read buffer length.\r\n * @type {number}\r\n */\r\n this.len = buffer.length;\r\n}\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\n/**\r\n * Tag read.\r\n * @constructor\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @ignore\r\n */\r\nfunction Tag(id, wireType) {\r\n this.id = id;\r\n this.wireType = wireType;\r\n}\r\n\r\n/**\r\n * Reads a tag.\r\n * @returns {{id: number, wireType: number}} Field id and wire type\r\n */\r\nReaderPrototype.tag = function read_tag() {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n return new Tag(this.buf[this.pos] >>> 3, this.buf[this.pos++] & 7);\r\n};\r\n\r\n/**\r\n * Reads a varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.int32 = function read_int32() {\r\n var value = 0,\r\n shift = 0,\r\n octet = 0;\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n octet = this.buf[this.pos++];\r\n if (shift < 32)\r\n value |= (octet & 127) << shift;\r\n shift += 7;\r\n } while (octet & 128);\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a varint as an unsigned 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.uint32 = function read_uint32() {\r\n return this.int32() >>> 0;\r\n};\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 32 bit value.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sint32 = function read_sint32() {\r\n var value = this.int32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongVarint() {\r\n var lo = 0, hi = 0,\r\n i = 0, b = 0;\r\n if (this.len - this.pos > 9) { // fast route\r\n for (i = 0; i < 4; ++i) {\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n } else {\r\n for (i = 0; i < 4; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << i * 7;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n lo |= (b & 127) << 28;\r\n hi |= (b & 127) >> 4;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n for (i = 0; i < 5; ++i) {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n b = this.buf[this.pos++];\r\n hi |= (b & 127) << i * 7 + 3;\r\n if (b < 128)\r\n return new LongBits(lo >>> 0, hi >>> 0);\r\n }\r\n }\r\n throw Error(\"invalid varint encoding\");\r\n}\r\n\r\nfunction read_int64_long() {\r\n return readLongVarint.call(this).toLong();\r\n}\r\n\r\nfunction read_int64_number() {\r\n return readLongVarint.call(this).toNumber();\r\n}\r\n\r\nfunction read_uint64_long() {\r\n return readLongVarint.call(this).toLong(true);\r\n}\r\n\r\nfunction read_uint64_number() {\r\n return readLongVarint.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sint64_long() {\r\n return readLongVarint.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sint64_number() {\r\n return readLongVarint.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads a varint as a signed 64 bit value.\r\n * @name Reader#int64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as an unsigned 64 bit value.\r\n * @name Reader#uint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a zig-zag encoded varint as a signed 64 bit value.\r\n * @name Reader#sint64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a varint as a boolean.\r\n * @returns {boolean} Value read\r\n */\r\nReaderPrototype.bool = function read_bool() {\r\n return this.int32() !== 0;\r\n};\r\n\r\n/**\r\n * Reads fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.fixed32 = function read_fixed32() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n this.pos += 4;\r\n return this.buf[this.pos - 4]\r\n | this.buf[this.pos - 3] << 8\r\n | this.buf[this.pos - 2] << 16\r\n | this.buf[this.pos - 1] << 24;\r\n};\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 32 bits as a number.\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.sfixed32 = function read_sfixed32() {\r\n var value = this.fixed32();\r\n return value >>> 1 ^ -(value & 1);\r\n};\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nfunction readLongFixed() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n return new LongBits(\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n ,\r\n ( this.buf[this.pos++]\r\n | this.buf[this.pos++] << 8\r\n | this.buf[this.pos++] << 16\r\n | this.buf[this.pos++] << 24 ) >>> 0\r\n );\r\n}\r\n\r\nfunction read_fixed64_long() {\r\n return readLongFixed.call(this).toLong(true);\r\n}\r\n\r\nfunction read_fixed64_number() {\r\n return readLongFixed.call(this).toNumber(true);\r\n}\r\n\r\nfunction read_sfixed64_long() {\r\n return readLongFixed.call(this).zzDecode().toLong();\r\n}\r\n\r\nfunction read_sfixed64_number() {\r\n return readLongFixed.call(this).zzDecode().toNumber();\r\n}\r\n\r\n/* eslint-enable no-invalid-this */\r\n\r\n/**\r\n * Reads fixed 64 bits.\r\n * @name Reader#fixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads zig-zag encoded fixed 64 bits.\r\n * @name Reader#sfixed64\r\n * @function\r\n * @returns {Long|number} Value read\r\n */\r\n\r\n/**\r\n * Reads a float (32 bit) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.float = function read_float() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 23, 4);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a double (64 bit float) as a number.\r\n * @function\r\n * @returns {number} Value read\r\n */\r\nReaderPrototype.double = function read_double() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = ieee754.read(this.buf, this.pos, false, 52, 8);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * Reads a sequence of bytes preceeded by its length as a varint.\r\n * @returns {Uint8Array} Value read\r\n */\r\nReaderPrototype.bytes = function read_bytes() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\r\n ? new this.buf.constructor(0)\r\n : this._slice.call(this.buf, start, end);\r\n};\r\n\r\n/**\r\n * Reads a string preceeded by its byte length as a varint.\r\n * @returns {string} Value read\r\n */\r\nReaderPrototype.string = function read_string() {\r\n // ref: https://github.com/google/closure-library/blob/master/closure/goog/crypt/crypt.js\r\n var bytes = this.bytes(),\r\n len = bytes.length;\r\n if (len) {\r\n var out = new Array(len), p = 0, c = 0;\r\n while (p < len) {\r\n var c1 = bytes[p++];\r\n if (c1 < 128)\r\n out[c++] = c1;\r\n else if (c1 > 191 && c1 < 224)\r\n out[c++] = (c1 & 31) << 6 | bytes[p++] & 63;\r\n else if (c1 > 239 && c1 < 365) {\r\n var u = ((c1 & 7) << 18 | (bytes[p++] & 63) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63) - 0x10000;\r\n out[c++] = 0xD800 + (u >> 10);\r\n out[c++] = 0xDC00 + (u & 1023);\r\n } else\r\n out[c++] = (c1 & 15) << 12 | (bytes[p++] & 63) << 6 | bytes[p++] & 63;\r\n }\r\n return String.fromCharCode.apply(String, out.slice(0, c));\r\n }\r\n return \"\";\r\n};\r\n\r\n/**\r\n * Skips the specified number of bytes if specified, otherwise skips a varint.\r\n * @param {number} [length] Length if known, otherwise a varint is assumed\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skip = function skip(length) {\r\n if (length === undefined) {\r\n do {\r\n if (this.pos >= this.len)\r\n throw indexOutOfRange(this);\r\n } while (this.buf[this.pos++] & 128);\r\n } else {\r\n if (this.pos + length > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Skips the next element of the specified wire type.\r\n * @param {number} wireType Wire type received\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.skipType = function(wireType) {\r\n switch (wireType) {\r\n case 0:\r\n this.skip();\r\n break;\r\n case 1:\r\n this.skip(8);\r\n break;\r\n case 2:\r\n this.skip(this.uint32());\r\n break;\r\n case 3:\r\n do { // eslint-disable-line no-constant-condition\r\n var tag = this.tag();\r\n if (tag.wireType === 4)\r\n break;\r\n this.skipType(tag.wireType);\r\n } while (true);\r\n break;\r\n case 5:\r\n this.skip(4);\r\n break;\r\n default:\r\n throw Error(\"invalid wire type: \" + wireType);\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance and frees all resources.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Reader} `this`\r\n */\r\nReaderPrototype.reset = function reset(buffer) {\r\n if (buffer) {\r\n this.buf = buffer;\r\n this.len = buffer.length;\r\n } else {\r\n this.buf = null; // makes it throw\r\n this.len = 0;\r\n }\r\n this.pos = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of read operations, frees all resources and returns the remaining buffer.\r\n * @param {Uint8Array} [buffer] New buffer for a new sequence of read operations\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nReaderPrototype.finish = function finish(buffer) {\r\n var remain = this.pos\r\n ? this._slice.call(this.buf, this.pos)\r\n : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\n// One time function to initialize BufferReader with the now-known buffer implementation's slice method\r\nvar initBufferReader = function() {\r\n if (!util.Buffer)\r\n throw Error(\"Buffer is not supported\");\r\n BufferReaderPrototype._slice = util.Buffer.prototype.slice;\r\n initBufferReader = false;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer reader.\r\n * @classdesc Wire format reader using node buffers.\r\n * @extends Reader\r\n * @constructor\r\n * @param {Buffer} buffer Buffer to read from\r\n */\r\nfunction BufferReader(buffer) {\r\n if (initBufferReader)\r\n initBufferReader();\r\n Reader.call(this, buffer);\r\n}\r\n\r\n/** @alias BufferReader.prototype */\r\nvar BufferReaderPrototype = BufferReader.prototype = Object.create(Reader.prototype);\r\n\r\nBufferReaderPrototype.constructor = BufferReader;\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.float = function read_float_buffer() {\r\n if (this.pos + 4 > this.len)\r\n throw indexOutOfRange(this, 4);\r\n var value = this.buf.readFloatLE(this.pos, true);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.double = function read_double_buffer() {\r\n if (this.pos + 8 > this.len)\r\n throw indexOutOfRange(this, 8);\r\n var value = this.buf.readDoubleLE(this.pos, true);\r\n this.pos += 8;\r\n return value;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.string = function read_string_buffer() {\r\n var length = this.int32() >>> 0,\r\n start = this.pos,\r\n end = this.pos + length;\r\n if (end > this.len)\r\n throw indexOutOfRange(this, length);\r\n this.pos += length;\r\n return this.buf.toString(\"utf8\", start, end);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferReaderPrototype.finish = function finish_buffer(buffer) {\r\n var remain = this.pos ? this.buf.slice(this.pos) : this.buf;\r\n this.reset(buffer);\r\n return remain;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nmodule.exports = Root;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(6),\r\n util = require(21),\r\n common = require(2);\r\n\r\n/**\r\n * Constructs a new root namespace.\r\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {Object} [options] Top level options\r\n */\r\nfunction Root(options) {\r\n Namespace.call(this, \"\", options);\r\n\r\n /**\r\n * Deferred extension fields.\r\n * @type {Field[]}\r\n */\r\n this.deferred = [];\r\n\r\n /**\r\n * Resolved file names of loaded files. \r\n * @type {string[]}\r\n */\r\n this.files = [];\r\n}\r\n\r\n/**\r\n * Loads a JSON definition into a root namespace.\r\n * @param {*} json JSON definition\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\r\n * @returns {Root} Root namespace\r\n */\r\nRoot.fromJSON = function fromJSON(json, root) {\r\n if (!root)\r\n root = new Root();\r\n return root.setOptions(json.options).addJSON(json.nested);\r\n};\r\n\r\n/**\r\n * Resolves the path of an imported file, relative to the importing origin.\r\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\r\n * @function\r\n * @param {string} origin The file name of the importing file\r\n * @param {string} target The file name being imported\r\n * @returns {string} Resolved path to `target`\r\n */\r\nRootPrototype.resolvePath = util.resolvePath;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace.\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @param {function(?Error, Root=)} [callback] Node-style callback function\r\n * @returns {Promise|undefined} A promise if `callback` has been omitted\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nRootPrototype.load = function load(filename, callback) {\r\n var self = this;\r\n if (!callback)\r\n return util.asPromise(load, self, filename);\r\n\r\n // Finishes loading by calling the callback (exactly once)\r\n function finish(err, root) {\r\n if (!callback)\r\n return;\r\n var cb = callback;\r\n callback = null;\r\n cb(err, root);\r\n }\r\n\r\n // Processes a single file\r\n function process(filename, source) {\r\n try {\r\n if (util.isString(source) && source.charAt(0) === \"{\")\r\n source = JSON.parse(source);\r\n if (!util.isString(source))\r\n self.setOptions(source.options).addJSON(source.nested);\r\n else {\r\n var parsed = require(13)(source, self);\r\n if (parsed.imports)\r\n parsed.imports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name));\r\n });\r\n if (parsed.weakImports)\r\n parsed.weakImports.forEach(function(name) {\r\n fetch(self.resolvePath(filename, name), true);\r\n });\r\n }\r\n } catch (err) {\r\n finish(err);\r\n return;\r\n }\r\n if (!queued)\r\n finish(null, self);\r\n }\r\n\r\n // Fetches a single file\r\n function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.indexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n var queued = 0;\r\n\r\n // Assembling the root namespace doesn't require working type\r\n // references anymore, so we can load everything in parallel\r\n if (util.isString(filename))\r\n filename = [ filename ];\r\n filename.forEach(function(filename) {\r\n fetch(self.resolvePath(\"\", filename));\r\n });\r\n\r\n if (!queued)\r\n finish(null);\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\r\n * @param {Field} field Declaring extension field witin the declaring type\r\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\r\n * @inner\r\n * @ignore\r\n */\r\nfunction handleExtension(field) {\r\n var extendedType = field.parent.lookup(field.extend);\r\n if (extendedType) {\r\n var sisterField = new Field(field.getFullName(), field.id, field.type, field.rule, undefined, field.options);\r\n sisterField.declaringField = field;\r\n field.extensionField = sisterField;\r\n extendedType.add(sisterField);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Called when any object is added to this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object added\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleAdd = function handleAdd(object) {\r\n // Try to handle any deferred extensions\r\n var newDeferred = this.deferred.slice();\r\n this.deferred = []; // because the loop calls handleAdd\r\n var i = 0;\r\n while (i < newDeferred.length)\r\n if (handleExtension(newDeferred[i]))\r\n newDeferred.splice(i, 1);\r\n else\r\n ++i;\r\n this.deferred = newDeferred;\r\n // Handle new declaring extension fields without a sister field yet\r\n if (object instanceof Field && object.extend !== undefined && !object.extensionField && !handleExtension(object) && this.deferred.indexOf(object) < 0)\r\n this.deferred.push(object);\r\n else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleAdd(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * Called when any object is removed from this root or its sub-namespaces.\r\n * @param {ReflectionObject} object Object removed\r\n * @returns {undefined}\r\n * @private\r\n */\r\nRootPrototype._handleRemove = function handleRemove(object) {\r\n if (object instanceof Field) {\r\n // If a deferred declaring extension field, cancel the extension\r\n if (object.extend !== undefined && !object.extensionField) {\r\n var index = this.deferred.indexOf(object);\r\n if (index > -1)\r\n this.deferred.splice(index, 1);\r\n }\r\n // If a declaring extension field with a sister field, remove its sister field\r\n if (object.extensionField) {\r\n object.extensionField.parent.remove(object.extensionField);\r\n object.extensionField = null;\r\n }\r\n } else if (object instanceof Namespace) {\r\n var nested = object.getNestedArray();\r\n for (var i = 0; i < nested.length; ++i) // recurse into the namespace\r\n this._handleRemove(nested[i]);\r\n }\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nRootPrototype.toString = function toString() {\r\n return this.constructor.name;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Service.prototype */\r\nvar ServicePrototype = Namespace.extend(Service);\r\n\r\nvar Method = require(9),\r\n util = require(21);\r\n\r\n/**\r\n * Constructs a new service.\r\n * @classdesc Reflected service.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Service name\r\n * @param {Object.} [options] Service options\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction Service(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Service methods.\r\n * @type {Object.}\r\n */\r\n this.methods = {}; // toJSON, marker\r\n\r\n /**\r\n * Cached methods as an array.\r\n * @type {?Method[]}\r\n * @private\r\n */\r\n this._methodsArray = null;\r\n}\r\n\r\nObject.defineProperties(ServicePrototype, {\r\n\r\n /**\r\n * Methods of this service as an array for iteration.\r\n * @name Service#methodsArray\r\n * @type {Method[]}\r\n * @readonly\r\n */\r\n methodsArray: {\r\n get: ServicePrototype.getMethodsArray = function getMethodsArray() {\r\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\r\n }\r\n }\r\n\r\n});\r\n\r\nfunction clearCache(service) {\r\n service._methodsArray = null;\r\n return service;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a service.\r\n * @param {Object} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a service\r\n */\r\nService.testJSON = function testJSON(json) {\r\n return Boolean(json && json.methods);\r\n};\r\n\r\n/**\r\n * Constructs a service from JSON.\r\n * @param {string} name Service name\r\n * @param {Object} json JSON object\r\n * @returns {Service} Created service\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nService.fromJSON = function fromJSON(name, json) {\r\n var service = new Service(name, json.options);\r\n if (json.methods)\r\n Object.keys(json.methods).forEach(function(methodName) {\r\n service.add(Method.fromJSON(methodName, json.methods[methodName]));\r\n });\r\n return service;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n methods : Namespace.arrayToJSON(this.getMethodsArray()) || {},\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.methods[name] || null;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.resolveAll = function resolve() {\r\n var methods = this.getMethodsArray();\r\n for (var i = 0; i < methods.length; ++i)\r\n methods[i].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Method) {\r\n this.methods[object.name] = object;\r\n object.parent = this;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nServicePrototype.remove = function remove(object) {\r\n if (object instanceof Method) {\r\n if (this.methods[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.methods[object.name];\r\n object.parent = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\r\n * @typedef RPCImpl\r\n * @function\r\n * @param {Method} method Reflected method being called\r\n * @param {Uint8Array} requestData Request data\r\n * @param {function(?Error, Uint8Array=)} callback Node-style callback called with the error, if any, and the response data\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Creates a runtime service using the specified rpc implementation.\r\n * @param {function(Method, Uint8Array, function)} rpc RPC implementation ({@link RPCImpl|see})\r\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\r\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\r\n * @returns {Object} Runtime service\r\n */\r\nServicePrototype.create = function create(rpc, requestDelimited, responseDelimited) {\r\n var rpcService = {};\r\n Object.defineProperty(rpcService, \"$rpc\", {\r\n value: rpc\r\n });\r\n this.getMethodsArray().forEach(function(method) {\r\n var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1);\r\n rpcService[lcName] = function(request, callback) {\r\n method.resolve();\r\n var requestData;\r\n try {\r\n requestData = (requestDelimited && method.resolvedRequestType.encodeDelimited(request) || method.resolvedRequestType.encode(request)).finish();\r\n } catch (err) {\r\n (typeof setImmediate === 'function' && setImmediate || setTimeout)(function() { callback(err); });\r\n return;\r\n }\r\n // Calls the custom RPC implementation with the reflected method and binary request data\r\n // and expects the rpc implementation to call its callback with the binary response data.\r\n rpc(method, requestData, function(err, responseData) {\r\n if (err) {\r\n callback(err);\r\n return;\r\n }\r\n var response;\r\n try {\r\n response = responseDelimited && method.resolvedResponseType.decodeDelimited(responseData) || method.resolvedResponseType.decode(responseData);\r\n } catch (err2) {\r\n callback(err2);\r\n return;\r\n }\r\n callback(null, response);\r\n });\r\n };\r\n });\r\n return rpcService;\r\n};\r\n","\"use strict\";\r\nmodule.exports = tokenize;\r\n\r\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\r\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\r\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\r\n\r\n/**\r\n * Handle object returned from {@link tokenize}.\r\n * @typedef {Object} TokenizerHandle\r\n * @property {function():number} line Gets the current line number\r\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\r\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\r\n * @property {function(string)} push Pushes a token back to the stack\r\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\r\n */\r\n\r\nvar s_nl = \"\\n\",\r\n s_sl = '/',\r\n s_as = '*';\r\n\r\nfunction unescape(str) {\r\n return str.replace(/\\\\(.?)/g, function($0, $1) {\r\n switch ($1) {\r\n case \"\\\\\":\r\n case \"\":\r\n return $1;\r\n case \"0\":\r\n return \"\\u0000\";\r\n default:\r\n return $1;\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Tokenizes the given .proto source and returns an object with useful utility functions.\r\n * @param {string} source Source contents\r\n * @returns {TokenizerHandle} Tokenizer handle\r\n */\r\nfunction tokenize(source) {\r\n /* eslint-disable default-case, callback-return */\r\n source = source.toString();\r\n \r\n var offset = 0,\r\n length = source.length,\r\n line = 1;\r\n \r\n var stack = [];\r\n\r\n var stringDelim = null;\r\n\r\n /**\r\n * Creates an error for illegal syntax.\r\n * @param {string} subject Subject\r\n * @returns {Error} Error created\r\n * @inner\r\n */\r\n function illegal(subject) {\r\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\r\n }\r\n\r\n /**\r\n * Reads a string till its end.\r\n * @returns {string} String read\r\n * @inner\r\n */\r\n function readString() {\r\n var re = stringDelim === '\"' ? stringDoubleRe : stringSingleRe;\r\n re.lastIndex = offset - 1;\r\n var match = re.exec(source);\r\n if (!match)\r\n throw illegal(\"string\");\r\n offset = re.lastIndex;\r\n push(stringDelim);\r\n stringDelim = null;\r\n return unescape(match[1]);\r\n }\r\n\r\n /**\r\n * Gets the character at `pos` within the source.\r\n * @param {number} pos Position\r\n * @returns {string} Character\r\n * @inner\r\n */\r\n function charAt(pos) {\r\n return source.charAt(pos);\r\n }\r\n\r\n /**\r\n * Obtains the next token.\r\n * @returns {?string} Next token or `null` on eof\r\n * @inner\r\n */\r\n function next() {\r\n if (stack.length > 0)\r\n return stack.shift();\r\n if (stringDelim)\r\n return readString();\r\n var repeat,\r\n prev,\r\n curr;\r\n do {\r\n if (offset === length)\r\n return null;\r\n repeat = false;\r\n while (/\\s/.test(curr = charAt(offset))) {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n }\r\n if (charAt(offset) === s_sl) {\r\n if (++offset === length)\r\n throw illegal(\"comment\");\r\n if (charAt(offset) === s_sl) { // Line\r\n while (charAt(++offset) !== s_nl)\r\n if (offset === length)\r\n return null;\r\n ++offset;\r\n ++line;\r\n repeat = true;\r\n } else if ((curr = charAt(offset)) === s_as) { /* Block */\r\n do {\r\n if (curr === s_nl)\r\n ++line;\r\n if (++offset === length)\r\n return null;\r\n prev = curr;\r\n curr = charAt(offset);\r\n } while (prev !== s_as || curr !== s_sl);\r\n ++offset;\r\n repeat = true;\r\n } else\r\n return s_sl;\r\n }\r\n } while (repeat);\r\n\r\n if (offset === length)\r\n return null;\r\n var end = offset;\r\n delimRe.lastIndex = 0;\r\n var delim = delimRe.test(charAt(end++));\r\n if (!delim)\r\n while (end < length && !delimRe.test(charAt(end)))\r\n ++end;\r\n var token = source.substring(offset, offset = end);\r\n if (token === '\"' || token === \"'\")\r\n stringDelim = token;\r\n return token;\r\n }\r\n\r\n /**\r\n * Pushes a token back to the stack.\r\n * @param {string} token Token\r\n * @returns {undefined}\r\n * @inner\r\n */\r\n function push(token) {\r\n stack.push(token);\r\n }\r\n\r\n /**\r\n * Peeks for the next token.\r\n * @returns {?string} Token or `null` on eof\r\n * @inner\r\n */\r\n function peek() {\r\n if (!stack.length) {\r\n var token = next();\r\n if (token === null)\r\n return null;\r\n push(token);\r\n }\r\n return stack[0];\r\n }\r\n\r\n /**\r\n * Skips a token.\r\n * @param {string} expected Expected token\r\n * @param {boolean} [optional=false] Whether the token is optional\r\n * @returns {boolean} `true` when skipped, `false` if not\r\n * @throws {Error} When a required token is not present\r\n * @inner\r\n */\r\n function skip(expected, optional) {\r\n var actual = peek(),\r\n equals = actual === expected;\r\n if (equals) {\r\n next();\r\n return true;\r\n }\r\n if (!optional)\r\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\r\n return false;\r\n }\r\n\r\n return {\r\n line: function() { return line; },\r\n next: next,\r\n peek: peek,\r\n push: push,\r\n skip: skip\r\n };\r\n /* eslint-enable default-case, callback-return */\r\n}","\"use strict\";\r\nmodule.exports = Type; \r\n\r\nvar Namespace = require(10);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = Namespace.prototype;\r\n/** @alias Type.prototype */\r\nvar TypePrototype = Namespace.extend(Type);\r\n\r\nvar Enum = require(5),\r\n OneOf = require(12),\r\n Field = require(6),\r\n Service = require(17),\r\n Prototype = require(14),\r\n Reader = require(15),\r\n Writer = require(26),\r\n encoder = require(4),\r\n decoder = require(3),\r\n verifier = require(25),\r\n inherits = require(7),\r\n util = require(21);\r\n\r\nvar codegen = util.codegen;\r\n\r\n/**\r\n * Constructs a new message type.\r\n * @classdesc Reflected message type.\r\n * @extends Namespace\r\n * @constructor\r\n * @param {string} name Message name\r\n * @param {Object} [options] Declared options\r\n */\r\nfunction Type(name, options) {\r\n Namespace.call(this, name, options);\r\n\r\n /**\r\n * Message fields.\r\n * @type {Object.}\r\n */\r\n this.fields = {}; // toJSON, marker\r\n\r\n /**\r\n * Oneofs declared within this namespace, if any.\r\n * @type {Object.}\r\n */\r\n this.oneofs = undefined; // toJSON\r\n\r\n /**\r\n * Extension ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.extensions = undefined; // toJSON\r\n\r\n /**\r\n * Reserved ranges, if any.\r\n * @type {number[][]}\r\n */\r\n this.reserved = undefined; // toJSON\r\n\r\n /**\r\n * Cached fields by id.\r\n * @type {?Object.}\r\n * @private\r\n */\r\n this._fieldsById = null;\r\n\r\n /**\r\n * Cached fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._fieldsArray = null;\r\n\r\n /**\r\n * Cached oneofs as an array.\r\n * @type {?OneOf[]}\r\n * @private\r\n */\r\n this._oneofsArray = null;\r\n\r\n /**\r\n * Cached constructor.\r\n * @type {?Function}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nObject.defineProperties(TypePrototype, {\r\n\r\n /**\r\n * Message fields by id.\r\n * @name Type#fieldsById\r\n * @type {Object.}\r\n * @readonly\r\n */\r\n fieldsById: {\r\n get: TypePrototype.getFieldsById = function getFieldsById() {\r\n if (this._fieldsById)\r\n return this._fieldsById;\r\n this._fieldsById = {};\r\n var names = Object.keys(this.fields);\r\n for (var i = 0; i < names.length; ++i) {\r\n var field = this.fields[names[i]],\r\n id = field.id;\r\n if (this._fieldsById[id])\r\n throw Error(\"duplicate id \" + id + \" in \" + this);\r\n this._fieldsById[id] = field;\r\n }\r\n return this._fieldsById;\r\n }\r\n },\r\n\r\n /**\r\n * Fields of this message as an array for iteration.\r\n * @name Type#fieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n fieldsArray: {\r\n get: TypePrototype.getFieldsArray = function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Oneofs of this message as an array for iteration.\r\n * @name Type#oneofsArray\r\n * @type {OneOf[]}\r\n * @readonly\r\n */\r\n oneofsArray: {\r\n get: TypePrototype.getOneofsArray = function getOneofsArray() {\r\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\r\n }\r\n },\r\n\r\n /**\r\n * The registered constructor, if any registered, otherwise a generic constructor.\r\n * @name Type#ctor\r\n * @type {Prototype}\r\n */\r\n ctor: {\r\n get: TypePrototype.getCtor = function getCtor() {\r\n if (this._ctor)\r\n return this._ctor;\r\n var ctor;\r\n if (codegen.supported)\r\n ctor = codegen(\"p\")(\"P.call(this,p)\").eof(this.getFullName() + \"$ctor\", {\r\n P: Prototype\r\n });\r\n else\r\n ctor = function GenericMessage(properties) {\r\n Prototype.call(this, properties);\r\n };\r\n ctor.prototype = inherits(ctor, this);\r\n this._ctor = ctor;\r\n return ctor;\r\n },\r\n set: TypePrototype.setCtor = function setCtor(ctor) {\r\n if (ctor && !(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n this._ctor = ctor;\r\n }\r\n }\r\n});\r\n\r\nfunction clearCache(type) {\r\n type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\r\n delete type.encode;\r\n delete type.decode;\r\n return type;\r\n}\r\n\r\n/**\r\n * Tests if the specified JSON object describes a message type.\r\n * @param {*} json JSON object to test\r\n * @returns {boolean} `true` if the object describes a message type\r\n */\r\nType.testJSON = function testJSON(json) {\r\n return Boolean(json && json.fields);\r\n};\r\n\r\nvar nestedTypes = [ Enum, Type, Field, Service ];\r\n\r\n/**\r\n * Creates a type from JSON.\r\n * @param {string} name Message name\r\n * @param {Object} json JSON object\r\n * @returns {Type} Created message type\r\n */\r\nType.fromJSON = function fromJSON(name, json) {\r\n var type = new Type(name, json.options);\r\n type.extensions = json.extensions;\r\n type.reserved = json.reserved;\r\n if (json.fields)\r\n Object.keys(json.fields).forEach(function(fieldName) {\r\n type.add(Field.fromJSON(fieldName, json.fields[fieldName]));\r\n });\r\n if (json.oneofs)\r\n Object.keys(json.oneofs).forEach(function(oneOfName) {\r\n type.add(OneOf.fromJSON(oneOfName, json.oneofs[oneOfName]));\r\n });\r\n if (json.nested)\r\n Object.keys(json.nested).forEach(function(nestedName) {\r\n var nested = json.nested[nestedName];\r\n for (var i = 0; i < nestedTypes.length; ++i) {\r\n if (nestedTypes[i].testJSON(nested)) {\r\n type.add(nestedTypes[i].fromJSON(nestedName, nested));\r\n return;\r\n }\r\n }\r\n throw Error(\"invalid nested object in \" + type + \": \" + nestedName);\r\n });\r\n if (json.extensions && json.extensions.length)\r\n type.extensions = json.extensions;\r\n if (json.reserved && json.reserved.length)\r\n type.reserved = json.reserved;\r\n return type;\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.toJSON = function toJSON() {\r\n var inherited = NamespacePrototype.toJSON.call(this);\r\n return {\r\n options : inherited && inherited.options || undefined,\r\n oneofs : Namespace.arrayToJSON(this.getOneofsArray()),\r\n fields : Namespace.arrayToJSON(this.getFieldsArray().filter(function(obj) { return !obj.declaringField; })) || {},\r\n extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\r\n reserved : this.reserved && this.reserved.length ? this.reserved : undefined,\r\n nested : inherited && inherited.nested || undefined\r\n };\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.resolveAll = function resolve() {\r\n var fields = this.getFieldsArray(), i = 0;\r\n while (i < fields.length)\r\n fields[i++].resolve();\r\n var oneofs = this.getOneofsArray(); i = 0;\r\n while (i < oneofs.length)\r\n oneofs[i++].resolve();\r\n return NamespacePrototype.resolve.call(this);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nTypePrototype.get = function get(name) {\r\n return NamespacePrototype.get.call(this, name) || this.fields && this.fields[name] || this.oneofs && this.oneofs[name] || null;\r\n};\r\n\r\n/**\r\n * Adds a nested object to this type.\r\n * @param {ReflectionObject} object Nested object to add\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\r\n */\r\nTypePrototype.add = function add(object) {\r\n if (this.get(object.name))\r\n throw Error(\"duplicate name '\" + object.name + '\" in ' + this);\r\n if (object instanceof Field && object.extend === undefined) {\r\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\r\n // The root object takes care of adding distinct sister-fields to the respective extended\r\n // type instead.\r\n if (this.getFieldsById()[object.id])\r\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\r\n if (object.parent)\r\n object.parent.remove(object);\r\n this.fields[object.name] = object;\r\n object.message = this;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n if (object instanceof OneOf) {\r\n if (!this.oneofs)\r\n this.oneofs = {};\r\n this.oneofs[object.name] = object;\r\n object.onAdd(this);\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.add.call(this, object);\r\n};\r\n\r\n/**\r\n * Removes a nested object from this type.\r\n * @param {ReflectionObject} object Nested object to remove\r\n * @returns {Type} `this`\r\n * @throws {TypeError} If arguments are invalid\r\n * @throws {Error} If `object` is not a member of this type\r\n */\r\nTypePrototype.remove = function remove(object) {\r\n if (object instanceof Field && object.extend === undefined) {\r\n // See Type#add for the reason why extension fields are excluded here.\r\n if (this.fields[object.name] !== object)\r\n throw Error(object + \" is not a member of \" + this);\r\n delete this.fields[object.name];\r\n object.message = null;\r\n return clearCache(this);\r\n }\r\n return NamespacePrototype.remove.call(this, object);\r\n};\r\n\r\n/**\r\n * Creates a new message of this type using the specified properties.\r\n * @param {Object} [properties] Properties to set\r\n * @param {?Function} [ctor] Constructor to use.\r\n * Defaults to use the internal constuctor.\r\n * @returns {Prototype} Message instance\r\n */\r\nTypePrototype.create = function create(properties, ctor) {\r\n if (typeof properties === 'function') {\r\n ctor = properties;\r\n properties = undefined;\r\n } else if (properties /* already */ instanceof Prototype)\r\n return properties;\r\n if (ctor) {\r\n if (!(ctor.prototype instanceof Prototype))\r\n throw util._TypeError(\"ctor\", \"a constructor inheriting from Prototype\");\r\n } else\r\n ctor = this.getCtor();\r\n return new ctor(properties);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encode = function encode(message, writer) {\r\n return (this.encode = codegen.supported\r\n ? encoder.generate(this).eof(this.getFullName() + \"$encode\", {\r\n Writer : Writer,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : encoder.fallback\r\n ).call(this, message, writer);\r\n};\r\n\r\n/**\r\n * Encodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Prototype|Object} message Message instance or plain object\r\n * @param {Writer} [writer] Writer to encode to\r\n * @returns {Writer} writer\r\n */\r\nTypePrototype.encodeDelimited = function encodeDelimited(message, writer) {\r\n return this.encode(message, writer).ldelim();\r\n};\r\n\r\n/**\r\n * Decodes a message of this type.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @param {number} [length] Length of the message, if known beforehand\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decode = function decode(readerOrBuffer, length) {\r\n return (this.decode = codegen.supported\r\n ? decoder.generate(this).eof(this.getFullName() + \"$decode\", {\r\n Reader : Reader,\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; }),\r\n util : util\r\n })\r\n : decoder.fallback\r\n ).call(this, readerOrBuffer, length);\r\n};\r\n\r\n/**\r\n * Decodes a message of this type preceeded by its byte length as a varint.\r\n * @param {Reader|Uint8Array} readerOrBuffer Reader or buffer to decode from\r\n * @returns {Prototype} Decoded message\r\n */\r\nTypePrototype.decodeDelimited = function decodeDelimited(readerOrBuffer) {\r\n readerOrBuffer = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader(readerOrBuffer);\r\n return this.decode(readerOrBuffer, readerOrBuffer.uint32());\r\n};\r\n\r\n/**\r\n * Verifies that enum values are valid and that any required fields are present.\r\n * @param {Prototype|Object} message Message to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n */\r\nTypePrototype.verify = function verify(message) {\r\n return (this.verify = codegen.supported\r\n ? verifier.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : verifier.fallback\r\n ).call(this, message);\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Common type constants.\r\n * @namespace\r\n */\r\nvar types = exports;\r\n\r\nvar s = [\r\n \"double\", // 0\r\n \"float\", // 1\r\n \"int32\", // 2\r\n \"uint32\", // 3\r\n \"sint32\", // 4\r\n \"fixed32\", // 5\r\n \"sfixed32\", // 6\r\n \"int64\", // 7\r\n \"uint64\", // 8\r\n \"sint64\", // 9\r\n \"fixed64\", // 10\r\n \"sfixed64\", // 11\r\n \"bool\", // 12\r\n \"string\", // 13\r\n \"bytes\" // 14\r\n];\r\n\r\nfunction bake(values, offset) {\r\n var i = 0, o = {};\r\n offset |= 0;\r\n while (i < values.length) o[s[i + offset]] = values[i++];\r\n return o;\r\n}\r\n\r\n/**\r\n * Basic type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.basic = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2,\r\n /* bytes */ 2\r\n]);\r\n\r\nvar emptyArray = [];\r\nif (Object.freeze)\r\n Object.freeze(emptyArray);\r\n\r\n/**\r\n * Basic type defaults.\r\n * @type {Object.}\r\n */\r\ntypes.defaults = bake([\r\n /* double */ 0,\r\n /* float */ 0,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 0,\r\n /* sfixed32 */ 0,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 0,\r\n /* sfixed64 */ 0,\r\n /* bool */ false,\r\n /* string */ \"\",\r\n /* bytes */ emptyArray\r\n]);\r\n\r\n/**\r\n * Basic long type wire types.\r\n * @type {Object.}\r\n */\r\ntypes.long = bake([\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1\r\n], 7);\r\n\r\n/**\r\n * Allowed types for map keys with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.mapKey = bake([\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0,\r\n /* string */ 2\r\n], 2);\r\n\r\n/**\r\n * Allowed types for packed repeated fields with their associated wire type.\r\n * @type {Object.}\r\n */\r\ntypes.packed = bake([\r\n /* double */ 1,\r\n /* float */ 5,\r\n /* int32 */ 0,\r\n /* uint32 */ 0,\r\n /* sint32 */ 0,\r\n /* fixed32 */ 5,\r\n /* sfixed32 */ 5,\r\n /* int64 */ 0,\r\n /* uint64 */ 0,\r\n /* sint64 */ 0,\r\n /* fixed64 */ 1,\r\n /* sfixed64 */ 1,\r\n /* bool */ 0\r\n]);\r\n","\"use strict\";\r\n\r\n/**\r\n * Utility functions.\r\n * @namespace\r\n */\r\nvar util = exports;\r\n\r\nutil.codegen = require(22);\r\n\r\n/**\r\n * Tests if the specified value is a string.\r\n * @memberof util\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a string\r\n */\r\nfunction isString(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\n\r\nutil.isString = isString;\r\n\r\n/**\r\n * Tests if the specified value is a non-null object.\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is a non-null object\r\n */\r\nutil.isObject = function isObject(value) {\r\n return Boolean(value && typeof value === 'object');\r\n};\r\n\r\n/**\r\n * Tests if the specified value is an integer.\r\n * @function\r\n * @param {*} value Value to test\r\n * @returns {boolean} `true` if the value is an integer\r\n */\r\nutil.isInteger = Number.isInteger || function isInteger(value) {\r\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\r\n};\r\n\r\n/**\r\n * Converts an object's values to an array.\r\n * @param {Object.} object Object to convert\r\n * @returns {Array.<*>} Converted array\r\n */\r\nutil.toArray = function toArray(object) {\r\n if (!object)\r\n return [];\r\n var names = Object.keys(object),\r\n length = names.length;\r\n var array = new Array(length);\r\n for (var i = 0; i < length; ++i)\r\n array[i] = object[names[i]];\r\n return array;\r\n};\r\n\r\n/**\r\n * Creates a type error.\r\n * @param {string} name Argument name\r\n * @param {string} [description=a string] Expected argument descripotion\r\n * @returns {TypeError} Created type error\r\n * @private\r\n */\r\nutil._TypeError = function(name, description) {\r\n return TypeError(name + \" must be \" + (description || \"a string\"));\r\n};\r\n\r\n/**\r\n * Returns a promise from a node-style function.\r\n * @memberof util\r\n * @param {function(Error, ...*)} fn Function to call\r\n * @param {Object} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var args = [];\r\n for (var i = 2; i < arguments.length; ++i)\r\n args.push(arguments[i]);\r\n return new Promise(function(resolve, reject) {\r\n fn.apply(ctx, args.concat(\r\n function(err/*, varargs */) {\r\n if (err) reject(err);\r\n else resolve.apply(null, Array.prototype.slice.call(arguments, 1));\r\n }\r\n ));\r\n });\r\n}\r\n\r\nutil.asPromise = asPromise;\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} path File path or url\r\n * @param {function(?Error, string=)} [callback] Node-style callback\r\n * @returns {Promise|undefined} Promise if callback has been omitted \r\n */\r\nfunction fetch(path, callback) {\r\n if (!callback)\r\n return asPromise(fetch, util, path);\r\n var fs; try { fs = require(\"fs\"); } catch (e) {} // eslint-disable-line no-empty\r\n if (fs && fs.readFile)\r\n return fs.readFile(path, \"utf8\", callback);\r\n var xhr = new XMLHttpRequest();\r\n function onload() {\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n if (isString(xhr.responseText))\r\n return callback(null, xhr.responseText);\r\n return callback(Error(\"request failed\"));\r\n }\r\n xhr.onreadystatechange = function() {\r\n if (xhr.readyState === 4)\r\n onload();\r\n };\r\n xhr.open(\"GET\", path, true);\r\n xhr.send();\r\n return undefined;\r\n}\r\n\r\nutil.fetch = fetch;\r\n\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @memberof util\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\nfunction isAbsolutePath(path) {\r\n return /^(?:\\/|[a-zA-Z0-9]+:)/.test(path);\r\n}\r\n\r\nutil.isAbsolutePath = isAbsolutePath;\r\n\r\n/**\r\n * Normalizes the specified path.\r\n * @memberof util\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\nfunction normalizePath(path) {\r\n path = path.replace(/\\\\/g, '/')\r\n .replace(/\\/{2,}/g, '/');\r\n var parts = path.split('/');\r\n var abs = isAbsolutePath(path);\r\n var prefix = \"\";\r\n if (abs)\r\n prefix = parts.shift() + '/';\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === '..') {\r\n if (i > 0)\r\n parts.splice(--i, 2);\r\n else if (abs)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === '.')\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join('/');\r\n}\r\n\r\nutil.normalizePath = normalizePath;\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path that was used to fetch the origin file\r\n * @param {string} importPath Import path specified in the origin file\r\n * @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the imported file\r\n */\r\nutil.resolvePath = function resolvePath(originPath, importPath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n importPath = normalizePath(importPath);\r\n if (isAbsolutePath(importPath))\r\n return importPath;\r\n if (!alreadyNormalized)\r\n originPath = normalizePath(originPath);\r\n originPath = originPath.replace(/(?:\\/|^)[^/]+$/, '');\r\n return originPath.length ? normalizePath(originPath + '/' + importPath) : importPath;\r\n};\r\n\r\n/**\r\n * Merges the properties of the source object into the destination object.\r\n * @param {Object} dst Destination object\r\n * @param {Object} src Source object\r\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\r\n * @returns {Object} Destination object\r\n */\r\nutil.merge = function merge(dst, src, ifNotSet) {\r\n if (src) {\r\n var keys = Object.keys(src);\r\n for (var i = 0; i < keys.length; ++i)\r\n if (dst[keys[i]] === undefined || !ifNotSet)\r\n dst[keys[i]] = src[keys[i]];\r\n }\r\n return dst;\r\n};\r\n\r\n// Reserved words, ref: https://msdn.microsoft.com/en-us/library/ttyab5c8.aspx\r\n// var reserved = \"break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,false,finally,for,function,if,import,in,instanceof,new,null,protected,return,super,switch,this,throw,true,try,typeof,var,while,with,abstract,boolean,byte,char,decimal,double,enum,final,float,get,implements,int,interface,internal,long,package,private,protected,public,sbyte,set,short,static,uint,ulong,ushort,void,assert,ensure,event,goto,invariant,namespace,native,require,synchronized,throws,transient,use,volatile\".split(',');\r\n\r\n/**\r\n * Returns a safe property accessor for the specified properly name.\r\n * @param {string} prop Property name\r\n * @returns {string} Safe accessor\r\n */\r\nutil.safeProp = function safeProp(prop) {\r\n // NOTE: While dot notation looks cleaner it doesn't seem to have a significant impact on performance.\r\n // Hence, we can safe the extra bytes from providing the reserved keywords above for pre-ES5 envs.\r\n return /* /^[a-z_$][a-z0-9_$]*$/i.test(prop) && !reserved.indexOf(prop) ? \".\" + prop : */ \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Creates a new buffer of whatever type supported by the environment.\r\n * @param {number} [size=0] Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nutil.newBuffer = function newBuffer(size) {\r\n return new (util.Buffer || typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size || 0);\r\n};\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(24));\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\nvar blockOpenRe = /[{[]$/,\r\n blockCloseRe = /^[}\\]]/,\r\n casingRe = /:$/,\r\n branchRe = /^\\s*(?:if|else if|while|for)\\b|\\b(?:else)\\s*$/,\r\n breakRe = /\\b(?:break|continue);?$|^\\s*return\\b/;\r\n\r\n/**\r\n * Programmatically generates a function.\r\n * @memberof util\r\n * @param {...string} params Function parameter names\r\n * @returns {util.CodegenAppender} Printf-like appender function\r\n * @property {boolean} supported Whether code generation is supported by the environment.\r\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\r\n */\r\nfunction codegen(/* varargs */) {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'];\r\n\r\n var indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * Appends a printf-like formatted line to the generated source. Returned when calling {@link util.codegen}.\r\n * @typedef CodegenAppender\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} format A printf-like format string\r\n * @param {...*} params Format replacements\r\n * @returns {util.CodegenAppender} Itself\r\n * @property {util.CodegenStringer} str\r\n * @property {util.CodegenEnder} eof\r\n * @see {@link https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args}\r\n */\r\n /**/\r\n function gen() {\r\n var fmt = [];\r\n for (var i = 0; i < arguments.length; ++i)\r\n fmt[i] = arguments[i];\r\n var line = gen.fmt.apply(null, fmt);\r\n var level = indent;\r\n if (src.length) {\r\n var prev = src[src.length - 1];\r\n\r\n // block open or one time branch\r\n if (blockOpenRe.test(prev))\r\n level = ++indent; // keep\r\n else if (branchRe.test(prev))\r\n ++level; // once\r\n \r\n // casing\r\n if (casingRe.test(prev) && !casingRe.test(line)) {\r\n level = ++indent;\r\n inCase = true;\r\n } else if (inCase && breakRe.test(prev)) {\r\n level = --indent;\r\n inCase = false;\r\n }\r\n\r\n // block close\r\n if (blockCloseRe.test(line))\r\n level = --indent;\r\n }\r\n for (var index = 0; index < level; ++index)\r\n line = \"\\t\" + line;\r\n src.push(line);\r\n return gen;\r\n }\r\n\r\n gen.fmt = function fmt(format) {\r\n var params = Array.prototype.slice.call(arguments, 1),\r\n index = 0;\r\n return format.replace(/%([djs])/g, function($0, $1) {\r\n var param = params[index++];\r\n return $1 === \"j\"\r\n ? JSON.stringify(param)\r\n : String(param);\r\n });\r\n };\r\n\r\n /**\r\n * Stringifies the so far generated function source.\r\n * @typedef CodegenStringer\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @returns {string} Function source using tabs for indentation\r\n */\r\n /**/\r\n gen.str = function str(name) {\r\n return \"function \" + (name ? name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + args.join(\",\") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\r\n };\r\n\r\n /**\r\n * Ends generation and builds the function.\r\n * @typedef CodegenEnder\r\n * @memberof util\r\n * @type {function}\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object|Array.} [scope] Function scope\r\n * @returns {function} A function to apply the scope manually when `scope` is an array, otherwise the generated function with scope applied\r\n */\r\n /**/\r\n gen.eof = function eof(name, scope) {\r\n if (name && typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var code = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + code.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n code = \"return \" + code;\r\n var params, values = [];\r\n if (Array.isArray(scope)) {\r\n params = scope.slice();\r\n } else if (scope) {\r\n params = Object.keys(scope);\r\n values = params.map(function(key) { return scope[key]; });\r\n } else\r\n params = [];\r\n var fn = Function.apply(null, params.concat(code)); // eslint-disable-line no-new-func\r\n return values ? fn.apply(null, values) : fn();\r\n };\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false;\r\ntry { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\n\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(21);\r\n\r\n/**\r\n * Constructs new long bits.\r\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\r\n * @memberof util\r\n * @constructor\r\n * @param {number} lo Low bits\r\n * @param {number} hi High bits\r\n */\r\nfunction LongBits(lo, hi) { // make sure to always call this with unsigned 32bits for proper optimization\r\n\r\n /**\r\n * Low bits.\r\n * @type {number}\r\n */\r\n this.lo = lo;\r\n\r\n /**\r\n * High bits.\r\n * @type {number}\r\n */\r\n this.hi = hi;\r\n}\r\n\r\n/** @alias util.LongBits.prototype */\r\nvar LongBitsPrototype = LongBits.prototype;\r\n\r\n/**\r\n * Zero bits.\r\n * @memberof util.LongBits\r\n * @type {util.LongBits}\r\n */\r\nvar zero = LongBits.zero = new LongBits(0, 0);\r\n\r\nzero.toNumber = function() { return 0; };\r\nzero.zzEncode = zero.zzDecode = function() { return this; };\r\nzero.length = function() { return 1; };\r\n\r\n/**\r\n * Constructs new long bits from the specified number.\r\n * @param {number} value Value\r\n * @returns {util.LongBits} Instance\r\n */\r\nLongBits.fromNumber = function fromNumber(value) {\r\n if (value === 0)\r\n return zero;\r\n var sign = value < 0;\r\n value = Math.abs(value);\r\n var lo = value >>> 0,\r\n hi = (value - lo) / 4294967296 >>> 0;\r\n if (sign) {\r\n hi = ~hi >>> 0;\r\n lo = ~lo >>> 0;\r\n if (++lo > 4294967295) {\r\n lo = 0;\r\n if (++hi > 4294967295)\r\n hi = 0;\r\n }\r\n }\r\n return new LongBits(lo, hi);\r\n};\r\n\r\n/**\r\n * Constructs new long bits from a number, long or string.\r\n * @param {Long|number|string} value Value\r\n * @returns {util.LongBits} Instance\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nLongBits.from = function from(value) {\r\n switch (typeof value) { // eslint-disable-line default-case\r\n case 'number':\r\n return LongBits.fromNumber(value);\r\n case 'string':\r\n value = util.Long.fromString(value); // throws without a long lib\r\n }\r\n return (value.low || value.high) && new LongBits(value.low >>> 0, value.high >>> 0) || zero;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a possibly unsafe JavaScript number.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {number} Possibly unsafe number\r\n */\r\nLongBitsPrototype.toNumber = function toNumber(unsigned) {\r\n if (!unsigned && this.hi >>> 31) {\r\n this.lo = ~this.lo + 1 >>> 0;\r\n this.hi = ~this.hi >>> 0;\r\n if (!this.lo)\r\n this.hi = this.hi + 1 >>> 0;\r\n return -(this.lo + this.hi * 4294967296);\r\n }\r\n return this.lo + this.hi * 4294967296;\r\n};\r\n\r\n/**\r\n * Converts this long bits to a long.\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long} Long\r\n */\r\nLongBitsPrototype.toLong = function toLong(unsigned) {\r\n return new util.Long(this.lo, this.hi, unsigned);\r\n};\r\n\r\nvar charCodeAt = String.prototype.charCodeAt;\r\n\r\n/**\r\n * Constructs new long bits from the specified 8 characters long hash.\r\n * @param {string} hash Hash\r\n * @returns {util.LongBits} Bits\r\n */\r\nLongBits.fromHash = function fromHash(hash) {\r\n return new LongBits(\r\n ( charCodeAt.call(hash, 0)\r\n | charCodeAt.call(hash, 1) << 8\r\n | charCodeAt.call(hash, 2) << 16\r\n | charCodeAt.call(hash, 3) << 24) >>> 0\r\n ,\r\n ( charCodeAt.call(hash, 4)\r\n | charCodeAt.call(hash, 5) << 8\r\n | charCodeAt.call(hash, 6) << 16\r\n | charCodeAt.call(hash, 7) << 24) >>> 0\r\n );\r\n};\r\n\r\n/**\r\n * Converts this long bits to a 8 characters long hash.\r\n * @returns {string} Hash\r\n */\r\nLongBitsPrototype.toHash = function toHash() {\r\n return String.fromCharCode(\r\n this.lo & 255,\r\n this.lo >>> 8 & 255,\r\n this.lo >>> 16 & 255,\r\n this.lo >>> 24 & 255,\r\n this.hi & 255,\r\n this.hi >>> 8 & 255,\r\n this.hi >>> 16 & 255,\r\n this.hi >>> 24 & 255\r\n );\r\n};\r\n\r\n/**\r\n * Zig-zag encodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzEncode = function zzEncode() {\r\n var mask = this.hi >> 31;\r\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\r\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Zig-zag decodes this long bits.\r\n * @returns {util.LongBits} `this`\r\n */\r\nLongBitsPrototype.zzDecode = function zzDecode() {\r\n var mask = -(this.lo & 1);\r\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\r\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Calculates the length of this longbits when encoded as a varint.\r\n * @returns {number} Length\r\n */\r\nLongBitsPrototype.length = function length() {\r\n var part0 = this.lo,\r\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\r\n part2 = this.hi >>> 24;\r\n if (part2 === 0) {\r\n if (part1 === 0)\r\n return part0 < 1 << 14\r\n ? part0 < 1 << 7 ? 1 : 2\r\n : part0 < 1 << 21 ? 3 : 4;\r\n return part1 < 1 << 14\r\n ? part1 < 1 << 7 ? 5 : 6\r\n : part1 < 1 << 21 ? 7 : 8;\r\n }\r\n return part2 < 1 << 7 ? 9 : 10;\r\n};\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\n/**\r\n * Whether running within node or not.\r\n * @memberof util\r\n * @type {boolean}\r\n */\r\nvar isNode = util.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\r\n\r\n/**\r\n * Optional buffer class to use.\r\n * If you assign any compatible buffer implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Buffer = null;\r\n\r\nif (isNode)\r\n try { util.Buffer = require(\"buffer\").Buffer; } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Optional Long class to use.\r\n * If you assign any compatible long implementation to this property, the library will use it.\r\n * @type {?Function}\r\n */\r\nutil.Long = global.dcodeIO && global.dcodeIO.Long || null;\r\n\r\nif (!util.Long && isNode)\r\n try { util.Long = require(\"long\"); } catch (e) {} // eslint-disable-line no-empty\r\n\r\n/**\r\n * Converts a number or long to an 8 characters long hash string.\r\n * @param {Long|number} value Value to convert\r\n * @returns {string} Hash\r\n */\r\nutil.longToHash = function longToHash(value) {\r\n return value\r\n ? LongBits.from(value).toHash()\r\n : '\\0\\0\\0\\0\\0\\0\\0\\0';\r\n};\r\n\r\n/**\r\n * Converts an 8 characters long hash string to a long or number.\r\n * @param {string} hash Hash\r\n * @param {boolean} [unsigned=false] Whether unsigned or not\r\n * @returns {Long|number} Original value\r\n */\r\nutil.longFromHash = function longFromHash(hash, unsigned) {\r\n var bits = LongBits.fromHash(hash);\r\n if (util.Long)\r\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\r\n return bits.toNumber(Boolean(unsigned));\r\n};\r\n\r\n/**\r\n * Tests if two possibly long values are not equal.\r\n * @param {number|Long} a First value\r\n * @param {number|Long} b Second value\r\n * @returns {boolean} `true` if not equal\r\n */\r\nutil.longNeq = function longNeq(a, b) {\r\n return typeof a === 'number'\r\n ? typeof b === 'number'\r\n ? a !== b\r\n : (a = LongBits.fromNumber(a)).lo !== b.low || a.hi !== b.high\r\n : typeof b === 'number'\r\n ? (b = LongBits.fromNumber(b)).lo !== a.low || b.hi !== a.high\r\n : a.low !== b.low || a.high !== b.high;\r\n};\r\n","\"use strict\";\r\n\r\n/**\r\n * Runtime message verifier using code generation on top of reflection.\r\n * @namespace\r\n */\r\nvar verifier = exports;\r\n\r\nvar Enum = require(5),\r\n Type = require(19),\r\n util = require(21);\r\n\r\n/**\r\n * Verifies a runtime message of `this` message type.\r\n * @param {Prototype|Object} message Runtime message or plain object to verify\r\n * @returns {?string} `null` if valid, otherwise the reason why it is not\r\n * @this {Type}\r\n */\r\nverifier.fallback = function fallback(message) {\r\n var fields = this.getFieldsArray(),\r\n i = 0;\r\n while (i < fields.length) {\r\n var field = fields[i++].resolve(),\r\n value = message[field.name];\r\n\r\n if (value === undefined) {\r\n if (field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Enum && field.resolvedType.getValuesById()[value] === undefined) {\r\n return \"invalid enum value \" + field.name + \" = \" + value + \" in \" + this.getFullName();\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (!value && field.required)\r\n return \"missing required field \" + field.name + \" in \" + this.getFullName();\r\n var reason;\r\n if ((reason = field.resolvedType.verify(value)) !== null)\r\n return reason;\r\n }\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Generates a verifier specific to the specified message type.\r\n * @param {Type} mtype Message type\r\n * @returns {util.CodegenAppender} Unscoped codegen instance\r\n */\r\nverifier.generate = function generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray();\r\n var gen = util.codegen(\"m\");\r\n var hasReasonVar = false;\r\n\r\n for (var i = 0; i < fields.length; ++i) {\r\n var field = fields[i].resolve(),\r\n prop = util.safeProp(field.name);\r\n if (field.required) { gen\r\n\r\n (\"if(m%s===undefined)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n } else if (field.resolvedType instanceof Enum) {\r\n var values = util.toArray(field.resolvedType.values); gen\r\n\r\n (\"switch(m%s){\", prop)\r\n (\"default:\")\r\n (\"return 'invalid enum value %s = '+m%s+' in %s'\", field.name, prop, mtype.getFullName());\r\n\r\n for (var j = 0, l = values.length; j < l; ++j) gen\r\n (\"case %d:\", values[j]); gen\r\n (\"}\");\r\n\r\n } else if (field.resolvedType instanceof Type) {\r\n if (field.required) gen\r\n\r\n (\"if(!m%s)\", prop)\r\n (\"return 'missing required field %s in %s'\", field.name, mtype.getFullName());\r\n\r\n if (!hasReasonVar) { gen(\"var r\"); hasReasonVar = true; } gen\r\n\r\n (\"if((r=types[%d].verify(m%s))!==null)\", i, prop)\r\n (\"return r\");\r\n }\r\n }\r\n return gen\r\n (\"return null\");\r\n /* eslint-enable no-unexpected-multiline */\r\n};\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(24),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl;\r\n\r\n/**\r\n * Configures the writer interface according to the environment.\r\n * @memberof Writer\r\n * @returns {undefined}\r\n */\r\nfunction configure() {\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\r\n writeBytes = ArrayImpl.prototype.set && writeBytes_set || writeBytes_for;\r\n}\r\n\r\nWriter.configure = configure;\r\n\r\n/**\r\n * Constructs a new writer operation.\r\n * @classdesc Scheduled writer operation.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {*} val Value to write\r\n * @param {number} len Value byte length\r\n * @private\r\n * @ignore\r\n */\r\nfunction Op(fn, val, len) {\r\n\r\n /**\r\n * Function to call.\r\n * @type {function(Uint8Array, number, *)}\r\n */\r\n this.fn = fn;\r\n\r\n /**\r\n * Value to write.\r\n * @type {*}\r\n */\r\n this.val = val;\r\n\r\n /**\r\n * Value byte length.\r\n * @type {number}\r\n */\r\n this.len = len;\r\n\r\n /**\r\n * Next operation.\r\n * @type {?Writer.Op}\r\n */\r\n this.next = null;\r\n}\r\n\r\nWriter.Op = Op;\r\n\r\nfunction noop() {} // eslint-disable-line no-empty-function\r\n\r\n/**\r\n * Constructs a new writer state.\r\n * @classdesc Copied writer state.\r\n * @memberof Writer\r\n * @constructor\r\n * @param {Writer} writer Writer to copy state from\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer) {\r\n\r\n /**\r\n * Current head.\r\n * @type {Writer.Op}\r\n */\r\n this.head = writer.head;\r\n\r\n /**\r\n * Current tail.\r\n * @type {Writer.Op}\r\n */\r\n this.tail = writer.tail;\r\n\r\n /**\r\n * Current buffer length.\r\n * @type {number}\r\n */\r\n this.len = writer.len;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * When called as a function, returns an appropriate writer for the current environment.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @exports Writer\r\n * @constructor\r\n */\r\nfunction Writer() {\r\n if (!(this instanceof Writer))\r\n return util.Buffer && new BufferWriter() || new Writer();\r\n\r\n /**\r\n * Current length.\r\n * @type {number}\r\n */\r\n this.len = 0;\r\n\r\n /**\r\n * Operations head.\r\n * @type {Object}\r\n */\r\n this.head = new Op(noop, 0, 0);\r\n\r\n /**\r\n * Operations tail\r\n * @type {Object}\r\n */\r\n this.tail = this.head;\r\n\r\n /**\r\n * State stack.\r\n * @type {Object[]}\r\n */\r\n this.stack = [];\r\n\r\n // When a value is written, the writer calculates its byte length and puts it into a linked\r\n // list of operations to perform when finish() is called. This both allows us to allocate\r\n // buffers of the exact required size and reduces the amount of work we have to do compared\r\n // to first calculating over objects and then encoding over objects. In our case, the encoding\r\n // part is just a linked list walk calling linked operations with already prepared values.\r\n}\r\n\r\n/** @alias Writer.prototype */\r\nvar WriterPrototype = Writer.prototype;\r\n\r\n/**\r\n * Pushes a new operation to the queue.\r\n * @param {function(Uint8Array, number, *)} fn Function to call\r\n * @param {number} len Value byte length\r\n * @param {number} val Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.push = function push(fn, len, val) {\r\n var op = new Op(fn, val, len);\r\n this.tail.next = op;\r\n this.tail = op;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\nfunction writeByte(buf, pos, val) {\r\n buf[pos] = val & 255;\r\n}\r\n\r\n/**\r\n * Writes a tag.\r\n * @param {number} id Field id\r\n * @param {number} wireType Wire type\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.tag = function write_tag(id, wireType) {\r\n return this.push(writeByte, 1, id << 3 | wireType & 7);\r\n};\r\n\r\nfunction writeVarint32(buf, pos, val) {\r\n while (val > 127) {\r\n buf[pos++] = val & 127 | 128;\r\n val >>>= 7;\r\n }\r\n buf[pos] = val;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 32 bit value as a varint.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.uint32 = function write_uint32(value) {\r\n value >>>= 0;\r\n return this.push(writeVarint32,\r\n value < 128 ? 1\r\n : value < 16384 ? 2\r\n : value < 2097152 ? 3\r\n : value < 268435456 ? 4\r\n : 5\r\n , value);\r\n};\r\n\r\n/**\r\n * Writes a signed 32 bit value as a varint.\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.int32 = function write_int32(value) {\r\n return value < 0\r\n ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\r\n : this.uint32(value);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as a varint, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sint32 = function write_sint32(value) {\r\n return this.uint32(value << 1 ^ value >> 31);\r\n};\r\n\r\nfunction writeVarint64(buf, pos, val) {\r\n // tends to deoptimize. stays optimized when using bits directly.\r\n while (val.hi || val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\r\n val.hi >>>= 7;\r\n }\r\n buf[pos++] = val.lo;\r\n}\r\n\r\n/**\r\n * Writes an unsigned 64 bit value as a varint.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.uint64 = function write_uint64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint.\r\n * @function\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.int64 = WriterPrototype.uint64;\r\n\r\n/**\r\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sint64 = function sint64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeVarint64, bits.length(), bits);\r\n};\r\n\r\n/**\r\n * Writes a boolish value as a varint.\r\n * @param {boolean} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bool = function write_bool(value) {\r\n return this.push(writeByte, 1, value ? 1 : 0);\r\n};\r\n\r\nfunction writeFixed32(buf, pos, val) {\r\n buf[pos++] = val & 255;\r\n buf[pos++] = val >>> 8 & 255;\r\n buf[pos++] = val >>> 16 & 255;\r\n buf[pos ] = val >>> 24 & 255;\r\n}\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fixed32 = function write_fixed32(value) {\r\n return this.push(writeFixed32, 4, value >>> 0);\r\n};\r\n\r\n/**\r\n * Writes a 32 bit value as fixed 32 bits, zig-zag encoded.\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.sfixed32 = function write_sfixed32(value) {\r\n return this.push(writeFixed32, 4, value << 1 ^ value >> 31);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.fixed64 = function write_fixed64(value) {\r\n var bits = LongBits.from(value);\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\n/**\r\n * Writes a 64 bit value as fixed 64 bits, zig-zag encoded.\r\n * @param {Long|number|string} value Value to write\r\n * @returns {Writer} `this`\r\n * @throws {TypeError} If `value` is a string and no long library is present.\r\n */\r\nWriterPrototype.sfixed64 = function write_sfixed64(value) {\r\n var bits = LongBits.from(value).zzEncode();\r\n return this.push(writeFixed32, 4, bits.hi).push(writeFixed32, 4, bits.lo);\r\n};\r\n\r\nfunction writeFloat(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 23, 4);\r\n}\r\n\r\n/**\r\n * Writes a float (32 bit).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.float = function write_float(value) {\r\n return this.push(writeFloat, 4, value);\r\n};\r\n\r\nfunction writeDouble(buf, pos, val) {\r\n ieee754.write(buf, val, pos, false, 52, 8);\r\n}\r\n\r\n/**\r\n * Writes a double (64 bit float).\r\n * @function\r\n * @param {number} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.double = function write_double(value) {\r\n return this.push(writeDouble, 8, value);\r\n};\r\n\r\nvar writeBytes;\r\n\r\nfunction writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n}\r\n\r\nfunction writeBytes_for(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i)\r\n buf[pos + i] = val[i];\r\n}\r\n\r\n/**\r\n * Writes a sequence of bytes.\r\n * @param {Uint8Array} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.bytes = function write_bytes(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytes, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeString(buf, pos, val) {\r\n for (var i = 0; i < val.length; ++i) {\r\n var c1 = val.charCodeAt(i), c2;\r\n if (c1 < 128) {\r\n buf[pos++] = c1;\r\n } else if (c1 < 2048) {\r\n buf[pos++] = c1 >> 6 | 192;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = val.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buf[pos++] = c1 >> 18 | 240;\r\n buf[pos++] = c1 >> 12 & 63 | 128;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n } else {\r\n buf[pos++] = c1 >> 12 | 224;\r\n buf[pos++] = c1 >> 6 & 63 | 128;\r\n buf[pos++] = c1 & 63 | 128;\r\n }\r\n }\r\n}\r\n\r\nfunction byteLength(val) {\r\n var strlen = val.length >>> 0;\r\n var len = 0;\r\n for (var i = 0; i < strlen; ++i) {\r\n var c1 = val.charCodeAt(i);\r\n if (c1 < 128)\r\n len += 1;\r\n else if (c1 < 2048)\r\n len += 2;\r\n else if ((c1 & 0xFC00) === 0xD800 && (val.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n}\r\n\r\n/**\r\n * Writes a string.\r\n * @param {string} value Value to write\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.string = function write_string(value) {\r\n var len = byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeString, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * Forks this writer's state by pushing it to a stack.\r\n * Calling {@link Writer#ldelim}, {@link Writer#reset} or {@link Writer#finish} resets the writer to the previous state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.fork = function fork() {\r\n this.stack.push(new State(this));\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets this instance to the last state.\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.reset = function reset() {\r\n if (this.stack.length) {\r\n var state = this.stack.pop();\r\n this.head = state.head;\r\n this.tail = state.tail;\r\n this.len = state.len;\r\n } else {\r\n this.head = this.tail = new Op(noop, 0, 0);\r\n this.len = 0;\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\r\n * @param {number} [id] Id with wire type 2 to prepend where applicable\r\n * @returns {Writer} `this`\r\n */\r\nWriterPrototype.ldelim = function ldelim(id) {\r\n var head = this.head,\r\n tail = this.tail,\r\n len = this.len;\r\n this.reset();\r\n if (id !== undefined)\r\n this.tag(id, 2);\r\n this.uint32(len);\r\n this.tail.next = head.next; // skip noop\r\n this.tail = tail;\r\n this.len += len;\r\n return this;\r\n};\r\n\r\n/**\r\n * Finishes the current sequence of write operations and frees all resources.\r\n * @returns {Uint8Array} Finished buffer\r\n */\r\nWriterPrototype.finish = function finish() {\r\n var head = this.head.next, // skip noop\r\n buf = new ArrayImpl(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\n/**\r\n * Constructs a new buffer writer.\r\n * @classdesc Wire format writer using node buffers.\r\n * @exports BufferWriter\r\n * @extends Writer\r\n * @constructor\r\n */\r\nfunction BufferWriter() {\r\n Writer.call(this);\r\n}\r\n\r\n/** @alias BufferWriter.prototype */\r\nvar BufferWriterPrototype = BufferWriter.prototype = Object.create(Writer.prototype);\r\nBufferWriterPrototype.constructor = BufferWriter;\r\n\r\nfunction writeFloatBuffer(buf, pos, val) {\r\n buf.writeFloatLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.float = function write_float_buffer(value) {\r\n return this.push(writeFloatBuffer, 4, value);\r\n};\r\n\r\nfunction writeDoubleBuffer(buf, pos, val) {\r\n buf.writeDoubleLE(val, pos, true);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.double = function write_double_buffer(value) {\r\n return this.push(writeDoubleBuffer, 8, value);\r\n};\r\n\r\nfunction writeBytesBuffer(buf, pos, val) {\r\n if (val.length)\r\n val.copy(buf, pos, 0, val.length);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.bytes = function write_bytes_buffer(value) {\r\n var len = value.length >>> 0;\r\n return len\r\n ? this.uint32(len).push(writeBytesBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\nfunction writeStringBuffer(buf, pos, val) {\r\n if (val.length < 40) // plain js is faster for short strings\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n}\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\t\t\r\n var len = value.length < 40\r\n ? byteLength(value)\r\n : util.Buffer.byteLength(value);\r\n return len\r\n ? this.uint32(len).push(writeStringBuffer, len, value)\r\n : this.push(writeByte, 1, 0);\r\n};\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.finish = function finish_buffer() {\r\n var head = this.head.next, // skip noop\r\n buf = util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(this.len) || new util.Buffer(this.len),\r\n pos = 0;\r\n this.reset();\r\n while (head) {\r\n head.fn(buf, pos, head.val);\r\n pos += head.len;\r\n head = head.next;\r\n }\r\n return buf;\r\n};\r\n\r\nconfigure();\r\n","\"use strict\";\r\nvar protobuf = global.protobuf = exports;\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace.\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\r\n * @param {function(?Error, Root=)} [callback] Callback function\r\n * @returns {Promise|Object} A promise if callback has been omitted, otherwise the protobuf namespace\r\n * @throws {TypeError} If arguments are invalid\r\n */\r\nfunction load(filename, root, callback) {\r\n if (typeof root === 'function') {\r\n callback = root;\r\n root = new protobuf.Root();\r\n } else if (!root)\r\n root = new protobuf.Root();\r\n return root.load(filename, callback) || protobuf;\r\n}\r\n\r\nprotobuf.load = load;\r\n\r\n// Parser\r\nprotobuf.tokenize = require(\"./tokenize\");\r\nprotobuf.parse = require(\"./parse\");\r\n\r\n// Serialization\r\nprotobuf.Writer = require(\"./writer\");\r\nprotobuf.BufferWriter = protobuf.Writer.BufferWriter;\r\nprotobuf.Reader = require(\"./reader\");\r\nprotobuf.BufferReader = protobuf.Reader.BufferReader;\r\nprotobuf.encoder = require(\"./encoder\");\r\nprotobuf.decoder = require(\"./decoder\");\r\nprotobuf.verifier = require(\"./verifier\");\r\n\r\n// Reflection\r\nprotobuf.ReflectionObject = require(\"./object\");\r\nprotobuf.Namespace = require(\"./namespace\");\r\nprotobuf.Root = require(\"./root\");\r\nprotobuf.Enum = require(\"./enum\");\r\nprotobuf.Type = require(\"./type\");\r\nprotobuf.Field = require(\"./field\");\r\nprotobuf.OneOf = require(\"./oneof\");\r\nprotobuf.MapField = require(\"./mapfield\");\r\nprotobuf.Service = require(\"./service\");\r\nprotobuf.Method = require(\"./method\");\r\n\r\n// Runtime\r\nprotobuf.Prototype = require(\"./prototype\");\r\nprotobuf.inherits = require(\"./inherits\");\r\n\r\n// Utility\r\nprotobuf.types = require(\"./types\");\r\nprotobuf.common = require(\"./common\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\r\n/* eslint-disable no-undef */\r\nif (typeof define === 'function' && define.amd)\r\n define([\"long\"], function(Long) {\r\n if (Long) {\r\n protobuf.util.Long = Long;\r\n protobuf.Reader.configure();\r\n protobuf.Writer.configure();\r\n }\r\n return protobuf;\r\n });\r\n/* eslint-enable no-undef */\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/inherits.js b/src/inherits.js index a55e0f00a..dfaab3e2f 100644 --- a/src/inherits.js +++ b/src/inherits.js @@ -167,8 +167,9 @@ inherits.defineProperties = function defineProperties(prototype, type) { // Define each oneof with a non-enumerable getter and setter for the present field type.getOneofsArray().forEach(function(oneof) { - prototypeProperties[oneof.resolve().name] = { - get: function() { + oneof.resolve(); + prototypeProperties[oneof.name] = { + get: prototype['get' + oneof.ucName] = function() { var keys = oneof.oneof; for (var i = 0; i < keys.length; ++i) { var field = oneof.parent.fields[keys[i]]; @@ -177,7 +178,7 @@ inherits.defineProperties = function defineProperties(prototype, type) { } return undefined; }, - set: function(value) { + set: prototype['set' + oneof.ucName] = function(value) { var keys = oneof.oneof; for (var i = 0; i < keys.length; ++i) { if (keys[i] !== value) diff --git a/src/oneof.js b/src/oneof.js index 4de4d4132..795d5d6d9 100644 --- a/src/oneof.js +++ b/src/oneof.js @@ -28,6 +28,12 @@ function OneOf(name, fieldNames, options) { if (fieldNames && !Array.isArray(fieldNames)) throw _TypeError("fieldNames", "an Array"); + /** + * Upper cased name for getter/setter calls. + * @type {string} + */ + this.ucName = this.name.substring(0, 1).toUpperCase() + this.name.substring(1); + /** * Field names that belong to this oneof. * @type {Array.} diff --git a/src/prototype.js b/src/prototype.js index 0a09560ef..7a089f70c 100644 --- a/src/prototype.js +++ b/src/prototype.js @@ -24,9 +24,13 @@ function Prototype(properties, options) { var any = !(options && options.fieldsOnly), fields = this.constructor.$type.fields, keys = Object.keys(properties); - for (var i = 0; i < keys.length; ++i) - if (fields[keys[i]] || any) + for (var i = 0; i < keys.length; ++i) { + var field = fields[keys[i]]; + if (field && field.partOf) + this['set' + field.partOf.ucName](field.name); + if (field || any) this[keys[i]] = properties[keys[i]]; + } } } diff --git a/tests/data/oneof.proto b/tests/data/oneof.proto new file mode 100644 index 000000000..b3e0c2a4c --- /dev/null +++ b/tests/data/oneof.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +message Message { + oneof kind { + string str = 1; + int32 num = 2; + } +} diff --git a/tests/oneof.js b/tests/oneof.js new file mode 100644 index 000000000..0e4ded0e6 --- /dev/null +++ b/tests/oneof.js @@ -0,0 +1,30 @@ +var tape = require("tape"); + +var protobuf = require(".."); + +tape.test("oneofs", function(test) { + + protobuf.load("tests/data/oneof.proto", function(err, root) { + if (err) + return test.fail(err.message); + + var Message = root.lookup("Message"); + var message = Message.create({ + str: "a", + num: 1 + }); + test.equal(message.num, 1, "should initialize the last value"); + test.equal(message.kind, "num", "should reference the last value"); + test.notOk(message.hasOwnProperty('str'), "should not initialize other values"); + + message.str = "a"; + message.setKind('str'); // message.kind = 'str' if IE8 support isn't required + + test.notOk(message.hasOwnProperty('num'), "should delete the previous value"); + test.equal(message.str, "a", "should set the new value"); + test.equal(message.kind, "str", "should reference the new value"); + + test.end(); + }); + +});