UNPKG

protobufjs

Version:

Protocol Buffers for JavaScript & TypeScript.

9 lines (8 loc) 24.5 kB
/*! * protobuf.js v8.6.6 (c) 2016, daniel wirtz * compiled sat, 04 jul 2026 01:09:57 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details */ !function(p){"use strict";var i,e,n;i={1:[function(t,n,r){function i(){r.util.t(),r.Writer.t(r.BufferWriter),r.Reader.t(r.BufferReader)}r.build="minimal",r.Writer=t(15),r.BufferWriter=t(16),r.Reader=t(2),r.BufferReader=t(3),r.util=t(12),r.rpc=t(5),r.roots=t(4),r.configure=i,i()},{12:12,15:15,16:16,2:2,3:3,4:4,5:5}],2:[function(t,n,r){n.exports=h;var i,e=t(12),u=e.LongBits,o=e.utf8;function s(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length,this.discardUnknown=h.discardUnknown}function f(){return e.Buffer?function(t){return(h.create=function(t){return e.Buffer.isBuffer(t)?new i(t):c(t)})(t)}:c}var c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function a(){var t=new u(0,0),n=0;if(!(4<this.len-this.pos)){for(;n<4;++n){if(this.pos>=this.len)throw s(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}throw s(this)}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4<this.len-this.pos){for(;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw s(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw s(this,8);return new u(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}h.create=f(),h.prototype.n=e.Array.prototype.subarray||e.Array.prototype.slice,h.prototype.raw=function(t,n){return Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this.n.call(this.buf,t,n)},h.prototype.uint32=function(){var t=this.buf,n=this.pos,r=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(15&t[n])<<28)>>>0,t[n++]<128)return this.pos=n,r;for(var i=0;i<5;++i){if(n>=this.len)throw this.pos=n,s(this);if(t[n++]<128)return this.pos=n,r}throw this.pos=n,Error("invalid varint encoding")},h.prototype.tag=function(){var t=this.buf,n=this.pos,r=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,r;if(r=(r|(15&t[n])<<28)>>>0,t[n]<128&&0==(112&t[n]))return this.pos=n+1,r;throw this.pos=n+1,Error("invalid tag encoding")},h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){for(var t,n=!1,r=0;r<10;++r){if(this.pos>=this.len)throw s(this);if(127&(t=this.buf[this.pos++])&&(n=!0),t<128)return n}throw Error("invalid varint encoding")},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return l(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|l(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw s(this,t);return this.pos=r,this.raw(n,r)},h.prototype.string=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw s(this,t);return this.pos=r,o.read(this.buf,n,r)},h.prototype.stringVerify=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw s(this,t);return this.pos=r,o.readStrict(this.buf,n,r)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw s(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},h.recursionLimit=e.recursionLimit,h.discardUnknown=!0,h.prototype.skipType=function(t,n,r){if(h.recursionLimit<(n=n===p?0:n))throw Error("max depth exceeded");if(0===r)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var i=this.tag(),e=i>>>3;if(!e)throw Error("illegal tag: field number 0");if(4===(t=7&i)){if(r!==p&&e!==r)throw Error("invalid end group tag");break}this.skipType(t,n+1,e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.t=function(t){i=t,h.create=f(),i.t();var n=e.Long?"toLong":"toNumber";e.merge(h.prototype,{int64:function(){return a.call(this)[n](!1)},uint64:function(){return a.call(this)[n](!0)},sint64:function(){return a.call(this).zzDecode()[n](!1)},fixed64:function(){return v.call(this)[n](!0)},sfixed64:function(){return v.call(this)[n](!1)}})}},{12:12}],3:[function(t,n,r){n.exports=u;var i=t(2),e=(u.prototype=Object.create(i.prototype,{constructor:{value:u,writable:!0,enumerable:!1,configurable:!0}}),t(12));function u(t){i.call(this,t)}u.t=function(){e.Buffer&&(u.prototype.n=e.Buffer.prototype.slice)},u.prototype.raw=function(t,n){return t===n?e.Buffer.alloc(0):this.n.call(this.buf,t,n)},u.prototype.string=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=r,this.buf.utf8Slice?this.buf.utf8Slice(n,r):this.buf.toString("utf-8",n,r)},u.t()},{12:12,2:2}],4:[function(t,n,r){n.exports=Object.create(null)},{}],5:[function(t,n,r){r.Service=t(6)},{6:6}],6:[function(t,n,r){n.exports=i;var s=t(12);function i(t,n,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");s.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!r}(i.prototype=Object.create(s.EventEmitter.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0}})).rpcCall=function t(r,n,i,e,u){if(!e)throw TypeError("request must be specified");var o=this;if(!u)return s.asPromise(t,o,r,n,i,e);if(!o.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),p;try{return o.rpcImpl(r,n[o.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(t,n){if(t)return o.emit("error",t,r),u(t);if(null===n)return o.end(!0),p;if(!(n instanceof i))try{n=i[o.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return o.emit("error",t,r),u(t)}return o.emit("data",n,r),u(null,n)})}catch(t){return o.emit("error",t,r),setTimeout(function(){u(t)},0),p}},i.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{12:12}],7:[function(t,n,r){n.exports=function(t,n){var r=Array(arguments.length-1),u=0,i=2,o=!0;for(;i<arguments.length;)r[u++]=arguments[i++];return new Promise(function(i,e){r[u]=function(t){if(o)if(o=!1,t)e(t);else{for(var n=Array(arguments.length-1),r=0;r<n.length;)n[r++]=arguments[r];i.apply(null,n)}};try{t.apply(n||null,r)}catch(t){o&&(o=!1,e(t))}})}},{}],8:[function(t,n,r){r.length=function(t){var n=t.length;if(!n)return 0;for(;0<n&&"="==(t[0|n-1]||"");)--n;return Math.floor(3*n/4)};for(var f=Array(64),h=Array(123),i=0;i<64;)h[f[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;h[45]=62,h[95]=63,r.encode=function(t,n,r){for(var i,e=null,u=[],o=0,s=0;n<r;){var h=t[n++];switch(s){case 0:u[o++]=f[h>>2],i=(3&h)<<4,s=1;break;case 1:u[o++]=f[i|h>>4],i=(15&h)<<2,s=2;break;case 2:u[o++]=f[i|h>>6],u[o++]=f[63&h],s=0}8191<o&&((e=e||[]).push(String.fromCharCode.apply(String,u)),o=0)}return s&&(u[o++]=f[i],u[o++]=61,1===s&&(u[o++]=61)),e?(o&&e.push(String.fromCharCode.apply(String,u.slice(0,o))),e.join("")):String.fromCharCode.apply(String,u.slice(0,o))};var c="invalid encoding",e=(r.decode=function(t,n,r){for(var i,e=r,u=0,o=0;o<t.length;){var s=t.charCodeAt(o++);if(61==s&&1<u)break;if((s=h[s])===p)throw Error(c);switch(u){case 0:i=s,u=1;break;case 1:n[r++]=i<<2|(48&s)>>4,i=s,u=2;break;case 2:n[r++]=(15&i)<<4|(60&s)>>2,i=s,u=3;break;case 3:n[r++]=(3&i)<<6|s,u=0}}if(1===u)throw Error(c);return r-e},/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/),u=/[-_]/,o=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return e.test(t)||u.test(t)&&o.test(t)}},{}],9:[function(t,n,r){function i(){this.r=Object.create(null)}(n.exports=i).prototype.on=function(t,n,r){return(this.r[t]||(this.r[t]=[])).push({fn:n,ctx:r||this}),this},i.prototype.off=function(t,n){if(t===p)this.r=Object.create(null);else if(n===p)this.r[t]=[];else{var r=this.r[t];if(!r)return this;for(var i=0;i<r.length;)r[i].fn===n?r.splice(i,1):++i}return this},i.prototype.emit=function(t){var n=this.r[t];if(n){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<n.length;)n[i].fn.apply(n[i++].ctx,r)}return this}},{}],10:[function(t,n,r){function i(t){function n(t,n,r,i){var e=n<0?1:0;t(0===(n=e?-n:n)?0<1/n?0:2147483648:isNaN(n)?2143289344:34028234663852886e22<n?(e<<31|2139095040)>>>0:n<11754943508222875e-54?(e<<31|Math.round(n/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(n)/Math.LN2))<<23|8388607&Math.round(n*Math.pow(2,-t)*8388608))>>>0,r,i)}function r(t,n,r){t=t(n,r),n=2*(t>>31)+1,r=t>>>23&255,t&=8388607;return 255==r?t?NaN:1/0*n:0==r?1401298464324817e-60*n*t:n*Math.pow(2,r-150)*(8388608+t)}function i(t,n,r){s[0]=t,n[r]=h[0],n[r+1]=h[1],n[r+2]=h[2],n[r+3]=h[3]}function e(t,n,r){s[0]=t,n[r]=h[3],n[r+1]=h[2],n[r+2]=h[1],n[r+3]=h[0]}function u(t,n){return h[0]=t[n],h[1]=t[n+1],h[2]=t[n+2],h[3]=t[n+3],s[0]}function o(t,n){return h[3]=t[n],h[2]=t[n+1],h[1]=t[n+2],h[0]=t[n+3],s[0]}var s,h,f,c,a;function l(t,n,r,i,e,u){var o,s=i<0?1:0;0===(i=s?-i:i)?(t(0,e,u+n),t(0<1/i?0:2147483648,e,u+r)):isNaN(i)?(t(0,e,u+n),t(2146959360,e,u+r)):17976931348623157e292<i?(t(0,e,u+n),t((s<<31|2146435072)>>>0,e,u+r)):i<22250738585072014e-324?(t((o=i/5e-324)>>>0,e,u+n),t((s<<31|o/4294967296)>>>0,e,u+r)):(t(4503599627370496*(o=i*Math.pow(2,-(i=1024===(i=Math.floor(Math.log(i)/Math.LN2))?1023:i)))>>>0,e,u+n),t((s<<31|i+1023<<20|1048576*o&1048575)>>>0,e,u+r))}function v(t,n,r,i,e){n=t(i,e+n),t=t(i,e+r),i=2*(t>>31)+1,e=t>>>20&2047,r=4294967296*(1048575&t)+n;return 2047==e?r?NaN:1/0*i:0==e?5e-324*i*r:i*Math.pow(2,e-1075)*(r+4503599627370496)}function b(t,n,r){f[0]=t,n[r]=c[0],n[r+1]=c[1],n[r+2]=c[2],n[r+3]=c[3],n[r+4]=c[4],n[r+5]=c[5],n[r+6]=c[6],n[r+7]=c[7]}function w(t,n,r){f[0]=t,n[r]=c[7],n[r+1]=c[6],n[r+2]=c[5],n[r+3]=c[4],n[r+4]=c[3],n[r+5]=c[2],n[r+6]=c[1],n[r+7]=c[0]}function g(t,n){return c[0]=t[n],c[1]=t[n+1],c[2]=t[n+2],c[3]=t[n+3],c[4]=t[n+4],c[5]=t[n+5],c[6]=t[n+6],c[7]=t[n+7],f[0]}function d(t,n){return c[7]=t[n],c[6]=t[n+1],c[5]=t[n+2],c[4]=t[n+3],c[3]=t[n+4],c[2]=t[n+5],c[1]=t[n+6],c[0]=t[n+7],f[0]}return"undefined"!=typeof Float32Array?(s=new Float32Array([-0]),h=new Uint8Array(s.buffer),a=128===h[3],t.writeFloatLE=a?i:e,t.writeFloatBE=a?e:i,t.readFloatLE=a?u:o,t.readFloatBE=a?o:u):(t.writeFloatLE=n.bind(null,y),t.writeFloatBE=n.bind(null,p),t.readFloatLE=r.bind(null,A),t.readFloatBE=r.bind(null,m)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?b:w,t.writeDoubleBE=a?w:b,t.readDoubleLE=a?g:d,t.readDoubleBE=a?d:g):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,p,4,0),t.readDoubleLE=v.bind(null,A,0,4),t.readDoubleBE=v.bind(null,m,4,0)),t}function y(t,n,r){n[r]=255&t,n[r+1]=t>>>8&255,n[r+2]=t>>>16&255,n[r+3]=t>>>24}function p(t,n,r){n[r]=t>>>24,n[r+1]=t>>>16&255,n[r+2]=t>>>8&255,n[r+3]=255&t}function A(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function m(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=i(i)},{}],11:[function(t,n,r){n.exports=e;var i=t(12);function e(t,n){this.lo=t>>>0,this.hi=n>>>0}var u=e.zero=new e(0,0),o=(u.toNumber=function(){return 0},u.zzEncode=u.zzDecode=function(){return this},u.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var n,r;return 0===t?u:(r=(t=(n=t<0)?-t:t)>>>0,t=(t-r)/4294967296>>>0,n&&(t=~t>>>0,r=~r>>>0,4294967295<++r&&(r=0,4294967295<++t&&(t=0))),new e(r,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(i.isString(t)){if(!i.Long)return e.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):u},e.prototype.toNumber=function(t){var n;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,n=~this.hi>>>0,-(t+4294967296*(n=t?n:n+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?u:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0==r?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}},{12:12}],12:[function(n,t,r){var o=r;function s(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function i(t){for(var n=(r="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,r=r&&arguments[arguments.length-1],i=1;i<n;++i){var e=arguments[i];if(e)for(var u=Object.keys(e),o=0;o<u.length;++o)s(u[o])||r&&Object.prototype.hasOwnProperty.call(t,u[o])&&t[u[o]]!==p||(t[u[o]]=e[u[o]])}return t}function e(t){function r(t,n){if(!(this instanceof r))return new r(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&i(this,n)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:p,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}o.asPromise=n(7),o.base64=n(8),o.EventEmitter=n(9),o.float=n(10),o.utf8=n(14),o.pool=n(13),o.LongBits=n(11),o.isUnsafeProperty=s,o.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),o.global=o.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||"undefined"!=typeof globalThis&&globalThis||this,o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},o.isString=function(t){return"string"==typeof t||t instanceof String},o.isObject=function(t){return t&&"object"==typeof t},o.isset=o.isSet=function(t,n){var r=t[n];return!(null==r||!Object.hasOwnProperty.call(t,n))&&("object"!=typeof r||0<(Array.isArray(r)?r:Object.keys(r)).length)},o.Buffer=function(){try{var t=o.global.Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),o.i=null,o.e=null,o.newBuffer=function(t){return"number"==typeof t?o.Buffer?o.e(t):new o.Array(t):o.Buffer?o.i(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},o.rawField=function(t,n,r){var i=[],e=t<<3|n;for(e>>>=0;127<e;)i.push(127&e|128),e>>>=7;i.push(e);for(var u=0;u<r.length;++u)i.push(r[u]);return o.newBuffer(i)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||function(){try{var t=n("long");return t&&t.isLong?t:null}catch(t){return null}}(),o.key2Re=/^(?:true|false|0|1)$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(t){return t?o.LongBits.from(t).toHash():o.LongBits.zeroHash},o.longFromHash=function(t,n){t=o.LongBits.fromHash(t);return o.Long?o.Long.fromBits(t.lo,t.hi,n):t.toNumber(!!n)},o.longFromKey=function(t,n){return o.key64Re.test(t)&&!o.key32Re.test(t)?o.longFromHash(t,n):t},o.boolFromKey=function(t){return"true"===t||"1"===t},o.merge=i,o.nestingLimit=32,o.recursionLimit=100,o.makeProp=function(t,n,r){Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:r===p||r,configurable:!0,writable:!0})},o.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},o.newError=e,o.ProtocolError=e("ProtocolError"),o.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;-1<n;--n)if(1===r[t[n]]&&this[t[n]]!==p&&null!==this[t[n]])return t[n]}},o.oneOfSetter=function(r){return function(t){for(var n=0;n<r.length;++n)r[n]!==t&&delete this[r[n]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o.t=function(){var r=o.Buffer;r?(o.i=r.from!==Uint8Array.from&&r.from||function(t,n){return new r(t,n)},o.e=r.allocUnsafe||function(t){return new r(t)}):o.i=o.e=null}},{10:10,11:11,13:13,14:14,7:7,8:8,9:9,long:"long"}],13:[function(t,n,r){n.exports=function(n,r,t){var i=t||8192,e=i>>>1,u=null,o=i;return function(t){if(t<1||e<t)return n(t);i<o+t&&(u=n(i),o=0);t=r.call(u,o,o+=t);return 7&o&&(o=1+(7|o)),t}}},{}],14:[function(t,n,r){var i;try{i=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(t){i=new TextDecoder("utf-8",{ignoreBOM:!0})}function v(t,n,r,i){for(var e=n;e<r;){var u,o=t[e++];o<=127?i+=String.fromCharCode(o):192<=o&&o<224?i+=128<=(u=(31&o)<<6|63&t[e++])?String.fromCharCode(u):"�":224<=o&&o<240?i+=2048<=(u=(15&o)<<12|(63&t[e++])<<6|63&t[e++])?String.fromCharCode(u):"�":240<=o&&((o=(7&o)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])<65536||1114111<o?i+="�":i=i+String.fromCharCode(55296+((o-=65536)>>10))+String.fromCharCode(56320+(1023&o)))}return i}function b(t,n,r){t=0===n&&r===t.length?t:t.subarray?t.subarray(n,r):t.slice(n,r);return Array.isArray(t)&&(t=Uint8Array.from(t)),i.decode(t)}r.length=function(t){for(var n,r=0,i=0;i<t.length;++i)(n=t.charCodeAt(i))<128?r+=1:n<2048?r+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(i+1))?(++i,r+=4):r+=3;return r},r.read=function(t,n,r){if(r-n<1)return"";for(var i,e,u,o,s,h,f,c,a="",l=n;l+7<r;l+=8){if(128&((i=t[l])|(e=t[l+1])|(u=t[l+2])|(o=t[l+3])|(s=t[l+4])|(h=t[l+5])|(f=t[l+6])|(c=t[l+7])))return v(t,l,r,a);a+=String.fromCharCode(i,e,u,o,s,h,f,c)}for(;l<r;++l){if(128&(i=t[l]))return v(t,l,r,a);a+=String.fromCharCode(i)}return a},r.readStrict=function(t,n,r){if(r-n<1)return"";for(var i,e,u,o,s,h,f,c,a="",l=n;l+7<r;l+=8){if(128&((i=t[l])|(e=t[l+1])|(u=t[l+2])|(o=t[l+3])|(s=t[l+4])|(h=t[l+5])|(f=t[l+6])|(c=t[l+7])))return a+b(t,l,r);a+=String.fromCharCode(i,e,u,o,s,h,f,c)}for(;l<r;++l){if(128&(i=t[l]))return a+b(t,l,r);a+=String.fromCharCode(i)}return a},r.write=function(t,n,r){for(var i,e,u=r,o=0;o<t.length;++o)(i=t.charCodeAt(o))<128?n[r++]=i:(i<2048?n[r++]=i>>6|192:(55296==(64512&i)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,n[r++]=(i=65536+((1023&i)<<10)+(1023&e))>>18|240,n[r++]=i>>12&63|128):n[r++]=i>>12|224,n[r++]=i>>6&63|128),n[r++]=63&i|128);return r-u}},{}],15:[function(t,n,r){n.exports=a;var i,e=t(12),u=e.LongBits,o=e.base64,s=e.utf8;function h(t,n,r){this.fn=t,this.len=n,this.next=p,this.val=r}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return e.Buffer?function(){return(a.create=function(){return new i})()}:function(){return new a}}function v(t,n,r){n[r]=255&t}function b(t,n,r){for(var i=0;i<t.length;)n[r++]=t.charCodeAt(i++)}function w(t,n){this.len=t,this.next=p,this.val=n}function g(t,n,r){for(var i=t.lo,e=t.hi;e;)n[r++]=127&i|128,i=(i>>>7|e<<25)>>>0,e>>>=7;for(;127<i;)n[r++]=127&i|128,i>>>=7;n[r++]=i}function d(t,n,r){n[r]=255&t,n[r+1]=t>>>8&255,n[r+2]=t>>>16&255,n[r+3]=t>>>24}a.create=l(),a.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(a.alloc=e.pool(a.alloc,e.Array.prototype.subarray)),a.prototype.u=function(t,n,r){return this.tail=this.tail.next=new h(t,n,r),this.len+=n,this},(w.prototype=Object.create(h.prototype)).fn=function(t,n,r){for(;127<t;)n[r++]=127&t|128,t>>>=7;n[r]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new w((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return(t|=0)<0?this.u(g,10,u.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=u.from(t);return this.u(g,t.length(),t)},a.prototype.sint64=function(t){t=u.from(t).zzEncode();return this.u(g,t.length(),t)},a.prototype.bool=function(t){return this.u(v,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.u(d,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=u.from(t);return this.u(d,4,t.lo).u(d,4,t.hi)},a.prototype.float=function(t){return this.u(e.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.u(e.float.writeDoubleLE,8,t)};var y=e.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};a.prototype.bytes=function(t){var n,r=t.length>>>0;return r?(e.isString(t)&&(n=a.alloc(r=o.length(t)),o.decode(t,n,0),t=n),this.uint32(r).u(y,r,t)):this.u(v,1,0)},a.prototype.raw=function(t){var n=t.length>>>0;return n?this.u(y,n,t):this},a.prototype.string=function(t){var n=s.length(t);return n?this.uint32(n).u(n===t.length?b:s.write,n,t):this.u(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=n,this.len+=r),this},a.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},a.prototype.finishInto=function(t,n){for(var r=this.head.next,i=n=n===p?0:n;r;)r.fn(r.val,t,i),i+=r.len,r=r.next;return t},a.t=function(t){i=t,a.create=l(),i.t()}},{12:12}],16:[function(t,n,r){n.exports=u;var i=t(15),e=(u.prototype=Object.create(i.prototype,{constructor:{value:u,writable:!0,enumerable:!1,configurable:!0}}),t(12));function u(){i.call(this)}function o(t,n,r){for(var i=0;i<t.length;)n[r++]=t.charCodeAt(i++)}function s(t,n,r){t.length<40?e.utf8.write(t,n,r):n.utf8Write?n.utf8Write(t,r):n.write(t,r)}u.t=function(){u.alloc=e.e,u.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,n,r){n.set(t,r)}:function(t,n,r){if(t.copy)t.copy(n,r,0,t.length);else for(var i=0;i<t.length;)n[r++]=t[i++]}},u.prototype.bytes=function(t){var n=(t=e.isString(t)?e.i(t,"base64"):t).length>>>0;return this.uint32(n),n&&this.u(u.writeBytesBuffer,n,t),this},u.prototype.raw=function(t){var n=t.length>>>0;return n?this.u(u.writeBytesBuffer,n,t):this},u.prototype.string=function(t){var n=e.Buffer.byteLength(t);return this.uint32(n),n&&this.u(n===t.length&&n<40?o:s,n,t),this},u.t()},{12:12,15:15}]},e={},(n=function t(n){var r=e[n];return r||i[n][0].call(r=e[n]={exports:{}},t,r,r.exports),r.exports}([1][0])).util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}(); //# sourceMappingURL=protobuf.min.js.map