dd-trace 5.123.0 → 6.11.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.
Files changed (55) hide show
  1. package/LICENSE-3rdparty.csv +0 -5
  2. package/index.d.ts +25 -240
  3. package/package.json +18 -19
  4. package/packages/datadog-instrumentations/src/cucumber.js +4 -4
  5. package/packages/datadog-instrumentations/src/mocha/utils.js +2 -5
  6. package/packages/datadog-instrumentations/src/playwright-reporter.js +1 -149
  7. package/packages/datadog-instrumentations/src/playwright.js +33 -33
  8. package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +8 -6
  9. package/packages/datadog-plugin-playwright/src/index.js +0 -4
  10. package/packages/dd-trace/src/appsec/reporter.js +0 -2
  11. package/packages/dd-trace/src/appsec/telemetry/index.js +0 -13
  12. package/packages/dd-trace/src/appsec/telemetry/rasp.js +0 -16
  13. package/packages/dd-trace/src/appsec/telemetry/waf.js +0 -24
  14. package/packages/dd-trace/src/carrier.js +48 -107
  15. package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +5 -5
  16. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +0 -2
  17. package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +3 -5
  18. package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -4
  19. package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +4 -6
  20. package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +3 -5
  21. package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +2 -4
  22. package/packages/dd-trace/src/ci-visibility/requests/upload-coverage-report.js +2 -4
  23. package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +2 -4
  24. package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +5 -5
  25. package/packages/dd-trace/src/debugger/constants.js +0 -1
  26. package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
  27. package/packages/dd-trace/src/debugger/devtools_client/index.js +10 -3
  28. package/packages/dd-trace/src/debugger/index.js +2 -4
  29. package/packages/dd-trace/src/exporters/common/request.js +2 -5
  30. package/packages/dd-trace/src/llmobs/experiments/client.js +2 -6
  31. package/packages/dd-trace/src/llmobs/experiments/dataset.js +11 -249
  32. package/packages/dd-trace/src/llmobs/experiments/experiment.js +10 -23
  33. package/packages/dd-trace/src/llmobs/experiments/index.js +6 -18
  34. package/packages/dd-trace/src/llmobs/experiments/noop.js +4 -64
  35. package/packages/dd-trace/src/llmobs/experiments/util.js +4 -60
  36. package/packages/dd-trace/src/openfeature/constants/constants.js +18 -0
  37. package/packages/dd-trace/src/openfeature/index.js +4 -7
  38. package/packages/dd-trace/src/openfeature/writers/base.js +11 -153
  39. package/packages/dd-trace/src/openfeature/writers/exposures.js +14 -62
  40. package/packages/dd-trace/src/openfeature/writers/util.js +15 -97
  41. package/packages/dd-trace/src/opentracing/propagation/text_map.js +13 -22
  42. package/packages/dd-trace/src/telemetry/metrics.js +8 -62
  43. package/packages/dd-trace/src/telemetry/send-data.js +0 -1
  44. package/vendor/dist/@datadog/sketches-js/index.js +1 -1
  45. package/vendor/dist/protobufjs/index.js +1 -1
  46. package/vendor/dist/protobufjs/minimal/index.js +1 -1
  47. package/packages/dd-trace/src/debugger/inspect-segment.js +0 -154
  48. package/packages/dd-trace/src/evp_proxy/constants.js +0 -8
  49. package/packages/dd-trace/src/evp_proxy/direct.js +0 -64
  50. package/packages/dd-trace/src/evp_proxy/discovery.js +0 -133
  51. package/packages/dd-trace/src/evp_proxy/path.js +0 -22
  52. package/vendor/dist/https-proxy-agent/LICENSE +0 -22
  53. package/vendor/dist/https-proxy-agent/index.js +0 -4
  54. package/vendor/dist/proxy-from-env/LICENSE +0 -20
  55. package/vendor/dist/proxy-from-env/index.js +0 -1
