protobufjs
Version:
Protocol Buffers for JavaScript & TypeScript.
7 lines • 87.3 kB
JavaScript
/*!
* protobuf.js v8.7.0 (c) 2016, daniel wirtz
* compiled mon, 06 jul 2026 13:50:00 utc
* licensed under the bsd-3-clause license
* see: https://github.com/dcodeio/protobuf.js for details
*/
!function(y){"use strict";var n,e,i;n={1:[function(t,i,r){},{}],2:[function(t,i,r){var v=t(5),b=t(23),p=t(24);function h(t,i,r,n,e){if(i.resolvedType)if(i.resolvedType instanceof v){var s=e?"m"+e+"[m"+e+".length]":"m"+n;t("switch(d%s){",n);for(var o=i.resolvedType.values,h=Object.keys(o),u=0;u<h.length;++u)t("case%j:",h[u])("case %i:",o[h[u]])("%s=%j",s,o[h[u]])("break");t("default:"),"CLOSED"!==i.resolvedType.t.enum_type&&t('if(typeof d%s==="number"&&(d%s|0)===d%s)',n,n,n)("%s=d%s",s,n),t("}")}else t("if(!util.isObject(d%s))",n)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",n,r,n);else{var f=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",n,n);break;case"uint64":case"fixed64":f=!0;case"int64":case"sint64":case"sfixed64":t("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",n,n,f)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,f?"true":"");break;case"bytes":t('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length>=0)",n)("m%s=d%s",n,n);break;case"string":t("m%s=String(d%s)",n,n);break;case"bool":t("m%s=Boolean(d%s)",n,n)}}return t}function m(t,i,r,n,e){if(e=e||n,i.resolvedType)i.resolvedType instanceof v?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,e,e,r,e,e):t("d%s=types[%i].toObject(m%s,o,q+1)",n,r,e);else{var s=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,e,e,e);break;case"uint64":case"fixed64":s=!0;case"int64":case"sint64":case"sfixed64":t('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',n,e,e,e,e,s)('else if(typeof m%s==="number")',e)("d%s=o.longs===String?String(m%s):m%s",n,e,e)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,e,e,e,s?"true":"",e);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,e,e,e,e);break;default:t("d%s=m%s",n,e)}}return t}r.fromObject=function(t){var i=t.fieldsArray,r=p.codegen(["d","q"])("if(d instanceof C)")("return d")("if(!util.isObject(d))")("throw TypeError(%j)",t.fullName+": object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!i.length)return r("return new C");r("var m=new C");for(var n=0;n<i.length;++n){var e=i[n].resolve(),s=p.safeProp(e.name),o=!e.hasPresence&&!e.repeated&&!e.map&&(e.resolvedType instanceof v||b.basic[e.type]!==y);e.map?(r("if(d%s){",s)("if(!util.isObject(d%s))",s)("throw TypeError(%j)",e.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),r('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",s),h(r,e,n,s+"[ks[i]]")("}")("}")):e.repeated?(r("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected"),e.resolvedType instanceof v?r("m%s=[]",s):r("m%s=Array(d%s.length)",s,s),r("for(var i=0;i<d%s.length;++i){",s),h(r,e,n,s+"[i]",e.resolvedType instanceof v?s:y)("}")("}")):(e.resolvedType instanceof v||r("if(d%s!=null){",s),o&&(e.resolvedType instanceof v?r('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',s,e.typeDefault,s,n,s,e.typeDefault):"string"===e.type?r('if(typeof d%s!=="string"||d%s.length){',s,s):"bytes"===e.type?r("if(d%s.length){",s):"bool"===e.type?r("if(d%s){",s):"double"===e.type||"float"===e.type?r("if(!Object.is(Number(d%s),0)){",s):b.long[e.type]!==y?r('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',s,s,s,s):r("if(Number(d%s)!==0){",s)),h(r,e,n,s),o&&r("}"),e.resolvedType instanceof v||r("}"))}return r("return m")},r.toObject=function(t){var i=t.fieldsArray.slice().sort(p.compareFieldsById);if(!i.length)return p.codegen()("return {}");for(var r=p.codegen(["m","o","q"])("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),n=[],e=[],s=[],o=0;o<i.length;++o)i[o].partOf||(i[o].resolve().repeated?n:i[o].map?e:s).push(i[o]);if(n.length){for(r("if(o.arrays||o.defaults){"),o=0;o<n.length;++o)r("d%s=[]",p.safeProp(n[o].name));r("}")}if(e.length){for(r("if(o.objects||o.defaults){"),o=0;o<e.length;++o)r("d%s={}",p.safeProp(e[o].name));r("}")}if(s.length){for(r("if(o.defaults){"),o=0;o<s.length;++o){var h,u=s[o],f=p.safeProp(u.name);u.resolvedType instanceof v?r("d%s=o.enums===String?%j:%j",f,u.resolvedType.valuesById[u.typeDefault],u.typeDefault):u.long?r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',f)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',f,u.typeDefault.toString(),u.typeDefault.toString(),u.typeDefault.toNumber()):u.bytes?(h=Array.prototype.slice.call(u.typeDefault),r("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%j",f,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")):r("d%s=%j",f,u.typeDefault)}r("}")}for(var c=!1,o=0;o<i.length;++o){var a,l,u=i[o],d=t.i.indexOf(u),f=p.safeProp(u.name);u.map?(c||(c=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f),a=b.long[u.keyType]!==y,l=f+"[ks2[j]]",r("for(var j=0;j<ks2.length;++j){"),a&&r("var k2=util.longFromKey(ks2[j],%j).toString()","uint64"===u.keyType||"fixed64"===u.keyType),r('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",f),m(r,u,d,a?f+"[k2]":l,l)("}")):u.repeated?(r("if(m%s&&m%s.length){",f,f)("d%s=Array(m%s.length)",f,f)("for(var j=0;j<m%s.length;++j){",f),m(r,u,d,f+"[j]")("}")):(r("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",f,u.name),m(r,u,d,f),u.partOf&&!u.partOf.isProto3Optional&&r("if(o.oneofs)")("d%s=%j",p.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},{23:23,24:24,5:5}],3:[function(t,i,r){i.exports=function(t){for(var i=!1,r=!1,n=0;n<t.fieldsArray.length;++n){var e=t.i[n];e.map&&(i=!0),(e.resolvedType instanceof l||!e.repeated&&!e.map&&!e.hasPresence)&&(r=!0)}var s=v.codegen(["r","l","z","q","g"])("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(q===undefined)q=0")("if(q>Reader.recursionLimit)")('throw Error("max depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=g||new C"+(i?",k,v":r?",v":""))("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");t.fieldsArray.length&&s("var u=t&7")("switch(t>>>=3){");for(n=0;n<t.fieldsArray.length;++n){var o,h=t.i[n].resolve(),u=h.resolvedType instanceof l?"int32":h.type,f="m"+v.safeProp(h.name),c=h.resolvedType instanceof l&&"CLOSED"===h.resolvedType.t.enum_type;h.map?(s("case %i:{",h.id)("if(u!==2)")("break"),c||s("if(%s===util.emptyObject)",f)("%s={}",f),s("var c2=r.uint32()+r.pos"),d.defaults[h.keyType]!==y?s("k=%j",d.defaults[h.keyType]):s("k=null"),d.long[u]!==y?s("v=util.Long?util.Long.fromNumber(0,%j):0","uint64"===u||"fixed64"===u):d.defaults[u]!==y?s("v=%j",d.defaults[u]):s("v=null"),s("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",d.mapKey[h.keyType])("break")("k=r.%s()","string"===h.keyType?b(h):h.keyType)("continue")("case 2:")("if(u!==%i)",d.basic[u]===y?2:d.basic[u])("break"),d.basic[u]===y?s("v=types[%i].decode(r,r.uint32(),undefined,q+1)",n):s("v=r.%s()","string"===u?b(h):u),s("continue")("}")("r.skipType(u,q,t2)")("}"),c&&(s("if(types[%i].valuesById[v]===undefined){",n),p(s,"r.raw(s,r.pos)")("continue")("}")("if(%s===util.emptyObject)",f)("%s={}",f)),o=d.basic[u]===y?"v||new types["+n+"].ctor":"v",d.long[h.keyType]!==y?s('%s[typeof k==="object"?util.longToHash(k):k]=%s',f,o):("string"===h.keyType&&s('if(k==="__proto__")')("util.makeProp(%s,k)",f),s("%s[k]=%s",f,o))):h.repeated?(s("case %i:",h.id)("{"),d.packed[u]!==y&&(s("if(u===2){"),c?(s("var c2=r.uint32()+r.pos")("while(r.pos<c2){")("s=r.pos")("v=r.%s()",u)("if(types[%i].valuesById[v]!==undefined){",n)("if(!(%s&&%s.length))",f,f)("%s=[]",f)("%s.push(v)",f)("}else"),p(s,"util.rawField("+h.id+",0,r.raw(s,r.pos))")("}")):s("if(!(%s&&%s.length))",f,f)("%s=[]",f)("r.%ss(%s)",u,f),s("continue")("}")),s("if(u!==%i)",d.basic[u]===y?h.delimited?3:2:d.basic[u])("break"),c||s("if(!(%s&&%s.length))",f,f)("%s=[]",f),d.basic[u]===y?h.delimited?s("%s.push(types[%i].decode(r,undefined,%i,q+1))",f,n,8*h.id+4):s("%s.push(types[%i].decode(r,r.uint32(),undefined,q+1))",f,n):c?(s("v=r.%s()",u)("if(types[%i].valuesById[v]!==undefined){",n)("if(!(%s&&%s.length))",f,f)("%s=[]",f)("%s.push(v)",f)("}else"),p(s,"r.raw(s,r.pos)")):s("%s.push(r.%s())",f,"string"===u?b(h):u)):d.basic[u]===y?(s("case %i:{",h.id)("if(u!==%i)",h.delimited?3:2)("break"),h.delimited?s("%s=types[%i].decode(r,undefined,%i,q+1,%s)",f,n,8*h.id+4,f):s("%s=types[%i].decode(r,r.uint32(),undefined,q+1,%s)",f,n,f)):h.hasPresence?(s("case %i:{",h.id)("if(u!==%i)",d.basic[u])("break"),c?(s("v=r.%s()",u)("if(types[%i].valuesById[v]!==undefined){",n)("%s=v",f),h.partOf&&s("m%s=%j",v.safeProp(h.partOf.name),h.name),s("}else"),p(s,"r.raw(s,r.pos)")):s("%s=r.%s()",f,"string"===u?b(h):u)):(s("case %i:{",h.id)("if(u!==%i)",d.basic[u])("break"),c?(s("v=r.%s()",u)("if(types[%i].valuesById[v]!==undefined){",n)("if(v!==%j)",h.typeDefault)("%s=v",f)("else")("delete %s",f)("}else{"),p(s,"r.raw(s,r.pos)")("}")):(h.resolvedType instanceof l&&0!==h.typeDefault?s("if((v=r.%s())!==%j)",u,h.typeDefault):"string"===u?s("if((v=r.%s()).length)",b(h)):"bytes"===u?s("if((v=r.%s()).length)",u):d.long[u]!==y?s('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',u):s("double"===u||"float"===u?"if(!Object.is(v=r.%s(),0))":"if(v=r.%s())",u),s("%s=v",f)("else")("delete %s",f))),h.partOf&&!c&&s("m%s=%j",v.safeProp(h.partOf.name),h.name),s("continue")("}")}n&&s("}");for(s("r.skipType(%s,q,t)",n?"u":"t&7"),p(s,"r.raw(s,r.pos)")("}")("if(z!==undefined)")('throw Error("missing end group")'),n=0;n<t.i.length;++n){var a=t.i[n];a.required&&s("if(!Object.hasOwnProperty.call(m,%j))",a.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+a.name+"'")}return s("return m")};var l=t(5),d=t(23),v=t(24);function b(t){return"VERIFY"===t.t.utf8_validation?"stringVerify":"string"}function p(t,i){return t("if(!r.discardUnknown){")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(%s)",i)("}")}},{23:23,24:24,5:5}],4:[function(t,i,r){i.exports=function(t){for(var i,r=a.codegen(["m","w","q"])("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),n=t.fieldsArray.slice().sort(a.compareFieldsById),e=0;e<n.length;++e){var s=n[e].resolve(),o=t.i.indexOf(s),h=s.resolvedType instanceof f?"int32":s.type,u=c.basic[h];i="m"+a.safeProp(s.name),s.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i),"bool"===s.keyType?r("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(s.id<<3|2)>>>0,8|c.mapKey[s.keyType]):c.long[s.keyType]!==y?r("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(s.id<<3|2)>>>0,8|c.mapKey[s.keyType],s.keyType,"uint64"===s.keyType||"fixed64"===s.keyType):r("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|c.mapKey[s.keyType],s.keyType),u===y?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",o,i):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|u,h,i),r("}")("}")):s.repeated?(r("if(%s!=null&&%s.length){",i,i),s.packed&&c.packed[h]!==y?r("w.uint32(%i).%ss(%s)",(s.id<<3|2)>>>0,h,i):(r("for(var i=0;i<%s.length;++i)",i),u===y?l(r,s,o,i+"[i]"):r("w.uint32(%i).%s(%s[i])",(s.id<<3|u)>>>0,h,i)),r("}")):(s.required||(s.hasPresence||!(s.resolvedType instanceof f||c.basic[h]!==y)?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name):s.resolvedType instanceof f?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==%j)",i,s.name,i,s.typeDefault):"bool"===h?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==false)",i,s.name,i):"string"===h?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!=="")',i,s.name,i):"bytes"===h?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s.length)",i,s.name,i):"double"===h||"float"===h?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&!Object.is(%s,0))",i,s.name,i):c.long[h]!==y?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&(typeof %s==="object"?%s.low||%s.high:%s!==0))',i,s.name,i,i,i,i):r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==0)",i,s.name,i)),u===y?l(r,s,o,i):r("w.uint32(%i).%s(%s)",(s.id<<3|u)>>>0,h,i))}return r('if(m.$unknowns!=null&&Object.hasOwnProperty.call(m,"$unknowns"))')("for(var i=0;i<m.$unknowns.length;++i)")("w.raw(m.$unknowns[i])")("return w")};var f=t(5),c=t(23),a=t(24);function l(t,i,r,n){i.delimited?t("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",r,n,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",r,n,(i.id<<3|2)>>>0)}},{23:23,24:24,5:5}],5:[function(t,i,r){i.exports=s;var u=t(13),n=(s.prototype=Object.create(u.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="Enum",t(12)),e=t(24);function s(t,i,r,n,e,s){if(u.call(this,t,r),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById=Object.create(null),this.values=Object.create(this.valuesById),this.comment=n,this.comments=e||{},this.valuesOptions=s,this.r={},this.reserved=y,i)for(var o=Object.keys(i),h=0;h<o.length;++h)"__proto__"!==o[h]&&"number"==typeof i[o[h]]&&(this.valuesById[this.values[o[h]]=i[o[h]]]=o[h])}s.prototype.n=function(t){return t=this.e||t,u.prototype.n.call(this,t),Object.keys(this.values).forEach(t=>{var i=e.merge({},this.t);this.r[t]=e.merge(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features||{})}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments,i.valuesOptions);return t.reserved=i.reserved,i.edition&&(t.e=i.edition),t.s="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.o(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:y,"comment",t?this.comment:y,"comments",t?this.comments:y])},s.prototype.add=function(t,i,r,n){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if("__proto__"!==t){if(this.values[t]!==y)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==y){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;n&&(this.valuesOptions===y&&(this.valuesOptions={}),this.valuesOptions[t]=n||null),this.comments[t]=r||null}return this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},{12:12,13:13,24:24}],6:[function(t,i,r){i.exports=o;var n,h=t(13),e=(o.prototype=Object.create(h.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}}),o.className="Field",t(5)),u=t(23),f=t(24),c=/^(?:required|optional|repeated)$/;function o(t,i,r,n,e,s,o){if(f.isObject(n)?(o=e,s=n,n=e=y):f.isObject(e)&&(o=s,s=e,e=y),h.call(this,t,s),!f.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!f.isString(r))throw TypeError("type must be a string");if(n!==y&&!c.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==y&&!f.isString(e))throw TypeError("extend must be a string");this.rule=n&&"optional"!==n?n:y,this.type=r,this.id=i,this.extend=e||y,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!f.Long&&u.long[r]!==y,this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o,this.protoName=y,this.jsonName=y}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.e=i.edition),i.protoName&&(t.protoName=i.protoName),i.jsonName!==y?t.jsonName=i.jsonName:i.options&&i.options.json_name!==y&&(t.jsonName=i.options.json_name),t.s="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.t.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof n&&"DELIMITED"===this.t.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.t.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.t.field_presence)}}),o.prototype.setOption=function(t,i,r){return h.prototype.setOption.call(this,t,i,r)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return f.toObject(["edition",this.o(),"rule","optional"!==this.rule&&this.rule||y,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:y,"jsonName",this.jsonName!==f.jsonName(this.protoName||this.name)?this.jsonName:y,"options",this.options,"comment",t?this.comment:y])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=u.defaults[this.type])===y?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===y||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=y)),this.long?(this.typeDefault=f.Long.fromNumber(this.typeDefault,"uint64"===this.type||"fixed64"===this.type),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(f.base64.test(this.typeDefault)?f.base64.decode(this.typeDefault,t=f.newBuffer(f.base64.length(this.typeDefault)),0):f.utf8.write(this.typeDefault,t=f.newBuffer(f.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=f.emptyObject:this.repeated?this.defaultValue=f.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&this.parent.h&&(this.parent.h.prototype[this.name]=this.defaultValue),this.protoName===y&&(this.protoName=this.name),this.jsonName===y&&(this.jsonName=f.jsonName(this.protoName)),h.prototype.resolve.call(this))},o.prototype.u=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&u.defaults[this.type]===y&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof n&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.n=function(t){return h.prototype.n.call(this,this.e||t)},o.d=function(r,n,e,s){return"function"==typeof n?n=f.decorateType(n).name:n&&"object"==typeof n&&(n=f.decorateEnum(n).name),function(t,i){f.decorateType(t.constructor).add(new o(i,r,n,e,{default:s}))}},o.f=function(t){n=t}},{13:13,23:23,24:24,5:5}],7:[function(t,i,n){(n=i.exports=t(8)).build="light",n.load=function(t,i,r){return(i="function"==typeof i?(r=i,new n.Root):i||new n.Root).load(t,r)},n.loadSync=function(t,i){return(i=i||new n.Root).loadSync(t)},n.encoder=t(4),n.decoder=t(3),n.verifier=t(38),n.converter=t(2),n.ReflectionObject=t(13),n.Namespace=t(12),n.Root=t(17),n.Enum=t(5),n.Type=t(22),n.Field=t(6),n.OneOf=t(14),n.MapField=t(9),n.Service=t(21),n.Method=t(11),n.Message=t(10),n.wrappers=t(39),n.types=t(23),n.util=t(24),n.ReflectionObject.f(n.Root),n.Namespace.f(n.Type,n.Service,n.Enum),n.Root.f(n.Type,y,{}),n.Field.f(n.Type)},{10:10,11:11,12:12,13:13,14:14,17:17,2:2,21:21,22:22,23:23,24:24,3:3,38:38,39:39,4:4,5:5,6:6,8:8,9:9}],8:[function(t,i,r){function n(){r.Writer.f(r.BufferWriter),r.Reader.f(r.BufferReader)}r.build="minimal",r.Writer=t(40),r.BufferWriter=t(41),r.Reader=t(15),r.BufferReader=t(16),r.util=t(33),r.rpc=t(19),r.roots=t(18),r.configure=n,n()},{15:15,16:16,18:18,19:19,33:33,40:40,41:41}],9:[function(t,i,r){i.exports=s;var o=t(6),n=(s.prototype=Object.create(o.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="MapField",t(23)),h=t(24);function s(t,i,r,n,e,s){if(o.call(this,t,i,n,y,y,e,s),!h.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){t=new s(t,i.id,i.keyType,i.type,i.options,i.comment);return i.protoName&&(t.protoName=i.protoName),i.jsonName!==y?t.jsonName=i.jsonName:i.options&&i.options.json_name!==y&&(t.jsonName=i.options.json_name),t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return h.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:y,"jsonName",this.jsonName!==h.jsonName(this.protoName||this.name)?this.jsonName:y,"options",this.options,"comment",t?this.comment:y])},s.prototype.resolve=function(){if(this.resolved)return this;if(n.mapKey[this.keyType]===y)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(r,n,e){return"function"==typeof e?e=h.decorateType(e).name:e&&"object"==typeof e&&(e=h.decorateEnum(e).name),function(t,i){h.decorateType(t.constructor).add(new s(i,r,n,e))}}},{23:23,24:24,6:6}],10:[function(t,i,r){i.exports=e;var n=t(33);function e(t){if(t)for(var i=Object.keys(t),r=0;r<i.length;++r)null!=t[i[r]]&&"__proto__"!==i[r]&&(this[i[r]]=t[i[r]])}e.create=function(t){return this.$type.create(t)},e.encode=function(t,i){return this.$type.encode(t,i)},e.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},e.decode=function(t){return this.$type.decode(t)},e.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},e.verify=function(t){return this.$type.verify(t)},e.fromObject=function(t){return this.$type.fromObject(t)},e.toObject=function(t,i){return this.$type.toObject(t,i)},e.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{33:33}],11:[function(t,i,r){i.exports=n;var f=t(13),c=(n.prototype=Object.create(f.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}}),n.className="Method",t(24));function n(t,i,r,n,e,s,o,h,u){if(c.isObject(e)?(o=e,e=s=y):c.isObject(s)&&(o=s,s=y),i!==y&&!c.isString(i))throw TypeError("type must be a string");if(!c.isString(r))throw TypeError("requestType must be a string");if(!c.isString(n))throw TypeError("responseType must be a string");f.call(this,t,o),this.type=i||"rpc",this.requestType=r,this.requestStream=!!e||y,this.responseType=n,this.responseStream=!!s||y,this.path="/"+this.name,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=h,this.parsedOptions=u}n.fromJSON=function(t,i){return new n(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},n.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return c.toObject(["type","rpc"!==this.type&&this.type||y,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:y,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){var t;return this.resolved?this:(this.parent?("."==((t=this.parent.fullName)[0]||"")&&(t=t.substring(1)),this.path="/"+t+"/"+this.name):this.path="/"+this.name,this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),f.prototype.resolve.call(this))}},{13:13,24:24}],12:[function(t,i,r){i.exports=a;var s,o,h,n=t(13),u=(a.prototype=Object.create(n.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0}}),a.className="Namespace",t(6)),f=t(24),c=t(14);function e(t,i){if(!t||!t.length)return y;for(var r={},n=0;n<t.length;++n)r[t[n].name]=t[n].toJSON(i);return r}function a(t,i){n.call(this,t,i),this.nested=y,this.c=null,this.a=Object.create(null),this.l=!0,this.v=!0}function l(t){t.c=null,t.a=Object.create(null);for(var i=t;i=i.parent;)i.a=Object.create(null);return t}a.fromJSON=function(t,i,r){if((r=r===y?0:r)>f.recursionLimit)throw Error("max depth exceeded");return new a(t,i.options).addJSON(i.nested,r)},a.arrayToJSON=e,a.isReservedId=function(t,i){if(t)for(var r=0;r<t.length;++r)if("string"!=typeof t[r]&&t[r][0]<=i&&t[r][1]>=i)return!0;return!1},a.isReservedName=function(t,i){if(t)for(var r=0;r<t.length;++r)if(t[r]===i)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this.c||(this.c=f.toArray(this.nested))}}),a.prototype.toJSON=function(t){return f.toObject(["options",this.options,"nested",e(this.nestedArray,t)])},a.prototype.addJSON=function(t,i){if((i=i===y?0:i)>f.recursionLimit)throw Error("max depth exceeded");if(t)for(var r,n=Object.keys(t),e=0;e<n.length;++e)r=t[n[e]],this.add((r.fields!==y?s:r.values!==y?h:r.methods!==y?o:r.id!==y?u:a).fromJSON(n[e],r,i+1));return this},a.prototype.get=function(t){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},a.prototype.getEnum=function(t){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)&&this.nested[t]instanceof h)return this.nested[t].values;throw Error("no such enum: "+t)},a.prototype.add=function(t){if(!(t instanceof u&&t.extend!==y||t instanceof s||t instanceof c||t instanceof h||t instanceof o||t instanceof a))throw TypeError("object must be a valid nested object");if("__proto__"===t.name)return this;if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof a&&t instanceof a)||i instanceof s||i instanceof o)throw Error("duplicate name '"+t.name+"' in "+this);for(var r=i.nestedArray,n=0;n<r.length;++n)t.add(r[n]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};this.nested[t.name]=t,this instanceof s||this instanceof o||this instanceof h||this instanceof u||t.e||(t.e=t.s),this.l=!0,this.v=!0;for(var e=this;e=e.parent;)e.l=!0,e.v=!0;return t.onAdd(this),l(this)},a.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("object must be a ReflectionObject");if(t.parent===this&&f.remove(this.nested,t,t.name))return Object.keys(this.nested).length||(this.nested=y),t.onRemove(this),l(this);throw Error(t+" is not a member of "+this)},a.prototype.define=function(t,i){if(f.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");if(t.length>f.recursionLimit)throw Error("max depth exceeded");for(var r=this;0<t.length;){var n=t.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof a))throw Error("path conflicts with non-namespace objects")}else r.add(r=new a(n))}return i&&r.addJSON(i),r},a.prototype.resolveAll=function(){if(this.v){this.l&&this.b(this.e);var t=this.nestedArray,i=0;for(this.resolve();i<t.length;)t[i]instanceof a?t[i++].resolveAll():t[i++].resolve();this.v=!1}return this},a.prototype.b=function(i){return this.l&&(this.l=!1,i=this.e||i,n.prototype.b.call(this,i),this.nestedArray.forEach(t=>{t.b(i)})),this},a.prototype.lookup=function(t,i,r){if("boolean"==typeof i?(r=i,i=y):i&&!Array.isArray(i)&&(i=[i]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var n=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.p(t,n);if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.root.m&&this.root.m["."+n])&&(!i||~i.indexOf(e.constructor)))return e;if(!r)for(var s=this;s.parent;){if((e=s.parent.p(t,n))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},a.prototype.p=function(t,i){if(Object.prototype.hasOwnProperty.call(this.a,i))return this.a[i];var r=this.get(t[0]),n=null;if(r)1===t.length?n=r:r instanceof a&&(t=t.slice(1),n=r.p(t,t.join(".")));else for(var e=0;e<this.nestedArray.length;++e)if(this.c[e]instanceof a&&(r=this.c[e].p(t,i))){n=r;break}return this.a[i]=n},a.prototype.lookupType=function(t){var i=this.lookup(t,[s]);if(i)return i;throw Error("no such type: "+t)},a.prototype.lookupEnum=function(t){var i=this.lookup(t,[h]);if(i)return i;throw Error("no such Enum '"+t+"' in "+this)},a.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[s,h]);if(i)return i;throw Error("no such Type or Enum '"+t+"' in "+this)},a.prototype.lookupService=function(t){var i=this.lookup(t,[o]);if(i)return i;throw Error("no such Service '"+t+"' in "+this)},a.f=function(t,i,r){s=t,o=i,h=r}},{13:13,14:14,24:24,6:6}],13:[function(t,i,r){(i.exports=c).className="ReflectionObject";const n=t(14);var e,o=t(24),s={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},h={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},u={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},f={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function c(t,i){if(!o.isString(t))throw TypeError("name must be a string");if(i&&!o.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.e=null,this.s="proto2",this.t={},this.w=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(c.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),c.prototype.toJSON=function(){throw Error()},c.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;t=t.root;t instanceof e&&t.g(this)},c.prototype.onRemove=function(t){t=t.root;t instanceof e&&t.y(this),this.parent=null,this.resolved=!1},c.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},c.prototype.b=function(t){return this.n(this.e||t)},c.prototype.n=function(t){if(!this.w){var i={};if(!t)throw Error("Unknown edition for "+this.fullName);var r=o.merge({},this.options&&this.options.features,this.u(t));if(this.e){if("proto2"===t)i=Object.assign({},u);else if("proto3"===t)i=Object.assign({},f);else if("2023"===t)i=Object.assign({},h);else{if("2024"!==t)throw Error("Unknown edition: "+t);i=Object.assign({},s)}this.t=o.merge(i,r)}else if(this.partOf instanceof n){t=o.merge({},this.partOf.t);this.t=o.merge(t,r)}else if(!this.declaringField){if(!this.parent)throw Error("Unable to find a parent for "+this.fullName);i=o.merge({},this.parent.t);this.t=o.merge(i,r)}this.extensionField&&(this.extensionField.t=this.t),this.w=!0}},c.prototype.u=function(){return{}},c.prototype.getOption=function(t){return this.options&&Object.prototype.hasOwnProperty.call(this.options,t)?this.options[t]:y},c.prototype.setOption=function(t,i,r){var n;return"__proto__"!==t&&(this.options||(this.options={}),/^features\./.test(t)?o.setProperty(this.options,t,i,r):(n=this.getOption(t),r&&n!==y||(n!==i&&(this.resolved=!1),this.options[t]=i))),this},c.prototype.setParsedOption=function(i,t,r){var n,e,s;return"__proto__"!==i&&(this.parsedOptions||(this.parsedOptions=[]),n=this.parsedOptions,r?(e=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,i)}))?(s=e[i],o.setProperty(s,r,t)):((e={})[i]=o.setProperty({},r,t),n.push(e)):((s={})[i]=t,n.push(s))),this},c.prototype.setOptions=function(t,i){if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)this.setOption(r[n],t[r[n]],i);return this},Object.defineProperty(c.prototype,"toString",{value:function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},writable:!0,enumerable:!1,configurable:!0}),c.prototype.o=function(){return this.e&&"proto3"!==this.e?this.e:y},c.f=function(t){e=t}},{14:14,24:24}],14:[function(t,i,r){i.exports=o;var e=t(13),n=(o.prototype=Object.create(e.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}}),o.className="OneOf",t(6)),s=t(24);function o(t,i,r,n){if(Array.isArray(i)||(r=i,i=y),e.call(this,t,r),i!==y&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=n}function h(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}o.fromJSON=function(t,i){return new o(t,i.oneof,i.options,i.comment)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return s.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:y])},o.prototype.add=function(t){if(t instanceof n)return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),h(t.partOf=this),this;throw TypeError("field must be a Field")},o.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var r=t.get(this.oneof[i]);r&&!r.partOf&&(r.partOf=this).fieldsArray.push(r)}h(this)},o.prototype.onRemove=function(t){for(var i,r=0;r<this.fieldsArray.length;++r)(i=this.fieldsArray[r]).parent&&i.parent.remove(i);e.prototype.onRemove.call(this,t)},Object.defineProperty(o.prototype,"isProto3Optional",{get:function(){var t;return null!=this.fieldsArray&&1===this.fieldsArray.length&&(null!=(t=this.fieldsArray[0]).options&&!0===t.options.proto3_optional)}}),o.d=function(){for(var r=Array(arguments.length),t=0;t<arguments.length;)r[t]=arguments[t++];return function(t,i){s.decorateType(t.constructor).add(new o(i,r)),Object.defineProperty(t,i,{get:s.oneOfGetter(r),set:s.oneOfSetter(r)})}}},{13:13,24:24,6:6}],15:[function(t,i,r){i.exports=o;var n,c=t(33),e=c.LongBits,s=c.utf8;function a(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=o.discardUnknown}function h(t){if((t=Array.isArray(t)?new Uint8Array(t):t)instanceof Uint8Array)return new o(t);throw Error("illegal buffer")}function u(){return c.Buffer?function(t){return(o.create=function(t){return c.Buffer.isBuffer(t)?new n(t):h(t)})(t)}:h}function f(){var t=new e(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<4;++i){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}throw a(this)}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}o.create=u(),o.prototype.raw=function(t,i){return this.buf.subarray(t,i)},o.prototype.uint32=function(){var t=this.buf,i=this.pos,r=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(15&t[i])<<28)>>>0,t[i++]<128)return this.pos=i,r;for(var n=0;n<5;++n){if(i>=this.len)throw this.pos=i,a(this);if(t[i++]<128)return this.pos=i,r}throw this.pos=i,Error("invalid varint encoding")},o.prototype.tag=function(){var t=this.buf,i=this.pos,r=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(15&t[i])<<28)>>>0,t[i]<128&&0==(112&t[i]))return this.pos=i+1,r;throw this.pos=i+1,Error("invalid tag encoding")},o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){for(var t,i=!1,r=0;r<10;++r){if(this.pos>=this.len)throw a(this);if(127&(t=this.buf[this.pos++])&&(i=!0),t<128)return i}throw Error("invalid varint encoding")},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return l(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|l(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=c.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=c.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.uint32s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.uint32());return t},o.prototype.int32s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.int32());return t},o.prototype.sint32s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.sint32());return t},o.prototype.bools=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.bool());return t};function v(t,i,r){var n=t.view;return n||i<r?n:(i=t.buf,t.view=new DataView(i.buffer,i.byteOffset,i.byteLength))}o.prototype.fixed32s=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i;if(r>this.len)throw a(this,i);var n=i>>>2,e=t.length,s=this.pos,o=(t.length=e+n,v(this,n,128));if(o)for(var h=0;h<n;++h,s+=4)t[e++]=o.getUint32(s,!0);else for(var u=this.buf,f=0;f<n;++f,s+=4)t[e++]=l(u,s+4);if((this.pos=s)!==r)throw a(this,4);return t},o.prototype.sfixed32s=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i;if(r>this.len)throw a(this,i);var n=i>>>2,e=t.length,s=this.pos,o=(t.length=e+n,v(this,n,128));if(o)for(var h=0;h<n;++h,s+=4)t[e++]=o.getInt32(s,!0);else for(var u=this.buf,f=0;f<n;++f,s+=4)t[e++]=0|l(u,s+4);if((this.pos=s)!==r)throw a(this,4);return t},o.prototype.floats=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i;if(r>this.len)throw a(this,i);var n=i>>>2,e=t.length,s=this.pos,o=(t.length=e+n,v(this,n,8));if(o)for(var h=0;h<n;++h,s+=4)t[e++]=o.getFloat32(s,!0);else for(var u=this.buf,f=0;f<n;++f,s+=4)t[e++]=c.float.readFloatLE(u,s);if((this.pos=s)!==r)throw a(this,4);return t},o.prototype.doubles=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i;if(r>this.len)throw a(this,i);var n=i>>>3,e=t.length,s=this.pos,o=(t.length=e+n,v(this,n,8));if(o)for(var h=0;h<n;++h,s+=8)t[e++]=o.getFloat64(s,!0);else for(var u=this.buf,f=0;f<n;++f,s+=8)t[e++]=c.float.readDoubleLE(u,s);if((this.pos=s)!==r)throw a(this,8);return t},o.prototype.uint64s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.uint64());return t},o.prototype.int64s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.int64());return t},o.prototype.sint64s=function(t){t===y&&(t=[]);for(var i=this.uint32()+this.pos;this.pos<i;)t.push(this.sint64());return t},o.prototype.fixed64s=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i,n=t.length;if(r>this.len)throw a(this,i);var e=i>>>3;t.length=n+e;for(var s=0;s<e;++s)t[n++]=this.fixed64();if(this.pos!==r)throw a(this,8);return t},o.prototype.sfixed64s=function(t){t===y&&(t=[]);var i=this.uint32(),r=this.pos+i,n=t.length;if(r>this.len)throw a(this,i);var e=i>>>3;t.length=n+e;for(var s=0;s<e;++s)t[n++]=this.sfixed64();if(this.pos!==r)throw a(this,8);return t},o.prototype.bytes=function(){var t=this.uint32(),i=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos=r,this.raw(i,r)},o.prototype.string=function(){var t=this.uint32(),i=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos=r,s.read(this.buf,i,r)},o.prototype.stringVerify=function(){var t=this.uint32(),i=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos=r,s.readStrict(this.buf,i,r)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},o.recursionLimit=c.recursionLimit,o.discardUnknown=!0,o.prototype.skipType=function(t,i,r){if(o.recursionLimit<(i=i===y?0:i))throw Error("max depth exceeded");if(0===r)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var n=this.tag(),e=n>>>3;if(!e)throw Error("illegal tag: field number 0");if(4===(t=7&n)){if(r!==y&&e!==r)throw Error("invalid end group tag");break}this.skipType(t,i+1,e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o.f=function(t){n=t,o.create=u(),n.f();var i=c.Long?"toLong":"toNumber";c.merge(o.prototype,{int64:function(){return f.call(this)[i](!1)},uint64:function(){return f.call(this)[i](!0)},sint64:function(){return f.call(this).zzDecode()[i](!1)},fixed64:function(){return d.call(this)[i](!0)},sfixed64:function(){return d.call(this)[i](!1)}})}},{33:33}],16:[function(t,i,r){i.exports=s;var n=t(15),e=(s.prototype=Object.create(n.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),t(33));function s(t){n.call(this,t)}s.f=function(){e.Buffer&&(s.prototype.j=e.Buffer.prototype.slice)},s.prototype.raw=function(t,i){return this.j.call(this.buf,t,i)},s.prototype.string=function(){var t=this.uint32(),i=this.pos,r=this.pos+t;if(r>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=r,this.buf.utf8Slice?this.buf.utf8Slice(i,r):this.buf.toString("utf-8",i,r)},s.f()},{15:15,33:33}],17:[function(t,i,r){i.exports=u;var n,v,b,e=t(12),s=(u.prototype=Object.create(e.prototype,{constructor:{value:u,writable:!0,enumerable:!1,configurable:!0}}),u.className="Root",t(6)),o=t(5),h=t(14),p=t(24);function u(t){e.call(this,"",t),this.deferred=[],this.files=[],this.e="proto2",this.m={}}function m(){}u.fromJSON=function(t,i,r){if((r=r===y?0:r)>p.recursionLimit)throw Error("max depth exceeded");return i=i||new u,t.options&&i.setOptions(t.options),i.addJSON(t.nested,r).resolveAll()},u.prototype.resolvePath=p.path.resolve,u.prototype.fetch=p.fetch,u.prototype.load=function t(i,o,s){"function"==typeof o&&(s=o,o=y);var h=this;if(!s)return p.asPromise(t,h,i,o);var u=s===m;function f(t,i){if(s){if(u)throw t;i&&i.resolveAll();var r=s;s=null,r(t,i)}}function c(t){var i=t.lastIndexOf("google/protobuf/");if(-1<i){i=t.substring(i);if(Object.prototype.hasOwnProperty.call(b,i))return i}return Object.prototype.hasOwnProperty.call(b,t)?t:null}function a(t,i,r){r===y&&(r=0);try{if(r>p.recursionLimit)throw Error("max depth exceeded");if(p.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),p.isString(i)){v.filename=t;var n,e=v(i,h,o),s=0;if(e.imports)for(;s<e.imports.length;++s)(n=c(e.imports[s])||h.resolvePath(t,e.imports[s]))&&l(n,!1,r+1);if(e.weakImports)for(s=0;s<e.weakImports.length;++s)(n=c(e.weakImports[s])||h.resolvePath(t,e.weakImports[s]))&&l(n,!0,r+1)}else h.setOptions(i.options).addJSON(i.nested)}catch(t){f(t)}u||d||f(null,h)}function l(r,n,e){if(e===y&&(e=0),r=c(r)||r,!~h.files.indexOf(r))if(h.files.push(r),Object.prototype.hasOwnProperty.call(b,r))u?a(r,b[r],e):(++d,setTimeout(function(){--d,a(r,b[r],e)}));else if(u){var t;try{t=p.fs.readFileSync(r).toString("utf8")}catch(t){return void(n||f(t))}a(r,t,e)}else++d,h.fetch(r,function(t,i){--d,s&&(t?n?d||f(null,h):f(t):a(r,i,e))})}var d=0;p.isString(i)&&(i=[i]);for(var r,n=0;n<i.length;++n)(r=h.resolvePath("",i[n]))&&l(r);return u?h.resolveAll():d||f(null,h),h},u.prototype.loadSync=function(t,i){if(p.isNode)return this.load(t,i,m);throw Error("not supported")},u.prototype.resolveAll=function(){if(!this.v)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function c(t,i){var r,n=i.parent.lookup(i.extend);if(n)return r=new s(i.fullName,i.id,i.type,i.rule,y,i.options),n.get(r.name)||((r.declaringField=i).extensionField=r,n.add(r)),1}u.prototype.g=function(t){if(t instanceof s)t.extend===y||t.extensionField||c(0,t)||this.deferred.push(t);else if(t instanceof o)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof h)){if(t instanceof n)for(var i=0;i<this.deferred.length;)c(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var r=0;r<t.nestedArray.length;++r)this.g(t.c[r]);f.test(t.name)&&(t.parent[t.name]=t)}(t instanceof n||t instanceof o||t instanceof s)&&(this.m[t.fullName]=t)},u.prototype.y=function(t){var i;if(t instanceof s)t.extend!==y&&(t.extensionField?(t.extensionField.parent.remove(t.extensionField),t.extensionField=null):-1<(i=this.deferred.indexOf(t))&&this.deferred.splice(i,1));else if(t instanceof o)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var r=0;r<t.nestedArray.length;++r)this.y(t.c[r]);f.test(t.name)&&delete t.parent[t.name]}delete this.m[t.fullName]},u.f=function(t,i,r){n=t,v=i,b=r}},{12:12,14:14,24:24,5:5,6:6}],18:[function(t,i,r){i.exports=Object.create(null)},{}],19:[function(t,i,r){r.Service=t(20)},{20:20}],20:[function(t,i,r){i.exports=n;var h=t(33);function n(t,i,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");h.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!i,this.responseDelimited=!!r}(n.prototype=Object.create(h.EventEmitter.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}})).rpcCall=function t(r,i,n,e,s){if(!e)throw TypeError("request must be specified");var o=this;if(!s)return h.asPromise(t,o,r,i,n,e);if(!o.rpcImpl)return setTimeout(function(){s(Error("already ended"))},0),y;try{return o.rpcImpl(r,i[o.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(t,i){if(t)return o.emit("error",t,r),s(t);if(null===i)return o.end(!0),y;if(!(i instanceof n))try{i=n[o.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return o.emit("error",t,r),s(t)}return o.emit("data",i,r),s(null,i)})}catch(t){return o.emit("error",t,r),setTimeout(function(){s(t)},0),y}},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{33:33}],21:[function(t,i,r){i.exports=f;var n=t(12),o=(f.prototype=Object.create(n.prototype,{constructor:{value:f,writable:!0,enumerable:!1,configurable:!0}}),f.className="Service",t(11)),h=t(24),u=t(19);function f(t,i){n.call(this,t,i),this.methods={},this.O=null}function e(t){return t.O=null,t}f.fromJSON=function(t,i,r){if((r=r===y?0:r)>h.recursionLimit)throw Error("max depth exceeded");var n=new f(t,i.options);if(i.methods)for(var e=Object.keys(i.methods),s=0;s<e.length;++s)n.add(o.fromJSON(e[s],i.methods[e[s]]));return i.nested&&n.addJSON(i.nested,r),i.edition&&(n.e=i.edition),n.comment=i.comment,n.s="proto3",n},f.prototype.toJSON=function(t){var i=n.prototype.toJSON.call(this,t),r=!!t&&!!t.keepComments;return h.toObject(["edition",this.o(),"options",i&&i.options||y,"methods",n.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||y,"comment",r?this.comment:y])},Object.defineProperty(f.prototype,"methodsArray",{get:function(){return this.O||(this.O=h.toArray(this.methods))}}),f.pro