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