@@ -1 +1 @@
1
- (()=>{var t={"./long/umd/index.js"(t,r){!function(i,e){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return e(t),preferDefault(t)}):(e(r),t.exports=preferDefault(r))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(t,r,i){this.low=0|t,this.high=0|r,this.unsigned=!!i}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var r=Math.clz32(t&-t);return t?31-r:r}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var i={},e={};function fromInt(t,r){var o,s,n;if(r)return(t>>>=0,(n=0<=t&&t<256)&&(s=e[t]))?s:(o=fromBits(t,0,!0),n&&(e[t]=o),o);return(t|=0,(n=-128<=t&&t<128)&&(s=i[t]))?s:(o=fromBits(t,t<0?-1:0,!1),n&&(i[t]=o),o)}function fromNumber(t,r){if(isNaN(t))return r?a:f;if(r){if(t<0)return a;if(t>=n)return d}else{if(t<=-u)return v;if(t+1>=u)return g}return t<0?fromNumber(-t,r).neg():fromBits(t%s|0,t/s|0,r)}function fromBits(t,r,i){return new Long(t,r,i)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var o=Math.pow;function fromString(t,r,i){if(0===t.length)throw Error("empty string");if("number"==typeof r?(i=r,r=!1):r=!!r,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return r?a:f;if((i=i||10)<2||36<i)throw RangeError("radix");if((e=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===e)return fromString(t.substring(1),r,i).neg();for(var e,s=fromNumber(o(i,8)),n=f,u=0;u<t.length;u+=8){var h=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+h),i);if(h<8){var p=fromNumber(o(i,h));n=n.mul(p).add(fromNumber(l))}else n=(n=n.mul(s)).add(fromNumber(l))}return n.unsigned=r,n}function fromValue(t,r){return"number"==typeof t?fromNumber(t,r):"string"==typeof t?fromString(t,r):fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var s=0x100000000,n=0xffffffffffffffff,u=0x8000000000000000,h=fromInt(0x1000000),f=fromInt(0);Long.ZERO=f;var a=fromInt(0,!0);Long.UZERO=a;var l=fromInt(1);Long.ONE=l;var p=fromInt(1,!0);Long.UONE=p;var c=fromInt(-1);Long.NEG_ONE=c;var g=fromBits(-1,0x7fffffff,!1);Long.MAX_VALUE=g;var d=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=d;var v=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=v;var b=Long.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*s+(this.low>>>0):this.high*s+(this.low>>>0)},b.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(v))return"-"+this.neg().toString(t);else{var r=fromNumber(t),i=this.div(r),e=i.mul(r).sub(this);return i.toString(t)+e.toInt().toString(t)}for(var s=fromNumber(o(t,6),this.unsigned),n=this,u="";;){var h=n.div(s),f=(n.sub(h.mul(s)).toInt()>>>0).toString(t);if((n=h).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return 0!=this.high?r+33:r+1},b.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},b.isZero=function(){return 0===this.high&&0===this.low},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(1&this.low)==1},b.isEven=function(){return(1&this.low)==0},b.equals=function(t){return isLong(t)||(t=fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},b.eq=b.equals,b.notEquals=function(t){return!this.eq(t)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(t){return 0>this.comp(t)},b.lt=b.lessThan,b.lessThanOrEqual=function(t){return 0>=this.comp(t)},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(t){return this.comp(t)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(t){return this.comp(t)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),i=t.isNegative();return r&&!i?-1:!r&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(l)},b.neg=b.negate,b.add=function(t){isLong(t)||(t=fromValue(t));var r,i,e=this.high>>>16,o=65535&this.high,s=this.low>>>16,n=65535&this.low,u=t.high>>>16,h=65535&t.high,f=t.low>>>16,a=65535&t.low,l=0,p=0;return r=0+((i=0+(n+a))>>>16),i&=65535,r+=s+f,p+=r>>>16,r&=65535,p+=o+h,l+=p>>>16,p&=65535,l+=e+u,fromBits(r<<16|i,(l&=65535)<<16|p,this.unsigned)},b.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},b.sub=b.subtract,b.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),r)return fromBits(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return this.unsigned?a:f;if(this.eq(v))return t.isOdd()?v:f;if(t.eq(v))return this.isOdd()?v:f;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(h)&&t.lt(h))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var i,e,o=this.high>>>16,s=65535&this.high,n=this.low>>>16,u=65535&this.low,l=t.high>>>16,p=65535&t.high,c=t.low>>>16,g=65535&t.low,d=0,b=0;return i=0+((e=0+u*g)>>>16),e&=65535,i+=n*g,b+=i>>>16,i&=65535,i+=u*c,b+=i>>>16,i&=65535,b+=s*g,d+=b>>>16,b&=65535,b+=n*c,d+=b>>>16,b&=65535,b+=u*p,d+=b>>>16,b&=65535,d+=o*g+s*c+n*p+u*l,fromBits(i<<16|e,(d&=65535)<<16|b,this.unsigned)},b.mul=b.multiply,b.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(r){var i,e,s;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?a:f;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return a;if(t.gt(this.shru(1)))return p;s=a}else{if(this.eq(v))if(t.eq(l)||t.eq(c))return v;else return t.eq(v)?l:(i=this.shr(1).div(t).shl(1)).eq(f)?t.isNegative()?l:c:(e=this.sub(t.mul(i)),s=i.add(e.div(t)));if(t.eq(v))return this.unsigned?a:f;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=f}for(e=this;e.gte(t);){for(var n=Math.ceil(Math.log(i=Math.max(1,Math.floor(e.toNumber()/t.toNumber())))/Math.LN2),u=n<=48?1:o(2,n-48),h=fromNumber(i),g=h.mul(t);g.isNegative()||g.gt(e);)i-=u,g=(h=fromNumber(i,this.unsigned)).mul(t);h.isZero()&&(h=l),s=s.add(h),e=e.sub(g)}return s},b.div=b.divide,b.modulo=function(t){return(isLong(t)||(t=fromValue(t)),r)?fromBits((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},b.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},b.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},b.shiftLeft=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):fromBits(0,this.low<<t-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>t-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,fromBits(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,fromBits(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},b.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},b.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},Long.fromBytes=function(t,r,i){return i?Long.fromBytesLE(t,r):Long.fromBytesBE(t,r)},Long.fromBytesLE=function(t,r){return new Long(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},Long.fromBytesBE=function(t,r){return new Long(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,r){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),r)},Long.fromValue=function(t,r){return"bigint"==typeof t?Long.fromBigInt(t,r):fromValue(t,r)},b.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=Long})},"./protobufjs/minimal.js"(t,r,i){"use strict";t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,i){"use strict";function configure(){r.util.LongBits._configure(r.util.Long),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=i("./protobufjs/src/writer.js"),r.BufferWriter=i("./protobufjs/src/writer_buffer.js"),r.Reader=i("./protobufjs/src/reader.js"),r.BufferReader=i("./protobufjs/src/reader_buffer.js"),r.util=i("./protobufjs/src/util/minimal.js"),r.rpc=i("./protobufjs/src/rpc.js"),r.roots=i("./protobufjs/src/roots.js"),r.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,i){"use strict";t.exports=Reader;var e,o=i("./protobufjs/src/util/minimal.js"),s=o.LongBits,n=o.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=Reader.discardUnknown}function create_array(t){if(Array.isArray(t)&&(t=new Uint8Array(t)),t instanceof Uint8Array)return new Reader(t);throw Error("illegal buffer")}var create=function(){return o.Buffer?function(t){return(Reader.create=function(t){return o.Buffer.isBuffer(t)?new e(t):create_array(t)})(t)}:create_array};function readLongVarint(){var t=new s(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>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;r=0}else{for(;r<4&&!(this.pos>=this.len);++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;throw indexOutOfRange(this)}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new s(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Reader.create=create(),Reader.prototype.raw=function(t,r){return this.buf.subarray(t,r)},Reader.prototype.uint32=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128)||(i=(i|(15&t[r])<<28)>>>0,t[r++]<128))return this.pos=r,i;for(var e=0;e<5;++e){if(r>=this.len)throw this.pos=r,indexOutOfRange(this);if(t[r++]<128)return this.pos=r,i}throw this.pos=r,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128))return this.pos=r,i;if(i=(i|(15&t[r])<<28)>>>0,t[r]<128&&(112&t[r])==0)return this.pos=r+1,i;throw this.pos=r+1,Error("invalid tag encoding")},Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){for(var t,r=!1,i=0;i<10;++i){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(r=!0),t<128)return r}throw Error("invalid varint encoding")},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.uint32s=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(r):(this.pos=o-1,t.push(this.uint32()),o=this.pos);return this.pos=o,t},Reader.prototype.int32s=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(r):(this.pos=o-1,t.push(this.int32()),o=this.pos);return this.pos=o,t},Reader.prototype.sint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint32());return t},Reader.prototype.bools=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(0!==r):(this.pos=o-1,t.push(this.bool()),o=this.pos);return this.pos=o,t},Reader.prototype.fixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,s=this.pos;t.length=o+e;var n=getLazyView(this,e,128);if(n)for(var u=0;u<e;++u,s+=4)t[o++]=n.getUint32(s,!0);else for(var h=this.buf,f=0;f<e;++f,s+=4)t[o++]=readFixed32_end(h,s+4);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.sfixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,s=this.pos;t.length=o+e;var n=getLazyView(this,e,128);if(n)for(var u=0;u<e;++u,s+=4)t[o++]=n.getInt32(s,!0);else for(var h=this.buf,f=0;f<e;++f,s+=4)t[o++]=0|readFixed32_end(h,s+4);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.floats=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,s=t.length,n=this.pos;t.length=s+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,n+=4)t[s++]=u.getFloat32(n,!0);else for(var f=this.buf,a=0;a<e;++a,n+=4)t[s++]=o.float.readFloatLE(f,n);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.doubles=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>3,s=t.length,n=this.pos;t.length=s+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,n+=8)t[s++]=u.getFloat64(n,!0);else for(var f=this.buf,a=0;a<e;++a,n+=8)t[s++]=o.float.readDoubleLE(f,n);if(this.pos=n,n!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.uint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint64());return t},Reader.prototype.int64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int64());return t},Reader.prototype.sint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint64());return t},Reader.prototype.fixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var s=0;s<o;++s)t[e++]=this.fixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.sfixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var s=0;s<o;++s)t[e++]=this.sfixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,this.raw(r,i)},Reader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,n.read(this.buf,r,i)},Reader.prototype.stringVerify=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,n.readStrict(this.buf,r,i)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.recursionLimit=o.recursionLimit,Reader.discardUnknown=!0,Reader.prototype.skipType=function(t,r,i){if(void 0===r&&(r=0),r>Reader.recursionLimit)throw Error("max depth exceeded");if(0===i)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 e=this.tag(),o=e>>>3;if(t=7&e,!o)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==i&&o!==i)throw Error("invalid end group tag");break}this.skipType(t,r+1,o)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){e=t,Reader.create=create(),e._configure();var r=o.Long?"toLong":"toNumber";o.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,i){"use strict";t.exports=BufferReader;var e=i("./protobufjs/src/reader.js");BufferReader.prototype=Object.create(e.prototype,{constructor:{value:BufferReader,writable:!0,enumerable:!1,configurable:!0}});var o=i("./protobufjs/src/util/minimal.js");function BufferReader(t){e.call(this,t)}BufferReader._configure=function(){o.Buffer&&(BufferReader.prototype._slice=o.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,r){return this._slice.call(this.buf,t,r)},BufferReader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(r,i):this.buf.toString("utf-8",r,i)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports=Object.create(null)},"./protobufjs/src/rpc.js"(t,r,i){"use strict";r.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,i){"use strict";t.exports=Service;var e=i("./protobufjs/src/util/minimal.js");function Service(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!i}Service.prototype=Object.create(e.EventEmitter.prototype,{constructor:{value:Service,writable:!0,enumerable:!1,configurable:!0}}),Service.prototype.rpcCall=function rpcCall(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var n=this;if(!s)return e.asPromise(rpcCall,n,t,r,i,o);if(!n.rpcImpl)return void setTimeout(function(){s(Error("already ended"))},0);try{return n.rpcImpl(t,r[n.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(r,e){if(r)return n.emit("error",r,t),s(r);if(null===e)return void n.end(!0);if(!(e instanceof i))try{e=i[n.responseDelimited?"decodeDelimited":"decode"](e)}catch(r){return n.emit("error",r,t),s(r)}return n.emit("data",e,t),s(null,e)})}catch(r){n.emit("error",r,t),setTimeout(function(){s(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/aspromise.js"(t){"use strict";t.exports=function asPromise(t,r){for(var i=Array(arguments.length-1),e=0,o=2,s=!0;o<arguments.length;)i[e++]=arguments[o++];return new Promise(function(o,n){i[e]=function(t){if(s)if(s=!1,t)n(t);else{for(var r=Array(arguments.length-1),i=0;i<r.length;)r[i++]=arguments[i];o.apply(null,r)}};try{t.apply(r||null,i)}catch(t){s&&(s=!1,n(t))}})}},"./protobufjs/src/util/base64.js"(t,r){"use strict";r.length=function(t){var r=t.length;if(!r)return 0;for(;r>0&&"="===t.charAt(r-1);)--r;return Math.floor(3*r/4)};for(var i=Array(64),e=Array(123),o=0;o<64;)e[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;e[45]=62,e[95]=63,r.encode=function(t,r,e){for(var o,s=null,n=[],u=0,h=0;r<e;){var f=t[r++];switch(h){case 0:n[u++]=i[f>>2],o=(3&f)<<4,h=1;break;case 1:n[u++]=i[o|f>>4],o=(15&f)<<2,h=2;break;case 2:n[u++]=i[o|f>>6],n[u++]=i[63&f],h=0}u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),u=0)}return(h&&(n[u++]=i[o],n[u++]=61,1===h&&(n[u++]=61)),s)?(u&&s.push(String.fromCharCode.apply(String,n.slice(0,u))),s.join("")):String.fromCharCode.apply(String,n.slice(0,u))};var s="invalid encoding";r.decode=function(t,r,i){for(var o,n=i,u=0,h=0;h<t.length;){var f=t.charCodeAt(h++);if(61===f&&u>1)break;if(void 0===(f=e[f]))throw Error(s);switch(u){case 0:o=f,u=1;break;case 1:r[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:r[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:r[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(s);return i-n};var n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,h=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return n.test(t)||u.test(t)&&h.test(t)}},"./protobufjs/src/util/eventemitter.js"(t){"use strict";function EventEmitter(){this._listeners=Object.create(null)}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:i||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners=Object.create(null);else if(void 0===r)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e<i.length;)i[e].fn===r?i.splice(e,1):++e}return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var i=[],e=1;e<arguments.length;)i.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,i)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),e=128===i[3];function writeFloat_f32_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]}function writeFloat_f32_rev(t,e,o){r[0]=t,e[o]=i[3],e[o+1]=i[2],e[o+2]=i[1],e[o+3]=i[0]}function readFloat_f32_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],r[0]}function readFloat_f32_rev(t,e){return i[3]=t[e],i[2]=t[e+1],i[1]=t[e+2],i[0]=t[e+3],r[0]}t.writeFloatLE=e?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=e?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=e?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=e?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,r,i,e){var o=+(r<0);if(o&&(r=-r),0===r)t(1/r>0?0:0x80000000,i,e);else if(isNaN(r))t(0x7fc00000,i,e);else if(r>34028234663852886e22)t((o<<31|0x7f800000)>>>0,i,e);else if(r<11754943508222875e-54)t((o<<31|Math.round(r/1401298464324817e-60))>>>0,i,e);else{var s=Math.floor(Math.log(r)/Math.LN2),n=8388607&Math.round(r*Math.pow(2,-s)*8388608);t((o<<31|s+127<<23|n)>>>0,i,e)}}function readFloat_ieee754(t,r,i){var e=t(r,i),o=(e>>31)*2+1,s=e>>>23&255,n=8388607&e;return 255===s?n?NaN:1/0*o:0===s?1401298464324817e-60*o*n:o*Math.pow(2,s-150)*(n+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}if("u">typeof Float64Array)!function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),e=128===i[7];function writeDouble_f64_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3],e[o+4]=i[4],e[o+5]=i[5],e[o+6]=i[6],e[o+7]=i[7]}function writeDouble_f64_rev(t,e,o){r[0]=t,e[o]=i[7],e[o+1]=i[6],e[o+2]=i[5],e[o+3]=i[4],e[o+4]=i[3],e[o+5]=i[2],e[o+6]=i[1],e[o+7]=i[0]}function readDouble_f64_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],i[4]=t[e+4],i[5]=t[e+5],i[6]=t[e+6],i[7]=t[e+7],r[0]}function readDouble_f64_rev(t,e){return i[7]=t[e],i[6]=t[e+1],i[5]=t[e+2],i[4]=t[e+3],i[3]=t[e+4],i[2]=t[e+5],i[1]=t[e+6],i[0]=t[e+7],r[0]}t.writeDoubleLE=e?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=e?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=e?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=e?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,r,i,e,o,s){var n,u=+(e<0);if(u&&(e=-e),0===e)t(0,o,s+r),t(1/e>0?0:0x80000000,o,s+i);else if(isNaN(e))t(0,o,s+r),t(0x7ff80000,o,s+i);else if(e>17976931348623157e292)t(0,o,s+r),t((u<<31|0x7ff00000)>>>0,o,s+i);else if(e<22250738585072014e-324)t((n=e/5e-324)>>>0,o,s+r),t((u<<31|n/0x100000000)>>>0,o,s+i);else{var h=Math.floor(Math.log(e)/Math.LN2);1024===h&&(h=1023),t(0x10000000000000*(n=e*Math.pow(2,-h))>>>0,o,s+r),t((u<<31|h+1023<<20|1048576*n&1048575)>>>0,o,s+i)}}function readDouble_ieee754(t,r,i,e,o){var s=t(e,o+r),n=t(e,o+i),u=(n>>31)*2+1,h=n>>>20&2047,f=0x100000000*(1048575&n)+s;return 2047===h?f?NaN:1/0*u:0===h?5e-324*u*f:u*Math.pow(2,h-1075)*(f+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}return t}function writeUintLE(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function writeUintBE(t,r,i){r[i]=t>>>24,r[i+1]=t>>>16&255,r[i+2]=t>>>8&255,r[i+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/longbits.js"(t){"use strict";function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}t.exports=LongBits;var r,i=LongBits.zero=new LongBits(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var e=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/0x100000000>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++o>0xffffffff&&(o=0))),new LongBits(e,o)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if("string"==typeof t||t instanceof String)if(!r)return LongBits.fromNumber(parseInt(t,10));else t=r.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):i},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,i=~this.hi>>>0;return r||(i=i+1>>>0),-(r+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return r?new r(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var o=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===e?i:new LongBits((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)},LongBits.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)},LongBits.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},LongBits.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},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10},LongBits._configure=function(t){r=t}},"./protobufjs/src/util/minimal.js"(t,r,i){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var r="boolean"==typeof arguments[arguments.length-1],i=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var e=1;e<i;++e){var o=arguments[e];if(o)for(var s=Object.keys(o),n=0;n<s.length;++n)isUnsafeProperty(s[n])||r&&Object.prototype.hasOwnProperty.call(t,s[n])&&void 0!==t[s[n]]||(t[s[n]]=o[s[n]])}return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}r.asPromise=i("./protobufjs/src/util/aspromise.js"),r.base64=i("./protobufjs/src/util/base64.js"),r.EventEmitter=i("./protobufjs/src/util/eventemitter.js"),r.float=i("./protobufjs/src/util/float.js"),r.utf8=i("./protobufjs/src/util/utf8.js"),r.pool=i("./protobufjs/src/util/pool.js"),r.LongBits=i("./protobufjs/src/util/longbits.js"),r.isUnsafeProperty=isUnsafeProperty,r.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||"u">typeof globalThis&&globalThis||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,r){var i=t[r];return!!(null!=i&&Object.hasOwnProperty.call(t,r))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write||r.isNode?t:null}catch(t){return null}}(),r.newBuffer=function(t){var i=r.Buffer;return"number"==typeof t?i?i.allocUnsafe(t):new Uint8Array(t):i?i.from(t):new Uint8Array(t)},r.rawField=function(t,i,e){var o=[],s=t<<3|i;for(s>>>=0;s>127;)o.push(127&s|128),s>>>=7;o.push(s);for(var n=0;n<e.length;++n)o.push(e[n]);return r.newBuffer(o)},r.Array=Uint8Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=i("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){var e=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(e.lo,e.hi,i):e.toNumber(!!i)},r.longFromKey=function(t,i){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,i):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=merge,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,r,i){Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:void 0===i||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=newError,r.ProtocolError=newError("ProtocolError"),r.oneOfGetter=function(t){for(var r={},i=0;i<t.length;++i)r[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===r[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(t){return function(r){for(var i=0;i<t.length;++i)t[i]!==r&&delete this[t[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,r,i){var e=i||8192,o=e>>>1,s=null,n=e;return function(i){if(i<1||i>o)return t(i);n+i>e&&(s=t(e),n=0);var u=r.call(s,n,n+=i);return 7&n&&(n=(7|n)+1),u}}},"./protobufjs/src/util/utf8.js"(t,r){"use strict";var i,e=new TextDecoder("utf-8",{ignoreBOM:!0});try{i=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(t){i=e}function utf8_read_decoder(t,r,i,e){var o=0===i&&e===r.length?r:r.subarray(i,e);return t.decode(o)}r.length=function(t){for(var r=0,i=0,e=0;e<t.length;++e)(i=t.charCodeAt(e))<128?r+=1:i<2048?r+=2:(64512&i)==55296&&(64512&t.charCodeAt(e+1))==56320?(++e,r+=4):r+=3;return r},r.read=function(t,r,i){if(i-r<1)return"";if(i-r>=64)return utf8_read_decoder(e,t,r,i);for(var o,s,n,u,h,f,a,l,p="",c=r;c+7<i;c+=8){if(o=t[c],s=t[c+1],n=t[c+2],u=t[c+3],h=t[c+4],f=t[c+5],(o|s|n|u|h|f|(a=t[c+6])|(l=t[c+7]))&128)return p+utf8_read_decoder(e,t,c,i);p+=String.fromCharCode(o,s,n,u,h,f,a,l)}for(;c<i;++c){if(128&(o=t[c]))return p+utf8_read_decoder(e,t,c,i);p+=String.fromCharCode(o)}return p},r.readStrict=function(t,r,e){if(e-r<1)return"";if(e-r>=64)return utf8_read_decoder(i,t,r,e);for(var o,s,n,u,h,f,a,l,p="",c=r;c+7<e;c+=8){if(o=t[c],s=t[c+1],n=t[c+2],u=t[c+3],h=t[c+4],f=t[c+5],(o|s|n|u|h|f|(a=t[c+6])|(l=t[c+7]))&128)return p+utf8_read_decoder(i,t,c,e);p+=String.fromCharCode(o,s,n,u,h,f,a,l)}for(;c<e;++c){if(128&(o=t[c]))return p+utf8_read_decoder(i,t,c,e);p+=String.fromCharCode(o)}return p},r.write=function(t,r,i){for(var e,o,s=i,n=0;n<t.length;++n)(e=t.charCodeAt(n))<128?r[i++]=e:(e<2048?r[i++]=e>>6|192:((64512&e)==55296&&(64512&(o=t.charCodeAt(n+1)))==56320?(e=65536+((1023&e)<<10)+(1023&o),++n,r[i++]=e>>18|240,r[i++]=e>>12&63|128):r[i++]=e>>12|224,r[i++]=e>>6&63|128),r[i++]=63&e|128);return i-s}},"./protobufjs/src/writer.js"(t,r,i){"use strict";t.exports=Writer;var e,o=i("./protobufjs/src/util/minimal.js"),s=o.LongBits,n=o.base64,u=o.utf8;function Writer(){this.pos=0,this.buf=this.constructor.alloc(Writer.initialBufferSize),this.view=null,this.states=null}Writer.initialBufferSize=128,Object.defineProperty(Writer.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var create=function(){return o.Buffer?function(){return(Writer.create=function(){return new e})()}:function(){return new Writer}};function sizeVarint32(t){return t<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5}function writeStringAscii(t,r,i){for(var e=0;e<t.length;)r[i++]=t.charCodeAt(e++)}function writeVarint32(t,r,i){for(;t>127;)r[i++]=127&t|128,t>>>=7;return r[i]=t,i+1}function writeVarint64(t,r,i){for(var e=t.lo,o=t.hi;o;)r[i++]=127&e|128,e=(e>>>7|o<<25)>>>0,o>>>=7;for(;e>127;)r[i++]=127&e|128,e>>>=7;return r[i]=e,i+1}function writeFixed32(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Writer.create=create(),Writer.alloc=function(t){return new Uint8Array(t)},Writer.alloc=o.pool(Writer.alloc,Uint8Array.prototype.subarray),Writer.prototype._reserve=function(t){var r=this.pos+t;if(r>this.buf.length){var i=this.buf.length<<1;i<r&&(i=r);var e=this.constructor.alloc(i);e.set(this.buf.subarray(0,this.pos),0),this.buf=e,this.view=null}},Writer.prototype.uint32=function(t){t>>>=0,this._reserve(5);var r=this.pos;return this.pos=writeVarint32(t,this.buf,r),this},Writer.prototype.int32=function(t){return(t|=0)<0?(this._reserve(10),writeVarint64(s.fromNumber(t),this.buf,this.pos),this.pos+=10,this):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=s.from(t);this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=s.from(t).zzEncode();this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.bool=function(t){return this._reserve(1),this.buf[this.pos++]=+!!t,this},Writer.prototype.fixed32=function(t){return this._reserve(4),writeFixed32(t>>>0,this.buf,this.pos),this.pos+=4,this},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=s.from(t);return this._reserve(8),writeFixed32(r.lo,this.buf,this.pos),writeFixed32(r.hi,this.buf,this.pos+4),this.pos+=8,this},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._reserve(4),o.float.writeFloatLE(t,this.buf,this.pos),this.pos+=4,this},Writer.prototype.double=function(t){return this._reserve(8),o.float.writeDoubleLE(t,this.buf,this.pos),this.pos+=8,this},Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(o.isString(t)){var i=Writer.alloc(r=n.length(t));n.decode(t,i,0),t=i}return this.uint32(r),this._reserve(r),this.buf.set(t,this.pos),this.pos+=r,this},Writer.prototype.raw=function(t){var r=t.length>>>0;return r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},Writer.prototype._delim=function(t,r){var i=sizeVarint32(r);return i>1&&this.buf.copyWithin(t+i,t+1,t+1+r),writeVarint32(r,this.buf,t),this.pos=t+i+r,this},Writer.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos;return this._delim(i,u.write(t,this.buf,i+1))}var e=u.length(t);return this.uint32(e),this._reserve(e),e===t.length?writeStringAscii(t,this.buf,this.pos):u.write(t,this.buf,this.pos),this.pos+=e,this},Writer.prototype.uint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint32(t[s]>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.int32s=function(t){var r=t.length;this._reserve(10*r+5);for(var i,e=this.buf,o=this.pos,n=o+1,u=0;u<r;++u)n=(i=0|t[u])<0?writeVarint64(s.fromNumber(i),e,n):writeVarint32(i,e,n);return this._delim(o,n-o-1)},Writer.prototype.sint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint32((t[s]<<1^t[s]>>31)>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.uint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint64(s.from(t[n]),i,o);return this._delim(e,o-e-1)},Writer.prototype.int64s=Writer.prototype.uint64s,Writer.prototype.sint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint64(s.from(t[n]).zzEncode(),i,o);return this._delim(e,o-e-1)},Writer.prototype.bools=function(t){var r=t.length;this.uint32(r),this._reserve(r);for(var i=this.buf,e=this.pos,o=0;o<r;++o)i[e++]=+!!t[o];return this.pos+=r,this},Writer.prototype.fixed32s=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,o=this.pos,s=getLazyView(this,r,128);if(s)for(e=0;e<r;++e)s.setUint32(o,t[e]>>>0,!0),o+=4;else{var n=this.buf;for(e=0;e<r;++e)writeFixed32(t[e]>>>0,n,o),o+=4}return this.pos+=i,this},Writer.prototype.sfixed32s=Writer.prototype.fixed32s,Writer.prototype.fixed64s=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,o,n=this.pos,u=getLazyView(this,r,128);if(u)for(e=0;e<r;++e)o=s.from(t[e]),u.setUint32(n,o.lo,!0),u.setUint32(n+4,o.hi,!0),n+=8;else{var h=this.buf;for(e=0;e<r;++e)writeFixed32((o=s.from(t[e])).lo,h,n),writeFixed32(o.hi,h,n+4),n+=8}return this.pos+=i,this},Writer.prototype.sfixed64s=Writer.prototype.fixed64s,Writer.prototype.floats=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,s=this.pos,n=getLazyView(this,r,16);if(n)for(e=0;e<r;++e)n.setFloat32(s,t[e],!0),s+=4;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeFloatLE(t[e],u,s),s+=4}return this.pos+=i,this},Writer.prototype.doubles=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,s=this.pos,n=getLazyView(this,r,16);if(n)for(e=0;e<r;++e)n.setFloat64(s,t[e],!0),s+=8;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeDoubleLE(t[e],u,s),s+=8}return this.pos+=i,this},Writer.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},Writer.prototype.reset=function(){var t=this.states;return t&&t.length?this.pos=t.pop():this.pos=0,this},Writer.prototype.ldelim=function(){var t,r,i=this.states;if(i&&i.length){var e=i.pop();(r=sizeVarint32(t=this.pos-e-1))>1?(this._reserve(r-1),this.buf.copyWithin(e+r,e+1,e+1+t),this.pos+=r-1,writeVarint32(t,this.buf,e)):this.buf[e]=t}else r=sizeVarint32(t=this.pos),this._reserve(r),this.buf.copyWithin(r,0,t),writeVarint32(t,this.buf,0),this.pos+=r;return this},Writer.prototype.finish=function(t){if(t)return this.buf.subarray(0,this.pos);var r=this.constructor.alloc(this.pos);return r.set(this.buf.subarray(0,this.pos),0),r},Writer.prototype.finishInto=function(t,r){return void 0===r&&(r=0),t.set(this.buf.subarray(0,this.pos),r),t},Writer._configure=function(t){e=t,Writer.create=create(),e._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,i){"use strict";t.exports=BufferWriter;var e,o=i("./protobufjs/src/writer.js");BufferWriter.prototype=Object.create(o.prototype,{constructor:{value:BufferWriter,writable:!0,enumerable:!1,configurable:!0}});var s=i("./protobufjs/src/util/minimal.js");function BufferWriter(){o.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=s.Buffer&&s.Buffer.allocUnsafe,e=s.Buffer&&s.Buffer.prototype.utf8Write?function(t,r,i){return r.utf8Write(t,i)}:function(t,r,i){return r.write(t,i)}},BufferWriter.prototype.bytes=function(t){s.isString(t)&&(t=s.Buffer.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},BufferWriter.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos,o=this.buf;return this._delim(i,r<40?s.utf8.write(t,o,i+1):e(t,o,i+1))}var n=s.Buffer.byteLength(t);return this.uint32(n),this._reserve(n),e(t,this.buf,this.pos),this.pos+=n,this},BufferWriter._configure()}},r={};function __webpack_require__(i){var e=r[i];if(void 0!==e)return e.exports;var o=r[i]={exports:{}};return t[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i=__webpack_require__("./protobufjs/minimal.js");module.exports=i})();
1
+ (()=>{var t={"./long/umd/index.js"(t,r){!function(i,e){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return e(t),preferDefault(t)}):(e(r),t.exports=preferDefault(r))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(t,r,i){this.low=0|t,this.high=0|r,this.unsigned=!!i}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var r=Math.clz32(t&-t);return t?31-r:r}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var i={},e={};function fromInt(t,r){var o,n,s;if(r)return(t>>>=0,(s=0<=t&&t<256)&&(n=e[t]))?n:(o=fromBits(t,0,!0),s&&(e[t]=o),o);return(t|=0,(s=-128<=t&&t<128)&&(n=i[t]))?n:(o=fromBits(t,t<0?-1:0,!1),s&&(i[t]=o),o)}function fromNumber(t,r){if(isNaN(t))return r?a:f;if(r){if(t<0)return a;if(t>=s)return d}else{if(t<=-u)return v;if(t+1>=u)return g}return t<0?fromNumber(-t,r).neg():fromBits(t%n|0,t/n|0,r)}function fromBits(t,r,i){return new Long(t,r,i)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var o=Math.pow;function fromString(t,r,i){if(0===t.length)throw Error("empty string");if("number"==typeof r?(i=r,r=!1):r=!!r,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return r?a:f;if((i=i||10)<2||36<i)throw RangeError("radix");if((e=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===e)return fromString(t.substring(1),r,i).neg();for(var e,n=fromNumber(o(i,8)),s=f,u=0;u<t.length;u+=8){var h=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+h),i);if(h<8){var c=fromNumber(o(i,h));s=s.mul(c).add(fromNumber(l))}else s=(s=s.mul(n)).add(fromNumber(l))}return s.unsigned=r,s}function fromValue(t,r){return"number"==typeof t?fromNumber(t,r):"string"==typeof t?fromString(t,r):fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var n=0x100000000,s=0xffffffffffffffff,u=0x8000000000000000,h=fromInt(0x1000000),f=fromInt(0);Long.ZERO=f;var a=fromInt(0,!0);Long.UZERO=a;var l=fromInt(1);Long.ONE=l;var c=fromInt(1,!0);Long.UONE=c;var p=fromInt(-1);Long.NEG_ONE=p;var g=fromBits(-1,0x7fffffff,!1);Long.MAX_VALUE=g;var d=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=d;var v=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=v;var b=Long.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*n+(this.low>>>0):this.high*n+(this.low>>>0)},b.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(v))return"-"+this.neg().toString(t);else{var r=fromNumber(t),i=this.div(r),e=i.mul(r).sub(this);return i.toString(t)+e.toInt().toString(t)}for(var n=fromNumber(o(t,6),this.unsigned),s=this,u="";;){var h=s.div(n),f=(s.sub(h.mul(n)).toInt()>>>0).toString(t);if((s=h).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return 0!=this.high?r+33:r+1},b.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},b.isZero=function(){return 0===this.high&&0===this.low},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(1&this.low)==1},b.isEven=function(){return(1&this.low)==0},b.equals=function(t){return isLong(t)||(t=fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},b.eq=b.equals,b.notEquals=function(t){return!this.eq(t)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(t){return 0>this.comp(t)},b.lt=b.lessThan,b.lessThanOrEqual=function(t){return 0>=this.comp(t)},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(t){return this.comp(t)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(t){return this.comp(t)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),i=t.isNegative();return r&&!i?-1:!r&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(l)},b.neg=b.negate,b.add=function(t){isLong(t)||(t=fromValue(t));var r,i,e=this.high>>>16,o=65535&this.high,n=this.low>>>16,s=65535&this.low,u=t.high>>>16,h=65535&t.high,f=t.low>>>16,a=65535&t.low,l=0,c=0;return r=0+((i=0+(s+a))>>>16),i&=65535,r+=n+f,c+=r>>>16,r&=65535,c+=o+h,l+=c>>>16,c&=65535,l+=e+u,fromBits(r<<16|i,(l&=65535)<<16|c,this.unsigned)},b.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},b.sub=b.subtract,b.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),r)return fromBits(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return this.unsigned?a:f;if(this.eq(v))return t.isOdd()?v:f;if(t.eq(v))return this.isOdd()?v:f;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(h)&&t.lt(h))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var i,e,o=this.high>>>16,n=65535&this.high,s=this.low>>>16,u=65535&this.low,l=t.high>>>16,c=65535&t.high,p=t.low>>>16,g=65535&t.low,d=0,b=0;return i=0+((e=0+u*g)>>>16),e&=65535,i+=s*g,b+=i>>>16,i&=65535,i+=u*p,b+=i>>>16,i&=65535,b+=n*g,d+=b>>>16,b&=65535,b+=s*p,d+=b>>>16,b&=65535,b+=u*c,d+=b>>>16,b&=65535,d+=o*g+n*p+s*c+u*l,fromBits(i<<16|e,(d&=65535)<<16|b,this.unsigned)},b.mul=b.multiply,b.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(r){var i,e,n;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?a:f;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return a;if(t.gt(this.shru(1)))return c;n=a}else{if(this.eq(v))if(t.eq(l)||t.eq(p))return v;else return t.eq(v)?l:(i=this.shr(1).div(t).shl(1)).eq(f)?t.isNegative()?l:p:(e=this.sub(t.mul(i)),n=i.add(e.div(t)));if(t.eq(v))return this.unsigned?a:f;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=f}for(e=this;e.gte(t);){for(var s=Math.ceil(Math.log(i=Math.max(1,Math.floor(e.toNumber()/t.toNumber())))/Math.LN2),u=s<=48?1:o(2,s-48),h=fromNumber(i),g=h.mul(t);g.isNegative()||g.gt(e);)i-=u,g=(h=fromNumber(i,this.unsigned)).mul(t);h.isZero()&&(h=l),n=n.add(h),e=e.sub(g)}return n},b.div=b.divide,b.modulo=function(t){return(isLong(t)||(t=fromValue(t)),r)?fromBits((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},b.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},b.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},b.shiftLeft=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):fromBits(0,this.low<<t-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>t-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,fromBits(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,fromBits(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},b.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},b.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},Long.fromBytes=function(t,r,i){return i?Long.fromBytesLE(t,r):Long.fromBytesBE(t,r)},Long.fromBytesLE=function(t,r){return new Long(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},Long.fromBytesBE=function(t,r){return new Long(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,r){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),r)},Long.fromValue=function(t,r){return"bigint"==typeof t?Long.fromBigInt(t,r):fromValue(t,r)},b.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=Long})},"./protobufjs/minimal.js"(t,r,i){"use strict";t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,i){"use strict";function configure(){r.util.LongBits._configure(r.util.Long),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=i("./protobufjs/src/writer.js"),r.BufferWriter=i("./protobufjs/src/writer_buffer.js"),r.Reader=i("./protobufjs/src/reader.js"),r.BufferReader=i("./protobufjs/src/reader_buffer.js"),r.util=i("./protobufjs/src/util/minimal.js"),r.rpc=i("./protobufjs/src/rpc.js"),r.roots=i("./protobufjs/src/roots.js"),r.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,i){"use strict";t.exports=Reader;var e,o=i("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=Reader.discardUnknown}function create_array(t){if(Array.isArray(t)&&(t=new Uint8Array(t)),t instanceof Uint8Array)return new Reader(t);throw Error("illegal buffer")}var create=function(){return o.Buffer?function(t){return(Reader.create=function(t){return o.Buffer.isBuffer(t)?new e(t):create_array(t)})(t)}:create_array};function readLongVarint(){var t=new n(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>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;r=0}else{for(;r<4&&!(this.pos>=this.len);++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;throw indexOutOfRange(this)}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new n(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Reader.create=create(),Reader.prototype.raw=function(t,r){return this.buf.subarray(t,r)},Reader.prototype.uint32=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128)||(i=(i|(15&t[r])<<28)>>>0,t[r++]<128))return this.pos=r,i;for(var e=0;e<5;++e){if(r>=this.len)throw this.pos=r,indexOutOfRange(this);if(t[r++]<128)return this.pos=r,i}throw this.pos=r,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128))return this.pos=r,i;if(i=(i|(15&t[r])<<28)>>>0,t[r]<128&&(112&t[r])==0)return this.pos=r+1,i;throw this.pos=r+1,Error("invalid tag encoding")},Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){for(var t,r=!1,i=0;i<10;++i){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(r=!0),t<128)return r}throw Error("invalid varint encoding")},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.uint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint32());return t},Reader.prototype.int32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int32());return t},Reader.prototype.sint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint32());return t},Reader.prototype.bools=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.bool());return t},Reader.prototype.fixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,n=this.pos;t.length=o+e;var s=getLazyView(this,e,128);if(s)for(var u=0;u<e;++u,n+=4)t[o++]=s.getUint32(n,!0);else for(var h=this.buf,f=0;f<e;++f,n+=4)t[o++]=readFixed32_end(h,n+4);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.sfixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,n=this.pos;t.length=o+e;var s=getLazyView(this,e,128);if(s)for(var u=0;u<e;++u,n+=4)t[o++]=s.getInt32(n,!0);else for(var h=this.buf,f=0;f<e;++f,n+=4)t[o++]=0|readFixed32_end(h,n+4);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.floats=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,n=t.length,s=this.pos;t.length=n+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,s+=4)t[n++]=u.getFloat32(s,!0);else for(var f=this.buf,a=0;a<e;++a,s+=4)t[n++]=o.float.readFloatLE(f,s);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.doubles=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>3,n=t.length,s=this.pos;t.length=n+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,s+=8)t[n++]=u.getFloat64(s,!0);else for(var f=this.buf,a=0;a<e;++a,s+=8)t[n++]=o.float.readDoubleLE(f,s);if(this.pos=s,s!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.uint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint64());return t},Reader.prototype.int64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int64());return t},Reader.prototype.sint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint64());return t},Reader.prototype.fixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var n=0;n<o;++n)t[e++]=this.fixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.sfixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var n=0;n<o;++n)t[e++]=this.sfixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,this.raw(r,i)},Reader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,s.read(this.buf,r,i)},Reader.prototype.stringVerify=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,s.readStrict(this.buf,r,i)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.recursionLimit=o.recursionLimit,Reader.discardUnknown=!0,Reader.prototype.skipType=function(t,r,i){if(void 0===r&&(r=0),r>Reader.recursionLimit)throw Error("max depth exceeded");if(0===i)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 e=this.tag(),o=e>>>3;if(t=7&e,!o)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==i&&o!==i)throw Error("invalid end group tag");break}this.skipType(t,r+1,o)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){e=t,Reader.create=create(),e._configure();var r=o.Long?"toLong":"toNumber";o.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,i){"use strict";t.exports=BufferReader;var e=i("./protobufjs/src/reader.js");BufferReader.prototype=Object.create(e.prototype,{constructor:{value:BufferReader,writable:!0,enumerable:!1,configurable:!0}});var o=i("./protobufjs/src/util/minimal.js");function BufferReader(t){e.call(this,t)}BufferReader._configure=function(){o.Buffer&&(BufferReader.prototype._slice=o.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,r){return this._slice.call(this.buf,t,r)},BufferReader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(r,i):this.buf.toString("utf-8",r,i)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports=Object.create(null)},"./protobufjs/src/rpc.js"(t,r,i){"use strict";r.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,i){"use strict";t.exports=Service;var e=i("./protobufjs/src/util/minimal.js");function Service(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!i}Service.prototype=Object.create(e.EventEmitter.prototype,{constructor:{value:Service,writable:!0,enumerable:!1,configurable:!0}}),Service.prototype.rpcCall=function rpcCall(t,r,i,o,n){if(!o)throw TypeError("request must be specified");var s=this;if(!n)return e.asPromise(rpcCall,s,t,r,i,o);if(!s.rpcImpl)return void setTimeout(function(){n(Error("already ended"))},0);try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(r,e){if(r)return s.emit("error",r,t),n(r);if(null===e)return void s.end(!0);if(!(e instanceof i))try{e=i[s.responseDelimited?"decodeDelimited":"decode"](e)}catch(r){return s.emit("error",r,t),n(r)}return s.emit("data",e,t),n(null,e)})}catch(r){s.emit("error",r,t),setTimeout(function(){n(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/aspromise.js"(t){"use strict";t.exports=function asPromise(t,r){for(var i=Array(arguments.length-1),e=0,o=2,n=!0;o<arguments.length;)i[e++]=arguments[o++];return new Promise(function(o,s){i[e]=function(t){if(n)if(n=!1,t)s(t);else{for(var r=Array(arguments.length-1),i=0;i<r.length;)r[i++]=arguments[i];o.apply(null,r)}};try{t.apply(r||null,i)}catch(t){n&&(n=!1,s(t))}})}},"./protobufjs/src/util/base64.js"(t,r){"use strict";r.length=function(t){var r=t.length;if(!r)return 0;for(;r>0&&"="===t.charAt(r-1);)--r;return Math.floor(3*r/4)};for(var i=Array(64),e=Array(123),o=0;o<64;)e[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;e[45]=62,e[95]=63,r.encode=function(t,r,e){for(var o,n=null,s=[],u=0,h=0;r<e;){var f=t[r++];switch(h){case 0:s[u++]=i[f>>2],o=(3&f)<<4,h=1;break;case 1:s[u++]=i[o|f>>4],o=(15&f)<<2,h=2;break;case 2:s[u++]=i[o|f>>6],s[u++]=i[63&f],h=0}u>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(h&&(s[u++]=i[o],s[u++]=61,1===h&&(s[u++]=61)),n)?(u&&n.push(String.fromCharCode.apply(String,s.slice(0,u))),n.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var n="invalid encoding";r.decode=function(t,r,i){for(var o,s=i,u=0,h=0;h<t.length;){var f=t.charCodeAt(h++);if(61===f&&u>1)break;if(void 0===(f=e[f]))throw Error(n);switch(u){case 0:o=f,u=1;break;case 1:r[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:r[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:r[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(n);return i-s};var s=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,h=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return s.test(t)||u.test(t)&&h.test(t)}},"./protobufjs/src/util/eventemitter.js"(t){"use strict";function EventEmitter(){this._listeners=Object.create(null)}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:i||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners=Object.create(null);else if(void 0===r)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e<i.length;)i[e].fn===r?i.splice(e,1):++e}return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var i=[],e=1;e<arguments.length;)i.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,i)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),e=128===i[3];function writeFloat_f32_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]}function writeFloat_f32_rev(t,e,o){r[0]=t,e[o]=i[3],e[o+1]=i[2],e[o+2]=i[1],e[o+3]=i[0]}function readFloat_f32_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],r[0]}function readFloat_f32_rev(t,e){return i[3]=t[e],i[2]=t[e+1],i[1]=t[e+2],i[0]=t[e+3],r[0]}t.writeFloatLE=e?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=e?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=e?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=e?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,r,i,e){var o=+(r<0);if(o&&(r=-r),0===r)t(1/r>0?0:0x80000000,i,e);else if(isNaN(r))t(0x7fc00000,i,e);else if(r>34028234663852886e22)t((o<<31|0x7f800000)>>>0,i,e);else if(r<11754943508222875e-54)t((o<<31|Math.round(r/1401298464324817e-60))>>>0,i,e);else{var n=Math.floor(Math.log(r)/Math.LN2),s=8388607&Math.round(r*Math.pow(2,-n)*8388608);t((o<<31|n+127<<23|s)>>>0,i,e)}}function readFloat_ieee754(t,r,i){var e=t(r,i),o=(e>>31)*2+1,n=e>>>23&255,s=8388607&e;return 255===n?s?NaN:1/0*o:0===n?1401298464324817e-60*o*s:o*Math.pow(2,n-150)*(s+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}if("u">typeof Float64Array)!function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),e=128===i[7];function writeDouble_f64_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3],e[o+4]=i[4],e[o+5]=i[5],e[o+6]=i[6],e[o+7]=i[7]}function writeDouble_f64_rev(t,e,o){r[0]=t,e[o]=i[7],e[o+1]=i[6],e[o+2]=i[5],e[o+3]=i[4],e[o+4]=i[3],e[o+5]=i[2],e[o+6]=i[1],e[o+7]=i[0]}function readDouble_f64_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],i[4]=t[e+4],i[5]=t[e+5],i[6]=t[e+6],i[7]=t[e+7],r[0]}function readDouble_f64_rev(t,e){return i[7]=t[e],i[6]=t[e+1],i[5]=t[e+2],i[4]=t[e+3],i[3]=t[e+4],i[2]=t[e+5],i[1]=t[e+6],i[0]=t[e+7],r[0]}t.writeDoubleLE=e?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=e?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=e?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=e?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,r,i,e,o,n){var s,u=+(e<0);if(u&&(e=-e),0===e)t(0,o,n+r),t(1/e>0?0:0x80000000,o,n+i);else if(isNaN(e))t(0,o,n+r),t(0x7ff80000,o,n+i);else if(e>17976931348623157e292)t(0,o,n+r),t((u<<31|0x7ff00000)>>>0,o,n+i);else if(e<22250738585072014e-324)t((s=e/5e-324)>>>0,o,n+r),t((u<<31|s/0x100000000)>>>0,o,n+i);else{var h=Math.floor(Math.log(e)/Math.LN2);1024===h&&(h=1023),t(0x10000000000000*(s=e*Math.pow(2,-h))>>>0,o,n+r),t((u<<31|h+1023<<20|1048576*s&1048575)>>>0,o,n+i)}}function readDouble_ieee754(t,r,i,e,o){var n=t(e,o+r),s=t(e,o+i),u=(s>>31)*2+1,h=s>>>20&2047,f=0x100000000*(1048575&s)+n;return 2047===h?f?NaN:1/0*u:0===h?5e-324*u*f:u*Math.pow(2,h-1075)*(f+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}return t}function writeUintLE(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function writeUintBE(t,r,i){r[i]=t>>>24,r[i+1]=t>>>16&255,r[i+2]=t>>>8&255,r[i+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/longbits.js"(t){"use strict";function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}t.exports=LongBits;var r,i=LongBits.zero=new LongBits(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var e=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/0x100000000>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++o>0xffffffff&&(o=0))),new LongBits(e,o)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if("string"==typeof t||t instanceof String)if(!r)return LongBits.fromNumber(parseInt(t,10));else t=r.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):i},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,i=~this.hi>>>0;return r||(i=i+1>>>0),-(r+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return r?new r(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var o=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===e?i:new LongBits((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)},LongBits.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)},LongBits.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},LongBits.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},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10},LongBits._configure=function(t){r=t}},"./protobufjs/src/util/minimal.js"(t,r,i){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var r="boolean"==typeof arguments[arguments.length-1],i=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var e=1;e<i;++e){var o=arguments[e];if(o)for(var n=Object.keys(o),s=0;s<n.length;++s)isUnsafeProperty(n[s])||r&&Object.prototype.hasOwnProperty.call(t,n[s])&&void 0!==t[n[s]]||(t[n[s]]=o[n[s]])}return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}r.asPromise=i("./protobufjs/src/util/aspromise.js"),r.base64=i("./protobufjs/src/util/base64.js"),r.EventEmitter=i("./protobufjs/src/util/eventemitter.js"),r.float=i("./protobufjs/src/util/float.js"),r.utf8=i("./protobufjs/src/util/utf8.js"),r.pool=i("./protobufjs/src/util/pool.js"),r.LongBits=i("./protobufjs/src/util/longbits.js"),r.isUnsafeProperty=isUnsafeProperty,r.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||"u">typeof globalThis&&globalThis||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,r){var i=t[r];return!!(null!=i&&Object.hasOwnProperty.call(t,r))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write||r.isNode?t:null}catch(t){return null}}(),r.newBuffer=function(t){var i=r.Buffer;return"number"==typeof t?i?i.allocUnsafe(t):new Uint8Array(t):i?i.from(t):new Uint8Array(t)},r.rawField=function(t,i,e){var o=[],n=t<<3|i;for(n>>>=0;n>127;)o.push(127&n|128),n>>>=7;o.push(n);for(var s=0;s<e.length;++s)o.push(e[s]);return r.newBuffer(o)},r.Array=Uint8Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=i("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){var e=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(e.lo,e.hi,i):e.toNumber(!!i)},r.longFromKey=function(t,i){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,i):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=merge,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,r,i){Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:void 0===i||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=newError,r.ProtocolError=newError("ProtocolError"),r.oneOfGetter=function(t){for(var r={},i=0;i<t.length;++i)r[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===r[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(t){return function(r){for(var i=0;i<t.length;++i)t[i]!==r&&delete this[t[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,r,i){var e=i||8192,o=e>>>1,n=null,s=e;return function(i){if(i<1||i>o)return t(i);s+i>e&&(n=t(e),s=0);var u=r.call(n,s,s+=i);return 7&s&&(s=(7|s)+1),u}}},"./protobufjs/src/util/utf8.js"(t,r){"use strict";var i,e=new TextDecoder("utf-8",{ignoreBOM:!0});try{i=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(t){i=e}function utf8_read_js(t,r,i,e){for(var o=r;o<i;){var n=t[o++];if(n<=127)e+=String.fromCharCode(n);else if(n>=192&&n<224){var s=(31&n)<<6|63&t[o++];e+=s>=128?String.fromCharCode(s):"�"}else if(n>=224&&n<240){var u=(15&n)<<12|(63&t[o++])<<6|63&t[o++];e+=u>=2048?String.fromCharCode(u):"�"}else if(n>=240){var h=(7&n)<<18|(63&t[o++])<<12|(63&t[o++])<<6|63&t[o++];h<65536||h>1114111?e+="�":(h-=65536,e+=String.fromCharCode(55296+(h>>10)),e+=String.fromCharCode(56320+(1023&h)))}}return e}function utf8_read_decoder(t,r,i,e){var o=0===i&&e===r.length?r:r.subarray(i,e);return t.decode(o)}r.length=function(t){for(var r=0,i=0,e=0;e<t.length;++e)(i=t.charCodeAt(e))<128?r+=1:i<2048?r+=2:(64512&i)==55296&&(64512&t.charCodeAt(e+1))==56320?(++e,r+=4):r+=3;return r},r.read=function(t,r,i){if(i-r<1)return"";if(i-r>=64)return utf8_read_decoder(e,t,r,i);for(var o,n,s,u,h,f,a,l,c="",p=r;p+7<i;p+=8){if(o=t[p],n=t[p+1],s=t[p+2],u=t[p+3],h=t[p+4],f=t[p+5],(o|n|s|u|h|f|(a=t[p+6])|(l=t[p+7]))&128)return utf8_read_js(t,p,i,c);c+=String.fromCharCode(o,n,s,u,h,f,a,l)}for(;p<i;++p){if(128&(o=t[p]))return utf8_read_js(t,p,i,c);c+=String.fromCharCode(o)}return c},r.readStrict=function(t,r,e){if(e-r<1)return"";if(e-r>=64)return utf8_read_decoder(i,t,r,e);for(var o,n,s,u,h,f,a,l,c="",p=r;p+7<e;p+=8){if(o=t[p],n=t[p+1],s=t[p+2],u=t[p+3],h=t[p+4],f=t[p+5],(o|n|s|u|h|f|(a=t[p+6])|(l=t[p+7]))&128)return c+utf8_read_decoder(i,t,p,e);c+=String.fromCharCode(o,n,s,u,h,f,a,l)}for(;p<e;++p){if(128&(o=t[p]))return c+utf8_read_decoder(i,t,p,e);c+=String.fromCharCode(o)}return c},r.write=function(t,r,i){for(var e,o,n=i,s=0;s<t.length;++s)(e=t.charCodeAt(s))<128?r[i++]=e:(e<2048?r[i++]=e>>6|192:((64512&e)==55296&&(64512&(o=t.charCodeAt(s+1)))==56320?(e=65536+((1023&e)<<10)+(1023&o),++s,r[i++]=e>>18|240,r[i++]=e>>12&63|128):r[i++]=e>>12|224,r[i++]=e>>6&63|128),r[i++]=63&e|128);return i-n}},"./protobufjs/src/writer.js"(t,r,i){"use strict";t.exports=Writer;var e,o=i("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.base64,u=o.utf8;function Writer(){this.pos=0,this.buf=this.constructor.alloc(64),this.view=null,this.states=null}Object.defineProperty(Writer.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var create=function(){return o.Buffer?function(){return(Writer.create=function(){return new e})()}:function(){return new Writer}};function sizeVarint32(t){return t<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5}function writeStringAscii(t,r,i){for(var e=0;e<t.length;)r[i++]=t.charCodeAt(e++)}function writeVarint32(t,r,i){for(;t>127;)r[i++]=127&t|128,t>>>=7;return r[i]=t,i+1}function writeVarint64(t,r,i){for(var e=t.lo,o=t.hi;o;)r[i++]=127&e|128,e=(e>>>7|o<<25)>>>0,o>>>=7;for(;e>127;)r[i++]=127&e|128,e>>>=7;return r[i]=e,i+1}function writeFixed32(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Writer.create=create(),Writer.alloc=function(t){return new Uint8Array(t)},Writer.alloc=o.pool(Writer.alloc,Uint8Array.prototype.subarray),Writer.prototype._reserve=function(t){var r=this.pos+t;if(r>this.buf.length){var i=this.buf.length<<1;i<r&&(i=r);var e=this.constructor.alloc(i);e.set(this.buf.subarray(0,this.pos),0),this.buf=e,this.view=null}},Writer.prototype.uint32=function(t){t>>>=0,this._reserve(5);var r=this.pos;return this.pos=writeVarint32(t,this.buf,r),this},Writer.prototype.int32=function(t){return(t|=0)<0?(this._reserve(10),writeVarint64(n.fromNumber(t),this.buf,this.pos),this.pos+=10,this):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=n.from(t);this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=n.from(t).zzEncode();this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.bool=function(t){return this._reserve(1),this.buf[this.pos++]=+!!t,this},Writer.prototype.fixed32=function(t){return this._reserve(4),writeFixed32(t>>>0,this.buf,this.pos),this.pos+=4,this},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=n.from(t);return this._reserve(8),writeFixed32(r.lo,this.buf,this.pos),writeFixed32(r.hi,this.buf,this.pos+4),this.pos+=8,this},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._reserve(4),o.float.writeFloatLE(t,this.buf,this.pos),this.pos+=4,this},Writer.prototype.double=function(t){return this._reserve(8),o.float.writeDoubleLE(t,this.buf,this.pos),this.pos+=8,this},Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(o.isString(t)){var i=Writer.alloc(r=s.length(t));s.decode(t,i,0),t=i}return this.uint32(r),this._reserve(r),this.buf.set(t,this.pos),this.pos+=r,this},Writer.prototype.raw=function(t){var r=t.length>>>0;return r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},Writer.prototype._delim=function(t,r){var i=sizeVarint32(r);return i>1&&this.buf.copyWithin(t+i,t+1,t+1+r),writeVarint32(r,this.buf,t),this.pos=t+i+r,this},Writer.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos;return this._delim(i,u.write(t,this.buf,i+1))}var e=u.length(t);return this.uint32(e),this._reserve(e),e===t.length?writeStringAscii(t,this.buf,this.pos):u.write(t,this.buf,this.pos),this.pos+=e,this},Writer.prototype.uint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint32(t[n]>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.int32s=function(t){var r=t.length;this._reserve(10*r+5);for(var i,e=this.buf,o=this.pos,s=o+1,u=0;u<r;++u)s=(i=0|t[u])<0?writeVarint64(n.fromNumber(i),e,s):writeVarint32(i,e,s);return this._delim(o,s-o-1)},Writer.prototype.sint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint32((t[n]<<1^t[n]>>31)>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.uint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint64(n.from(t[s]),i,o);return this._delim(e,o-e-1)},Writer.prototype.int64s=Writer.prototype.uint64s,Writer.prototype.sint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint64(n.from(t[s]).zzEncode(),i,o);return this._delim(e,o-e-1)},Writer.prototype.bools=function(t){var r=t.length;this.uint32(r),this._reserve(r);for(var i=this.buf,e=this.pos,o=0;o<r;++o)i[e++]=+!!t[o];return this.pos+=r,this},Writer.prototype.fixed32s=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,o=this.pos,n=getLazyView(this,r,128);if(n)for(e=0;e<r;++e)n.setUint32(o,t[e]>>>0,!0),o+=4;else{var s=this.buf;for(e=0;e<r;++e)writeFixed32(t[e]>>>0,s,o),o+=4}return this.pos+=i,this},Writer.prototype.sfixed32s=Writer.prototype.fixed32s,Writer.prototype.fixed64s=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,o,s=this.pos,u=getLazyView(this,r,128);if(u)for(e=0;e<r;++e)o=n.from(t[e]),u.setUint32(s,o.lo,!0),u.setUint32(s+4,o.hi,!0),s+=8;else{var h=this.buf;for(e=0;e<r;++e)writeFixed32((o=n.from(t[e])).lo,h,s),writeFixed32(o.hi,h,s+4),s+=8}return this.pos+=i,this},Writer.prototype.sfixed64s=Writer.prototype.fixed64s,Writer.prototype.floats=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,n=this.pos,s=getLazyView(this,r,16);if(s)for(e=0;e<r;++e)s.setFloat32(n,t[e],!0),n+=4;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeFloatLE(t[e],u,n),n+=4}return this.pos+=i,this},Writer.prototype.doubles=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,n=this.pos,s=getLazyView(this,r,16);if(s)for(e=0;e<r;++e)s.setFloat64(n,t[e],!0),n+=8;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeDoubleLE(t[e],u,n),n+=8}return this.pos+=i,this},Writer.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},Writer.prototype.reset=function(){var t=this.states;return t&&t.length?this.pos=t.pop():this.pos=0,this},Writer.prototype.ldelim=function(){var t,r,i=this.states;if(i&&i.length){var e=i.pop();(r=sizeVarint32(t=this.pos-e-1))>1?(this._reserve(r-1),this.buf.copyWithin(e+r,e+1,e+1+t),this.pos+=r-1,writeVarint32(t,this.buf,e)):this.buf[e]=t}else r=sizeVarint32(t=this.pos),this._reserve(r),this.buf.copyWithin(r,0,t),writeVarint32(t,this.buf,0),this.pos+=r;return this},Writer.prototype.finish=function(t){if(t)return this.buf.subarray(0,this.pos);var r=this.constructor.alloc(this.pos);return r.set(this.buf.subarray(0,this.pos),0),r},Writer.prototype.finishInto=function(t,r){return void 0===r&&(r=0),t.set(this.buf.subarray(0,this.pos),r),t},Writer._configure=function(t){e=t,Writer.create=create(),e._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,i){"use strict";t.exports=BufferWriter;var e,o=i("./protobufjs/src/writer.js");BufferWriter.prototype=Object.create(o.prototype,{constructor:{value:BufferWriter,writable:!0,enumerable:!1,configurable:!0}});var n=i("./protobufjs/src/util/minimal.js");function BufferWriter(){o.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=n.Buffer&&n.Buffer.allocUnsafe,e=n.Buffer&&n.Buffer.prototype.utf8Write?function(t,r,i){return r.utf8Write(t,i)}:function(t,r,i){return r.write(t,i)}},BufferWriter.prototype.bytes=function(t){n.isString(t)&&(t=n.Buffer.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},BufferWriter.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos,o=this.buf;return this._delim(i,r<40?n.utf8.write(t,o,i+1):e(t,o,i+1))}var s=n.Buffer.byteLength(t);return this.uint32(s),this._reserve(s),e(t,this.buf,this.pos),this.pos+=s,this},BufferWriter._configure()}},r={};function __webpack_require__(i){var e=r[i];if(void 0!==e)return e.exports;var o=r[i]={exports:{}};return t[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i=__webpack_require__("./protobufjs/minimal.js");module.exports=i})();
@@ -1,154 +0,0 @@
1
- 'use strict'
2
-
3
- const { inspect, types } = require('node:util')
4
-
5
- const { NODE_MAJOR } = require('../../../../version')
6
-
7
- /** @typedef {NonNullable<ReturnType<typeof globalThis.Object.getOwnPropertyDescriptor>>} PropertyDescriptor */
8
- /** @typedef {Map<unknown, unknown> | Set<unknown>} Collection */
9
-
10
- const mapEntries = Map.prototype.entries
11
- const mapSet = Map.prototype.set
12
- const mapSizeGetter = Object.getOwnPropertyDescriptor(Map.prototype, 'size').get
13
- const setAdd = Set.prototype.add
14
- const setSizeGetter = Object.getOwnPropertyDescriptor(Set.prototype, 'size').get
15
- const setValues = Set.prototype.values
16
- const mapIteratorNext = Object.getPrototypeOf(mapEntries.call(new Map())).next
17
- const setIteratorNext = Object.getPrototypeOf(setValues.call(new Set())).next
18
-
19
- const maxCollectionEntries = 3
20
- const maxProperties = 5
21
- const segmentInspectOptions = {
22
- depth: 0,
23
- customInspect: false,
24
- maxArrayLength: maxCollectionEntries,
25
- maxStringLength: 8 * 1024,
26
- breakLength: Infinity,
27
- }
28
-
29
- module.exports = inspectSegment
30
-
31
- /**
32
- * Inspect a dynamic-instrumentation template value without invoking user code.
33
- * Unlike collections, `util.inspect` has no option for limiting the number of object properties, so this function
34
- * truncates objects before inspecting them.
35
- *
36
- * @param {unknown} value
37
- * @returns {string}
38
- */
39
- function inspectSegment (value) {
40
- if (value === null || (typeof value !== 'object' && typeof value !== 'function')) {
41
- return inspect(value, segmentInspectOptions)
42
- }
43
- if (types.isProxy(value)) return '[Proxy]'
44
- if (types.isMap(value)) return inspectCollection(value, true)
45
- if (types.isSet(value)) return inspectCollection(value, false)
46
- if (
47
- Array.isArray(value) ||
48
- types.isTypedArray(value) ||
49
- types.isAnyArrayBuffer(value) ||
50
- types.isDataView(value) ||
51
- types.isWeakMap(value) ||
52
- types.isWeakSet(value) ||
53
- types.isMapIterator(value) ||
54
- types.isSetIterator(value)
55
- ) {
56
- return inspect(value, segmentInspectOptions)
57
- }
58
-
59
- /** @type {(string | symbol)[]} */
60
- const keys = Object.keys(value)
61
- let propertyCount = keys.length
62
- const symbols = Object.getOwnPropertySymbols(value)
63
- for (let i = 0; i < symbols.length; i++) {
64
- if (Object.getOwnPropertyDescriptor(value, symbols[i])?.enumerable === true) {
65
- propertyCount++
66
- if (keys.length < maxProperties) keys.push(symbols[i])
67
- }
68
- }
69
-
70
- if (propertyCount <= maxProperties) {
71
- // TODO: Decide whether allowing util.inspect to invoke Symbol.toStringTag getters is acceptable. If it is,
72
- // remove inspectionCanRunUserCode and the related omission paths.
73
- if (inspectionCanRunUserCode(value)) {
74
- return '[Value omitted: inspection may execute user code]'
75
- }
76
- return inspect(value, segmentInspectOptions)
77
- }
78
-
79
- const truncated = {}
80
- for (let i = 0; i < maxProperties; i++) {
81
- const descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(value, keys[i]))
82
- if (
83
- (keys[i] === Symbol.toStringTag && descriptor.get !== undefined) ||
84
- (descriptor.value !== value && inspectionCanRunUserCode(descriptor.value))
85
- ) {
86
- return '[Value omitted: inspection may execute user code]'
87
- }
88
- if (descriptor.value === value) descriptor.value = truncated
89
- Object.defineProperty(truncated, keys[i], descriptor)
90
- }
91
-
92
- const omitted = propertyCount - maxProperties
93
- const inspected = inspect(truncated, segmentInspectOptions)
94
- return `${inspected.slice(0, -2)}, ... ${omitted} more ${omitted === 1 ? 'property' : 'properties'} }`
95
- }
96
-
97
- /**
98
- * Inspect a Map or Set while bounding the number of entries on Node.js 18, where `util.inspect` does not.
99
- *
100
- * @param {Collection} value
101
- * @param {boolean} isMap
102
- * @returns {string}
103
- */
104
- function inspectCollection (value, isMap) {
105
- if (NODE_MAJOR !== 18) return inspect(value, segmentInspectOptions)
106
-
107
- const size = (isMap ? mapSizeGetter : setSizeGetter).call(value)
108
- if (size <= maxCollectionEntries) return inspect(value, segmentInspectOptions)
109
-
110
- const truncated = isMap ? new Map() : new Set()
111
- const iterator = (isMap ? mapEntries : setValues).call(value)
112
- const iteratorNext = isMap ? mapIteratorNext : setIteratorNext
113
-
114
- for (let i = 0; i < maxCollectionEntries; i++) {
115
- const result = iteratorNext.call(iterator)
116
- if (result.done) break
117
-
118
- if (isMap) {
119
- const entry = result.value
120
- const key = entry[0] === value ? truncated : entry[0]
121
- const entryValue = entry[1] === value ? truncated : entry[1]
122
- mapSet.call(truncated, key, entryValue)
123
- } else {
124
- const entryValue = result.value === value ? truncated : result.value
125
- setAdd.call(truncated, entryValue)
126
- }
127
- }
128
-
129
- const type = isMap ? 'Map' : 'Set'
130
- const inspected = inspect(truncated, segmentInspectOptions)
131
- const normalized = inspected.replace(`${type}(${maxCollectionEntries})`, `${type}(${size})`)
132
- const remaining = size - maxCollectionEntries
133
- return `${normalized.slice(0, -2)}, ... ${remaining} more item${remaining === 1 ? '' : 's'} }`
134
- }
135
-
136
- /**
137
- * Determine whether inspecting a value could invoke a proxy trap or toStringTag getter.
138
- *
139
- * @param {unknown} value
140
- * @returns {boolean}
141
- */
142
- function inspectionCanRunUserCode (value) {
143
- const type = typeof value
144
- if (value === null || (type !== 'object' && type !== 'function')) return false
145
- if (types.isProxy(value)) return true
146
-
147
- let current = value
148
- while (current !== null) {
149
- if (Object.getOwnPropertyDescriptor(current, Symbol.toStringTag)?.get !== undefined) return true
150
- current = Object.getPrototypeOf(current)
151
- if (types.isProxy(current)) return true
152
- }
153
- return false
154
- }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = {
4
- EVP_PROXY_PATH_V2: '/evp_proxy/v2',
5
- EVP_PROXY_PATH_V4: '/evp_proxy/v4',
6
- EVP_SUBDOMAIN_HEADER_NAME: 'X-Datadog-EVP-Subdomain',
7
- EVP_EVENT_PLATFORM_SUBDOMAIN: 'event-platform-intake',
8
- }
@@ -1,64 +0,0 @@
1
- 'use strict'
2
-
3
- const { format } = require('node:url')
4
-
5
- const { HttpsProxyAgent } = require('../../../../vendor/dist/https-proxy-agent')
6
- const { getProxyForUrl } = require('../../../../vendor/dist/proxy-from-env')
7
- const log = require('../log')
8
-
9
- /**
10
- * @typedef {object} DirectEVPRoute
11
- * @property {URL} url - Direct intake URL
12
- * @property {string} basePath - Direct intake base path
13
- * @property {object} headers - Direct intake authentication headers
14
- * @property {import('node:https').Agent} [agent] - Optional HTTPS proxy agent
15
- */
16
-
17
- /**
18
- * Creates an authenticated direct EVP intake route.
19
- *
20
- * This helper does not perform local receiver discovery.
21
- *
22
- * @param {import('../config/config-base')} config - Tracer configuration
23
- * @param {string} intake - EVP intake subdomain
24
- * @returns {DirectEVPRoute|undefined} Direct route when credentials and site are available
25
- */
26
- function createDirectEVPRoute (config, intake) {
27
- const apiKey = config.DD_API_KEY
28
- if (!apiKey || !config.site) return
29
-
30
- try {
31
- const hostname = `${intake}.${config.site}`.toLowerCase()
32
- const url = new URL(format({
33
- protocol: 'https:',
34
- hostname,
35
- }))
36
- if (
37
- url.hostname !== hostname ||
38
- url.username ||
39
- url.password ||
40
- url.port ||
41
- url.pathname !== '/' ||
42
- url.search ||
43
- url.hash
44
- ) {
45
- throw new Error('Invalid direct EVP intake URL')
46
- }
47
-
48
- const proxyUrl = getProxyForUrl(url.href)
49
- const agent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : undefined
50
-
51
- return {
52
- url,
53
- basePath: '',
54
- headers: {
55
- 'DD-API-KEY': apiKey,
56
- },
57
- ...(agent && { agent }),
58
- }
59
- } catch (error) {
60
- log.debug('Unable to configure direct EVP intake: %s', error.message)
61
- }
62
- }
63
-
64
- module.exports = { createDirectEVPRoute }
@@ -1,133 +0,0 @@
1
- 'use strict'
2
-
3
- const { fetchAgentInfo } = require('../agent/info')
4
- const log = require('../log')
5
-
6
- const TRAILING_SLASHES = /\/+$/
7
-
8
- /**
9
- * Receiver discovery contract
10
- *
11
- * The tracer sends `GET /info` to its configured local Agent URL. An
12
- * Agent-compatible trace receiver produces the response. The tracer does not.
13
- *
14
- * The full Agent and serverless-init embed the same trace receiver. A future
15
- * in-process receiver can expose the same contract. Callers can therefore
16
- * select capabilities without detecting the receiver implementation.
17
- *
18
- * For EVP discovery, `endpoints` advertises registered proxy paths.
19
- * `evp_proxy_allowed_headers` advertises headers that the proxy forwards to
20
- * intake. It does not include routing headers that the proxy consumes, such as
21
- * `X-Datadog-EVP-Subdomain`.
22
- *
23
- * An advertised route is not a health check. The receiver can register an EVP
24
- * route while configuration disables its handler. The request then returns
25
- * `405`. The `/info` version also identifies the embedded Agent code, not a
26
- * serverless-init image or deployment type.
27
- *
28
- * This module only discovers a candidate route. A missing or unresponsive
29
- * `/info` endpoint returns an error through the shared request timeout and
30
- * retry policy. A valid response without a compatible path returns no route.
31
- * Discovery sends no events, so the caller can safely select direct intake
32
- * after either result. The caller also owns later delivery failures. Exposure
33
- * delivery uses retries and can therefore produce duplicates. After local
34
- * retries fail, the caller can retry through direct intake and use that route
35
- * for future batches.
36
- *
37
- * Reference implementations:
38
- *
39
- * Agent `/info` and EVP proxy:
40
- * https://github.com/DataDog/datadog-agent/tree/main/pkg/trace/api
41
- *
42
- * serverless-init entry point and embedded trace receiver:
43
- * https://github.com/DataDog/datadog-agent/blob/main/cmd/serverless-init/main.go
44
- * https://github.com/DataDog/datadog-agent/blob/main/pkg/serverless/trace/trace.go
45
- */
46
-
47
- /**
48
- * Selects the first advertised EVP proxy path that the caller supports.
49
- *
50
- * @param {object} agentInfo - Agent `/info` response
51
- * @param {object} options - Selection options
52
- * @param {string[]} options.supportedPaths - Supported paths in preference order
53
- * @param {string[]} [options.requiredHeaders] - Headers that the proxy must forward unchanged to intake. Each
54
- * header must appear in `evp_proxy_allowed_headers`. Do not include routing headers that the Agent consumes.
55
- * @returns {string|undefined} Selected normalized path
56
- */
57
- function selectEVPProxyPath (agentInfo, { supportedPaths, requiredHeaders = [] } = {}) {
58
- if (!Array.isArray(agentInfo?.endpoints) ||
59
- !Array.isArray(supportedPaths) ||
60
- !Array.isArray(requiredHeaders) ||
61
- requiredHeaders.some(header => typeof header !== 'string')) {
62
- return
63
- }
64
-
65
- const allowedHeaders = agentInfo.evp_proxy_allowed_headers
66
- if (allowedHeaders !== undefined) {
67
- if (!Array.isArray(allowedHeaders)) return
68
-
69
- const normalizedHeaders = new Set()
70
- for (const header of allowedHeaders) {
71
- if (typeof header === 'string') {
72
- normalizedHeaders.add(header.toLowerCase())
73
- }
74
- }
75
-
76
- if (requiredHeaders.some(header => !normalizedHeaders.has(header.toLowerCase()))) {
77
- return
78
- }
79
- }
80
-
81
- const advertisedPaths = new Set()
82
- for (const endpoint of agentInfo.endpoints) {
83
- if (typeof endpoint === 'string') {
84
- advertisedPaths.add(endpoint.replace(TRAILING_SLASHES, ''))
85
- }
86
- }
87
-
88
- for (const supportedPath of supportedPaths) {
89
- if (typeof supportedPath !== 'string') continue
90
-
91
- const normalizedPath = supportedPath.replace(TRAILING_SLASHES, '')
92
- if (advertisedPaths.has(normalizedPath)) {
93
- return normalizedPath
94
- }
95
- }
96
- }
97
-
98
- /**
99
- * Discovers an EVP proxy route through the configured Agent URL.
100
- *
101
- * This function performs discovery only when the caller invokes it. It stores
102
- * no state. The Agent information client owns its existing response cache.
103
- *
104
- * @param {URL} url - Configured Agent URL
105
- * @param {object} options - Selection options
106
- * @param {string[]} options.supportedPaths - Supported paths in preference order
107
- * @param {string[]} [options.requiredHeaders] - Headers that the proxy must forward unchanged to intake. Each
108
- * header must appear in `evp_proxy_allowed_headers`. Do not include routing headers that the Agent consumes.
109
- * @param {(error: Error|null, route?: {url: URL, basePath: string}) => void} callback - Result callback
110
- * @returns {void}
111
- */
112
- function discoverEVPProxy (url, options, callback) {
113
- fetchAgentInfo(url, (error, agentInfo) => {
114
- if (error) {
115
- callback(error)
116
- return
117
- }
118
-
119
- const basePath = selectEVPProxyPath(agentInfo, options)
120
- if (basePath === undefined) {
121
- callback(null)
122
- return
123
- }
124
-
125
- log.debug('EVP proxy route %s discovered through the configured local receiver', basePath)
126
- callback(null, { url, basePath })
127
- })
128
- }
129
-
130
- module.exports = {
131
- discoverEVPProxy,
132
- selectEVPProxyPath,
133
- }
@@ -1,22 +0,0 @@
1
- 'use strict'
2
-
3
- const LEADING_SLASHES = /^\/+/
4
- const TRAILING_SLASHES = /\/+$/
5
-
6
- /**
7
- * Joins a caller-supplied EVP proxy path and product endpoint.
8
- *
9
- * This utility does not perform EVP proxy discovery.
10
- *
11
- * @param {string} basePath - EVP proxy base path
12
- * @param {string} endpoint - Product intake endpoint
13
- * @returns {string} Joined request path
14
- */
15
- function joinEVPProxyPath (basePath, endpoint) {
16
- const normalizedBasePath = basePath.replace(TRAILING_SLASHES, '')
17
- const normalizedEndpoint = endpoint.replace(LEADING_SLASHES, '')
18
-
19
- return `${normalizedBasePath}/${normalizedEndpoint}`
20
- }
21
-
22
- module.exports = { joinEVPProxyPath }
@@ -1,22 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- 'Software'), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.