/
protobuf.min.js
9 lines (9 loc) · 53.4 KB
/
protobuf.min.js
1
2
3
4
5
6
7
8
9
/*!
* protobuf.js v6.1.0 (c) 2016 Daniel Wirtz
* Compiled Wed, 07 Dec 2016 23:23:40 UTC
* Licensed under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function e(t,n,r){function i(o,u){if(!n[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=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,u=8*i-r-1,a=(1<<u)-1,f=a>>1,l=-7,h=n?0:i-1,c=n?1:-1,d=e[t+h];for(h+=c,s=d&(1<<-l)-1,d>>=-l,l+=u;l>0;s=256*s+e[t+h],h+=c,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+h],h+=c,l-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,r),s-=f}return(d?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,u,a,f=8*s-i-1,l=(1<<f)-1,h=l>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?s-1:0,p=r?-1:1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),t+=o+h>=1?c/a:c*Math.pow(2,1-h),t*a>=2&&(o++,a/=2),o+h>=l?(u=0,o=l):o+h>=1?(u=(t*a-1)*Math.pow(2,i),o+=h):(u=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&u,d+=p,u/=256,i-=8);for(o=o<<i|u,f+=i;f>0;e[n+d]=255&o,d+=p,o/=256,f-=8);e[n+d-p]|=128*v}},{}],2:[function(e,t,n){"use strict";function r(){function e(){var t=i.sprintf.apply(null,arguments),n=c;if(h.length){var r=h[h.length-1];s.test(r)?n=++c:a.test(r)&&++n,u.test(r)&&!u.test(t)?(n=++c,d=!0):d&&f.test(r)&&(n=--c,d=!1),o.test(t)&&(n=--c)}for(var l=0;l<n;++l)t="\t"+t;return h.push(t),e}function t(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(", ")+") {\n"+h.join("\n")+"\n}"}function n(t,n){"object"==typeof t&&(n=t,t=void 0);var i=e.str(t);r.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(n||(n={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(e){return n[e]}))}var l=Array.prototype.slice.call(arguments),h=['\t"use strict"'],c=1,d=!1;return e.str=t,e.eof=n,e}t.exports=r;var i=e(23),s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;r.supported=!1;try{r.supported=1===r("a","b")("return a-b").eof()(2,1)}catch(e){}r.verbose=!1,r.encode=e(4),r.decode=e(3),r.verify=e(5)},{23:23,3:3,4:4,5:5}],3:[function(e,t,n){"use strict";var r=n,i=e(7),s=e(17),o=e(22),u=e(23),a=e(2);r.fallback=function(e,t){for(var n=this.getFieldsById(),r=e instanceof s?e:s.create(e),a=void 0===t?r.len:r.pos+t,f=new(this.getCtor());r.pos<a;){var l=r.tag(),h=n[l.id].resolve(),c=h.resolvedType instanceof i?"uint32":h.type;if(h)if(h.map){var d=h.resolvedKeyType?"uint32":h.keyType,t=r.uint32(),p=f[h.name]={};if(t){t+=r.pos;for(var v=[],y=[];r.pos<t;)1===r.tag().id?v[v.length]=r[d]():void 0!==o.basic[c]?y[y.length]=r[c]():y[y.length]=h.resolvedType.decode(r,r.uint32());for(var g=0;g<v.length;++g)p["object"==typeof v[g]?u.longToHash(v[g]):v[g]]=y[g]}}else if(h.repeated){var m=f[h.name]&&f[h.name].length?f[h.name]:f[h.name]=[];if(h.packed&&void 0!==o.packed[c]&&2===l.wireType)for(var w=r.uint32()+r.pos;r.pos<w;)m[m.length]=r[c]();else void 0!==o.basic[c]?m[m.length]=r[c]():m[m.length]=h.resolvedType.decode(r,r.uint32())}else void 0!==o.basic[c]?f[h.name]=r[c]():f[h.name]=h.resolvedType.decode(r,r.uint32());else r.skipType(l.wireType)}return f},r.generate=function(e){for(var t=e.getFieldsArray(),n=a("r","l")("r instanceof Reader||(r=Reader.create(r))")("var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())")("while(r.pos<c){")("var t=r.tag()")("switch(t.id){"),r=0;r<t.length;++r){var s=t[r].resolve(),f=s.resolvedType instanceof i?"uint32":s.type,l=u.safeProp(s.name);if(n("case %d:",s.id),s.map){var h=s.resolvedKeyType?"uint32":s.keyType;n("var n=r.uint32(),o={}")("if(n){")("n+=r.pos")("var k=[],v=[]")("while(r.pos<n){")("if(r.tag().id===1)")("k[k.length]=r.%s()",h),void 0!==o.basic[f]?n("else")("v[v.length]=r.%s()",f):n("else")("v[v.length]=types[%d].decode(r,r.uint32())",r,r),n("}")("for(var i=0;i<k.length;++i)")("o[typeof(k[i])==='object'?util.longToHash(k[i]):k[i]]=v[i]")("}")("m%s=o",l)}else s.repeated?(n("m%s&&m%s.length?m%s:m%s=[]",l,l,l,l),s.packed&&void 0!==o.packed[f]&&n("if(t.wireType===2){")("var e=r.uint32()+r.pos")("while(r.pos<e)")("m%s[m%s.length]=r.%s()",l,l,f)("}else"),void 0!==o.basic[f]?n("m%s[m%s.length]=r.%s()",l,l,f):n("m%s[m%s.length]=types[%d].decode(r,r.uint32())",l,l,r,r)):void 0!==o.basic[f]?n("m%s=r.%s()",l,f):n("m%s=types[%d].decode(r,r.uint32())",l,r,r);n("break")}return n("default:")("r.skipType(t.wireType)")("break")("}")("}")("return m")}},{17:17,2:2,22:22,23:23,7:7}],4:[function(e,t,n){"use strict";var r=n,i=e(7),s=e(27),o=e(22),u=e(23),a=e(2);r.fallback=function(e,t){t||(t=s.create());for(var n=this.getFieldsArray(),r=0;r<n.length;){var a=n[r++].resolve(),f=a.resolvedType instanceof i?"uint32":a.type,l=o.basic[f];if(a.map){var h,c,d=a.resolvedKeyType?"uint32":a.keyType;if((h=e[a.name])&&(c=Object.keys(h)).length){t.fork();for(var p=0;p<c.length;++p)t.tag(1,o.mapKey[d])[d](c[p]),void 0!==l?t.tag(2,l)[f](h[c[p]]):a.resolvedType.encode(h[c[p]],t.tag(2,2).fork()).ldelim();t.ldelim(a.id)}}else if(a.repeated){var v=e[a.name];if(v&&v.length)if(a.packed&&void 0!==o.packed[f]){t.fork();for(var p=0;p<v.length;)t[f](v[p++]);t.ldelim(a.id)}else{var p=0;if(void 0!==l)for(;p<v.length;)t.tag(a.id,l)[f](v[p++]);else for(;p<v.length;)a.resolvedType.encode(v[p++],t.tag(a.id,2).fork()).ldelim()}}else{var h=e[a.name];(a.required||void 0!==h&&a.long?u.longNeq(h,a.defaultValue):h!==a.defaultValue)&&(void 0!==l?t.tag(a.id,l)[f](h):(a.resolvedType.encode(h,t.fork()),t.len||a.required?t.ldelim(a.id):t.reset()))}}return t},r.generate=function(e){for(var t=e.getFieldsArray(),n=a("m","w")("w||(w=Writer.create())"),r=0;r<t.length;++r){var s=t[r].resolve(),f=s.resolvedType instanceof i?"uint32":s.type,l=o.basic[f],h=u.safeProp(s.name);if(s.map){var c=s.resolvedKeyType?"uint32":s.keyType,d=o.mapKey[c];n("if(m%s){",h)("w.fork()")("for(var i=0,ks=Object.keys(m%s);i<ks.length;++i){",h)("w.tag(1,%d).%s(ks[i])",d,c),void 0!==l?n("w.tag(2,%d).%s(m%s[ks[i]])",l,f,h):n("types[%d].encode(m%s[ks[i]],w.tag(2,2).fork()).ldelim()",r,h),n("}")("w.len&&w.ldelim(%d)||w.reset()",s.id)("}")}else s.repeated?s.packed&&void 0!==o.packed[f]?n("if(m%s&&m%s.length){",h,h)("w.fork()")("for(var i=0;i<m%s.length;++i)",h)("w.%s(m%s[i])",f,h)("w.ldelim(%d)",s.id)("}"):(n("if(m%s)",h)("for(var i=0;i<m%s.length;++i)",h),void 0!==l?n("w.tag(%d,%d).%s(m%s[i])",s.id,l,f,h):n("types[%d].encode(m%s[i],w.tag(%d,2).fork()).ldelim()",r,h,s.id)):(s.required||(s.long?n("if(m%s!==undefined&&util.longNeq(m%s,%j))",h,h,s.defaultValue):n("if(m%s!==undefined&&m%s!==%j)",h,h,s.defaultValue)),void 0!==l?n("w.tag(%d,%d).%s(m%s)",s.id,l,f,h):s.required?n("types[%d].encode(m%s,w.tag(%d,2).fork()).ldelim()",r,h,s.id):n("types[%d].encode(m%s,w.fork()).len&&w.ldelim(%d)||w.reset()",r,h,s.id))}return n("return w")}},{2:2,22:22,23:23,27:27,7:7}],5:[function(e,t,n){"use strict";var r=n,i=e(7),s=e(21),o=e(23),u=e(2);r.fallback=function(e){for(var t=this.getFieldsArray(),n=0;n<t.length;){var r=t[n++].resolve(),o=e[r.name];if(void 0===o){if(r.required)return"missing required field "+r.name+" in "+this.getFullName()}else{if(r.resolvedType instanceof i&&void 0===r.resolvedType.getValuesById()[o])return"invalid enum value "+r.name+" = "+o+" in "+this.getFullName();if(r.resolvedType instanceof s){if(!o&&r.required)return"missing required field "+r.name+" in "+this.getFullName();var u;if(null!==(u=r.resolvedType.verify(o)))return u}}}return null},r.generate=function(e){for(var t=e.getFieldsArray(),n=u("m"),r=!1,a=0;a<t.length;++a){var f=t[a].resolve(),l=o.safeProp(f.name);if(f.required)n("if(m%s===undefined)",l)("return 'missing required field %s in %s'",f.name,e.getFullName());else if(f.resolvedType instanceof i){var h=o.toArray(f.resolvedType.values);n("switch(m%s){",l)("default:")("return 'invalid enum value %s = '+m%s+' in %s'",f.name,l,e.getFullName());for(var c=0,d=h.length;c<d;++c)n("case %d:",h[c]);n("}")}else f.resolvedType instanceof s&&(f.required&&n("if(!m%s)",l)("return 'missing required field %s in %s'",f.name,e.getFullName()),r||(n("var r"),r=!0),n("if((r=types[%d].verify(m%s))!==null)",a,l)("return r"))}return n("return null")}},{2:2,21:21,23:23,7:7}],6:[function(e,t,n){"use strict";function r(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r,r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var i;r("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:i}),r("empty",{Empty:{fields:{}}}),r("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}}}})},{}],7:[function(e,t,n){"use strict";function r(e,t,n){s.call(this,e,n),this.values=t||{},this.a=null}function i(e){return e.a=null,e}t.exports=r;var s=e(13),o=s.extend(r),u=e(23),a=u.b;u.props(o,{valuesById:{get:function(){return this.a||(this.a={},Object.keys(this.values).forEach(function(e){var t=this.values[e];if(this.a[t])throw Error("duplicate id "+t+" in "+this);this.a[t]=e},this)),this.a}}}),r.testJSON=function(e){return Boolean(e&&e.values)},r.fromJSON=function(e,t){return new r(e,t.values,t.options)},o.toJSON=function(){return{options:this.options,values:this.values}},o.add=function(e,t){if(!u.isString(e))throw a("name");if(!u.isInteger(t)||t<0)throw a("id","a non-negative integer");if(void 0!==this.values[e])throw Error('duplicate name "'+e+'" in '+this);if(void 0!==this.getValuesById()[t])throw Error("duplicate id "+t+" in "+this);return this.values[e]=t,i(this)},o.remove=function(e){if(!u.isString(e))throw a("name");if(void 0===this.values[e])throw Error('"'+e+'" is not a name of '+this);return delete this.values[e],i(this)}},{13:13,23:23}],8:[function(e,t,n){"use strict";function r(e,t,n,r,s,o){if(l.isObject(r)?(o=r,r=s=void 0):l.isObject(s)&&(o=s,s=void 0),i.call(this,e,o),!l.isInteger(t)||t<0)throw h("id","a non-negative integer");if(!l.isString(n))throw h("type");if(void 0!==s&&!l.isString(s))throw h("extend");if(void 0!==r&&!/^required|optional|repeated$/.test(r=r.toString().toLowerCase()))throw h("rule","a valid rule string");this.rule=r&&"optional"!==r?r:void 0,this.type=n,this.id=t,this.extend=s||void 0,this.required="required"===r,this.optional=!this.required,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[n],this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null}t.exports=r;var i=e(13),s=i.extend(r),o=e(21),u=e(7),a=e(10),f=e(22),l=e(23),h=l.b;l.props(s,{packed:{get:s.isPacked=function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}}),s.setOption=function(e,t,n){return"packed"===e&&(this.c=null),i.prototype.setOption.call(this,e,t,n)},r.testJSON=function(e){return Boolean(e&&void 0!==e.id)},r.fromJSON=function(e,t){return void 0!==t.keyType?a.fromJSON(e,t):new r(e,t.id,t.type,t.role,t.extend,t.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;var e=f.defaults[this.type];if(void 0===e){var t=this.parent.lookup(this.type);if(t instanceof o)this.resolvedType=t,e=null;else{if(!(t instanceof u))throw Error("unresolvable field type: "+this.type);this.resolvedType=t,e=0}}var n;return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.options&&void 0!==(n=this.options.default)?this.defaultValue=n:this.defaultValue=e,this.long&&(this.defaultValue=l.Long.fromValue(this.defaultValue)),i.prototype.resolve.call(this)},s.jsonConvert=function(e,t){if(t){if(this.resolvedType instanceof u&&t.enum===String)return this.resolvedType.getValuesById()[e];if(this.long&&t.long)return t.long===Number?"number"==typeof e?e:l.Long.fromValue(e).toNumber():l.Long.fromValue(e,"u"===this.type.charAt(0)).toString()}return e}},{10:10,13:13,21:21,22:22,23:23,7:7}],9:[function(e,t,n){"use strict";function r(e,t,n){if("function"!=typeof e)throw u("clazz","a function");if(!(t instanceof s))throw u("type","a Type");n||(n={});var a={$type:{value:t}};n.noStatics||o.merge(a,{encode:{value:function(e,t){return this.$type.encode(e,t)}},encodeDelimited:{value:function(e,t){return this.$type.encodeDelimited(e,t)}},decode:{value:function(e){return this.$type.decode(e)}},decodeDelimited:{value:function(e){return this.$type.decodeDelimited(e)}},verify:{value:function(e){return this.$type.verify(e)}}},!0),o.props(e,a);var f=r.defineProperties(new i,t);return e.prototype=f,f.constructor=e,n.noRegister||t.setCtor(e),f}t.exports=r;var i=e(16),s=e(21),o=e(23),u=o.b;r.defineProperties=function(e,t){var n={$type:{value:t}};return t.getFieldsArray().forEach(function(t){t.resolve(),e[t.name]=Array.isArray(t.defaultValue)?o.emptyArray:o.isObject(t.defaultValue)?o.emptyObject:t.defaultValue}),t.getOneofsArray().forEach(function(t){o.prop(e,t.resolve().name,{get:function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(t.oneof.indexOf(e[n])>-1)return e[n]},set:function(e){for(var n=t.oneof,r=0;r<n.length;++r)n[r]!==e&&delete this[n[r]]}})}),o.props(e,n),e}},{16:16,21:21,23:23}],10:[function(e,t,n){"use strict";function r(e,t,n,r,s){if(i.call(this,e,t,r,s),!f.isString(n))throw f.b("keyType");this.keyType=n,this.resolvedKeyType=null,this.map=!0}t.exports=r;var i=e(8),s=i.prototype,o=i.extend(r),u=e(7),a=e(22),f=e(23);r.testJSON=function(e){return i.testJSON(e)&&void 0!==e.keyType},r.fromJSON=function(e,t){return new r(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;var e=a.mapKey[this.keyType];if(void 0===e){var t=this.parent.lookup(this.keyType);if(!(t instanceof u))throw Error("unresolvable map key type: "+this.keyType);this.resolvedKeyType=t}return s.resolve.call(this)}},{22:22,23:23,7:7,8:8}],11:[function(e,t,n){"use strict";function r(e,t,n,r,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 a("type");if(!u.isString(n))throw a("requestType");if(!u.isString(r))throw a("responseType");i.call(this,e,f),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=r,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=r;var i=e(13),s=i.extend(r),o=e(21),u=e(23),a=u.b;r.testJSON=function(e){return Boolean(e&&void 0!==e.requestType)},r.fromJSON=function(e,t){return new r(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,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=this.parent.lookup(this.requestType);if(!(e&&e instanceof o))throw Error("unresolvable request type: "+this.requestType);if(this.resolvedRequestType=e,e=this.parent.lookup(this.responseType),!(e&&e instanceof o))throw Error("unresolvable response type: "+this.requestType);return this.resolvedResponseType=e,i.prototype.resolve.call(this)}},{13:13,21:21,23:23}],12:[function(e,t,n){"use strict";function r(e,t){o.call(this,e,t),this.nested=void 0,this.d=null}function i(e){return e.d=null,e}function s(e){if(e&&e.length){for(var t={},n=0;n<e.length;++n)t[e[n].name]=e[n].toJSON();return t}}t.exports=r;var o=e(13),u=o.extend(r),a=e(7),f=e(21),l=e(8),h=e(19),c=e(23),d=c.b,p=[a,f,h,l,r],v="one of "+p.map(function(e){return e.name}).join(", ");c.props(u,{nestedArray:{get:function(){return this.d||(this.d=c.toArray(this.nested))}}}),r.testJSON=function(e){return Boolean(e&&!e.fields&&!e.values&&void 0===e.id&&!e.oneof&&!e.methods&&void 0===e.requestType)},r.fromJSON=function(e,t){return new r(e,t.options).addJSON(t.nested)},u.toJSON=function(){return{options:this.options,nested:s(this.getNestedArray())}},r.arrayToJSON=s,u.addJSON=function(e){var t=this;return e&&Object.keys(e).forEach(function(n){for(var r=e[n],i=0;i<p.length;++i)if(p[i].testJSON(r))return t.add(p[i].fromJSON(n,r));throw d("nested."+n,"JSON for "+v)}),this},u.get=function(e){return void 0===this.nested?null:this.nested[e]||null},u.add=function(e){if(!e||p.indexOf(e.constructor)<0)throw d("object",v);if(e instanceof l&&void 0===e.extend)throw d("object","an extension field when not part of a type");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof r&&e instanceof r)||t instanceof f||t instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.getNestedArray(),s=0;s<n.length;++s)e.add(n[s]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),i(this)},u.remove=function(e){if(!(e instanceof o))throw d("object","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),i(this)},u.define=function(e,t){c.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof r))throw Error("path conflicts with non-namespace objects")}else n.add(n=new r(i))}return t&&n.addJSON(t),n},u.resolveAll=function(){for(var e=this.getNestedArray(),t=0;t<e.length;)e[t]instanceof r?e[t++].resolveAll():e[t++].resolve();return o.prototype.resolve.call(this)},u.lookup=function(e,t){if(c.isString(e)){if(!e.length)return null;e=e.split(".")}else if(!e.length)return null;if(""===e[0])return this.getRoot().lookup(e.slice(1));var n=this.get(e[0]);return n&&(1===e.length||n instanceof r&&(n=n.lookup(e.slice(1),!0)))?n:null===this.parent||t?null:this.parent.lookup(e)}},{13:13,19:19,21:21,23:23,7:7,8:8}],13:[function(e,t,n){"use strict";function r(e,t){if(!o.isString(e))throw u("name");if(t&&!o.isObject(t))throw u("options","an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1}function i(e){var t=e.prototype=Object.create(this.prototype);return t.constructor=e,e.extend=i,t}t.exports=r,r.extend=i;var s=e(18),o=e(23),u=o.b,a=r.prototype;o.props(a,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:a.getFullName=function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),a.toJSON=function(){throw Error()},a.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.getRoot();t instanceof s&&t.e(this)},a.onRemove=function(e){var t=e.getRoot();t instanceof s&&t.f(this),this.parent=null,this.resolved=!1},a.resolve=function(){if(this.resolved)return this;var e=this.getRoot();return e instanceof s&&(this.resolved=!0),this},a.getOption=function(e){if(this.options)return this.options[e]},a.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},a.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(n){this.setOption(n,e[n],t)},this),this},a.toString=function(){return this.constructor.name+" "+this.getFullName()}},{18:18,23:23}],14:[function(e,t,n){"use strict";function r(e,t,n){if(Array.isArray(t)||(n=t,t=void 0),s.call(this,e,n),t&&!Array.isArray(t))throw f("fieldNames","an Array");this.ucName=this.name.substring(0,1).toUpperCase()+this.name.substring(1),this.oneof=t||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=r;var s=e(13),o=s.extend(r),u=e(8),a=e(23),f=a.b;r.testJSON=function(e){return Boolean(e.oneof)},r.fromJSON=function(e,t){return new r(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw f("field","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 f("field","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),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{13:13,23:23,8:8}],15:[function(e,t,n){"use strict";function r(e){return null===e?null:e.toLowerCase()}function i(e,t){function n(e,t){return Error("illegal "+(t||"token")+" '"+e+"' (line "+re.line()+F)}function i(){var e,t=[];do{if((e=ie())!==B&&e!==J)throw n(e);t.push(ie()),ue(e),e=oe()}while(e===B||e===J);return t.join("")}function v(e){var t=ie();switch(r(t)){case J:case B:return se(t),i();case"true":return!0;case"false":return!1}try{return L(t)}catch(r){if(e&&m.test(t))return t;throw n(t,"value")}}function q(){var e=V(ie()),t=e;return ue("to",!0)&&(t=V(ie())),ue(E),[e,t]}function L(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var i=r(e);switch(i){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(i))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(i))return t*parseFloat(e);throw n(e,"number")}function V(e,t){var i=r(e);switch(i){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw n(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(i))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw n(e,"id")}function z(){if(void 0!==Y)throw n("package");if(Y=ie(),!m.test(Y))throw n(Y,A);he=he.define(Y),ue(E)}function R(){var e,t=oe();switch(t){case"weak":e=te||(te=[]),ie();break;case"public":ie();default:e=ee||(ee=[])}t=i(),ue(E),e.push(t)}function $(){ue("="),ne=r(i());var e;if(["proto2",e="proto3"].indexOf(ne)<0)throw n(ne,"syntax");fe=ne===e,ue(E)}function I(e,t){switch(t){case x:return K(e,t),ue(E),!0;case"message":return C(e,t),!0;case"enum":return D(e,t),!0;case"service":return G(e,t),!0;case"extend":return Q(e,t),!0}return!1}function C(e,t){var i=ie();if(!g.test(i))throw n(i,"type name");var s=new u(i);if(ue(T,!0)){for(;(t=ie())!==S;){var o=r(t);if(!I(s,t))switch(o){case"map":M(s,o);break;case b:case O:case k:P(s,o);break;case"oneof":U(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(q(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(q(s,o));break;default:if(!fe||!m.test(t))throw n(t);se(t),P(s,O)}}ue(E,!0)}else ue(E);e.add(s)}function P(e,t,r){var i=ie();if(!m.test(i))throw n(i,N);var s=ie();if(!g.test(s))throw n(s,A);s=y(s),ue("=");var o=V(ie()),u=Z(new a(s,o,i,t,r));u.repeated&&u.setOption("packed",fe,!0),e.add(u)}function M(e){ue("<");var t=ie();if(void 0===p.mapKey[t])throw n(t,N);ue(",");var r=ie();if(!m.test(r))throw n(r,N);ue(">");var i=ie();if(!g.test(i))throw n(i,A);i=y(i),ue("=");var s=V(ie()),o=Z(new f(i,s,t,r));e.add(o)}function U(e,t){var r=ie();if(!g.test(r))throw n(r,A);r=y(r);var i=new l(r);if(ue(T,!0)){for(;(t=ie())!==S;)t===x?(K(i,t),ue(E)):(se(t),P(i,O));ue(E,!0)}else ue(E);e.add(i)}function D(e,t){var i=ie();if(!g.test(i))throw n(i,A);var s={},o=new h(i,s);if(ue(T,!0)){for(;(t=ie())!==S;)r(t)===x?K(o):_(o,t);ue(E,!0)}else ue(E);e.add(o)}function _(e,t){if(!g.test(t))throw n(t,A);var r=t;ue("=");var i=V(ie(),!0);e.values[r]=i,Z({})}function K(e,t){var r=ue(j,!0),i=ie();if(!m.test(i))throw n(i,A);r&&(ue(F),i=j+i+F,t=oe(),w.test(t)&&(i+=t,ie())),ue("="),H(e,i)}function H(e,t){if(ue(T,!0))for(;(le=ie())!==S;){if(!g.test(le))throw n(le,A);t=t+"."+le,ue(":",!0)?W(e,t,v(!0)):H(e,t)}else W(e,t,v(!0))}function W(e,t,n){e.setOption?e.setOption(t,n):e[t]=n}function Z(e){if(ue("[",!0)){do K(e,x);while(ue(",",!0));ue("]")}return ue(E),e}function G(e,t){if(t=ie(),!g.test(t))throw n(t,"service name");var i=t,s=new c(i);if(ue(T,!0)){for(;(t=ie())!==S;){var o=r(t);switch(o){case x:K(s,o),ue(E);break;case"rpc":X(s,o);break;default:throw n(t)}}ue(E,!0)}else ue(E);e.add(s)}function X(e,t){var i=t,s=ie();if(!g.test(s))throw n(s,A);var o,u,a,f;ue(j);var l;if(ue(l="stream",!0)&&(u=!0),!m.test(t=ie()))throw n(t);if(o=t,ue(F),ue("returns"),ue(j),ue(l,!0)&&(f=!0),!m.test(t=ie()))throw n(t);a=t,ue(F);var h=new d(s,i,o,a,u,f);if(ue(T,!0)){for(;(t=ie())!==S;){var c=r(t);switch(c){case x:K(h,c),ue(E);break;default:throw n(t)}}ue(E,!0)}else ue(E);e.add(h)}function Q(e,t){var i=ie();if(!m.test(i))throw n(i,"reference");if(ue(T,!0)){for(;(t=ie())!==S;){var s=r(t);switch(s){case b:case k:case O:P(e,s,i);break;default:if(!fe||!m.test(t))throw n(t);se(t),P(e,O,i)}}ue(E,!0)}else ue(E)}t||(t=new o);var Y,ee,te,ne,re=s(e),ie=re.next,se=re.push,oe=re.peek,ue=re.skip,ae=!0,fe=!1;t||(t=new o);for(var le,he=t;null!==(le=ie());){var ce=r(le);switch(ce){case"package":if(!ae)throw n(le);z();break;case"import":if(!ae)throw n(le);R();break;case"syntax":if(!ae)throw n(le);$();break;case x:if(!ae)throw n(le);K(he,le),ue(E);break;default:if(I(he,le)){ae=!1;continue}throw n(le)}}return{package:Y,imports:ee,weakImports:te,syntax:ne,root:t}}t.exports=i;var s=e(20),o=e(18),u=e(21),a=e(8),f=e(10),l=e(14),h=e(7),c=e(19),d=e(11),p=e(22),v=e(23),y=v.camelCase,g=/^[a-zA-Z_][a-zA-Z_0-9]*$/,m=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,w=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,b="required",k="repeated",O="optional",x="option",A="name",N="type",T="{",S="}",j="(",F=")",E=";",B='"',J="'"},{10:10,11:11,14:14,18:18,19:19,20:20,21:21,22:22,23:23,7:7,8:8}],16:[function(e,t,n){"use strict";function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}t.exports=r,r.prototype.asJSON=function(e){var t,n=!(e&&e.fieldsOnly),r=this.constructor.$type.fields,i={};if(e&&e.defaults){t=[];for(var s in this)t.push(s)}else t=Object.keys(this);for(var o,u=0;u<t.length;++u){var a=r[o=t[u]],f=this[o];if(a)if(a.repeated){if(f&&f.length){for(var l=new Array(f.length),h=0,c=f.length;h<c;++h)l[h]=a.jsonConvert(f[h],e);i[o]=l}}else i[o]=a.jsonConvert(f,e);else n&&(i[o]=f)}return i}},{}],17:[function(e,t,n){"use strict";function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(){O.Long?(T.int64=a,T.uint64=l,T.sint64=c,T.fixed64=v,T.sfixed64=g):(T.int64=f,T.uint64=h,T.sint64=d,T.fixed64=y,T.sfixed64=m)}function s(e){this.buf=e,this.pos=0,this.len=e.length}function o(e,t){this.id=e,this.wireType=t}function u(){var e=0,t=0,n=0,i=0;if(this.len-this.pos>9){for(n=0;n<4;++n)if(i=this.buf[this.pos++],e|=(127&i)<<7*n,i<128)return new A(e>>>0,t>>>0);if(i=this.buf[this.pos++],e|=(127&i)<<28,t|=(127&i)>>4,i<128)return new A(e>>>0,t>>>0);for(n=0;n<5;++n)if(i=this.buf[this.pos++],t|=(127&i)<<7*n+3,i<128)return new A(e>>>0,t>>>0)}else{for(n=0;n<4;++n){if(this.pos>=this.len)throw r(this);if(i=this.buf[this.pos++],e|=(127&i)<<7*n,i<128)return new A(e>>>0,t>>>0)}if(this.pos>=this.len)throw r(this);if(i=this.buf[this.pos++],e|=(127&i)<<28,t|=(127&i)>>4,i<128)return new A(e>>>0,t>>>0);for(n=0;n<5;++n){if(this.pos>=this.len)throw r(this);if(i=this.buf[this.pos++],t|=(127&i)<<7*n+3,i<128)return new A(e>>>0,t>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function l(){return u.call(this).toLong(!0)}function h(){return u.call(this).toNumber(!0)}function c(){return u.call(this).zzDecode().toLong()}function d(){return u.call(this).zzDecode().toNumber()}function p(){if(this.pos+8>this.len)throw r(this,8);return new A((this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0,(this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0)}function v(){return p.call(this).toLong(!0)}function y(){return p.call(this).toNumber(!0)}function g(){return p.call(this).zzDecode().toLong()}function m(){return p.call(this).zzDecode().toNumber()}function w(e){F&&F(),s.call(this,e)}function b(e,t,n){return e.utf8Slice(t,n)}function k(e,t,n){return e.toString("utf8",t,n)}t.exports=s,s.BufferReader=w;var O=e(26),x=e(1),A=O.LongBits,N="undefined"!=typeof Uint8Array?Uint8Array:Array;s.configure=i,s.create=function(e){return new(O.Buffer&&O.Buffer.isBuffer(e)&&w||s)(e)};var T=s.prototype;T.h=N.prototype.subarray||N.prototype.slice,T.tag=function(){if(this.pos>=this.len)throw r(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},T.int32=function(){var e=this.buf[this.pos++],t=127&e;if(e>127&&(e=this.buf[this.pos++],t|=(127&e)<<7,e>127&&(e=this.buf[this.pos++],t|=(127&e)<<14,e>127&&(e=this.buf[this.pos++],t|=(127&e)<<21,e>127&&(e=this.buf[this.pos++],t|=e<<28,e>127&&(this.pos+=5))))),this.pos>this.len)throw this.pos=this.len,r(this);return t},T.uint32=function(){return this.int32()>>>0},T.sint32=function(){var e=this.int32();return e>>>1^-(1&e)},T.bool=function(){return 0!==this.int32()},T.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return this.pos+=4,this.buf[this.pos-4]|this.buf[this.pos-3]<<8|this.buf[this.pos-2]<<16|this.buf[this.pos-1]<<24},T.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var S="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(n,r){return t[0]=n[r++],t[1]=n[r++],t[2]=n[r++],t[3]=n[r],e[0]}:function(n,r){return t[3]=n[r++],t[2]=n[r++],t[1]=n[r++],t[0]=n[r],e[0]}}():function(e,t){return x.read(e,t,!1,23,4)};T.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=S(this.buf,this.pos);return this.pos+=4,e};var j="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(n,r){return t[0]=n[r++],t[1]=n[r++],t[2]=n[r++],t[3]=n[r++],t[4]=n[r++],t[5]=n[r++],t[6]=n[r++],t[7]=n[r],e[0]}:function(n,r){return t[7]=n[r++],t[6]=n[r++],t[5]=n[r++],t[4]=n[r++],t[3]=n[r++],t[2]=n[r++],t[1]=n[r++],t[0]=n[r],e[0]}}():function(e,t){return x.read(e,t,!1,52,8)};T.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},T.bytes=function(){var e=this.int32()>>>0,t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},T.string=function(){var e=this.bytes(),t=e.length;if(t){for(var n=new Array(t),r=0,i=0;r<t;){var s=e[r++];if(s<128)n[i++]=s;else if(s>191&&s<224)n[i++]=(31&s)<<6|63&e[r++];else if(s>239&&s<365){var o=((7&s)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;n[i++]=55296+(o>>10),n[i++]=56320+(1023&o)}else n[i++]=(15&s)<<12|(63&e[r++])<<6|63&e[r++]}return String.fromCharCode.apply(String,n.slice(0,i))}return""},T.skip=function(e){if(void 0===e){do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++])}else{if(this.pos+e>this.len)throw r(this,e);this.pos+=e}return this},T.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var t=this.tag();if(4===t.wireType)break;this.skipType(t.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+e)}return this},T.reset=function(e){return e?(this.buf=e,
this.len=e.length):(this.buf=null,this.len=0),this.pos=0,this},T.finish=function(e){var t=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(e),t};var F=function(){if(!O.Buffer)throw Error("Buffer is not supported");E.h=O.Buffer.prototype.slice,B=O.Buffer.prototype.utf8Slice?b:k,F=!1},E=w.prototype=Object.create(s.prototype);E.constructor=w,"undefined"==typeof Float32Array&&(E.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,e}),"undefined"==typeof Float64Array&&(E.double=function(){if(this.pos+8>this.len)throw r(this,8);var e=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,e});var B;E.string=function(){var e=this.int32()>>>0,t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,B(this.buf,t,n)},E.finish=function(e){var t=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(e),t},i()},{1:1,26:26}],18:[function(e,t,n){"use strict";function r(e){s.call(this,"",e),this.deferred=[],this.files=[]}function i(e){var t=e.parent.lookup(e.extend);if(t){var n=new u(e.getFullName(),e.id,e.type,e.rule,(void 0),e.options);return n.declaringField=e,e.extensionField=n,t.add(n),!0}return!1}t.exports=r;var s=e(12),o=s.extend(r),u=e(8),a=e(23),f=e(6);r.fromJSON=function(e,t){return t||(t=new r),t.setOptions(e.options).addJSON(e.nested)},o.resolvePath=a.resolvePath,o.load=function t(n,r){function i(e,t){if(r){var n=r;r=null,n(e,t)}}function s(t,n){try{if(a.isString(n)&&"{"===n.charAt(0)&&(n=JSON.parse(n)),a.isString(n)){var r=e(15)(n,u);r.imports&&r.imports.forEach(function(e){o(u.resolvePath(t,e))}),r.weakImports&&r.weakImports.forEach(function(e){o(u.resolvePath(t,e),!0)})}else u.setOptions(n.options).addJSON(n.nested)}catch(e){return void i(e)}l||i(null,u)}function o(e,t){var n=e.indexOf("google/protobuf/");if(n>-1){var o=e.substring(n);o in f&&(e=o)}if(!(u.files.indexOf(e)>-1)){if(u.files.push(e),e in f)return++l,void setTimeout(function(){--l,s(e,f[e])});++l,a.fetch(e,function(n,o){if(--l,r)return n?void(t||i(n)):void s(e,o)})}}var u=this;if(!r)return a.asPromise(t,u,n);var l=0;a.isString(n)&&(n=[n]),n.forEach(function(e){o(u.resolvePath("",e))}),l||i(null)},o.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var n=0;n<t.length;)i(t[n])?t.splice(n,1):++n;if(this.deferred=t,e instanceof u&&void 0!==e.extend&&!e.extensionField&&!i(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof s){var r=e.getNestedArray();for(n=0;n<r.length;++n)this.e(r[n])}},o.f=function(e){if(e instanceof u){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 s)for(var n=e.getNestedArray(),r=0;r<n.length;++r)this.f(n[r])},o.toString=function(){return this.constructor.name}},{12:12,15:15,23:23,6:6,8:8}],19:[function(e,t,n){"use strict";function r(e,t){s.call(this,e,t),this.methods={},this.i=null}function i(e){return e.i=null,e}t.exports=r;var s=e(12),o=s.prototype,u=s.extend(r),a=e(11),f=e(23);f.props(u,{methodsArray:{get:function(){return this.i||(this.i=f.toArray(this.methods))}}}),r.testJSON=function(e){return Boolean(e&&e.methods)},r.fromJSON=function(e,t){var n=new r(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){n.add(a.fromJSON(e,t.methods[e]))}),n},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,methods:s.arrayToJSON(this.getMethodsArray())||{},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.getMethodsArray(),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,n){var r={};return f.prop(r,"$rpc",{value:e}),this.getMethodsArray().forEach(function(i){var s=i.name.substring(0,1).toLowerCase()+i.name.substring(1);r[s]=function(r,s){i.resolve();var o;try{o=(t&&i.resolvedRequestType.encodeDelimited(r)||i.resolvedRequestType.encode(r)).finish()}catch(e){return void("function"==typeof setImmediate&&setImmediate||setTimeout)(function(){s(e)})}e(i,o,function(e,t){if(e)return void s(e);var r;try{r=n&&i.resolvedResponseType.decodeDelimited(t)||i.resolvedResponseType.decode(t)}catch(e){return void s(e)}s(null,r)})}}),r}},{11:11,12:12,23:23}],20:[function(e,t,n){"use strict";function r(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 "+g+")")}function n(){var n='"'===w?o:u;n.lastIndex=v-1;var i=n.exec(e);if(!i)throw t("string");return v=n.lastIndex,c(w),w=null,r(i[1])}function i(t){return e.charAt(t)}function h(){if(m.length>0)return m.shift();if(w)return n();var r,o,u;do{if(v===y)return null;for(r=!1;/\s/.test(u=i(v));)if(u===a&&++g,++v===y)return null;if(i(v)===f){if(++v===y)throw t("comment");if(i(v)===f){for(;i(++v)!==a;)if(v===y)return null;++v,++g,r=!0}else{if((u=i(v))!==l)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=i(v)}while(o!==l||u!==f);++v,r=!0}}}while(r);if(v===y)return null;var h=v;s.lastIndex=0;var c=s.test(i(h++));if(!c)for(;h<y&&!s.test(i(h));)++h;var d=e.substring(v,v=h);return'"'!==d&&"'"!==d||(w=d),d}function c(e){m.push(e)}function d(){if(!m.length){var e=h();if(null===e)return null;c(e)}return m[0]}function p(e,n){var r=d(),i=r===e;if(i)return h(),!0;if(!n)throw t("token '"+r+"', '"+e+"' expected");return!1}e=e.toString();var v=0,y=e.length,g=1,m=[],w=null;return{line:function(){return g},next:h,peek:d,push:c,skip:p}}t.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",l="*"},{}],21:[function(e,t,n){"use strict";function r(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.j=null,this.k=null,this.l=null,this.m=null,this.n=null}function i(e){return e.j=e.k=e.m=e.n=null,delete e.encode,delete e.decode,e}t.exports=r;var s=e(12),o=s.prototype,u=s.extend(r),a=e(7),f=e(14),l=e(8),h=e(19),c=e(16),d=e(17),p=e(27),v=e(9),y=e(23),g=e(2);y.props(u,{fieldsById:{get:function(){if(this.j)return this.j;this.j={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this.j[r])throw Error("duplicate id "+r+" in "+this);this.j[r]=n}return this.j}},fieldsArray:{get:function(){return this.k||(this.k=y.toArray(this.fields))}},repeatedFieldsArray:{get:function(){return this.l||(this.l=this.getFieldsArray().filter(function(e){return e.repeated}))}},oneofsArray:{get:function(){return this.m||(this.m=y.toArray(this.oneofs))}},ctor:{get:function(){if(this.n)return this.n;var e;return e=g.supported?g("p")("P.call(this,p)").eof(this.getFullName()+"$ctor",{P:c}):function(e){c.call(this,e)},e.prototype=v(e,this),this.n=e,e},set:function(e){if(e&&!(e.prototype instanceof c))throw y.b("ctor","a constructor inheriting from Prototype");this.n=e}}}),r.testJSON=function(e){return Boolean(e&&e.fields)};var m=[a,r,l,h];r.fromJSON=function(e,t){var n=new r(e,t.options);return n.extensions=t.extensions,n.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){n.add(l.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){n.add(f.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var r=t.nested[e],i=0;i<m.length;++i)if(m[i].testJSON(r))return void n.add(m[i].fromJSON(e,r));throw Error("invalid nested object in "+n+": "+e)}),t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),n},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,oneofs:s.arrayToJSON(this.getOneofsArray()),fields:s.arrayToJSON(this.getFieldsArray().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,nested:e&&e.nested||void 0}},u.resolveAll=function(){for(var e=this.getFieldsArray(),t=0;t<e.length;)e[t++].resolve();var n=this.getOneofsArray();for(t=0;t<n.length;)n[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.getFieldsById()[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,t){if(e&&"function"!=typeof e){if(e instanceof c)return e}else t=e,e=void 0;if(t){if(!(t.prototype instanceof c))throw y.b("ctor","a constructor inheriting from Prototype")}else t=this.getCtor();return new t(e)},u.encode=function(e,t){return(this.encode=g.supported?g.encode.generate(this).eof(this.getFullName()+"$encode",{Writer:p,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:y}):g.encode.fallback).call(this,e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},u.decode=function(e,t){return(this.decode=g.supported?g.decode.generate(this).eof(this.getFullName()+"$decode",{Reader:d,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:y}):g.decode.fallback).call(this,e,t)},u.decodeDelimited=function(e){return e=e instanceof d?e:d.create(e),this.decode(e,e.uint32())},u.verify=function(e){return(this.verify=g.supported?g.verify.generate(this).eof(this.getFullName()+"$verify",{types:this.getFieldsArray().map(function(e){return e.resolvedType})}):g.verify.fallback).call(this,e)}},{12:12,14:14,16:16,17:17,19:19,2:2,23:23,27:27,7:7,8:8,9:9}],22:[function(e,t,n){"use strict";function r(e,t){var n=0,r={};for(t|=0;n<e.length;)r[o[n+t]]=e[n++];return r}var i=n,s=e(23),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=r([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=r([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray]),i.long=r([0,0,0,1,1],7),i.mapKey=r([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=r([1,5,0,0,0,5,5,0,0,0,1,1,0])},{23:23}],23:[function(e,t,n){"use strict";function r(e){return"string"==typeof e||e instanceof String}function i(e,t){for(var n=[],r=2;r<arguments.length;++r)n.push(arguments[r]);return new Promise(function(r,i){e.apply(t,n.concat(function(e){e?i(e):r.apply(null,Array.prototype.slice.call(arguments,1))}))})}function s(t,n){function o(){return 0!==f.status&&200!==f.status?n(Error("status "+f.status)):r(f.responseText)?n(null,f.responseText):n(Error("request failed"))}if(!n)return i(s,a,t);var u;try{u=e("fs")}catch(e){}if(u&&u.readFile)return u.readFile(t,"utf8",n);var f=new XMLHttpRequest;f.onreadystatechange=function(){4===f.readyState&&o()},f.open("GET",t,!0),f.send()}function o(e){return/^(?:\/|[a-zA-Z0-9]+:)/.test(e)}function u(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),n=o(e),r="";n&&(r=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0?t.splice(--i,2):n?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return r+t.join("/")}var a=n;a.isString=r,a.isObject=function(e){return Boolean(e&&"object"==typeof e)},a.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},a.toArray=function(e){if(!e)return[];for(var t=Object.keys(e),n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=e[t[i]];return r},a.b=function(e,t){return TypeError(e+" must be "+(t||"a string"))},a.asPromise=i,a.fetch=s,a.isAbsolutePath=o,a.normalizePath=u,a.resolvePath=function(e,t,n){return n||(t=u(t)),o(t)?t:(n||(e=u(e)),e=e.replace(/(?:\/|^)[^\/]+$/,""),e.length?u(e+"/"+t):t)},a.merge=function(e,t,n){if(t)for(var r=Object.keys(t),i=0;i<r.length;++i)void 0!==e[r[i]]&&n||(e[r[i]]=t[r[i]]);return e},a.safeProp=function(e){return"['"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"']"},a.sprintf=function(e){var t=Array.prototype.slice.call(arguments,1),n=0;return e.replace(/%([djs])/g,function(e,r){var i=t[n++];switch(r){case"j":return JSON.stringify(i);case"p":return a.safeProp(i);default:return String(i)}})},a.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})},a.underScore=function(e){return e.substring(0,1)+e.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(e,t){return"_"+t.toLowerCase()})},a.newBuffer=function(e){return e=e||0,a.Buffer?a.Buffer.allocUnsafe&&a.Buffer.allocUnsafe(e)||new a.Buffer(e):new("undefined"!=typeof Uint8Array&&Uint8Array||Array)(e)},a.merge(a,e(26))},{26:26,undefined:void 0}],24:[function(e,t,n){"use strict";function r(e,t){this.lo=e,this.hi=t}t.exports=r;var i=e(23),s=r.prototype,o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1},r.fromNumber=function(e){if(0===e)return o;var t=e<0;e=Math.abs(e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){switch(typeof e){case"number":return r.fromNumber(e);case"string":e=i.Long.fromString(e)}return(e.low||e.high)&&new r(e.low>>>0,e.high>>>0)||o},s.toNumber=function(e){return!e&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(e){return new i.Long(this.lo,this.hi,e)};var u=String.prototype.charCodeAt;r.fromHash=function(e){return new r((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24&255,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24&255)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<1<<21?3:4:t<16384?t<128?5:6:t<1<<21?7:8:n<128?9:10}},{23:23}],25:[function(e,t,n){"use strict";function r(e,t,n){var r=n||8192,i=r>>>1,s=null,o=r;return function(n){if(n>i)return e(n);o+n>r&&(s=e(r),o=0);var u=t.call(s,o,o+=n);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],26:[function(e,t,n){(function(t){"use strict";var r=n,i=r.LongBits=e(24);r.pool=e(25);var s=r.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node);if(r.Buffer=null,s)try{r.Buffer=e("buffer").Buffer}catch(e){}if(r.Long=t.dcodeIO&&t.dcodeIO.Long||null,!r.Long&&s)try{r.Long=e("long")}catch(e){}r.longToHash=function(e){return e?i.from(e).toHash():"\0\0\0\0\0\0\0\0"},r.longFromHash=function(e,t){var n=i.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.longNeq=function(e,t){return"number"==typeof e?"number"==typeof t?e!==t:(e=i.fromNumber(e)).lo!==t.low||e.hi!==t.high:"number"==typeof t?(t=i.fromNumber(t)).lo!==e.low||t.hi!==e.high:e.low!==t.low||e.high!==t.high},r.props=function(e,t){Object.keys(t).forEach(function(n){r.prop(e,n,t[n])})},r.prop=function(e,t,n){var r=!-[1],i=t.substring(0,1).toUpperCase()+t.substring(1);n.get&&(e["get"+i]=n.get),n.set&&(e["set"+i]=r?function(e){n.set.call(this,e),this[t]=e}:n.set),r?void 0!==n.value&&(e[t]=n.value):Object.defineProperty(e,t,n)},r.emptyArray=Object.freeze([]),r.emptyObject=Object.freeze({})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{24:24,25:25,buffer:"buffer",long:"long"}],27:[function(e,t,n){"use strict";function r(e,t,n){this.fn=e,this.val=t,this.len=n,this.next=null}function i(){}function s(e,t){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=t}function o(){this.len=0,this.head=new r(i,0,0),this.tail=this.head,this.states=null}function u(e,t,n){e[t]=255&n}function a(e,t,n){for(;n>127;)e[t++]=127&n|128,n>>>=7;e[t]=n}function f(e,t,n){for(;n.hi;)e[t++]=127&n.lo|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0,n.hi>>>=7;for(;n.lo>127;)e[t++]=127&n.lo|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0;e[t++]=n.lo}function l(e,t,n){e[t++]=255&n,e[t++]=n>>>8&255,e[t++]=n>>>16&255,e[t]=n>>>24}function h(e,t,n){for(var r=0;r<n.length;++r){var i,s=n.charCodeAt(r);s<128?e[t++]=s:s<2048?(e[t++]=s>>6|192,e[t++]=63&s|128):55296===(64512&s)&&56320===(64512&(i=n.charCodeAt(r+1)))?(s=65536+((1023&s)<<10)+(1023&i),++r,e[t++]=s>>18|240,e[t++]=s>>12&63|128,e[t++]=s>>6&63|128,e[t++]=63&s|128):(e[t++]=s>>12|224,e[t++]=s>>6&63|128,e[t++]=63&s|128)}}function c(e){for(var t=e.length>>>0,n=0,r=0;r<t;++r){var i=e.charCodeAt(r);i<128?n+=1:i<2048?n+=2:55296===(64512&i)&&56320===(64512&e.charCodeAt(r+1))?(++r,n+=4):n+=3}return n}function d(){o.call(this)}function p(e,t,n){e.writeFloatLE(n,t,!0)}function v(e,t,n){e.writeDoubleLE(n,t,!0)}function y(e,t,n){n.length&&n.copy(e,t,0,n.length)}t.exports=o,o.BufferWriter=d;var g=e(26),m=e(1),w=g.LongBits,b="undefined"!=typeof Uint8Array?Uint8Array:Array;o.Op=r,o.State=s,o.create=function(){return new(g.Buffer&&d||o)},o.alloc=function(e){return new b(e)},b!==Array&&(o.alloc=g.pool(o.alloc,b.prototype.subarray||b.prototype.slice));var k=o.prototype;k.push=function(e,t,n){var i=new r(e,n,t);return this.tail.next=i,this.tail=i,this.len+=t,this},k.tag=function(e,t){return this.push(u,1,e<<3|7&t)},k.uint32=function(e){return e>>>=0,e<128?this.push(u,1,e):this.push(a,e<16384?2:e<2097152?3:e<268435456?4:5,e)},k.int32=function(e){return e<0?this.push(f,10,w.fromNumber(e)):this.uint32(e)},k.sint32=function(e){return this.uint32(e<<1^e>>31)},k.uint64=function(e){var t=w.from(e);return this.push(f,t.length(),t)},k.int64=k.uint64,k.sint64=function(e){var t=w.from(e).zzEncode();return this.push(f,t.length(),t)},k.bool=function(e){return this.push(u,1,e?1:0)},k.fixed32=function(e){return this.push(l,4,e>>>0)},k.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},k.fixed64=function(e){var t=w.from(e);return this.push(l,4,t.hi).push(l,4,t.lo)},k.sfixed64=function(e){var t=w.from(e).zzEncode();return this.push(l,4,t.hi).push(l,4,t.lo)};var O="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(n,r,i){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r]=t[3]}:function(n,r,i){e[0]=i,n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,n){m.write(e,n,t,!1,23,4)};k.float=function(e){return this.push(O,4,e)};var x="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(n,r,i){e[0]=i,n[r++]=t[0],n[r++]=t[1],n[r++]=t[2],n[r++]=t[3],n[r++]=t[4],n[r++]=t[5],n[r++]=t[6],n[r]=t[7]}:function(n,r,i){e[0]=i,n[r++]=t[7],n[r++]=t[6],n[r++]=t[5],n[r++]=t[4],n[r++]=t[3],n[r++]=t[2],n[r++]=t[1],n[r]=t[0]}}():function(e,t,n){m.write(e,n,t,!1,52,8)};k.double=function(e){return this.push(x,8,e)};var A=b.prototype.set?function(e,t,n){e.set(n,t)}:function(e,t,n){for(var r=0;r<n.length;++r)e[t+r]=n[r]};k.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(A,t,e):this.push(u,1,0)},k.string=function(e){var t=c(e);return t?this.uint32(t).push(h,t,e):this.push(u,1,0)},k.fork=function(){return this.states=new s(this,this.states),this.head=this.tail=new r(i,0,0),this.len=0,this},k.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(i,0,0),this.len=0),this},k.ldelim=function(e){var t=this.head,n=this.tail,r=this.len;return this.reset(),void 0!==e&&this.tag(e,2),this.uint32(r),this.tail.next=t.next,this.tail=n,this.len+=r,this},k.finish=function(){var e=this.head.next,t=this.constructor.alloc(this.len);this.reset();for(var n=0;e;)e.fn(t,n,e.val),n+=e.len,e=e.next;return t},d.alloc=function(e){return d.alloc=g.Buffer.allocUnsafe?g.Buffer.allocUnsafe:function(e){return new g.Buffer(e)},d.alloc(e)};var N=d.prototype=Object.create(o.prototype);N.constructor=d,"undefined"==typeof Float32Array&&(N.float=function(e){return this.push(p,4,e)}),"undefined"==typeof Float64Array&&(N.double=function(e){return this.push(v,8,e)}),b.prototype.set&&g.Buffer&&g.Buffer.prototype.set||(N.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(y,t,e):this.push(u,1,0)});var T=function(){return g.Buffer&&g.Buffer.prototype.utf8Write?function(e,t,n){n.length<40?h(e,t,n):e.utf8Write(n,t)}:function(e,t,n){n.length<40?h(e,t,n):e.write(n,t)}}();N.string=function(e){var t=e.length<40?c(e):g.Buffer.byteLength(e);return t?this.uint32(t).push(T,t,e):this.push(u,1,0)}},{1:1,26:26}],28:[function(e,t,n){(function(t){"use strict";function r(e,t,n){return"function"==typeof t?(n=t,t=new i.Root):t||(t=new i.Root),t.load(e,n)}var i=t.protobuf=n;i.load=r,i.tokenize=e(20),i.parse=e(15),i.Writer=e(27),i.BufferWriter=i.Writer.BufferWriter,i.Reader=e(17),i.BufferReader=i.Reader.BufferReader,i.codegen=e(2),i.ReflectionObject=e(13),i.Namespace=e(12),i.Root=e(18),i.Enum=e(7),i.Type=e(21),i.Field=e(8),i.OneOf=e(14),i.MapField=e(10),i.Service=e(19),i.Method=e(11),i.Prototype=e(16),i.inherits=e(9),i.types=e(22),i.common=e(6),i.util=e(23),"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(i.util.Long=e,i.Reader.configure()),i})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,2:2,20:20,21:21,22:22,23:23,27:27,6:6,7:7,8:8,9:9}]},{},[28]);
//# sourceMappingURL=protobuf.min.js.map