protobufjs
Advanced tools
Comparing version 6.4.1 to 6.4.3
@@ -0,1 +1,19 @@ | ||
# [6.4.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.2) | ||
## Fixed | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c2c39fc7cec5634ecd1fbaebbe199bf097269097) Fixed invalid definition of Field#packed property, also introduced decoder.compat mode (packed fields, on by default)<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/11fb1a66ae31af675d0d9ce0240cd8e920ae75e7) Always decode packed/non-packed based on wire format only, see [#602](https://github.com/dcodeIO/protobuf.js/issues/602)<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c9a61e574f5a2b06f6b15b14c0c0ff56f8381d1f) Use full library for JSON modules and runtime dependency for static modules, fixes [#621](https://github.com/dcodeIO/protobuf.js/issues/621)<br /> | ||
## CLI | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e88d13ca7ee971451b57d056f747215f37dfd3d7) Additional workarounds for on demand CLI dependencies, see [#618](https://github.com/dcodeIO/protobuf.js/issues/618)<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/44f6357557ab3d881310024342bcc1e0d336a20c) Revised automatic setup of cli dependencies, see [#618](https://github.com/dcodeIO/protobuf.js/issues/618)<br /> | ||
## Other | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e027a3c7855368837e477ce074ac65f191bf774a) Removed Android 4.0 test (no longer supported by sauce)<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8ba3c5efd182bc80fc36f9d5fe5e2b615b358236) Removed some unused utility, slightly more efficient codegen, additional comments<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f22a34a071753bca416732ec4d01892263f543fb) Updated tests for new package.json layout<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f22a34a071753bca416732ec4d01892263f543fb) Added break/continue label support to codegen<br /> | ||
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f2ffa0731aea7c431c59e452e0f74247d815a352) Updated dependencies, rebuilt dist files and changed logo to use an absolute url<br /> | ||
# [6.4.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.1) | ||
@@ -2,0 +20,0 @@ |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var path = require("path"), | ||
@@ -6,9 +7,11 @@ fs = require("fs"), | ||
var minimist = util.require("minimist", pkg.devDependencies.minimist), | ||
chalk = util.require("chalk", pkg.devDependencies.chalk), | ||
glob = util.require("glob", pkg.devDependencies.glob); | ||
util.setup(); | ||
var protobuf = require(".."), | ||
targets = util.requireAll("./targets"); | ||
minimist = require("minimist"), | ||
chalk = require("chalk"), | ||
glob = require("glob"); | ||
var targets = util.requireAll("./targets"); | ||
/** | ||
@@ -15,0 +18,0 @@ * Runs pbjs programmatically. |
@@ -1,16 +0,15 @@ | ||
var path = require("path"), | ||
"use strict"; | ||
var child_process = require("child_process"), | ||
path = require("path"), | ||
fs = require("fs"), | ||
pkg = require(path.join(__dirname, "..", "package.json")), | ||
util = require("./util"); | ||
var child_process = require("child_process"); | ||
var minimist = util.require("minimist", pkg.devDependencies.minimist), | ||
chalk = util.require("chalk", pkg.devDependencies.chalk), | ||
glob = util.require("glob", pkg.devDependencies.glob), | ||
tmp = util.require("tmp", pkg.devDependencies.tmp); | ||
util.setup(); | ||
var jsdoc = util.require("jsdoc/package.json", pkg.devDependencies.jsdoc); | ||
var minimist = require("minimist"), | ||
chalk = require("chalk"), | ||
glob = require("glob"), | ||
tmp = require("tmp"); | ||
var protobuf = require(".."); | ||
/** | ||
@@ -17,0 +16,0 @@ * Runs pbts programmatically. |
@@ -22,3 +22,3 @@ "use strict"; | ||
try { | ||
output = util.wrap(output, options); | ||
output = util.wrap(output, protobuf.util.merge({ dependency: "protobufjs/runtime" }, options)); | ||
} catch (e) { | ||
@@ -25,0 +25,0 @@ callback(e); |
@@ -5,6 +5,5 @@ "use strict"; | ||
var protobuf = require("../.."), | ||
cliUtil = require("../util"); | ||
cliUtil = require("../util"), | ||
UglifyJS = require("uglify-js"); | ||
var UglifyJS = cliUtil.require("uglify-js", require(require("path").join(__dirname, "..", "..", "package.json")).devDependencies["uglify-js"]); | ||
var Type = protobuf.Type, | ||
@@ -11,0 +10,0 @@ Service = protobuf.Service, |
@@ -0,4 +1,6 @@ | ||
"use strict"; | ||
var fs = require("fs"), | ||
path = require("path"), | ||
child_process = require("child_process"); | ||
child_process = require("child_process"), | ||
Module = require("module"); | ||
@@ -72,21 +74,28 @@ var protobuf = require(".."); | ||
exports.require = function(name, version) { | ||
var sub = ""; | ||
var p = name.indexOf("/"); | ||
if (p > -1) { | ||
sub = name.substring(p); | ||
name = name.substring(0, p); | ||
exports.setup = function() { | ||
// this one is important. without it, this folder won't be searched anymore. | ||
try { fs.mkdirSync(path.join(__dirname, "node_modules")); } catch (e) {} | ||
// find out which modules are missing | ||
var pkg = require(path.join(__dirname, "..", "package.json")); | ||
var install = []; | ||
pkg.cliDependencies.forEach(function(name) { | ||
try { | ||
require.resolve(name + "/package.json"); // jsdoc has no main file | ||
} catch (e) { | ||
var version = pkg.dependencies[name] || pkg.devDependencies[name]; | ||
install.push(version ? name + "@" + version : name); | ||
} | ||
}); | ||
if (!install.length) { | ||
try { fs.rmdirSync(path.join(__dirname, "node_modules")); } catch (e) {} | ||
return; | ||
} | ||
var cwd = path.join(__dirname, ".."); | ||
var dir = path.join(cwd, "node_modules", name); | ||
try { | ||
// do not feed the cache | ||
require.resolve(path.join(dir, "package.json")); | ||
} catch (e) { | ||
console.error("installing " + name + "@" + version + " ..."); | ||
child_process.execSync("npm --silent install " + name + "@" + version, { | ||
cwd: cwd | ||
}); | ||
} | ||
return require(name + sub); | ||
// if any are missing, install them. this relies on an empty package.json in cli/. | ||
process.stderr.write("installing CLI dependencies: " + install.join(", ") + "\n"); | ||
child_process.execSync("npm --silent install " + install.join(" "), { | ||
cwd: __dirname, | ||
stdio: "ignore" | ||
}); | ||
}; | ||
@@ -105,2 +114,3 @@ | ||
wrap = wrap.replace(/%ROOT%/g, JSON.stringify(options.root || "default")); | ||
wrap = wrap.replace(/%DEPENDENCY%/g, JSON.stringify(options.dependency || "protobufjs")); | ||
wrap = wrap.replace(/( *)%OUTPUT%/, function($0, $1) { | ||
@@ -107,0 +117,0 @@ return $1.length ? OUTPUT.replace(/^/mg, $1) : OUTPUT; |
"use strict"; | ||
var $protobuf = require("protobufjs/runtime"); | ||
var $protobuf = require(%DEPENDENCY%); | ||
@@ -5,0 +5,0 @@ %OUTPUT% |
@@ -7,3 +7,3 @@ (function(global, factory) { /* global define, require, module */ | ||
/* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) | ||
module.exports = factory(require("protobufjs/runtime")); | ||
module.exports = factory(require(%DEPENDENCY%)); | ||
@@ -10,0 +10,0 @@ })(this, function($protobuf) { |
/*! | ||
* protobuf.js v6.4.1 (c) 2016, Daniel Wirtz | ||
* Compiled Wed, 04 Jan 2017 12:36:42 UTC | ||
* protobuf.js v6.4.2 (c) 2016, Daniel Wirtz | ||
* Compiled Fri, 06 Jan 2017 00:11:13 UTC | ||
* Licensed under the BSD-3-Clause License | ||
* see: https://github.com/dcodeIO/protobuf.js for details | ||
*/ | ||
!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){"use strict";function n(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=n},{}],2:[function(e,t,r){"use strict";var n=r;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,r){for(var n,s=[],o=0,u=0;t<r;){var f=e[t++];switch(u){case 0:s[o++]=i[f>>2],n=(3&f)<<4,u=1;break;case 1:s[o++]=i[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[o++]=i[n|f>>6],s[o++]=i[63&f],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,o=0,f=0;f<e.length;){var a=e.charCodeAt(f++);if(61===a&&o>1)break;if(void 0===(a=s[a]))throw Error(u);switch(o){case 0:n=a,o=1;break;case 1:t[r++]=n<<2|(48&a)>>4,n=a,o=2;break;case 2:t[r++]=(15&n)<<4|(60&a)>>2,n=a,o=3;break;case 3:t[r++]=(3&n)<<6|a,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,t,r){"use strict";function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),h=c;if(l.length){var p=l[l.length-1];s.test(p)?h=++c:f.test(p)&&++h,u.test(p)&&!u.test(n)?(h=++c,d=!0):d&&a.test(p)&&(h=--c,d=!1),o.test(n)&&(h=--c)}for(r=0;r<h;++r)n="\t"+n;return l.push(n),e}function t(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+h.join(", ")+") {\n"+l.join("\n")+"\n}"}function r(t,r){"object"==typeof t&&(r=t,t=void 0);var i=e.str(t);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(e){return r[e]}))}for(var h=[],l=[],c=1,d=!1,p=0;p<arguments.length;)h.push(arguments[p++]);return e.str=t,e.eof=r,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);return r=0,e.replace(/%([djs])/g,function(e,n){var i=t[r++];switch(n){case"j":return JSON.stringify(i);default:return String(i)}})}t.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue);?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,t,r){"use strict";function n(){this.a={}}t.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,t){if(void 0===e)this.a={};else if(void 0===t)this.a[e]=[];else for(var r=this.a[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t,r){"use strict";function n(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=n},{}],6:[function(e,t,r){"use strict";function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,t){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===r.readyState?0===r.status||200===r.status?t(null,r.responseText):t(Error("status "+r.status)):void 0},r.open("GET",e),r.send()}t.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],8:[function(e,t,r){"use strict";var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],10:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(30)),!(t instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=u.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:o});r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n<r.length;++n)r[n]!==t&&delete this[r[n]]}})}),t.ctor=r,i}t.exports=n;var s,o=e(19),u=e(32);n.create=i,n.prototype=o},{19:19,30:30,32:32}],12:[function(e,t,r){"use strict";function n(e,t,r){if(e.resolvedType)return e.resolvedType instanceof s?f("f.enums(s%s,%d,types[%d].values,o)",r,e.typeDefault,t):f("types[%d].convert(s%s,f,o)",t,r);switch(e.type){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":return f("f.longs(s%s,%d,%d,%j,o)",r,e.typeDefault.low,e.typeDefault.high,"u"===e.type.charAt(0));case"bytes":return f("f.bytes(s%s,%j,o)",r,Array.prototype.slice.call(e.typeDefault))}return null}function i(e){var t=e.fieldsArray,r=u.codegen("s","f","o")("if(!o)")("o={}")("var d=f.create(s,this,o)");if(t.length){r("if(d){");var i;t.forEach(function(e,t){var o=u.safeProp(e.resolve().name);e.repeated?(r("if(s%s&&s%s.length){",o,o)("d%s=[]",o)("for(var i=0;i<s%s.length;++i)",o),(i=n(e,t,o+"[i]"))?r("d%s.push(%s)",o,i):r("d%s.push(s%s[i])",o,o),r("}else if(o.defaults||o.arrays)")("d%s=[]",o)):(i=n(e,t,o))?(e.long?r("if(o.defaults||s%s!==undefined&&s%s!==null&&util.longNe(s%s,%d,%d))",o,o,o,e.typeDefault.low,e.typeDefault.high):!e.resolvedType||e.resolvedType instanceof s?r("if(o.defaults||s%s!==undefined&&s%s!==%j)",o,o,e.typeDefault):r("if(o.defaults||s%s!==undefined&&s%s!==null)",o,o),r("d%s=%s",o,i)):r("if(d%s===undefined&&o.defaults)",o)("d%s=%j",o,e.typeDefault)}),r("}")}return r("return d")}t.exports=i;var s=e(16),o=e(13),u=e(32),f=u.codegen.sprintf;u.merge(i,o)},{13:13,16:16,32:32}],13:[function(e,t,r){"use strict";var n=r,i=e(34);n.json={create:function(e,t,r){return e?r.fieldsOnly?{}:i.merge({},e):null},enums:function(e,t,r,n){return void 0===e&&(e=t),n.enums===String&&"number"==typeof e?r[e]:e},longs:function(e,t,r,n,s){return void 0!==e&&null!==e||(e={low:t,high:r}),s.longs===Number?"number"==typeof e?e:i.LongBits.from(e).toNumber(n):s.longs===String?"number"==typeof e?i.Long.fromNumber(e,n).toString():(e=i.Long.fromValue(e),e.unsigned=n,e.toString()):e},bytes:function(e,t,r){if(e){if(!e.length&&!r.defaults)return}else e=t;return r.bytes===String?i.base64.encode(e,0,e.length):r.bytes===Array?Array.prototype.slice.call(e):r.bytes!==i.Buffer||i.Buffer.isBuffer(e)?e:i.Buffer.from(e)}},n.message={create:function(e,t,r){return e?new(t.ctor?t.ctor:t)(r.fieldsOnly?void 0:e):null},enums:function(e,t,r){return"string"==typeof e?r[e]:e},longs:function(e,t,r,n){return"string"==typeof e?i.Long.fromString(e,n):"number"==typeof e?i.Long.fromNumber(e,n):e},bytes:function(e){if(i.Buffer)return i.Buffer.isBuffer(e)?e:i.Buffer.from(e,"base64");if("string"==typeof e){var t=i.newBuffer(i.base64.length(e));return i.base64.decode(e,t,0),t}return e instanceof i.Array?e:new i.Array(e)}}},{34:34}],14:[function(e,t,r){"use strict";function n(e){var t=e.fieldsArray,r=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var n=0;n<t.length;++n){var u=t[n].resolve(),f=u.resolvedType instanceof i?"uint32":u.type,a="m"+o.safeProp(u.name);if(r("case %d:",u.id),u.map){var h=u.resolvedKeyType?"uint32":u.keyType;r("r.skip().pos++")("if(%s===util.emptyObject)",a)("%s={}",a)("var k=r.%s()",h)('if(typeof k==="object")')("k=util.longToHash(k)")("r.pos++"),void 0===s.basic[f]?r("%s[k]=types[%d].decode(r,r.uint32())",a,n):r("%s[k]=r.%s()",a,f)}else u.repeated?(r("if(!(%s&&%s.length))",a,a)("%s=[]",a),u.packed&&void 0!==s.packed[f]&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",a,f)("}else"),void 0===s.basic[f]?r(u.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",a,n):r("%s.push(r.%s())",a,f)):void 0===s.basic[f]?r(u.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",a,n):r("%s=r.%s()",a,f);r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}t.exports=n;var i=e(16),s=e(31),o=e(32)},{16:16,31:31,32:32}],15:[function(e,t,r){"use strict";function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,f=e.oneofsArray,a=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t<i.length;++t){var h=i[t].resolve(),l=h.resolvedType instanceof s?"uint32":h.type,c=o.basic[l];if(r="m"+u.safeProp(h.name),h.map){var d=h.resolvedKeyType?"uint32":h.keyType;a("if(%s&&%s!==util.emptyObject){",r,r)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[d],d),void 0===c?a("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):a(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,l,r),a("}")("}")}else h.repeated?h.packed&&void 0!==o.packed[l]?a("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",l,r)("w.ldelim()",h.id)("}"):(a("if(%s){",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(a,h,t,r+"[i]"):a("w.uint32(%d).%s(%s[i])",(h.id<<3|c)>>>0,l,r),a("}")):h.partOf||(h.required||(h.long?a("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,h.defaultValue.low,h.defaultValue.high):h.bytes?a("if(%s&&%s.length"+(h.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(h.defaultValue)):a("if(%s!==undefined&&%s!==%j)",r,r,h.defaultValue)),void 0===c?n(a,h,t,r):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,r))}for(var t=0;t<f.length;++t){var p=f[t];a("switch(%s){","m"+u.safeProp(p.name));for(var v=p.fieldsArray,y=0;y<v.length;++y){var h=v[y],l=h.resolvedType instanceof s?"uint32":h.type,c=o.basic[l];r="m"+u.safeProp(h.name),a("case%j:",h.name),void 0===c?n(a,h,i.indexOf(h),r):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,r),a("break;")}a("}")}return a("return w")}t.exports=i;var s=e(16),o=e(31),u=e(32)},{16:16,31:31,32:32}],16:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(32);n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{22:22,32:32}],17:[function(e,t,r){"use strict";function n(e,t,r,n,s,o){if(h.isObject(n)?(o=n,n=s=void 0):h.isObject(s)&&(o=s,s=void 0),i.call(this,e,o),!h.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!h.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!h.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}t.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,f=e(16),a=e(31),h=e(32);Object.defineProperties(s,{packed:{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(18)),u.fromJSON(t,r)):new n(t,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type]))if(o||(o=e(30)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&void 0!==this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.defaultValue])),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,t=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,t=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,30:30,31:31,32:32}],18:[function(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(31),f=e(32);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,31:31,32:32}],19:[function(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=n;var i=e(13),s=n.prototype;s.asJSON=function(e){return this.$type.convert(this,i.json,e)},n.from=function(e,t){return this.$type.convert(e,i.message,t)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.convert=function(e,t,r){return this.$type.convert(e,t,r)}},{13:13}],20:[function(e,t,r){"use strict";function n(e,t,r,n,s,o,f){if(u.isObject(s)?(f=s,s=o=void 0):u.isObject(o)&&(f=o,o=void 0),t&&!u.isString(t))throw TypeError("type must be a string");if(!u.isString(r))throw TypeError("requestType must be a string");if(!u.isString(n))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=n,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=n;var i=e(22),s=i.extend(n);n.className="Method";var o=e(30),u=e(32);n.testJSON=function(e){return Boolean(e&&void 0!==e.requestType)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||void 0,requestType:this.requestType,requestStream:this.requestStream||void 0,responseType:this.responseType,responseStream:this.responseStream||void 0,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,30:30,32:32}],21:[function(e,t,r){"use strict";function n(){a||(a=e(30)),h||(h=e(29)),l=[d,a,h,p,i],c="one of "+l.map(function(e){return e.name}).join(", ")}function i(e,t){u.call(this,e,t),this.nested=void 0,this.c=null,this.d=[]}function s(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}function o(e){if(e&&e.length){for(var t={},r=0;r<e.length;++r)t[e[r].name]=e[r].toJSON();return t}}t.exports=i;var u=e(22),f=u.extend(i);i.className="Namespace";var a,h,l,c,d=e(16),p=e(17),v=e(32);Object.defineProperties(f,{nestedArray:{get:function(){return this.c||(this.c=v.toArray(this.nested))}}}),i.testJSON=function(e){return Boolean(e&&!e.fields&&!e.values&&void 0===e.id&&!e.oneof&&!e.methods&&void 0===e.requestType)},i.fromJSON=function(e,t){return new i(e,t.options).addJSON(t.nested)},f.toJSON=function(){return{options:this.options,nested:o(this.nestedArray)}},i.arrayToJSON=o,f.addJSON=function(e){var t=this;return e&&(l||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return t.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(e){return void 0===this.nested?null:this.nested[e]||null},f.getEnum=function(e){if(this.nested&&this.nested[e]instanceof d)return this.nested[e].values;throw Error("no such enum")},f.add=function(e){if(l||n(),!e||l.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof p&&void 0===e.extend)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof i&&e instanceof i)||t instanceof a||t instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,o=0;o<r.length;++o)e.add(r[o]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),s(this)},f.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),s(this)},f.define=function(e,t){v.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var r=this;if(e)for(;e.length>0;){var n=e.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 t&&r.addJSON(t),r},f.resolve=function(){a||(a=e(30)),h||(a=e(29));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof a||t[r]instanceof h)this[t[r].name]=t[r];else{if(!(t[r]instanceof d))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof i?e[t++].resolveAll():e[t++].resolve();return f.resolve.call(this)},f.lookup=function(e,t,r){if("boolean"==typeof t&&(r=t,t=void 0),v.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);return n&&1===e.length&&(!t||n instanceof t)||n instanceof i&&(n=n.lookup(e.slice(1),t,!0))?n:null===this.parent||r?null:this.parent.lookup(e,t)},f.lookupType=function(t){a||(a=e(30));var r=this.lookup(t,a);if(!r)throw Error("no such type");return r},f.lookupService=function(t){h||(h=e(29));var r=this.lookup(t,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(e){var t=this.lookup(e,d);if(!t)throw Error("no such enum");return t.values}},{16:16,17:17,22:22,29:29,30:30,32:32}],22:[function(e,t,r){"use strict";function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1}t.exports=n;var i=e(32);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(26)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(26)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(26)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){if(this.options)return this.options[e]},o.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{26:26,32:32}],23:[function(e,t,r){"use strict";function n(e,t,r){if(Array.isArray(t)||(r=t,t=void 0),s.call(this,e,r),t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=n;var s=e(22),o=s.extend(n);n.className="OneOf";var u=e(17);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return Boolean(e.oneof)},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22}],24:[function(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new O(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function f(){return s.call(this).toLong(!0)}function a(){return s.call(this).toNumber(!0)}function h(){return s.call(this).zzDecode().toLong()}function l(){return s.call(this).zzDecode().toNumber()}function c(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new O(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(){w.Long?(k.int64=o,k.uint64=f,k.sint64=h,k.fixed64=p,k.sfixed64=y):(k.int64=u,k.uint64=a,k.sint64=l,k.fixed64=v,k.sfixed64=g)}t.exports=i;var b,w=e(34),O=w.LongBits,x=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(25)),(i.create=function(e){return w.Buffer.isBuffer(e)?new b(e):new i(e)})(t)}:function(e){return new i(e)};var k=i.prototype;k.h=w.Array.prototype.subarray||w.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},k.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=N(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.h.call(this.buf,t,r)},k.string=function(){var e=this.bytes();return x.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},k.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.i=m,m()},{25:25,34:34}],25:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(24),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(34);o.Buffer&&(s.h=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{24:24,34:34}],26:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new h(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var f,a,h=e(17),l=e(32);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){f.filename=e;var n=f(t,h,r);n.imports&&n.imports.forEach(function(t){ | ||
u(h.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(h.resolvePath(e,t),!0)})}else h.setOptions(t.options).addJSON(t.nested)}catch(e){if(d)throw e;return void s(e)}d||p||s(null,h)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in a&&(e=i)}if(!(h.files.indexOf(e)>-1)){if(h.files.push(e),e in a)return void(d?o(e,a[e]):(++p,setTimeout(function(){--p,o(e,a[e])})));if(d){var u;try{u=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,l.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var h=this;if(!n)return l.asPromise(e,h,t);var d=n===i,p=0;return l.isString(t)&&(t=[t]),t.forEach(function(e){u(h.resolvePath("",e))}),d?h:void(p||s(null,h))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r<t.length;)s(t[r])?t.splice(r,1):++r;if(this.deferred=t,e instanceof h&&void 0!==e.extend&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var n=e.nestedArray;for(r=0;r<n.length;++r)this.e(n[r])}},u.f=function(e){if(e instanceof h){if(void 0!==e.extend&&!e.extensionField){var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,n=0;n<r.length;++n)this.f(r[n])}},{17:17,21:21,32:32,undefined:void 0}],27:[function(e,t,r){"use strict";var n=r;n.Service=e(28)},{28:28}],28:[function(e,t,r){"use strict";function n(e){s.call(this),this.$rpc=e}t.exports=n;var i=e(32),s=i.EventEmitter,o=n.prototype=Object.create(s.prototype);o.constructor=n,o.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{32:32}],29:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}t.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Service";var f=e(20),a=e(32),h=e(27);Object.defineProperties(u,{methodsArray:{get:function(){return this.j||(this.j=a.toArray(this.methods))}}}),n.testJSON=function(e){return Boolean(e&&e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(f.fromJSON(e,t.methods[e]))}),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||void 0}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof f?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof f){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,t,r){var n=new h.Service(e);return this.methodsArray.forEach(function(i){n[a.lcFirst(i.name)]=function(s,o){if(n.$rpc){if(!s)throw TypeError("request must not be null");i.resolve();var u;try{u=(t?i.resolvedRequestType.encodeDelimited(s):i.resolvedRequestType.encode(s)).finish()}catch(e){return void("function"==typeof setImmediate?setImmediate:setTimeout)(function(){o(e)})}e(i,u,function(e,t){if(e)return n.emit("error",e,i),o?o(e):void 0;if(null===t)return void n.end(!0);var s;try{s=r?i.resolvedResponseType.decodeDelimited(t):i.resolvedResponseType.decode(t)}catch(e){return n.emit("error",e,i),o?o("error",e):void 0}return n.emit("data",s,i),o?o(null,s):void 0})}}}),n}},{20:20,21:21,27:27,32:32}],30:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.k=null,this.g=null,this.l=null,this.m=null,this.n=null}function i(e){return e.k=e.g=e.m=e.n=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var f=e(16),a=e(23),h=e(17),l=e(29),c=e(11),d=e(19),p=e(24),v=e(36),y=e(32),g=e(15),m=e(14),b=e(35),w=e(12);Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=y.toArray(this.fields))}},repeatedFieldsArray:{get:function(){return this.l||(this.l=this.fieldsArray.filter(function(e){return e.repeated}))}},oneofsArray:{get:function(){return this.m||(this.m=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof d))throw TypeError("ctor must be a Message constructor");e.from||(e.from=d.from),this.n=e}}}),n.testJSON=function(e){return Boolean(e&&e.fields)};var O=[f,n,h,l];n.fromJSON=function(e,t){var r=new n(e,t.options);return r.extensions=t.extensions,r.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){r.add(h.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){r.add(a.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var n=t.nested[e],i=0;i<O.length;++i)if(O[i].testJSON(n))return void r.add(O[i].fromJSON(e,n));throw Error("invalid nested object in "+r+": "+e)}),t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:void 0,reserved:this.reserved&&this.reserved.length?this.reserved:void 0,group:this.group||void 0,nested:e&&e.nested||void 0}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof h&&void 0===e.extend){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&void 0===e.extend){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.from=function(e,t){return this.convert(e,w.message,t)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=g(this).eof(e+"$encode",{Writer:v,types:t,util:y}),this.decode=m(this).eof(e+"$decode",{Reader:p,types:t,util:y}),this.verify=b(this).eof(e+"$verify",{types:t,util:y}),this.convert=w(this).eof(e+"$convert",{types:t,util:y}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e=e instanceof p?e:p.create(e),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.convert=function(e,t,r){return this.setup().convert(e,t,r)}},{11:11,12:12,14:14,15:15,16:16,17:17,19:19,21:21,23:23,24:24,29:29,32:32,35:35,36:36}],31:[function(e,t,r){"use strict";function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(32),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes","message"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{32:32}],32:[function(e,t,r){"use strict";var n=t.exports=e(34);n.asPromise=e(1),n.codegen=e(3),n.EventEmitter=e(4),n.extend=e(5),n.fetch=e(6),n.path=e(8),n.fs=n.inquire("fs"),n.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},n.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},n.newBuffer=function(e){return e=e||0,n.Buffer?n.Buffer.allocUnsafe(e):new("undefined"!=typeof Uint8Array?Uint8Array:Array)(e)}},{1:1,3:3,34:34,4:4,5:5,6:6,8:8}],33:[function(e,t,r){"use strict";function n(e,t){this.lo=e,this.hi=t}t.exports=n;var i=e(34),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var u=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var f=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((f.call(e,0)|f.call(e,1)<<8|f.call(e,2)<<16|f.call(e,3)<<24)>>>0,(f.call(e,4)|f.call(e,5)<<8|f.call(e,6)<<16|f.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{34:34}],34:[function(e,t,r){(function(t){"use strict";var n=r;n.base64=e(2),n.inquire=e(7),n.utf8=e(10),n.pool=e(9),n.LongBits=e(33),n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node),n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=t.dcodeIO&&t.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var i=n.LongBits.from(e);return i.lo!==t||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(e,t){if(e.length===t.length)for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!0;return!1},n.merge=function(e,t,r){if(t)for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,33:33,7:7,9:9}],35:[function(e,t,r){"use strict";function n(e,t){return e.fullName.substring(1)+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof u){e("switch(%s){",i)("default:")("return%j",n(t,"enum value"));for(var s=f.toArray(t.resolvedType.values),o=0;o<s.length;++o)e("case %d:",s[o]);e("break")("}")}else e("var e;")("if(e=types[%d].verify(%s))",r,i)("return e");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",n(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",n(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",n(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",n(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",n(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",n(t,"buffer"))}}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9]\\d*)$/.test(%s))",r)("return%j",n(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9]\\d*))$/.test(%s))",r)("return%j",n(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",r)("return%j",n(t,"boolean key"))}}function o(e){var t=e.fieldsArray;if(!t.length)return f.codegen()("return null");for(var r=f.codegen("m"),o=0;o<t.length;++o){var a=t[o].resolve(),h="m"+f.safeProp(a.name);a.map?(r("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",n(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),s(r,a,"k[i]"),i(r,a,o,h+"[k[i]]"),r("}")("}")):a.repeated?(r("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",n(a,"array"))("for(var i=0;i<%s.length;++i){",h),i(r,a,o,h+"[i]"),r("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof u?r("if(%s!==undefined){",h):r("if(%s!==undefined&&%s!==null){",h,h)),i(r,a,o,h),a.required||r("}"))}return r("return null")}t.exports=o;var u=e(16),f=e(32)},{16:16,32:32}],36:[function(e,t,r){"use strict";function n(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var l,c=e(34),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=e(37)),(o.create=function(){return new l})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(f,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(a,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(a,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(a,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(h,4,e>>>0)},y.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(g,4,e)};var m="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(m,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};y.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.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 n(i,0,0),this.len=0),this},y.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{34:34,37:37}],37:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?f.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(36),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(34),f=u.utf8,a=u.Buffer;n.alloc=function(e){return(n.alloc=a.allocUnsafe)(e)};var h=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=a.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(h,t,e),this},o.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{34:34,36:36}],38:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.i()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e("./tokenize"),o.parse=e("./parse"),o.common=e("./common")}catch(e){}o.Writer=e(36),o.BufferWriter=e(37),o.Reader=e(24),o.BufferReader=e(25),o.encoder=e(15),o.decoder=e(14),o.verifier=e(35),o.converter=e(12),o.ReflectionObject=e(22),o.Namespace=e(21),o.Root=e(26),o.Enum=e(16),o.Type=e(30),o.Field=e(17),o.OneOf=e(23),o.MapField=e(18),o.Service=e(29),o.Method=e(20),o.Class=e(11),o.Message=e(19),o.types=e(31),o.rpc=e(27),o.util=e(32),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,29:29,30:30,31:31,32:32,35:35,36:36,37:37,undefined:void 0}]},{},[38]); | ||
!function t(e,r,n){function i(o,u){if(!r[o]){if(!e[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};e[o][0].call(h.exports,function(t){var r=e[o][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(t){if(i)if(i=!1,t)s(t);else{for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);n.apply(null,e)}});try{t.apply(e||this,r)}catch(t){i&&(i=!1,s(t))}})}e.exports=n},{}],2:[function(t,e,r){"use strict";var n=r;n.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(t,e,r){for(var n,s=[],o=0,u=0;e<r;){var f=t[e++];switch(u){case 0:s[o++]=i[f>>2],n=(3&f)<<4,u=1;break;case 1:s[o++]=i[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[o++]=i[n|f>>6],s[o++]=i[63&f],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(t,e,r){for(var n,i=r,o=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&o>1)break;if(void 0===(a=s[a]))throw Error(u);switch(o){case 0:n=a,o=1;break;case 1:e[r++]=n<<2|(48&a)>>4,n=a,o=2;break;case 2:e[r++]=(15&n)<<4|(60&a)>>2,n=a,o=3;break;case 3:e[r++]=(3&n)<<6|a,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],3:[function(t,e,r){"use strict";function n(){function t(){for(var e=[],r=0;r<arguments.length;)e.push(arguments[r++]);var n=i.apply(null,e),h=c;if(l.length){var p=l[l.length-1];s.test(p)?h=++c:f.test(p)&&++h,u.test(p)&&!u.test(n)?(h=++c,d=!0):d&&a.test(p)&&(h=--c,d=!1),o.test(n)&&(h=--c)}for(r=0;r<h;++r)n="\t"+n;return l.push(n),t}function e(t){return"function "+(t?t.replace(/[^\w_$]/g,"_"):"")+"("+h.join(", ")+") {\n"+l.join("\n")+"\n}"}function r(e,r){"object"==typeof e&&(r=e,e=void 0);var i=t.str(e);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return r[t]}))}for(var h=[],l=[],c=1,d=!1,p=0;p<arguments.length;)h.push(arguments[p++]);return t.str=e,t.eof=r,t}function i(t){for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);return r=0,t.replace(/%([djs])/g,function(t,n){var i=e[r++];switch(n){case"j":return JSON.stringify(i);default:return String(i)}})}e.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue);?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(t){}n.verbose=!1},{}],4:[function(t,e,r){"use strict";function n(){this.a={}}e.exports=n;var i=n.prototype;i.on=function(t,e,r){return(this.a[t]||(this.a[t]=[])).push({fn:e,ctx:r||this}),this},i.off=function(t,e){if(void 0===t)this.a={};else if(void 0===e)this.a[t]=[];else for(var r=this.a[t],n=0;n<r.length;)r[n].fn===e?r.splice(n,1):++n;return this},i.emit=function(t){var e=this.a[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},{}],5:[function(t,e,r){"use strict";function n(t){for(var e=Object.keys(this),r=0;r<e.length;++r)t[e[r]]=this[e[r]];var n=t.prototype=Object.create(this.prototype);return n.constructor=t,n}e.exports=n},{}],6:[function(t,e,r){"use strict";function n(t,e){return e?u&&u.readFile?u.readFile(t,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(t,e):e(r,n)}):i(t,e):s(n,this,t)}function i(t,e){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===r.readyState?0===r.status||200===r.status?e(null,r.responseText):e(Error("status "+r.status)):void 0},r.open("GET",t),r.send()}e.exports=n;var s=t(1),o=t(7),u=o("fs")},{1:1,7:7}],7:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},{}],8:[function(t,e,r){"use strict";var n=r,i=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},s=n.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=t.split("/"),r=i(t),n="";r&&(n=e.shift()+"/");for(var s=0;s<e.length;)".."===e[s]?s>0?e.splice(--s,2):r?e.splice(s,1):++s:"."===e[s]?e.splice(s,1):++s;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=s(e)),i(e)?e:(r||(t=s(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?s(t+"/"+e):e)}},{}],9:[function(t,e,r){"use strict";function n(t,e,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return t(r);o+r>n&&(s=t(n),o=0);var u=e.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}e.exports=n},{}],10:[function(t,e,r){"use strict";var n=r;n.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},n.read=function(t,e,r){var n=r-e;if(n<1)return"";for(var i,s=null,o=[],u=0;e<r;)i=t[e++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(t,e,r){for(var n,i,s=r,o=0;o<t.length;++o)n=t.charCodeAt(o),n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-s}},{}],11:[function(t,e,r){"use strict";function n(t){return i(t)}function i(e,r){if(s||(s=t(30)),!(e instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=u.codegen("p")("return ctor.call(this,p)").eof(e.name,{ctor:o});r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=e,i.$type=e,e.fieldsArray.forEach(function(t){i[t.name]=Array.isArray(t.resolve().defaultValue)?u.emptyArray:u.isObject(t.defaultValue)&&!t.long?u.emptyObject:t.defaultValue}),e.oneofsArray.forEach(function(t){Object.defineProperty(i,t.resolve().name,{get:function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(t.oneof.indexOf(e[r])>-1)return e[r]},set:function(e){for(var r=t.oneof,n=0;n<r.length;++n)r[n]!==e&&delete this[r[n]]}})}),e.ctor=r,i}e.exports=n;var s,o=t(19),u=t(32);n.create=i,n.prototype=o},{19:19,30:30,32:32}],12:[function(t,e,r){"use strict";function n(t,e,r){if(t.resolvedType)return t.resolvedType instanceof s?f("f.enums(s%s,%d,types[%d].values,o)",r,t.typeDefault,e):f("types[%d].convert(s%s,f,o)",e,r);switch(t.type){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":return f("f.longs(s%s,%d,%d,%j,o)",r,t.typeDefault.low,t.typeDefault.high,"u"===t.type.charAt(0));case"bytes":return f("f.bytes(s%s,%j,o)",r,Array.prototype.slice.call(t.typeDefault))}return null}function i(t){var e=t.fieldsArray,r=u.codegen("s","f","o")("if(!o)")("o={}")("var d=f.create(s,this,o)");if(e.length){r("if(d){");var i;e.forEach(function(t,e){var o=t.resolve().b;t.repeated?(r("if(s%s&&s%s.length){",o,o)("d%s=[]",o)("for(var i=0;i<s%s.length;++i)",o),(i=n(t,e,o+"[i]"))?r("d%s.push(%s)",o,i):r("d%s.push(s%s[i])",o,o),r("}else if(o.defaults||o.arrays)")("d%s=[]",o)):(i=n(t,e,o))?(t.long?r("if(o.defaults||s%s!==undefined&&s%s!==null&&util.longNe(s%s,%d,%d))",o,o,o,t.typeDefault.low,t.typeDefault.high):!t.resolvedType||t.resolvedType instanceof s?r("if(o.defaults||s%s!==undefined&&s%s!==%j)",o,o,t.typeDefault):r("if(o.defaults||s%s!==undefined&&s%s!==null)",o,o),r("d%s=%s",o,i)):r("if(d%s===undefined&&o.defaults)",o)("d%s=%j",o,t.typeDefault)}),r("}")}return r("return d")}e.exports=i;var s=t(16),o=t(13),u=t(32),f=u.codegen.sprintf;u.merge(i,o)},{13:13,16:16,32:32}],13:[function(t,e,r){"use strict";var n=r,i=t(34);n.json={create:function(t,e,r){return t?r.fieldsOnly?{}:i.merge({},t):null},enums:function(t,e,r,n){return void 0===t&&(t=e),n.enums===String&&"number"==typeof t?r[t]:t},longs:function(t,e,r,n,s){return void 0!==t&&null!==t||(t={low:e,high:r}),s.longs===Number?"number"==typeof t?t:i.LongBits.from(t).toNumber(n):s.longs===String?"number"==typeof t?i.Long.fromNumber(t,n).toString():(t=i.Long.fromValue(t),t.unsigned=n,t.toString()):t},bytes:function(t,e,r){if(t){if(!t.length&&!r.defaults)return}else t=e;return r.bytes===String?i.base64.encode(t,0,t.length):r.bytes===Array?Array.prototype.slice.call(t):r.bytes!==i.Buffer||i.Buffer.isBuffer(t)?t:i.Buffer.from(t)}},n.message={create:function(t,e,r){return t?new(e.ctor?e.ctor:e)(r.fieldsOnly?void 0:t):null},enums:function(t,e,r){return"string"==typeof t?r[t]:t},longs:function(t,e,r,n){return"string"==typeof t?i.Long.fromString(t,n):"number"==typeof t?i.Long.fromNumber(t,n):t},bytes:function(t){if(i.Buffer)return i.Buffer.isBuffer(t)?t:i.Buffer.from(t,"base64");if("string"==typeof t){var e=i.newBuffer(i.base64.length(t));return i.base64.decode(t,e,0),e}return t instanceof i.Array?t:new i.Array(t)}}},{34:34}],14:[function(t,e,r){"use strict";function n(t){var e=t.fieldsArray,r=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");t.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var u=0;u<e.length;++u){var f=e[u].resolve(),a=f.resolvedType instanceof i?"uint32":f.type,h="m"+f.b;if(r("case %d:",f.id),f.map){var l=f.resolvedKeyType?"uint32":f.keyType;r("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",l)('if(typeof k==="object")')("k=util.longToHash(k)")("r.pos++"),void 0===s.basic[a]?r("%s[k]=types[%d].decode(r,r.uint32())",h,u):r("%s[k]=r.%s()",h,a)}else f.repeated?(r("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||f.packed)&&void 0!==s.packed[a]&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,a)("}else"),void 0===s.basic[a]?r(f.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,u):r("%s.push(r.%s())",h,a)):void 0===s.basic[a]?r(f.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,u):r("%s=r.%s()",h,a);r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}e.exports=n,n.compat=!0;var i=t(16),s=t(31),o=t(32)},{16:16,31:31,32:32}],15:[function(t,e,r){"use strict";function n(t,e,r,n){return e.resolvedType.group?t("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function i(t){for(var e,r,i=t.fieldsArray,f=t.oneofsArray,a=u.codegen("m","w")("if(!w)")("w=Writer.create()"),e=0;e<i.length;++e){var h=i[e].resolve(),l=h.resolvedType instanceof s?"uint32":h.type,c=o.basic[l];if(r="m"+h.b,h.map){var d=h.resolvedKeyType?"uint32":h.keyType;a("if(%s&&%s!==util.emptyObject){",r,r)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[d],d),void 0===c?a("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",e,r):a(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,l,r),a("}")("}")}else h.repeated?h.packed&&void 0!==o.packed[l]?a("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",l,r)("w.ldelim()",h.id)("}"):(a("if(%s){",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(a,h,e,r+"[i]"):a("w.uint32(%d).%s(%s[i])",(h.id<<3|c)>>>0,l,r),a("}")):h.partOf||(h.required||(h.long?a("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,h.defaultValue.low,h.defaultValue.high):h.bytes?a("if(%s&&%s.length"+(h.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(h.defaultValue)):a("if(%s!==undefined&&%s!==%j)",r,r,h.defaultValue)),void 0===c?n(a,h,e,r):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,r))}for(var e=0;e<f.length;++e){var p=f[e];a("switch(%s){","m"+p.b);for(var v=p.fieldsArray,y=0;y<v.length;++y){var h=v[y],l=h.resolvedType instanceof s?"uint32":h.type,c=o.basic[l];r="m"+h.b,a("case%j:",h.name),void 0===c?n(a,h,i.indexOf(h),r):a("w.uint32(%d).%s(%s)",(h.id<<3|c)>>>0,l,r),a("break")}a("}")}return a("return w")}e.exports=i;var s=t(16),o=t(31),u=t(32)},{16:16,31:31,32:32}],16:[function(t,e,r){"use strict";function n(t,e,r){i.call(this,t,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(e||{}).forEach(function(t){var r;"number"==typeof e[t]?r=e[t]:(r=parseInt(t,10),t=e[t]),n.valuesById[n.values[t]=r]=t})}e.exports=n;var i=t(22),s=i.extend(n);n.className="Enum";var o=t(32);n.testJSON=function(t){return Boolean(t&&t.values)},n.fromJSON=function(t,e){return new n(t,e.values,e.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(t,e){if(!o.isString(t))throw TypeError("name must be a string");if(!o.isInteger(e))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(void 0!==this.valuesById[e])throw Error("duplicate id "+e+" in "+this);return this.valuesById[this.values[t]=e]=t,this},s.remove=function(t){if(!o.isString(t))throw TypeError("name must be a string");var e=this.values[t];if(void 0===e)throw Error("'"+t+"' is not a name of "+this);return delete this.valuesById[e],delete this.values[t],this}},{22:22,32:32}],17:[function(t,e,r){"use strict";function n(t,e,r,n,s,o){if(h.isObject(n)?(o=n,n=s=void 0):h.isObject(s)&&(o=s,s=void 0),i.call(this,t,o),!h.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!h.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!h.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=e,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null,this.b=h.safeProp(this.name)}e.exports=n;var i=t(22),s=i.extend(n);n.className="Field";var o,u,f=t(16),a=t(31),h=t(32);Object.defineProperty(s,"packed",{get:function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}),s.setOption=function(t,e,r){return"packed"===t&&(this.c=null),i.prototype.setOption.call(this,t,e,r)},n.testJSON=function(t){return Boolean(t&&void 0!==t.id)},n.fromJSON=function(e,r){return void 0!==r.keyType?(u||(u=t(18)),u.fromJSON(e,r)):new n(e,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type]))if(o||(o=t(30)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&void 0!==this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.defaultValue])),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,e=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,e=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,30:30,31:31,32:32}],18:[function(t,e,r){"use strict";function n(t,e,r,n,s){if(i.call(this,t,e,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}e.exports=n;var i=t(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=t(31),f=t(32);n.testJSON=function(t){return i.testJSON(t)&&void 0!==t.keyType},n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,31:31,32:32}],19:[function(t,e,r){"use strict";function n(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}e.exports=n;var i=t(13),s=n.prototype;s.asJSON=function(t){return this.$type.convert(this,i.json,t)},n.from=function(t,e){return this.$type.convert(t,i.message,e)},n.encode=function(t,e){return this.$type.encode(t,e)},n.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.convert=function(t,e,r){return this.$type.convert(t,e,r)}},{13:13}],20:[function(t,e,r){"use strict";function n(t,e,r,n,s,o,f){if(u.isObject(s)?(f=s,s=o=void 0):u.isObject(o)&&(f=o,o=void 0),e&&!u.isString(e))throw TypeError("type must be a string");if(!u.isString(r))throw TypeError("requestType must be a string");if(!u.isString(n))throw TypeError("responseType must be a string");i.call(this,t,f),this.type=e||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=n,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}e.exports=n;var i=t(22),s=i.extend(n);n.className="Method";var o=t(30),u=t(32);n.testJSON=function(t){return Boolean(t&&void 0!==t.requestType)},n.fromJSON=function(t,e){return new n(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||void 0,requestType:this.requestType,requestStream:this.requestStream||void 0,responseType:this.responseType,responseStream:this.responseStream||void 0,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,30:30,32:32}],21:[function(t,e,r){"use strict";function n(){a||(a=t(30)),h||(h=t(29)),l=[d,a,h,p,i],c="one of "+l.map(function(t){return t.name}).join(", ")}function i(t,e){u.call(this,t,e),this.nested=void 0,this.d=null,this.e=[]}function s(t){t.d=null;for(var e=0;e<t.e.length;++e)delete t[t.e[e]];return t.e=[],t}function o(t){if(t&&t.length){for(var e={},r=0;r<t.length;++r)e[t[r].name]=t[r].toJSON();return e}}e.exports=i;var u=t(22),f=u.extend(i);i.className="Namespace";var a,h,l,c,d=t(16),p=t(17),v=t(32);Object.defineProperty(f,"nestedArray",{get:function(){return this.d||(this.d=v.toArray(this.nested))}}),i.testJSON=function(t){return Boolean(t&&!t.fields&&!t.values&&void 0===t.id&&!t.oneof&&!t.methods&&void 0===t.requestType)},i.fromJSON=function(t,e){return new i(t,e.options).addJSON(e.nested)},f.toJSON=function(){return{options:this.options,nested:o(this.nestedArray)}},i.arrayToJSON=o,f.addJSON=function(t){var e=this;return t&&(l||n(),Object.keys(t).forEach(function(r){for(var n=t[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return e.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(t){return void 0===this.nested?null:this.nested[t]||null},f.getEnum=function(t){if(this.nested&&this.nested[t]instanceof d)return this.nested[t].values;throw Error("no such enum")},f.add=function(t){if(l||n(),!t||l.indexOf(t.constructor)<0)throw TypeError("object must be "+c);if(t instanceof p&&void 0===t.extend)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var e=this.get(t.name);if(e){if(!(e instanceof i&&t instanceof i)||e instanceof a||e instanceof h)throw Error("duplicate name '"+t.name+"' in "+this);for(var r=e.nestedArray,o=0;o<r.length;++o)t.add(r[o]);this.remove(e),this.nested||(this.nested={}),t.setOptions(e.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),s(this)},f.remove=function(t){if(!(t instanceof u))throw TypeError("object must be a ReflectionObject");if(t.parent!==this||!this.nested)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),s(this)},f.define=function(t,e){v.isString(t)?t=t.split("."):Array.isArray(t)||(e=t,t=void 0);var r=this;if(t)for(;t.length>0;){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},f.resolve=function(){a||(a=t(30)),h||(a=t(29));for(var e=this.nestedArray,r=0;r<e.length;++r)if(/^[A-Z]/.test(e[r].name)){if(e[r]instanceof a||e[r]instanceof h)this[e[r].name]=e[r];else{if(!(e[r]instanceof d))continue;this[e[r].name]=e[r].values}this.e.push(e[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof i?t[e++].resolveAll():t[e++].resolve();return f.resolve.call(this)},f.lookup=function(t,e,r){if("boolean"==typeof e&&(r=e,e=void 0),v.isString(t)&&t.length)t=t.split(".");else if(!t.length)return null;if(""===t[0])return this.root.lookup(t.slice(1),e);var n=this.get(t[0]);return n&&1===t.length&&(!e||n instanceof e)||n instanceof i&&(n=n.lookup(t.slice(1),e,!0))?n:null===this.parent||r?null:this.parent.lookup(t,e)},f.lookupType=function(e){a||(a=t(30));var r=this.lookup(e,a);if(!r)throw Error("no such type");return r},f.lookupService=function(e){h||(h=t(29));var r=this.lookup(e,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(t){var e=this.lookup(t,d);if(!e)throw Error("no such enum");return e.values}},{16:16,17:17,22:22,29:29,30:30,32:32}],22:[function(t,e,r){"use strict";function n(t,e){if(!i.isString(t))throw TypeError("name must be a string");if(e&&!i.isObject(e))throw TypeError("options must be an object");this.options=e,this.name=t,this.parent=null,this.resolved=!1}e.exports=n;var i=t(32);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var r=e.root;s||(s=t(26)),r instanceof s&&r.f(this)},o.onRemove=function(e){var r=e.root;s||(s=t(26)),r instanceof s&&r.g(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=t(26)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(t){if(this.options)return this.options[t]},o.setOption=function(t,e,r){return r&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},o.setOptions=function(t,e){return t&&Object.keys(t).forEach(function(r){this.setOption(r,t[r],e)},this),this},o.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t}},{26:26,32:32}],23:[function(t,e,r){"use strict";function n(t,e,r){if(Array.isArray(e)||(r=e,e=void 0),s.call(this,t,r),e&&!Array.isArray(e))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.h=[],this.b=f.safeProp(this.name)}function i(t){t.parent&&t.h.forEach(function(e){e.parent||t.parent.add(e)})}e.exports=n;var s=t(22),o=s.extend(n);n.className="OneOf";var u=t(17),f=t(32);Object.defineProperty(o,"fieldsArray",{get:function(){return this.h}}),n.testJSON=function(t){return Boolean(t.oneof)},n.fromJSON=function(t,e){return new n(t,e.oneof,e.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(t){if(!(t instanceof u))throw TypeError("field must be a Field");return t.parent&&t.parent.remove(t),this.oneof.push(t.name),this.h.push(t),t.partOf=this,i(this),this},o.remove=function(t){if(!(t instanceof u))throw TypeError("field must be a Field");var e=this.h.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.h.splice(e,1),e=this.oneof.indexOf(t.name),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);var e=this;this.oneof.forEach(function(r){var n=t.get(r);n&&!n.partOf&&(n.partOf=e,e.h.push(n))}),i(this)},o.onRemove=function(t){this.h.forEach(function(t){t.parent&&t.parent.remove(t)}),s.prototype.onRemove.call(this,t)}},{17:17,22:22,32:32}],24:[function(t,e,r){"use strict";function n(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function i(t){this.buf=t,this.pos=0,this.len=t.length}function s(){var t=new O(0,0),e=0;if(this.len-this.pos>4){for(e=0;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(e=0;e<4;++e){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(e=0;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(e=0;e<5;++e){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function f(){return s.call(this).toLong(!0)}function a(){return s.call(this).toNumber(!0)}function h(){return s.call(this).zzDecode().toLong()}function l(){return s.call(this).zzDecode().toNumber()}function c(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new O(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function m(){return d.call(this).zzDecode().toNumber()}function g(){w.Long?(k.int64=o,k.uint64=f,k.sint64=h,k.fixed64=p,k.sfixed64=y):(k.int64=u,k.uint64=a,k.sint64=l,k.fixed64=v,k.sfixed64=m)}e.exports=i;var b,w=t(34),O=w.LongBits,x=w.utf8;i.create=w.Buffer?function(e){return b||(b=t(25)),(i.create=function(t){return w.Buffer.isBuffer(t)?new b(t):new i(t)})(e)}:function(t){return new i(t)};var k=i.prototype;k.i=w.Array.prototype.subarray||w.Array.prototype.slice,k.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},k.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var A="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],t[0]}:function(r,n){return e[3]=r[n],e[2]=r[n+1],e[1]=r[n+2],e[0]=r[n+3],t[0]}}():function(t,e){var r=c(t,e+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=4,t};var N="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],e[4]=r[n+4],e[5]=r[n+5],e[6]=r[n+6],e[7]=r[n+7],t[0]}:function(r,n){return e[7]=r[n],e[6]=r[n+1],e[5]=r[n+2],e[4]=r[n+3],e[3]=r[n+4],e[2]=r[n+5],e[1]=r[n+6],e[0]=r[n+7],t[0]}}():function(t,e){var r=c(t,e+4),n=c(t,e+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=N(this.buf,this.pos);return this.pos+=8,t},k.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw n(this,t);return this.pos+=t,e===r?new this.buf.constructor(0):this.i.call(this.buf,e,r)},k.string=function(){var t=this.bytes();return x.read(t,0,t.length)},k.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},k.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},i.j=g,g()},{25:25,34:34}],25:[function(t,e,r){"use strict";function n(t){i.call(this,t)}e.exports=n;var i=t(24),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=t(34);o.Buffer&&(s.i=o.Buffer.prototype.slice),s.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{24:24,34:34}],26:[function(t,e,r){"use strict";function n(t){o.call(this,"",t),this.deferred=[],this.files=[]}function i(){}function s(t){var e=t.parent.lookup(t.extend);if(e){var r=new h(t.fullName,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=n;var o=t(21),u=o.extend(n);n.className="Root";var f,a,h=t(17),l=t(32);n.fromJSON=function(t,e){return e||(e=new n),e.setOptions(t.options).addJSON(t.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=t("./parse"),a=t("./common")}catch(t){}c=null};u.load=function t(e,r,n){function s(t,e){if(n){var r=n;n=null,r(t,e)}}function o(t,e){try{if(l.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),l.isString(e)){f.filename=t;var n=f(e,h,r); | ||
n.imports&&n.imports.forEach(function(e){u(h.resolvePath(t,e))}),n.weakImports&&n.weakImports.forEach(function(e){u(h.resolvePath(t,e),!0)})}else h.setOptions(e.options).addJSON(e.nested)}catch(t){if(d)throw t;return void s(t)}d||p||s(null,h)}function u(t,e){var r=t.lastIndexOf("google/protobuf/");if(r>-1){var i=t.substring(r);i in a&&(t=i)}if(!(h.files.indexOf(t)>-1)){if(h.files.push(t),t in a)return void(d?o(t,a[t]):(++p,setTimeout(function(){--p,o(t,a[t])})));if(d){var u;try{u=l.fs.readFileSync(t).toString("utf8")}catch(t){return void(e||s(t))}o(t,u)}else++p,l.fetch(t,function(r,i){if(--p,n)return r?void(e||s(r)):void o(t,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var h=this;if(!n)return l.asPromise(t,h,e);var d=n===i,p=0;return l.isString(e)&&(e=[e]),e.forEach(function(t){u(h.resolvePath("",t))}),d?h:void(p||s(null,h))},u.loadSync=function(t,e){return this.load(t,e,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.f=function(t){var e=this.deferred.slice();this.deferred=[];for(var r=0;r<e.length;)s(e[r])?e.splice(r,1):++r;if(this.deferred=e,t instanceof h&&void 0!==t.extend&&!t.extensionField&&!s(t)&&this.deferred.indexOf(t)<0)this.deferred.push(t);else if(t instanceof o){var n=t.nestedArray;for(r=0;r<n.length;++r)this.f(n[r])}},u.g=function(t){if(t instanceof h){if(void 0!==t.extend&&!t.extensionField){var e=this.deferred.indexOf(t);e>-1&&this.deferred.splice(e,1)}t.extensionField&&(t.extensionField.parent.remove(t.extensionField),t.extensionField=null)}else if(t instanceof o)for(var r=t.nestedArray,n=0;n<r.length;++n)this.g(r[n])}},{17:17,21:21,32:32,undefined:void 0}],27:[function(t,e,r){"use strict";var n=r;n.Service=t(28)},{28:28}],28:[function(t,e,r){"use strict";function n(t){i.call(this),this.$rpc=t}e.exports=n;var i=t(32).EventEmitter,s=n.prototype=Object.create(i.prototype);s.constructor=n,s.end=function(t){return this.$rpc&&(t||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{32:32}],29:[function(t,e,r){"use strict";function n(t,e){s.call(this,t,e),this.methods={},this.k=null}function i(t){return t.k=null,t}e.exports=n;var s=t(21),o=s.prototype,u=s.extend(n);n.className="Service";var f=t(20),a=t(32),h=t(27);Object.defineProperty(u,"methodsArray",{get:function(){return this.k||(this.k=a.toArray(this.methods))}}),n.testJSON=function(t){return Boolean(t&&t.methods)},n.fromJSON=function(t,e){var r=new n(t,e.options);return e.methods&&Object.keys(e.methods).forEach(function(t){r.add(f.fromJSON(t,e.methods[t]))}),r},u.toJSON=function(){var t=o.toJSON.call(this);return{options:t&&t.options||void 0,methods:s.arrayToJSON(this.methodsArray)||{},nested:t&&t.nested||void 0}},u.get=function(t){return o.get.call(this,t)||this.methods[t]||null},u.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return o.resolve.call(this)},u.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof f?(this.methods[t.name]=t,t.parent=this,i(this)):o.add.call(this,t)},u.remove=function(t){if(t instanceof f){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,i(this)}return o.remove.call(this,t)},u.create=function(t,e,r){var n=new h.Service(t);return this.methodsArray.forEach(function(i){n[a.lcFirst(i.name)]=function(s,o){if(n.$rpc){if(!s)throw TypeError("request must not be null");i.resolve();var u;try{u=(e?i.resolvedRequestType.encodeDelimited(s):i.resolvedRequestType.encode(s)).finish()}catch(t){return void("function"==typeof setImmediate?setImmediate:setTimeout)(function(){o(t)})}t(i,u,function(t,e){if(t)return n.emit("error",t,i),o?o(t):void 0;if(null===e)return void n.end(!0);var s;try{s=r?i.resolvedResponseType.decodeDelimited(e):i.resolvedResponseType.decode(e)}catch(t){return n.emit("error",t,i),o?o("error",t):void 0}return n.emit("data",s,i),o?o(null,s):void 0})}}}),n}},{20:20,21:21,27:27,32:32}],30:[function(t,e,r){"use strict";function n(t,e){s.call(this,t,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.l=null,this.h=null,this.m=null,this.n=null}function i(t){return t.l=t.h=t.m=t.n=null,delete t.encode,delete t.decode,delete t.verify,t}e.exports=n;var s=t(21),o=s.prototype,u=s.extend(n);n.className="Type";var f=t(16),a=t(23),h=t(17),l=t(29),c=t(11),d=t(19),p=t(24),v=t(36),y=t(32),m=t(15),g=t(14),b=t(35),w=t(12);Object.defineProperties(u,{fieldsById:{get:function(){if(this.l)return this.l;this.l={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],n=r.id;if(this.l[n])throw Error("duplicate id "+n+" in "+this);this.l[n]=r}return this.l}},fieldsArray:{get:function(){return this.h||(this.h=y.toArray(this.fields))}},oneofsArray:{get:function(){return this.m||(this.m=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=c.create(this).constructor)},set:function(t){if(t&&!(t.prototype instanceof d))throw TypeError("ctor must be a Message constructor");t.from||(t.from=d.from),this.n=t}}}),n.testJSON=function(t){return Boolean(t&&t.fields)};var O=[f,n,h,l];n.fromJSON=function(t,e){var r=new n(t,e.options);return r.extensions=e.extensions,r.reserved=e.reserved,e.fields&&Object.keys(e.fields).forEach(function(t){r.add(h.fromJSON(t,e.fields[t]))}),e.oneofs&&Object.keys(e.oneofs).forEach(function(t){r.add(a.fromJSON(t,e.oneofs[t]))}),e.nested&&Object.keys(e.nested).forEach(function(t){for(var n=e.nested[t],i=0;i<O.length;++i)if(O[i].testJSON(n))return void r.add(O[i].fromJSON(t,n));throw Error("invalid nested object in "+r+": "+t)}),e.extensions&&e.extensions.length&&(r.extensions=e.extensions),e.reserved&&e.reserved.length&&(r.reserved=e.reserved),e.group&&(r.group=!0),r},u.toJSON=function(){var t=o.toJSON.call(this);return{options:t&&t.options||void 0,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:void 0,reserved:this.reserved&&this.reserved.length?this.reserved:void 0,group:this.group||void 0,nested:t&&t.nested||void 0}},u.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var r=this.oneofsArray;for(e=0;e<r.length;)r[e++].resolve();return o.resolve.call(this)},u.get=function(t){return o.get.call(this,t)||this.fields&&this.fields[t]||this.oneofs&&this.oneofs[t]||null},u.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof h&&void 0===t.extend){if(this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),i(this)}return t instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),i(this)):o.add.call(this,t)},u.remove=function(t){if(t instanceof h&&void 0===t.extend){if(this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.message=null,i(this)}return o.remove.call(this,t)},u.create=function(t){return new this.ctor(t)},u.from=function(t,e){return this.convert(t,w.message,e)},u.setup=function(){var t=this.fullName,e=this.fieldsArray.map(function(t){return t.resolve().resolvedType});return this.encode=m(this).eof(t+"$encode",{Writer:v,types:e,util:y}),this.decode=g(this).eof(t+"$decode",{Reader:p,types:e,util:y}),this.verify=b(this).eof(t+"$verify",{types:e,util:y}),this.convert=w(this).eof(t+"$convert",{types:e,util:y}),this},u.encode=function(t,e){return this.setup().encode(t,e)},u.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},u.decode=function(t,e){return this.setup().decode(t,e)},u.decodeDelimited=function(t){return t=t instanceof p?t:p.create(t),this.decode(t,t.uint32())},u.verify=function(t){return this.setup().verify(t)},u.convert=function(t,e,r){return this.setup().convert(t,e,r)}},{11:11,12:12,14:14,15:15,16:16,17:17,19:19,21:21,23:23,24:24,29:29,32:32,35:35,36:36}],31:[function(t,e,r){"use strict";function n(t,e){var r=0,n={};for(e|=0;r<t.length;)n[o[r+e]]=t[r++];return n}var i=r,s=t(32),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes","message"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{32:32}],32:[function(t,e,r){"use strict";var n=e.exports=t(34);n.asPromise=t(1),n.codegen=t(3),n.EventEmitter=t(4),n.extend=t(5),n.fetch=t(6),n.path=t(8),n.fs=n.inquire("fs"),n.toArray=function(t){return t?Object.values?Object.values(t):Object.keys(t).map(function(e){return t[e]}):[]},n.safeProp=function(t){return'["'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},n.newBuffer=function(t){return t=t||0,n.Buffer?n.Buffer.allocUnsafe(t):new("undefined"!=typeof Uint8Array?Uint8Array:Array)(t)}},{1:1,3:3,34:34,4:4,5:5,6:6,8:8}],33:[function(t,e,r){"use strict";function n(t,e){this.lo=t,this.hi=e}e.exports=n;var i=t(34),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var u=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var r=t>>>0,i=(t-r)/4294967296>>>0;return e&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if("string"==typeof t){if(!i.Long)return n.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):o},s.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var f=String.prototype.charCodeAt;n.fromHash=function(t){return t===u?o:new n((f.call(t,0)|f.call(t,1)<<8|f.call(t,2)<<16|f.call(t,3)<<24)>>>0,(f.call(t,4)|f.call(t,5)<<8|f.call(t,6)<<16|f.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&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},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<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{34:34}],34:[function(t,e,r){(function(e){"use strict";var n=r;n.base64=t(2),n.inquire=t(7),n.utf8=t(10),n.pool=t(9),n.LongBits=t(33),n.isNode=Boolean(e.process&&e.process.versions&&e.process.versions.node),n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,r){return new t(e,r)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=e.dcodeIO&&e.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n.isString=function(t){return"string"==typeof t||t instanceof String},n.isObject=function(t){return t&&"object"==typeof t},n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.longNe=function(t,e,r){if("object"==typeof t)return t.low!==e||t.high!==r;var i=n.LongBits.from(t);return i.lo!==e||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(t,e){if(t.length===e.length)for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!0;return!1},n.merge=function(t,e,r){if(e)for(var n=Object.keys(e),i=0;i<n.length;++i)void 0!==t[n[i]]&&r||(t[n[i]]=e[n[i]]);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,33:33,7:7,9:9}],35:[function(t,e,r){"use strict";function n(t,e){return t.fullName.substring(1)+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function i(t,e,r,i){if(e.resolvedType)if(e.resolvedType instanceof u){t("switch(%s){",i)("default:")("return%j",n(e,"enum value"));for(var s=f.toArray(e.resolvedType.values),o=0;o<s.length;++o)t("case %d:",s[o]);t("break")("}")}else t("var e;")("if(e=types[%d].verify(%s))",r,i)("return e");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",i)("return%j",n(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",n(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',i)("return%j",n(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',i)("return%j",n(e,"boolean"));break;case"string":t("if(!util.isString(%s))",i)("return%j",n(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",n(e,"buffer"))}}function s(t,e,r){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!/^-?(?:0|[1-9]\\d*)$/.test(%s))",r)("return%j",n(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9]\\d*))$/.test(%s))",r)("return%j",n(e,"integer|Long key"));break;case"bool":t("if(!/^true|false|0|1$/.test(%s))",r)("return%j",n(e,"boolean key"))}}function o(t){var e=t.fieldsArray;if(!e.length)return f.codegen()("return null");for(var r=f.codegen("m"),o=0;o<e.length;++o){var a=e[o].resolve(),h="m"+a.b;a.map?(r("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",n(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),s(r,a,"k[i]"),i(r,a,o,h+"[k[i]]"),r("}")("}")):a.repeated?(r("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",n(a,"array"))("for(var i=0;i<%s.length;++i){",h),i(r,a,o,h+"[i]"),r("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof u?r("if(%s!==undefined){",h):r("if(%s!==undefined&&%s!==null){",h,h)),i(r,a,o,h),a.required||r("}"))}return r("return null")}e.exports=o;var u=t(16),f=t(32)},{16:16,32:32}],36:[function(t,e,r){"use strict";function n(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function i(){}function s(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(t,e,r){e[r]=255&t}function f(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function a(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function h(t,e,r){e[r++]=255&t,e[r++]=t>>>8&255,e[r++]=t>>>16&255,e[r]=t>>>24}e.exports=o;var l,c=t(34),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return l||(l=t(37)),(o.create=function(){return new l})()}:function(){return new o},o.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},y.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},y.int32=function(t){return t<0?this.push(a,10,d.fromNumber(t)):this.uint32(t)},y.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},y.uint64=function(t){var e=d.from(t);return this.push(a,e.length(),e)},y.int64=y.uint64,y.sint64=function(t){var e=d.from(t).zzEncode();return this.push(a,e.length(),e)},y.bool=function(t){return this.push(u,1,t?1:0)},y.fixed32=function(t){return this.push(h,4,t>>>0)},y.sfixed32=function(t){return this.push(h,4,t<<1^t>>31)},y.fixed64=function(t){var e=d.from(t);return this.push(h,4,e.lo).push(h,4,e.hi)},y.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(h,4,e.lo).push(h,4,e.hi)};var m="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i]=e[3]}:function(r,n,i){t[0]=r,n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)h(1/t>0?0:2147483648,e,r);else if(isNaN(t))h(2147483647,e,r);else if(t>3.4028234663852886e38)h((n<<31|2139095040)>>>0,e,r);else if(t<1.1754943508222875e-38)h((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,r);else{var i=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,e,r)}};y.float=function(t){return this.push(m,4,t)};var g="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n,i){t[0]=r,n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i]=e[7]}:function(r,n,i){t[0]=r,n[i++]=e[7],n[i++]=e[6],n[i++]=e[5],n[i++]=e[4],n[i++]=e[3],n[i++]=e[2],n[i++]=e[1],n[i]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)h(0,e,r),h(1/t>0?0:2147483648,e,r+4);else if(isNaN(t))h(4294967295,e,r),h(2147483647,e,r+4);else if(t>1.7976931348623157e308)h(0,e,r),h((n<<31|2146435072)>>>0,e,r+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,h(i>>>0,e,r),h((n<<31|i/4294967296)>>>0,e,r+4);else{var s=Math.floor(Math.log(t)/Math.LN2);1024===s&&(s=1023),i=t*Math.pow(2,-s),h(4503599627370496*i>>>0,e,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,e,r+4)}}};y.double=function(t){return this.push(g,8,t)};var b=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};y.bytes=function(t){var e=t.length>>>0;if("string"==typeof t&&e){var r=o.alloc(e=p.length(t));p.decode(t,r,0),t=r}return e?this.uint32(e).push(b,e,t):this.push(u,1,0)},y.string=function(t){var e=v.length(t);return e?this.uint32(e).push(v.write,e,t):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.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 n(i,0,0),this.len=0),this},y.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=e,this.len+=r,this},y.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e}},{34:34,37:37}],37:[function(t,e,r){"use strict";function n(){s.call(this)}function i(t,e,r){t.length<40?u.utf8.write(t,e,r):e.utf8Write(t,r)}e.exports=n;var s=t(36),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=t(34),f=u.Buffer;n.alloc=function(t){return(n.alloc=f.allocUnsafe)(t)};var a=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){t.copy(e,r,0,t.length)};o.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(a,e,t),this},o.string=function(t){var e=f.byteLength(t);return this.uint32(e),e&&this.push(i,e,t),this}},{34:34,36:36}],38:[function(t,e,r){(function(e){"use strict";function n(t,e,r){return"function"==typeof e?(r=e,e=new o.Root):e||(e=new o.Root),e.load(t,r)}function i(t,e){return e||(e=new o.Root),e.loadSync(t)}function s(){o.Reader.j()}var o=e.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=t("./tokenize"),o.parse=t("./parse"),o.common=t("./common")}catch(t){}o.Writer=t(36),o.BufferWriter=t(37),o.Reader=t(24),o.BufferReader=t(25),o.encoder=t(15),o.decoder=t(14),o.verifier=t(35),o.converter=t(12),o.ReflectionObject=t(22),o.Namespace=t(21),o.Root=t(26),o.Enum=t(16),o.Type=t(30),o.Field=t(17),o.OneOf=t(23),o.MapField=t(18),o.Service=t(29),o.Method=t(20),o.Class=t(11),o.Message=t(19),o.types=t(31),o.rpc=t(27),o.util=t(32),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,29:29,30:30,31:31,32:32,35:35,36:36,37:37,undefined:void 0}]},{},[38]); | ||
//# sourceMappingURL=protobuf.min.js.map |
/*! | ||
* protobuf.js v6.4.1 (c) 2016, Daniel Wirtz | ||
* Compiled Wed, 04 Jan 2017 12:36:42 UTC | ||
* protobuf.js v6.4.2 (c) 2016, Daniel Wirtz | ||
* Compiled Fri, 06 Jan 2017 00:11:13 UTC | ||
* Licensed under the BSD-3-Clause License | ||
* see: https://github.com/dcodeIO/protobuf.js for details | ||
*/ | ||
!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){"use strict";function n(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=n},{}],2:[function(e,t,r){"use strict";var n=r;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,r){for(var n,s=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:s[o++]=i[a>>2],n=(3&a)<<4,u=1;break;case 1:s[o++]=i[n|a>>4],n=(15&a)<<2,u=2;break;case 2:s[o++]=i[n|a>>6],s[o++]=i[63&a],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,o=0,a=0;a<e.length;){var f=e.charCodeAt(a++);if(61===f&&o>1)break;if(void 0===(f=s[f]))throw Error(u);switch(o){case 0:n=f,o=1;break;case 1:t[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:t[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:t[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,t,r){"use strict";function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=c;if(h.length){var p=h[h.length-1];s.test(p)?l=++c:a.test(p)&&++l,u.test(p)&&!u.test(n)?(l=++c,d=!0):d&&f.test(p)&&(l=--c,d=!1),o.test(n)&&(l=--c)}for(r=0;r<l;++r)n="\t"+n;return h.push(n),e}function t(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(", ")+") {\n"+h.join("\n")+"\n}"}function r(t,r){"object"==typeof t&&(r=t,t=void 0);var i=e.str(t);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(e){return r[e]}))}for(var l=[],h=[],c=1,d=!1,p=0;p<arguments.length;)l.push(arguments[p++]);return e.str=t,e.eof=r,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);return r=0,e.replace(/%([djs])/g,function(e,n){var i=t[r++];switch(n){case"j":return JSON.stringify(i);default:return String(i)}})}t.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,t,r){"use strict";function n(){this.a={}}t.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,t){if(void 0===e)this.a={};else if(void 0===t)this.a[e]=[];else for(var r=this.a[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t,r){"use strict";function n(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=n},{}],6:[function(e,t,r){"use strict";function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,t){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===r.readyState?0===r.status||200===r.status?t(null,r.responseText):t(Error("status "+r.status)):void 0},r.open("GET",e),r.send()}t.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],8:[function(e,t,r){"use strict";var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],10:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(33)),!(t instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=u.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:o});r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n<r.length;++n)r[n]!==t&&delete this[r[n]]}})}),t.ctor=r,i}t.exports=n;var s,o=e(20),u=e(35);n.create=i,n.prototype=o},{20:20,33:33,35:35}],12:[function(e,t,r){"use strict";function n(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}t.exports=n,n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var i;n("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:i}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){"use strict";function n(e,t,r){if(e.resolvedType)return e.resolvedType instanceof s?a("f.enums(s%s,%d,types[%d].values,o)",r,e.typeDefault,t):a("types[%d].convert(s%s,f,o)",t,r);switch(e.type){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":return a("f.longs(s%s,%d,%d,%j,o)",r,e.typeDefault.low,e.typeDefault.high,"u"===e.type.charAt(0));case"bytes":return a("f.bytes(s%s,%j,o)",r,Array.prototype.slice.call(e.typeDefault))}return null}function i(e){var t=e.fieldsArray,r=u.codegen("s","f","o")("if(!o)")("o={}")("var d=f.create(s,this,o)");if(t.length){r("if(d){");var i;t.forEach(function(e,t){var o=u.safeProp(e.resolve().name);e.repeated?(r("if(s%s&&s%s.length){",o,o)("d%s=[]",o)("for(var i=0;i<s%s.length;++i)",o),(i=n(e,t,o+"[i]"))?r("d%s.push(%s)",o,i):r("d%s.push(s%s[i])",o,o),r("}else if(o.defaults||o.arrays)")("d%s=[]",o)):(i=n(e,t,o))?(e.long?r("if(o.defaults||s%s!==undefined&&s%s!==null&&util.longNe(s%s,%d,%d))",o,o,o,e.typeDefault.low,e.typeDefault.high):!e.resolvedType||e.resolvedType instanceof s?r("if(o.defaults||s%s!==undefined&&s%s!==%j)",o,o,e.typeDefault):r("if(o.defaults||s%s!==undefined&&s%s!==null)",o,o),r("d%s=%s",o,i)):r("if(d%s===undefined&&o.defaults)",o)("d%s=%j",o,e.typeDefault)}),r("}")}return r("return d")}t.exports=i;var s=e(17),o=e(14),u=e(35),a=u.codegen.sprintf;u.merge(i,o)},{14:14,17:17,35:35}],14:[function(e,t,r){"use strict";var n=r,i=e(37);n.json={create:function(e,t,r){return e?r.fieldsOnly?{}:i.merge({},e):null},enums:function(e,t,r,n){return void 0===e&&(e=t),n.enums===String&&"number"==typeof e?r[e]:e},longs:function(e,t,r,n,s){return void 0!==e&&null!==e||(e={low:t,high:r}),s.longs===Number?"number"==typeof e?e:i.LongBits.from(e).toNumber(n):s.longs===String?"number"==typeof e?i.Long.fromNumber(e,n).toString():(e=i.Long.fromValue(e),e.unsigned=n,e.toString()):e},bytes:function(e,t,r){if(e){if(!e.length&&!r.defaults)return}else e=t;return r.bytes===String?i.base64.encode(e,0,e.length):r.bytes===Array?Array.prototype.slice.call(e):r.bytes!==i.Buffer||i.Buffer.isBuffer(e)?e:i.Buffer.from(e)}},n.message={create:function(e,t,r){return e?new(t.ctor?t.ctor:t)(r.fieldsOnly?void 0:e):null},enums:function(e,t,r){return"string"==typeof e?r[e]:e},longs:function(e,t,r,n){return"string"==typeof e?i.Long.fromString(e,n):"number"==typeof e?i.Long.fromNumber(e,n):e},bytes:function(e){if(i.Buffer)return i.Buffer.isBuffer(e)?e:i.Buffer.from(e,"base64");if("string"==typeof e){var t=i.newBuffer(i.base64.length(e));return i.base64.decode(e,t,0),t}return e instanceof i.Array?e:new i.Array(e)}}},{37:37}],15:[function(e,t,r){"use strict";function n(e){var t=e.fieldsArray,r=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var n=0;n<t.length;++n){var u=t[n].resolve(),a=u.resolvedType instanceof i?"uint32":u.type,f="m"+o.safeProp(u.name);if(r("case %d:",u.id),u.map){var l=u.resolvedKeyType?"uint32":u.keyType;r("r.skip().pos++")("if(%s===util.emptyObject)",f)("%s={}",f)("var k=r.%s()",l)('if(typeof k==="object")')("k=util.longToHash(k)")("r.pos++"),void 0===s.basic[a]?r("%s[k]=types[%d].decode(r,r.uint32())",f,n):r("%s[k]=r.%s()",f,a)}else u.repeated?(r("if(!(%s&&%s.length))",f,f)("%s=[]",f),u.packed&&void 0!==s.packed[a]&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,a)("}else"),void 0===s.basic[a]?r(u.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",f,n):r("%s.push(r.%s())",f,a)):void 0===s.basic[a]?r(u.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",f,n):r("%s=r.%s()",f,a);r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}t.exports=n;var i=e(17),s=e(34),o=e(35)},{17:17,34:34,35:35}],16:[function(e,t,r){"use strict";function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,a=e.oneofsArray,f=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t<i.length;++t){var l=i[t].resolve(),h=l.resolvedType instanceof s?"uint32":l.type,c=o.basic[h];if(r="m"+u.safeProp(l.name),l.map){var d=l.resolvedKeyType?"uint32":l.keyType;f("if(%s&&%s!==util.emptyObject){",r,r)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):f(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,h,r),f("}")("}")}else l.repeated?l.packed&&void 0!==o.packed[h]?f("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",h,r)("w.ldelim()",l.id)("}"):(f("if(%s){",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(f,l,t,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r),f("}")):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,l.defaultValue.low,l.defaultValue.high):l.bytes?f("if(%s&&%s.length"+(l.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(l.defaultValue)):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,t,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var t=0;t<a.length;++t){var p=a[t];f("switch(%s){","m"+u.safeProp(p.name));for(var v=p.fieldsArray,y=0;y<v.length;++y){var l=v[y],h=l.resolvedType instanceof s?"uint32":l.type,c=o.basic[h];r="m"+u.safeProp(l.name),f("case%j:",l.name),void 0===c?n(f,l,i.indexOf(l),r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r),f("break;")}f("}")}return f("return w")}t.exports=i;var s=e(17),o=e(34),u=e(35)},{17:17,34:34,35:35}],17:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(23),s=i.extend(n);n.className="Enum";var o=e(35);n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{23:23,35:35}],18:[function(e,t,r){"use strict";function n(e,t,r,n,s,o){if(l.isObject(n)?(o=n,n=s=void 0):l.isObject(s)&&(o=s,s=void 0),i.call(this,e,o),!l.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!l.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!l.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}t.exports=n;var i=e(23),s=i.extend(n);n.className="Field";var o,u,a=e(17),f=e(34),l=e(35);Object.defineProperties(s,{packed:{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(19)),u.fromJSON(t,r)):new n(t,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=f.defaults[this.type]))if(o||(o=e(33)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&void 0!==this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.defaultValue])),this.long)this.typeDefault=l.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,t=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,t=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{17:17,19:19,23:23,33:33,34:34,35:35}],19:[function(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(18),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(34),a=e(35);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{18:18,34:34,35:35}],20:[function(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=n;var i=e(14),s=n.prototype;s.asJSON=function(e){return this.$type.convert(this,i.json,e)},n.from=function(e,t){return this.$type.convert(e,i.message,t)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.convert=function(e,t,r){return this.$type.convert(e,t,r)}},{14:14}],21:[function(e,t,r){"use strict";function n(e,t,r,n,s,o,a){if(u.isObject(s)?(a=s,s=o=void 0):u.isObject(o)&&(a=o,o=void 0),t&&!u.isString(t))throw TypeError("type must be a string");if(!u.isString(r))throw TypeError("requestType must be a string");if(!u.isString(n))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=n,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=n;var i=e(23),s=i.extend(n);n.className="Method";var o=e(33),u=e(35);n.testJSON=function(e){return Boolean(e&&void 0!==e.requestType)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||void 0,requestType:this.requestType,requestStream:this.requestStream||void 0,responseType:this.responseType,responseStream:this.responseStream||void 0,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{23:23,33:33,35:35}],22:[function(e,t,r){"use strict";function n(){f||(f=e(33)),l||(l=e(31)),h=[d,f,l,p,i],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e,t){u.call(this,e,t),this.nested=void 0,this.c=null,this.d=[]}function s(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}function o(e){if(e&&e.length){for(var t={},r=0;r<e.length;++r)t[e[r].name]=e[r].toJSON();return t}}t.exports=i;var u=e(23),a=u.extend(i);i.className="Namespace";var f,l,h,c,d=e(17),p=e(18),v=e(35);Object.defineProperties(a,{nestedArray:{get:function(){return this.c||(this.c=v.toArray(this.nested))}}}),i.testJSON=function(e){return Boolean(e&&!e.fields&&!e.values&&void 0===e.id&&!e.oneof&&!e.methods&&void 0===e.requestType)},i.fromJSON=function(e,t){return new i(e,t.options).addJSON(t.nested)},a.toJSON=function(){return{options:this.options,nested:o(this.nestedArray)}},i.arrayToJSON=o,a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return void 0===this.nested?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof d)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof p&&void 0===e.extend)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof i&&e instanceof i)||t instanceof f||t instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,o=0;o<r.length;++o)e.add(r[o]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),s(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),s(this)},a.define=function(e,t){v.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var r=this;if(e)for(;e.length>0;){var n=e.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 t&&r.addJSON(t),r},a.resolve=function(){f||(f=e(33)),l||(f=e(31));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof d))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof i?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,t,r){if("boolean"==typeof t&&(r=t,t=void 0),v.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);return n&&1===e.length&&(!t||n instanceof t)||n instanceof i&&(n=n.lookup(e.slice(1),t,!0))?n:null===this.parent||r?null:this.parent.lookup(e,t)},a.lookupType=function(t){f||(f=e(33));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(31));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,d);if(!t)throw Error("no such enum");return t.values}},{17:17,18:18,23:23,31:31,33:33,35:35}],23:[function(e,t,r){"use strict";function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1}t.exports=n;var i=e(35);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(28)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(28)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(28)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){if(this.options)return this.options[e]},o.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{28:28,35:35}],24:[function(e,t,r){"use strict";function n(e,t,r){if(Array.isArray(t)||(r=t,t=void 0),s.call(this,e,r),t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=n;var s=e(23),o=s.extend(n);n.className="OneOf";var u=e(18);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return Boolean(e.oneof)},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{18:18,23:23}],25:[function(e,t,r){"use strict";function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,t,r){function w(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=W())&&"'"!==e)throw w(e);t.push(W()),Q(e),e=G()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=W();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return A(t)}catch(r){if(e&&i(t))return t;throw w(t,"value")}}function O(){var e=N(W()),t=e;return Q("to",!0)&&(t=N(W())),Q(";"),[e,t]}function A(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw w(e,"number")}function N(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw w(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw w(e,"id")}function S(){if(void 0!==U)throw w("package");if(U=W(),!i(U))throw w(U,"name");re=re.define(U),Q(";")}function T(){var e,t=G();switch(t){case"weak":e=H||(H=[]),W();break;case"public":W();default:e=_||(_=[])}t=k(),Q(";"),e.push(t)}function j(){if(Q("="),Z=o(k()),ee="proto3"===Z,!ee&&"proto2"!==Z)throw w(Z,"syntax");Q(";")}function E(e,t){switch(t){case"option":return $(e,t),Q(";"),!0;case"message":return B(e,t),!0;case"enum":return V(e,t),!0;case"service":return C(e,t),!0;case"extend":return P(e,t),!0}return!1}function B(e,t){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(t=W());){var u=o(t);if(!E(s,t))switch(u){case"map":q(s,u);break;case"required":case"optional":case"repeated":J(s,u);break;case"oneof":D(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(O(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(O(s,u));break;default:if(!ee||!i(t))throw w(t);X(t),J(s,"optional")}}Q(";",!0)}else Q(";");e.add(s)}function J(e,t,r){var s=W();if("group"===o(s))return void L(e,t);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=ne(u),Q("=");var a=N(W()),f=R(new c(u,a,s,t,r));f.repeated&&void 0!==m.packed[s]&&!ee&&f.setOption("packed",!1,!0),e.add(f)}function L(e,t){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=N(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,t);for(Q("{");"}"!==(te=W());)switch(te=o(te)){case"option":$(u,te),Q(";");break;case"required":case"optional":case"repeated":J(u,te);break;default:throw w(te)}Q(";",!0),e.add(u).add(a)}function q(e){Q("<");var t=W();if(void 0===m.mapKey[t])throw w(t,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=ne(s),Q("=");var o=N(W()),u=R(new d(s,o,t,r));e.add(u)}function D(e,t){var r=W();if(!n(r))throw w(r,"name");r=ne(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===t?($(i,t),Q(";")):(X(t),J(i,"optional"));Q(";",!0)}else Q(";");e.add(i)}function V(e,t){var r=W();if(!n(r))throw w(r,"name");var i=new v(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===o(t)?($(i,t),Q(";")):z(i,t);Q(";",!0)}else Q(";");e.add(i)}function z(e,t){if(!n(t))throw w(t,"name");var r=t;Q("=");var i=N(W(),!0);e.add(r,i),R({})}function $(e,t){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",t=G(),s(t)&&(n+=t,W())),Q("="),F(e,n)}function F(e,t){if(Q("{",!0))for(;"}"!==(te=W());){if(!n(te))throw w(te,"name");t=t+"."+te,Q(":",!0)?I(e,t,x(!0)):F(e,t)}else I(e,t,x(!0))}function I(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function R(e){if(Q("[",!0)){do $(e,"option");while(Q(",",!0));Q("]")}return Q(";"),e}function C(e,t){if(t=W(),!n(t))throw w(t,"service name");var r=t,i=new y(r);if(Q("{",!0)){for(;"}"!==(t=W());){var s=o(t);switch(s){case"option":$(i,s),Q(";");break;case"rpc":M(i,s);break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(i)}function M(e,t){var r=t,s=W();if(!n(s))throw w(s,"name");var u,a,f,l;Q("(");var h;if(Q(h="stream",!0)&&(a=!0),!i(t=W()))throw w(t); | ||
if(u=t,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(t=W()))throw w(t);f=t,Q(")");var c=new g(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(t=W());){var d=o(t);switch(d){case"option":$(c,d),Q(";");break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(c)}function P(e,t){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(t=W());){var n=o(t);switch(n){case"required":case"repeated":case"optional":J(e,n,r);break;default:if(!ee||!i(t))throw w(t);X(t),J(e,"optional",r)}}Q(";",!0)}else Q(";")}t instanceof l||(r=t,t=new l),r||(r=a.defaults);var U,_,H,Z,K=f(e),W=K.next,X=K.push,G=K.peek,Q=K.skip,Y=!0,ee=!1;t||(t=new l);for(var te,re=t,ne=r.keepCase?function(e){return e}:u;null!==(te=W());){var ie=o(te);switch(ie){case"package":if(!Y)throw w(te);S();break;case"import":if(!Y)throw w(te);T();break;case"syntax":if(!Y)throw w(te);j();break;case"option":if(!Y)throw w(te);$(re,te),Q(";");break;default:if(E(re,te)){Y=!1;continue}throw w(te)}}return a.filename=null,{package:U,imports:_,weakImports:H,syntax:Z,root:t}}t.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(32),l=e(28),h=e(33),c=e(18),d=e(19),p=e(24),v=e(17),y=e(31),g=e(21),m=e(34),b=e(35)},{17:17,18:18,19:19,21:21,24:24,28:28,31:31,32:32,33:33,34:34,35:35}],26:[function(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new k(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function a(){return s.call(this).toLong(!0)}function f(){return s.call(this).toNumber(!0)}function l(){return s.call(this).zzDecode().toLong()}function h(){return s.call(this).zzDecode().toNumber()}function c(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new k(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(){w.Long?(O.int64=o,O.uint64=a,O.sint64=l,O.fixed64=p,O.sfixed64=y):(O.int64=u,O.uint64=f,O.sint64=h,O.fixed64=v,O.sfixed64=g)}t.exports=i;var b,w=e(37),k=w.LongBits,x=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(27)),(i.create=function(e){return w.Buffer.isBuffer(e)?new b(e):new i(e)})(t)}:function(e){return new i(e)};var O=i.prototype;O.h=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},O.bool=function(){return 0!==this.uint32()},O.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},O.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};O.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};O.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=N(this.buf,this.pos);return this.pos+=8,e},O.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.h.call(this.buf,t,r)},O.string=function(){var e=this.bytes();return x.read(e,0,e.length)},O.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.i=m,m()},{27:27,37:37}],27:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(26),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(37);o.Buffer&&(s.h=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{26:26,37:37}],28:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new l(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(22),u=o.extend(n);n.className="Root";var a,f,l=e(18),h=e(35);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(25),f=e(12)}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){a.filename=e;var n=a(t,l,r);n.imports&&n.imports.forEach(function(t){u(l.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(l.resolvePath(e,t),!0)})}else l.setOptions(t.options).addJSON(t.nested)}catch(e){if(d)throw e;return void s(e)}d||p||s(null,l)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in f&&(e=i)}if(!(l.files.indexOf(e)>-1)){if(l.files.push(e),e in f)return void(d?o(e,f[e]):(++p,setTimeout(function(){--p,o(e,f[e])})));if(d){var u;try{u=h.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,h.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(e,l,t);var d=n===i,p=0;return h.isString(t)&&(t=[t]),t.forEach(function(e){u(l.resolvePath("",e))}),d?l:void(p||s(null,l))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r<t.length;)s(t[r])?t.splice(r,1):++r;if(this.deferred=t,e instanceof l&&void 0!==e.extend&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var n=e.nestedArray;for(r=0;r<n.length;++r)this.e(n[r])}},u.f=function(e){if(e instanceof l){if(void 0!==e.extend&&!e.extensionField){var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,n=0;n<r.length;++n)this.f(r[n])}},{12:12,18:18,22:22,25:25,35:35}],29:[function(e,t,r){"use strict";var n=r;n.Service=e(30)},{30:30}],30:[function(e,t,r){"use strict";function n(e){s.call(this),this.$rpc=e}t.exports=n;var i=e(35),s=i.EventEmitter,o=n.prototype=Object.create(s.prototype);o.constructor=n,o.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{35:35}],31:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}t.exports=n;var s=e(22),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(21),f=e(35),l=e(29);Object.defineProperties(u,{methodsArray:{get:function(){return this.j||(this.j=f.toArray(this.methods))}}}),n.testJSON=function(e){return Boolean(e&&e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||void 0}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof a?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof a){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,t,r){var n=new l.Service(e);return this.methodsArray.forEach(function(i){n[f.lcFirst(i.name)]=function(s,o){if(n.$rpc){if(!s)throw TypeError("request must not be null");i.resolve();var u;try{u=(t?i.resolvedRequestType.encodeDelimited(s):i.resolvedRequestType.encode(s)).finish()}catch(e){return void("function"==typeof setImmediate?setImmediate:setTimeout)(function(){o(e)})}e(i,u,function(e,t){if(e)return n.emit("error",e,i),o?o(e):void 0;if(null===t)return void n.end(!0);var s;try{s=r?i.resolvedResponseType.decodeDelimited(t):i.resolvedResponseType.decode(t)}catch(e){return n.emit("error",e,i),o?o("error",e):void 0}return n.emit("data",s,i),o?o(null,s):void 0})}}}),n}},{21:21,22:22,29:29,35:35}],32:[function(e,t,r){"use strict";function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function i(e){function t(e){return Error("illegal "+e+" (line "+p+")")}function r(){var r="'"===y?u:o;r.lastIndex=c-1;var i=r.exec(e);if(!i)throw t("string");return c=r.lastIndex,f(y),y=null,n(i[1])}function i(t){return e.charAt(t)}function a(){if(v.length>0)return v.shift();if(y)return r();var n,o,u;do{if(c===d)return null;for(n=!1;/\s/.test(u=i(c));)if("\n"===u&&++p,++c===d)return null;if("/"===i(c)){if(++c===d)throw t("comment");if("/"===i(c)){for(;"\n"!==i(++c);)if(c===d)return null;++c,++p,n=!0}else{if("*"!==(u=i(c)))return"/";do{if("\n"===u&&++p,++c===d)return null;o=u,u=i(c)}while("*"!==o||"/"!==u);++c,n=!0}}}while(n);if(c===d)return null;var a=c;s.lastIndex=0;var f=s.test(i(a++));if(!f)for(;a<d&&!s.test(i(a));)++a;var l=e.substring(c,c=a);return'"'!==l&&"'"!==l||(y=l),l}function f(e){v.push(e)}function l(){if(!v.length){var e=a();if(null===e)return null;f(e)}return v[0]}function h(e,r){var n=l(),i=n===e;if(i)return a(),!0;if(!r)throw t("token '"+n+"', '"+e+"' expected");return!1}e=e.toString();var c=0,d=e.length,p=1,v=[],y=null;return{line:function(){return p},next:a,peek:l,push:f,skip:h}}t.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],33:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.k=null,this.g=null,this.l=null,this.m=null,this.n=null}function i(e){return e.k=e.g=e.m=e.n=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=n;var s=e(22),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(17),f=e(24),l=e(18),h=e(31),c=e(11),d=e(20),p=e(26),v=e(39),y=e(35),g=e(16),m=e(15),b=e(38),w=e(13);Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=y.toArray(this.fields))}},repeatedFieldsArray:{get:function(){return this.l||(this.l=this.fieldsArray.filter(function(e){return e.repeated}))}},oneofsArray:{get:function(){return this.m||(this.m=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof d))throw TypeError("ctor must be a Message constructor");e.from||(e.from=d.from),this.n=e}}}),n.testJSON=function(e){return Boolean(e&&e.fields)};var k=[a,n,l,h];n.fromJSON=function(e,t){var r=new n(e,t.options);return r.extensions=t.extensions,r.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){r.add(l.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){r.add(f.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var n=t.nested[e],i=0;i<k.length;++i)if(k[i].testJSON(n))return void r.add(k[i].fromJSON(e,n));throw Error("invalid nested object in "+r+": "+e)}),t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:void 0,reserved:this.reserved&&this.reserved.length?this.reserved:void 0,group:this.group||void 0,nested:e&&e.nested||void 0}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof l&&void 0===e.extend){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&void 0===e.extend){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.from=function(e,t){return this.convert(e,w.message,t)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=g(this).eof(e+"$encode",{Writer:v,types:t,util:y}),this.decode=m(this).eof(e+"$decode",{Reader:p,types:t,util:y}),this.verify=b(this).eof(e+"$verify",{types:t,util:y}),this.convert=w(this).eof(e+"$convert",{types:t,util:y}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e=e instanceof p?e:p.create(e),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.convert=function(e,t,r){return this.setup().convert(e,t,r)}},{11:11,13:13,15:15,16:16,17:17,18:18,20:20,22:22,24:24,26:26,31:31,35:35,38:38,39:39}],34:[function(e,t,r){"use strict";function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(35),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes","message"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{35:35}],35:[function(e,t,r){"use strict";var n=t.exports=e(37);n.asPromise=e(1),n.codegen=e(3),n.EventEmitter=e(4),n.extend=e(5),n.fetch=e(6),n.path=e(8),n.fs=n.inquire("fs"),n.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},n.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},n.newBuffer=function(e){return e=e||0,n.Buffer?n.Buffer.allocUnsafe(e):new("undefined"!=typeof Uint8Array?Uint8Array:Array)(e)}},{1:1,3:3,37:37,4:4,5:5,6:6,8:8}],36:[function(e,t,r){"use strict";function n(e,t){this.lo=e,this.hi=t}t.exports=n;var i=e(37),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var u=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{37:37}],37:[function(e,t,r){(function(t){"use strict";var n=r;n.base64=e(2),n.inquire=e(7),n.utf8=e(10),n.pool=e(9),n.LongBits=e(36),n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node),n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=t.dcodeIO&&t.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var i=n.LongBits.from(e);return i.lo!==t||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(e,t){if(e.length===t.length)for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!0;return!1},n.merge=function(e,t,r){if(t)for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,36:36,7:7,9:9}],38:[function(e,t,r){"use strict";function n(e,t){return e.fullName.substring(1)+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof u){e("switch(%s){",i)("default:")("return%j",n(t,"enum value"));for(var s=a.toArray(t.resolvedType.values),o=0;o<s.length;++o)e("case %d:",s[o]);e("break")("}")}else e("var e;")("if(e=types[%d].verify(%s))",r,i)("return e");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",n(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",n(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",n(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",n(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",n(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",n(t,"buffer"))}}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9]\\d*)$/.test(%s))",r)("return%j",n(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9]\\d*))$/.test(%s))",r)("return%j",n(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",r)("return%j",n(t,"boolean key"))}}function o(e){var t=e.fieldsArray;if(!t.length)return a.codegen()("return null");for(var r=a.codegen("m"),o=0;o<t.length;++o){var f=t[o].resolve(),l="m"+a.safeProp(f.name);f.map?(r("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",n(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),s(r,f,"k[i]"),i(r,f,o,l+"[k[i]]"),r("}")("}")):f.repeated?(r("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",n(f,"array"))("for(var i=0;i<%s.length;++i){",l),i(r,f,o,l+"[i]"),r("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof u?r("if(%s!==undefined){",l):r("if(%s!==undefined&&%s!==null){",l,l)),i(r,f,o,l),f.required||r("}"))}return r("return null")}t.exports=o;var u=e(17),a=e(35)},{17:17,35:35}],39:[function(e,t,r){"use strict";function n(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var h,c=e(37),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=e(40)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(a,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(f,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(f,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(f,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(l,4,e>>>0)},y.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(g,4,e)};var m="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(m,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};y.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.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 n(i,0,0),this.len=0),this},y.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{37:37,40:40}],40:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?a.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(39),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(37),a=u.utf8,f=u.Buffer;n.alloc=function(e){return(n.alloc=f.allocUnsafe)(e)};var l=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=f.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(l,t,e),this},o.string=function(e){var t=f.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{37:37,39:39}],41:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.i()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e(32),o.parse=e(25),o.common=e(12)}catch(e){}o.Writer=e(39),o.BufferWriter=e(40),o.Reader=e(26),o.BufferReader=e(27),o.encoder=e(16),o.decoder=e(15),o.verifier=e(38),o.converter=e(13),o.ReflectionObject=e(23),o.Namespace=e(22),o.Root=e(28),o.Enum=e(17),o.Type=e(33),o.Field=e(18),o.OneOf=e(24),o.MapField=e(19),o.Service=e(31),o.Method=e(21),o.Class=e(11),o.Message=e(20),o.types=e(34),o.rpc=e(29),o.util=e(35),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,31:31,32:32,33:33,34:34,35:35,38:38,39:39,40:40}]},{},[41]); | ||
!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){"use strict";function n(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=n},{}],2:[function(e,t,r){"use strict";var n=r;n.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var i=new Array(64),s=new Array(123),o=0;o<64;)s[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,r){for(var n,s=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:s[o++]=i[a>>2],n=(3&a)<<4,u=1;break;case 1:s[o++]=i[n|a>>4],n=(15&a)<<2,u=2;break;case 2:s[o++]=i[n|a>>6],s[o++]=i[63&a],u=0}}return u&&(s[o++]=i[n],s[o]=61,1===u&&(s[o+1]=61)),String.fromCharCode.apply(String,s)};var u="invalid encoding";n.decode=function(e,t,r){for(var n,i=r,o=0,a=0;a<e.length;){var f=e.charCodeAt(a++);if(61===f&&o>1)break;if(void 0===(f=s[f]))throw Error(u);switch(o){case 0:n=f,o=1;break;case 1:t[r++]=n<<2|(48&f)>>4,n=f,o=2;break;case 2:t[r++]=(15&n)<<4|(60&f)>>2,n=f,o=3;break;case 3:t[r++]=(3&n)<<6|f,o=0}}if(1===o)throw Error(u);return r-i},n.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,t,r){"use strict";function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=c;if(h.length){var p=h[h.length-1];s.test(p)?l=++c:a.test(p)&&++l,u.test(p)&&!u.test(n)?(l=++c,d=!0):d&&f.test(p)&&(l=--c,d=!1),o.test(n)&&(l=--c)}for(r=0;r<l;++r)n="\t"+n;return h.push(n),e}function t(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(", ")+") {\n"+h.join("\n")+"\n}"}function r(t,r){"object"==typeof t&&(r=t,t=void 0);var i=e.str(t);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(e){return r[e]}))}for(var l=[],h=[],c=1,d=!1,p=0;p<arguments.length;)l.push(arguments[p++]);return e.str=t,e.eof=r,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);return r=0,e.replace(/%([djs])/g,function(e,n){var i=t[r++];switch(n){case"j":return JSON.stringify(i);default:return String(i)}})}t.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,t,r){"use strict";function n(){this.a={}}t.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,t){if(void 0===e)this.a={};else if(void 0===t)this.a[e]=[];else for(var r=this.a[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t,r){"use strict";function n(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=n},{}],6:[function(e,t,r){"use strict";function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,t){var r=new XMLHttpRequest;r.onreadystatechange=function(){return 4===r.readyState?0===r.status||200===r.status?t(null,r.responseText):t(Error("status "+r.status)):void 0},r.open("GET",e),r.send()}t.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],8:[function(e,t,r){"use strict";var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t,r){"use strict";function n(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=n},{}],10:[function(e,t,r){"use strict";var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t,r){"use strict";function n(e){return i(e)}function i(t,r){if(s||(s=e(33)),!(t instanceof s))throw TypeError("type must be a Type");if(r){if("function"!=typeof r)throw TypeError("ctor must be a function")}else r=u.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:o});r.constructor=n;var i=r.prototype=new o;return i.constructor=r,u.merge(r,o,!0),r.$type=t,i.$type=t,t.fieldsArray.forEach(function(e){i[e.name]=Array.isArray(e.resolve().defaultValue)?u.emptyArray:u.isObject(e.defaultValue)&&!e.long?u.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(i,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,n=0;n<r.length;++n)r[n]!==t&&delete this[r[n]]}})}),t.ctor=r,i}t.exports=n;var s,o=e(20),u=e(35);n.create=i,n.prototype=o},{20:20,33:33,35:35}],12:[function(e,t,r){"use strict";function n(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}t.exports=n,n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var i;n("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:i}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){"use strict";function n(e,t,r){if(e.resolvedType)return e.resolvedType instanceof s?a("f.enums(s%s,%d,types[%d].values,o)",r,e.typeDefault,t):a("types[%d].convert(s%s,f,o)",t,r);switch(e.type){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":return a("f.longs(s%s,%d,%d,%j,o)",r,e.typeDefault.low,e.typeDefault.high,"u"===e.type.charAt(0));case"bytes":return a("f.bytes(s%s,%j,o)",r,Array.prototype.slice.call(e.typeDefault))}return null}function i(e){var t=e.fieldsArray,r=u.codegen("s","f","o")("if(!o)")("o={}")("var d=f.create(s,this,o)");if(t.length){r("if(d){");var i;t.forEach(function(e,t){var o=e.resolve().b;e.repeated?(r("if(s%s&&s%s.length){",o,o)("d%s=[]",o)("for(var i=0;i<s%s.length;++i)",o),(i=n(e,t,o+"[i]"))?r("d%s.push(%s)",o,i):r("d%s.push(s%s[i])",o,o),r("}else if(o.defaults||o.arrays)")("d%s=[]",o)):(i=n(e,t,o))?(e.long?r("if(o.defaults||s%s!==undefined&&s%s!==null&&util.longNe(s%s,%d,%d))",o,o,o,e.typeDefault.low,e.typeDefault.high):!e.resolvedType||e.resolvedType instanceof s?r("if(o.defaults||s%s!==undefined&&s%s!==%j)",o,o,e.typeDefault):r("if(o.defaults||s%s!==undefined&&s%s!==null)",o,o),r("d%s=%s",o,i)):r("if(d%s===undefined&&o.defaults)",o)("d%s=%j",o,e.typeDefault)}),r("}")}return r("return d")}t.exports=i;var s=e(17),o=e(14),u=e(35),a=u.codegen.sprintf;u.merge(i,o)},{14:14,17:17,35:35}],14:[function(e,t,r){"use strict";var n=r,i=e(37);n.json={create:function(e,t,r){return e?r.fieldsOnly?{}:i.merge({},e):null},enums:function(e,t,r,n){return void 0===e&&(e=t),n.enums===String&&"number"==typeof e?r[e]:e},longs:function(e,t,r,n,s){return void 0!==e&&null!==e||(e={low:t,high:r}),s.longs===Number?"number"==typeof e?e:i.LongBits.from(e).toNumber(n):s.longs===String?"number"==typeof e?i.Long.fromNumber(e,n).toString():(e=i.Long.fromValue(e),e.unsigned=n,e.toString()):e},bytes:function(e,t,r){if(e){if(!e.length&&!r.defaults)return}else e=t;return r.bytes===String?i.base64.encode(e,0,e.length):r.bytes===Array?Array.prototype.slice.call(e):r.bytes!==i.Buffer||i.Buffer.isBuffer(e)?e:i.Buffer.from(e)}},n.message={create:function(e,t,r){return e?new(t.ctor?t.ctor:t)(r.fieldsOnly?void 0:e):null},enums:function(e,t,r){return"string"==typeof e?r[e]:e},longs:function(e,t,r,n){return"string"==typeof e?i.Long.fromString(e,n):"number"==typeof e?i.Long.fromNumber(e,n):e},bytes:function(e){if(i.Buffer)return i.Buffer.isBuffer(e)?e:i.Buffer.from(e,"base64");if("string"==typeof e){var t=i.newBuffer(i.base64.length(e));return i.base64.decode(e,t,0),t}return e instanceof i.Array?e:new i.Array(e)}}},{37:37}],15:[function(e,t,r){"use strict";function n(e){var t=e.fieldsArray,r=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var u=0;u<t.length;++u){var a=t[u].resolve(),f=a.resolvedType instanceof i?"uint32":a.type,l="m"+a.b;if(r("case %d:",a.id),a.map){var h=a.resolvedKeyType?"uint32":a.keyType;r("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("var k=r.%s()",h)('if(typeof k==="object")')("k=util.longToHash(k)")("r.pos++"),void 0===s.basic[f]?r("%s[k]=types[%d].decode(r,r.uint32())",l,u):r("%s[k]=r.%s()",l,f)}else a.repeated?(r("if(!(%s&&%s.length))",l,l)("%s=[]",l),(n.compat||a.packed)&&void 0!==s.packed[f]&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,f)("}else"),void 0===s.basic[f]?r(a.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,u):r("%s.push(r.%s())",l,f)):void 0===s.basic[f]?r(a.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,u):r("%s=r.%s()",l,f);r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}t.exports=n,n.compat=!0;var i=e(17),s=e(34),o=e(35)},{17:17,34:34,35:35}],16:[function(e,t,r){"use strict";function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var t,r,i=e.fieldsArray,a=e.oneofsArray,f=u.codegen("m","w")("if(!w)")("w=Writer.create()"),t=0;t<i.length;++t){var l=i[t].resolve(),h=l.resolvedType instanceof s?"uint32":l.type,c=o.basic[h];if(r="m"+l.b,l.map){var d=l.resolvedKeyType?"uint32":l.keyType;f("if(%s&&%s!==util.emptyObject){",r,r)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[d],d),void 0===c?f("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",t,r):f(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|c,h,r),f("}")("}")}else l.repeated?l.packed&&void 0!==o.packed[h]?f("if(%s&&%s.length){",r,r)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",h,r)("w.ldelim()",l.id)("}"):(f("if(%s){",r)("for(var i=0;i<%s.length;++i)",r),void 0===c?n(f,l,t,r+"[i]"):f("w.uint32(%d).%s(%s[i])",(l.id<<3|c)>>>0,h,r),f("}")):l.partOf||(l.required||(l.long?f("if(%s!==undefined&&%s!==null&&util.longNe(%s,%d,%d))",r,r,r,l.defaultValue.low,l.defaultValue.high):l.bytes?f("if(%s&&%s.length"+(l.defaultValue.length?"&&util.arrayNe(%s,%j)":"")+")",r,r,r,Array.prototype.slice.call(l.defaultValue)):f("if(%s!==undefined&&%s!==%j)",r,r,l.defaultValue)),void 0===c?n(f,l,t,r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r))}for(var t=0;t<a.length;++t){var p=a[t];f("switch(%s){","m"+p.b);for(var v=p.fieldsArray,y=0;y<v.length;++y){var l=v[y],h=l.resolvedType instanceof s?"uint32":l.type,c=o.basic[h];r="m"+l.b,f("case%j:",l.name),void 0===c?n(f,l,i.indexOf(l),r):f("w.uint32(%d).%s(%s)",(l.id<<3|c)>>>0,h,r),f("break")}f("}")}return f("return w")}t.exports=i;var s=e(17),o=e(34),u=e(35)},{17:17,34:34,35:35}],17:[function(e,t,r){"use strict";function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById);var n=this;Object.keys(t||{}).forEach(function(e){var r;"number"==typeof t[e]?r=t[e]:(r=parseInt(e,10),e=t[e]),n.valuesById[n.values[e]=r]=e})}t.exports=n;var i=e(23),s=i.extend(n);n.className="Enum";var o=e(35);n.testJSON=function(e){return Boolean(e&&e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(void 0!==this.valuesById[t])throw Error("duplicate id "+t+" in "+this);return this.valuesById[this.values[e]=t]=e,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(void 0===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[t],delete this.values[e],this}},{23:23,35:35}],18:[function(e,t,r){"use strict";function n(e,t,r,n,s,o){if(l.isObject(n)?(o=n,n=s=void 0):l.isObject(s)&&(o=s,s=void 0),i.call(this,e,o),!l.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!l.isString(r))throw TypeError("type must be a string");if(void 0!==s&&!l.isString(s))throw TypeError("extend must be a string");if(void 0!==n&&!/^required|optional|repeated$/.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=s||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null,this.b=l.safeProp(this.name)}t.exports=n;var i=e(23),s=i.extend(n);n.className="Field";var o,u,a=e(17),f=e(34),l=e(35);Object.defineProperty(s,"packed",{get:function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}),s.setOption=function(e,t,r){return"packed"===e&&(this.c=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return Boolean(e&&void 0!==e.id)},n.fromJSON=function(t,r){return void 0!==r.keyType?(u||(u=e(19)),u.fromJSON(t,r)):new n(t,r.id,r.type,r.rule,r.extend,r.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=f.defaults[this.type]))if(o||(o=e(33)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&void 0!==this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.defaultValue])),this.long)this.typeDefault=l.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,t=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,t=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{17:17,19:19,23:23,33:33,34:34,35:35}],19:[function(e,t,r){"use strict";function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=n;var i=e(18),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(34),a=e(35);n.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(void 0===u.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{18:18,34:34,35:35}],20:[function(e,t,r){"use strict";function n(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=n;var i=e(14),s=n.prototype;s.asJSON=function(e){return this.$type.convert(this,i.json,e)},n.from=function(e,t){return this.$type.convert(e,i.message,t)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.convert=function(e,t,r){return this.$type.convert(e,t,r)}},{14:14}],21:[function(e,t,r){"use strict";function n(e,t,r,n,s,o,a){if(u.isObject(s)?(a=s,s=o=void 0):u.isObject(o)&&(a=o,o=void 0),t&&!u.isString(t))throw TypeError("type must be a string");if(!u.isString(r))throw TypeError("requestType must be a string");if(!u.isString(n))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=n,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=n;var i=e(23),s=i.extend(n);n.className="Method";var o=e(33),u=e(35);n.testJSON=function(e){return Boolean(e&&void 0!==e.requestType)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||void 0,requestType:this.requestType,requestStream:this.requestStream||void 0,responseType:this.responseType,responseStream:this.responseStream||void 0,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{23:23,33:33,35:35}],22:[function(e,t,r){"use strict";function n(){f||(f=e(33)),l||(l=e(31)),h=[d,f,l,p,i],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e,t){u.call(this,e,t),this.nested=void 0,this.d=null,this.e=[]}function s(e){e.d=null;for(var t=0;t<e.e.length;++t)delete e[e.e[t]];return e.e=[],e}function o(e){if(e&&e.length){for(var t={},r=0;r<e.length;++r)t[e[r].name]=e[r].toJSON();return t}}t.exports=i;var u=e(23),a=u.extend(i);i.className="Namespace";var f,l,h,c,d=e(17),p=e(18),v=e(35);Object.defineProperty(a,"nestedArray",{get:function(){return this.d||(this.d=v.toArray(this.nested))}}),i.testJSON=function(e){return Boolean(e&&!e.fields&&!e.values&&void 0===e.id&&!e.oneof&&!e.methods&&void 0===e.requestType)},i.fromJSON=function(e,t){return new i(e,t.options).addJSON(t.nested)},a.toJSON=function(){return{options:this.options,nested:o(this.nestedArray)}},i.arrayToJSON=o,a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return void 0===this.nested?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof d)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof p&&void 0===e.extend)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof i&&e instanceof i)||t instanceof f||t instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,o=0;o<r.length;++o)e.add(r[o]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),s(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),s(this)},a.define=function(e,t){v.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var r=this;if(e)for(;e.length>0;){var n=e.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 t&&r.addJSON(t),r},a.resolve=function(){f||(f=e(33)),l||(f=e(31));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof d))continue;this[t[r].name]=t[r].values}this.e.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof i?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,t,r){if("boolean"==typeof t&&(r=t,t=void 0),v.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);return n&&1===e.length&&(!t||n instanceof t)||n instanceof i&&(n=n.lookup(e.slice(1),t,!0))?n:null===this.parent||r?null:this.parent.lookup(e,t)},a.lookupType=function(t){f||(f=e(33));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(31));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,d);if(!t)throw Error("no such enum");return t.values}},{17:17,18:18,23:23,31:31,33:33,35:35}],23:[function(e,t,r){"use strict";function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1}t.exports=n;var i=e(35);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(28)),r instanceof s&&r.f(this)},o.onRemove=function(t){var r=t.root;s||(s=e(28)),r instanceof s&&r.g(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(28)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){if(this.options)return this.options[e]},o.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{28:28,35:35}],24:[function(e,t,r){"use strict";function n(e,t,r){if(Array.isArray(t)||(r=t,t=void 0),s.call(this,e,r),t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.h=[],this.b=a.safeProp(this.name)}function i(e){e.parent&&e.h.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=n;var s=e(23),o=s.extend(n);n.className="OneOf";var u=e(18),a=e(35);Object.defineProperty(o,"fieldsArray",{get:function(){return this.h}}),n.testJSON=function(e){return Boolean(e.oneof)},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.h.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.h.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.h.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.h.push(n))}),i(this)},o.onRemove=function(e){this.h.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{18:18,23:23,35:35}],25:[function(e,t,r){"use strict";function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,t,r){function w(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=W())&&"'"!==e)throw w(e);t.push(W()),Q(e),e=G()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=W();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return A(t)}catch(r){if(e&&i(t))return t;throw w(t,"value")}}function O(){var e=N(W()),t=e;return Q("to",!0)&&(t=N(W())),Q(";"),[e,t]}function A(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw w(e,"number")}function N(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw w(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw w(e,"id")}function S(){if(void 0!==P)throw w("package");if(P=W(),!i(P))throw w(P,"name");re=re.define(P),Q(";")}function T(){var e,t=G();switch(t){case"weak":e=H||(H=[]),W();break;case"public":W();default:e=_||(_=[])}t=k(),Q(";"),e.push(t)}function j(){if(Q("="),Z=o(k()),ee="proto3"===Z,!ee&&"proto2"!==Z)throw w(Z,"syntax");Q(";")}function E(e,t){switch(t){case"option":return $(e,t),Q(";"),!0;case"message":return B(e,t),!0;case"enum":return V(e,t),!0;case"service":return C(e,t),!0;case"extend":return U(e,t),!0}return!1}function B(e,t){var r=W();if(!n(r))throw w(r,"type name");var s=new h(r);if(Q("{",!0)){for(;"}"!==(t=W());){var u=o(t);if(!E(s,t))switch(u){case"map":q(s,u);break;case"required":case"optional":case"repeated":J(s,u);break;case"oneof":D(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(O(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(O(s,u));break;default:if(!ee||!i(t))throw w(t);X(t),J(s,"optional")}}Q(";",!0)}else Q(";");e.add(s)}function J(e,t,r){var s=W();if("group"===o(s))return void L(e,t);if(!i(s))throw w(s,"type");var u=W();if(!n(u))throw w(u,"name");u=ne(u),Q("=");var a=N(W()),f=R(new c(u,a,s,t,r));f.repeated&&void 0!==g.packed[s]&&!ee&&f.setOption("packed",!1,!0),e.add(f)}function L(e,t){var r=W();if(!n(r))throw w(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Q("=");var s=N(W()),u=new h(r);u.group=!0;var a=new c(i,s,r,t);for(Q("{");"}"!==(te=W());)switch(te=o(te)){case"option":$(u,te),Q(";");break;case"required":case"optional":case"repeated":J(u,te);break;default:throw w(te)}Q(";",!0),e.add(u).add(a)}function q(e){Q("<");var t=W();if(void 0===g.mapKey[t])throw w(t,"type");Q(",");var r=W();if(!i(r))throw w(r,"type");Q(">");var s=W();if(!n(s))throw w(s,"name");s=ne(s),Q("=");var o=N(W()),u=R(new d(s,o,t,r));e.add(u)}function D(e,t){var r=W();if(!n(r))throw w(r,"name");r=ne(r);var i=new p(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===t?($(i,t),Q(";")):(X(t),J(i,"optional"));Q(";",!0)}else Q(";");e.add(i)}function V(e,t){var r=W();if(!n(r))throw w(r,"name");var i=new v(r);if(Q("{",!0)){for(;"}"!==(t=W());)"option"===o(t)?($(i,t),Q(";")):z(i,t);Q(";",!0)}else Q(";");e.add(i)}function z(e,t){if(!n(t))throw w(t,"name");var r=t;Q("=");var i=N(W(),!0);e.add(r,i),R({})}function $(e,t){var r=Q("(",!0),n=W();if(!i(n))throw w(n,"name");r&&(Q(")"),n="("+n+")",t=G(),s(t)&&(n+=t,W())),Q("="),F(e,n)}function F(e,t){if(Q("{",!0))for(;"}"!==(te=W());){if(!n(te))throw w(te,"name");t=t+"."+te,Q(":",!0)?I(e,t,x(!0)):F(e,t)}else I(e,t,x(!0))}function I(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function R(e){if(Q("[",!0)){do $(e,"option");while(Q(",",!0));Q("]")}return Q(";"),e}function C(e,t){if(t=W(),!n(t))throw w(t,"service name");var r=t,i=new y(r);if(Q("{",!0)){for(;"}"!==(t=W());){var s=o(t);switch(s){case"option":$(i,s),Q(";");break;case"rpc":M(i,s);break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(i)}function M(e,t){var r=t,s=W();if(!n(s))throw w(s,"name");var u,a,f,l;Q("(");var h;if(Q(h="stream",!0)&&(a=!0), | ||
!i(t=W()))throw w(t);if(u=t,Q(")"),Q("returns"),Q("("),Q(h,!0)&&(l=!0),!i(t=W()))throw w(t);f=t,Q(")");var c=new m(s,r,u,f,a,l);if(Q("{",!0)){for(;"}"!==(t=W());){var d=o(t);switch(d){case"option":$(c,d),Q(";");break;default:throw w(t)}}Q(";",!0)}else Q(";");e.add(c)}function U(e,t){var r=W();if(!i(r))throw w(r,"reference");if(Q("{",!0)){for(;"}"!==(t=W());){var n=o(t);switch(n){case"required":case"repeated":case"optional":J(e,n,r);break;default:if(!ee||!i(t))throw w(t);X(t),J(e,"optional",r)}}Q(";",!0)}else Q(";")}t instanceof l||(r=t,t=new l),r||(r=a.defaults);var P,_,H,Z,K=f(e),W=K.next,X=K.push,G=K.peek,Q=K.skip,Y=!0,ee=!1;t||(t=new l);for(var te,re=t,ne=r.keepCase?function(e){return e}:u;null!==(te=W());){var ie=o(te);switch(ie){case"package":if(!Y)throw w(te);S();break;case"import":if(!Y)throw w(te);T();break;case"syntax":if(!Y)throw w(te);j();break;case"option":if(!Y)throw w(te);$(re,te),Q(";");break;default:if(E(re,te)){Y=!1;continue}throw w(te)}}return a.filename=null,{package:P,imports:_,weakImports:H,syntax:Z,root:t}}t.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(32),l=e(28),h=e(33),c=e(18),d=e(19),p=e(24),v=e(17),y=e(31),m=e(21),g=e(34),b=e(35)},{17:17,18:18,19:19,21:21,24:24,28:28,31:31,32:32,33:33,34:34,35:35}],26:[function(e,t,r){"use strict";function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}function s(){var e=new k(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function o(){return s.call(this).toLong()}function u(){return s.call(this).toNumber()}function a(){return s.call(this).toLong(!0)}function f(){return s.call(this).toNumber(!0)}function l(){return s.call(this).zzDecode().toLong()}function h(){return s.call(this).zzDecode().toNumber()}function c(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw n(this,8);return new k(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function m(){return d.call(this).zzDecode().toNumber()}function g(){w.Long?(O.int64=o,O.uint64=a,O.sint64=l,O.fixed64=p,O.sfixed64=y):(O.int64=u,O.uint64=f,O.sint64=h,O.fixed64=v,O.sfixed64=m)}t.exports=i;var b,w=e(37),k=w.LongBits,x=w.utf8;i.create=w.Buffer?function(t){return b||(b=e(27)),(i.create=function(e){return w.Buffer.isBuffer(e)?new b(e):new i(e)})(t)}:function(e){return new i(e)};var O=i.prototype;O.i=w.Array.prototype.subarray||w.Array.prototype.slice,O.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),O.int32=function(){return 0|this.uint32()},O.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},O.bool=function(){return 0!==this.uint32()},O.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},O.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var A="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=c(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};O.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=A(this.buf,this.pos);return this.pos+=4,e};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=c(e,t+4),n=c(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};O.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=N(this.buf,this.pos);return this.pos+=8,e},O.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.i.call(this.buf,t,r)},O.string=function(){var e=this.bytes();return x.read(e,0,e.length)},O.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},O.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i.j=g,g()},{27:27,37:37}],27:[function(e,t,r){"use strict";function n(e){i.call(this,e)}t.exports=n;var i=e(26),s=n.prototype=Object.create(i.prototype);s.constructor=n;var o=e(37);o.Buffer&&(s.i=o.Buffer.prototype.slice),s.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{26:26,37:37}],28:[function(e,t,r){"use strict";function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new l(e.fullName,e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=n;var o=e(22),u=o.extend(n);n.className="Root";var a,f,l=e(18),h=e(35);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(25),f=e(12)}catch(e){}c=null};u.load=function e(t,r,n){function s(e,t){if(n){var r=n;n=null,r(e,t)}}function o(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){a.filename=e;var n=a(t,l,r);n.imports&&n.imports.forEach(function(t){u(l.resolvePath(e,t))}),n.weakImports&&n.weakImports.forEach(function(t){u(l.resolvePath(e,t),!0)})}else l.setOptions(t.options).addJSON(t.nested)}catch(e){if(d)throw e;return void s(e)}d||p||s(null,l)}function u(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var i=e.substring(r);i in f&&(e=i)}if(!(l.files.indexOf(e)>-1)){if(l.files.push(e),e in f)return void(d?o(e,f[e]):(++p,setTimeout(function(){--p,o(e,f[e])})));if(d){var u;try{u=h.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++p,h.fetch(e,function(r,i){if(--p,n)return r?void(t||s(r)):void o(e,i)})}}c&&c(),"function"==typeof r&&(n=r,r=void 0);var l=this;if(!n)return h.asPromise(e,l,t);var d=n===i,p=0;return h.isString(t)&&(t=[t]),t.forEach(function(e){u(l.resolvePath("",e))}),d?l:void(p||s(null,l))},u.loadSync=function(e,t){return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.f=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r<t.length;)s(t[r])?t.splice(r,1):++r;if(this.deferred=t,e instanceof l&&void 0!==e.extend&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var n=e.nestedArray;for(r=0;r<n.length;++r)this.f(n[r])}},u.g=function(e){if(e instanceof l){if(void 0!==e.extend&&!e.extensionField){var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.nestedArray,n=0;n<r.length;++n)this.g(r[n])}},{12:12,18:18,22:22,25:25,35:35}],29:[function(e,t,r){"use strict";var n=r;n.Service=e(30)},{30:30}],30:[function(e,t,r){"use strict";function n(e){i.call(this),this.$rpc=e}t.exports=n;var i=e(35).EventEmitter,s=n.prototype=Object.create(i.prototype);s.constructor=n,s.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{35:35}],31:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.methods={},this.k=null}function i(e){return e.k=null,e}t.exports=n;var s=e(22),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(21),f=e(35),l=e(29);Object.defineProperty(u,"methodsArray",{get:function(){return this.k||(this.k=f.toArray(this.methods))}}),n.testJSON=function(e){return Boolean(e&&e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||void 0}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof a?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof a){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,t,r){var n=new l.Service(e);return this.methodsArray.forEach(function(i){n[f.lcFirst(i.name)]=function(s,o){if(n.$rpc){if(!s)throw TypeError("request must not be null");i.resolve();var u;try{u=(t?i.resolvedRequestType.encodeDelimited(s):i.resolvedRequestType.encode(s)).finish()}catch(e){return void("function"==typeof setImmediate?setImmediate:setTimeout)(function(){o(e)})}e(i,u,function(e,t){if(e)return n.emit("error",e,i),o?o(e):void 0;if(null===t)return void n.end(!0);var s;try{s=r?i.resolvedResponseType.decodeDelimited(t):i.resolvedResponseType.decode(t)}catch(e){return n.emit("error",e,i),o?o("error",e):void 0}return n.emit("data",s,i),o?o(null,s):void 0})}}}),n}},{21:21,22:22,29:29,35:35}],32:[function(e,t,r){"use strict";function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function i(e){function t(e){return Error("illegal "+e+" (line "+p+")")}function r(){var r="'"===y?u:o;r.lastIndex=c-1;var i=r.exec(e);if(!i)throw t("string");return c=r.lastIndex,f(y),y=null,n(i[1])}function i(t){return e.charAt(t)}function a(){if(v.length>0)return v.shift();if(y)return r();var n,o,u;do{if(c===d)return null;for(n=!1;/\s/.test(u=i(c));)if("\n"===u&&++p,++c===d)return null;if("/"===i(c)){if(++c===d)throw t("comment");if("/"===i(c)){for(;"\n"!==i(++c);)if(c===d)return null;++c,++p,n=!0}else{if("*"!==(u=i(c)))return"/";do{if("\n"===u&&++p,++c===d)return null;o=u,u=i(c)}while("*"!==o||"/"!==u);++c,n=!0}}}while(n);if(c===d)return null;var a=c;s.lastIndex=0;var f=s.test(i(a++));if(!f)for(;a<d&&!s.test(i(a));)++a;var l=e.substring(c,c=a);return'"'!==l&&"'"!==l||(y=l),l}function f(e){v.push(e)}function l(){if(!v.length){var e=a();if(null===e)return null;f(e)}return v[0]}function h(e,r){var n=l(),i=n===e;if(i)return a(),!0;if(!r)throw t("token '"+n+"', '"+e+"' expected");return!1}e=e.toString();var c=0,d=e.length,p=1,v=[],y=null;return{line:function(){return p},next:a,peek:l,push:f,skip:h}}t.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],33:[function(e,t,r){"use strict";function n(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.l=null,this.h=null,this.m=null,this.n=null}function i(e){return e.l=e.h=e.m=e.n=null,delete e.encode,delete e.decode,delete e.verify,e}t.exports=n;var s=e(22),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(17),f=e(24),l=e(18),h=e(31),c=e(11),d=e(20),p=e(26),v=e(39),y=e(35),m=e(16),g=e(15),b=e(38),w=e(13);Object.defineProperties(u,{fieldsById:{get:function(){if(this.l)return this.l;this.l={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.l[n])throw Error("duplicate id "+n+" in "+this);this.l[n]=r}return this.l}},fieldsArray:{get:function(){return this.h||(this.h=y.toArray(this.fields))}},oneofsArray:{get:function(){return this.m||(this.m=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof d))throw TypeError("ctor must be a Message constructor");e.from||(e.from=d.from),this.n=e}}}),n.testJSON=function(e){return Boolean(e&&e.fields)};var k=[a,n,l,h];n.fromJSON=function(e,t){var r=new n(e,t.options);return r.extensions=t.extensions,r.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){r.add(l.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){r.add(f.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var n=t.nested[e],i=0;i<k.length;++i)if(k[i].testJSON(n))return void r.add(k[i].fromJSON(e,n));throw Error("invalid nested object in "+r+": "+e)}),t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:void 0,reserved:this.reserved&&this.reserved.length?this.reserved:void 0,group:this.group||void 0,nested:e&&e.nested||void 0}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof l&&void 0===e.extend){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&void 0===e.extend){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.from=function(e,t){return this.convert(e,w.message,t)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:v,types:t,util:y}),this.decode=g(this).eof(e+"$decode",{Reader:p,types:t,util:y}),this.verify=b(this).eof(e+"$verify",{types:t,util:y}),this.convert=w(this).eof(e+"$convert",{types:t,util:y}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e=e instanceof p?e:p.create(e),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.convert=function(e,t,r){return this.setup().convert(e,t,r)}},{11:11,13:13,15:15,16:16,17:17,18:18,20:20,22:22,24:24,26:26,31:31,35:35,38:38,39:39}],34:[function(e,t,r){"use strict";function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(35),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes","message"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{35:35}],35:[function(e,t,r){"use strict";var n=t.exports=e(37);n.asPromise=e(1),n.codegen=e(3),n.EventEmitter=e(4),n.extend=e(5),n.fetch=e(6),n.path=e(8),n.fs=n.inquire("fs"),n.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},n.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)},n.newBuffer=function(e){return e=e||0,n.Buffer?n.Buffer.allocUnsafe(e):new("undefined"!=typeof Uint8Array?Uint8Array:Array)(e)}},{1:1,3:3,37:37,4:4,5:5,6:6,8:8}],36:[function(e,t,r){"use strict";function n(e,t){this.lo=e,this.hi=t}t.exports=n;var i=e(37),s=n.prototype,o=n.zero=new n(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var u=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,i=(e-r)/4294967296>>>0;return t&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new n(r,i)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if("string"==typeof e){if(!i.Long)return n.fromNumber(parseInt(e,10));e=i.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):o},s.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},s.toLong=function(e){return i.Long?new i.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===u?o:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{37:37}],37:[function(e,t,r){(function(t){"use strict";var n=r;n.base64=e(2),n.inquire=e(7),n.utf8=e(10),n.pool=e(9),n.LongBits=e(36),n.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node),n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),n.Array="undefined"==typeof Uint8Array?Array:Uint8Array,n.Long=t.dcodeIO&&t.dcodeIO.Long||n.inquire("long"),n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.longNe=function(e,t,r){if("object"==typeof e)return e.low!==t||e.high!==r;var i=n.LongBits.from(e);return i.lo!==t||i.hi!==r},n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.arrayNe=function(e,t){if(e.length===t.length)for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!0;return!1},n.merge=function(e,t,r){if(t)for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,2:2,36:36,7:7,9:9}],38:[function(e,t,r){"use strict";function n(e,t){return e.fullName.substring(1)+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof u){e("switch(%s){",i)("default:")("return%j",n(t,"enum value"));for(var s=a.toArray(t.resolvedType.values),o=0;o<s.length;++o)e("case %d:",s[o]);e("break")("}")}else e("var e;")("if(e=types[%d].verify(%s))",r,i)("return e");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",n(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",n(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",n(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",n(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",n(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",n(t,"buffer"))}}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9]\\d*)$/.test(%s))",r)("return%j",n(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9]\\d*))$/.test(%s))",r)("return%j",n(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",r)("return%j",n(t,"boolean key"))}}function o(e){var t=e.fieldsArray;if(!t.length)return a.codegen()("return null");for(var r=a.codegen("m"),o=0;o<t.length;++o){var f=t[o].resolve(),l="m"+f.b;f.map?(r("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",n(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),s(r,f,"k[i]"),i(r,f,o,l+"[k[i]]"),r("}")("}")):f.repeated?(r("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",n(f,"array"))("for(var i=0;i<%s.length;++i){",l),i(r,f,o,l+"[i]"),r("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof u?r("if(%s!==undefined){",l):r("if(%s!==undefined&&%s!==null){",l,l)),i(r,f,o,l),f.required||r("}"))}return r("return null")}t.exports=o;var u=e(17),a=e(35)},{17:17,35:35}],39:[function(e,t,r){"use strict";function n(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}t.exports=o;var h,c=e(37),d=c.LongBits,p=c.base64,v=c.utf8;o.create=c.Buffer?function(){return h||(h=e(40)),(o.create=function(){return new h})()}:function(){return new o},o.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(o.alloc=c.pool(o.alloc,c.Array.prototype.subarray));var y=o.prototype;y.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},y.uint32=function(e){return e>>>=0,this.push(a,e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)},y.int32=function(e){return e<0?this.push(f,10,d.fromNumber(e)):this.uint32(e)},y.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},y.uint64=function(e){var t=d.from(e);return this.push(f,t.length(),t)},y.int64=y.uint64,y.sint64=function(e){var t=d.from(e).zzEncode();return this.push(f,t.length(),t)},y.bool=function(e){return this.push(u,1,e?1:0)},y.fixed32=function(e){return this.push(l,4,e>>>0)},y.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},y.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},y.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var m="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};y.float=function(e){return this.push(m,4,e)};var g="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};y.double=function(e){return this.push(g,8,e)};var b=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};y.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=p.length(e));p.decode(e,r,0),e=r}return t?this.uint32(t).push(b,t,e):this.push(u,1,0)},y.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},y.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},y.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 n(i,0,0),this.len=0),this},y.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r).tail.next=e.next,this.tail=t,this.len+=r,this},y.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{37:37,40:40}],40:[function(e,t,r){"use strict";function n(){s.call(this)}function i(e,t,r){e.length<40?u.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=n;var s=e(39),o=n.prototype=Object.create(s.prototype);o.constructor=n;var u=e(37),a=u.Buffer;n.alloc=function(e){return(n.alloc=a.allocUnsafe)(e)};var f=a&&a.prototype instanceof Uint8Array&&"set"===a.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){e.copy(t,r,0,e.length)};o.bytes=function(e){"string"==typeof e&&(e=a.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(f,t,e),this},o.string=function(e){var t=a.byteLength(e);return this.uint32(t),t&&this.push(i,t,e),this}},{37:37,39:39}],41:[function(e,t,r){(function(t){"use strict";function n(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function i(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){o.Reader.j()}var o=t.protobuf=r;o.load=n,o.loadSync=i,o.roots={};try{o.tokenize=e(32),o.parse=e(25),o.common=e(12)}catch(e){}o.Writer=e(39),o.BufferWriter=e(40),o.Reader=e(26),o.BufferReader=e(27),o.encoder=e(16),o.decoder=e(15),o.verifier=e(38),o.converter=e(13),o.ReflectionObject=e(23),o.Namespace=e(22),o.Root=e(28),o.Enum=e(17),o.Type=e(33),o.Field=e(18),o.OneOf=e(24),o.MapField=e(19),o.Service=e(31),o.Method=e(21),o.Class=e(11),o.Message=e(20),o.types=e(34),o.rpc=e(29),o.util=e(35),o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,31:31,32:32,33:33,34:34,35:35,38:38,39:39,40:40}]},{},[41]); | ||
//# sourceMappingURL=protobuf.min.js.map |
/*! | ||
* protobuf.js v6.4.1 (c) 2016, Daniel Wirtz | ||
* Compiled Wed, 04 Jan 2017 12:36:42 UTC | ||
* protobuf.js v6.4.2 (c) 2016, Daniel Wirtz | ||
* Compiled Fri, 06 Jan 2017 00:11:13 UTC | ||
* Licensed under the BSD-3-Clause License | ||
@@ -990,2 +990,3 @@ * see: https://github.com/dcodeIO/protobuf.js for details | ||
// extends Reader | ||
var Reader = require(7); | ||
@@ -1955,2 +1956,3 @@ /** @alias BufferReader.prototype */ | ||
// extends Writer | ||
var Writer = require(11); | ||
@@ -1963,4 +1965,3 @@ /** @alias BufferWriter.prototype */ | ||
var utf8 = util.utf8, | ||
Buffer = util.Buffer; | ||
var Buffer = util.Buffer; | ||
@@ -2010,3 +2011,3 @@ /** | ||
if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) | ||
utf8.write(val, buf, pos); | ||
util.utf8.write(val, buf, pos); | ||
else | ||
@@ -2013,0 +2014,0 @@ buf.utf8Write(val, pos); |
/*! | ||
* protobuf.js v6.4.1 (c) 2016, Daniel Wirtz | ||
* Compiled Wed, 04 Jan 2017 12:36:42 UTC | ||
* protobuf.js v6.4.2 (c) 2016, Daniel Wirtz | ||
* Compiled Fri, 06 Jan 2017 00:11:13 UTC | ||
* Licensed under the BSD-3-Clause License | ||
* see: https://github.com/dcodeIO/protobuf.js for details | ||
*/ | ||
!function t(n,r,i){function e(s,u){if(!r[s]){if(!n[s]){var f="function"==typeof require&&require;if(!u&&f)return f(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var a=r[s]={exports:{}};n[s][0].call(a.exports,function(t){var r=n[s][1][t];return e(r?r:t)},a,a.exports,t,n,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)e(i[s]);return e}({1:[function(t,n,r){"use strict";var i=r;i.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&"="===t.charAt(n);)++r;return Math.ceil(3*t.length)/4-r};for(var e=new Array(64),o=new Array(123),s=0;s<64;)o[e[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(t,n,r){for(var i,o=[],s=0,u=0;n<r;){var f=t[n++];switch(u){case 0:o[s++]=e[f>>2],i=(3&f)<<4,u=1;break;case 1:o[s++]=e[i|f>>4],i=(15&f)<<2,u=2;break;case 2:o[s++]=e[i|f>>6],o[s++]=e[63&f],u=0}}return u&&(o[s++]=e[i],o[s]=61,1===u&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";i.decode=function(t,n,r){for(var i,e=r,s=0,f=0;f<t.length;){var h=t.charCodeAt(f++);if(61===h&&s>1)break;if(void 0===(h=o[h]))throw Error(u);switch(s){case 0:i=h,s=1;break;case 1:n[r++]=i<<2|(48&h)>>4,i=h,s=2;break;case 2:n[r++]=(15&i)<<4|(60&h)>>2,i=h,s=3;break;case 3:n[r++]=(3&i)<<6|h,s=0}}if(1===s)throw Error(u);return r-e},i.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],2:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},{}],3:[function(t,n,r){"use strict";function i(t,n,r){var i=r||8192,e=i>>>1,o=null,s=i;return function(r){if(r<1||r>e)return t(r);s+r>i&&(o=t(i),s=0);var u=n.call(o,s,s+=r);return 7&s&&(s=(7|s)+1),u}}n.exports=i},{}],4:[function(t,n,r){"use strict";var i=r;i.length=function(t){for(var n=0,r=0,i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?n+=1:r<2048?n+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(i+1))?(++i,n+=4):n+=3;return n},i.read=function(t,n,r){var i=r-n;if(i<1)return"";for(var e,o=null,s=[],u=0;n<r;)e=t[n++],e<128?s[u++]=e:e>191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},i.write=function(t,n,r){for(var i,e,o=r,s=0;s<t.length;++s)i=t.charCodeAt(s),i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):55296===(64512&i)&&56320===(64512&(e=t.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&e),++s,n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128);return r-o}},{}],5:[function(t,n,r){(function(n){"use strict";function i(){e.Reader.a()}var e=n.protobuf=r;e.Writer=t(11),e.BufferWriter=t(12),e.Reader=t(7),e.BufferReader=t(8),e.converters=t(6),e.util=t(10),e.roots={},e.configure=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(e.util.Long=t,i()),e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,6:6,7:7,8:8}],6:[function(t,n,r){"use strict";var i=r,e=t(10);i.json={create:function(t,n,r){return t?r.fieldsOnly?{}:e.merge({},t):null},enums:function(t,n,r,i){return void 0===t&&(t=n),i.enums===String&&"number"==typeof t?r[t]:t},longs:function(t,n,r,i,o){return void 0!==t&&null!==t||(t={low:n,high:r}),o.longs===Number?"number"==typeof t?t:e.LongBits.from(t).toNumber(i):o.longs===String?"number"==typeof t?e.Long.fromNumber(t,i).toString():(t=e.Long.fromValue(t),t.unsigned=i,t.toString()):t},bytes:function(t,n,r){if(t){if(!t.length&&!r.defaults)return}else t=n;return r.bytes===String?e.base64.encode(t,0,t.length):r.bytes===Array?Array.prototype.slice.call(t):r.bytes!==e.Buffer||e.Buffer.isBuffer(t)?t:e.Buffer.from(t)}},i.message={create:function(t,n,r){return t?new(n.ctor?n.ctor:n)(r.fieldsOnly?void 0:t):null},enums:function(t,n,r){return"string"==typeof t?r[t]:t},longs:function(t,n,r,i){return"string"==typeof t?e.Long.fromString(t,i):"number"==typeof t?e.Long.fromNumber(t,i):t},bytes:function(t){if(e.Buffer)return e.Buffer.isBuffer(t)?t:e.Buffer.from(t,"base64");if("string"==typeof t){var n=e.newBuffer(e.base64.length(t));return e.base64.decode(t,n,0),n}return t instanceof e.Array?t:new e.Array(t)}}},{10:10}],7:[function(t,n,r){"use strict";function i(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),n=0;if(this.len-this.pos>4){for(n=0;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(n=0;n<4;++n){if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(n=0;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(n=0;n<5;++n){if(this.pos>=this.len)throw i(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function s(){return o.call(this).toLong()}function u(){return o.call(this).toNumber()}function f(){return o.call(this).toLong(!0)}function h(){return o.call(this).toNumber(!0)}function a(){return o.call(this).zzDecode().toLong()}function l(){return o.call(this).zzDecode().toNumber()}function c(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw i(this,8);return new A(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function d(){return p.call(this).toLong(!0)}function g(){return p.call(this).toNumber(!0)}function b(){return p.call(this).zzDecode().toLong()}function y(){return p.call(this).zzDecode().toNumber()}function v(){w.Long?(B.int64=s,B.uint64=f,B.sint64=a,B.fixed64=d,B.sfixed64=b):(B.int64=u,B.uint64=h,B.sint64=l,B.fixed64=g,B.sfixed64=y)}n.exports=e;var m,w=t(10),A=w.LongBits,N=w.utf8;e.create=w.Buffer?function(n){return m||(m=t(8)),(e.create=function(t){return w.Buffer.isBuffer(t)?new m(t):new e(t)})(n)}:function(t){return new e(t)};var B=e.prototype;B.b=w.Array.prototype.subarray||w.Array.prototype.slice,B.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return t}}(),B.int32=function(){return 0|this.uint32()},B.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},B.bool=function(){return 0!==this.uint32()},B.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},B.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var x="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],t[0]}:function(r,i){return n[3]=r[i],n[2]=r[i+1],n[1]=r[i+2],n[0]=r[i+3],t[0]}}():function(t,n){var r=c(t,n+4),i=2*(r>>31)+1,e=r>>>23&255,o=8388607&r;return 255===e?o?NaN:i*(1/0):0===e?1.401298464324817e-45*i*o:i*Math.pow(2,e-150)*(o+8388608)};B.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=x(this.buf,this.pos);return this.pos+=4,t};var L="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],n[4]=r[i+4],n[5]=r[i+5],n[6]=r[i+6],n[7]=r[i+7],t[0]}:function(r,i){return n[7]=r[i],n[6]=r[i+1],n[5]=r[i+2],n[4]=r[i+3],n[3]=r[i+4],n[2]=r[i+5],n[1]=r[i+6],n[0]=r[i+7],t[0]}}():function(t,n){var r=c(t,n+4),i=c(t,n+8),e=2*(i>>31)+1,o=i>>>20&2047,s=4294967296*(1048575&i)+r;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};B.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=L(this.buf,this.pos);return this.pos+=8,t},B.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,n===r?new this.buf.constructor(0):this.b.call(this.buf,n,r)},B.string=function(){var t=this.bytes();return N.read(t,0,t.length)},B.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw i(this,t);this.pos+=t}else do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++]);return this},B.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},e.a=v,v()},{10:10,8:8}],8:[function(t,n,r){"use strict";function i(t){e.call(this,t)}n.exports=i;var e=t(7),o=i.prototype=Object.create(e.prototype);o.constructor=i;var s=t(10);s.Buffer&&(o.b=s.Buffer.prototype.slice),o.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{10:10,7:7}],9:[function(t,n,r){"use strict";function i(t,n){this.lo=t,this.hi=n}n.exports=i;var e=t(10),o=i.prototype,s=i.zero=new i(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var u=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return s;var n=t<0;n&&(t=-t);var r=t>>>0,e=(t-r)/4294967296>>>0;return n&&(e=~e>>>0,r=~r>>>0,++r>4294967295&&(r=0,++e>4294967295&&(e=0))),new i(r,e)},i.from=function(t){if("number"==typeof t)return i.fromNumber(t);if("string"==typeof t){if(!e.Long)return i.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):s},o.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+4294967296*r)}return this.lo+4294967296*this.hi},o.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var f=String.prototype.charCodeAt;i.fromHash=function(t){return t===u?s:new i((f.call(t,0)|f.call(t,1)<<8|f.call(t,2)<<16|f.call(t,3)<<24)>>>0,(f.call(t,4)|f.call(t,5)<<8|f.call(t,6)<<16|f.call(t,7)<<24)>>>0)},o.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.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},o.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},o.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}},{10:10}],10:[function(t,n,r){(function(n){"use strict";var i=r;i.base64=t(1),i.inquire=t(2),i.utf8=t(4),i.pool=t(3),i.LongBits=t(9),i.isNode=Boolean(n.process&&n.process.versions&&n.process.versions.node),i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(n,r){return new t(n,r)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),t):null}catch(t){return null}}(),i.Array="undefined"==typeof Uint8Array?Array:Uint8Array,i.Long=n.dcodeIO&&n.dcodeIO.Long||i.inquire("long"),i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,n){var r=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,n):r.toNumber(Boolean(n))},i.longNe=function(t,n,r){if("object"==typeof t)return t.low!==n||t.high!==r;var e=i.LongBits.from(t);return e.lo!==n||e.hi!==r},i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.arrayNe=function(t,n){if(t.length===n.length)for(var r=0;r<t.length;++r)if(t[r]!==n[r])return!0;return!1},i.merge=function(t,n,r){if(n)for(var i=Object.keys(n),e=0;e<i.length;++e)void 0!==t[i[e]]&&r||(t[i[e]]=n[i[e]]);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,4:4,9:9}],11:[function(t,n,r){"use strict";function i(t,n,r){this.fn=t,this.len=n,this.next=void 0,this.val=r}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new i(e,0,0),this.tail=this.head,this.states=null}function u(t,n,r){n[r]=255&t}function f(t,n,r){for(;t>127;)n[r++]=127&t|128,t>>>=7;n[r]=t}function h(t,n,r){for(;t.hi;)n[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[r++]=127&t.lo|128,t.lo=t.lo>>>7;n[r++]=t.lo}function a(t,n,r){n[r++]=255&t,n[r++]=t>>>8&255,n[r++]=t>>>16&255,n[r]=t>>>24}n.exports=s;var l,c=t(10),p=c.LongBits,d=c.base64,g=c.utf8;s.create=c.Buffer?function(){return l||(l=t(12)),(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray));var b=s.prototype;b.push=function(t,n,r){return this.tail=this.tail.next=new i(t,n,r),this.len+=n,this},b.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},b.int32=function(t){return t<0?this.push(h,10,p.fromNumber(t)):this.uint32(t)},b.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},b.uint64=function(t){var n=p.from(t);return this.push(h,n.length(),n)},b.int64=b.uint64,b.sint64=function(t){var n=p.from(t).zzEncode();return this.push(h,n.length(),n)},b.bool=function(t){return this.push(u,1,t?1:0)},b.fixed32=function(t){return this.push(a,4,t>>>0)},b.sfixed32=function(t){return this.push(a,4,t<<1^t>>31)},b.fixed64=function(t){var n=p.from(t);return this.push(a,4,n.lo).push(a,4,n.hi)},b.sfixed64=function(t){var n=p.from(t).zzEncode();return this.push(a,4,n.lo).push(a,4,n.hi)};var y="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e]=n[3]}:function(r,i,e){t[0]=r,i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(1/t>0?0:2147483648,n,r);else if(isNaN(t))a(2147483647,n,r);else if(t>3.4028234663852886e38)a((i<<31|2139095040)>>>0,n,r);else if(t<1.1754943508222875e-38)a((i<<31|Math.round(t/1.401298464324817e-45))>>>0,n,r);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);a((i<<31|e+127<<23|o)>>>0,n,r)}};b.float=function(t){return this.push(y,4,t)};var v="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e++]=n[3],i[e++]=n[4],i[e++]=n[5],i[e++]=n[6],i[e]=n[7]}:function(r,i,e){t[0]=r,i[e++]=n[7],i[e++]=n[6],i[e++]=n[5],i[e++]=n[4],i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(0,n,r),a(1/t>0?0:2147483648,n,r+4);else if(isNaN(t))a(4294967295,n,r),a(2147483647,n,r+4);else if(t>1.7976931348623157e308)a(0,n,r),a((i<<31|2146435072)>>>0,n,r+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,a(e>>>0,n,r),a((i<<31|e/4294967296)>>>0,n,r+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),a(4503599627370496*e>>>0,n,r),a((i<<31|o+1023<<20|1048576*e&1048575)>>>0,n,r+4)}}};b.double=function(t){return this.push(v,8,t)};var m=c.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};b.bytes=function(t){var n=t.length>>>0;if("string"==typeof t&&n){var r=s.alloc(n=d.length(t));d.decode(t,r,0),t=r}return n?this.uint32(n).push(m,n,t):this.push(u,1,0)},b.string=function(t){var n=g.length(t);return n?this.uint32(n).push(g.write,n,t):this.push(u,1,0)},b.fork=function(){return this.states=new o(this),this.head=this.tail=new i(e,0,0),this.len=0,this},b.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(e,0,0),this.len=0),this},b.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=n,this.len+=r,this},b.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}},{10:10,12:12}],12:[function(t,n,r){"use strict";function i(){o.call(this)}function e(t,n,r){t.length<40?f.write(t,n,r):n.utf8Write(t,r)}n.exports=i;var o=t(11),s=i.prototype=Object.create(o.prototype);s.constructor=i;var u=t(10),f=u.utf8,h=u.Buffer;i.alloc=function(t){return(i.alloc=h.allocUnsafe)(t)};var a=h&&h.prototype instanceof Uint8Array&&"set"===h.prototype.set.name?function(t,n,r){n.set(t,r)}:function(t,n,r){t.copy(n,r,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=h.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(a,n,t),this},s.string=function(t){var n=h.byteLength(t);return this.uint32(n),n&&this.push(e,n,t),this}},{10:10,11:11}]},{},[5]); | ||
!function t(n,r,i){function e(s,u){if(!r[s]){if(!n[s]){var f="function"==typeof require&&require;if(!u&&f)return f(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var a=r[s]={exports:{}};n[s][0].call(a.exports,function(t){var r=n[s][1][t];return e(r?r:t)},a,a.exports,t,n,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)e(i[s]);return e}({1:[function(t,n,r){"use strict";var i=r;i.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&"="===t.charAt(n);)++r;return Math.ceil(3*t.length)/4-r};for(var e=new Array(64),o=new Array(123),s=0;s<64;)o[e[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(t,n,r){for(var i,o=[],s=0,u=0;n<r;){var f=t[n++];switch(u){case 0:o[s++]=e[f>>2],i=(3&f)<<4,u=1;break;case 1:o[s++]=e[i|f>>4],i=(15&f)<<2,u=2;break;case 2:o[s++]=e[i|f>>6],o[s++]=e[63&f],u=0}}return u&&(o[s++]=e[i],o[s]=61,1===u&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";i.decode=function(t,n,r){for(var i,e=r,s=0,f=0;f<t.length;){var h=t.charCodeAt(f++);if(61===h&&s>1)break;if(void 0===(h=o[h]))throw Error(u);switch(s){case 0:i=h,s=1;break;case 1:n[r++]=i<<2|(48&h)>>4,i=h,s=2;break;case 2:n[r++]=(15&i)<<4|(60&h)>>2,i=h,s=3;break;case 3:n[r++]=(3&i)<<6|h,s=0}}if(1===s)throw Error(u);return r-e},i.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],2:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},{}],3:[function(t,n,r){"use strict";function i(t,n,r){var i=r||8192,e=i>>>1,o=null,s=i;return function(r){if(r<1||r>e)return t(r);s+r>i&&(o=t(i),s=0);var u=n.call(o,s,s+=r);return 7&s&&(s=(7|s)+1),u}}n.exports=i},{}],4:[function(t,n,r){"use strict";var i=r;i.length=function(t){for(var n=0,r=0,i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?n+=1:r<2048?n+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(i+1))?(++i,n+=4):n+=3;return n},i.read=function(t,n,r){var i=r-n;if(i<1)return"";for(var e,o=null,s=[],u=0;n<r;)e=t[n++],e<128?s[u++]=e:e>191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},i.write=function(t,n,r){for(var i,e,o=r,s=0;s<t.length;++s)i=t.charCodeAt(s),i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):55296===(64512&i)&&56320===(64512&(e=t.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&e),++s,n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128);return r-o}},{}],5:[function(t,n,r){(function(n){"use strict";function i(){e.Reader.a()}var e=n.protobuf=r;e.Writer=t(11),e.BufferWriter=t(12),e.Reader=t(7),e.BufferReader=t(8),e.converters=t(6),e.util=t(10),e.roots={},e.configure=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(e.util.Long=t,i()),e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,6:6,7:7,8:8}],6:[function(t,n,r){"use strict";var i=r,e=t(10);i.json={create:function(t,n,r){return t?r.fieldsOnly?{}:e.merge({},t):null},enums:function(t,n,r,i){return void 0===t&&(t=n),i.enums===String&&"number"==typeof t?r[t]:t},longs:function(t,n,r,i,o){return void 0!==t&&null!==t||(t={low:n,high:r}),o.longs===Number?"number"==typeof t?t:e.LongBits.from(t).toNumber(i):o.longs===String?"number"==typeof t?e.Long.fromNumber(t,i).toString():(t=e.Long.fromValue(t),t.unsigned=i,t.toString()):t},bytes:function(t,n,r){if(t){if(!t.length&&!r.defaults)return}else t=n;return r.bytes===String?e.base64.encode(t,0,t.length):r.bytes===Array?Array.prototype.slice.call(t):r.bytes!==e.Buffer||e.Buffer.isBuffer(t)?t:e.Buffer.from(t)}},i.message={create:function(t,n,r){return t?new(n.ctor?n.ctor:n)(r.fieldsOnly?void 0:t):null},enums:function(t,n,r){return"string"==typeof t?r[t]:t},longs:function(t,n,r,i){return"string"==typeof t?e.Long.fromString(t,i):"number"==typeof t?e.Long.fromNumber(t,i):t},bytes:function(t){if(e.Buffer)return e.Buffer.isBuffer(t)?t:e.Buffer.from(t,"base64");if("string"==typeof t){var n=e.newBuffer(e.base64.length(t));return e.base64.decode(t,n,0),n}return t instanceof e.Array?t:new e.Array(t)}}},{10:10}],7:[function(t,n,r){"use strict";function i(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new A(0,0),n=0;if(this.len-this.pos>4){for(n=0;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(n=0;n<4;++n){if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(n=0;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(n=0;n<5;++n){if(this.pos>=this.len)throw i(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function s(){return o.call(this).toLong()}function u(){return o.call(this).toNumber()}function f(){return o.call(this).toLong(!0)}function h(){return o.call(this).toNumber(!0)}function a(){return o.call(this).zzDecode().toLong()}function l(){return o.call(this).zzDecode().toNumber()}function c(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw i(this,8);return new A(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function d(){return p.call(this).toLong(!0)}function g(){return p.call(this).toNumber(!0)}function b(){return p.call(this).zzDecode().toLong()}function y(){return p.call(this).zzDecode().toNumber()}function v(){w.Long?(B.int64=s,B.uint64=f,B.sint64=a,B.fixed64=d,B.sfixed64=b):(B.int64=u,B.uint64=h,B.sint64=l,B.fixed64=g,B.sfixed64=y)}n.exports=e;var m,w=t(10),A=w.LongBits,N=w.utf8;e.create=w.Buffer?function(n){return m||(m=t(8)),(e.create=function(t){return w.Buffer.isBuffer(t)?new m(t):new e(t)})(n)}:function(t){return new e(t)};var B=e.prototype;B.b=w.Array.prototype.subarray||w.Array.prototype.slice,B.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return t}}(),B.int32=function(){return 0|this.uint32()},B.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},B.bool=function(){return 0!==this.uint32()},B.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},B.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var x="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],t[0]}:function(r,i){return n[3]=r[i],n[2]=r[i+1],n[1]=r[i+2],n[0]=r[i+3],t[0]}}():function(t,n){var r=c(t,n+4),i=2*(r>>31)+1,e=r>>>23&255,o=8388607&r;return 255===e?o?NaN:i*(1/0):0===e?1.401298464324817e-45*i*o:i*Math.pow(2,e-150)*(o+8388608)};B.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=x(this.buf,this.pos);return this.pos+=4,t};var L="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],n[4]=r[i+4],n[5]=r[i+5],n[6]=r[i+6],n[7]=r[i+7],t[0]}:function(r,i){return n[7]=r[i],n[6]=r[i+1],n[5]=r[i+2],n[4]=r[i+3],n[3]=r[i+4],n[2]=r[i+5],n[1]=r[i+6],n[0]=r[i+7],t[0]}}():function(t,n){var r=c(t,n+4),i=c(t,n+8),e=2*(i>>31)+1,o=i>>>20&2047,s=4294967296*(1048575&i)+r;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};B.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=L(this.buf,this.pos);return this.pos+=8,t},B.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,n===r?new this.buf.constructor(0):this.b.call(this.buf,n,r)},B.string=function(){var t=this.bytes();return N.read(t,0,t.length)},B.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw i(this,t);this.pos+=t}else do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++]);return this},B.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},e.a=v,v()},{10:10,8:8}],8:[function(t,n,r){"use strict";function i(t){e.call(this,t)}n.exports=i;var e=t(7),o=i.prototype=Object.create(e.prototype);o.constructor=i;var s=t(10);s.Buffer&&(o.b=s.Buffer.prototype.slice),o.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{10:10,7:7}],9:[function(t,n,r){"use strict";function i(t,n){this.lo=t,this.hi=n}n.exports=i;var e=t(10),o=i.prototype,s=i.zero=new i(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var u=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return s;var n=t<0;n&&(t=-t);var r=t>>>0,e=(t-r)/4294967296>>>0;return n&&(e=~e>>>0,r=~r>>>0,++r>4294967295&&(r=0,++e>4294967295&&(e=0))),new i(r,e)},i.from=function(t){if("number"==typeof t)return i.fromNumber(t);if("string"==typeof t){if(!e.Long)return i.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):s},o.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+4294967296*r)}return this.lo+4294967296*this.hi},o.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var f=String.prototype.charCodeAt;i.fromHash=function(t){return t===u?s:new i((f.call(t,0)|f.call(t,1)<<8|f.call(t,2)<<16|f.call(t,3)<<24)>>>0,(f.call(t,4)|f.call(t,5)<<8|f.call(t,6)<<16|f.call(t,7)<<24)>>>0)},o.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.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},o.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},o.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}},{10:10}],10:[function(t,n,r){(function(n){"use strict";var i=r;i.base64=t(1),i.inquire=t(2),i.utf8=t(4),i.pool=t(3),i.LongBits=t(9),i.isNode=Boolean(n.process&&n.process.versions&&n.process.versions.node),i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(n,r){return new t(n,r)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),t):null}catch(t){return null}}(),i.Array="undefined"==typeof Uint8Array?Array:Uint8Array,i.Long=n.dcodeIO&&n.dcodeIO.Long||i.inquire("long"),i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,n){var r=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,n):r.toNumber(Boolean(n))},i.longNe=function(t,n,r){if("object"==typeof t)return t.low!==n||t.high!==r;var e=i.LongBits.from(t);return e.lo!==n||e.hi!==r},i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.arrayNe=function(t,n){if(t.length===n.length)for(var r=0;r<t.length;++r)if(t[r]!==n[r])return!0;return!1},i.merge=function(t,n,r){if(n)for(var i=Object.keys(n),e=0;e<i.length;++e)void 0!==t[i[e]]&&r||(t[i[e]]=n[i[e]]);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,4:4,9:9}],11:[function(t,n,r){"use strict";function i(t,n,r){this.fn=t,this.len=n,this.next=void 0,this.val=r}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new i(e,0,0),this.tail=this.head,this.states=null}function u(t,n,r){n[r]=255&t}function f(t,n,r){for(;t>127;)n[r++]=127&t|128,t>>>=7;n[r]=t}function h(t,n,r){for(;t.hi;)n[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[r++]=127&t.lo|128,t.lo=t.lo>>>7;n[r++]=t.lo}function a(t,n,r){n[r++]=255&t,n[r++]=t>>>8&255,n[r++]=t>>>16&255,n[r]=t>>>24}n.exports=s;var l,c=t(10),p=c.LongBits,d=c.base64,g=c.utf8;s.create=c.Buffer?function(){return l||(l=t(12)),(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray));var b=s.prototype;b.push=function(t,n,r){return this.tail=this.tail.next=new i(t,n,r),this.len+=n,this},b.uint32=function(t){return t>>>=0,this.push(f,t<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)},b.int32=function(t){return t<0?this.push(h,10,p.fromNumber(t)):this.uint32(t)},b.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},b.uint64=function(t){var n=p.from(t);return this.push(h,n.length(),n)},b.int64=b.uint64,b.sint64=function(t){var n=p.from(t).zzEncode();return this.push(h,n.length(),n)},b.bool=function(t){return this.push(u,1,t?1:0)},b.fixed32=function(t){return this.push(a,4,t>>>0)},b.sfixed32=function(t){return this.push(a,4,t<<1^t>>31)},b.fixed64=function(t){var n=p.from(t);return this.push(a,4,n.lo).push(a,4,n.hi)},b.sfixed64=function(t){var n=p.from(t).zzEncode();return this.push(a,4,n.lo).push(a,4,n.hi)};var y="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e]=n[3]}:function(r,i,e){t[0]=r,i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(1/t>0?0:2147483648,n,r);else if(isNaN(t))a(2147483647,n,r);else if(t>3.4028234663852886e38)a((i<<31|2139095040)>>>0,n,r);else if(t<1.1754943508222875e-38)a((i<<31|Math.round(t/1.401298464324817e-45))>>>0,n,r);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);a((i<<31|e+127<<23|o)>>>0,n,r)}};b.float=function(t){return this.push(y,4,t)};var v="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e++]=n[3],i[e++]=n[4],i[e++]=n[5],i[e++]=n[6],i[e]=n[7]}:function(r,i,e){t[0]=r,i[e++]=n[7],i[e++]=n[6],i[e++]=n[5],i[e++]=n[4],i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)a(0,n,r),a(1/t>0?0:2147483648,n,r+4);else if(isNaN(t))a(4294967295,n,r),a(2147483647,n,r+4);else if(t>1.7976931348623157e308)a(0,n,r),a((i<<31|2146435072)>>>0,n,r+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,a(e>>>0,n,r),a((i<<31|e/4294967296)>>>0,n,r+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),a(4503599627370496*e>>>0,n,r),a((i<<31|o+1023<<20|1048576*e&1048575)>>>0,n,r+4)}}};b.double=function(t){return this.push(v,8,t)};var m=c.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};b.bytes=function(t){var n=t.length>>>0;if("string"==typeof t&&n){var r=s.alloc(n=d.length(t));d.decode(t,r,0),t=r}return n?this.uint32(n).push(m,n,t):this.push(u,1,0)},b.string=function(t){var n=g.length(t);return n?this.uint32(n).push(g.write,n,t):this.push(u,1,0)},b.fork=function(){return this.states=new o(this),this.head=this.tail=new i(e,0,0),this.len=0,this},b.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(e,0,0),this.len=0),this},b.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r).tail.next=t.next,this.tail=n,this.len+=r,this},b.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}},{10:10,12:12}],12:[function(t,n,r){"use strict";function i(){o.call(this)}function e(t,n,r){t.length<40?u.utf8.write(t,n,r):n.utf8Write(t,r)}n.exports=i;var o=t(11),s=i.prototype=Object.create(o.prototype);s.constructor=i;var u=t(10),f=u.Buffer;i.alloc=function(t){return(i.alloc=f.allocUnsafe)(t)};var h=f&&f.prototype instanceof Uint8Array&&"set"===f.prototype.set.name?function(t,n,r){n.set(t,r)}:function(t,n,r){t.copy(n,r,0,t.length)};s.bytes=function(t){"string"==typeof t&&(t=f.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(h,n,t),this},s.string=function(t){var n=f.byteLength(t);return this.uint32(n),n&&this.push(e,n,t),this}},{10:10,11:11}]},{},[5]); | ||
//# sourceMappingURL=protobuf.min.js.map |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
module.exports = require("./src"); |
{ | ||
"name": "protobufjs", | ||
"version": "6.4.1", | ||
"version": "6.4.3", | ||
"description": "Protocol Buffers for JavaScript (& TypeScript).", | ||
@@ -47,3 +47,3 @@ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>", | ||
"@protobufjs/base64": "^1.0.5", | ||
"@protobufjs/codegen": "^1.0.4", | ||
"@protobufjs/codegen": "^1.0.5", | ||
"@protobufjs/eventemitter": "^1.0.5", | ||
@@ -62,5 +62,5 @@ "@protobufjs/extend": "^1.0.2", | ||
"devDependencies": { | ||
"@types/node": "6.0.55", | ||
"@types/node": "6.0.56", | ||
"benchmark": "^2.1.3", | ||
"browserify": "^13.1.1", | ||
"browserify": "^13.3.0", | ||
"bundle-collapser": "^1.2.1", | ||
@@ -93,3 +93,11 @@ "chalk": "^1.1.3", | ||
"zuul-ngrok": "^4.0.0" | ||
} | ||
}, | ||
"cliDependencies": [ | ||
"chalk", | ||
"glob", | ||
"jsdoc", | ||
"minimist", | ||
"tmp", | ||
"uglify-js" | ||
] | ||
} |
@@ -1,2 +0,2 @@ | ||
# <p align="center"><img alt="protobuf.js" src="./pbjs.png" /></p> | ||
# <p align="center"><img alt="protobuf.js" src="https://github.com/dcodeIO/protobuf.js/raw/master/pbjs.png" width="120" height="104" /></p> | ||
@@ -3,0 +3,0 @@ [![][travis-image]][travis-url] [![][david-image]][david-url] [![][npm-dl-image]][npm-url] [![][npm-image]][npm-url] [![][paypal-image]][paypal-url] |
@@ -10,3 +10,3 @@ "use strict"; | ||
/** | ||
* Constructs a class instance, which is also a message prototype. | ||
* Constructs a class instance, which is also a {@link Message} prototype. | ||
* @classdesc Runtime class providing the tools to create your own custom classes. | ||
@@ -40,2 +40,3 @@ * @constructor | ||
} else | ||
// create named constructor functions (codegen is required anyway) | ||
ctor = util.codegen("p")("return ctor.call(this,p)").eof(type.name, { | ||
@@ -52,3 +53,3 @@ ctor: Message | ||
// Static methods on Message are instance methods on Class and vice versa. | ||
// Static methods on Message are instance methods on Class and vice versa | ||
util.merge(ctor, Message, true); | ||
@@ -98,3 +99,3 @@ | ||
// Static methods on Message are instance methods on Class and vice versa. | ||
// Static methods on Message are instance methods on Class and vice versa | ||
Class.prototype = Message; | ||
@@ -101,0 +102,0 @@ |
@@ -27,6 +27,10 @@ "use strict"; | ||
// Not provided because of limited use (feel free to discuss or to provide yourself): | ||
// - google/protobuf/descriptor.proto | ||
// - google/protobuf/field_mask.proto | ||
// - google/protobuf/source_context.proto | ||
// - google/protobuf/type.proto | ||
// | ||
// google/protobuf/descriptor.proto | ||
// google/protobuf/field_mask.proto | ||
// google/protobuf/source_context.proto | ||
// google/protobuf/type.proto | ||
// | ||
// Stripped and pre-parsed versions of these non-bundled files are instead available as part of | ||
// the repository or package within the google/protobuf directory. | ||
@@ -88,3 +92,10 @@ common("any", { | ||
kind: { | ||
oneof: [ "nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue" ] | ||
oneof: [ | ||
"nullValue", | ||
"numberValue", | ||
"stringValue", | ||
"boolValue", | ||
"structValue", | ||
"listValue" | ||
] | ||
} | ||
@@ -208,2 +219,2 @@ }, | ||
} | ||
}); | ||
}); |
@@ -51,3 +51,3 @@ "use strict"; | ||
fields.forEach(function(field, i) { | ||
var prop = util.safeProp(field.resolve().name); | ||
var prop = field.resolve()._prop; | ||
@@ -54,0 +54,0 @@ // repeated |
"use strict"; | ||
module.exports = decoder; | ||
decoder.compat = true; | ||
var Enum = require("./enum"), | ||
@@ -12,2 +14,3 @@ types = require("./types"), | ||
* @returns {Codegen} Codegen instance | ||
* @property {boolean} compat=true Generates backward/forward compatible decoders (packed fields) | ||
*/ | ||
@@ -32,3 +35,3 @@ function decoder(mtype) { | ||
type = field.resolvedType instanceof Enum ? "uint32" : field.type, | ||
ref = "m" + util.safeProp(field.name); | ||
ref = "m" + field._prop; | ||
gen | ||
@@ -60,4 +63,4 @@ ("case %d:", field.id); | ||
// Packed | ||
if (field.packed && types.packed[type] !== undefined) gen | ||
// Packable (always check for forward and backward compatiblity) | ||
if ((decoder.compat || field.packed) && types.packed[type] !== undefined) gen | ||
("if((t&7)===2){") | ||
@@ -64,0 +67,0 @@ ("var c2=r.uint32()+r.pos") |
@@ -32,3 +32,3 @@ "use strict"; | ||
wireType = types.basic[type]; | ||
ref = "m" + util.safeProp(field.name); | ||
ref = "m" + field._prop; | ||
@@ -78,3 +78,3 @@ // Map fields | ||
// Non-repeated | ||
} else if (!field.partOf) { | ||
} else if (!field.partOf) { // see below for oneofs | ||
if (!field.required) { | ||
@@ -98,6 +98,8 @@ | ||
} | ||
// oneofs | ||
for (var i = 0; i < oneofs.length; ++i) { | ||
var oneof = oneofs[i]; | ||
gen | ||
("switch(%s){", "m" + util.safeProp(oneof.name)); | ||
("switch(%s){", "m" + oneof._prop); | ||
var oneofFields = oneof.fieldsArray; | ||
@@ -108,3 +110,3 @@ for (var j = 0; j < oneofFields.length; ++j) { | ||
wireType = types.basic[type]; | ||
ref = "m" + util.safeProp(field.name); | ||
ref = "m" + field._prop; | ||
gen | ||
@@ -119,3 +121,3 @@ ("case%j:", field.name); | ||
gen | ||
("break;"); | ||
("break"); | ||
@@ -122,0 +124,0 @@ } gen |
"use strict"; | ||
module.exports = Enum; | ||
// extends ReflectionObject | ||
var ReflectionObject = require("./object"); | ||
@@ -5,0 +6,0 @@ /** @alias Enum.prototype */ |
"use strict"; | ||
module.exports = Field; | ||
// extends ReflectionObject | ||
var ReflectionObject = require("./object"); | ||
@@ -160,19 +161,23 @@ /** @alias Field.prototype */ | ||
this._packed = null; | ||
} | ||
Object.defineProperties(FieldPrototype, { | ||
/** | ||
* Determines whether this field is packed. Only relevant when repeated and working with proto2. | ||
* @name Field#packed | ||
* @type {boolean} | ||
* @readonly | ||
* Safe property accessor on messages used by codegen. | ||
* @type {string} | ||
* @private | ||
*/ | ||
packed: { | ||
get: function() { | ||
// defaults to packed=true if not explicity set to false | ||
if (this._packed === null) | ||
this._packed = this.getOption("packed") !== false; | ||
return this._packed; | ||
} | ||
this._prop = util.safeProp(this.name); | ||
} | ||
/** | ||
* Determines whether this field is packed. Only relevant when repeated and working with proto2. | ||
* @name Field#packed | ||
* @type {boolean} | ||
* @readonly | ||
*/ | ||
Object.defineProperty(FieldPrototype, "packed", { | ||
get: function() { | ||
// defaults to packed=true if not explicity set to false | ||
if (this._packed === null) | ||
this._packed = this.getOption("packed") !== false; | ||
return this._packed; | ||
} | ||
@@ -179,0 +184,0 @@ }); |
"use strict"; | ||
module.exports = MapField; | ||
// extends Field | ||
var Field = require("./field"); | ||
@@ -5,0 +6,0 @@ /** @alias Field.prototype */ |
"use strict"; | ||
module.exports = Method; | ||
// extends ReflectionObject | ||
var ReflectionObject = require("./object"); | ||
@@ -5,0 +6,0 @@ /** @alias Method.prototype */ |
"use strict"; | ||
module.exports = Namespace; | ||
// extends ReflectionObject | ||
var ReflectionObject = require("./object"); | ||
@@ -73,16 +74,12 @@ /** @alias Namespace.prototype */ | ||
Object.defineProperties(NamespacePrototype, { | ||
/** | ||
* Nested objects of this namespace as an array for iteration. | ||
* @name Namespace#nestedArray | ||
* @type {ReflectionObject[]} | ||
* @readonly | ||
*/ | ||
nestedArray: { | ||
get: function() { | ||
return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); | ||
} | ||
/** | ||
* Nested objects of this namespace as an array for iteration. | ||
* @name Namespace#nestedArray | ||
* @type {ReflectionObject[]} | ||
* @readonly | ||
*/ | ||
Object.defineProperty(NamespacePrototype, "nestedArray", { | ||
get: function() { | ||
return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); | ||
} | ||
}); | ||
@@ -89,0 +86,0 @@ |
"use strict"; | ||
module.exports = OneOf; | ||
// extends ReflectionObject | ||
var ReflectionObject = require("./object"); | ||
@@ -10,3 +11,4 @@ /** @alias OneOf.prototype */ | ||
var Field = require("./field"); | ||
var Field = require("./field"), | ||
util = require("./util"); | ||
@@ -45,2 +47,9 @@ /** | ||
this._fieldsArray = []; | ||
/** | ||
* Safe property accessor on messages used by codegen. | ||
* @type {string} | ||
* @private | ||
*/ | ||
this._prop = util.safeProp(this.name); | ||
} | ||
@@ -47,0 +56,0 @@ |
"use strict"; | ||
module.exports = BufferReader; | ||
// extends Reader | ||
var Reader = require("./reader"); | ||
@@ -5,0 +6,0 @@ /** @alias BufferReader.prototype */ |
"use strict"; | ||
module.exports = Root; | ||
// extends Namespace | ||
var Namespace = require("./namespace"); | ||
@@ -5,0 +6,0 @@ /** @alias Root.prototype */ |
"use strict"; | ||
module.exports = Service; | ||
var util = require("../util"); | ||
var EventEmitter = util.EventEmitter; | ||
// extends EventEmitter | ||
var EventEmitter = require("../util").EventEmitter; | ||
/** @alias rpc.Service.prototype */ | ||
var ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype); | ||
ServicePrototype.constructor = Service; | ||
@@ -25,6 +28,2 @@ /** | ||
/** @alias rpc.Service.prototype */ | ||
var ServicePrototype = Service.prototype = Object.create(EventEmitter.prototype); | ||
ServicePrototype.constructor = Service; | ||
/** | ||
@@ -31,0 +30,0 @@ * Ends this service and emits the `end` event. |
"use strict"; | ||
module.exports = Service; | ||
// extends Namespace | ||
var Namespace = require("./namespace"); | ||
@@ -42,16 +43,12 @@ /** @alias Namespace.prototype */ | ||
Object.defineProperties(ServicePrototype, { | ||
/** | ||
* Methods of this service as an array for iteration. | ||
* @name Service#methodsArray | ||
* @type {Method[]} | ||
* @readonly | ||
*/ | ||
methodsArray: { | ||
get: function() { | ||
return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); | ||
} | ||
/** | ||
* Methods of this service as an array for iteration. | ||
* @name Service#methodsArray | ||
* @type {Method[]} | ||
* @readonly | ||
*/ | ||
Object.defineProperty(ServicePrototype, "methodsArray", { | ||
get: function() { | ||
return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); | ||
} | ||
}); | ||
@@ -58,0 +55,0 @@ |
"use strict"; | ||
module.exports = Type; | ||
// extends Namespace | ||
var Namespace = require("./namespace"); | ||
@@ -82,9 +83,2 @@ /** @alias Namespace.prototype */ | ||
/** | ||
* Cached repeated fields as an array. | ||
* @type {?Field[]} | ||
* @private | ||
*/ | ||
this._repeatedFieldsArray = null; | ||
/** | ||
* Cached oneofs as an array. | ||
@@ -145,14 +139,2 @@ * @type {?OneOf[]} | ||
/** | ||
* Repeated fields of this message as an array for iteration. | ||
* @name Type#repeatedFieldsArray | ||
* @type {Field[]} | ||
* @readonly | ||
*/ | ||
repeatedFieldsArray: { | ||
get: function() { | ||
return this._repeatedFieldsArray || (this._repeatedFieldsArray = this.fieldsArray.filter(function(field) { return field.repeated; })); | ||
} | ||
}, | ||
/** | ||
* Oneofs of this message as an array for iteration. | ||
@@ -159,0 +141,0 @@ * @name Type#oneofsArray |
@@ -109,3 +109,3 @@ "use strict"; | ||
var field = fields[i].resolve(), | ||
ref = "m" + util.safeProp(field.name); | ||
ref = "m" + field._prop; | ||
@@ -112,0 +112,0 @@ // map fields |
"use strict"; | ||
module.exports = BufferWriter; | ||
// extends Writer | ||
var Writer = require("./writer"); | ||
@@ -11,4 +12,3 @@ /** @alias BufferWriter.prototype */ | ||
var utf8 = util.utf8, | ||
Buffer = util.Buffer; | ||
var Buffer = util.Buffer; | ||
@@ -58,3 +58,3 @@ /** | ||
if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) | ||
utf8.write(val, buf, pos); | ||
util.utf8.write(val, buf, pos); | ||
else | ||
@@ -61,0 +61,0 @@ buf.utf8Write(val, pos); |
@@ -127,4 +127,10 @@ /*eslint-disable block-scoped-var, no-redeclare, no-control-regex*/ | ||
/** | ||
* Package cliDependencies. | ||
* @type {Array.<string>} | ||
*/ | ||
$prototype.cliDependencies = $protobuf.util.emptyArray; | ||
// Referenced types | ||
var $types = [null, null, null, null, null, "Package.Repository", null, null, null, null, null, null, null, null, null, null]; $lazyTypes.push($types); | ||
var $types = [null, null, null, null, null, "Package.Repository", null, null, null, null, null, null, null, null, null, null, null]; $lazyTypes.push($types); | ||
@@ -211,2 +217,7 @@ /** | ||
} | ||
if (message.cliDependencies) { | ||
for (var i = 0; i < message.cliDependencies.length; ++i) { | ||
writer.uint32(146).string(message.cliDependencies[i]); | ||
} | ||
} | ||
return writer; | ||
@@ -352,2 +363,9 @@ };})($protobuf.Writer, $protobuf.util, $types); | ||
case 18: | ||
if (!(message.cliDependencies && message.cliDependencies.length)) { | ||
message.cliDependencies = []; | ||
} | ||
message.cliDependencies.push(reader.string()); | ||
break; | ||
default: | ||
@@ -494,2 +512,12 @@ reader.skipType(tag & 7); | ||
} | ||
if (message.cliDependencies !== undefined) { | ||
if (!Array.isArray(message.cliDependencies)) { | ||
return "Package.cliDependencies: array expected"; | ||
} | ||
for (var i = 0; i < message.cliDependencies.length; ++i) { | ||
if (!util.isString(message.cliDependencies[i])) { | ||
return "Package.cliDependencies: string[] expected"; | ||
} | ||
} | ||
} | ||
return null; | ||
@@ -567,2 +595,12 @@ };})($protobuf.util, $types); | ||
} | ||
if (src.cliDependencies && src.cliDependencies.length) { | ||
dst.cliDependencies = []; | ||
for (var i = 0; i < src.cliDependencies.length; ++i) { | ||
dst.cliDependencies.push(src.cliDependencies[i]); | ||
} | ||
} else { | ||
if (options.defaults || options.arrays) { | ||
dst.cliDependencies = []; | ||
} | ||
} | ||
} | ||
@@ -569,0 +607,0 @@ return dst; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
3408853
42629
34
Updated@protobufjs/codegen@^1.0.5