diff --git a/dist/protobuf.js b/dist/protobuf.js index 8f944523c..9a5ec7b90 100644 --- a/dist/protobuf.js +++ b/dist/protobuf.js @@ -1,6 +1,6 @@ /*! * protobuf.js v6.1.0 (c) 2016 Daniel Wirtz - * Compiled Thu, 08 Dec 2016 16:52:13 UTC + * Compiled Thu, 08 Dec 2016 17:23:20 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ @@ -3842,8 +3842,8 @@ function Service(rpcImpl) { EventEmitter.call(this); /** - * RPC implementation. - * @type {RPCImpl} + * RPC implementation. Becomes `null` when the service is ended. + * @type {?RPCImpl} */ this.$rpc = rpcImpl; } @@ -3854,10 +3854,17 @@ ServicePrototype.constructor = Service; /** * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. * @returns {rpc.Service} `this` */ -ServicePrototype.end = function end() { - return this.emit('end').off(); +ServicePrototype.end = function end(endedByRPC) { + if (this.$rpc) { + if (!endedByRPC) // signal end to rpcImpl + this.$rpc(null, null, null); + this.$rpc = null; + this.emit('end').off(); + } + return this; }; },{"26":26}],21:[function(require,module,exports){ @@ -4025,6 +4032,8 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel this.getMethodsArray().forEach(function(method) { var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1); rpcService[lcName] = function(request, callback) { + if (!rpcService.$rpc) // already ended? + return; method.resolve(); var requestData; try { @@ -4041,7 +4050,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel return callback ? callback(err) : undefined; } if (responseData === null) { - rpcService.emit('end', method); + rpcService.end(/* endedByRPC */ true); return undefined; } var response; @@ -5147,7 +5156,7 @@ EventEmitterPrototype.off = function off(evt, fn) { }; /** - * Emits an event. + * Emits an event by calling its listeners with the specified arguments. * @param {string} evt Event name * @param {...*} args Arguments * @returns {util.EventEmitter} `this` diff --git a/dist/protobuf.js.map b/dist/protobuf.js.map index c90302f7b..e263e7116 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/codegen.js","src/codegen/decode.js","src/codegen/encode.js","src/codegen/verify.js","src/common.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/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/eventemitter.js","src/util/longbits.js","src/util/pool.js","src/util/runtime.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;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC1iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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\nmodule.exports = codegen;\r\n\r\nvar util = require(25);\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 * A closure for generating functions programmatically.\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {CodegenInstance} Codegen instance\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() {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'],\r\n indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a {@link util.sprintf|sprintf}-like appender function.\r\n * @typedef CodegenInstance\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {CodegenInstance} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var line = util.sprintf.apply(null, arguments);\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 /**\r\n * Stringifies the so far generated function source.\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 * @inner\r\n */\r\n 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 gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\r\n\r\ncodegen.encode = require(4);\r\ncodegen.decode = require(3);\r\ncodegen.verify = require(5);\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection that also provides a fallback.\r\n * @exports codegen.decode\r\n * @namespace\r\n */\r\nvar decode = exports;\r\n\r\nvar Enum = require(7),\r\n Reader = require(17),\r\n types = require(24),\r\n util = require(25),\r\n codegen = require(2);\r\n\r\n/**\r\n * Decodes a message of `this` message's 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} Populated runtime message\r\n * @this Type\r\n */\r\ndecode.fallback = function decode_fallback(readerOrBuffer, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer),\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].length ? 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, with an identical signature to {@link codegen.decode.fallback}.\r\n * @param {Type} mtype Message type\r\n * @returns {CodegenInstance} {@link codegen|Codegen} instance\r\n */\r\ndecode.generate = function decode_generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(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\nutil.props(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: 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\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\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(13);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(23),\r\n Enum = require(7),\r\n MapField = require(10),\r\n types = require(24),\r\n util = require(25);\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|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [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\nutil.props(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 * Determines whether this field is packed. This is an alias of {@link Field#packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\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(16),\r\n Type = require(23),\r\n util = require(25);\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 {*} clazz Inheriting class constructor\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 util.props(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 // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue)\r\n ? util.emptyObject\r\n : 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 util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n var keys = Object.keys(this);\r\n for (var i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(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 util.props(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(8);\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(7),\r\n types = require(24),\r\n util = require(25);\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(13);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(23),\r\n util = require(25);\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|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [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 (type && !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(13);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(7),\r\n Type = require(23),\r\n Field = require(8),\r\n Service = require(21),\r\n util = require(25);\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\nutil.props(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: 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(18),\r\n util = require(25);\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\nutil.props(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: 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 {*} 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(13);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(8),\r\n util = require(25);\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[]|Object} [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 {string[]}\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 {Field[]}\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(22),\r\n Root = require(18),\r\n Type = require(23),\r\n Field = require(8),\r\n MapField = require(10),\r\n OneOf = require(14),\r\n Enum = require(7),\r\n Service = require(21),\r\n Method = require(11),\r\n types = require(24),\r\n util = require(25);\r\nvar camelCase = util.camelCase;\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\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 } 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 * 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 * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\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 {*} [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 {*} [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 * @param {boolean} [options.defaults=false] Also sets default values on the resulting object\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n if (!options)\r\n options = {};\r\n var fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys;\r\n if (options.defaults) {\r\n keys = [];\r\n for (var k in this) // eslint-disable-line guard-for-in\r\n keys.push(k);\r\n } else\r\n 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 (!options.fieldsOnly)\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(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 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 * @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 \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/**\r\n * Creates a new reader using the specified buffer.\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = function create(buffer) {\r\n return new (util.Buffer && util.Buffer.isBuffer(buffer) && BufferReader || Reader)(buffer);\r\n};\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice;\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 // 1 byte\r\n var octet = this.buf[this.pos++],\r\n value = octet & 127;\r\n if (octet > 127) { // false if octet is undefined (pos >= len)\r\n // 2 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 7;\r\n if (octet > 127) {\r\n // 3 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 14;\r\n if (octet > 127) {\r\n // 4 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 21;\r\n if (octet > 127) {\r\n // 5 bytes\r\n octet = this.buf[this.pos++];\r\n value |= octet << 28;\r\n if (octet > 127) {\r\n // 6..10 bytes (sign extended)\r\n this.pos += 5;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this.pos > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this);\r\n }\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\nvar readFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos ];\r\n return f32[0];\r\n }\r\n : function readFloat_f32_le(buf, pos) {\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f32[0];\r\n };\r\n })()\r\n : function readFloat_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 23, 4);\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 = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[7] = buf[pos ];\r\n return f64[0];\r\n }\r\n : function readDouble_f64_le(buf, pos) {\r\n f8b[7] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f64[0];\r\n };\r\n })()\r\n : function readDouble_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 52, 8);\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 = readDouble(this.buf, this.pos);\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 readStringBuffer = util.Buffer.prototype.utf8Slice // around forever, but not present in browser buffer\r\n ? readStringBuffer_utf8Slice\r\n : readStringBuffer_toString;\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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\nvar readStringBuffer;\r\n\r\nfunction readStringBuffer_utf8Slice(buf, start, end) {\r\n return buf.utf8Slice(start, end); // fastest\r\n}\r\n\r\nfunction readStringBuffer_toString(buf, start, end) {\r\n return buf.toString(\"utf8\", start, end); // 2nd, again assertions\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 readStringBuffer(this.buf, 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(12);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(8),\r\n util = require(25),\r\n common = require(6);\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 and calls the callback.\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 {undefined}\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(15)(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// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string):Promise\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\n\r\n/**\r\n * RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(20);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar EventEmitter = require(26);\r\n\r\n/**\r\n * Constructs a new RPC service.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation.\r\n * @type {RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end() {\r\n return this.emit('end').off();\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(12);\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(11),\r\n util = require(25),\r\n rpc = require(19);\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\nutil.props(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: 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 * @type {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. `null` as response data signals an ended stream.\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)} rpcImpl 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 {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\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 rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit('error', err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.emit('end', method);\r\n return undefined;\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 rpcService.emit('error', err2, method);\r\n return callback ? callback('error', err2) : undefined;\r\n }\r\n rpcService.emit('data', response, method);\r\n return callback ? callback(null, response) : undefined;\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(12);\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(7),\r\n OneOf = require(14),\r\n Field = require(8),\r\n Service = require(21),\r\n Prototype = require(16),\r\n Reader = require(17),\r\n Writer = require(30),\r\n inherits = require(9),\r\n util = require(25),\r\n codegen = require(2);\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 repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = 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 {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(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: 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: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\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: 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: 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: 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 {*} [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 (!properties || 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 ? codegen.encode.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 : codegen.encode.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 ? codegen.decode.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 : codegen.decode.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.create(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 ? codegen.verify.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : codegen.verify.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 util = require(25);\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\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 */ util.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\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} A 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 try {\r\n // Hide this from webpack. There is probably another, better way.\r\n return eval(['req','uire'].join(''))(\"fs\") // eslint-disable-line no-eval\r\n .readFile(path, \"utf8\", callback);\r\n } catch (e) { } // eslint-disable-line no-empty\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/**\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 return \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Minimalistic sprintf.\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {string} Formatted string\r\n */\r\nutil.sprintf = function sprintf(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 switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(param);\r\n case \"p\":\r\n return util.safeProp(param);\r\n default:\r\n return String(param);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Converts a string to camel case notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.camelCase = function camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n};\r\n\r\n/**\r\n * Converts a string to underscore notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.underScore = function underScore(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return \"_\" + $1.toLowerCase(); });\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 size = size || 0; \r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(size) || new util.Buffer(size)\r\n : new (typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size);\r\n};\r\n\r\nutil.EventEmitter = require(26);\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(29));\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < listeners.length; ++i)\r\n listeners[i].fn.apply(listeners[i].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(25);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\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\nmodule.exports = pool;\r\n\r\n/**\r\n * A drop-in buffer pool, similar in functionality to what node uses for buffers.\r\n * @memberof util\r\n * @function\r\n * @param {function(number):Uint8Array} alloc Allocator\r\n * @param {function(number, number):Uint8Array} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {function(number):Uint8Array} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\nutil.pool = require(\"./pool\");\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 {*}\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 {*}\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\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ie8 = !-[1,];\r\n var ucKey = key.substring(0, 1).toUpperCase() + key.substring(1);\r\n if (descriptor.get)\r\n target['get' + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target['set' + ucKey] = ie8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (ie8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze([]);\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze({});\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 * @param {State} next Next state entry\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer, next) {\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\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = next;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction 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 * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\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/**\r\n * Creates a new writer.\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = function create() {\r\n return new (util.Buffer && BufferWriter || Writer);\r\n};\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new ArrayImpl(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (ArrayImpl !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice);\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 value < 128\r\n ? this.push(writeByte, 1, value)\r\n : this.push(writeVarint32,\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) {\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 while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 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 write_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;\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\nvar writeFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n : function writeFloat_f32_le(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeFloat_ieee754(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\nvar writeDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n : function writeDouble_f64_le(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeDouble_ieee754(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 = ArrayImpl.prototype.set\r\n ? function writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n }\r\n : function 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#}, {@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.states = new State(this, this.states);\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.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\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 as a tag 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 = this.constructor.alloc(this.len);\r\n this.reset();\r\n var pos = 0;\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/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n BufferWriter.alloc = util.Buffer.allocUnsafe\r\n ? util.Buffer.allocUnsafe\r\n : function allocUnsafeNew(size) { return new util.Buffer(size); };\r\n return BufferWriter.alloc(size);\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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 // This could probably be optimized just like writeStringBuffer, but most real use cases won't benefit much.\r\n}\r\n\r\nif (!(ArrayImpl.prototype.set && util.Buffer && util.Buffer.prototype.set)) // set is faster (node 6.9.1)\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\nvar writeStringBuffer = (function() { // eslint-disable-line wrap-iife\r\n return util.Buffer && util.Buffer.prototype.utf8Write // around forever, but not present in browser buffer\r\n ? function writeString_buffer_utf8Write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.utf8Write(val, pos);\r\n }\r\n : function writeString_buffer_write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n };\r\n // Note that the plain JS encoder is faster for short strings, probably because of redundant assertions.\r\n // For a raw utf8Write, the breaking point is about 20 characters, for write it is around 40 characters.\r\n // Unfortunately, this does not translate 1:1 to real use cases, hence the common \"good enough\" limit of 40.\r\n})();\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\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","\"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 and calls the callback.\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 {undefined}\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);\r\n}\r\n// function load(filename:string, root:Root, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {function(?Error, Root=)} callback Callback function\r\n * @returns {undefined}\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\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 * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\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.codegen = require(\"./codegen\");\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.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\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 }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/codegen.js","src/codegen/decode.js","src/codegen/encode.js","src/codegen/verify.js","src/common.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/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/eventemitter.js","src/util/longbits.js","src/util/pool.js","src/util/runtime.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;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC1iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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\nmodule.exports = codegen;\r\n\r\nvar util = require(25);\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 * A closure for generating functions programmatically.\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {CodegenInstance} Codegen instance\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() {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'],\r\n indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a {@link util.sprintf|sprintf}-like appender function.\r\n * @typedef CodegenInstance\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {CodegenInstance} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var line = util.sprintf.apply(null, arguments);\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 /**\r\n * Stringifies the so far generated function source.\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 * @inner\r\n */\r\n 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 gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\r\n\r\ncodegen.encode = require(4);\r\ncodegen.decode = require(3);\r\ncodegen.verify = require(5);\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection that also provides a fallback.\r\n * @exports codegen.decode\r\n * @namespace\r\n */\r\nvar decode = exports;\r\n\r\nvar Enum = require(7),\r\n Reader = require(17),\r\n types = require(24),\r\n util = require(25),\r\n codegen = require(2);\r\n\r\n/**\r\n * Decodes a message of `this` message's 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} Populated runtime message\r\n * @this Type\r\n */\r\ndecode.fallback = function decode_fallback(readerOrBuffer, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer),\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].length ? 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, with an identical signature to {@link codegen.decode.fallback}.\r\n * @param {Type} mtype Message type\r\n * @returns {CodegenInstance} {@link codegen|Codegen} instance\r\n */\r\ndecode.generate = function decode_generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(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\nutil.props(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: 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\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\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(13);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(23),\r\n Enum = require(7),\r\n MapField = require(10),\r\n types = require(24),\r\n util = require(25);\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|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [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\nutil.props(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 * Determines whether this field is packed. This is an alias of {@link Field#packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\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(16),\r\n Type = require(23),\r\n util = require(25);\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 {*} clazz Inheriting class constructor\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 util.props(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 // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue)\r\n ? util.emptyObject\r\n : 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 util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n var keys = Object.keys(this);\r\n for (var i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(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 util.props(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(8);\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(7),\r\n types = require(24),\r\n util = require(25);\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(13);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(23),\r\n util = require(25);\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|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [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 (type && !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(13);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(7),\r\n Type = require(23),\r\n Field = require(8),\r\n Service = require(21),\r\n util = require(25);\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\nutil.props(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: 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(18),\r\n util = require(25);\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\nutil.props(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: 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 {*} 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(13);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(8),\r\n util = require(25);\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[]|Object} [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 {string[]}\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 {Field[]}\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(22),\r\n Root = require(18),\r\n Type = require(23),\r\n Field = require(8),\r\n MapField = require(10),\r\n OneOf = require(14),\r\n Enum = require(7),\r\n Service = require(21),\r\n Method = require(11),\r\n types = require(24),\r\n util = require(25);\r\nvar camelCase = util.camelCase;\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\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 } 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 * 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 * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\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 {*} [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 {*} [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 * @param {boolean} [options.defaults=false] Also sets default values on the resulting object\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n if (!options)\r\n options = {};\r\n var fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys;\r\n if (options.defaults) {\r\n keys = [];\r\n for (var k in this) // eslint-disable-line guard-for-in\r\n keys.push(k);\r\n } else\r\n 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 (!options.fieldsOnly)\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(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 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 * @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 \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/**\r\n * Creates a new reader using the specified buffer.\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = function create(buffer) {\r\n return new (util.Buffer && util.Buffer.isBuffer(buffer) && BufferReader || Reader)(buffer);\r\n};\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice;\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 // 1 byte\r\n var octet = this.buf[this.pos++],\r\n value = octet & 127;\r\n if (octet > 127) { // false if octet is undefined (pos >= len)\r\n // 2 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 7;\r\n if (octet > 127) {\r\n // 3 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 14;\r\n if (octet > 127) {\r\n // 4 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 21;\r\n if (octet > 127) {\r\n // 5 bytes\r\n octet = this.buf[this.pos++];\r\n value |= octet << 28;\r\n if (octet > 127) {\r\n // 6..10 bytes (sign extended)\r\n this.pos += 5;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this.pos > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this);\r\n }\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\nvar readFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos ];\r\n return f32[0];\r\n }\r\n : function readFloat_f32_le(buf, pos) {\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f32[0];\r\n };\r\n })()\r\n : function readFloat_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 23, 4);\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 = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[7] = buf[pos ];\r\n return f64[0];\r\n }\r\n : function readDouble_f64_le(buf, pos) {\r\n f8b[7] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f64[0];\r\n };\r\n })()\r\n : function readDouble_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 52, 8);\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 = readDouble(this.buf, this.pos);\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 readStringBuffer = util.Buffer.prototype.utf8Slice // around forever, but not present in browser buffer\r\n ? readStringBuffer_utf8Slice\r\n : readStringBuffer_toString;\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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\nvar readStringBuffer;\r\n\r\nfunction readStringBuffer_utf8Slice(buf, start, end) {\r\n return buf.utf8Slice(start, end); // fastest\r\n}\r\n\r\nfunction readStringBuffer_toString(buf, start, end) {\r\n return buf.toString(\"utf8\", start, end); // 2nd, again assertions\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 readStringBuffer(this.buf, 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(12);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(8),\r\n util = require(25),\r\n common = require(6);\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 and calls the callback.\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 {undefined}\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(15)(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// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string):Promise\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\n\r\n/**\r\n * RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(20);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar EventEmitter = require(26);\r\n\r\n/**\r\n * Constructs a new RPC service.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` when the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit('end').off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(12);\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(11),\r\n util = require(25),\r\n rpc = require(19);\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\nutil.props(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: 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 * @type {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. `null` as response data signals an ended stream.\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)} rpcImpl 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 {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\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 if (!rpcService.$rpc) // already ended?\r\n return;\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 rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit('error', err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\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 rpcService.emit('error', err2, method);\r\n return callback ? callback('error', err2) : undefined;\r\n }\r\n rpcService.emit('data', response, method);\r\n return callback ? callback(null, response) : undefined;\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(12);\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(7),\r\n OneOf = require(14),\r\n Field = require(8),\r\n Service = require(21),\r\n Prototype = require(16),\r\n Reader = require(17),\r\n Writer = require(30),\r\n inherits = require(9),\r\n util = require(25),\r\n codegen = require(2);\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 repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = 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 {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(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: 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: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\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: 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: 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: 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 {*} [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 (!properties || 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 ? codegen.encode.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 : codegen.encode.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 ? codegen.decode.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 : codegen.decode.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.create(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 ? codegen.verify.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : codegen.verify.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 util = require(25);\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\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 */ util.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\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} A 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 try {\r\n // Hide this from webpack. There is probably another, better way.\r\n return eval(['req','uire'].join(''))(\"fs\") // eslint-disable-line no-eval\r\n .readFile(path, \"utf8\", callback);\r\n } catch (e) { } // eslint-disable-line no-empty\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/**\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 return \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Minimalistic sprintf.\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {string} Formatted string\r\n */\r\nutil.sprintf = function sprintf(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 switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(param);\r\n case \"p\":\r\n return util.safeProp(param);\r\n default:\r\n return String(param);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Converts a string to camel case notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.camelCase = function camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n};\r\n\r\n/**\r\n * Converts a string to underscore notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.underScore = function underScore(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return \"_\" + $1.toLowerCase(); });\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 size = size || 0; \r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(size) || new util.Buffer(size)\r\n : new (typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size);\r\n};\r\n\r\nutil.EventEmitter = require(26);\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(29));\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < listeners.length; ++i)\r\n listeners[i].fn.apply(listeners[i].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(25);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\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\nmodule.exports = pool;\r\n\r\n/**\r\n * A drop-in buffer pool, similar in functionality to what node uses for buffers.\r\n * @memberof util\r\n * @function\r\n * @param {function(number):Uint8Array} alloc Allocator\r\n * @param {function(number, number):Uint8Array} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {function(number):Uint8Array} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\nutil.pool = require(\"./pool\");\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 {*}\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 {*}\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\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ie8 = !-[1,];\r\n var ucKey = key.substring(0, 1).toUpperCase() + key.substring(1);\r\n if (descriptor.get)\r\n target['get' + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target['set' + ucKey] = ie8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (ie8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze([]);\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze({});\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 * @param {State} next Next state entry\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer, next) {\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\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = next;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction 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 * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\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/**\r\n * Creates a new writer.\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = function create() {\r\n return new (util.Buffer && BufferWriter || Writer);\r\n};\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new ArrayImpl(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (ArrayImpl !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice);\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 value < 128\r\n ? this.push(writeByte, 1, value)\r\n : this.push(writeVarint32,\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) {\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 while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 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 write_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;\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\nvar writeFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n : function writeFloat_f32_le(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeFloat_ieee754(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\nvar writeDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n : function writeDouble_f64_le(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeDouble_ieee754(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 = ArrayImpl.prototype.set\r\n ? function writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n }\r\n : function 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#}, {@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.states = new State(this, this.states);\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.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\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 as a tag 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 = this.constructor.alloc(this.len);\r\n this.reset();\r\n var pos = 0;\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/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n BufferWriter.alloc = util.Buffer.allocUnsafe\r\n ? util.Buffer.allocUnsafe\r\n : function allocUnsafeNew(size) { return new util.Buffer(size); };\r\n return BufferWriter.alloc(size);\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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 // This could probably be optimized just like writeStringBuffer, but most real use cases won't benefit much.\r\n}\r\n\r\nif (!(ArrayImpl.prototype.set && util.Buffer && util.Buffer.prototype.set)) // set is faster (node 6.9.1)\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\nvar writeStringBuffer = (function() { // eslint-disable-line wrap-iife\r\n return util.Buffer && util.Buffer.prototype.utf8Write // around forever, but not present in browser buffer\r\n ? function writeString_buffer_utf8Write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.utf8Write(val, pos);\r\n }\r\n : function writeString_buffer_write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n };\r\n // Note that the plain JS encoder is faster for short strings, probably because of redundant assertions.\r\n // For a raw utf8Write, the breaking point is about 20 characters, for write it is around 40 characters.\r\n // Unfortunately, this does not translate 1:1 to real use cases, hence the common \"good enough\" limit of 40.\r\n})();\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\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","\"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 and calls the callback.\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 {undefined}\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);\r\n}\r\n// function load(filename:string, root:Root, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {function(?Error, Root=)} callback Callback function\r\n * @returns {undefined}\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\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 * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\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.codegen = require(\"./codegen\");\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.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\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 }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/protobuf.min.js b/dist/protobuf.min.js index 0d2a376f9..c89621059 100644 --- a/dist/protobuf.min.js +++ b/dist/protobuf.min.js @@ -1,9 +1,9 @@ /*! * protobuf.js v6.1.0 (c) 2016 Daniel Wirtz - * Compiled Thu, 08 Dec 2016 16:52:13 UTC + * Compiled Thu, 08 Dec 2016 17:23:20 UTC * Licensed under the Apache License, Version 2.0 * see: https://github.com/dcodeIO/protobuf.js for details */ -!function t(e,r,i){function n(o,u){if(!r[o]){if(!e[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 l=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return n(r?r:t)},l,l.exports,t,e,r,i)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o>1,l=-7,h=r?0:n-1,c=r?1:-1,d=t[e+h];for(h+=c,s=d&(1<<-l)-1,d>>=-l,l+=u;l>0;s=256*s+t[e+h],h+=c,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+t[e+h],h+=c,l-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,i),s-=f}return(d?-1:1)*o*Math.pow(2,s-i)},r.write=function(t,e,r,i,n,s){var o,u,a,f=8*s-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?s-1:0,p=i?-1:1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),e+=o+h>=1?c/a:c*Math.pow(2,1-h),e*a>=2&&(o++,a/=2),o+h>=l?(u=0,o=l):o+h>=1?(u=(e*a-1)*Math.pow(2,n),o+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;t[r+d]=255&u,d+=p,u/=256,n-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,f-=8);t[r+d-p]|=128*v}},{}],2:[function(t,e,r){"use strict";function i(){function t(){var e=n.sprintf.apply(null,arguments),r=c;if(h.length){var i=h[h.length-1];s.test(i)?r=++c:a.test(i)&&++r,u.test(i)&&!u.test(e)?(r=++c,d=!0):d&&f.test(i)&&(r=--c,d=!1),o.test(e)&&(r=--c)}for(var l=0;l ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+n)).apply(null,s.map(function(t){return r[t]}))}var l=Array.prototype.slice.call(arguments),h=['\t"use strict"'],c=1,d=!1;return t.str=e,t.eof=r,t}e.exports=i;var n=t(25),s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;i.supported=!1;try{i.supported=1===i("a","b")("return a-b").eof()(2,1)}catch(t){}i.verbose=!1,i.encode=t(4),i.decode=t(3),i.verify=t(5)},{25:25,3:3,4:4,5:5}],3:[function(t,e,r){"use strict";var i=r,n=t(7),s=t(17),o=t(24),u=t(25),a=t(2);i.fallback=function(t,e){for(var r=this.getFieldsById(),i=t instanceof s?t:s.create(t),a=void 0===e?i.len:i.pos+e,f=new(this.getCtor());i.pos-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,i=0;i0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return e&&r.addJSON(e),r},u.resolveAll=function(){for(var t=this.getNestedArray(),e=0;e-1&&this.oneof.splice(e,1),t.parent&&t.parent.remove(t),t.partOf=null,this},o.onAdd=function(t){s.prototype.onAdd.call(this,t),n(this)},o.onRemove=function(t){this.g.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{13:13,25:25,8:8}],15:[function(t,e,r){"use strict";function i(t){return null===t?null:t.toLowerCase()}function n(t,e){function r(t,e){return Error("illegal "+(e||"token")+" '"+t+"' (line "+it.line()+F)}function n(){var t,e=[];do{if((t=nt())!==B&&t!==J)throw r(t);e.push(nt()),ut(t),t=ot()}while(t===B||t===J);return e.join("")}function v(t){var e=nt();switch(i(e)){case J:case B:return st(e),n();case"true":return!0;case"false":return!1}try{return z(e)}catch(i){if(t&&m.test(e))return e;throw r(e,"value")}}function q(){var t=L(nt()),e=t;return ut("to",!0)&&(e=L(nt())),ut(E),[t,e]}function z(t){var e=1;"-"===t.charAt(0)&&(e=-1,t=t.substring(1));var n=i(t);switch(n){case"inf":return e*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(t))return e*parseInt(t,10);if(/^0[x][0-9a-f]+$/.test(n))return e*parseInt(t,16);if(/^0[0-7]+$/.test(t))return e*parseInt(t,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(n))return e*parseFloat(t);throw r(t,"number")}function L(t,e){var n=i(t);switch(n){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===t.charAt(0)&&!e)throw r(t,"id");if(/^-?[1-9][0-9]*$/.test(t))return parseInt(t,10);if(/^-?0[x][0-9a-f]+$/.test(n))return parseInt(t,16);if(/^-?0[0-7]+$/.test(t))return parseInt(t,8);throw r(t,"id")}function V(){if(void 0!==Y)throw r("package");if(Y=nt(),!m.test(Y))throw r(Y,A);ht=ht.define(Y),ut(E)}function P(){var t,e=ot();switch(e){case"weak":t=et||(et=[]),nt();break;case"public":nt();default:t=tt||(tt=[])}e=n(),ut(E),t.push(e)}function R(){ut("="),rt=i(n());var t;if(["proto2",t="proto3"].indexOf(rt)<0)throw r(rt,"syntax");ft=rt===t,ut(E)}function $(t,e){switch(e){case O:return K(t,e),ut(E),!0;case"message":return I(t,e),!0;case"enum":return D(t,e),!0;case"service":return G(t,e),!0;case"extend":return Q(t,e),!0}return!1}function I(t,e){var n=nt();if(!g.test(n))throw r(n,"type name");var s=new u(n);if(ut(S,!0)){for(;(e=nt())!==T;){var o=i(e);if(!$(s,e))switch(o){case"map":M(s,o);break;case b:case x:case k:C(s,o);break;case"oneof":U(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(q(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(q(s,o));break;default:if(!ft||!m.test(e))throw r(e);st(e),C(s,x)}}ut(E,!0)}else ut(E);t.add(s)}function C(t,e,i){var n=nt();if(!m.test(n))throw r(n,N);var s=nt();if(!g.test(s))throw r(s,A);s=y(s),ut("=");var o=L(nt()),u=Z(new a(s,o,n,e,i));u.repeated&&u.setOption("packed",ft,!0),t.add(u)}function M(t){ut("<");var e=nt();if(void 0===p.mapKey[e])throw r(e,N);ut(",");var i=nt();if(!m.test(i))throw r(i,N);ut(">");var n=nt();if(!g.test(n))throw r(n,A);n=y(n),ut("=");var s=L(nt()),o=Z(new f(n,s,e,i));t.add(o)}function U(t,e){var i=nt();if(!g.test(i))throw r(i,A);i=y(i);var n=new l(i);if(ut(S,!0)){for(;(e=nt())!==T;)e===O?(K(n,e),ut(E)):(st(e),C(n,x));ut(E,!0)}else ut(E);t.add(n)}function D(t,e){var n=nt();if(!g.test(n))throw r(n,A);var s={},o=new h(n,s);if(ut(S,!0)){for(;(e=nt())!==T;)i(e)===O?K(o):_(o,e);ut(E,!0)}else ut(E);t.add(o)}function _(t,e){if(!g.test(e))throw r(e,A);var i=e;ut("=");var n=L(nt(),!0);t.values[i]=n,Z({})}function K(t,e){var i=ut(j,!0),n=nt();if(!m.test(n))throw r(n,A);i&&(ut(F),n=j+n+F,e=ot(),w.test(e)&&(n+=e,nt())),ut("="),H(t,n)}function H(t,e){if(ut(S,!0))for(;(lt=nt())!==T;){if(!g.test(lt))throw r(lt,A);e=e+"."+lt,ut(":",!0)?W(t,e,v(!0)):H(t,e)}else W(t,e,v(!0))}function W(t,e,r){t.setOption?t.setOption(e,r):t[e]=r}function Z(t){if(ut("[",!0)){do K(t,O);while(ut(",",!0));ut("]")}return ut(E),t}function G(t,e){if(e=nt(),!g.test(e))throw r(e,"service name");var n=e,s=new c(n);if(ut(S,!0)){for(;(e=nt())!==T;){var o=i(e);switch(o){case O:K(s,o),ut(E);break;case"rpc":X(s,o);break;default:throw r(e)}}ut(E,!0)}else ut(E);t.add(s)}function X(t,e){var n=e,s=nt();if(!g.test(s))throw r(s,A);var o,u,a,f;ut(j);var l;if(ut(l="stream",!0)&&(u=!0),!m.test(e=nt()))throw r(e);if(o=e,ut(F),ut("returns"),ut(j),ut(l,!0)&&(f=!0),!m.test(e=nt()))throw r(e);a=e,ut(F);var h=new d(s,n,o,a,u,f);if(ut(S,!0)){for(;(e=nt())!==T;){var c=i(e);switch(c){case O:K(h,c),ut(E);break;default:throw r(e)}}ut(E,!0)}else ut(E);t.add(h)}function Q(t,e){var n=nt();if(!m.test(n))throw r(n,"reference");if(ut(S,!0)){for(;(e=nt())!==T;){var s=i(e);switch(s){case b:case k:case x:C(t,s,n);break;default:if(!ft||!m.test(e))throw r(e);st(e),C(t,x,n)}}ut(E,!0)}else ut(E)}e||(e=new o);var Y,tt,et,rt,it=s(t),nt=it.next,st=it.push,ot=it.peek,ut=it.skip,at=!0,ft=!1;e||(e=new o);for(var lt,ht=e;null!==(lt=nt());){var ct=i(lt);switch(ct){case"package":if(!at)throw r(lt);V();break;case"import":if(!at)throw r(lt);P();break;case"syntax":if(!at)throw r(lt);R();break;case O:if(!at)throw r(lt);K(ht,lt),ut(E);break;default:if($(ht,lt)){at=!1;continue}throw r(lt)}}return{package:Y,imports:tt,weakImports:et,syntax:rt,root:e}}e.exports=n;var s=t(22),o=t(18),u=t(23),a=t(8),f=t(10),l=t(14),h=t(7),c=t(21),d=t(11),p=t(24),v=t(25),y=v.camelCase,g=/^[a-zA-Z_][a-zA-Z_0-9]*$/,m=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,w=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,b="required",k="repeated",x="optional",O="option",A="name",N="type",S="{",T="}",j="(",F=")",E=";",B='"',J="'"},{10:10,11:11,14:14,18:18,21:21,22:22,23:23,24:24,25:25,7:7,8:8}],16:[function(t,e,r){"use strict";function i(t){if(t)for(var e=Object.keys(t),r=0;r "+t.len)}function n(){x.Long?(S.int64=a,S.uint64=l,S.sint64=c,S.fixed64=v,S.sfixed64=g):(S.int64=f,S.uint64=h,S.sint64=d,S.fixed64=y,S.sfixed64=m)}function s(t){this.buf=t,this.pos=0,this.len=t.length}function o(t,e){this.id=t,this.wireType=e}function u(){var t=0,e=0,r=0,n=0;if(this.len-this.pos>9){for(r=0;r<4;++r)if(n=this.buf[this.pos++],t|=(127&n)<<7*r,n<128)return new A(t>>>0,e>>>0);if(n=this.buf[this.pos++],t|=(127&n)<<28,e|=(127&n)>>4,n<128)return new A(t>>>0,e>>>0);for(r=0;r<5;++r)if(n=this.buf[this.pos++],e|=(127&n)<<7*r+3,n<128)return new A(t>>>0,e>>>0)}else{for(r=0;r<4;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],t|=(127&n)<<7*r,n<128)return new A(t>>>0,e>>>0)}if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],t|=(127&n)<<28,e|=(127&n)>>4,n<128)return new A(t>>>0,e>>>0);for(r=0;r<5;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],e|=(127&n)<<7*r+3,n<128)return new A(t>>>0,e>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function l(){return u.call(this).toLong(!0)}function h(){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 i(this,8);return new A((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(t){F&&F(),s.call(this,t)}function b(t,e,r){return t.utf8Slice(e,r)}function k(t,e,r){return t.toString("utf8",e,r)}e.exports=s,s.BufferReader=w;var x=t(29),O=t(1),A=x.LongBits,N="undefined"!=typeof Uint8Array?Uint8Array:Array;s.configure=n,s.create=function(t){return new(x.Buffer&&x.Buffer.isBuffer(t)&&w||s)(t)};var S=s.prototype;S.h=N.prototype.subarray||N.prototype.slice,S.tag=function(){if(this.pos>=this.len)throw i(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},S.int32=function(){var t=this.buf[this.pos++],e=127&t;if(t>127&&(t=this.buf[this.pos++],e|=(127&t)<<7,t>127&&(t=this.buf[this.pos++],e|=(127&t)<<14,t>127&&(t=this.buf[this.pos++],e|=(127&t)<<21,t>127&&(t=this.buf[this.pos++],e|=t<<28,t>127&&(this.pos+=5))))),this.pos>this.len)throw this.pos=this.len,i(this);return e},S.uint32=function(){return this.int32()>>>0},S.sint32=function(){var t=this.int32();return t>>>1^-(1&t)},S.bool=function(){return 0!==this.int32()},S.fixed32=function(){if(this.pos+4>this.len)throw i(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},S.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var T="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,i){return e[0]=r[i++],e[1]=r[i++],e[2]=r[i++],e[3]=r[i],t[0]}:function(r,i){return e[3]=r[i++],e[2]=r[i++],e[1]=r[i++],e[0]=r[i],t[0]}}():function(t,e){return O.read(t,e,!1,23,4)};S.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=T(this.buf,this.pos);return this.pos+=4,t};var j="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,i){return e[0]=r[i++],e[1]=r[i++],e[2]=r[i++],e[3]=r[i++],e[4]=r[i++],e[5]=r[i++],e[6]=r[i++],e[7]=r[i],t[0]}:function(r,i){return e[7]=r[i++],e[6]=r[i++],e[5]=r[i++],e[4]=r[i++],e[3]=r[i++],e[2]=r[i++],e[1]=r[i++],e[0]=r[i],t[0]}}():function(t,e){return O.read(t,e,!1,52,8)};S.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=j(this.buf,this.pos);return this.pos+=8,t},S.bytes=function(){var t=this.int32()>>>0,e=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,e===r?new this.buf.constructor(0):this.h.call(this.buf,e,r)},S.string=function(){var t=this.bytes(),e=t.length;if(e){for(var r=new Array(e),i=0,n=0;i191&&s<224)r[n++]=(31&s)<<6|63&t[i++];else if(s>239&&s<365){var o=((7&s)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536;r[n++]=55296+(o>>10),r[n++]=56320+(1023&o)}else r[n++]=(15&s)<<12|(63&t[i++])<<6|63&t[i++]}return String.fromCharCode.apply(String,r.slice(0,n))}return""},S.skip=function(t){if(void 0===t){do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++])}else{if(this.pos+t>this.len)throw i(this,t);this.pos+=t}return this},S.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var e=this.tag();if(4===e.wireType)break;this.skipType(e.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},S.reset=function(t){return t?(this.buf=t, -this.len=t.length):(this.buf=null,this.len=0),this.pos=0,this},S.finish=function(t){var e=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(t),e};var F=function(){if(!x.Buffer)throw Error("Buffer is not supported");E.h=x.Buffer.prototype.slice,B=x.Buffer.prototype.utf8Slice?b:k,F=!1},E=w.prototype=Object.create(s.prototype);E.constructor=w,"undefined"==typeof Float32Array&&(E.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,t}),"undefined"==typeof Float64Array&&(E.double=function(){if(this.pos+8>this.len)throw i(this,8);var t=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,t});var B;E.string=function(){var t=this.int32()>>>0,e=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,B(this.buf,e,r)},E.finish=function(t){var e=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(t),e},n()},{1:1,29:29}],18:[function(t,e,r){"use strict";function i(t){s.call(this,"",t),this.deferred=[],this.files=[]}function n(t){var e=t.parent.lookup(t.extend);if(e){var r=new u(t.getFullName(),t.id,t.type,t.rule,(void 0),t.options);return r.declaringField=t,t.extensionField=r,e.add(r),!0}return!1}e.exports=i;var s=t(12),o=s.extend(i),u=t(8),a=t(25),f=t(6);i.fromJSON=function(t,e){return e||(e=new i),e.setOptions(t.options).addJSON(t.nested)},o.resolvePath=a.resolvePath,o.load=function e(r,i){function n(t,e){if(i){var r=i;i=null,r(t,e)}}function s(e,r){try{if(a.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),a.isString(r)){var i=t(15)(r,u);i.imports&&i.imports.forEach(function(t){o(u.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){o(u.resolvePath(e,t),!0)})}else u.setOptions(r.options).addJSON(r.nested)}catch(t){return void n(t)}l||n(null,u)}function o(t,e){var r=t.indexOf("google/protobuf/");if(r>-1){var o=t.substring(r);o in f&&(t=o)}if(!(u.files.indexOf(t)>-1)){if(u.files.push(t),t in f)return++l,void setTimeout(function(){--l,s(t,f[t])});++l,a.fetch(t,function(r,o){if(--l,i)return r?void(e||n(r)):void s(t,o)})}}var u=this;if(!i)return a.asPromise(e,u,r);var l=0;a.isString(r)&&(r=[r]),r.forEach(function(t){o(u.resolvePath("",t))}),l||n(null)},o.e=function(t){var e=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof s)for(var r=t.getNestedArray(),i=0;i0)return m.shift();if(w)return r();var i,o,u;do{if(v===y)return null;for(i=!1;/\s/.test(u=n(v));)if(u===a&&++g,++v===y)return null;if(n(v)===f){if(++v===y)throw e("comment");if(n(v)===f){for(;n(++v)!==a;)if(v===y)return null;++v,++g,i=!0}else{if((u=n(v))!==l)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=n(v)}while(o!==l||u!==f);++v,i=!0}}}while(i);if(v===y)return null;var h=v;s.lastIndex=0;var c=s.test(n(h++));if(!c)for(;h]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",l="*"},{}],23:[function(t,e,r){"use strict";function i(t,e){s.call(this,t,e),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,this.n=null}function n(t){return t.j=t.k=t.m=t.n=null,delete t.encode,delete t.decode,t}e.exports=i;var s=t(12),o=s.prototype,u=s.extend(i),a=t(7),f=t(14),l=t(8),h=t(21),c=t(16),d=t(17),p=t(30),v=t(9),y=t(25),g=t(2);y.props(u,{fieldsById:{get:function(){if(this.j)return this.j;this.j={};for(var t=Object.keys(this.fields),e=0;e0?e.splice(--n,2):r?e.splice(n,1):++n:"."===e[n]?e.splice(n,1):++n;return i+e.join("/")}var util=exports;util.isString=isString,util.isObject=function(t){return Boolean(t&&"object"==typeof t)},util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.toArray=function(t){if(!t)return[];for(var e=Object.keys(t),r=e.length,i=new Array(r),n=0;n>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(t){switch(typeof t){case"number":return i.fromNumber(t);case"string":t=n.Long.fromString(t)}return(t.low||t.high)&&new i(t.low>>>0,t.high>>>0)||o},s.toNumber=function(t){return!t&&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(t){return new n.Long(this.lo,this.hi,t)};var u=String.prototype.charCodeAt;i.fromHash=function(t){return new i((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,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 t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<1<<21?3:4:e<16384?e<128?5:6:e<1<<21?7:8:r<128?9:10}},{25:25}],28:[function(t,e,r){"use strict";function i(t,e,r){var i=r||8192,n=i>>>1,s=null,o=i;return function(r){if(r>n)return t(r);o+r>i&&(s=t(i),o=0);var u=e.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}e.exports=i},{}],29:[function(t,e,r){(function(e){"use strict";var i=r,n=i.LongBits=t(27);i.pool=t(28);var s=i.isNode=Boolean(e.process&&e.process.versions&&e.process.versions.node);if(i.Buffer=null,s)try{i.Buffer=t("buffer").Buffer}catch(t){}if(i.Long=e.dcodeIO&&e.dcodeIO.Long||null,!i.Long&&s)try{i.Long=t("long")}catch(t){}i.longToHash=function(t){return t?n.from(t).toHash():"\0\0\0\0\0\0\0\0"},i.longFromHash=function(t,e){var r=n.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},i.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=n.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=n.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},i.props=function(t,e){Object.keys(e).forEach(function(r){i.prop(t,r,e[r])})},i.prop=function(t,e,r){var i=!-[1],n=e.substring(0,1).toUpperCase()+e.substring(1);r.get&&(t["get"+n]=r.get),r.set&&(t["set"+n]=i?function(t){r.set.call(this,t),this[e]=t}:r.set),i?void 0!==r.value&&(t[e]=r.value):Object.defineProperty(t,e,r)},i.emptyArray=Object.freeze([]),i.emptyObject=Object.freeze({})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{27:27,28:28,buffer:"buffer",long:"long"}],30:[function(t,e,r){"use strict";function i(t,e,r){this.fn=t,this.val=e,this.len=r,this.next=null}function n(){}function s(t,e){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=e}function o(){this.len=0,this.head=new i(n,0,0),this.tail=this.head,this.states=null}function u(t,e,r){t[e]=255&r}function a(t,e,r){for(;r>127;)t[e++]=127&r|128,r>>>=7;t[e]=r}function f(t,e,r){for(;r.hi;)t[e++]=127&r.lo|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)t[e++]=127&r.lo|128,r.lo=r.lo>>>7;t[e++]=r.lo}function l(t,e,r){t[e++]=255&r,t[e++]=r>>>8&255,t[e++]=r>>>16&255,t[e]=r>>>24}function h(t,e,r){for(var i=0;i>6|192,t[e++]=63&s|128):55296===(64512&s)&&56320===(64512&(n=r.charCodeAt(i+1)))?(s=65536+((1023&s)<<10)+(1023&n),++i,t[e++]=s>>18|240,t[e++]=s>>12&63|128,t[e++]=s>>6&63|128,t[e++]=63&s|128):(t[e++]=s>>12|224,t[e++]=s>>6&63|128,t[e++]=63&s|128)}}function c(t){for(var e=t.length>>>0,r=0,i=0;i>>=0,t<128?this.push(u,1,t):this.push(a,t<16384?2:t<2097152?3:t<268435456?4:5,t)},k.int32=function(t){return t<0?this.push(f,10,w.fromNumber(t)):this.uint32(t)},k.sint32=function(t){return this.uint32(t<<1^t>>31)},k.uint64=function(t){var e=w.from(t);return this.push(f,e.length(),e)},k.int64=k.uint64,k.sint64=function(t){var e=w.from(t).zzEncode();return this.push(f,e.length(),e)},k.bool=function(t){return this.push(u,1,t?1:0)},k.fixed32=function(t){return this.push(l,4,t>>>0)},k.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},k.fixed64=function(t){var e=w.from(t);return this.push(l,4,e.hi).push(l,4,e.lo)},k.sfixed64=function(t){var e=w.from(t).zzEncode();return this.push(l,4,e.hi).push(l,4,e.lo)};var x="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,i,n){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i]=e[3]}:function(r,i,n){t[0]=n,r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,r){m.write(t,r,e,!1,23,4)};k.float=function(t){return this.push(x,4,t)};var O="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,i,n){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i++]=e[3],r[i++]=e[4],r[i++]=e[5],r[i++]=e[6],r[i]=e[7]}:function(r,i,n){t[0]=n,r[i++]=e[7],r[i++]=e[6],r[i++]=e[5],r[i++]=e[4],r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,r){m.write(t,r,e,!1,52,8)};k.double=function(t){return this.push(O,8,t)};var A=b.prototype.set?function(t,e,r){t.set(r,e)}:function(t,e,r){for(var i=0;i>>0;return e?this.uint32(e).push(A,e,t):this.push(u,1,0)},k.string=function(t){var e=c(t);return e?this.uint32(e).push(h,e,t):this.push(u,1,0)},k.fork=function(){return this.states=new s(this,this.states),this.head=this.tail=new i(n,0,0),this.len=0,this},k.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(n,0,0),this.len=0),this},k.ldelim=function(t){var e=this.head,r=this.tail,i=this.len;return this.reset(),void 0!==t&&this.tag(t,2),this.uint32(i),this.tail.next=e.next,this.tail=r,this.len+=i,this},k.finish=function(){var t=this.head.next,e=this.constructor.alloc(this.len);this.reset();for(var r=0;t;)t.fn(e,r,t.val),r+=t.len,t=t.next;return e},d.alloc=function(t){return d.alloc=g.Buffer.allocUnsafe?g.Buffer.allocUnsafe:function(t){return new g.Buffer(t)},d.alloc(t)};var N=d.prototype=Object.create(o.prototype);N.constructor=d,"undefined"==typeof Float32Array&&(N.float=function(t){return this.push(p,4,t)}),"undefined"==typeof Float64Array&&(N.double=function(t){return this.push(v,8,t)}),b.prototype.set&&g.Buffer&&g.Buffer.prototype.set||(N.bytes=function(t){var e=t.length>>>0;return e?this.uint32(e).push(y,e,t):this.push(u,1,0)});var S=function(){return g.Buffer&&g.Buffer.prototype.utf8Write?function(t,e,r){r.length<40?h(t,e,r):t.utf8Write(r,e)}:function(t,e,r){r.length<40?h(t,e,r):t.write(r,e)}}();N.string=function(t){var e=t.length<40?c(t):g.Buffer.byteLength(t);return e?this.uint32(e).push(S,e,t):this.push(u,1,0)}},{1:1,29:29}],31:[function(t,e,r){(function(e){"use strict";function i(t,e,r){return"function"==typeof e?(r=e,e=new n.Root):e||(e=new n.Root),e.load(t,r)}var n=e.protobuf=r;n.load=i,n.tokenize=t(22),n.parse=t(15),n.Writer=t(30),n.BufferWriter=n.Writer.BufferWriter,n.Reader=t(17),n.BufferReader=n.Reader.BufferReader,n.codegen=t(2),n.ReflectionObject=t(13),n.Namespace=t(12),n.Root=t(18),n.Enum=t(7),n.Type=t(23),n.Field=t(8),n.OneOf=t(14),n.MapField=t(10),n.Service=t(21),n.Method=t(11),n.Prototype=t(16),n.inherits=t(9),n.types=t(24),n.common=t(6),n.rpc=t(19),n.util=t(25),"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(n.util.Long=t,n.Reader.configure()),n})}).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,21:21,22:22,23:23,24:24,25:25,30:30,6:6,7:7,8:8,9:9}]},{},[31]); +!function t(e,r,i){function n(o,u){if(!r[o]){if(!e[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 l=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return n(r?r:t)},l,l.exports,t,e,r,i)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o>1,l=-7,h=r?0:n-1,c=r?1:-1,d=t[e+h];for(h+=c,s=d&(1<<-l)-1,d>>=-l,l+=u;l>0;s=256*s+t[e+h],h+=c,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+t[e+h],h+=c,l-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,i),s-=f}return(d?-1:1)*o*Math.pow(2,s-i)},r.write=function(t,e,r,i,n,s){var o,u,a,f=8*s-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?s-1:0,p=i?-1:1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),e+=o+h>=1?c/a:c*Math.pow(2,1-h),e*a>=2&&(o++,a/=2),o+h>=l?(u=0,o=l):o+h>=1?(u=(e*a-1)*Math.pow(2,n),o+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;t[r+d]=255&u,d+=p,u/=256,n-=8);for(o=o<0;t[r+d]=255&o,d+=p,o/=256,f-=8);t[r+d-p]|=128*v}},{}],2:[function(t,e,r){"use strict";function i(){function t(){var e=n.sprintf.apply(null,arguments),r=c;if(h.length){var i=h[h.length-1];s.test(i)?r=++c:a.test(i)&&++r,u.test(i)&&!u.test(e)?(r=++c,d=!0):d&&f.test(i)&&(r=--c,d=!1),o.test(e)&&(r=--c)}for(var l=0;l ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+n)).apply(null,s.map(function(t){return r[t]}))}var l=Array.prototype.slice.call(arguments),h=['\t"use strict"'],c=1,d=!1;return t.str=e,t.eof=r,t}e.exports=i;var n=t(25),s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;i.supported=!1;try{i.supported=1===i("a","b")("return a-b").eof()(2,1)}catch(t){}i.verbose=!1,i.encode=t(4),i.decode=t(3),i.verify=t(5)},{25:25,3:3,4:4,5:5}],3:[function(t,e,r){"use strict";var i=r,n=t(7),s=t(17),o=t(24),u=t(25),a=t(2);i.fallback=function(t,e){for(var r=this.getFieldsById(),i=t instanceof s?t:s.create(t),a=void 0===e?i.len:i.pos+e,f=new(this.getCtor());i.pos-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,i=0;i0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return e&&r.addJSON(e),r},u.resolveAll=function(){for(var t=this.getNestedArray(),e=0;e-1&&this.oneof.splice(e,1),t.parent&&t.parent.remove(t),t.partOf=null,this},o.onAdd=function(t){s.prototype.onAdd.call(this,t),n(this)},o.onRemove=function(t){this.g.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{13:13,25:25,8:8}],15:[function(t,e,r){"use strict";function i(t){return null===t?null:t.toLowerCase()}function n(t,e){function r(t,e){return Error("illegal "+(e||"token")+" '"+t+"' (line "+it.line()+F)}function n(){var t,e=[];do{if((t=nt())!==B&&t!==J)throw r(t);e.push(nt()),ut(t),t=ot()}while(t===B||t===J);return e.join("")}function v(t){var e=nt();switch(i(e)){case J:case B:return st(e),n();case"true":return!0;case"false":return!1}try{return z(e)}catch(i){if(t&&m.test(e))return e;throw r(e,"value")}}function q(){var t=L(nt()),e=t;return ut("to",!0)&&(e=L(nt())),ut(E),[t,e]}function z(t){var e=1;"-"===t.charAt(0)&&(e=-1,t=t.substring(1));var n=i(t);switch(n){case"inf":return e*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(t))return e*parseInt(t,10);if(/^0[x][0-9a-f]+$/.test(n))return e*parseInt(t,16);if(/^0[0-7]+$/.test(t))return e*parseInt(t,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(n))return e*parseFloat(t);throw r(t,"number")}function L(t,e){var n=i(t);switch(n){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===t.charAt(0)&&!e)throw r(t,"id");if(/^-?[1-9][0-9]*$/.test(t))return parseInt(t,10);if(/^-?0[x][0-9a-f]+$/.test(n))return parseInt(t,16);if(/^-?0[0-7]+$/.test(t))return parseInt(t,8);throw r(t,"id")}function V(){if(void 0!==Y)throw r("package");if(Y=nt(),!m.test(Y))throw r(Y,A);ht=ht.define(Y),ut(E)}function P(){var t,e=ot();switch(e){case"weak":t=et||(et=[]),nt();break;case"public":nt();default:t=tt||(tt=[])}e=n(),ut(E),t.push(e)}function $(){ut("="),rt=i(n());var t;if(["proto2",t="proto3"].indexOf(rt)<0)throw r(rt,"syntax");ft=rt===t,ut(E)}function R(t,e){switch(e){case O:return K(t,e),ut(E),!0;case"message":return I(t,e),!0;case"enum":return D(t,e),!0;case"service":return G(t,e),!0;case"extend":return Q(t,e),!0}return!1}function I(t,e){var n=nt();if(!g.test(n))throw r(n,"type name");var s=new u(n);if(ut(S,!0)){for(;(e=nt())!==T;){var o=i(e);if(!R(s,e))switch(o){case"map":M(s,o);break;case b:case x:case k:C(s,o);break;case"oneof":U(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(q(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(q(s,o));break;default:if(!ft||!m.test(e))throw r(e);st(e),C(s,x)}}ut(E,!0)}else ut(E);t.add(s)}function C(t,e,i){var n=nt();if(!m.test(n))throw r(n,N);var s=nt();if(!g.test(s))throw r(s,A);s=y(s),ut("=");var o=L(nt()),u=Z(new a(s,o,n,e,i));u.repeated&&u.setOption("packed",ft,!0),t.add(u)}function M(t){ut("<");var e=nt();if(void 0===p.mapKey[e])throw r(e,N);ut(",");var i=nt();if(!m.test(i))throw r(i,N);ut(">");var n=nt();if(!g.test(n))throw r(n,A);n=y(n),ut("=");var s=L(nt()),o=Z(new f(n,s,e,i));t.add(o)}function U(t,e){var i=nt();if(!g.test(i))throw r(i,A);i=y(i);var n=new l(i);if(ut(S,!0)){for(;(e=nt())!==T;)e===O?(K(n,e),ut(E)):(st(e),C(n,x));ut(E,!0)}else ut(E);t.add(n)}function D(t,e){var n=nt();if(!g.test(n))throw r(n,A);var s={},o=new h(n,s);if(ut(S,!0)){for(;(e=nt())!==T;)i(e)===O?K(o):_(o,e);ut(E,!0)}else ut(E);t.add(o)}function _(t,e){if(!g.test(e))throw r(e,A);var i=e;ut("=");var n=L(nt(),!0);t.values[i]=n,Z({})}function K(t,e){var i=ut(j,!0),n=nt();if(!m.test(n))throw r(n,A);i&&(ut(F),n=j+n+F,e=ot(),w.test(e)&&(n+=e,nt())),ut("="),H(t,n)}function H(t,e){if(ut(S,!0))for(;(lt=nt())!==T;){if(!g.test(lt))throw r(lt,A);e=e+"."+lt,ut(":",!0)?W(t,e,v(!0)):H(t,e)}else W(t,e,v(!0))}function W(t,e,r){t.setOption?t.setOption(e,r):t[e]=r}function Z(t){if(ut("[",!0)){do K(t,O);while(ut(",",!0));ut("]")}return ut(E),t}function G(t,e){if(e=nt(),!g.test(e))throw r(e,"service name");var n=e,s=new c(n);if(ut(S,!0)){for(;(e=nt())!==T;){var o=i(e);switch(o){case O:K(s,o),ut(E);break;case"rpc":X(s,o);break;default:throw r(e)}}ut(E,!0)}else ut(E);t.add(s)}function X(t,e){var n=e,s=nt();if(!g.test(s))throw r(s,A);var o,u,a,f;ut(j);var l;if(ut(l="stream",!0)&&(u=!0),!m.test(e=nt()))throw r(e);if(o=e,ut(F),ut("returns"),ut(j),ut(l,!0)&&(f=!0),!m.test(e=nt()))throw r(e);a=e,ut(F);var h=new d(s,n,o,a,u,f);if(ut(S,!0)){for(;(e=nt())!==T;){var c=i(e);switch(c){case O:K(h,c),ut(E);break;default:throw r(e)}}ut(E,!0)}else ut(E);t.add(h)}function Q(t,e){var n=nt();if(!m.test(n))throw r(n,"reference");if(ut(S,!0)){for(;(e=nt())!==T;){var s=i(e);switch(s){case b:case k:case x:C(t,s,n);break;default:if(!ft||!m.test(e))throw r(e);st(e),C(t,x,n)}}ut(E,!0)}else ut(E)}e||(e=new o);var Y,tt,et,rt,it=s(t),nt=it.next,st=it.push,ot=it.peek,ut=it.skip,at=!0,ft=!1;e||(e=new o);for(var lt,ht=e;null!==(lt=nt());){var ct=i(lt);switch(ct){case"package":if(!at)throw r(lt);V();break;case"import":if(!at)throw r(lt);P();break;case"syntax":if(!at)throw r(lt);$();break;case O:if(!at)throw r(lt);K(ht,lt),ut(E);break;default:if(R(ht,lt)){at=!1;continue}throw r(lt)}}return{package:Y,imports:tt,weakImports:et,syntax:rt,root:e}}e.exports=n;var s=t(22),o=t(18),u=t(23),a=t(8),f=t(10),l=t(14),h=t(7),c=t(21),d=t(11),p=t(24),v=t(25),y=v.camelCase,g=/^[a-zA-Z_][a-zA-Z_0-9]*$/,m=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,w=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,b="required",k="repeated",x="optional",O="option",A="name",N="type",S="{",T="}",j="(",F=")",E=";",B='"',J="'"},{10:10,11:11,14:14,18:18,21:21,22:22,23:23,24:24,25:25,7:7,8:8}],16:[function(t,e,r){"use strict";function i(t){if(t)for(var e=Object.keys(t),r=0;r "+t.len)}function n(){x.Long?(S.int64=a,S.uint64=l,S.sint64=c,S.fixed64=v,S.sfixed64=g):(S.int64=f,S.uint64=h,S.sint64=d,S.fixed64=y,S.sfixed64=m)}function s(t){this.buf=t,this.pos=0,this.len=t.length}function o(t,e){this.id=t,this.wireType=e}function u(){var t=0,e=0,r=0,n=0;if(this.len-this.pos>9){for(r=0;r<4;++r)if(n=this.buf[this.pos++],t|=(127&n)<<7*r,n<128)return new A(t>>>0,e>>>0);if(n=this.buf[this.pos++],t|=(127&n)<<28,e|=(127&n)>>4,n<128)return new A(t>>>0,e>>>0);for(r=0;r<5;++r)if(n=this.buf[this.pos++],e|=(127&n)<<7*r+3,n<128)return new A(t>>>0,e>>>0)}else{for(r=0;r<4;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],t|=(127&n)<<7*r,n<128)return new A(t>>>0,e>>>0)}if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],t|=(127&n)<<28,e|=(127&n)>>4,n<128)return new A(t>>>0,e>>>0);for(r=0;r<5;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],e|=(127&n)<<7*r+3,n<128)return new A(t>>>0,e>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function l(){return u.call(this).toLong(!0)}function h(){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 i(this,8);return new A((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(t){F&&F(),s.call(this,t)}function b(t,e,r){return t.utf8Slice(e,r)}function k(t,e,r){return t.toString("utf8",e,r)}e.exports=s,s.BufferReader=w;var x=t(29),O=t(1),A=x.LongBits,N="undefined"!=typeof Uint8Array?Uint8Array:Array;s.configure=n,s.create=function(t){return new(x.Buffer&&x.Buffer.isBuffer(t)&&w||s)(t)};var S=s.prototype;S.h=N.prototype.subarray||N.prototype.slice,S.tag=function(){if(this.pos>=this.len)throw i(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},S.int32=function(){var t=this.buf[this.pos++],e=127&t;if(t>127&&(t=this.buf[this.pos++],e|=(127&t)<<7,t>127&&(t=this.buf[this.pos++],e|=(127&t)<<14,t>127&&(t=this.buf[this.pos++],e|=(127&t)<<21,t>127&&(t=this.buf[this.pos++],e|=t<<28,t>127&&(this.pos+=5))))),this.pos>this.len)throw this.pos=this.len,i(this);return e},S.uint32=function(){return this.int32()>>>0},S.sint32=function(){var t=this.int32();return t>>>1^-(1&t)},S.bool=function(){return 0!==this.int32()},S.fixed32=function(){if(this.pos+4>this.len)throw i(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},S.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var T="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,i){return e[0]=r[i++],e[1]=r[i++],e[2]=r[i++],e[3]=r[i],t[0]}:function(r,i){return e[3]=r[i++],e[2]=r[i++],e[1]=r[i++],e[0]=r[i],t[0]}}():function(t,e){return O.read(t,e,!1,23,4)};S.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=T(this.buf,this.pos);return this.pos+=4,t};var j="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,i){return e[0]=r[i++],e[1]=r[i++],e[2]=r[i++],e[3]=r[i++],e[4]=r[i++],e[5]=r[i++],e[6]=r[i++],e[7]=r[i],t[0]}:function(r,i){return e[7]=r[i++],e[6]=r[i++],e[5]=r[i++],e[4]=r[i++],e[3]=r[i++],e[2]=r[i++],e[1]=r[i++],e[0]=r[i],t[0]}}():function(t,e){return O.read(t,e,!1,52,8)};S.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=j(this.buf,this.pos);return this.pos+=8,t},S.bytes=function(){var t=this.int32()>>>0,e=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,e===r?new this.buf.constructor(0):this.h.call(this.buf,e,r)},S.string=function(){var t=this.bytes(),e=t.length;if(e){for(var r=new Array(e),i=0,n=0;i191&&s<224)r[n++]=(31&s)<<6|63&t[i++];else if(s>239&&s<365){var o=((7&s)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536;r[n++]=55296+(o>>10),r[n++]=56320+(1023&o)}else r[n++]=(15&s)<<12|(63&t[i++])<<6|63&t[i++]}return String.fromCharCode.apply(String,r.slice(0,n))}return""},S.skip=function(t){if(void 0===t){do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++])}else{if(this.pos+t>this.len)throw i(this,t);this.pos+=t}return this},S.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var e=this.tag();if(4===e.wireType)break;this.skipType(e.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+t)}return this},S.reset=function(t){return t?(this.buf=t, +this.len=t.length):(this.buf=null,this.len=0),this.pos=0,this},S.finish=function(t){var e=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(t),e};var F=function(){if(!x.Buffer)throw Error("Buffer is not supported");E.h=x.Buffer.prototype.slice,B=x.Buffer.prototype.utf8Slice?b:k,F=!1},E=w.prototype=Object.create(s.prototype);E.constructor=w,"undefined"==typeof Float32Array&&(E.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,t}),"undefined"==typeof Float64Array&&(E.double=function(){if(this.pos+8>this.len)throw i(this,8);var t=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,t});var B;E.string=function(){var t=this.int32()>>>0,e=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,B(this.buf,e,r)},E.finish=function(t){var e=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(t),e},n()},{1:1,29:29}],18:[function(t,e,r){"use strict";function i(t){s.call(this,"",t),this.deferred=[],this.files=[]}function n(t){var e=t.parent.lookup(t.extend);if(e){var r=new u(t.getFullName(),t.id,t.type,t.rule,(void 0),t.options);return r.declaringField=t,t.extensionField=r,e.add(r),!0}return!1}e.exports=i;var s=t(12),o=s.extend(i),u=t(8),a=t(25),f=t(6);i.fromJSON=function(t,e){return e||(e=new i),e.setOptions(t.options).addJSON(t.nested)},o.resolvePath=a.resolvePath,o.load=function e(r,i){function n(t,e){if(i){var r=i;i=null,r(t,e)}}function s(e,r){try{if(a.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),a.isString(r)){var i=t(15)(r,u);i.imports&&i.imports.forEach(function(t){o(u.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){o(u.resolvePath(e,t),!0)})}else u.setOptions(r.options).addJSON(r.nested)}catch(t){return void n(t)}l||n(null,u)}function o(t,e){var r=t.indexOf("google/protobuf/");if(r>-1){var o=t.substring(r);o in f&&(t=o)}if(!(u.files.indexOf(t)>-1)){if(u.files.push(t),t in f)return++l,void setTimeout(function(){--l,s(t,f[t])});++l,a.fetch(t,function(r,o){if(--l,i)return r?void(e||n(r)):void s(t,o)})}}var u=this;if(!i)return a.asPromise(e,u,r);var l=0;a.isString(r)&&(r=[r]),r.forEach(function(t){o(u.resolvePath("",t))}),l||n(null)},o.e=function(t){var e=this.deferred.slice();this.deferred=[];for(var r=0;r-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof s)for(var r=t.getNestedArray(),i=0;i0)return m.shift();if(w)return r();var i,o,u;do{if(v===y)return null;for(i=!1;/\s/.test(u=n(v));)if(u===a&&++g,++v===y)return null;if(n(v)===f){if(++v===y)throw e("comment");if(n(v)===f){for(;n(++v)!==a;)if(v===y)return null;++v,++g,i=!0}else{if((u=n(v))!==l)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=n(v)}while(o!==l||u!==f);++v,i=!0}}}while(i);if(v===y)return null;var h=v;s.lastIndex=0;var c=s.test(n(h++));if(!c)for(;h]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",l="*"},{}],23:[function(t,e,r){"use strict";function i(t,e){s.call(this,t,e),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,this.n=null}function n(t){return t.j=t.k=t.m=t.n=null,delete t.encode,delete t.decode,t}e.exports=i;var s=t(12),o=s.prototype,u=s.extend(i),a=t(7),f=t(14),l=t(8),h=t(21),c=t(16),d=t(17),p=t(30),v=t(9),y=t(25),g=t(2);y.props(u,{fieldsById:{get:function(){if(this.j)return this.j;this.j={};for(var t=Object.keys(this.fields),e=0;e0?e.splice(--n,2):r?e.splice(n,1):++n:"."===e[n]?e.splice(n,1):++n;return i+e.join("/")}var util=exports;util.isString=isString,util.isObject=function(t){return Boolean(t&&"object"==typeof t)},util.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},util.toArray=function(t){if(!t)return[];for(var e=Object.keys(t),r=e.length,i=new Array(r),n=0;n>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(t){switch(typeof t){case"number":return i.fromNumber(t);case"string":t=n.Long.fromString(t)}return(t.low||t.high)&&new i(t.low>>>0,t.high>>>0)||o},s.toNumber=function(t){return!t&&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(t){return new n.Long(this.lo,this.hi,t)};var u=String.prototype.charCodeAt;i.fromHash=function(t){return new i((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,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 t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},s.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},s.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<1<<21?3:4:e<16384?e<128?5:6:e<1<<21?7:8:r<128?9:10}},{25:25}],28:[function(t,e,r){"use strict";function i(t,e,r){var i=r||8192,n=i>>>1,s=null,o=i;return function(r){if(r>n)return t(r);o+r>i&&(s=t(i),o=0);var u=e.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}e.exports=i},{}],29:[function(t,e,r){(function(e){"use strict";var i=r,n=i.LongBits=t(27);i.pool=t(28);var s=i.isNode=Boolean(e.process&&e.process.versions&&e.process.versions.node);if(i.Buffer=null,s)try{i.Buffer=t("buffer").Buffer}catch(t){}if(i.Long=e.dcodeIO&&e.dcodeIO.Long||null,!i.Long&&s)try{i.Long=t("long")}catch(t){}i.longToHash=function(t){return t?n.from(t).toHash():"\0\0\0\0\0\0\0\0"},i.longFromHash=function(t,e){var r=n.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},i.longNeq=function(t,e){return"number"==typeof t?"number"==typeof e?t!==e:(t=n.fromNumber(t)).lo!==e.low||t.hi!==e.high:"number"==typeof e?(e=n.fromNumber(e)).lo!==t.low||e.hi!==t.high:t.low!==e.low||t.high!==e.high},i.props=function(t,e){Object.keys(e).forEach(function(r){i.prop(t,r,e[r])})},i.prop=function(t,e,r){var i=!-[1],n=e.substring(0,1).toUpperCase()+e.substring(1);r.get&&(t["get"+n]=r.get),r.set&&(t["set"+n]=i?function(t){r.set.call(this,t),this[e]=t}:r.set),i?void 0!==r.value&&(t[e]=r.value):Object.defineProperty(t,e,r)},i.emptyArray=Object.freeze([]),i.emptyObject=Object.freeze({})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{27:27,28:28,buffer:"buffer",long:"long"}],30:[function(t,e,r){"use strict";function i(t,e,r){this.fn=t,this.val=e,this.len=r,this.next=null}function n(){}function s(t,e){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=e}function o(){this.len=0,this.head=new i(n,0,0),this.tail=this.head,this.states=null}function u(t,e,r){t[e]=255&r}function a(t,e,r){for(;r>127;)t[e++]=127&r|128,r>>>=7;t[e]=r}function f(t,e,r){for(;r.hi;)t[e++]=127&r.lo|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)t[e++]=127&r.lo|128,r.lo=r.lo>>>7;t[e++]=r.lo}function l(t,e,r){t[e++]=255&r,t[e++]=r>>>8&255,t[e++]=r>>>16&255,t[e]=r>>>24}function h(t,e,r){for(var i=0;i>6|192,t[e++]=63&s|128):55296===(64512&s)&&56320===(64512&(n=r.charCodeAt(i+1)))?(s=65536+((1023&s)<<10)+(1023&n),++i,t[e++]=s>>18|240,t[e++]=s>>12&63|128,t[e++]=s>>6&63|128,t[e++]=63&s|128):(t[e++]=s>>12|224,t[e++]=s>>6&63|128,t[e++]=63&s|128)}}function c(t){for(var e=t.length>>>0,r=0,i=0;i>>=0,t<128?this.push(u,1,t):this.push(a,t<16384?2:t<2097152?3:t<268435456?4:5,t)},k.int32=function(t){return t<0?this.push(f,10,w.fromNumber(t)):this.uint32(t)},k.sint32=function(t){return this.uint32(t<<1^t>>31)},k.uint64=function(t){var e=w.from(t);return this.push(f,e.length(),e)},k.int64=k.uint64,k.sint64=function(t){var e=w.from(t).zzEncode();return this.push(f,e.length(),e)},k.bool=function(t){return this.push(u,1,t?1:0)},k.fixed32=function(t){return this.push(l,4,t>>>0)},k.sfixed32=function(t){return this.push(l,4,t<<1^t>>31)},k.fixed64=function(t){var e=w.from(t);return this.push(l,4,e.hi).push(l,4,e.lo)},k.sfixed64=function(t){var e=w.from(t).zzEncode();return this.push(l,4,e.hi).push(l,4,e.lo)};var x="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,i,n){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i]=e[3]}:function(r,i,n){t[0]=n,r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,r){m.write(t,r,e,!1,23,4)};k.float=function(t){return this.push(x,4,t)};var O="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,i,n){t[0]=n,r[i++]=e[0],r[i++]=e[1],r[i++]=e[2],r[i++]=e[3],r[i++]=e[4],r[i++]=e[5],r[i++]=e[6],r[i]=e[7]}:function(r,i,n){t[0]=n,r[i++]=e[7],r[i++]=e[6],r[i++]=e[5],r[i++]=e[4],r[i++]=e[3],r[i++]=e[2],r[i++]=e[1],r[i]=e[0]}}():function(t,e,r){m.write(t,r,e,!1,52,8)};k.double=function(t){return this.push(O,8,t)};var A=b.prototype.set?function(t,e,r){t.set(r,e)}:function(t,e,r){for(var i=0;i>>0;return e?this.uint32(e).push(A,e,t):this.push(u,1,0)},k.string=function(t){var e=c(t);return e?this.uint32(e).push(h,e,t):this.push(u,1,0)},k.fork=function(){return this.states=new s(this,this.states),this.head=this.tail=new i(n,0,0),this.len=0,this},k.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(n,0,0),this.len=0),this},k.ldelim=function(t){var e=this.head,r=this.tail,i=this.len;return this.reset(),void 0!==t&&this.tag(t,2),this.uint32(i),this.tail.next=e.next,this.tail=r,this.len+=i,this},k.finish=function(){var t=this.head.next,e=this.constructor.alloc(this.len);this.reset();for(var r=0;t;)t.fn(e,r,t.val),r+=t.len,t=t.next;return e},d.alloc=function(t){return d.alloc=g.Buffer.allocUnsafe?g.Buffer.allocUnsafe:function(t){return new g.Buffer(t)},d.alloc(t)};var N=d.prototype=Object.create(o.prototype);N.constructor=d,"undefined"==typeof Float32Array&&(N.float=function(t){return this.push(p,4,t)}),"undefined"==typeof Float64Array&&(N.double=function(t){return this.push(v,8,t)}),b.prototype.set&&g.Buffer&&g.Buffer.prototype.set||(N.bytes=function(t){var e=t.length>>>0;return e?this.uint32(e).push(y,e,t):this.push(u,1,0)});var S=function(){return g.Buffer&&g.Buffer.prototype.utf8Write?function(t,e,r){r.length<40?h(t,e,r):t.utf8Write(r,e)}:function(t,e,r){r.length<40?h(t,e,r):t.write(r,e)}}();N.string=function(t){var e=t.length<40?c(t):g.Buffer.byteLength(t);return e?this.uint32(e).push(S,e,t):this.push(u,1,0)}},{1:1,29:29}],31:[function(t,e,r){(function(e){"use strict";function i(t,e,r){return"function"==typeof e?(r=e,e=new n.Root):e||(e=new n.Root),e.load(t,r)}var n=e.protobuf=r;n.load=i,n.tokenize=t(22),n.parse=t(15),n.Writer=t(30),n.BufferWriter=n.Writer.BufferWriter,n.Reader=t(17),n.BufferReader=n.Reader.BufferReader,n.codegen=t(2),n.ReflectionObject=t(13),n.Namespace=t(12),n.Root=t(18),n.Enum=t(7),n.Type=t(23),n.Field=t(8),n.OneOf=t(14),n.MapField=t(10),n.Service=t(21),n.Method=t(11),n.Prototype=t(16),n.inherits=t(9),n.types=t(24),n.common=t(6),n.rpc=t(19),n.util=t(25),"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(n.util.Long=t,n.Reader.configure()),n})}).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,21:21,22:22,23:23,24:24,25:25,30:30,6:6,7:7,8:8,9:9}]},{},[31]); //# sourceMappingURL=protobuf.min.js.map diff --git a/dist/protobuf.min.js.gz b/dist/protobuf.min.js.gz index b06417de2..234b81f6e 100644 Binary files a/dist/protobuf.min.js.gz and b/dist/protobuf.min.js.gz differ diff --git a/dist/protobuf.min.js.map b/dist/protobuf.min.js.map index 23b6672ff..527395b58 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/codegen.js","src/codegen/decode.js","src/codegen/encode.js","src/codegen/verify.js","src/common.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/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/eventemitter.js","src/util/longbits.js","src/util/pool.js","src/util/runtime.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","codegen","gen","line","util","sprintf","apply","arguments","level","indent","src","prev","blockOpenRe","test","branchRe","casingRe","inCase","breakRe","blockCloseRe","index","push","str","name","replace","args","join","eof","scope","undefined","source","verbose","console","keys","Object","Function","concat","map","key","Array","prototype","slice","supported","encode","decode","verify","Enum","Reader","types","fallback","readerOrBuffer","fields","this","getFieldsById","reader","create","limit","len","pos","message","getCtor","tag","field","id","resolve","type","resolvedType","keyType","resolvedKeyType","uint32","ks","vs","basic","longToHash","repeated","values","packed","wireType","plimit","skipType","generate","mtype","getFieldsArray","prop","safeProp","Writer","writer","fi","fork","mapKey","ldelim","required","long","longNeq","defaultValue","reset","keyWireType","Type","getFullName","getValuesById","reason","hasReasonVar","toArray","j","common","json","nested","google","protobuf","Any","type_url","timeType","Duration","seconds","nanos","Timestamp","Empty","Struct","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","NULL_VALUE","ListValue","rule","options","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","extend","_TypeError","props","valuesById","get","forEach","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","isObject","toString","toLowerCase","optional","partOf","Long","extensionField","declaringField","_packed","FieldPrototype","MapField","isPacked","getOption","setOption","ifNotSet","role","resolved","typeDefault","defaults","parent","lookup","optionDefault","fromValue","jsonConvert","String","Number","toNumber","charAt","inherits","clazz","classProperties","$type","noStatics","merge","encodeDelimited","decodeDelimited","defineProperties","Prototype","constructor","noRegister","setCtor","prototypeProperties","isArray","emptyArray","emptyObject","getOneofsArray","indexOf","set","MapFieldPrototype","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","Namespace","_nestedArray","namespace","arrayToJSON","array","obj","NamespacePrototype","Service","nestedTypes","nestedError","ctor","nestedArray","methods","addJSON","getNestedArray","nestedJson","ns","nestedName","object","setOptions","onAdd","onRemove","define","path","split","ptr","part","shift","resolveAll","parentAlreadyChecked","getRoot","found","proto","Root","ReflectionObjectPrototype","root","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucName","substring","toUpperCase","_fields","addFieldsToParent","OneOfPrototype","splice","lower","token","parse","illegal","tn","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","camelCase","parseInlineOptions","valueType","parseEnumField","custom","s_bopen","fqTypeRefRe","parseOptionValue","service","parseMethod","st","method","reference","tokenize","head","package","properties","asJSON","k","fieldsOnly","indexOutOfRange","writeLength","RangeError","configure","ReaderPrototype","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","Tag","readLongVarint","lo","hi","b","LongBits","toLong","zzDecode","readLongFixed","BufferReader","initBufferReader","readStringBuffer_utf8Slice","utf8Slice","readStringBuffer_toString","ieee754","ArrayImpl","Uint8Array","Buffer","isBuffer","_slice","subarray","int32","octet","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","float","readDouble","Float64Array","f64","double","bytes","string","out","p","c1","fromCharCode","finish","remain","BufferReaderPrototype","readStringBuffer","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","rpc","rpcImpl","EventEmitter","$rpc","ServicePrototype","emit","off","_methodsArray","methodsArray","methodName","inherited","getMethodsArray","requestDelimited","responseDelimited","rpcService","lcName","request","requestData","setImmediate","responseData","response","err2","unescape","$0","$1","subject","re","stringDelim","stringDoubleRe","stringSingleRe","lastIndex","match","exec","stack","repeat","curr","s_nl","s_sl","s_as","delimRe","delim","expected","actual","equals","_fieldsById","_fieldsArray","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","fieldsById","names","fieldsArray","repeatedFieldsArray","filter","oneofsArray","P","fieldName","oneOfName","fld","bake","fn","ctx","Promise","reject","onload","xhr","status","responseText","eval","readFile","XMLHttpRequest","onreadystatechange","readyState","open","send","isAbsolutePath","normalizePath","parts","prefix","isFinite","description","TypeError","originPath","importPath","alreadyNormalized","dst","format","params","param","stringify","underScore","newBuffer","size","allocUnsafe","_listeners","EventEmitterPrototype","on","evt","listeners","LongBitsPrototype","zero","zzEncode","fromNumber","from","fromString","low","high","unsigned","charCodeAt","fromHash","hash","toHash","mask","part0","part1","part2","pool","alloc","SIZE","MAX","slab","isNode","global","versions","node","dcodeIO","longFromHash","bits","fromBits","target","descriptors","descriptor","ie8","ucKey","defineProperty","freeze","Op","val","noop","State","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","writeString","c2","byteLength","strlen","BufferWriter","writeFloatBuffer","writeFloatLE","writeDoubleBuffer","writeDoubleLE","writeBytesBuffer","copy","WriterPrototype","op","writeFloat","writeDouble","writeBytes","BufferWriterPrototype","writeStringBuffer","utf8Write","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,EAAAF,EAAAD,EAAA,EACAI,GAAA,GAAAD,GAAA,EACAE,EAAAD,GAAA,EACAE,GAAA,EACApB,EAAAa,EAAA,EAAAE,EAAA,EACAM,EAAAR,EA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K,GAAAC,EAAAvK,EAAAwK,GAMA,MALA,kBAAAxK,IACAwK,EAAAxK,EACAA,EAAA,GAAAzI,GAAAuI,MACAE,IACAA,EAAA,GAAAzI,GAAAuI,MACAE,EAAAsK,KAAAC,EAAAC,GAhBA,GAAAjT,GAAA2b,EAAA3b,SAAAxI,CA4CAwI,GAAA+S,KAAAA,EAGA/S,EAAA4N,SAAA1W,EAAA,IACA8I,EAAAyJ,MAAAvS,EAAA,IAGA8I,EAAAvB,OAAAvH,EAAA,IACA8I,EAAAud,aAAAvd,EAAAvB,OAAA8e,aACAvd,EAAA7D,OAAAjF,EAAA,IACA8I,EAAAiQ,aAAAjQ,EAAA7D,OAAA8T,aACAjQ,EAAA1G,QAAApC,EAAA,GAGA8I,EAAAyB,iBAAAvK,EAAA,IACA8I,EAAAsG,UAAApP,EAAA,IACA8I,EAAAuI,KAAArR,EAAA,IACA8I,EAAA9D,KAAAhF,EAAA,GACA8I,EAAAX,KAAAnI,EAAA,IACA8I,EAAA4C,MAAA1L,EAAA,GACA8I,EAAA8I,MAAA5R,EAAA,IACA8I,EAAAuD,SAAArM,EAAA,IACA8I,EAAA6G,QAAA3P,EAAA,IACA8I,EAAA8F,OAAA5O,EAAA,IAGA8I,EAAAkF,UAAAhO,EAAA,IACA8I,EAAAyE,SAAAvN,EAAA,GAGA8I,EAAA5D,MAAAlF,EAAA,IACA8I,EAAAJ,OAAA1I,EAAA,GACA8I,EAAAgU,IAAA9c,EAAA,IACA8I,EAAAvG,KAAAvC,EAAA,IAGA,kBAAA0Q,SAAAA,OAAA0W,KACA1W,QAAA,QAAA,SAAA1E,GAKA,MAJAA,KACAlD,EAAAvG,KAAAyJ,KAAAA,EACAlD,EAAA7D,OAAAmS,aAEAtO","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\nmodule.exports = codegen;\r\n\r\nvar util = require(25);\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 * A closure for generating functions programmatically.\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {CodegenInstance} Codegen instance\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() {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'],\r\n indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a {@link util.sprintf|sprintf}-like appender function.\r\n * @typedef CodegenInstance\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {CodegenInstance} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var line = util.sprintf.apply(null, arguments);\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 /**\r\n * Stringifies the so far generated function source.\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 * @inner\r\n */\r\n 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 gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\r\n\r\ncodegen.encode = require(4);\r\ncodegen.decode = require(3);\r\ncodegen.verify = require(5);\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection that also provides a fallback.\r\n * @exports codegen.decode\r\n * @namespace\r\n */\r\nvar decode = exports;\r\n\r\nvar Enum = require(7),\r\n Reader = require(17),\r\n types = require(24),\r\n util = require(25),\r\n codegen = require(2);\r\n\r\n/**\r\n * Decodes a message of `this` message's 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} Populated runtime message\r\n * @this Type\r\n */\r\ndecode.fallback = function decode_fallback(readerOrBuffer, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer),\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].length ? 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, with an identical signature to {@link codegen.decode.fallback}.\r\n * @param {Type} mtype Message type\r\n * @returns {CodegenInstance} {@link codegen|Codegen} instance\r\n */\r\ndecode.generate = function decode_generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(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\nutil.props(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: 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\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\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(13);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(23),\r\n Enum = require(7),\r\n MapField = require(10),\r\n types = require(24),\r\n util = require(25);\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|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [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\nutil.props(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 * Determines whether this field is packed. This is an alias of {@link Field#packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\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(16),\r\n Type = require(23),\r\n util = require(25);\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 {*} clazz Inheriting class constructor\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 util.props(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 // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue)\r\n ? util.emptyObject\r\n : 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 util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n var keys = Object.keys(this);\r\n for (var i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(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 util.props(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(8);\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(7),\r\n types = require(24),\r\n util = require(25);\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(13);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(23),\r\n util = require(25);\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|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [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 (type && !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(13);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(7),\r\n Type = require(23),\r\n Field = require(8),\r\n Service = require(21),\r\n util = require(25);\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\nutil.props(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: 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(18),\r\n util = require(25);\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\nutil.props(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: 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 {*} 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(13);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(8),\r\n util = require(25);\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[]|Object} [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 {string[]}\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 {Field[]}\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(22),\r\n Root = require(18),\r\n Type = require(23),\r\n Field = require(8),\r\n MapField = require(10),\r\n OneOf = require(14),\r\n Enum = require(7),\r\n Service = require(21),\r\n Method = require(11),\r\n types = require(24),\r\n util = require(25);\r\nvar camelCase = util.camelCase;\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\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 } 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 * 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 * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\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 {*} [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 {*} [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 * @param {boolean} [options.defaults=false] Also sets default values on the resulting object\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n if (!options)\r\n options = {};\r\n var fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys;\r\n if (options.defaults) {\r\n keys = [];\r\n for (var k in this) // eslint-disable-line guard-for-in\r\n keys.push(k);\r\n } else\r\n 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 (!options.fieldsOnly)\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(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 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 * @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 \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/**\r\n * Creates a new reader using the specified buffer.\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = function create(buffer) {\r\n return new (util.Buffer && util.Buffer.isBuffer(buffer) && BufferReader || Reader)(buffer);\r\n};\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice;\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 // 1 byte\r\n var octet = this.buf[this.pos++],\r\n value = octet & 127;\r\n if (octet > 127) { // false if octet is undefined (pos >= len)\r\n // 2 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 7;\r\n if (octet > 127) {\r\n // 3 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 14;\r\n if (octet > 127) {\r\n // 4 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 21;\r\n if (octet > 127) {\r\n // 5 bytes\r\n octet = this.buf[this.pos++];\r\n value |= octet << 28;\r\n if (octet > 127) {\r\n // 6..10 bytes (sign extended)\r\n this.pos += 5;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this.pos > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this);\r\n }\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\nvar readFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos ];\r\n return f32[0];\r\n }\r\n : function readFloat_f32_le(buf, pos) {\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f32[0];\r\n };\r\n })()\r\n : function readFloat_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 23, 4);\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 = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[7] = buf[pos ];\r\n return f64[0];\r\n }\r\n : function readDouble_f64_le(buf, pos) {\r\n f8b[7] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f64[0];\r\n };\r\n })()\r\n : function readDouble_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 52, 8);\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 = readDouble(this.buf, this.pos);\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 readStringBuffer = util.Buffer.prototype.utf8Slice // around forever, but not present in browser buffer\r\n ? readStringBuffer_utf8Slice\r\n : readStringBuffer_toString;\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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\nvar readStringBuffer;\r\n\r\nfunction readStringBuffer_utf8Slice(buf, start, end) {\r\n return buf.utf8Slice(start, end); // fastest\r\n}\r\n\r\nfunction readStringBuffer_toString(buf, start, end) {\r\n return buf.toString(\"utf8\", start, end); // 2nd, again assertions\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 readStringBuffer(this.buf, 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(12);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(8),\r\n util = require(25),\r\n common = require(6);\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 and calls the callback.\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 {undefined}\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(15)(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// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string):Promise\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\n\r\n/**\r\n * RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(20);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar EventEmitter = require(26);\r\n\r\n/**\r\n * Constructs a new RPC service.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation.\r\n * @type {RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end() {\r\n return this.emit('end').off();\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(12);\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(11),\r\n util = require(25),\r\n rpc = require(19);\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\nutil.props(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: 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 * @type {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. `null` as response data signals an ended stream.\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)} rpcImpl 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 {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\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 rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit('error', err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.emit('end', method);\r\n return undefined;\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 rpcService.emit('error', err2, method);\r\n return callback ? callback('error', err2) : undefined;\r\n }\r\n rpcService.emit('data', response, method);\r\n return callback ? callback(null, response) : undefined;\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(12);\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(7),\r\n OneOf = require(14),\r\n Field = require(8),\r\n Service = require(21),\r\n Prototype = require(16),\r\n Reader = require(17),\r\n Writer = require(30),\r\n inherits = require(9),\r\n util = require(25),\r\n codegen = require(2);\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 repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = 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 {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(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: 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: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\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: 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: 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: 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 {*} [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 (!properties || 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 ? codegen.encode.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 : codegen.encode.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 ? codegen.decode.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 : codegen.decode.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.create(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 ? codegen.verify.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : codegen.verify.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 util = require(25);\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\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 */ util.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\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} A 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 try {\r\n // Hide this from webpack. There is probably another, better way.\r\n return eval(['req','uire'].join(''))(\"fs\") // eslint-disable-line no-eval\r\n .readFile(path, \"utf8\", callback);\r\n } catch (e) { } // eslint-disable-line no-empty\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/**\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 return \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Minimalistic sprintf.\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {string} Formatted string\r\n */\r\nutil.sprintf = function sprintf(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 switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(param);\r\n case \"p\":\r\n return util.safeProp(param);\r\n default:\r\n return String(param);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Converts a string to camel case notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.camelCase = function camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n};\r\n\r\n/**\r\n * Converts a string to underscore notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.underScore = function underScore(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return \"_\" + $1.toLowerCase(); });\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 size = size || 0; \r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(size) || new util.Buffer(size)\r\n : new (typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size);\r\n};\r\n\r\nutil.EventEmitter = require(26);\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(29));\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < listeners.length; ++i)\r\n listeners[i].fn.apply(listeners[i].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(25);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\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\nmodule.exports = pool;\r\n\r\n/**\r\n * A drop-in buffer pool, similar in functionality to what node uses for buffers.\r\n * @memberof util\r\n * @function\r\n * @param {function(number):Uint8Array} alloc Allocator\r\n * @param {function(number, number):Uint8Array} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {function(number):Uint8Array} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\nutil.pool = require(\"./pool\");\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 {*}\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 {*}\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\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ie8 = !-[1,];\r\n var ucKey = key.substring(0, 1).toUpperCase() + key.substring(1);\r\n if (descriptor.get)\r\n target['get' + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target['set' + ucKey] = ie8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (ie8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze([]);\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze({});\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 * @param {State} next Next state entry\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer, next) {\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\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = next;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction 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 * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\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/**\r\n * Creates a new writer.\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = function create() {\r\n return new (util.Buffer && BufferWriter || Writer);\r\n};\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new ArrayImpl(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (ArrayImpl !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice);\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 value < 128\r\n ? this.push(writeByte, 1, value)\r\n : this.push(writeVarint32,\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) {\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 while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 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 write_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;\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\nvar writeFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n : function writeFloat_f32_le(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeFloat_ieee754(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\nvar writeDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n : function writeDouble_f64_le(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeDouble_ieee754(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 = ArrayImpl.prototype.set\r\n ? function writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n }\r\n : function 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#}, {@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.states = new State(this, this.states);\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.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\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 as a tag 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 = this.constructor.alloc(this.len);\r\n this.reset();\r\n var pos = 0;\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/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n BufferWriter.alloc = util.Buffer.allocUnsafe\r\n ? util.Buffer.allocUnsafe\r\n : function allocUnsafeNew(size) { return new util.Buffer(size); };\r\n return BufferWriter.alloc(size);\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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 // This could probably be optimized just like writeStringBuffer, but most real use cases won't benefit much.\r\n}\r\n\r\nif (!(ArrayImpl.prototype.set && util.Buffer && util.Buffer.prototype.set)) // set is faster (node 6.9.1)\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\nvar writeStringBuffer = (function() { // eslint-disable-line wrap-iife\r\n return util.Buffer && util.Buffer.prototype.utf8Write // around forever, but not present in browser buffer\r\n ? function writeString_buffer_utf8Write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.utf8Write(val, pos);\r\n }\r\n : function writeString_buffer_write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n };\r\n // Note that the plain JS encoder is faster for short strings, probably because of redundant assertions.\r\n // For a raw utf8Write, the breaking point is about 20 characters, for write it is around 40 characters.\r\n // Unfortunately, this does not translate 1:1 to real use cases, hence the common \"good enough\" limit of 40.\r\n})();\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\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","\"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 and calls the callback.\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 {undefined}\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);\r\n}\r\n// function load(filename:string, root:Root, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {function(?Error, Root=)} callback Callback function\r\n * @returns {undefined}\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\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 * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\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.codegen = require(\"./codegen\");\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.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\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 }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/ieee754.js","src/codegen.js","src/codegen/decode.js","src/codegen/encode.js","src/codegen/verify.js","src/common.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/rpc.js","src/rpc/service.js","src/service.js","src/tokenize.js","src/type.js","src/types.js","src/util.js","src/util/eventemitter.js","src/util/longbits.js","src/util/pool.js","src/util/runtime.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","codegen","gen","line","util","sprintf","apply","arguments","level","indent","src","prev","blockOpenRe","test","branchRe","casingRe","inCase","breakRe","blockCloseRe","index","push","str","name","replace","args","join","eof","scope","undefined","source","verbose","console","keys","Object","Function","concat","map","key","Array","prototype","slice","supported","encode","decode","verify","Enum","Reader","types","fallback","readerOrBuffer","fields","this","getFieldsById","reader","create","limit","len","pos","message","getCtor","tag","field","id","resolve","type","resolvedType","keyType","resolvedKeyType","uint32","ks","vs","basic","longToHash","repeated","values","packed","wireType","plimit","skipType","generate","mtype","getFieldsArray","prop","safeProp","Writer","writer","fi","fork","mapKey","ldelim","required","long","longNeq","defaultValue","reset","keyWireType","Type","getFullName","getValuesById","reason","hasReasonVar","toArray","j","common","json","nested","google","protobuf","Any","type_url","timeType","Duration","seconds","nanos","Timestamp","Empty","Struct","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","NULL_VALUE","ListValue","rule","options","ReflectionObject","_valuesById","clearCache","enm","EnumPrototype","extend","_TypeError","props","valuesById","get","forEach","testJSON","Boolean","fromJSON","toJSON","add","isString","isInteger","remove","Field","isObject","toString","toLowerCase","optional","partOf","Long","extensionField","declaringField","_packed","FieldPrototype","MapField","isPacked","getOption","setOption","ifNotSet","role","resolved","typeDefault","defaults","parent","lookup","optionDefault","fromValue","jsonConvert","String","Number","toNumber","charAt","inherits","clazz","classProperties","$type","noStatics","merge","encodeDelimited","decodeDelimited","defineProperties","Prototype","constructor","noRegister","setCtor","prototypeProperties","isArray","emptyArray","emptyObject","getOneofsArray","indexOf","set","MapFieldPrototype","Method","requestType","responseType","requestStream","responseStream","resolvedRequestType","resolvedResponseType","MethodPrototype","Namespace","_nestedArray","namespace","arrayToJSON","array","obj","NamespacePrototype","Service","nestedTypes","nestedError","ctor","nestedArray","methods","addJSON","getNestedArray","nestedJson","ns","nestedName","object","setOptions","onAdd","onRemove","define","path","split","ptr","part","shift","resolveAll","parentAlreadyChecked","getRoot","found","proto","Root","ReflectionObjectPrototype","root","fullName","unshift","_handleAdd","_handleRemove","OneOf","fieldNames","ucName","substring","toUpperCase","_fields","addFieldsToParent","OneOfPrototype","splice","lower","token","parse","illegal","tn","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","camelCase","parseInlineOptions","valueType","parseEnumField","custom","s_bopen","fqTypeRefRe","parseOptionValue","service","parseMethod","st","method","reference","tokenize","head","package","properties","asJSON","k","fieldsOnly","indexOutOfRange","writeLength","RangeError","configure","ReaderPrototype","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","Tag","readLongVarint","lo","hi","b","LongBits","toLong","zzDecode","readLongFixed","BufferReader","initBufferReader","readStringBuffer_utf8Slice","utf8Slice","readStringBuffer_toString","ieee754","ArrayImpl","Uint8Array","Buffer","isBuffer","_slice","subarray","int32","octet","sint32","bool","fixed32","sfixed32","readFloat","Float32Array","f32","f8b","float","readDouble","Float64Array","f64","double","bytes","string","out","p","c1","fromCharCode","finish","remain","BufferReaderPrototype","readStringBuffer","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","rpc","rpcImpl","EventEmitter","$rpc","ServicePrototype","endedByRPC","emit","off","_methodsArray","methodsArray","methodName","inherited","getMethodsArray","requestDelimited","responseDelimited","rpcService","lcName","request","requestData","setImmediate","responseData","response","err2","unescape","$0","$1","subject","re","stringDelim","stringDoubleRe","stringSingleRe","lastIndex","match","exec","stack","repeat","curr","s_nl","s_sl","s_as","delimRe","delim","expected","actual","equals","_fieldsById","_fieldsArray","_repeatedFieldsArray","_oneofsArray","_ctor","TypePrototype","fieldsById","names","fieldsArray","repeatedFieldsArray","filter","oneofsArray","P","fieldName","oneOfName","fld","bake","fn","ctx","Promise","reject","onload","xhr","status","responseText","eval","readFile","XMLHttpRequest","onreadystatechange","readyState","open","send","isAbsolutePath","normalizePath","parts","prefix","isFinite","description","TypeError","originPath","importPath","alreadyNormalized","dst","format","params","param","stringify","underScore","newBuffer","size","allocUnsafe","_listeners","EventEmitterPrototype","on","evt","listeners","LongBitsPrototype","zero","zzEncode","fromNumber","from","fromString","low","high","unsigned","charCodeAt","fromHash","hash","toHash","mask","part0","part1","part2","pool","alloc","SIZE","MAX","slab","isNode","global","versions","node","dcodeIO","longFromHash","bits","fromBits","target","descriptors","descriptor","ie8","ucKey","defineProperty","freeze","Op","val","noop","State","tail","states","writeByte","writeVarint32","writeVarint64","writeFixed32","writeString","c2","byteLength","strlen","BufferWriter","writeFloatBuffer","writeFloatLE","writeDoubleBuffer","writeDoubleLE","writeBytesBuffer","copy","WriterPrototype","op","writeFloat","writeDouble","writeBytes","BufferWriterPrototype","writeStringBuffer","utf8Write","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,EAAAF,EAAAD,EAAA,EACAI,GAAA,GAAAD,GAAA,EACAE,EAAAD,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AAAmS,aAEAtO","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\nmodule.exports = codegen;\r\n\r\nvar util = require(25);\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 * A closure for generating functions programmatically.\r\n * @namespace\r\n * @function\r\n * @param {...string} params Function parameter names\r\n * @returns {CodegenInstance} Codegen instance\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() {\r\n var args = Array.prototype.slice.call(arguments),\r\n src = ['\\t\"use strict\"'],\r\n indent = 1,\r\n inCase = false;\r\n\r\n /**\r\n * A codegen instance as returned by {@link codegen}, that also is a {@link util.sprintf|sprintf}-like appender function.\r\n * @typedef CodegenInstance\r\n * @type {function}\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {CodegenInstance} Itself\r\n * @property {function(string=):string} str Stringifies the so far generated function source.\r\n * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\r\n */\r\n /**/\r\n function gen() {\r\n var line = util.sprintf.apply(null, arguments);\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 /**\r\n * Stringifies the so far generated function source.\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 * @inner\r\n */\r\n 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 gen.str = str;\r\n\r\n /**\r\n * Ends generation and builds the function whilst applying a scope.\r\n * @param {string} [name] Function name, defaults to generate an anonymous function\r\n * @param {Object} [scope] Function scope\r\n * @returns {function} The generated function, with scope applied if specified\r\n * @inner\r\n */\r\n function eof(name, scope) {\r\n if (typeof name === 'object') {\r\n scope = name;\r\n name = undefined;\r\n }\r\n var source = gen.str(name);\r\n if (codegen.verbose)\r\n console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \" \")); // eslint-disable-line no-console\r\n var keys = Object.keys(scope || (scope = {}));\r\n return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\r\n // ^ Creates a wrapper function with the scoped variable names as its parameters,\r\n // calls it with the respective scoped variable values ^\r\n // and returns our brand-new properly scoped function.\r\n //\r\n // This works because \"Invoking the Function constructor as a function (without using the\r\n // new operator) has the same effect as invoking it as a constructor.\"\r\n // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\r\n }\r\n\r\n gen.eof = eof;\r\n\r\n return gen;\r\n}\r\n\r\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\r\ncodegen.verbose = false;\r\n\r\ncodegen.encode = require(4);\r\ncodegen.decode = require(3);\r\ncodegen.verify = require(5);\r\n","\"use strict\";\r\n\r\n/**\r\n * Wire format decoder using code generation on top of reflection that also provides a fallback.\r\n * @exports codegen.decode\r\n * @namespace\r\n */\r\nvar decode = exports;\r\n\r\nvar Enum = require(7),\r\n Reader = require(17),\r\n types = require(24),\r\n util = require(25),\r\n codegen = require(2);\r\n\r\n/**\r\n * Decodes a message of `this` message's 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} Populated runtime message\r\n * @this Type\r\n */\r\ndecode.fallback = function decode_fallback(readerOrBuffer, length) {\r\n /* eslint-disable no-invalid-this, block-scoped-var, no-redeclare */\r\n var fields = this.getFieldsById(),\r\n reader = readerOrBuffer instanceof Reader ? readerOrBuffer : Reader.create(readerOrBuffer),\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].length ? 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, with an identical signature to {@link codegen.decode.fallback}.\r\n * @param {Type} mtype Message type\r\n * @returns {CodegenInstance} {@link codegen|Codegen} instance\r\n */\r\ndecode.generate = function decode_generate(mtype) {\r\n /* eslint-disable no-unexpected-multiline */\r\n var fields = mtype.getFieldsArray(); \r\n var gen = codegen(\"r\", \"l\")\r\n\r\n (\"r instanceof Reader||(r=Reader.create(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\nutil.props(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: 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\n * Gets this enum's values by id. This is an alias of {@link Enum#valuesById}'s getter for use within non-ES5 environments.\r\n * @name Enum#getValuesById\r\n * @function\r\n * @returns {Object.}\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(13);\r\n/** @alias Field.prototype */\r\nvar FieldPrototype = ReflectionObject.extend(Field);\r\n\r\nvar Type = require(23),\r\n Enum = require(7),\r\n MapField = require(10),\r\n types = require(24),\r\n util = require(25);\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|Object} [rule=\"optional\"] Field rule\r\n * @param {string|Object} [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\nutil.props(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 * Determines whether this field is packed. This is an alias of {@link Field#packed}'s getter for use within non-ES5 environments.\r\n * @name Field#isPacked\r\n * @function\r\n * @returns {boolean}\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(16),\r\n Type = require(23),\r\n util = require(25);\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 {*} clazz Inheriting class constructor\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 util.props(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 // objects on the prototype must be immmutable. users must assign a new object instance and\r\n // cannot use Array#push on empty arrays on the prototype for example, as this would modify\r\n // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\r\n prototype[field.name] = Array.isArray(field.defaultValue)\r\n ? util.emptyArray\r\n : util.isObject(field.defaultValue)\r\n ? util.emptyObject\r\n : 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 util.prop(prototype, oneof.resolve().name, {\r\n get: function getVirtual() {\r\n // > If the parser encounters multiple members of the same oneof on the wire, only the last member seen is used in the parsed message.\r\n var keys = Object.keys(this);\r\n for (var i = keys.length - 1; i > -1; --i)\r\n if (oneof.oneof.indexOf(keys[i]) > -1)\r\n return keys[i];\r\n return undefined;\r\n },\r\n set: function setVirtual(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 util.props(prototype, prototypeProperties);\r\n return prototype;\r\n};\r\n","\"use strict\";\r\nmodule.exports = MapField;\r\n\r\nvar Field = require(8);\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(7),\r\n types = require(24),\r\n util = require(25);\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(13);\r\n/** @alias Method.prototype */\r\nvar MethodPrototype = ReflectionObject.extend(Method);\r\n\r\nvar Type = require(23),\r\n util = require(25);\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|Object} [requestStream] Whether the request is streamed\r\n * @param {boolean|Object} [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 (type && !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(13);\r\n/** @alias Namespace.prototype */\r\nvar NamespacePrototype = ReflectionObject.extend(Namespace);\r\n\r\nvar Enum = require(7),\r\n Type = require(23),\r\n Field = require(8),\r\n Service = require(21),\r\n util = require(25);\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\nutil.props(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: 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(18),\r\n util = require(25);\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\nutil.props(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: 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 {*} 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(13);\r\n/** @alias OneOf.prototype */\r\nvar OneOfPrototype = ReflectionObject.extend(OneOf);\r\n\r\nvar Field = require(8),\r\n util = require(25);\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[]|Object} [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 {string[]}\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 {Field[]}\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(22),\r\n Root = require(18),\r\n Type = require(23),\r\n Field = require(8),\r\n MapField = require(10),\r\n OneOf = require(14),\r\n Enum = require(7),\r\n Service = require(21),\r\n Method = require(11),\r\n types = require(24),\r\n util = require(25);\r\nvar camelCase = util.camelCase;\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\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 } 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 * 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 * @abstract\r\n * @see {@link inherits}\r\n * @see {@link Class}\r\n */\r\nfunction Prototype(properties) {\r\n if (properties) {\r\n var keys = Object.keys(properties);\r\n for (var i = 0; i < keys.length; ++i)\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 {*} [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 {*} [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 * @param {boolean} [options.defaults=false] Also sets default values on the resulting object\r\n * @returns {Object.} JSON object\r\n */\r\nPrototype.prototype.asJSON = function asJSON(options) {\r\n if (!options)\r\n options = {};\r\n var fields = this.constructor.$type.fields,\r\n json = {};\r\n var keys;\r\n if (options.defaults) {\r\n keys = [];\r\n for (var k in this) // eslint-disable-line guard-for-in\r\n keys.push(k);\r\n } else\r\n 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 (!options.fieldsOnly)\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(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 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 * @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 \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/**\r\n * Creates a new reader using the specified buffer.\r\n * @param {Uint8Array} buffer Buffer to read from\r\n * @returns {BufferReader|Reader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\r\n */\r\nReader.create = function create(buffer) {\r\n return new (util.Buffer && util.Buffer.isBuffer(buffer) && BufferReader || Reader)(buffer);\r\n};\r\n\r\n/** @alias Reader.prototype */\r\nvar ReaderPrototype = Reader.prototype;\r\n\r\nReaderPrototype._slice = ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice;\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 // 1 byte\r\n var octet = this.buf[this.pos++],\r\n value = octet & 127;\r\n if (octet > 127) { // false if octet is undefined (pos >= len)\r\n // 2 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 7;\r\n if (octet > 127) {\r\n // 3 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 14;\r\n if (octet > 127) {\r\n // 4 bytes\r\n octet = this.buf[this.pos++];\r\n value |= (octet & 127) << 21;\r\n if (octet > 127) {\r\n // 5 bytes\r\n octet = this.buf[this.pos++];\r\n value |= octet << 28;\r\n if (octet > 127) {\r\n // 6..10 bytes (sign extended)\r\n this.pos += 5;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (this.pos > this.len) {\r\n this.pos = this.len;\r\n throw indexOutOfRange(this);\r\n }\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\nvar readFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function readFloat_f32(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos ];\r\n return f32[0];\r\n }\r\n : function readFloat_f32_le(buf, pos) {\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f32[0];\r\n };\r\n })()\r\n : function readFloat_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 23, 4);\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 = readFloat(this.buf, this.pos);\r\n this.pos += 4;\r\n return value;\r\n};\r\n\r\nvar readDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function readDouble_f64(buf, pos) {\r\n f8b[0] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[7] = buf[pos ];\r\n return f64[0];\r\n }\r\n : function readDouble_f64_le(buf, pos) {\r\n f8b[7] = buf[pos++];\r\n f8b[6] = buf[pos++];\r\n f8b[5] = buf[pos++];\r\n f8b[4] = buf[pos++];\r\n f8b[3] = buf[pos++];\r\n f8b[2] = buf[pos++];\r\n f8b[1] = buf[pos++];\r\n f8b[0] = buf[pos ];\r\n return f64[0];\r\n };\r\n })()\r\n : function readDouble_ieee754(buf, pos) {\r\n return ieee754.read(buf, pos, false, 52, 8);\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 = readDouble(this.buf, this.pos);\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 readStringBuffer = util.Buffer.prototype.utf8Slice // around forever, but not present in browser buffer\r\n ? readStringBuffer_utf8Slice\r\n : readStringBuffer_toString;\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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\nvar readStringBuffer;\r\n\r\nfunction readStringBuffer_utf8Slice(buf, start, end) {\r\n return buf.utf8Slice(start, end); // fastest\r\n}\r\n\r\nfunction readStringBuffer_toString(buf, start, end) {\r\n return buf.toString(\"utf8\", start, end); // 2nd, again assertions\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 readStringBuffer(this.buf, 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(12);\r\n/** @alias Root.prototype */\r\nvar RootPrototype = Namespace.extend(Root);\r\n\r\nvar Field = require(8),\r\n util = require(25),\r\n common = require(6);\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 and calls the callback.\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 {undefined}\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(15)(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// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\r\n * @name Root#load\r\n * @function\r\n * @param {string|string[]} filename Names of one or multiple files to load\r\n * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string):Promise\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\n\r\n/**\r\n * RPC helpers.\r\n * @namespace\r\n */\r\nvar rpc = exports;\r\n\r\nrpc.Service = require(20);\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar EventEmitter = require(26);\r\n\r\n/**\r\n * Constructs a new RPC service.\r\n * @classdesc An RPC service as returned by {@link Service#create}.\r\n * @memberof rpc\r\n * @extends util.EventEmitter\r\n * @constructor\r\n * @param {RPCImpl} rpcImpl RPC implementation\r\n */\r\nfunction Service(rpcImpl) {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * RPC implementation. Becomes `null` when the service is ended.\r\n * @type {?RPCImpl}\r\n */\r\n this.$rpc = rpcImpl;\r\n}\r\n\r\n/** @alias rpc.Service.prototype */\r\nvar ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype);\r\nServicePrototype.constructor = Service;\r\n\r\n/**\r\n * Ends this service and emits the `end` event.\r\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\r\n * @returns {rpc.Service} `this`\r\n */\r\nServicePrototype.end = function end(endedByRPC) {\r\n if (this.$rpc) {\r\n if (!endedByRPC) // signal end to rpcImpl\r\n this.$rpc(null, null, null);\r\n this.$rpc = null;\r\n this.emit('end').off();\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = Service;\r\n\r\nvar Namespace = require(12);\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(11),\r\n util = require(25),\r\n rpc = require(19);\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\nutil.props(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: 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 * @type {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. `null` as response data signals an ended stream.\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)} rpcImpl 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 {rpc.Service} Runtime RPC service. Useful where requests and/or responses are streamed.\r\n */\r\nServicePrototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\r\n var rpcService = new rpc.Service(rpcImpl);\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 if (!rpcService.$rpc) // already ended?\r\n return;\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 rpcImpl(method, requestData, function(err, responseData) {\r\n if (err) {\r\n rpcService.emit('error', err, method);\r\n return callback ? callback(err) : undefined;\r\n }\r\n if (responseData === null) {\r\n rpcService.end(/* endedByRPC */ true);\r\n return undefined;\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 rpcService.emit('error', err2, method);\r\n return callback ? callback('error', err2) : undefined;\r\n }\r\n rpcService.emit('data', response, method);\r\n return callback ? callback(null, response) : undefined;\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(12);\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(7),\r\n OneOf = require(14),\r\n Field = require(8),\r\n Service = require(21),\r\n Prototype = require(16),\r\n Reader = require(17),\r\n Writer = require(30),\r\n inherits = require(9),\r\n util = require(25),\r\n codegen = require(2);\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 repeated fields as an array.\r\n * @type {?Field[]}\r\n * @private\r\n */\r\n this._repeatedFieldsArray = 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 {*}\r\n * @private\r\n */\r\n this._ctor = null;\r\n}\r\n\r\nutil.props(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: 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: function getFieldsArray() {\r\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\r\n }\r\n },\r\n\r\n /**\r\n * Repeated fields of this message as an array for iteration.\r\n * @name Type#repeatedFieldsArray\r\n * @type {Field[]}\r\n * @readonly\r\n */\r\n repeatedFieldsArray: {\r\n get: function getRepeatedFieldsArray() {\r\n return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.getFieldsArray().filter(function(field) { return field.repeated; }));\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: 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: 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: 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 {*} [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 (!properties || 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 ? codegen.encode.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 : codegen.encode.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 ? codegen.decode.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 : codegen.decode.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.create(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 ? codegen.verify.generate(this).eof(this.getFullName() + \"$verify\", {\r\n types : this.getFieldsArray().map(function(fld) { return fld.resolvedType; })\r\n })\r\n : codegen.verify.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 util = require(25);\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\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 */ util.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\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} A 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 try {\r\n // Hide this from webpack. There is probably another, better way.\r\n return eval(['req','uire'].join(''))(\"fs\") // eslint-disable-line no-eval\r\n .readFile(path, \"utf8\", callback);\r\n } catch (e) { } // eslint-disable-line no-empty\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/**\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 return \"['\" + prop.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\") + \"']\";\r\n};\r\n\r\n/**\r\n * Minimalistic sprintf.\r\n * @param {string} format Format string\r\n * @param {...*} args Replacements\r\n * @returns {string} Formatted string\r\n */\r\nutil.sprintf = function sprintf(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 switch ($1) {\r\n case \"j\":\r\n return JSON.stringify(param);\r\n case \"p\":\r\n return util.safeProp(param);\r\n default:\r\n return String(param);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Converts a string to camel case notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.camelCase = function camelCase(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/_([a-z])(?=[a-z]|$)/g, function($0, $1) { return $1.toUpperCase(); });\r\n};\r\n\r\n/**\r\n * Converts a string to underscore notation.\r\n * @param {string} str String to convert\r\n * @returns {string} Converted string\r\n */\r\nutil.underScore = function underScore(str) {\r\n return str.substring(0,1)\r\n + str.substring(1)\r\n .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return \"_\" + $1.toLowerCase(); });\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 size = size || 0; \r\n return util.Buffer\r\n ? util.Buffer.allocUnsafe && util.Buffer.allocUnsafe(size) || new util.Buffer(size)\r\n : new (typeof Uint8Array !== 'undefined' && Uint8Array || Array)(size);\r\n};\r\n\r\nutil.EventEmitter = require(26);\r\n\r\n// Merge in runtime utility\r\nutil.merge(util, require(29));\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/** @alias util.EventEmitter.prototype */\r\nvar EventEmitterPrototype = EventEmitter.prototype;\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {Object} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitterPrototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < listeners.length; ++i)\r\n listeners[i].fn.apply(listeners[i].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = LongBits;\r\n\r\nvar util = require(25);\r\n\r\n/**\r\n * Any compatible Long instance.\r\n * @typedef Long\r\n * @type {Object}\r\n * @property {number} low Low bits\r\n * @property {number} high High bits\r\n * @property {boolean} unsigned Whether unsigned or not\r\n */\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\nmodule.exports = pool;\r\n\r\n/**\r\n * A drop-in buffer pool, similar in functionality to what node uses for buffers.\r\n * @memberof util\r\n * @function\r\n * @param {function(number):Uint8Array} alloc Allocator\r\n * @param {function(number, number):Uint8Array} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {function(number):Uint8Array} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\nvar util = exports;\r\n\r\nvar LongBits = util.LongBits = require(\"./longbits\");\r\n\r\nutil.pool = require(\"./pool\");\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 {*}\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 {*}\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\r\n/**\r\n * Defines the specified properties on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {Object} descriptors Property descriptors\r\n * @returns {undefined}\r\n */\r\nutil.props = function props(target, descriptors) {\r\n Object.keys(descriptors).forEach(function(key) {\r\n util.prop(target, key, descriptors[key]);\r\n });\r\n};\r\n\r\n/**\r\n * Defines the specified property on the specified target. Also adds getters and setters for non-ES5 environments.\r\n * @param {Object} target Target object\r\n * @param {string} key Property name\r\n * @param {Object} descriptor Property descriptor\r\n * @returns {undefined}\r\n */\r\nutil.prop = function prop(target, key, descriptor) {\r\n var ie8 = !-[1,];\r\n var ucKey = key.substring(0, 1).toUpperCase() + key.substring(1);\r\n if (descriptor.get)\r\n target['get' + ucKey] = descriptor.get;\r\n if (descriptor.set)\r\n target['set' + ucKey] = ie8\r\n ? function(value) {\r\n descriptor.set.call(this, value);\r\n this[key] = value;\r\n }\r\n : descriptor.set;\r\n if (ie8) {\r\n if (descriptor.value !== undefined)\r\n target[key] = descriptor.value;\r\n } else\r\n Object.defineProperty(target, key, descriptor);\r\n};\r\n\r\n/**\r\n * An immuable empty array.\r\n * @memberof util\r\n * @type {Array.<*>}\r\n */\r\nutil.emptyArray = Object.freeze([]);\r\n\r\n/**\r\n * An immutable empty object.\r\n * @type {Object}\r\n */\r\nutil.emptyObject = Object.freeze({});\r\n","\"use strict\";\r\nmodule.exports = Writer;\r\n\r\nWriter.BufferWriter = BufferWriter;\r\n\r\nvar util = require(29),\r\n ieee754 = require(1);\r\nvar LongBits = util.LongBits,\r\n ArrayImpl = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\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 * @param {State} next Next state entry\r\n * @private\r\n * @ignore\r\n */\r\nfunction State(writer, next) {\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\n * Next state.\r\n * @type {?State}\r\n */\r\n this.next = next;\r\n}\r\n\r\nWriter.State = State;\r\n\r\n/**\r\n * Constructs a new writer.\r\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\r\n * @constructor\r\n */\r\nfunction 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 * Linked forked states.\r\n * @type {?Object}\r\n */\r\n this.states = null;\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/**\r\n * Creates a new writer.\r\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\r\n */\r\nWriter.create = function create() {\r\n return new (util.Buffer && BufferWriter || Writer);\r\n};\r\n\r\n/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nWriter.alloc = function alloc(size) {\r\n return new ArrayImpl(size);\r\n};\r\n\r\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\r\nif (ArrayImpl !== Array)\r\n Writer.alloc = util.pool(Writer.alloc, ArrayImpl.prototype.subarray || ArrayImpl.prototype.slice);\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 value < 128\r\n ? this.push(writeByte, 1, value)\r\n : this.push(writeVarint32,\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) {\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 while (val.lo > 127) {\r\n buf[pos++] = val.lo & 127 | 128;\r\n val.lo = val.lo >>> 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 write_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;\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\nvar writeFloat = typeof Float32Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f32 = new Float32Array(1),\r\n f8b = new Uint8Array(f32.buffer);\r\n f32[0] = -0;\r\n return f8b[3] // already le?\r\n ? function writeFloat_f32(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos ] = f8b[3];\r\n }\r\n : function writeFloat_f32_le(buf, pos, val) {\r\n f32[0] = val;\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeFloat_ieee754(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\nvar writeDouble = typeof Float64Array !== 'undefined'\r\n ? (function() { // eslint-disable-line wrap-iife\r\n var f64 = new Float64Array(1),\r\n f8b = new Uint8Array(f64.buffer);\r\n f64[0] = -0;\r\n return f8b[7] // already le?\r\n ? function writeDouble_f64(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[0];\r\n buf[pos++] = f8b[1];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[6];\r\n buf[pos ] = f8b[7];\r\n }\r\n : function writeDouble_f64_le(buf, pos, val) {\r\n f64[0] = val;\r\n buf[pos++] = f8b[7];\r\n buf[pos++] = f8b[6];\r\n buf[pos++] = f8b[5];\r\n buf[pos++] = f8b[4];\r\n buf[pos++] = f8b[3];\r\n buf[pos++] = f8b[2];\r\n buf[pos++] = f8b[1];\r\n buf[pos ] = f8b[0];\r\n };\r\n })()\r\n : function writeDouble_ieee754(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 = ArrayImpl.prototype.set\r\n ? function writeBytes_set(buf, pos, val) {\r\n buf.set(val, pos);\r\n }\r\n : function 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#}, {@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.states = new State(this, this.states);\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.states) {\r\n this.head = this.states.head;\r\n this.tail = this.states.tail;\r\n this.len = this.states.len;\r\n this.states = this.states.next;\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 as a tag 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 = this.constructor.alloc(this.len);\r\n this.reset();\r\n var pos = 0;\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/**\r\n * Allocates a buffer of the specified size.\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\nBufferWriter.alloc = function alloc_buffer(size) {\r\n BufferWriter.alloc = util.Buffer.allocUnsafe\r\n ? util.Buffer.allocUnsafe\r\n : function allocUnsafeNew(size) { return new util.Buffer(size); };\r\n return BufferWriter.alloc(size);\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\nif (typeof Float32Array === 'undefined') // f32 is faster (node 6.9.1)\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\nif (typeof Float64Array === 'undefined') // f64 is faster (node 6.9.1)\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 // This could probably be optimized just like writeStringBuffer, but most real use cases won't benefit much.\r\n}\r\n\r\nif (!(ArrayImpl.prototype.set && util.Buffer && util.Buffer.prototype.set)) // set is faster (node 6.9.1)\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\nvar writeStringBuffer = (function() { // eslint-disable-line wrap-iife\r\n return util.Buffer && util.Buffer.prototype.utf8Write // around forever, but not present in browser buffer\r\n ? function writeString_buffer_utf8Write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.utf8Write(val, pos);\r\n }\r\n : function writeString_buffer_write(buf, pos, val) {\r\n if (val.length < 40)\r\n writeString(buf, pos, val);\r\n else\r\n buf.write(val, pos);\r\n };\r\n // Note that the plain JS encoder is faster for short strings, probably because of redundant assertions.\r\n // For a raw utf8Write, the breaking point is about 20 characters, for write it is around 40 characters.\r\n // Unfortunately, this does not translate 1:1 to real use cases, hence the common \"good enough\" limit of 40.\r\n})();\r\n\r\n/**\r\n * @override\r\n */\r\nBufferWriterPrototype.string = function write_string_buffer(value) {\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","\"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 and calls the callback.\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 {undefined}\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);\r\n}\r\n// function load(filename:string, root:Root, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\r\n * @name load\r\n * @function\r\n * @param {string|string[]} filename One or multiple files to load\r\n * @param {function(?Error, Root=)} callback Callback function\r\n * @returns {undefined}\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 2\r\n */\r\n// function load(filename:string, callback:function):undefined\r\n\r\n/**\r\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\r\n * @name load\r\n * @function\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 * @returns {Promise} Promise\r\n * @throws {TypeError} If arguments are invalid\r\n * @variation 3\r\n */\r\n// function load(filename:string, [root:Root]):Promise\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.codegen = require(\"./codegen\");\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.rpc = require(\"./rpc\");\r\nprotobuf.util = require(\"./util\");\r\n\r\n// Be nice to AMD\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 }\r\n return protobuf;\r\n });\r\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/scripts/rpc-test.js b/examples/streaming-rpc.js similarity index 73% rename from scripts/rpc-test.js rename to examples/streaming-rpc.js index 713af0d2c..edc6ddf85 100644 --- a/scripts/rpc-test.js +++ b/examples/streaming-rpc.js @@ -35,7 +35,17 @@ var Greeter = root.lookup("Greeter"), Hello = root.lookup("Hello"), World = root.lookup("World"); +var ended = false; + +// Implement: Stream-aware RPC implementation function rpcImpl(method, requestData, callback) { + if (ended) + return; + if (!requestData) { + console.log("rpc ended client-side."); + ended = true; + return; + } setTimeout(function() { try { // @@ -63,12 +73,14 @@ greeter.on("error", function(err, method) { console.log("error:", err); }); -greeter.sayHello({ name: 'node' }); -greeter.sayHello({ name: 'protobuf' }); -greeter.sayHello({ name: 'paralin' }); +greeter.sayHello({ name: 'protocol' }); +greeter.sayHello({ name: 'buffers' }); +greeter.sayHello({ name: 'for' }); setTimeout(function() { greeter.end(); - greeter.sayHello({ name: 'dcode' }); // does nothing + // ^ Signals rpcImpl that the service has been ended client-side by calling it with a null buffer. + // Likewise, rpcImpl can end the stream by calling its callback with an explicit null buffer. + + greeter.sayHello({ name: 'javascript' }); // does nothing }, 1000); -// Likewise, the RPC impl can end the stream by calling its callback with an explicit null message diff --git a/src/rpc/service.js b/src/rpc/service.js index a19f680e9..e1f52cf3c 100644 --- a/src/rpc/service.js +++ b/src/rpc/service.js @@ -15,8 +15,8 @@ function Service(rpcImpl) { EventEmitter.call(this); /** - * RPC implementation. - * @type {RPCImpl} + * RPC implementation. Becomes `null` when the service is ended. + * @type {?RPCImpl} */ this.$rpc = rpcImpl; } @@ -27,8 +27,15 @@ ServicePrototype.constructor = Service; /** * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. * @returns {rpc.Service} `this` */ -ServicePrototype.end = function end() { - return this.emit('end').off(); +ServicePrototype.end = function end(endedByRPC) { + if (this.$rpc) { + if (!endedByRPC) // signal end to rpcImpl + this.$rpc(null, null, null); + this.$rpc = null; + this.emit('end').off(); + } + return this; }; diff --git a/src/service.js b/src/service.js index 1951fdadf..49258a055 100644 --- a/src/service.js +++ b/src/service.js @@ -162,6 +162,8 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel this.getMethodsArray().forEach(function(method) { var lcName = method.name.substring(0, 1).toLowerCase() + method.name.substring(1); rpcService[lcName] = function(request, callback) { + if (!rpcService.$rpc) // already ended? + return; method.resolve(); var requestData; try { @@ -178,7 +180,7 @@ ServicePrototype.create = function create(rpcImpl, requestDelimited, responseDel return callback ? callback(err) : undefined; } if (responseData === null) { - rpcService.emit('end', method); + rpcService.end(/* endedByRPC */ true); return undefined; } var response; diff --git a/src/util/eventemitter.js b/src/util/eventemitter.js index 18fb0f71c..3751069cb 100644 --- a/src/util/eventemitter.js +++ b/src/util/eventemitter.js @@ -60,7 +60,7 @@ EventEmitterPrototype.off = function off(evt, fn) { }; /** - * Emits an event. + * Emits an event by calling its listeners with the specified arguments. * @param {string} evt Event name * @param {...*} args Arguments * @returns {util.EventEmitter} `this`