@bufbuild/protobuf 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -4
- package/dist/cjs/codegen-info.js +60 -0
- package/dist/cjs/create-descriptor-set.js +952 -0
- package/dist/cjs/create-registry-from-desc.js +270 -0
- package/dist/cjs/create-registry.js +75 -0
- package/dist/cjs/descriptor-set.js +0 -436
- package/dist/cjs/google/protobuf/descriptor_pb.js +2 -2
- package/dist/cjs/google/protobuf/empty_pb.js +0 -1
- package/dist/cjs/google/protobuf/struct_pb.js +1 -1
- package/dist/cjs/google/protobuf/type_pb.js +1 -1
- package/dist/cjs/google/varint.js +85 -37
- package/dist/cjs/index.js +11 -7
- package/dist/cjs/private/enum.js +22 -31
- package/dist/cjs/private/field-wrapper.js +30 -1
- package/dist/cjs/private/field.js +1 -1
- package/dist/cjs/private/json-format-common.js +6 -6
- package/dist/cjs/private/names.js +168 -29
- package/dist/cjs/proto-int64.js +23 -40
- package/dist/cjs/proto2.js +2 -2
- package/dist/cjs/proto3.js +2 -2
- package/dist/cjs/type-registry.js +0 -87
- package/dist/esm/codegen-info.js +57 -0
- package/dist/esm/create-descriptor-set.js +947 -0
- package/dist/esm/create-registry-from-desc.js +266 -0
- package/dist/esm/create-registry.js +71 -0
- package/dist/esm/descriptor-set.js +1 -434
- package/dist/esm/google/protobuf/descriptor_pb.js +2 -2
- package/dist/esm/google/protobuf/empty_pb.js +0 -1
- package/dist/esm/google/protobuf/struct_pb.js +1 -1
- package/dist/esm/google/protobuf/type_pb.js +1 -1
- package/dist/esm/google/varint.js +81 -34
- package/dist/esm/index.js +6 -3
- package/dist/esm/private/enum.js +22 -31
- package/dist/esm/private/field-wrapper.js +28 -0
- package/dist/esm/private/field.js +2 -2
- package/dist/esm/private/json-format-common.js +6 -6
- package/dist/esm/private/names.js +163 -24
- package/dist/esm/proto-int64.js +24 -41
- package/dist/esm/proto2.js +3 -3
- package/dist/esm/proto3.js +3 -3
- package/dist/esm/type-registry.js +1 -85
- package/dist/types/codegen-info.d.ts +19 -0
- package/dist/types/create-descriptor-set.d.ts +16 -0
- package/dist/types/create-registry-from-desc.d.ts +15 -0
- package/dist/types/create-registry.d.ts +8 -0
- package/dist/types/descriptor-set.d.ts +554 -108
- package/dist/types/enum.d.ts +9 -5
- package/dist/types/google/protobuf/descriptor_pb.d.ts +6 -6
- package/dist/types/google/protobuf/empty_pb.d.ts +0 -1
- package/dist/types/google/varint.d.ts +21 -9
- package/dist/types/index.d.ts +6 -3
- package/dist/types/message.d.ts +3 -1
- package/dist/types/private/enum.d.ts +4 -8
- package/dist/types/private/field-wrapper.d.ts +7 -0
- package/dist/types/private/message-type.d.ts +1 -4
- package/dist/types/private/names.d.ts +26 -8
- package/dist/types/private/proto-runtime.d.ts +2 -2
- package/dist/types/private/util.d.ts +1 -6
- package/dist/types/proto-int64.d.ts +14 -13
- package/dist/types/type-registry.d.ts +0 -38
- package/package.json +6 -10
- package/dist/cjs/descriptor-registry.js +0 -460
- package/dist/esm/descriptor-registry.js +0 -456
- package/dist/protobuf.cjs +0 -2
- package/dist/protobuf.cjs.map +0 -1
- package/dist/protobuf.esm.js +0 -2
- package/dist/protobuf.esm.js.map +0 -1
- package/dist/protobuf.modern.js +0 -2
- package/dist/protobuf.modern.js.map +0 -1
- package/dist/types/descriptor-registry.d.ts +0 -43
package/dist/protobuf.esm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(){return e=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},e.apply(this,arguments)}function n(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}function r(e,n){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},r(e,n)}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function i(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return o(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,n){if(!e)throw new Error(n)}function s(e){if("number"!=typeof e)throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw new Error("invalid int 32: "+e)}function u(e){if("number"!=typeof e)throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw new Error("invalid uint 32: "+e)}function f(e){if("number"!=typeof e)throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw new Error("invalid float 32: "+e)}var l=Symbol("@bufbuild/protobuf/enum-type");function c(e){var n=e[l];return a(n,"missing enum type on enum object"),n}function m(e,n,r){e[l]=d(n,r)}function d(e,n){for(var r,t=Object.create(null),o=Object.create(null),a=[],s=i(n);!(r=s()).done;){var u=r.value;a.push(u),t[u.name]=u,o[u.no]=u}return{typeName:e,values:a,findName:function(e){return t[e]},findNumber:function(e){return o[e]}}}function p(e,n,r){for(var t,o={},a=i(n);!(t=a()).done;){var s=t.value,u=v(s,null==r?void 0:r.sharedPrefix);o[u]=s.no,o[s.no]=u}return m(o,e,n),o}function v(e,n){return void 0===n?e.name:e.name.startsWith(n)?e.name.substring(n.length):e.name}var g,h=/*#__PURE__*/function(){function e(){}var n=e.prototype;return n.equals=function(e){return this.getType().runtime.util.equals(this.getType(),this,e)},n.clone=function(){return this.getType().runtime.util.clone(this)},n.fromBinary=function(e,n){var r=this.getType().runtime.bin,t=r.makeReadOptions(n);return r.readMessage(this,t.readerFactory(e),e.byteLength,t),this},n.fromJson=function(e,n){var r=this.getType(),t=r.runtime.json,o=t.makeReadOptions(n);return t.readMessage(r,e,o,this),this},n.fromJsonString=function(e,n){return this.fromJson(JSON.parse(e),n)},n.toBinary=function(e){var n=this.getType().runtime.bin,r=n.makeWriteOptions(e),t=r.writerFactory();return n.writeMessage(this,t,r),t.finish()},n.toJson=function(e){var n=this.getType().runtime.json,r=n.makeWriteOptions(e);return n.writeMessage(this,r)},n.toJsonString=function(e){var n,r=this.toJson(e);return JSON.stringify(r,null,null!=(n=null==e?void 0:e.prettySpaces)?n:0)},n.getType=function(){return Object.getPrototypeOf(this).constructor},e}();function T(e,n,r,t){return{syntax:e,json:n,bin:r,util:t,makeMessageType:function(e,n,r){return function(e,n,r,t){var o,i,a=null!=(o=null==t?void 0:t.localName)?o:n.substring(n.lastIndexOf(".")+1),s=(i={},i[a]=function(n){e.util.initFields(this),e.util.initPartial(n,this)},i)[a];return Object.setPrototypeOf(s.prototype,new h),Object.assign(s,{runtime:e,typeName:n,fields:e.util.newFieldList(r),fromBinary:function(e,n){return(new s).fromBinary(e,n)},fromJson:function(e,n){return(new s).fromJson(e,n)},fromJsonString:function(e,n){return(new s).fromJsonString(e,n)},equals:function(n,r){return e.util.equals(s,n,r)}}),s}(this,e,n,r)},makeEnum:p,makeEnumType:d,getEnumType:c}}function y(){for(var e=0,n=0,r=0;r<28;r+=7){var t=this.buf[this.pos++];if(e|=(127&t)<<r,0==(128&t))return this.assertBounds(),[e,n]}var o=this.buf[this.pos++];if(e|=(15&o)<<28,n=(112&o)>>4,0==(128&o))return this.assertBounds(),[e,n];for(var i=3;i<=31;i+=7){var a=this.buf[this.pos++];if(n|=(127&a)<<i,0==(128&a))return this.assertBounds(),[e,n]}throw new Error("invalid varint")}function w(e,n,r){for(var t=0;t<28;t+=7){var o=e>>>t,i=!(o>>>7==0&&0==n);if(r.push(255&(i?128|o:o)),!i)return}var a=e>>>28&15|(7&n)<<4,s=!(n>>3==0);if(r.push(255&(s?128|a:a)),s){for(var u=3;u<31;u+=7){var f=n>>>u,l=!(f>>>7==0);if(r.push(255&(l?128|f:f)),!l)return}r.push(n>>>31&1)}}function N(e){var n="-"==e[0];n&&(e=e.slice(1));var r=1e6,t=0,o=0;function i(n,i){var a=Number(e.slice(n,i));o*=r,(t=t*r+a)>=4294967296&&(o+=t/4294967296|0,t%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[n,t,o]}function b(e,n){if(n<=2097151)return""+(4294967296*n+e);var r=(e>>>24|n<<8)>>>0&16777215,t=n>>16&65535,o=(16777215&e)+6777216*r+6710656*t,i=r+8147497*t,a=2*t,s=1e7;function u(e,n){var r=e?String(e):"";return n?"0000000".slice(r.length)+r:r}return o>=s&&(i+=Math.floor(o/s),o%=s),i>=s&&(a+=Math.floor(i/s),i%=s),u(a,0)+u(i,a)+u(o,1)}function k(e,n){if(e>=0){for(;e>127;)n.push(127&e|128),e>>>=7;n.push(e)}else{for(var r=0;r<9;r++)n.push(127&e|128),e>>=7;n.push(1)}}function E(){var e=this.buf[this.pos++],n=127&e;if(0==(128&e))return this.assertBounds(),n;if(n|=(127&(e=this.buf[this.pos++]))<<7,0==(128&e))return this.assertBounds(),n;if(n|=(127&(e=this.buf[this.pos++]))<<14,0==(128&e))return this.assertBounds(),n;if(n|=(127&(e=this.buf[this.pos++]))<<21,0==(128&e))return this.assertBounds(),n;n|=(15&(e=this.buf[this.pos++]))<<28;for(var r=5;0!=(128&e)&&r<10;r++)e=this.buf[this.pos++];if(0!=(128&e))throw new Error("invalid varint");return this.assertBounds(),n>>>0}!function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(g||(g={}));var S,I=function(){var e=new DataView(new ArrayBuffer(8));if(void 0!==globalThis.BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64){var n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),t=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse:function(e){var t="bigint"==typeof e?e:BigInt(e);if(t>r||t<n)throw new Error("int64 invalid: "+e);return t},uParse:function(e){var n="bigint"==typeof e?e:BigInt(e);if(n>o||n<t)throw new Error("uint64 invalid: "+e);return n},enc:function(n){return e.setBigInt64(0,this.parse(n),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc:function(n){return e.setBigInt64(0,this.uParse(n),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:function(n,r){return e.setInt32(0,n,!0),e.setInt32(4,r,!0),e.getBigInt64(0,!0)},uDec:function(n,r){return e.setInt32(0,n,!0),e.setInt32(4,r,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse:function(e){if(!/^-?[0-9]+$/.test(e))throw new Error("int64 invalid: "+e);return e},uParse:function(e){if(!/^-?[0-9]+$/.test(e))throw new Error("uint64 invalid: "+e);return e},enc:function(e){if("string"==typeof e){if(!/^-?[0-9]+$/.test(e))throw new Error("int64 invalid: "+e)}else e=e.toString(10);var n=N(e);return{lo:n[1],hi:n[2]}},uEnc:function(e){if("string"==typeof e){if(!/^-?[0-9]+$/.test(e))throw new Error("uint64 invalid: "+e)}else e=e.toString(10);var n=N(e),r=n[1],t=n[2];if(n[0])throw new Error("uint64 invalid: "+e);return{lo:r,hi:t}},dec:function(e,n){return 0!=(2147483648&n)?(n=~n,e?e=1+~e:n+=1,"-"+b(e,n)):b(e,n)},uDec:function(e,n){return b(e,n)}}}();!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(S||(S={}));var J=/*#__PURE__*/function(){function e(e){this.chunks=void 0,this.buf=void 0,this.stack=[],this.textEncoder=void 0,this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}var n=e.prototype;return n.finish=function(){this.chunks.push(new Uint8Array(this.buf));for(var e=0,n=0;n<this.chunks.length;n++)e+=this.chunks[n].length;for(var r=new Uint8Array(e),t=0,o=0;o<this.chunks.length;o++)r.set(this.chunks[o],t),t+=this.chunks[o].length;return this.chunks=[],r},n.fork=function(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this},n.join=function(){var e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)},n.tag=function(e,n){return this.uint32((e<<3|n)>>>0)},n.raw=function(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this},n.uint32=function(e){for(u(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this},n.int32=function(e){return s(e),k(e,this.buf),this},n.bool=function(e){return this.buf.push(e?1:0),this},n.bytes=function(e){return this.uint32(e.byteLength),this.raw(e)},n.string=function(e){var n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)},n.float=function(e){f(e);var n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)},n.double=function(e){var n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)},n.fixed32=function(e){u(e);var n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)},n.sfixed32=function(e){s(e);var n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)},n.sint32=function(e){return s(e),k(e=(e<<1^e>>31)>>>0,this.buf),this},n.sfixed64=function(e){var n=new Uint8Array(8),r=new DataView(n.buffer),t=I.enc(e);return r.setInt32(0,t.lo,!0),r.setInt32(4,t.hi,!0),this.raw(n)},n.fixed64=function(e){var n=new Uint8Array(8),r=new DataView(n.buffer),t=I.uEnc(e);return r.setInt32(0,t.lo,!0),r.setInt32(4,t.hi,!0),this.raw(n)},n.int64=function(e){var n=I.enc(e);return w(n.lo,n.hi,this.buf),this},n.sint64=function(e){var n=I.enc(e),r=n.hi>>31;return w(n.lo<<1^r,(n.hi<<1|n.lo>>>31)^r,this.buf),this},n.uint64=function(e){var n=I.uEnc(e);return w(n.lo,n.hi,this.buf),this},e}(),O=/*#__PURE__*/function(){function e(e,n){this.pos=void 0,this.len=void 0,this.buf=void 0,this.view=void 0,this.textDecoder=void 0,this.varint64=y,this.uint32=E,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=n?n:new TextDecoder}var n=e.prototype;return n.tag=function(){var e=this.uint32(),n=e>>>3,r=7&e;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]},n.skip=function(e){var n=this.pos;switch(e){case S.Varint:for(;128&this.buf[this.pos++];);break;case S.Bit64:this.pos+=4;case S.Bit32:this.pos+=4;break;case S.LengthDelimited:var r=this.uint32();this.pos+=r;break;case S.StartGroup:for(var t;(t=this.tag()[1])!==S.EndGroup;)this.skip(t);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)},n.assertBounds=function(){if(this.pos>this.len)throw new RangeError("premature EOF")},n.int32=function(){return 0|this.uint32()},n.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},n.int64=function(){return I.dec.apply(I,this.varint64())},n.uint64=function(){return I.uDec.apply(I,this.varint64())},n.sint64=function(){var e=this.varint64(),n=e[0],r=e[1],t=-(1&n);return I.dec(n=(n>>>1|(1&r)<<31)^t,r=r>>>1^t)},n.bool=function(){var e=this.varint64();return 0!==e[0]||0!==e[1]},n.fixed32=function(){return this.view.getUint32((this.pos+=4)-4,!0)},n.sfixed32=function(){return this.view.getInt32((this.pos+=4)-4,!0)},n.fixed64=function(){return I.uDec(this.sfixed32(),this.sfixed32())},n.sfixed64=function(){return I.dec(this.sfixed32(),this.sfixed32())},n.float=function(){return this.view.getFloat32((this.pos+=4)-4,!0)},n.double=function(){return this.view.getFloat64((this.pos+=8)-8,!0)},n.bytes=function(){var e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)},n.string=function(){return this.textDecoder.decode(this.bytes())},e}();function _(e,n){if(n instanceof e)return n;if(e.fieldWrapper)return e.fieldWrapper.wrapField(n);throw new Error("cannot unwrap field value, "+e.typeName+" does not define a field wrapper")}function F(e,n){return e.fieldWrapper?e.fieldWrapper.unwrapField(n):n}function B(e,n,r){if(n===r)return!0;if(e==g.BYTES){if(!(n instanceof Uint8Array&&r instanceof Uint8Array))return!1;if(n.length!==r.length)return!1;for(var t=0;t<n.length;t++)if(n[t]!==r[t])return!1;return!0}switch(e){case g.UINT64:case g.FIXED64:case g.INT64:case g.SFIXED64:case g.SINT64:return n==r}return!1}function P(e){switch(e){case g.BOOL:return!1;case g.UINT64:case g.FIXED64:case g.INT64:case g.SFIXED64:case g.SINT64:return I.zero;case g.DOUBLE:case g.FLOAT:return 0;case g.BYTES:return new Uint8Array(0);case g.STRING:return"";default:return 0}}function D(e,n){var r=void 0===n,t=S.Varint,o=0===n;switch(e){case g.STRING:o=r||!n.length,t=S.LengthDelimited;break;case g.BOOL:o=!1===n;break;case g.DOUBLE:t=S.Bit64;break;case g.FLOAT:t=S.Bit32;break;case g.INT64:case g.UINT64:o=r||0==n;break;case g.FIXED64:o=r||0==n,t=S.Bit64;break;case g.BYTES:o=r||!n.byteLength,t=S.LengthDelimited;break;case g.FIXED32:case g.SFIXED32:t=S.Bit32;break;case g.SFIXED64:o=r||0==n,t=S.Bit64;break;case g.SINT64:o=r||0==n}return[t,g[e].toLowerCase(),r||o]}var L=Symbol("@bufbuild/protobuf/unknown-fields"),U={readUnknownFields:!0,readerFactory:function(e){return new O(e)}},A={writeUnknownFields:!0,writerFactory:function(){return new J}};function q(n){return n?e({},U,n):U}function j(n){return n?e({},A,n):A}function Y(){return{makeReadOptions:q,makeWriteOptions:j,listUnknownFields:function(e){var n;return null!=(n=e[L])?n:[]},discardUnknownFields:function(e){delete e[L]},writeUnknownFields:function(e,n){var r=e[L];if(r)for(var t,o=i(r);!(t=o()).done;){var a=t.value;n.tag(a.no,a.wireType).raw(a.data)}},onUnknownField:function(e,n,r,t){var o=e;Array.isArray(o[L])||(o[L]=[]),o[L].push({no:n,wireType:r,data:t})},readMessage:function(e,n,r,t){for(var o=e.getType(),i=void 0===r?n.len:n.pos+r;n.pos<i;){var a=n.tag(),s=a[0],u=a[1],f=o.fields.find(s);if(f){var l=e,c=f.repeated,m=f.localName;switch(f.oneof&&((l=l[f.oneof.localName]).case!=m&&delete l.value,l.case=m,m="value"),f.kind){case"scalar":case"enum":var d="enum"==f.kind?g.INT32:f.T;if(c){var p=l[m];if(u==S.LengthDelimited&&d!=g.STRING&&d!=g.BYTES)for(var v=n.uint32()+n.pos;n.pos<v;)p.push(V(n,d));else p.push(V(n,d))}else l[m]=V(n,d);break;case"message":var h=f.T;c?l[m].push(h.fromBinary(n.bytes(),t)):l[m]instanceof h?l[m].fromBinary(n.bytes(),t):l[m]=F(h,h.fromBinary(n.bytes(),t));break;case"map":var T=R(f,n,t);l[m][T[0]]=T[1]}}else{var y=n.skip(u);t.readUnknownFields&&this.onUnknownField(e,s,u,y)}}}}}function R(e,n,r){for(var t,o,i=n.uint32(),a=n.pos+i;n.pos<a;)switch(n.tag()[0]){case 1:t=V(n,e.K);break;case 2:switch(e.V.kind){case"scalar":o=V(n,e.V.T);break;case"enum":o=n.int32();break;case"message":o=e.V.T.fromBinary(n.bytes(),r)}}if(void 0===t){var s=P(e.K);t=e.K==g.BOOL?s.toString():s}if("string"!=typeof t&&"number"!=typeof t&&(t=t.toString()),void 0===o)switch(e.V.kind){case"scalar":o=P(e.V.T);break;case"enum":o=0;break;case"message":o=new e.V.T}return[t,o]}function V(e,n){return e[D(n)[1]]()}function x(e,n,r,t,o){e.tag(r.no,S.LengthDelimited),e.fork();var i=t;switch(r.K){case g.INT32:case g.FIXED32:case g.UINT32:case g.SFIXED32:case g.SINT32:i=Number.parseInt(t);break;case g.BOOL:a("true"==t||"false"==t),i="true"==t}switch(G(e,r.K,1,i,!0),r.V.kind){case"scalar":G(e,r.V.T,2,o,!0);break;case"enum":G(e,g.INT32,2,o,!0);break;case"message":M(e,n,r.V.T,2,o)}e.join()}function M(e,n,r,t,o){if(void 0!==o){var i=_(r,o);e.tag(t,S.LengthDelimited).bytes(i.toBinary(n))}}function G(e,n,r,t,o){var i=D(n,t),a=i[1];i[2]&&!o||e.tag(r,i[0])[a](t)}function X(e,n,r,t){if(t.length){e.tag(r,S.LengthDelimited).fork();for(var o=D(n)[1],i=0;i<t.length;i++)e[o](t[i]);e.join()}}for(var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),W=[],K=0;K<C.length;K++)W[C[K].charCodeAt(0)]=K;W["-".charCodeAt(0)]=C.indexOf("+"),W["_".charCodeAt(0)]=C.indexOf("/");var Z={dec:function(e){var n=3*e.length/4;"="==e[e.length-2]?n-=2:"="==e[e.length-1]&&(n-=1);for(var r,t=new Uint8Array(n),o=0,i=0,a=0,s=0;s<e.length;s++){if(void 0===(r=W[e.charCodeAt(s)]))switch(e[s]){case"=":i=0;case"\n":case"\r":case"\t":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:a=r,i=1;break;case 1:t[o++]=a<<2|(48&r)>>4,a=r,i=2;break;case 2:t[o++]=(15&a)<<4|(60&r)>>2,a=r,i=3;break;case 3:t[o++]=(3&a)<<6|r,i=0}}if(1==i)throw Error("invalid base64 string.");return t.subarray(0,o)},enc:function(e){for(var n,r="",t=0,o=0,i=0;i<e.length;i++)switch(n=e[i],t){case 0:r+=C[n>>2],o=(3&n)<<4,t=1;break;case 1:r+=C[o|n>>4],o=(15&n)<<2,t=2;break;case 2:r+=C[o|n>>6],r+=C[63&n],t=0}return t&&(r+=C[o],r+="=",1==t&&(r+="=")),r}},z={ignoreUnknownFields:!1},Q={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function $(n){return n?e({},z,n):z}function H(n){return n?e({},Q,n):Q}function ee(e){var n=e(oe,ie);return{makeReadOptions:$,makeWriteOptions:H,readMessage:function(e,n,r,t){var o;if(null==n||Array.isArray(n)||"object"!=typeof n)throw new Error("cannot decode message "+e.typeName+" from JSON: "+this.debug(n));t=null!=(o=t)?o:new e;for(var a={},s=0,u=Object.entries(n);s<u.length;s++){var f=u[s],l=f[0],c=f[1],m=e.fields.findJsonName(l);if(m){var d=m.localName,p=t;if(m.oneof){if(null===c&&"scalar"==m.kind)continue;var v=a[m.oneof.localName];if(v)throw new Error("cannot decode message "+e.typeName+' from JSON: multiple keys for oneof "'+m.oneof.name+'" present: "'+v+'", "'+l+'"');a[m.oneof.localName]=l,p=p[m.oneof.localName]={case:d},d="value"}if(m.repeated){if(null===c)continue;if(!Array.isArray(c))throw new Error("cannot decode field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(c)+'"');for(var h,T=p[d],y=i(c);!(h=y()).done;){var w=h.value;if(null===w)throw new Error("cannot decode field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(w)+'"');var N=void 0;switch(m.kind){case"message":N=m.T.fromJson(w,r);break;case"enum":if(void 0===(N=te(m.T,w,r.ignoreUnknownFields)))continue;break;case"scalar":try{N=re(m.T,w)}catch(n){var b="cannot decode field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(w)+'"';throw n instanceof Error&&n.message.length>0&&(b+=": "+n.message),new Error(b)}}T.push(N)}}else if("map"==m.kind){if(null===c)continue;if(Array.isArray(c)||"object"!=typeof c)throw new Error("cannot decode field "+e.typeName+"."+m.name+" from JSON: "+this.debug(c));for(var k=p[d],E=0,S=Object.entries(c);E<S.length;E++){var I=S[E],J=I[0],O=I[1];if(null===O)throw new Error("cannot decode field "+e.typeName+"."+m.name+" from JSON: map value null");var B=void 0;switch(m.V.kind){case"message":B=m.V.T.fromJson(O,r);break;case"enum":if(void 0===(B=te(m.V.T,O,r.ignoreUnknownFields)))continue;break;case"scalar":try{B=re(m.V.T,O)}catch(n){var P="cannot decode map value for field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(c)+'"';throw n instanceof Error&&n.message.length>0&&(P+=": "+n.message),new Error(P)}}try{k[re(m.K,m.K==g.BOOL?"true"==J||"false"!=J&&J:J).toString()]=B}catch(n){var D="cannot decode map key for field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(c)+'"';throw n instanceof Error&&n.message.length>0&&(D+=": "+n.message),new Error(D)}}}else switch(m.kind){case"message":var L=m.T;if(null===c&&"google.protobuf.Value"!=L.typeName){if(m.oneof)throw new Error("cannot decode field "+e.typeName+"."+m.name+' from JSON: null is invalid for oneof field "'+l+'"');continue}var U=void 0===p[d]?new L:_(L,p[d]);p[d]=F(L,U.fromJson(c,r));break;case"enum":var A=te(m.T,c,r.ignoreUnknownFields);void 0!==A&&(p[d]=A);break;case"scalar":try{p[d]=re(m.T,c)}catch(n){var q="cannot decode field "+e.typeName+"."+m.name+' from JSON: "'+this.debug(c)+'"';throw n instanceof Error&&n.message.length>0&&(q+=": "+n.message),new Error(q)}}}else if(!r.ignoreUnknownFields)throw new Error("cannot decode message "+e.typeName+' from JSON: key "'+l+'" is unknown')}return t},writeMessage:function(e,r){var t,o=e.getType(),a={};try{for(var s,u=i(o.fields.byMember());!(s=u()).done;){var f=s.value,l=void 0;if("oneof"==f.kind){var c=e[f.localName];if(void 0===c.value)continue;if(!(t=f.findField(c.case)))throw"oneof case not found: "+c.case;l=n(t,c.value,r)}else l=n(t=f,e[t.localName],r);void 0!==l&&(a[r.useProtoFieldName?t.name:t.jsonName]=l)}}catch(e){var m=t?"cannot encode field "+o.typeName+"."+t.name+" to JSON":"cannot encode message "+o.typeName+" to JSON",d=e instanceof Error?e.message:String(e);throw new Error(m+(d.length>0?": "+d:""))}return a},readScalar:re,writeScalar:ie,debug:ne}}function ne(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":'"'+e.split('"').join('\\"')+'"';default:return e.toString()}}function re(e,n){switch(e){case g.DOUBLE:case g.FLOAT:if(null===n)return 0;if("NaN"===n)return Number.NaN;if("Infinity"===n)return Number.POSITIVE_INFINITY;if("-Infinity"===n)return Number.NEGATIVE_INFINITY;if(""===n)break;if("string"==typeof n&&n.trim().length!==n.length)break;if("string"!=typeof n&&"number"!=typeof n)break;var r=Number(n);if(Number.isNaN(r))break;if(!Number.isFinite(r))break;return e==g.FLOAT&&f(r),r;case g.INT32:case g.FIXED32:case g.SFIXED32:case g.SINT32:case g.UINT32:if(null===n)return 0;var t;if("number"==typeof n?t=n:"string"==typeof n&&n.length>0&&n.trim().length===n.length&&(t=Number(n)),void 0===t)break;return e==g.UINT32?u(t):s(t),t;case g.INT64:case g.SFIXED64:case g.SINT64:if(null===n)return I.zero;if("number"!=typeof n&&"string"!=typeof n)break;return I.parse(n);case g.FIXED64:case g.UINT64:if(null===n)return I.zero;if("number"!=typeof n&&"string"!=typeof n)break;return I.uParse(n);case g.BOOL:if(null===n)return!1;if("boolean"!=typeof n)break;return n;case g.STRING:if(null===n)return"";if("string"!=typeof n)break;try{encodeURIComponent(n)}catch(e){throw new Error("invalid UTF8")}return n;case g.BYTES:if(null===n||""===n)return new Uint8Array(0);if("string"!=typeof n)break;return Z.dec(n)}throw new Error}function te(e,n,r){if(null===n)return 0;switch(typeof n){case"number":if(Number.isInteger(n))return n;break;case"string":var t=e.findName(n);if(t||r)return null==t?void 0:t.no}throw new Error("cannot decode enum "+e.typeName+" from JSON: "+ne(n))}function oe(e,n,r,t){var o;if(void 0===n)return n;if(0!==n||r){if(t)return n;if("google.protobuf.NullValue"==e.typeName)return null;var i=e.findNumber(n);return null!=(o=null==i?void 0:i.name)?o:n}}function ie(e,n,r){if(void 0!==n)switch(e){case g.INT32:case g.SFIXED32:case g.SINT32:case g.FIXED32:case g.UINT32:return a("number"==typeof n),0!=n||r?n:void 0;case g.FLOAT:case g.DOUBLE:return a("number"==typeof n),Number.isNaN(n)?"NaN":n===Number.POSITIVE_INFINITY?"Infinity":n===Number.NEGATIVE_INFINITY?"-Infinity":0!==n||r?n:void 0;case g.STRING:return a("string"==typeof n),n.length>0||r?n:void 0;case g.BOOL:return a("boolean"==typeof n),n||r?n:void 0;case g.UINT64:case g.FIXED64:case g.INT64:case g.SFIXED64:case g.SINT64:return a("bigint"==typeof n||"string"==typeof n||"number"==typeof n),r||0!=n?n.toString(10):void 0;case g.BYTES:return a(n instanceof Uint8Array),r||n.byteLength>0?Z.enc(n):void 0}}function ae(){return{setEnumType:m,initPartial:function(e,n){if(void 0!==e)for(var r,t=i(n.getType().fields.byMember());!(r=t()).done;){var o=r.value,a=o.localName,s=n,u=e;void 0!==u[a]&&function(){switch(o.kind){case"oneof":var e=u[a].case;if(void 0===e)return"continue";var n=o.findField(e),r=u[a].value;!n||"message"!=n.kind||r instanceof n.T||(r=new n.T(r)),s[a]={case:e,value:r};break;case"scalar":case"enum":s[a]=u[a];break;case"map":switch(o.V.kind){case"scalar":case"enum":Object.assign(s[a],u[a]);break;case"message":for(var t=o.V.T,i=0,f=Object.keys(u[a]);i<f.length;i++){var l=f[i],c=u[a][l];t.fieldWrapper||(c=new t(c)),s[a][l]=c}}break;case"message":var m=o.T;if(o.repeated)s[a]=u[a].map(function(e){return e instanceof m?e:new m(e)});else if(void 0!==u[a]){var d=u[a];s[a]=m.fieldWrapper||d instanceof m?d:new m(d)}}}()}},equals:function(e,n,r){return n===r||!(!n||!r)&&e.fields.byMember().every(function(e){var t=n[e.localName],o=r[e.localName];if(e.repeated){if(t.length!==o.length)return!1;switch(e.kind){case"message":return t.every(function(n,r){return e.T.equals(n,o[r])});case"scalar":return t.every(function(n,r){return B(e.T,n,o[r])});case"enum":return t.every(function(e,n){return B(g.INT32,e,o[n])})}throw new Error("repeated cannot contain "+e.kind)}switch(e.kind){case"message":return e.T.equals(t,o);case"enum":return B(g.INT32,t,o);case"scalar":return B(e.T,t,o);case"oneof":if(t.case!==o.case)return!1;var i=t.case,a=e.findField(i);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(t[i],o[i]);case"enum":return B(g.INT32,t,o);case"scalar":return B(a.T,t,o)}throw new Error("oneof cannot contain "+a.kind);case"map":var s=Object.keys(t);if(s.some(function(e){return void 0===o[e]}))return!1;switch(e.V.kind){case"message":var u=e.V.T;return s.every(function(e){return u.equals(t[e],o[e])});case"enum":return s.every(function(e){return B(g.INT32,t[e],o[e])});case"scalar":var f=e.V.T;return s.every(function(e){return B(f,t[e],o[e])})}}})},clone:function(e){for(var n,r=e.getType(),t=new r,o=t,a=function(){var r=n.value,t=e[r.localName],i=void 0;if(r.repeated)i=t.map(function(e){return se(r,e)});else if("map"==r.kind){i=o[r.localName];for(var a=0,s=Object.entries(t);a<s.length;a++){var u=s[a];i[u[0]]=se(r.V,u[1])}}else if("oneof"==r.kind){var f=r.findField(t.case);i=f?{case:t.case,value:se(f,t.value)}:{case:void 0}}else i=se(r,t);o[r.localName]=i},s=i(r.fields.byMember());!(n=s()).done;)a();return t}}}function se(e,n){if(void 0===n)return n;switch(e.kind){case"enum":return n;case"scalar":if(e.T===g.BYTES){var r=new Uint8Array(n.byteLength);return r.set(n),r}return n;case"message":return e.T.fieldWrapper?e.T.fieldWrapper.unwrapField(e.T.fieldWrapper.wrapField(n).clone()):n.clone()}}var ue=/*#__PURE__*/function(){function e(e,n){this._fields=void 0,this._normalizer=void 0,this.all=void 0,this.numbersAsc=void 0,this.jsonNames=void 0,this.numbers=void 0,this.members=void 0,this._fields=e,this._normalizer=n}var n=e.prototype;return n.findJsonName=function(e){if(!this.jsonNames){for(var n,r={},t=i(this.list());!(n=t()).done;){var o=n.value;r[o.jsonName]=r[o.name]=o}this.jsonNames=r}return this.jsonNames[e]},n.find=function(e){if(!this.numbers){for(var n,r={},t=i(this.list());!(n=t()).done;){var o=n.value;r[o.no]=o}this.numbers=r}return this.numbers[e]},n.list=function(){return this.all||(this.all=this._normalizer(this._fields)),this.all},n.byNumber=function(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort(function(e,n){return e.no-n.no})),this.numbersAsc},n.byMember=function(){if(!this.members){this.members=[];for(var e,n,r=this.members,t=i(this.list());!(n=t()).done;){var o=n.value;o.oneof?o.oneof!==e&&r.push(e=o.oneof):r.push(o)}}return this.members},e}();function fe(e){return ce(e)}function le(e,n){var r=ce(e);return n?r:de[r]?r+me:r}function ce(e){for(var n=!1,r=[],t=0;t<e.length;t++){var o=e.charAt(t);switch(o){case"_":n=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r.push(o),n=!1;break;default:n&&(n=!1,o=o.toUpperCase()),r.push(o)}}return r.join("")}var me="$",de={constructor:!0,toString:!0,toJSON:!0,valueOf:!0,getType:!0,clone:!0,equals:!0,fromBinary:!0,fromJson:!0,fromJsonString:!0,toBinary:!0,toJson:!0,toJsonString:!0,toObject:!0},pe=/*#__PURE__*/function(){function e(e){this.kind="oneof",this.name=void 0,this.localName=void 0,this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this._lookup=void 0,this.name=e,this.localName=le(e,!1)}var n=e.prototype;return n.addField=function(e){a(e.oneof===this,"field "+e.name+" not one of "+this.name),this.fields.push(e)},n.findField=function(e){if(!this._lookup){this._lookup=Object.create(null);for(var n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]},e}(),ve=T("proto3",ee(function(e,n){return function(r,t,o){if("map"==r.kind){var i={};switch(r.V.kind){case"scalar":for(var s=0,u=Object.entries(t);s<u.length;s++){var f=u[s],l=f[0],c=n(r.V.T,f[1],!0);a(void 0!==c),i[l.toString()]=c}break;case"message":for(var m=0,d=Object.entries(t);m<d.length;m++){var p=d[m],v=p[1];i[p[0].toString()]=v.toJson(o)}break;case"enum":for(var g=r.V.T,h=0,T=Object.entries(t);h<T.length;h++){var y=T[h],w=y[0],N=y[1];a(void 0===N||"number"==typeof N);var b=e(g,N,!0,o.enumAsInteger);a(void 0!==b),i[w.toString()]=b}}return o.emitDefaultValues||Object.keys(i).length>0?i:void 0}if(r.repeated){var k=[];switch(r.kind){case"scalar":for(var E=0;E<t.length;E++)k.push(n(r.T,t[E],!0));break;case"enum":for(var S=0;S<t.length;S++)k.push(e(r.T,t[S],!0,o.enumAsInteger));break;case"message":for(var I=0;I<t.length;I++)k.push(_(r.T,t[I]).toJson(o))}return o.emitDefaultValues||k.length>0?k:void 0}switch(r.kind){case"scalar":return n(r.T,t,!!r.oneof||r.opt||o.emitDefaultValues);case"enum":return e(r.T,t,!!r.oneof||r.opt||o.emitDefaultValues,o.enumAsInteger);case"message":return void 0!==t?_(r.T,t).toJson(o):void 0}}}),e({},Y(),{writeMessage:function(e,n,r){for(var t,o=i(e.getType().fields.byNumber());!(t=o()).done;){var a=t.value,s=void 0,u=a.repeated,f=a.localName;if(a.oneof){var l=e[a.oneof.localName];if(l.case!==f)continue;s=l.value}else s=e[f];switch(a.kind){case"scalar":case"enum":var c="enum"==a.kind?g.INT32:a.T;if(u)if(a.packed)X(n,c,a.no,s);else for(var m,d=i(s);!(m=d()).done;)G(n,c,a.no,m.value,!0);else void 0!==s&&G(n,c,a.no,s,!!a.oneof||a.opt);break;case"message":if(u)for(var p,v=i(s);!(p=v()).done;)M(n,r,a.T,a.no,p.value);else M(n,r,a.T,a.no,s);break;case"map":for(var h=0,T=Object.entries(s);h<T.length;h++){var y=T[h];x(n,r,a,y[0],y[1])}}}return r.writeUnknownFields&&this.writeUnknownFields(e,n),n}}),e({},ae(),{newFieldList:function(e){return new ue(e,ge)},initFields:function(e){for(var n,r=i(e.getType().fields.byMember());!(n=r()).done;){var t=n.value;if(!t.opt){var o=t.localName,a=e;if(t.repeated)a[o]=[];else switch(t.kind){case"oneof":a[o]={case:void 0};break;case"enum":a[o]=0;break;case"map":a[o]={};break;case"scalar":a[o]=P(t.T)}}}}}));function ge(e){for(var n,r,t=[],o=i("function"==typeof e?e():e);!(r=o()).done;){var a,s,u,f=r.value,l=f;if(l.localName=le(f.name,void 0!==f.oneof),l.jsonName=null!=(a=f.jsonName)?a:fe(f.name),l.repeated=null!=(s=f.repeated)&&s,l.packed=null!=(u=f.packed)?u:"enum"==f.kind||"scalar"==f.kind&&f.T!=g.BYTES&&f.T!=g.STRING,void 0!==f.oneof){var c="string"==typeof f.oneof?f.oneof:f.oneof.name;n&&n.name==c||(n=new pe(c)),l.oneof=n,n.addField(l)}t.push(l)}return t}var he,Te,ye=T("proto2",ee(function(e,n){return function(r,t,o){if("map"==r.kind){var i={};switch(r.V.kind){case"scalar":for(var s=0,u=Object.entries(t);s<u.length;s++){var f=u[s],l=f[0],c=n(r.V.T,f[1],!0);a(void 0!==c),i[l.toString()]=c}break;case"message":for(var m=0,d=Object.entries(t);m<d.length;m++){var p=d[m],v=p[1];i[p[0].toString()]=v.toJson(o)}break;case"enum":for(var g=r.V.T,h=0,T=Object.entries(t);h<T.length;h++){var y=T[h],w=y[0],N=y[1];a(void 0===N||"number"==typeof N);var b=e(g,N,!0,o.enumAsInteger);a(void 0!==b),i[w.toString()]=b}}return o.emitDefaultValues||Object.keys(i).length>0?i:void 0}if(r.repeated){var k=[];switch(r.kind){case"scalar":for(var E=0;E<t.length;E++)k.push(n(r.T,t[E],!0));break;case"enum":for(var S=0;S<t.length;S++)k.push(e(r.T,t[S],!0,o.enumAsInteger));break;case"message":for(var I=0;I<t.length;I++)k.push(t[I].toJson(o))}return o.emitDefaultValues||k.length>0?k:void 0}if(void 0!==t)switch(r.kind){case"scalar":return n(r.T,t,!0);case"enum":return e(r.T,t,!0,o.enumAsInteger);case"message":return _(r.T,t).toJson(o)}else if(!r.oneof&&!r.opt)throw"required field not set"}}),e({},Y(),{writeMessage:function(e,n,r){var t,o=e.getType();try{for(var a,s=i(o.fields.byNumber());!(a=s()).done;){var u=void 0,f=(t=a.value).repeated,l=t.localName;if(t.oneof){var c=e[t.oneof.localName];if(c.case!==l)continue;u=c.value}else if(void 0===(u=e[l])&&!t.oneof&&!t.opt)throw new Error("cannot encode field "+o.typeName+"."+t.name+" to JSON: required field not set");switch(t.kind){case"scalar":case"enum":var m="enum"==t.kind?g.INT32:t.T;if(f)if(t.packed)X(n,m,t.no,u);else for(var d,p=i(u);!(d=p()).done;)G(n,m,t.no,d.value,!0);else void 0!==u&&G(n,m,t.no,u,!0);break;case"message":if(f)for(var v,h=i(u);!(v=h()).done;)M(n,r,t.T,t.no,v.value);else M(n,r,t.T,t.no,u);break;case"map":for(var T=0,y=Object.entries(u);T<y.length;T++){var w=y[T];x(n,r,t,w[0],w[1])}}}}catch(e){var N,b=t?"cannot encode field "+o.typeName+"."+(null==(N=t)?void 0:N.name)+" to binary":"cannot encode message "+o.typeName+" to binary",k=e instanceof Error?e.message:String(e);throw new Error(b+(k.length>0?": "+k:""))}return r.writeUnknownFields&&this.writeUnknownFields(e,n),n}}),e({},ae(),{newFieldList:function(e){return new ue(e,we)},initFields:function(e){for(var n,r=i(e.getType().fields.byMember());!(n=r()).done;){var t=n.value,o=t.localName,a=e;if(t.repeated)a[o]=[];else switch(t.kind){case"oneof":a[o]={case:void 0};break;case"map":a[o]={}}}}}));function we(e){for(var n,r,t=[],o=i("function"==typeof e?e():e);!(r=o()).done;){var a,s,u,f=r.value,l=f;if(l.localName=le(f.name,void 0!==f.oneof),l.jsonName=null!=(a=f.jsonName)?a:fe(f.name),l.repeated=null!=(s=f.repeated)&&s,l.packed=null!=(u=f.packed)&&u,void 0!==f.oneof){var c="string"==typeof f.oneof?f.oneof:f.oneof.name;n&&n.name==c||(n=new pe(c)),l.oneof=n,n.addField(l)}t.push(l)}return t}!function(e){e[e.Unary=0]="Unary",e[e.ServerStreaming=1]="ServerStreaming",e[e.ClientStreaming=2]="ClientStreaming",e[e.BiDiStreaming=3]="BiDiStreaming"}(he||(he={})),function(e){e[e.NoSideEffects=1]="NoSideEffects",e[e.Idempotent=2]="Idempotent"}(Te||(Te={}));var Ne=/*#__PURE__*/function(){function e(){this.messages={},this.enums={},this.services={}}var n=e.prototype;return n.findMessage=function(e){return this.messages[e]},n.findEnum=function(e){return this.enums[e]},n.findService=function(e){return this.services[e]},n.add=function(e){"fields"in e?this.messages[e.typeName]=e:"methods"in e?this.services[e.typeName]=e:this.enums[e.typeName]=e},e.fromIterable=function(n){for(var r,t=new e,o=i(n);!(r=o()).done;)t.add(r.value);return t},e.fromTypes=function(){return e.fromIterable([].slice.call(arguments))},e}(),be=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).file=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);be.runtime=ye,be.typeName="google.protobuf.FileDescriptorSet",be.fields=ye.util.newFieldList(function(){return[{no:1,name:"file",kind:"message",T:ke,repeated:!0}]});var ke=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.package=void 0,r.dependency=[],r.publicDependency=[],r.weakDependency=[],r.messageType=[],r.enumType=[],r.service=[],r.extension=[],r.options=void 0,r.sourceCodeInfo=void 0,r.syntax=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);ke.runtime=ye,ke.typeName="google.protobuf.FileDescriptorProto",ke.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:Ee,repeated:!0},{no:5,name:"enum_type",kind:"message",T:Pe,repeated:!0},{no:6,name:"service",kind:"message",T:Ue,repeated:!0},{no:7,name:"extension",kind:"message",T:Fe,repeated:!0},{no:8,name:"options",kind:"message",T:je,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Qe,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0}]});var Ee=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.field=[],r.extension=[],r.nestedType=[],r.enumType=[],r.extensionRange=[],r.oneofDecl=[],r.options=void 0,r.reservedRange=[],r.reservedName=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ee.runtime=ye,Ee.typeName="google.protobuf.DescriptorProto",Ee.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:Fe,repeated:!0},{no:6,name:"extension",kind:"message",T:Fe,repeated:!0},{no:3,name:"nested_type",kind:"message",T:Ee,repeated:!0},{no:4,name:"enum_type",kind:"message",T:Pe,repeated:!0},{no:5,name:"extension_range",kind:"message",T:Se,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:Be,repeated:!0},{no:7,name:"options",kind:"message",T:Ye,opt:!0},{no:9,name:"reserved_range",kind:"message",T:Ie,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]});var Se=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).start=void 0,r.end=void 0,r.options=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Se.runtime=ye,Se.typeName="google.protobuf.DescriptorProto.ExtensionRange",Se.fields=ye.util.newFieldList(function(){return[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Je,opt:!0}]});var Ie=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).start=void 0,r.end=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ie.runtime=ye,Ie.typeName="google.protobuf.DescriptorProto.ReservedRange",Ie.fields=ye.util.newFieldList(function(){return[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]});var Je=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Je.runtime=ye,Je.typeName="google.protobuf.ExtensionRangeOptions",Je.fields=ye.util.newFieldList(function(){return[{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var Oe,_e,Fe=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.number=void 0,r.label=void 0,r.type=void 0,r.typeName=void 0,r.extendee=void 0,r.defaultValue=void 0,r.oneofIndex=void 0,r.jsonName=void 0,r.options=void 0,r.proto3Optional=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Fe.runtime=ye,Fe.typeName="google.protobuf.FieldDescriptorProto",Fe.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:ye.getEnumType(_e),opt:!0},{no:5,name:"type",kind:"enum",T:ye.getEnumType(Oe),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:xe,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]}),function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.GROUP=10]="GROUP",e[e.MESSAGE=11]="MESSAGE",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.ENUM=14]="ENUM",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(Oe||(Oe={})),ye.util.setEnumType(Oe,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]),function(e){e[e.OPTIONAL=1]="OPTIONAL",e[e.REQUIRED=2]="REQUIRED",e[e.REPEATED=3]="REPEATED"}(_e||(_e={})),ye.util.setEnumType(_e,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:2,name:"LABEL_REQUIRED"},{no:3,name:"LABEL_REPEATED"}]);var Be=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.options=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Be.runtime=ye,Be.typeName="google.protobuf.OneofDescriptorProto",Be.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:Me,opt:!0}]});var Pe=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.value=[],r.options=void 0,r.reservedRange=[],r.reservedName=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Pe.runtime=ye,Pe.typeName="google.protobuf.EnumDescriptorProto",Pe.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:Le,repeated:!0},{no:3,name:"options",kind:"message",T:Ge,opt:!0},{no:4,name:"reserved_range",kind:"message",T:De,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]});var De=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).start=void 0,r.end=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);De.runtime=ye,De.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",De.fields=ye.util.newFieldList(function(){return[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]});var Le=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.number=void 0,r.options=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Le.runtime=ye,Le.typeName="google.protobuf.EnumValueDescriptorProto",Le.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Xe,opt:!0}]});var Ue=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.method=[],r.options=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ue.runtime=ye,Ue.typeName="google.protobuf.ServiceDescriptorProto",Ue.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:Ae,repeated:!0},{no:3,name:"options",kind:"message",T:Ce,opt:!0}]});var Ae=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.inputType=void 0,r.outputType=void 0,r.options=void 0,r.clientStreaming=void 0,r.serverStreaming=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ae.runtime=ye,Ae.typeName="google.protobuf.MethodDescriptorProto",Ae.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Ke,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]});var qe,je=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).javaPackage=void 0,r.javaOuterClassname=void 0,r.javaMultipleFiles=void 0,r.javaGenerateEqualsAndHash=void 0,r.javaStringCheckUtf8=void 0,r.optimizeFor=void 0,r.goPackage=void 0,r.ccGenericServices=void 0,r.javaGenericServices=void 0,r.pyGenericServices=void 0,r.phpGenericServices=void 0,r.deprecated=void 0,r.ccEnableArenas=void 0,r.objcClassPrefix=void 0,r.csharpNamespace=void 0,r.swiftPrefix=void 0,r.phpClassPrefix=void 0,r.phpNamespace=void 0,r.phpMetadataNamespace=void 0,r.rubyPackage=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);je.runtime=ye,je.typeName="google.protobuf.FileOptions",je.fields=ye.util.newFieldList(function(){return[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:ye.getEnumType(qe),opt:!0,default:qe.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:42,name:"php_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]}),function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME"}(qe||(qe={})),ye.util.setEnumType(qe,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);var Ye=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).messageSetWireFormat=void 0,r.noStandardDescriptorAccessor=void 0,r.deprecated=void 0,r.mapEntry=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ye.runtime=ye,Ye.typeName="google.protobuf.MessageOptions",Ye.fields=ye.util.newFieldList(function(){return[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var Re,Ve,xe=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).ctype=void 0,r.packed=void 0,r.jstype=void 0,r.lazy=void 0,r.unverifiedLazy=void 0,r.deprecated=void 0,r.weak=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);xe.runtime=ye,xe.typeName="google.protobuf.FieldOptions",xe.fields=ye.util.newFieldList(function(){return[{no:1,name:"ctype",kind:"enum",T:ye.getEnumType(Re),opt:!0,default:Re.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:ye.getEnumType(Ve),opt:!0,default:Ve.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]}),function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE"}(Re||(Re={})),ye.util.setEnumType(Re,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]),function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER"}(Ve||(Ve={})),ye.util.setEnumType(Ve,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var Me=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Me.runtime=ye,Me.typeName="google.protobuf.OneofOptions",Me.fields=ye.util.newFieldList(function(){return[{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var Ge=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).allowAlias=void 0,r.deprecated=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ge.runtime=ye,Ge.typeName="google.protobuf.EnumOptions",Ge.fields=ye.util.newFieldList(function(){return[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var Xe=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).deprecated=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Xe.runtime=ye,Xe.typeName="google.protobuf.EnumValueOptions",Xe.fields=ye.util.newFieldList(function(){return[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var Ce=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).deprecated=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ce.runtime=ye,Ce.typeName="google.protobuf.ServiceOptions",Ce.fields=ye.util.newFieldList(function(){return[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]});var We,Ke=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).deprecated=void 0,r.idempotencyLevel=void 0,r.uninterpretedOption=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ke.runtime=ye,Ke.typeName="google.protobuf.MethodOptions",Ke.fields=ye.util.newFieldList(function(){return[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:ye.getEnumType(We),opt:!0,default:We.IDEMPOTENCY_UNKNOWN},{no:999,name:"uninterpreted_option",kind:"message",T:Ze,repeated:!0}]}),function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT"}(We||(We={})),ye.util.setEnumType(We,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);var Ze=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=[],r.identifierValue=void 0,r.positiveIntValue=void 0,r.negativeIntValue=void 0,r.doubleValue=void 0,r.stringValue=void 0,r.aggregateValue=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Ze.runtime=ye,Ze.typeName="google.protobuf.UninterpretedOption",Ze.fields=ye.util.newFieldList(function(){return[{no:2,name:"name",kind:"message",T:ze,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]});var ze=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).namePart=void 0,r.isExtension=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);ze.runtime=ye,ze.typeName="google.protobuf.UninterpretedOption.NamePart",ze.fields=ye.util.newFieldList(function(){return[{no:1,name:"name_part",kind:"scalar",T:9},{no:2,name:"is_extension",kind:"scalar",T:8}]});var Qe=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).location=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Qe.runtime=ye,Qe.typeName="google.protobuf.SourceCodeInfo",Qe.fields=ye.util.newFieldList(function(){return[{no:1,name:"location",kind:"message",T:$e,repeated:!0}]});var $e=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).path=[],r.span=[],r.leadingComments=void 0,r.trailingComments=void 0,r.leadingDetachedComments=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);$e.runtime=ye,$e.typeName="google.protobuf.SourceCodeInfo.Location",$e.fields=ye.util.newFieldList(function(){return[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]});var He=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).annotation=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);He.runtime=ye,He.typeName="google.protobuf.GeneratedCodeInfo",He.fields=ye.util.newFieldList(function(){return[{no:1,name:"annotation",kind:"message",T:nn,repeated:!0}]});var en,nn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).path=[],r.sourceFile=void 0,r.begin=void 0,r.end=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);nn.runtime=ye,nn.typeName="google.protobuf.GeneratedCodeInfo.Annotation",nn.fields=ye.util.newFieldList(function(){return[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0}]});var rn=/*#__PURE__*/function(){function e(){this.enums={},this.messages={},this.services={}}var n=e.prototype;return n.add=function(){for(var e,n=i([].slice.call(arguments));!(e=n()).done;){var r=e.value;an(r,this)}},n.listEnums=function(){return Object.values(this.enums).filter(tn)},n.listMessages=function(){return Object.values(this.messages).filter(tn)},n.listServices=function(){return Object.values(this.services).filter(tn)},e}();function tn(e){return void 0!==e}var on=((en={})[Oe.DOUBLE]=g.DOUBLE,en[Oe.FLOAT]=g.FLOAT,en[Oe.INT64]=g.INT64,en[Oe.UINT64]=g.UINT64,en[Oe.INT32]=g.INT32,en[Oe.FIXED64]=g.FIXED64,en[Oe.FIXED32]=g.FIXED32,en[Oe.BOOL]=g.BOOL,en[Oe.STRING]=g.STRING,en[Oe.GROUP]=void 0,en[Oe.MESSAGE]=void 0,en[Oe.BYTES]=g.BYTES,en[Oe.UINT32]=g.UINT32,en[Oe.ENUM]=void 0,en[Oe.SFIXED32]=g.SFIXED32,en[Oe.SFIXED64]=g.SFIXED64,en[Oe.SINT32]=g.SINT32,en[Oe.SINT64]=g.SINT64,en);function an(e,n){if(a(e.name,"missing file descriptor name"),void 0!==e.syntax&&"proto3"!==e.syntax)throw new Error("invalid descriptor: unsupported syntax: "+e.syntax);for(var r,t={proto:e,syntax:"proto3"===e.syntax?"proto3":"proto2",name:e.name.endsWith(".proto")?e.name.substring(-".proto".length):e.name,toString:function(){return"file "+this.proto.name}},o=i(e.messageType);!(r=o()).done;)fn(r.value,void 0,t,n);for(var s,u=i(e.enumType);!(s=u()).done;)sn(s.value,void 0,t,n);for(var f,l=i(e.extension);!(f=l()).done;)pn(f.value,void 0,t);for(var c,m=i(e.service);!(c=m()).done;)vn(c.value,t,n);return t}function sn(e,n,r,t){var o;a(e.name,"invalid descriptor: missing enum descriptor name");var s=[],u={proto:e,file:r,parent:n,name:e.name,protoTypeName:o=n?n.protoTypeName+"."+e.name:void 0!==r.proto.package?"."+r.proto.package+"."+e.name:"."+e.name,typeName:o.startsWith(".")?o.substring(1):o,values:s,toString:function(){return"enum "+this.typeName}};t.enums[u.protoTypeName]=u;for(var f,l=i(e.value);!(f=l()).done;)s.push(un(f.value,u));return u}function un(e,n){return a(e.name,"invalid descriptor: missing enum value descriptor name"),a(void 0!==e.number,"invalid descriptor: missing enum value descriptor number"),{proto:e,name:e.name,number:e.number,parent:n,toString:function(){return"enum value "+this.parent.typeName+"."+this.proto.name}}}function fn(e,n,r,t){a(e.name,"invalid descriptor: missing name");var o,s=[],u=[],f=[],l=[],c=[],m={proto:e,file:r,parent:n,name:e.name,typeName:(o=n?n.protoTypeName+"."+e.name:void 0!==r.proto.package?"."+r.proto.package+"."+e.name:"."+e.name).startsWith(".")?o.substring(1):o,protoTypeName:o,fields:u,oneofs:f,nestedEnums:l,nestedMessages:s,nestedExtensions:c,toString:function(){return"message "+this.typeName}};t.messages[m.protoTypeName]=m;for(var d,p=i(e.nestedType);!(d=p()).done;)s.push(fn(d.value,m,r,t));for(var v,g=i(e.oneofDecl);!(v=g()).done;)f.push(dn(v.value,m,r));for(var h,T=i(e.field);!(h=T()).done;){var y,w=h.value,N=void 0;void 0!==w.oneofIndex&&a(N=f[w.oneofIndex],"invalid descriptor: oneof declaration index "+w.oneofIndex+" specified by field #"+(null!=(y=w.number)?y:-1)+" not found"),u.push(ln(w,m,N))}for(var b,k=i(e.enumType);!(b=k()).done;)l.push(sn(b.value,m,r,t));for(var E,S=i(e.extension);!(E=S()).done;)c.push(pn(E.value,m,r));return m}function ln(e,n,r){var t;a(e.name,"invalid descriptor: missing name"),a(e.number,"invalid descriptor: missing number"),a(e.type,"invalid descriptor: missing type");var o=!1,i=!0===(null==(t=e.options)?void 0:t.packed);switch(n.file.syntax){case"proto2":o=void 0===r&&e.label===_e.OPTIONAL;break;case"proto3":switch(o=!0===e.proto3Optional,e.type){case Oe.DOUBLE:case Oe.FLOAT:case Oe.INT64:case Oe.UINT64:case Oe.INT32:case Oe.FIXED64:case Oe.FIXED32:case Oe.UINT32:case Oe.SFIXED32:case Oe.SFIXED64:case Oe.SINT32:case Oe.SINT64:case Oe.BOOL:case Oe.ENUM:i=!0;break;case Oe.STRING:case Oe.GROUP:case Oe.MESSAGE:case Oe.BYTES:a(!i,"invalid descriptor: "+Oe[e.type]+" cannot be packed")}}var s={proto:e,name:e.name,number:e.number,type:e.type,parent:n,oneof:!0===e.proto3Optional?void 0:r,optional:o,packed:i,toString:function(){return"field "+n.typeName+"."+e.name},resolve:function(e){return cn(this,e)}};return r&&r.fields.push(s),s}function cn(n,r){var t=n.proto.label===_e.REPEATED;switch(n.type){case Oe.MESSAGE:case Oe.GROUP:var o;a(n.proto.typeName,"invalid descriptor: "+n.toString()+" has type "+Oe[n.type]+", but type_name is unset");var i=r.messages[n.proto.typeName];return a(i,'invalid descriptor: cannot find type_name "'+n.proto.typeName+'" specified by '+n.toString()),void 0!==(null==(o=i.proto.options)?void 0:o.mapEntry)?e({},n,{repeated:!1,scalarType:void 0,message:void 0,enum:void 0,map:mn(i,r)}):e({},n,{repeated:t,scalarType:void 0,message:i,enum:void 0,map:void 0});case Oe.ENUM:a(n.proto.typeName,"invalid descriptor: "+n.toString()+" has type "+Oe[n.type]+", but type_name is unset");var s=r.enums[n.proto.typeName];return a(s,'invalid descriptor: cannot find type_name "'+n.proto.typeName+'" specified by '+n.toString()),e({},n,{repeated:t,scalarType:void 0,message:void 0,enum:s,map:void 0});default:var u=on[n.type];return a(u,"invalid descriptor: unable to convert google.protobuf.FieldDescriptorProto.Type "+Oe[n.type]+" to ScalarType"),e({},n,{repeated:t,scalarType:u,message:void 0,enum:void 0,map:void 0})}}function mn(e,n){var r;a(null==(r=e.proto.options)?void 0:r.mapEntry,"invalid descriptor: expected "+e.toString()+" to be a map entry"),a(2===e.fields.length,"invalid descriptor: map entry "+e.toString()+" has "+e.fields.length+" fields");var t=e.fields.find(function(e){return 1===e.proto.number});a(t,"invalid descriptor: map entry "+e.toString()+" is missing key field");var o=cn(t,n);a(void 0!==o.scalarType&&o.scalarType!==g.BYTES&&o.scalarType!==g.FLOAT&&o.scalarType!==g.DOUBLE,"invalid descriptor: map entry "+e.toString()+" has unexpected key type "+Oe[o.type]);var i=e.fields.find(function(e){return 2===e.proto.number});a(i,"invalid descriptor: map entry "+e.toString()+" is missing value field");var s=cn(i,n);if(void 0!==s.scalarType)return{key:o.scalarType,value:{scalarType:s.scalarType,enum:void 0,message:void 0}};if(void 0!==s.enum)return{key:o.scalarType,value:{scalar:void 0,enum:s.enum,message:void 0}};if(void 0!==s.message)return{key:o.scalarType,value:{scalar:void 0,enum:void 0,message:s.message}};throw new Error("invalid descriptor: map entry "+e.toString()+" has unexpected value type "+Oe[o.type])}function dn(e,n,r){return a(e.name,"invalid descriptor: missing oneof descriptor name"),{proto:e,parent:n,file:r,fields:[],name:e.name,toString:function(){return"oneof "+n.typeName+"."+e.name}}}function pn(e,n,r,t){return a(e.name,"invalid descriptor: missing field descriptor name"),{proto:e,file:r,parent:n}}function vn(e,n,r){var t;a(e.name,"invalid descriptor: missing service descriptor name");for(var o,s=[],u={proto:e,file:n,typeName:(t=void 0!==n.proto.package?"."+n.proto.package+"."+e.name:"."+e.name).startsWith(".")?t.substring(1):t,protoTypeName:t,methods:s,toString:function(){return"service "+this.typeName}},f=i(e.method);!(o=f()).done;)s.push(gn(o.value,u));return r.services[u.protoTypeName]=u,u}function gn(e,n){var r,t,o;switch(a(e.name,"invalid descriptor: missing method descriptor name"),a(e.inputType,"invalid descriptor: missing method input type"),a(e.outputType,"invalid descriptor: missing method output type"),t=!0===e.clientStreaming&&!0===e.serverStreaming?he.BiDiStreaming:!0===e.clientStreaming?he.ClientStreaming:!0===e.serverStreaming?he.ServerStreaming:he.Unary,null==(r=e.options)?void 0:r.idempotencyLevel){case We.IDEMPOTENT:o=Te.Idempotent;break;case We.NO_SIDE_EFFECTS:o=Te.NoSideEffects;break;case We.IDEMPOTENCY_UNKNOWN:case void 0:o=void 0}var i=e.inputType.startsWith(".")?e.inputType.substring(1):e.inputType,s=e.outputType.startsWith(".")?e.outputType.substring(1):e.outputType;return{proto:e,parent:n,name:e.name,kind:t,idempotency:o,inputTypeName:i,outputTypeName:s,toString:function(){return"rpc "+this.parent.typeName+"."+e.name}}}var hn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).seconds=I.zero,r.nanos=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.fromJson=function(e,n){if("string"!=typeof e)throw new Error("cannot decode google.protobuf.Timestamp from JSON: "+ve.json.debug(e));var r=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");var t=Date.parse(r[1]+"-"+r[2]+"-"+r[3]+"T"+r[4]+":"+r[5]+":"+r[6]+(r[8]?r[8]:"Z"));if(Number.isNaN(t))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=I.parse(t/1e3),this.nanos=0,r[7]&&(this.nanos=parseInt("1"+r[7]+"0".repeat(9-r[7].length))-1e9),this},o.toJson=function(e){var n=1e3*Number(this.seconds);if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");var r="Z";if(this.nanos>0){var t=(this.nanos+1e9).toString().substring(1);r="000000"===t.substring(3)?"."+t.substring(0,3)+"Z":"000"===t.substring(6)?"."+t.substring(0,6)+"Z":"."+t+"Z"}return new Date(n).toISOString().replace(".000Z",r)},o.toDate=function(){return new Date(1e3*Number(this.seconds)+Math.ceil(this.nanos/1e6))},r.now=function(){return r.fromDate(new Date)},r.fromDate=function(e){var n=e.getTime();return new r({seconds:I.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);hn.runtime=ve,hn.typeName="google.protobuf.Timestamp",hn.fields=ve.util.newFieldList(function(){return[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]});var Tn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).seconds=I.zero,r.nanos=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.fromJson=function(e,n){if("string"!=typeof e)throw new Error("cannot decode google.protobuf.Duration from JSON: "+ve.json.debug(e));var r=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(null===r)throw new Error("cannot decode google.protobuf.Duration from JSON: "+ve.json.debug(e));var t=Number(r[1]);if(t>315576e6||t<-315576e6)throw new Error("cannot decode google.protobuf.Duration from JSON: "+ve.json.debug(e));if(this.seconds=I.parse(t),"string"==typeof r[2]){var o=r[2]+"0".repeat(9-r[2].length);this.nanos=parseInt(o),t<0n&&(this.nanos=-this.nanos)}return this},o.toJson=function(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");var n=this.seconds.toString();if(0!==this.nanos){var r=Math.abs(this.nanos).toString();"000000"===(r="0".repeat(9-r.length)+r).substring(3)?r=r.substring(0,3):"000"===r.substring(6)&&(r=r.substring(0,6)),n+="."+r}return n+"s"},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Tn.runtime=ve,Tn.typeName="google.protobuf.Duration",Tn.fields=ve.util.newFieldList(function(){return[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]});var yn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).typeUrl="",r.value=new Uint8Array(0),ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){var n;if(""===this.typeUrl)return{};var r=this.typeUrlToName(this.typeUrl),t=null==e||null==(n=e.typeRegistry)?void 0:n.findMessage(r);if(!t)throw new Error('cannot encode message google.protobuf.Any to JSON: "'+this.typeUrl+'" is not in the type registry');var o=t.fromBinary(this.value).toJson(e);return(r.startsWith("google.protobuf.")||null===o||Array.isArray(o)||"object"!=typeof o)&&(o={value:o}),o["@type"]=this.typeUrl,o},o.fromJson=function(e,n){var r;if(null===e||Array.isArray(e)||"object"!=typeof e)throw new Error("cannot decode message google.protobuf.Any from JSON: expected object but got "+(null===e?"null":Array.isArray(e)?"array":typeof e));var t=e["@type"];if("string"!=typeof t||""==t)throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');var o,i=this.typeUrlToName(t),a=null==n||null==(r=n.typeRegistry)?void 0:r.findMessage(i);if(!a)throw new Error("cannot decode message google.protobuf.Any from JSON: "+t+" is not in the type registry");if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))o=a.fromJson(e.value,n);else{var s=Object.assign({},e);delete s["@type"],o=a.fromJson(s,n)}return this.packFrom(o),this},o.packFrom=function(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)},o.unpackTo=function(e){return!!this.is(e.getType())&&(e.fromBinary(this.value),!0)},o.is=function(e){return this.typeUrl===this.typeNameToUrl(e.typeName)},o.typeNameToUrl=function(e){return"type.googleapis.com/"+e},o.typeUrlToName=function(e){if(!e.length)throw new Error("invalid type url: "+e);var n=e.lastIndexOf("/"),r=n>0?e.substring(n+1):e;if(!r.length)throw new Error("invalid type url: "+e);return r},r.pack=function(e){var n=new r;return n.packFrom(e),n},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);yn.runtime=ve,yn.typeName="google.protobuf.Any",yn.fields=ve.util.newFieldList(function(){return[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]});var wn=/*#__PURE__*/function(e){function r(n){var r;return r=e.call(this)||this,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);wn.runtime=ve,wn.typeName="google.protobuf.Empty",wn.fields=ve.util.newFieldList(function(){return[]});var Nn,bn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).paths=[],ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return this.paths.map(function(e){if(e.match(/_[0-9]?_/g)||e.match(/[A-Z]/g))throw new Error('cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name "'+e+'" is irreversible');return function(e){for(var n=!1,r=[],t=0;t<e.length;t++){var o=e.charAt(t);switch(o){case"_":n=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r.push(o),n=!1;break;default:n&&(n=!1,o=o.toUpperCase()),r.push(o)}}return r.join("")}(e)}).join(",")},o.fromJson=function(e,n){if("string"!=typeof e)throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+ve.json.debug(e));return""===e||(this.paths=e.split(",").map(function(e){if(e.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");var n=e.replace(/[A-Z]/g,function(e){return"_"+e.toLowerCase()});return"_"===n[0]?n.substring(1):n})),this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);bn.runtime=ve,bn.typeName="google.protobuf.FieldMask",bn.fields=ve.util.newFieldList(function(){return[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]}),function(e){e[e.NULL_VALUE=0]="NULL_VALUE"}(Nn||(Nn={})),ve.util.setEnumType(Nn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);var kn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).fields={},ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){for(var n={},r=0,t=Object.entries(this.fields);r<t.length;r++){var o=t[r];n[o[0]]=o[1].toJson(e)}return n},o.fromJson=function(e,n){if("object"!=typeof e||null==e||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+ve.json.debug(e));for(var r=0,t=Object.entries(e);r<t.length;r++){var o=t[r];this.fields[o[0]]=En.fromJson(o[1])}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);kn.runtime=ve,kn.typeName="google.protobuf.Struct",kn.fields=ve.util.newFieldList(function(){return[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:En}}]});var En=/*#__PURE__*/function(r){function o(e){var n;return(n=r.call(this)||this).kind={case:void 0},ve.util.initPartial(e,t(n)),n}n(o,r);var i=o.prototype;return i.toJson=function(n){switch(this.kind.case){case"nullValue":return null;case"boolValue":case"numberValue":case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(e({},n,{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")},i.fromJson=function(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":this.kind=null===e?{case:"nullValue",value:Nn.NULL_VALUE}:Array.isArray(e)?{case:"listValue",value:Sn.fromJson(e)}:{case:"structValue",value:kn.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+ve.json.debug(e))}return this},o.fromBinary=function(e,n){return(new o).fromBinary(e,n)},o.fromJson=function(e,n){return(new o).fromJson(e,n)},o.fromJsonString=function(e,n){return(new o).fromJsonString(e,n)},o.equals=function(e,n){return ve.util.equals(o,e,n)},o}(h);En.runtime=ve,En.typeName="google.protobuf.Value",En.fields=ve.util.newFieldList(function(){return[{no:1,name:"null_value",kind:"enum",T:ve.getEnumType(Nn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:kn,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:Sn,oneof:"kind"}]});var Sn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).values=[],ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return this.values.map(function(e){return e.toJson()})},o.fromJson=function(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+ve.json.debug(e));for(var r,t=i(e);!(r=t()).done;)this.values.push(En.fromJson(r.value));return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Sn.runtime=ve,Sn.typeName="google.protobuf.ListValue",Sn.fields=ve.util.newFieldList(function(){return[{no:1,name:"values",kind:"message",T:En,repeated:!0}]});var In=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.DOUBLE,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.DOUBLE,e)}catch(e){var r='cannot decode message google.protobuf.DoubleValue from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);In.runtime=ve,In.typeName="google.protobuf.DoubleValue",In.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:1}]}),In.fieldWrapper={wrapField:function(e){return e instanceof In?e:new In({value:e})},unwrapField:function(e){return e.value}};var Jn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.FLOAT,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.FLOAT,e)}catch(e){var r='cannot decode message google.protobuf.FloatValue from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Jn.runtime=ve,Jn.typeName="google.protobuf.FloatValue",Jn.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:2}]}),Jn.fieldWrapper={wrapField:function(e){return e instanceof Jn?e:new Jn({value:e})},unwrapField:function(e){return e.value}};var On=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=I.zero,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.INT64,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.INT64,e)}catch(e){var r='cannot decode message google.protobuf.Int64Value from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);On.runtime=ve,On.typeName="google.protobuf.Int64Value",On.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:3}]}),On.fieldWrapper={wrapField:function(e){return e instanceof On?e:new On({value:e})},unwrapField:function(e){return e.value}};var _n=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=I.zero,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.UINT64,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.UINT64,e)}catch(e){var r='cannot decode message google.protobuf.UInt64Value from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);_n.runtime=ve,_n.typeName="google.protobuf.UInt64Value",_n.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:4}]}),_n.fieldWrapper={wrapField:function(e){return e instanceof _n?e:new _n({value:e})},unwrapField:function(e){return e.value}};var Fn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.INT32,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.INT32,e)}catch(e){var r='cannot decode message google.protobuf.Int32Value from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Fn.runtime=ve,Fn.typeName="google.protobuf.Int32Value",Fn.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:5}]}),Fn.fieldWrapper={wrapField:function(e){return e instanceof Fn?e:new Fn({value:e})},unwrapField:function(e){return e.value}};var Bn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=0,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.UINT32,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.UINT32,e)}catch(e){var r='cannot decode message google.protobuf.UInt32Value from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Bn.runtime=ve,Bn.typeName="google.protobuf.UInt32Value",Bn.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:13}]}),Bn.fieldWrapper={wrapField:function(e){return e instanceof Bn?e:new Bn({value:e})},unwrapField:function(e){return e.value}};var Pn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=!1,ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.BOOL,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.BOOL,e)}catch(e){var r='cannot decode message google.protobuf.BoolValue from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Pn.runtime=ve,Pn.typeName="google.protobuf.BoolValue",Pn.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:8}]}),Pn.fieldWrapper={wrapField:function(e){return e instanceof Pn?e:new Pn({value:e})},unwrapField:function(e){return e.value}};var Dn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value="",ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.STRING,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.STRING,e)}catch(e){var r='cannot decode message google.protobuf.StringValue from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Dn.runtime=ve,Dn.typeName="google.protobuf.StringValue",Dn.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:9}]}),Dn.fieldWrapper={wrapField:function(e){return e instanceof Dn?e:new Dn({value:e})},unwrapField:function(e){return e.value}};var Ln=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).value=new Uint8Array(0),ve.util.initPartial(n,t(r)),r}n(r,e);var o=r.prototype;return o.toJson=function(e){return ve.json.writeScalar(g.BYTES,this.value,!0)},o.fromJson=function(e,n){try{this.value=ve.json.readScalar(g.BYTES,e)}catch(e){var r='cannot decode message google.protobuf.BytesValue from JSON"';throw e instanceof Error&&e.message.length>0&&(r+=": "+e.message),new Error(r)}return this},r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Ln.runtime=ve,Ln.typeName="google.protobuf.BytesValue",Ln.fields=ve.util.newFieldList(function(){return[{no:1,name:"value",kind:"scalar",T:12}]}),Ln.fieldWrapper={wrapField:function(e){return e instanceof Ln?e:new Ln({value:e})},unwrapField:function(e){return e.value}};var Un=[yn,Tn,wn,bn,kn,En,Sn,hn,Tn,In,Jn,On,Fn,Bn,_n,Pn,Dn,Ln],An=[c(Nn)],qn=/*#__PURE__*/function(){function e(e,n){if(void 0===n&&(n=!0),this.ds=void 0,this.enums={},this.messages={},this.services={},this.ds=null!=e?e:new rn,n){for(var r,t=i(Un);!(r=t()).done;){var o=r.value;this.messages["."+o.typeName]=o}for(var a,s=i(An);!(a=s()).done;){var u=a.value;this.enums["."+u.typeName]=u}}}e.fromFileDescriptorSet=function(n){var r=n instanceof Uint8Array?be.fromBinary(n):new be(n),t=new e;return t.add.apply(t,r.file),t};var n=e.prototype;return n.add=function(){var e;(e=this.ds).add.apply(e,[].slice.call(arguments))},n.findEnum=function(e){var n="."+e,r=this.enums[n];if(r)return r;var t=this.ds.enums[n];if(t){var o=("proto3"==t.file.syntax?ve:ye).makeEnumType(e,t.values.map(function(e){return{no:e.number,name:e.name}}),{});return this.enums[n]=o,o}},n.findMessage=function(e){var n=this,r="."+e,t=this.messages[r];if(t)return t;var o=this.ds.messages[r];if(o){var a=[],s=("proto3"==o.file.syntax?ve:ye).makeMessageType(e,function(){return a},{localName:jn(o)});this.messages[r]=s;for(var u,f=i(o.fields.map(function(e){return e.resolve(n.ds)}));!(u=f()).done;){var l=Yn(u.value,this);a.push(l)}return s}},n.findService=function(e){var n="."+e,r=this.services[n];if(r)return r;var t=this.ds.services[n];if(t){for(var o,s,u={},f=i(t.methods);!(o=f()).done;){var l=o.value,c=this.findMessage(l.inputTypeName),m=this.findMessage(l.outputTypeName);a(c,'message "'+l.inputTypeName+'" for '+l.toString()+" not found"),a(m,'output message "'+l.outputTypeName+'" for '+l.toString()+" not found");var d={name:l.name,localName:(s=l.name,0==s.length?s:s[0].toLowerCase()+s.substring(1)),I:c,O:m,kind:l.kind,idempotency:l.idempotency,options:{}};u[d.localName]=d}return this.services[n]={typeName:t.typeName,methods:u}}},e}();function jn(e){var n,r=e.typeName,t=(null!=(n=e.file.proto.package)?n:"")+".";return r.startsWith(t)?r.substring(t.length).split(".").join("_"):e.name}function Yn(n,r){if(void 0!==n.map)return function(n,r){var t={kind:"map",name:n.name,no:n.number,K:n.map.key};if(n.map.value.message){var o=r.findMessage(n.map.value.message.typeName);return a(o,'message "'+n.map.value.message.typeName+'" for '+n.toString()+" not found"),e({},t,{V:{kind:"message",T:o}})}if(n.map.value.enum){var i=r.findEnum(n.map.value.enum.typeName);return a(i,'enum "'+n.map.value.enum.typeName+'" for '+n.toString()+" not found"),e({},t,{V:{kind:"enum",T:i}})}return e({},t,{V:{kind:"scalar",T:n.map.value.scalarType}})}(n,r);if(n.message)return function(n,r){var t=r.findMessage(n.message.typeName);a(t,'message "'+n.message.typeName+'" for '+n.toString()+" not found");var o={no:n.number,name:n.name,kind:"message",T:t};return n.repeated?e({},o,{repeated:!0,packed:n.packed,oneof:void 0}):n.oneof?e({},o,{oneof:n.oneof.name}):n.optional?e({},o,{opt:!0}):o}(n,r);var t=n.enum?function(n,r){var t=r.findEnum(n.enum.typeName);a(t,'message "'+n.enum.typeName+'" for '+n.toString()+" not found");var o={no:n.number,name:n.name,kind:"enum",T:t};return n.repeated?e({},o,{repeated:!0,packed:n.packed,oneof:void 0}):n.oneof?e({},o,{oneof:n.oneof.name}):n.optional?e({},o,{opt:!0}):o}(n,r):function(n){var r={no:n.number,name:n.name,kind:"scalar",T:n.scalarType};return n.repeated?e({},r,{repeated:!0,packed:n.packed,oneof:void 0,T:n.scalarType}):n.oneof?e({},r,{oneof:n.oneof.name}):n.optional?e({},r,{opt:!0}):r}(n);return t.default=function(e){var n=e.proto.defaultValue;if(void 0!==n){if(e.enum){var r=e.enum.values.find(function(e){return e.name===n});return a(r,"cannot parse "+e.toString()+" default value: "+n),r.number}if(e.scalarType)switch(e.scalarType){case g.STRING:return n;case g.BYTES:var t=function(e){for(var n=[],r={tail:e,c:"",next:function(){return 0!=this.tail.length&&(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take:function(e){if(this.tail.length>=e){var n=this.tail.substring(0,e);return this.tail=this.tail.substring(e),n}return!1}};r.next();)if("\\"===r.c){if(r.next())switch(r.c){case"\\":n.push(r.c.charCodeAt(0));break;case"b":n.push(8);break;case"f":n.push(12);break;case"n":n.push(10);break;case"r":n.push(13);break;case"t":n.push(9);break;case"v":n.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":var t=r.c,o=r.take(2);if(!1===o)return!1;var i=parseInt(t+o,8);if(isNaN(i))return!1;n.push(i);break;case"x":var a=r.c,s=r.take(2);if(!1===s)return!1;var u=parseInt(a+s,16);if(isNaN(u))return!1;n.push(u);break;case"u":var f=r.c,l=r.take(4);if(!1===l)return!1;var c=parseInt(f+l,16);if(isNaN(c))return!1;var m=new Uint8Array(4);new DataView(m.buffer).setInt32(0,c,!0),n.push(m[0],m[1],m[2],m[3]);break;case"U":var d=r.c,p=r.take(8);if(!1===p)return!1;var v=I.uEnc(d+p),g=new Uint8Array(8),h=new DataView(g.buffer);h.setInt32(0,v.lo,!0),h.setInt32(4,v.hi,!0),n.push(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7])}}else n.push(r.c.charCodeAt(0));return new Uint8Array(n)}(n);if(!1===t)throw new Error("cannot parse "+e.toString()+" default value: "+n);return t;case g.INT64:case g.SFIXED64:case g.SINT64:return I.parse(n);case g.UINT64:case g.FIXED64:return I.uParse(n);case g.DOUBLE:case g.FLOAT:switch(n){case"inf":return Number.POSITIVE_INFINITY;case"-inf":return Number.NEGATIVE_INFINITY;case"nan":return Number.NaN;default:return parseFloat(n)}case g.BOOL:return Boolean(n);case g.INT32:case g.UINT32:case g.SINT32:case g.FIXED32:case g.SFIXED32:return parseInt(n,10)}}}(n),t}var Rn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).major=void 0,r.minor=void 0,r.patch=void 0,r.suffix=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Rn.runtime=ye,Rn.typeName="google.protobuf.compiler.Version",Rn.fields=ye.util.newFieldList(function(){return[{no:1,name:"major",kind:"scalar",T:5,opt:!0},{no:2,name:"minor",kind:"scalar",T:5,opt:!0},{no:3,name:"patch",kind:"scalar",T:5,opt:!0},{no:4,name:"suffix",kind:"scalar",T:9,opt:!0}]});var Vn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).fileToGenerate=[],r.parameter=void 0,r.protoFile=[],r.compilerVersion=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Vn.runtime=ye,Vn.typeName="google.protobuf.compiler.CodeGeneratorRequest",Vn.fields=ye.util.newFieldList(function(){return[{no:1,name:"file_to_generate",kind:"scalar",T:9,repeated:!0},{no:2,name:"parameter",kind:"scalar",T:9,opt:!0},{no:15,name:"proto_file",kind:"message",T:ke,repeated:!0},{no:3,name:"compiler_version",kind:"message",T:Rn,opt:!0}]});var xn,Mn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).error=void 0,r.supportedFeatures=void 0,r.file=[],ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Mn.runtime=ye,Mn.typeName="google.protobuf.compiler.CodeGeneratorResponse",Mn.fields=ye.util.newFieldList(function(){return[{no:1,name:"error",kind:"scalar",T:9,opt:!0},{no:2,name:"supported_features",kind:"scalar",T:4,opt:!0},{no:15,name:"file",kind:"message",T:Gn,repeated:!0}]}),function(e){e[e.NONE=0]="NONE",e[e.PROTO3_OPTIONAL=1]="PROTO3_OPTIONAL"}(xn||(xn={})),ye.util.setEnumType(xn,"google.protobuf.compiler.CodeGeneratorResponse.Feature",[{no:0,name:"FEATURE_NONE"},{no:1,name:"FEATURE_PROTO3_OPTIONAL"}]);var Gn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name=void 0,r.insertionPoint=void 0,r.content=void 0,r.generatedCodeInfo=void 0,ye.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ye.util.equals(r,e,n)},r}(h);Gn.runtime=ye,Gn.typeName="google.protobuf.compiler.CodeGeneratorResponse.File",Gn.fields=ye.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"insertion_point",kind:"scalar",T:9,opt:!0},{no:15,name:"content",kind:"scalar",T:9,opt:!0},{no:16,name:"generated_code_info",kind:"message",T:He,opt:!0}]});var Xn,Cn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).fileName="",ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Cn.runtime=ve,Cn.typeName="google.protobuf.SourceContext",Cn.fields=ve.util.newFieldList(function(){return[{no:1,name:"file_name",kind:"scalar",T:9}]}),function(e){e[e.PROTO2=0]="PROTO2",e[e.PROTO3=1]="PROTO3"}(Xn||(Xn={})),ve.util.setEnumType(Xn,"google.protobuf.Syntax",[{no:0,name:"SYNTAX_PROTO2"},{no:1,name:"SYNTAX_PROTO3"}]);var Wn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.fields=[],r.oneofs=[],r.options=[],r.sourceContext=void 0,r.syntax=Xn.PROTO2,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Wn.runtime=ve,Wn.typeName="google.protobuf.Type",Wn.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"fields",kind:"message",T:zn,repeated:!0},{no:3,name:"oneofs",kind:"scalar",T:9,repeated:!0},{no:4,name:"options",kind:"message",T:Hn,repeated:!0},{no:5,name:"source_context",kind:"message",T:Cn},{no:6,name:"syntax",kind:"enum",T:ve.getEnumType(Xn)}]});var Kn,Zn,zn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).kind=Kn.TYPE_UNKNOWN,r.cardinality=Zn.UNKNOWN,r.number=0,r.name="",r.typeUrl="",r.oneofIndex=0,r.packed=!1,r.options=[],r.jsonName="",r.defaultValue="",ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);zn.runtime=ve,zn.typeName="google.protobuf.Field",zn.fields=ve.util.newFieldList(function(){return[{no:1,name:"kind",kind:"enum",T:ve.getEnumType(Kn)},{no:2,name:"cardinality",kind:"enum",T:ve.getEnumType(Zn)},{no:3,name:"number",kind:"scalar",T:5},{no:4,name:"name",kind:"scalar",T:9},{no:6,name:"type_url",kind:"scalar",T:9},{no:7,name:"oneof_index",kind:"scalar",T:5},{no:8,name:"packed",kind:"scalar",T:8},{no:9,name:"options",kind:"message",T:Hn,repeated:!0},{no:10,name:"json_name",kind:"scalar",T:9},{no:11,name:"default_value",kind:"scalar",T:9}]}),function(e){e[e.TYPE_UNKNOWN=0]="TYPE_UNKNOWN",e[e.TYPE_DOUBLE=1]="TYPE_DOUBLE",e[e.TYPE_FLOAT=2]="TYPE_FLOAT",e[e.TYPE_INT64=3]="TYPE_INT64",e[e.TYPE_UINT64=4]="TYPE_UINT64",e[e.TYPE_INT32=5]="TYPE_INT32",e[e.TYPE_FIXED64=6]="TYPE_FIXED64",e[e.TYPE_FIXED32=7]="TYPE_FIXED32",e[e.TYPE_BOOL=8]="TYPE_BOOL",e[e.TYPE_STRING=9]="TYPE_STRING",e[e.TYPE_GROUP=10]="TYPE_GROUP",e[e.TYPE_MESSAGE=11]="TYPE_MESSAGE",e[e.TYPE_BYTES=12]="TYPE_BYTES",e[e.TYPE_UINT32=13]="TYPE_UINT32",e[e.TYPE_ENUM=14]="TYPE_ENUM",e[e.TYPE_SFIXED32=15]="TYPE_SFIXED32",e[e.TYPE_SFIXED64=16]="TYPE_SFIXED64",e[e.TYPE_SINT32=17]="TYPE_SINT32",e[e.TYPE_SINT64=18]="TYPE_SINT64"}(Kn||(Kn={})),ve.util.setEnumType(Kn,"google.protobuf.Field.Kind",[{no:0,name:"TYPE_UNKNOWN"},{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.OPTIONAL=1]="OPTIONAL",e[e.REQUIRED=2]="REQUIRED",e[e.REPEATED=3]="REPEATED"}(Zn||(Zn={})),ve.util.setEnumType(Zn,"google.protobuf.Field.Cardinality",[{no:0,name:"CARDINALITY_UNKNOWN"},{no:1,name:"CARDINALITY_OPTIONAL"},{no:2,name:"CARDINALITY_REQUIRED"},{no:3,name:"CARDINALITY_REPEATED"}]);var Qn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.enumvalue=[],r.options=[],r.sourceContext=void 0,r.syntax=Xn.PROTO2,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Qn.runtime=ve,Qn.typeName="google.protobuf.Enum",Qn.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"enumvalue",kind:"message",T:$n,repeated:!0},{no:3,name:"options",kind:"message",T:Hn,repeated:!0},{no:4,name:"source_context",kind:"message",T:Cn},{no:5,name:"syntax",kind:"enum",T:ve.getEnumType(Xn)}]});var $n=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.number=0,r.options=[],ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);$n.runtime=ve,$n.typeName="google.protobuf.EnumValue",$n.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"number",kind:"scalar",T:5},{no:3,name:"options",kind:"message",T:Hn,repeated:!0}]});var Hn=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.value=void 0,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);Hn.runtime=ve,Hn.typeName="google.protobuf.Option",Hn.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:yn}]});var er=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.methods=[],r.options=[],r.version="",r.sourceContext=void 0,r.mixins=[],r.syntax=Xn.PROTO2,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);er.runtime=ve,er.typeName="google.protobuf.Api",er.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"methods",kind:"message",T:nr,repeated:!0},{no:3,name:"options",kind:"message",T:Hn,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"source_context",kind:"message",T:Cn},{no:6,name:"mixins",kind:"message",T:rr,repeated:!0},{no:7,name:"syntax",kind:"enum",T:ve.getEnumType(Xn)}]});var nr=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.requestTypeUrl="",r.requestStreaming=!1,r.responseTypeUrl="",r.responseStreaming=!1,r.options=[],r.syntax=Xn.PROTO2,ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);nr.runtime=ve,nr.typeName="google.protobuf.Method",nr.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"request_type_url",kind:"scalar",T:9},{no:3,name:"request_streaming",kind:"scalar",T:8},{no:4,name:"response_type_url",kind:"scalar",T:9},{no:5,name:"response_streaming",kind:"scalar",T:8},{no:6,name:"options",kind:"message",T:Hn,repeated:!0},{no:7,name:"syntax",kind:"enum",T:ve.getEnumType(Xn)}]});var rr=/*#__PURE__*/function(e){function r(n){var r;return(r=e.call(this)||this).name="",r.root="",ve.util.initPartial(n,t(r)),r}return n(r,e),r.fromBinary=function(e,n){return(new r).fromBinary(e,n)},r.fromJson=function(e,n){return(new r).fromJson(e,n)},r.fromJsonString=function(e,n){return(new r).fromJsonString(e,n)},r.equals=function(e,n){return ve.util.equals(r,e,n)},r}(h);rr.runtime=ve,rr.typeName="google.protobuf.Mixin",rr.fields=ve.util.newFieldList(function(){return[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"root",kind:"scalar",T:9}]});export{yn as Any,er as Api,O as BinaryReader,J as BinaryWriter,Pn as BoolValue,Ln as BytesValue,Vn as CodeGeneratorRequest,Mn as CodeGeneratorResponse,xn as CodeGeneratorResponse_Feature,Gn as CodeGeneratorResponse_File,Ee as DescriptorProto,Se as DescriptorProto_ExtensionRange,Ie as DescriptorProto_ReservedRange,qn as DescriptorRegistry,rn as DescriptorSet,In as DoubleValue,Tn as Duration,wn as Empty,Qn as Enum,Pe as EnumDescriptorProto,De as EnumDescriptorProto_EnumReservedRange,Ge as EnumOptions,$n as EnumValue,Le as EnumValueDescriptorProto,Xe as EnumValueOptions,Je as ExtensionRangeOptions,zn as Field,Fe as FieldDescriptorProto,_e as FieldDescriptorProto_Label,Oe as FieldDescriptorProto_Type,bn as FieldMask,xe as FieldOptions,Re as FieldOptions_CType,Ve as FieldOptions_JSType,Zn as Field_Cardinality,Kn as Field_Kind,ke as FileDescriptorProto,be as FileDescriptorSet,je as FileOptions,qe as FileOptions_OptimizeMode,Jn as FloatValue,He as GeneratedCodeInfo,nn as GeneratedCodeInfo_Annotation,Fn as Int32Value,On as Int64Value,Sn as ListValue,h as Message,Ye as MessageOptions,nr as Method,Ae as MethodDescriptorProto,Te as MethodIdempotency,he as MethodKind,Ke as MethodOptions,We as MethodOptions_IdempotencyLevel,rr as Mixin,Nn as NullValue,Be as OneofDescriptorProto,Me as OneofOptions,Hn as Option,g as ScalarType,Ue as ServiceDescriptorProto,Ce as ServiceOptions,Qe as SourceCodeInfo,$e as SourceCodeInfo_Location,Cn as SourceContext,Dn as StringValue,kn as Struct,Xn as Syntax,hn as Timestamp,Wn as Type,Ne as TypeRegistry,Bn as UInt32Value,_n as UInt64Value,Ze as UninterpretedOption,ze as UninterpretedOption_NamePart,En as Value,Rn as Version,S as WireType,ye as proto2,ve as proto3,Z as protoBase64,I as protoInt64};
|
|
2
|
-
//# sourceMappingURL=protobuf.esm.js.map
|