dd-trace 5.104.0 → 5.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +90 -102
- package/index.d.ts +82 -3
- package/package.json +15 -15
- package/packages/datadog-core/src/storage.js +1 -1
- package/packages/datadog-instrumentations/src/aerospike.js +1 -1
- package/packages/datadog-instrumentations/src/ai.js +8 -7
- package/packages/datadog-instrumentations/src/aws-sdk.js +16 -2
- package/packages/datadog-instrumentations/src/azure-cosmos.js +7 -0
- package/packages/datadog-instrumentations/src/azure-functions.js +3 -0
- package/packages/datadog-instrumentations/src/cucumber-worker-threads.js +19 -0
- package/packages/datadog-instrumentations/src/cucumber.js +390 -157
- package/packages/datadog-instrumentations/src/dns.js +54 -18
- package/packages/datadog-instrumentations/src/fastify.js +142 -82
- package/packages/datadog-instrumentations/src/graphql.js +188 -62
- package/packages/datadog-instrumentations/src/helpers/ai-messages.js +322 -14
- package/packages/datadog-instrumentations/src/helpers/hooks.js +4 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +2 -1
- package/packages/datadog-instrumentations/src/helpers/openai-ai-guard.js +269 -0
- package/packages/datadog-instrumentations/src/helpers/promise-instrumentor.js +42 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +2 -3
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/azure-cosmos.js +50 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langgraph.js +4 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/playwright.js +85 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +37 -236
- package/packages/datadog-instrumentations/src/hono.js +54 -3
- package/packages/datadog-instrumentations/src/http/server.js +9 -4
- package/packages/datadog-instrumentations/src/jest/coverage-backfill.js +163 -0
- package/packages/datadog-instrumentations/src/jest.js +360 -150
- package/packages/datadog-instrumentations/src/kafkajs.js +120 -16
- package/packages/datadog-instrumentations/src/mocha/main.js +128 -17
- package/packages/datadog-instrumentations/src/nats.js +182 -0
- package/packages/datadog-instrumentations/src/nyc.js +38 -1
- package/packages/datadog-instrumentations/src/openai.js +33 -18
- package/packages/datadog-instrumentations/src/oracledb.js +6 -1
- package/packages/datadog-instrumentations/src/pino.js +17 -5
- package/packages/datadog-instrumentations/src/playwright.js +515 -292
- package/packages/datadog-instrumentations/src/router.js +76 -32
- package/packages/datadog-instrumentations/src/stripe.js +1 -1
- package/packages/datadog-plugin-avsc/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/tracing.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/bedrockruntime/utils.js +218 -4
- package/packages/datadog-plugin-azure-cosmos/src/index.js +144 -0
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +1 -1
- package/packages/datadog-plugin-azure-functions/src/index.js +5 -2
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +1 -1
- package/packages/datadog-plugin-bunyan/src/index.js +28 -0
- package/packages/datadog-plugin-cucumber/src/index.js +17 -3
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +199 -28
- package/packages/datadog-plugin-cypress/src/support.js +69 -1
- package/packages/datadog-plugin-dns/src/lookup.js +8 -6
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +1 -1
- package/packages/datadog-plugin-graphql/src/execute.js +2 -0
- package/packages/datadog-plugin-graphql/src/resolve.js +64 -67
- package/packages/datadog-plugin-http/src/server.js +40 -15
- package/packages/datadog-plugin-jest/src/index.js +11 -3
- package/packages/datadog-plugin-jest/src/util.js +15 -8
- package/packages/datadog-plugin-kafkajs/src/batch-consumer.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/producer.js +3 -0
- package/packages/datadog-plugin-langgraph/src/stream.js +1 -1
- package/packages/datadog-plugin-mocha/src/index.js +19 -4
- package/packages/datadog-plugin-mongodb-core/src/index.js +281 -40
- package/packages/datadog-plugin-nats/src/consumer.js +43 -0
- package/packages/datadog-plugin-nats/src/index.js +20 -0
- package/packages/datadog-plugin-nats/src/producer.js +62 -0
- package/packages/datadog-plugin-nats/src/util.js +33 -0
- package/packages/datadog-plugin-next/src/index.js +5 -3
- package/packages/datadog-plugin-openai/src/tracing.js +15 -2
- package/packages/datadog-plugin-oracledb/src/index.js +13 -2
- package/packages/datadog-plugin-pino/src/index.js +42 -0
- package/packages/datadog-plugin-playwright/src/index.js +4 -4
- package/packages/datadog-plugin-protobufjs/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-router/src/index.js +33 -44
- package/packages/datadog-plugin-selenium/src/index.js +1 -1
- package/packages/datadog-plugin-vitest/src/index.js +5 -13
- package/packages/datadog-plugin-winston/src/index.js +30 -0
- package/packages/datadog-shimmer/src/shimmer.js +33 -40
- package/packages/dd-trace/src/aiguard/index.js +1 -1
- package/packages/dd-trace/src/aiguard/sdk.js +1 -1
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/index.js +1 -1
- package/packages/dd-trace/src/appsec/reporter.js +5 -6
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/utils.js +1 -1
- package/packages/dd-trace/src/appsec/user_tracking.js +5 -4
- package/packages/dd-trace/src/baggage.js +7 -1
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +0 -1
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +25 -13
- package/packages/dd-trace/src/ci-visibility/test-optimization-cache.js +70 -6
- package/packages/dd-trace/src/config/generated-config-types.d.ts +6 -2
- package/packages/dd-trace/src/config/supported-configurations.json +27 -8
- package/packages/dd-trace/src/datastreams/writer.js +2 -4
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +5 -8
- package/packages/dd-trace/src/encode/0.4.js +124 -108
- package/packages/dd-trace/src/encode/0.5.js +114 -26
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +31 -23
- package/packages/dd-trace/src/encode/agentless-json.js +4 -2
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +32 -13
- package/packages/dd-trace/src/encode/span-stats.js +16 -16
- package/packages/dd-trace/src/encode/tags-processors.js +16 -0
- package/packages/dd-trace/src/id.js +15 -0
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +92 -6
- package/packages/dd-trace/src/llmobs/plugins/bedrockruntime.js +43 -21
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +9 -7
- package/packages/dd-trace/src/llmobs/plugins/langgraph/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/sdk.js +0 -16
- package/packages/dd-trace/src/llmobs/span_processor.js +3 -3
- package/packages/dd-trace/src/llmobs/tagger.js +9 -1
- package/packages/dd-trace/src/llmobs/telemetry.js +1 -1
- package/packages/dd-trace/src/llmobs/util.js +66 -3
- package/packages/dd-trace/src/log/index.js +1 -1
- package/packages/dd-trace/src/msgpack/chunk.js +394 -10
- package/packages/dd-trace/src/msgpack/index.js +96 -2
- package/packages/dd-trace/src/openfeature/encoding.js +70 -0
- package/packages/dd-trace/src/openfeature/flagging_provider.js +20 -0
- package/packages/dd-trace/src/openfeature/span-enrichment-hook.js +143 -0
- package/packages/dd-trace/src/openfeature/span-enrichment.js +149 -0
- package/packages/dd-trace/src/opentelemetry/span-helpers.js +4 -3
- package/packages/dd-trace/src/opentelemetry/span.js +1 -1
- package/packages/dd-trace/src/opentelemetry/trace/otlp_transformer.js +22 -3
- package/packages/dd-trace/src/opentracing/propagation/log.js +18 -7
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +64 -77
- package/packages/dd-trace/src/opentracing/span.js +59 -19
- package/packages/dd-trace/src/opentracing/span_context.js +50 -3
- package/packages/dd-trace/src/plugins/ci_plugin.js +20 -20
- package/packages/dd-trace/src/plugins/database.js +7 -6
- package/packages/dd-trace/src/plugins/index.js +4 -0
- package/packages/dd-trace/src/plugins/log_injection.js +56 -0
- package/packages/dd-trace/src/plugins/log_plugin.js +3 -48
- package/packages/dd-trace/src/plugins/outbound.js +1 -1
- package/packages/dd-trace/src/plugins/plugin.js +15 -17
- package/packages/dd-trace/src/plugins/tracing.js +43 -5
- package/packages/dd-trace/src/plugins/util/test.js +236 -13
- package/packages/dd-trace/src/plugins/util/web.js +79 -65
- package/packages/dd-trace/src/priority_sampler.js +2 -2
- package/packages/dd-trace/src/profiling/config.js +10 -23
- package/packages/dd-trace/src/profiling/exporters/agent.js +11 -10
- package/packages/dd-trace/src/profiling/profiler.js +21 -11
- package/packages/dd-trace/src/profiling/profilers/wall.js +12 -7
- package/packages/dd-trace/src/sampling_rule.js +7 -7
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +10 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/source-resolver.js +46 -0
- package/packages/dd-trace/src/span_format.js +190 -58
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/standalone/index.js +3 -3
- package/packages/dd-trace/src/tagger.js +0 -2
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +70 -39
- package/vendor/dist/@datadog/sketches-js/LICENSE +10 -36
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/packages/dd-trace/src/msgpack/encoder.js +0 -308
- package/packages/dd-trace/src/plugins/structured_log_plugin.js +0 -9
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
either explicitly including or referencing a different license or
|
|
3
|
-
located in a directory containing a different LICENSE file.
|
|
1
|
+
Copyright 2020 Datadog, Inc.
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
notice, this list of conditions and the following disclaimer.
|
|
15
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
16
|
-
notice, this list of conditions and the following disclaimer in the
|
|
17
|
-
documentation and/or other materials provided with the distribution.
|
|
18
|
-
* Neither the name of its author, nor the names of its contributors
|
|
19
|
-
may be used to endorse or promote products derived from this software
|
|
20
|
-
without specific prior written permission.
|
|
21
|
-
|
|
22
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
Code generated by the command line utilities is owned by the owner
|
|
37
|
-
of the input file used when generating it. This code is not
|
|
38
|
-
standalone and requires a support library to be linked with it. This
|
|
39
|
-
support library is itself covered by the above license.
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={"./@datadog/sketches-js/dist/ddsketch/DDSketch.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LogCollapsingHighestDenseDDSketch=e.LogCollapsingLowestDenseDDSketch=e.DDSketch=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/store/index.js"),o=i("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),s=.01,a=2048,u=function(){function BaseDDSketch(t){var e=t.mapping,i=t.store,n=t.negativeStore,r=t.zeroCount;this.mapping=e,this.store=i,this.negativeStore=n,this.zeroCount=r,this.count=this.negativeStore.count+this.zeroCount+this.store.count,this.min=1/0,this.max=-1/0,this.sum=0}return BaseDDSketch.prototype.accept=function(t,e){if(void 0===e&&(e=1),e<=0)throw Error("Weight must be a positive number");if(t>this.mapping.minPossible){var i=this.mapping.key(t);this.store.add(i,e)}else if(t<-this.mapping.minPossible){var i=this.mapping.key(-t);this.negativeStore.add(i,e)}else this.zeroCount+=e;this.count+=e,this.sum+=t*e,t<this.min&&(this.min=t),t>this.max&&(this.max=t)},BaseDDSketch.prototype.getValueAtQuantile=function(t){if(t<0||t>1||0===this.count)return NaN;var e=t*(this.count-1),i=0;if(e<this.negativeStore.count){var n=this.negativeStore.count-e-1,r=this.negativeStore.keyAtRank(n,!1);i=-this.mapping.value(r)}else{if(e<this.zeroCount+this.negativeStore.count)return 0;var r=this.store.keyAtRank(e-this.zeroCount-this.negativeStore.count);i=this.mapping.value(r)}return i},BaseDDSketch.prototype.merge=function(t){if(!this.mergeable(t))throw Error("Cannot merge two DDSketches with different `relativeAccuracy` parameters");if(0!==t.count){if(0===this.count)return void this._copy(t);this.store.merge(t.store),this.zeroCount+=t.zeroCount,this.count+=t.count,this.sum+=t.sum,t.min<this.min&&(this.min=t.min),t.max>this.max&&(this.max=t.max)}},BaseDDSketch.prototype.mergeable=function(t){return this.mapping.gamma===t.mapping.gamma},BaseDDSketch.prototype._copy=function(t){this.store.copy(t.store),this.negativeStore.copy(t.negativeStore),this.zeroCount=t.zeroCount,this.min=t.min,this.max=t.max,this.count=t.count,this.sum=t.sum},BaseDDSketch.prototype.toProto=function(){var t=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch,e=t.create({mapping:this.mapping.toProto(),positiveValues:this.store.toProto(),negativeValues:this.negativeStore.toProto(),zeroCount:this.zeroCount});return t.encode(e).finish()},BaseDDSketch.fromProto=function(t){var e=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch.decode(t);return new BaseDDSketch({mapping:o.KeyMapping.fromProto(e.mapping),store:r.DenseStore.fromProto(e.positiveValues),negativeStore:r.DenseStore.fromProto(e.negativeValues),zeroCount:e.zeroCount})},BaseDDSketch}(),p={relativeAccuracy:s};e.DDSketch=function(t){function DDSketch(e){var i=(void 0===e?p:e).relativeAccuracy,n=void 0===i?s:i,a=new o.LogarithmicMapping(n),u=new r.DenseStore,f=new r.DenseStore;return t.call(this,{mapping:a,store:u,negativeStore:f,zeroCount:0})||this}return n(DDSketch,t),DDSketch}(u),e.LogCollapsingLowestDenseDDSketch=function(t){function LogCollapsingLowestDenseDDSketch(e){var i=void 0===e?p:e,n=i.relativeAccuracy,u=void 0===n?s:n,f=i.binLimit,c=void 0===f?a:f,l=new o.LogarithmicMapping(u),h=new r.CollapsingLowestDenseStore(c),d=new r.CollapsingLowestDenseStore(c);return t.call(this,{mapping:l,store:h,negativeStore:d,zeroCount:0})||this}return n(LogCollapsingLowestDenseDDSketch,t),LogCollapsingLowestDenseDDSketch}(u),e.LogCollapsingHighestDenseDDSketch=function(t){function LogCollapsingHighestDenseDDSketch(e){var i=void 0===e?p:e,n=i.relativeAccuracy,u=void 0===n?s:n,f=i.binLimit,c=void 0===f?a:f,l=new o.LogarithmicMapping(u),h=new r.CollapsingHighestDenseStore(c),d=new r.CollapsingHighestDenseStore(c);return t.call(this,{mapping:l,store:h,negativeStore:d,zeroCount:0})||this}return n(LogCollapsingHighestDenseDDSketch,t),LogCollapsingHighestDenseDDSketch}(u)},"./@datadog/sketches-js/dist/ddsketch/index.js"(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i("./@datadog/sketches-js/dist/ddsketch/DDSketch.js"),e)},"./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),o=i("./@datadog/sketches-js/dist/ddsketch/math.js");e.CubicallyInterpolatedMapping=function(t){function CubicallyInterpolatedMapping(e,i){void 0===i&&(i=0);var n=t.call(this,e,i)||this;return n.A=6/35,n.B=-.6,n.C=10/7,n._multiplier/=n.C,n}return n(CubicallyInterpolatedMapping,t),CubicallyInterpolatedMapping.prototype._cubicLog2Approx=function(t){var e=(0,o.frexp)(t),i=e[0],n=e[1],r=2*i-1;return((this.A*r+this.B)*r+this.C)*r+(n-1)},CubicallyInterpolatedMapping.prototype._cubicExp2Approx=function(t){var e=Math.floor(t),i=this.B*this.B-3*this.A*this.C,n=2*this.B*this.B*this.B-9*this.A*this.B*this.C-27*this.A*this.A*(t-e),r=Math.cbrt((n-Math.sqrt(n*n-4*i*i*i))/2),s=(-(this.B+r+i/r)/(3*this.A)+1)/2;return(0,o.ldexp)(s,e+1)},CubicallyInterpolatedMapping.prototype._logGamma=function(t){return this._cubicLog2Approx(t)*this._multiplier},CubicallyInterpolatedMapping.prototype._powGamma=function(t){return this._cubicExp2Approx(t/this._multiplier)},CubicallyInterpolatedMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.CUBIC},CubicallyInterpolatedMapping}(r.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyMapping=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),r=11125369292536007e-324,o=Number.MAX_VALUE;e.KeyMapping=function(){function KeyMapping(t,e){if(void 0===e&&(e=0),t<=0||t>=1)throw Error("Relative accuracy must be between 0 and 1 when initializing a KeyMapping");this.relativeAccuracy=t,this._offset=e;var i=2*t/(1-t);this.gamma=1+i,this._multiplier=1/Math.log1p(i),this.minPossible=r*this.gamma,this.maxPossible=o/this.gamma}return KeyMapping.fromGammaOffset=function(t,e){return new this((t-1)/(t+1),e)},KeyMapping.prototype.key=function(t){return Math.ceil(this._logGamma(t))+this._offset},KeyMapping.prototype.value=function(t){return this._powGamma(t-this._offset)*(2/(1+this.gamma))},KeyMapping.prototype.toProto=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.create({gamma:this.gamma,indexOffset:this._offset,interpolation:this._protoInterpolation()})},KeyMapping.fromProto=function(t){if(!t||null==t.gamma||null==t.indexOffset)throw Error("Failed to decode mapping from protobuf");var e=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation,r=t.interpolation,o=t.gamma,s=t.indexOffset;switch(r){case e.NONE:return n.LogarithmicMapping.fromGammaOffset(o,s);case e.LINEAR:return n.LinearlyInterpolatedMapping.fromGammaOffset(o,s);case e.CUBIC:return n.CubicallyInterpolatedMapping.fromGammaOffset(o,s);default:throw Error("Unrecognized mapping when decoding from protobuf")}},KeyMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},KeyMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},KeyMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},KeyMapping}()},"./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LinearlyInterpolatedMapping=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),o=i("./@datadog/sketches-js/dist/ddsketch/math.js");e.LinearlyInterpolatedMapping=function(t){function LinearlyInterpolatedMapping(e,i){return void 0===i&&(i=0),t.call(this,e,i)||this}return n(LinearlyInterpolatedMapping,t),LinearlyInterpolatedMapping.prototype._log2Approx=function(t){var e=(0,o.frexp)(t);return 2*e[0]-1+(e[1]-1)},LinearlyInterpolatedMapping.prototype._exp2Approx=function(t){var e=Math.floor(t)+1,i=(t-e+2)/2;return(0,o.ldexp)(i,e)},LinearlyInterpolatedMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},LinearlyInterpolatedMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},LinearlyInterpolatedMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.LINEAR},LinearlyInterpolatedMapping}(r.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.LogarithmicMapping=void 0,e.LogarithmicMapping=function(t){function LogarithmicMapping(e,i){void 0===i&&(i=0);var n=t.call(this,e,i)||this;return n._multiplier*=Math.log(2),n}return n(LogarithmicMapping,t),LogarithmicMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},LogarithmicMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},LogarithmicMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},LogarithmicMapping}(i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js").KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/index.js"(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=e.LinearlyInterpolatedMapping=e.LogarithmicMapping=e.KeyMapping=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js");Object.defineProperty(e,"KeyMapping",{enumerable:!0,get:function(){return n.KeyMapping}});var r=i("./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js");Object.defineProperty(e,"LogarithmicMapping",{enumerable:!0,get:function(){return r.LogarithmicMapping}});var o=i("./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js");Object.defineProperty(e,"LinearlyInterpolatedMapping",{enumerable:!0,get:function(){return o.LinearlyInterpolatedMapping}});var s=i("./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js");Object.defineProperty(e,"CubicallyInterpolatedMapping",{enumerable:!0,get:function(){return s.CubicallyInterpolatedMapping}})},"./@datadog/sketches-js/dist/ddsketch/math.js"(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ldexp=e.frexp=void 0,e.frexp=function(t){if(0===t||!Number.isFinite(t))return[t,0];for(var e=Math.abs(t),i=Math.max(-1023,Math.floor(Math.log2(e))+1),n=e*Math.pow(2,-i);n<.5;)n*=2,i--;for(;n>=1;)n*=.5,i++;return t<0&&(n=-n),[n,i]},e.ldexp=function(t,e){for(var i=Math.min(3,Math.ceil(Math.abs(e)/1023)),n=t,r=0;r<i;r++)n*=Math.pow(2,Math.floor((e+r)/i));return n}},"./@datadog/sketches-js/dist/ddsketch/proto/compiled.js"(t,e,i){var n=i("./protobufjs/minimal.js"),r=n.Reader,o=n.Writer,s=n.util,a=n.roots.default||(n.roots.default={});a.DDSketch=function(){function DDSketch(t){if(t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return DDSketch.prototype.mapping=null,DDSketch.prototype.positiveValues=null,DDSketch.prototype.negativeValues=null,DDSketch.prototype.zeroCount=0,DDSketch.create=function(t){return new DDSketch(t)},DDSketch.encode=function(t,e){return e||(e=o.create()),null!=t.mapping&&Object.hasOwnProperty.call(t,"mapping")&&a.IndexMapping.encode(t.mapping,e.uint32(10).fork()).ldelim(),null!=t.positiveValues&&Object.hasOwnProperty.call(t,"positiveValues")&&a.Store.encode(t.positiveValues,e.uint32(18).fork()).ldelim(),null!=t.negativeValues&&Object.hasOwnProperty.call(t,"negativeValues")&&a.Store.encode(t.negativeValues,e.uint32(26).fork()).ldelim(),null!=t.zeroCount&&Object.hasOwnProperty.call(t,"zeroCount")&&e.uint32(33).double(t.zeroCount),e},DDSketch.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},DDSketch.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i=void 0===e?t.len:t.pos+e,n=new a.DDSketch;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:n.mapping=a.IndexMapping.decode(t,t.uint32());break;case 2:n.positiveValues=a.Store.decode(t,t.uint32());break;case 3:n.negativeValues=a.Store.decode(t,t.uint32());break;case 4:n.zeroCount=t.double();break;default:t.skipType(7&o)}}return n},DDSketch.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},DDSketch.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.mapping&&t.hasOwnProperty("mapping")){var e=a.IndexMapping.verify(t.mapping);if(e)return"mapping."+e}if(null!=t.positiveValues&&t.hasOwnProperty("positiveValues")){var e=a.Store.verify(t.positiveValues);if(e)return"positiveValues."+e}if(null!=t.negativeValues&&t.hasOwnProperty("negativeValues")){var e=a.Store.verify(t.negativeValues);if(e)return"negativeValues."+e}return null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&"number"!=typeof t.zeroCount?"zeroCount: number expected":null},DDSketch.fromObject=function(t){if(t instanceof a.DDSketch)return t;var e=new a.DDSketch;if(null!=t.mapping){if("object"!=typeof t.mapping)throw TypeError(".DDSketch.mapping: object expected");e.mapping=a.IndexMapping.fromObject(t.mapping)}if(null!=t.positiveValues){if("object"!=typeof t.positiveValues)throw TypeError(".DDSketch.positiveValues: object expected");e.positiveValues=a.Store.fromObject(t.positiveValues)}if(null!=t.negativeValues){if("object"!=typeof t.negativeValues)throw TypeError(".DDSketch.negativeValues: object expected");e.negativeValues=a.Store.fromObject(t.negativeValues)}return null!=t.zeroCount&&(e.zeroCount=Number(t.zeroCount)),e},DDSketch.toObject=function(t,e){e||(e={});var i={};return e.defaults&&(i.mapping=null,i.positiveValues=null,i.negativeValues=null,i.zeroCount=0),null!=t.mapping&&t.hasOwnProperty("mapping")&&(i.mapping=a.IndexMapping.toObject(t.mapping,e)),null!=t.positiveValues&&t.hasOwnProperty("positiveValues")&&(i.positiveValues=a.Store.toObject(t.positiveValues,e)),null!=t.negativeValues&&t.hasOwnProperty("negativeValues")&&(i.negativeValues=a.Store.toObject(t.negativeValues,e)),null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&(i.zeroCount=e.json&&!isFinite(t.zeroCount)?String(t.zeroCount):t.zeroCount),i},DDSketch.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},DDSketch}(),a.IndexMapping=function(){function IndexMapping(t){if(t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return IndexMapping.prototype.gamma=0,IndexMapping.prototype.indexOffset=0,IndexMapping.prototype.interpolation=0,IndexMapping.create=function(t){return new IndexMapping(t)},IndexMapping.encode=function(t,e){return e||(e=o.create()),null!=t.gamma&&Object.hasOwnProperty.call(t,"gamma")&&e.uint32(9).double(t.gamma),null!=t.indexOffset&&Object.hasOwnProperty.call(t,"indexOffset")&&e.uint32(17).double(t.indexOffset),null!=t.interpolation&&Object.hasOwnProperty.call(t,"interpolation")&&e.uint32(24).int32(t.interpolation),e},IndexMapping.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},IndexMapping.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i=void 0===e?t.len:t.pos+e,n=new a.IndexMapping;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:n.gamma=t.double();break;case 2:n.indexOffset=t.double();break;case 3:n.interpolation=t.int32();break;default:t.skipType(7&o)}}return n},IndexMapping.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},IndexMapping.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.gamma&&t.hasOwnProperty("gamma")&&"number"!=typeof t.gamma)return"gamma: number expected";if(null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&"number"!=typeof t.indexOffset)return"indexOffset: number expected";if(null!=t.interpolation&&t.hasOwnProperty("interpolation"))switch(t.interpolation){default:return"interpolation: enum value expected";case 0:case 1:case 2:case 3:}return null},IndexMapping.fromObject=function(t){if(t instanceof a.IndexMapping)return t;var e=new a.IndexMapping;switch(null!=t.gamma&&(e.gamma=Number(t.gamma)),null!=t.indexOffset&&(e.indexOffset=Number(t.indexOffset)),t.interpolation){case"NONE":case 0:e.interpolation=0;break;case"LINEAR":case 1:e.interpolation=1;break;case"QUADRATIC":case 2:e.interpolation=2;break;case"CUBIC":case 3:e.interpolation=3}return e},IndexMapping.toObject=function(t,e){e||(e={});var i={};return e.defaults&&(i.gamma=0,i.indexOffset=0,i.interpolation=e.enums===String?"NONE":0),null!=t.gamma&&t.hasOwnProperty("gamma")&&(i.gamma=e.json&&!isFinite(t.gamma)?String(t.gamma):t.gamma),null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&(i.indexOffset=e.json&&!isFinite(t.indexOffset)?String(t.indexOffset):t.indexOffset),null!=t.interpolation&&t.hasOwnProperty("interpolation")&&(i.interpolation=e.enums===String?a.IndexMapping.Interpolation[t.interpolation]:t.interpolation),i},IndexMapping.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},IndexMapping.Interpolation=function(){var t={},e=Object.create(t);return e[t[0]="NONE"]=0,e[t[1]="LINEAR"]=1,e[t[2]="QUADRATIC"]=2,e[t[3]="CUBIC"]=3,e}(),IndexMapping}(),a.Store=function(){function Store(t){if(this.binCounts={},this.contiguousBinCounts=[],t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return Store.prototype.binCounts=s.emptyObject,Store.prototype.contiguousBinCounts=s.emptyArray,Store.prototype.contiguousBinIndexOffset=0,Store.create=function(t){return new Store(t)},Store.encode=function(t,e){if(e||(e=o.create()),null!=t.binCounts&&Object.hasOwnProperty.call(t,"binCounts"))for(var i=Object.keys(t.binCounts),n=0;n<i.length;++n)e.uint32(10).fork().uint32(8).sint32(i[n]).uint32(17).double(t.binCounts[i[n]]).ldelim();if(null!=t.contiguousBinCounts&&t.contiguousBinCounts.length){e.uint32(18).fork();for(var n=0;n<t.contiguousBinCounts.length;++n)e.double(t.contiguousBinCounts[n]);e.ldelim()}return null!=t.contiguousBinIndexOffset&&Object.hasOwnProperty.call(t,"contiguousBinIndexOffset")&&e.uint32(24).sint32(t.contiguousBinIndexOffset),e},Store.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},Store.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i,n,o=void 0===e?t.len:t.pos+e,u=new a.Store;t.pos<o;){var p=t.uint32();switch(p>>>3){case 1:u.binCounts===s.emptyObject&&(u.binCounts={});var f=t.uint32()+t.pos;for(i=0,n=0;t.pos<f;){var c=t.uint32();switch(c>>>3){case 1:i=t.sint32();break;case 2:n=t.double();break;default:t.skipType(7&c)}}u.binCounts[i]=n;break;case 2:if(u.contiguousBinCounts&&u.contiguousBinCounts.length||(u.contiguousBinCounts=[]),(7&p)==2)for(var f=t.uint32()+t.pos;t.pos<f;)u.contiguousBinCounts.push(t.double());else u.contiguousBinCounts.push(t.double());break;case 3:u.contiguousBinIndexOffset=t.sint32();break;default:t.skipType(7&p)}}return u},Store.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},Store.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.binCounts&&t.hasOwnProperty("binCounts")){if(!s.isObject(t.binCounts))return"binCounts: object expected";for(var e=Object.keys(t.binCounts),i=0;i<e.length;++i){if(!s.key32Re.test(e[i]))return"binCounts: integer key{k:sint32} expected";if("number"!=typeof t.binCounts[e[i]])return"binCounts: number{k:sint32} expected"}}if(null!=t.contiguousBinCounts&&t.hasOwnProperty("contiguousBinCounts")){if(!Array.isArray(t.contiguousBinCounts))return"contiguousBinCounts: array expected";for(var i=0;i<t.contiguousBinCounts.length;++i)if("number"!=typeof t.contiguousBinCounts[i])return"contiguousBinCounts: number[] expected"}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&!s.isInteger(t.contiguousBinIndexOffset)?"contiguousBinIndexOffset: integer expected":null},Store.fromObject=function(t){if(t instanceof a.Store)return t;var e=new a.Store;if(t.binCounts){if("object"!=typeof t.binCounts)throw TypeError(".Store.binCounts: object expected");e.binCounts={};for(var i=Object.keys(t.binCounts),n=0;n<i.length;++n)e.binCounts[i[n]]=Number(t.binCounts[i[n]])}if(t.contiguousBinCounts){if(!Array.isArray(t.contiguousBinCounts))throw TypeError(".Store.contiguousBinCounts: array expected");e.contiguousBinCounts=[];for(var n=0;n<t.contiguousBinCounts.length;++n)e.contiguousBinCounts[n]=Number(t.contiguousBinCounts[n])}return null!=t.contiguousBinIndexOffset&&(e.contiguousBinIndexOffset=0|t.contiguousBinIndexOffset),e},Store.toObject=function(t,e){e||(e={});var i,n={};if((e.arrays||e.defaults)&&(n.contiguousBinCounts=[]),(e.objects||e.defaults)&&(n.binCounts={}),e.defaults&&(n.contiguousBinIndexOffset=0),t.binCounts&&(i=Object.keys(t.binCounts)).length){n.binCounts={};for(var r=0;r<i.length;++r)n.binCounts[i[r]]=e.json&&!isFinite(t.binCounts[i[r]])?String(t.binCounts[i[r]]):t.binCounts[i[r]]}if(t.contiguousBinCounts&&t.contiguousBinCounts.length){n.contiguousBinCounts=[];for(var r=0;r<t.contiguousBinCounts.length;++r)n.contiguousBinCounts[r]=e.json&&!isFinite(t.contiguousBinCounts[r])?String(t.contiguousBinCounts[r]):t.contiguousBinCounts[r]}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&(n.contiguousBinIndexOffset=t.contiguousBinIndexOffset),n},Store.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},Store}(),t.exports=a},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),o=i("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingHighestDenseStore=function(t){function CollapsingHighestDenseStore(e,i){var n=t.call(this,i)||this;return n.binLimit=e,n.isCollapsed=!1,n}return n(CollapsingHighestDenseStore,t),CollapsingHighestDenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.maxKey-t.offset+1,i=Math.max(this.maxKey+1,t.minKey)-t.offset;if(e>i){var n=(0,o.sumOfRange)(t.bins,i,e);this.bins[this.length()-1]+=n}else i=e;for(var r=t.minKey;r<i+t.offset;r++)this.bins[r-this.offset]+=t.bins[r-t.offset];this.count+=t.count}},CollapsingHighestDenseStore.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},CollapsingHighestDenseStore.prototype._getNewLength=function(t,e){var i=e-t+1;return Math.min(this.chunkSize*Math.ceil(i/this.chunkSize),this.binLimit)},CollapsingHighestDenseStore.prototype._adjust=function(t,e){if(e-t+1>this.length())if((e=t+this.length()+1)<=this.minKey)this.offset=t,this.maxKey=e,this.bins.fill(0),this.bins[this.length()-1]=this.count;else{var i=this.offset-t;if(i>0){var n=e-this.offset+1,r=this.maxKey-this.offset+1,s=(0,o.sumOfRange)(this.bins,n,r);this.bins.fill(0,n,r),this.bins[n-1]+=s,this.maxKey=e,this._shiftBins(i)}else this.maxKey=e,this._shiftBins(i);this.minKey=t,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},CollapsingHighestDenseStore.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return this.length()-1}else t>this.maxKey&&this._extendRange(t);return t-this.offset},CollapsingHighestDenseStore}(r.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js"(t,e,i){var n=this&&this.__extends||function(){var extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingLowestDenseStore=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),o=i("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingLowestDenseStore=function(t){function CollapsingLowestDenseStore(e,i){var n=t.call(this,i)||this;return n.binLimit=e,n.isCollapsed=!1,n}return n(CollapsingLowestDenseStore,t),CollapsingLowestDenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,i=Math.min(this.minKey,t.maxKey+1)-t.offset;if(i>e){var n=(0,o.sumOfRange)(t.bins,e,i);this.bins[0]+=n}else i=e;for(var r=i+t.offset;r<t.maxKey+1;r++)this.bins[r-this.offset]+=t.bins[r-t.offset];this.count+=t.count}},CollapsingLowestDenseStore.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},CollapsingLowestDenseStore.prototype._getNewLength=function(t,e){var i=e-t+1;return Math.min(this.chunkSize*Math.ceil(i/this.chunkSize),this.binLimit)},CollapsingLowestDenseStore.prototype._adjust=function(t,e){if(e-t+1>this.length()){if((t=e-this.length()+1)>=this.maxKey)this.offset=t,this.minKey=t,this.bins.fill(0),this.bins[0]=this.count;else{var i=this.offset-t;if(i<0){var n=this.minKey-this.offset,r=t-this.offset,s=(0,o.sumOfRange)(this.bins,n,r);this.bins.fill(0,n,r),this.bins[r]+=s,this.minKey=t,this._shiftBins(i)}else this.minKey=t,this._shiftBins(i)}this.maxKey=e,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},CollapsingLowestDenseStore.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return 0}else t>this.maxKey&&this._extendRange(t);return t-this.offset},CollapsingLowestDenseStore}(r.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"(t,e,i){var n=this&&this.__spreadArray||function(t,e,i){if(i||2==arguments.length)for(var n,r=0,o=e.length;r<o;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DenseStore=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/store/util.js"),o=128;e.DenseStore=function(){function DenseStore(t){void 0===t&&(t=o),this.chunkSize=t,this.bins=[],this.count=0,this.minKey=1/0,this.maxKey=-1/0,this.offset=0}return DenseStore.prototype.add=function(t,e){void 0===e&&(e=1);var i=this._getIndex(t);this.bins[i]+=e,this.count+=e},DenseStore.prototype.keyAtRank=function(t,e){void 0===e&&(e=!0);for(var i=0,n=0;n<this.length();n++)if(i+=this.bins[n],e&&i>t||!e&&i>=t+1)return n+this.offset;return this.maxKey},DenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,i=Math.min(this.minKey,t.maxKey+1)-t.offset;if(i>e){var n=(0,r.sumOfRange)(t.bins,e,i);this.bins[0]+=n}else i=e;for(var o=i+t.offset;o<t.maxKey+1;o++)this.bins[o-this.offset]+=t.bins[o-t.offset];this.count+=t.count}},DenseStore.prototype.copy=function(t){this.bins=n([],t.bins,!0),this.count=t.count,this.minKey=t.minKey,this.maxKey=t.maxKey,this.offset=t.offset},DenseStore.prototype.length=function(){return this.bins.length},DenseStore.prototype._getNewLength=function(t,e){var i=e-t+1;return this.chunkSize*Math.ceil(i/this.chunkSize)},DenseStore.prototype._adjust=function(t,e){this._centerBins(t,e),this.minKey=t,this.maxKey=e},DenseStore.prototype._shiftBins=function(t){var e,i;t>0?(this.bins=this.bins.slice(0,-t),(e=this.bins).unshift.apply(e,Array(t).fill(0))):(this.bins=this.bins.slice(Math.abs(t)),(i=this.bins).push.apply(i,Array(Math.abs(t)).fill(0))),this.offset-=t},DenseStore.prototype._centerBins=function(t,e){var i=t+Math.floor((e-t+1)/2);this._shiftBins(Math.floor(this.offset+this.length()/2)-i)},DenseStore.prototype._extendRange=function(t,e){e=e||t;var i,n=Math.min(t,e,this.minKey),r=Math.max(t,e,this.maxKey);if(0===this.length())this.bins=Array(this._getNewLength(n,r)).fill(0),this.offset=n,this._adjust(n,r);else if(n>=this.minKey&&r<this.offset+this.length())this.minKey=n,this.maxKey=r;else{var o=this._getNewLength(n,r);o>this.length()&&(i=this.bins).push.apply(i,Array(o-this.length()).fill(0)),this._adjust(n,r)}},DenseStore.prototype._getIndex=function(t){return t<this.minKey?this._extendRange(t):t>this.maxKey&&this._extendRange(t),t-this.offset},DenseStore.prototype.toProto=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").Store.create({contiguousBinCounts:this.bins,contiguousBinIndexOffset:this.offset})},DenseStore.fromProto=function(t){if(!t||null==t.contiguousBinCounts||null==t.contiguousBinIndexOffset)throw Error("Failed to decode store from protobuf");var e=new this,i=t.contiguousBinIndexOffset;e.offset=i;for(var n=0,r=t.contiguousBinCounts;n<r.length;n++){var o=r[n];e.add(i,o),i+=1}return e},DenseStore}()},"./@datadog/sketches-js/dist/ddsketch/store/index.js"(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=e.CollapsingLowestDenseStore=e.DenseStore=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js");Object.defineProperty(e,"DenseStore",{enumerable:!0,get:function(){return n.DenseStore}});var r=i("./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js");Object.defineProperty(e,"CollapsingLowestDenseStore",{enumerable:!0,get:function(){return r.CollapsingLowestDenseStore}});var o=i("./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js");Object.defineProperty(e,"CollapsingHighestDenseStore",{enumerable:!0,get:function(){return o.CollapsingHighestDenseStore}})},"./@datadog/sketches-js/dist/ddsketch/store/util.js"(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.sumOfRange=void 0,e.sumOfRange=function(t,e,i){for(var n=0,r=e;r<=i;r++)n+=t[r];return n}},"./@datadog/sketches-js/dist/index.js"(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i("./@datadog/sketches-js/dist/ddsketch/index.js"),e)},"./@protobufjs/aspromise/index.js"(t){t.exports=asPromise;function asPromise(t,e){for(var i=Array(arguments.length-1),n=0,r=2,o=!0;r<arguments.length;)i[n++]=arguments[r++];return new Promise(function(r,s){i[n]=function(t){if(o)if(o=!1,t)s(t);else{for(var e=Array(arguments.length-1),i=0;i<e.length;)e[i++]=arguments[i];r.apply(null,e)}};try{t.apply(e||null,i)}catch(t){o&&(o=!1,s(t))}})}},"./@protobufjs/base64/index.js"(t,e){var i=e;i.length=function(t){var e=t.length;if(!e)return 0;for(var i=0;--e%4>1&&"="===t.charAt(e);)++i;return Math.ceil(3*t.length)/4-i};for(var n=Array(64),r=Array(123),o=0;o<64;)r[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;i.encode=function(t,e,i){for(var r,o=null,s=[],a=0,u=0;e<i;){var p=t[e++];switch(u){case 0:s[a++]=n[p>>2],r=(3&p)<<4,u=1;break;case 1:s[a++]=n[r|p>>4],r=(15&p)<<2,u=2;break;case 2:s[a++]=n[r|p>>6],s[a++]=n[63&p],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return(u&&(s[a++]=n[r],s[a++]=61,1===u&&(s[a++]=61)),o)?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";i.decode=function(t,e,i){for(var n,o=i,a=0,u=0;u<t.length;){var p=t.charCodeAt(u++);if(61===p&&a>1)break;if(void 0===(p=r[p]))throw Error(s);switch(a){case 0:n=p,a=1;break;case 1:e[i++]=n<<2|(48&p)>>4,n=p,a=2;break;case 2:e[i++]=(15&n)<<4|(60&p)>>2,n=p,a=3;break;case 3:e[i++]=(3&n)<<6|p,a=0}}if(1===a)throw Error(s);return i-o},i.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},"./@protobufjs/eventemitter/index.js"(t){function EventEmitter(){this._listeners={}}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,e,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:i||this}),this},EventEmitter.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var i=this._listeners[t],n=0;n<i.length;)i[n].fn===e?i.splice(n,1):++n;return this},EventEmitter.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,i)}return this}},"./@protobufjs/float/index.js"(t){function factory(t){return"u">typeof Float32Array?!function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),n=128===i[3];function writeFloat_f32_cpy(t,n,r){e[0]=t,n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3]}function writeFloat_f32_rev(t,n,r){e[0]=t,n[r]=i[3],n[r+1]=i[2],n[r+2]=i[1],n[r+3]=i[0]}function readFloat_f32_cpy(t,n){return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i[3]=t[n+3],e[0]}function readFloat_f32_rev(t,n){return i[3]=t[n],i[2]=t[n+1],i[1]=t[n+2],i[0]=t[n+3],e[0]}t.writeFloatLE=n?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=n?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=n?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=n?readFloat_f32_rev:readFloat_f32_cpy}():!function(){function writeFloat_ieee754(t,e,i,n){var r=+(e<0);if(r&&(e=-e),0===e)t(1/e>0?0:0x80000000,i,n);else if(isNaN(e))t(0x7fc00000,i,n);else if(e>34028234663852886e22)t((r<<31|0x7f800000)>>>0,i,n);else if(e<11754943508222875e-54)t((r<<31|Math.round(e/1401298464324817e-60))>>>0,i,n);else{var o=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-o)*8388608);t((r<<31|o+127<<23|s)>>>0,i,n)}}function readFloat_ieee754(t,e,i){var n=t(e,i),r=(n>>31)*2+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:1/0*r:0===o?1401298464324817e-60*r*s:r*Math.pow(2,o-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)}(),"u">typeof Float64Array?!function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),n=128===i[7];function writeDouble_f64_cpy(t,n,r){e[0]=t,n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3],n[r+4]=i[4],n[r+5]=i[5],n[r+6]=i[6],n[r+7]=i[7]}function writeDouble_f64_rev(t,n,r){e[0]=t,n[r]=i[7],n[r+1]=i[6],n[r+2]=i[5],n[r+3]=i[4],n[r+4]=i[3],n[r+5]=i[2],n[r+6]=i[1],n[r+7]=i[0]}function readDouble_f64_cpy(t,n){return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i[3]=t[n+3],i[4]=t[n+4],i[5]=t[n+5],i[6]=t[n+6],i[7]=t[n+7],e[0]}function readDouble_f64_rev(t,n){return i[7]=t[n],i[6]=t[n+1],i[5]=t[n+2],i[4]=t[n+3],i[3]=t[n+4],i[2]=t[n+5],i[1]=t[n+6],i[0]=t[n+7],e[0]}t.writeDoubleLE=n?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=n?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=n?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=n?readDouble_f64_rev:readDouble_f64_cpy}():!function(){function writeDouble_ieee754(t,e,i,n,r,o){var s,a=+(n<0);if(a&&(n=-n),0===n)t(0,r,o+e),t(1/n>0?0:0x80000000,r,o+i);else if(isNaN(n))t(0,r,o+e),t(0x7ff80000,r,o+i);else if(n>17976931348623157e292)t(0,r,o+e),t((a<<31|0x7ff00000)>>>0,r,o+i);else if(n<22250738585072014e-324)t((s=n/5e-324)>>>0,r,o+e),t((a<<31|s/0x100000000)>>>0,r,o+i);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),t(0x10000000000000*(s=n*Math.pow(2,-u))>>>0,r,o+e),t((a<<31|u+1023<<20|1048576*s&1048575)>>>0,r,o+i)}}function readDouble_ieee754(t,e,i,n,r){var o=t(n,r+e),s=t(n,r+i),a=(s>>31)*2+1,u=s>>>20&2047,p=0x100000000*(1048575&s)+o;return 2047===u?p?NaN:1/0*a:0===u?5e-324*a*p:a*Math.pow(2,u-1075)*(p+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)}(),t}function writeUintLE(t,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}function writeUintBE(t,e,i){e[i]=t>>>24,e[i+1]=t>>>16&255,e[i+2]=t>>>8&255,e[i+3]=255&t}function readUintLE(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function readUintBE(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=factory(factory)},"./@protobufjs/inquire/index.js"(module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},"./@protobufjs/pool/index.js"(t){t.exports=pool;function pool(t,e,i){var n=i||8192,r=n>>>1,o=null,s=n;return function(i){if(i<1||i>r)return t(i);s+i>n&&(o=t(n),s=0);var a=e.call(o,s,s+=i);return 7&s&&(s=(7|s)+1),a}}},"./@protobufjs/utf8/index.js"(t,e){var i=e;i.length=function(t){for(var e=0,i=0,n=0;n<t.length;++n)(i=t.charCodeAt(n))<128?e+=1:i<2048?e+=2:(64512&i)==55296&&(64512&t.charCodeAt(n+1))==56320?(++n,e+=4):e+=3;return e},i.read=function(t,e,i){if(i-e<1)return"";for(var n,r=null,o=[],s=0;e<i;)(n=t[e++])<128?o[s++]=n:n>191&&n<224?o[s++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),s=0);return r?(s&&r.push(String.fromCharCode.apply(String,o.slice(0,s))),r.join("")):String.fromCharCode.apply(String,o.slice(0,s))},i.write=function(t,e,i){for(var n,r,o=i,s=0;s<t.length;++s)(n=t.charCodeAt(s))<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:((64512&n)==55296&&(64512&(r=t.charCodeAt(s+1)))==56320?(n=65536+((1023&n)<<10)+(1023&r),++s,e[i++]=n>>18|240,e[i++]=n>>12&63|128):e[i++]=n>>12|224,e[i++]=n>>6&63|128),e[i++]=63&n|128);return i-o}},"./protobufjs/minimal.js"(t,e,i){t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,e,i){var n=e;function configure(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=i("./protobufjs/src/writer.js"),n.BufferWriter=i("./protobufjs/src/writer_buffer.js"),n.Reader=i("./protobufjs/src/reader.js"),n.BufferReader=i("./protobufjs/src/reader_buffer.js"),n.util=i("./protobufjs/src/util/minimal.js"),n.rpc=i("./protobufjs/src/rpc.js"),n.roots=i("./protobufjs/src/roots.js"),n.configure=configure,configure()},"./protobufjs/src/reader.js"(t,e,i){t.exports=Reader;var n,r=i("./protobufjs/src/util/minimal.js"),o=r.LongBits,s=r.utf8;function indexOutOfRange(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length}var a="u">typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Reader(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Reader(t);throw Error("illegal buffer")},create=function(){return r.Buffer?function(t){return(Reader.create=function(t){return r.Buffer.isBuffer(t)?new n(t):a(t)})(t)}:a};function readLongVarint(){var t=new o(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new o(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader.create=create(),Reader.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,Reader.prototype.uint32=function(){var t=0xffffffff;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return t}}(),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(){return 0!==this.uint32()},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=r.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=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.bytes=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,i);if(e===i){var n=r.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,i)},Reader.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},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.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){n=t,Reader.create=create(),n._configure();var e=r.Long?"toLong":"toNumber";r.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[e](!1)},uint64:function(){return readLongVarint.call(this)[e](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[e](!1)},fixed64:function(){return readFixed64.call(this)[e](!0)},sfixed64:function(){return readFixed64.call(this)[e](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,e,i){t.exports=BufferReader;var n=i("./protobufjs/src/reader.js");(BufferReader.prototype=Object.create(n.prototype)).constructor=BufferReader;var r=i("./protobufjs/src/util/minimal.js");function BufferReader(t){n.call(this,t)}BufferReader._configure=function(){r.Buffer&&(BufferReader.prototype._slice=r.Buffer.prototype.slice)},BufferReader.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},BufferReader._configure()},"./protobufjs/src/roots.js"(t){t.exports={}},"./protobufjs/src/rpc.js"(t,e,i){e.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,e,i){t.exports=Service;var n=i("./protobufjs/src/util/minimal.js");function Service(t,e,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!i}(Service.prototype=Object.create(n.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function rpcCall(t,e,i,r,o){if(!r)throw TypeError("request must be specified");var s=this;if(!o)return n.asPromise(rpcCall,s,t,e,i,r);if(!s.rpcImpl)return void setTimeout(function(){o(Error("already ended"))},0);try{return s.rpcImpl(t,e[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(e,n){if(e)return s.emit("error",e,t),o(e);if(null===n)return void s.end(!0);if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",n,t),o(null,n)})}catch(e){s.emit("error",e,t),setTimeout(function(){o(e)},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/longbits.js"(t,e,i){t.exports=LongBits;var n=i("./protobufjs/src/util/minimal.js");function LongBits(t,e){this.lo=t>>>0,this.hi=e>>>0}var r=LongBits.zero=new LongBits(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var o=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return r;var e=t<0;e&&(t=-t);var i=t>>>0,n=(t-i)/0x100000000>>>0;return e&&(n=~n>>>0,i=~i>>>0,++i>0xffffffff&&(i=0,++n>0xffffffff&&(n=0))),new LongBits(i,n)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if(n.isString(t))if(!n.Long)return LongBits.fromNumber(parseInt(t,10));else t=n.Long.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):r},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,i=~this.hi>>>0;return e||(i=i+1>>>0),-(e+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===o?r:new LongBits((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.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,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}},"./protobufjs/src/util/minimal.js"(t,e,i){var n=e;function merge(t,e,i){for(var n=Object.keys(e),r=0;r<n.length;++r)void 0!==t[n[r]]&&i||(t[n[r]]=e[n[r]]);return t}function newError(t){function CustomError(t,e){if(!(this instanceof CustomError))return new CustomError(t,e);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),e&&merge(this,e)}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}n.asPromise=i("./@protobufjs/aspromise/index.js"),n.base64=i("./@protobufjs/base64/index.js"),n.EventEmitter=i("./@protobufjs/eventemitter/index.js"),n.float=i("./@protobufjs/float/index.js"),n.inquire=i("./@protobufjs/inquire/index.js"),n.utf8=i("./@protobufjs/utf8/index.js"),n.pool=i("./@protobufjs/pool/index.js"),n.LongBits=i("./protobufjs/src/util/longbits.js"),n.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),n.global=n.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n.isString=function(t){return"string"==typeof t||t instanceof String},n.isObject=function(t){return t&&"object"==typeof t},n.isset=n.isSet=function(t,e){var i=t[e];return!!(null!=i&&t.hasOwnProperty(e))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"==typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"u"<typeof Uint8Array?t:new Uint8Array(t)},n.Array="u">typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var i=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(i.lo,i.hi,e):i.toNumber(!!e)},n.merge=merge,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=newError,n.ProtocolError=newError("ProtocolError"),n.oneOfGetter=function(t){for(var e={},i=0;i<t.length;++i)e[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===e[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},n.oneOfSetter=function(t){return function(e){for(var i=0;i<t.length;++i)t[i]!==e&&delete this[t[i]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var t=n.Buffer;if(!t){n._Buffer_from=n._Buffer_allocUnsafe=null;return}n._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,i){return new t(e,i)},n._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}}},"./protobufjs/src/writer.js"(t,e,i){t.exports=Writer;var n,r=i("./protobufjs/src/util/minimal.js"),o=r.LongBits,s=r.base64,a=r.utf8;function Op(t,e,i){this.fn=t,this.len=e,this.next=void 0,this.val=i}function noop(){}function State(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Writer(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create=function(){return r.Buffer?function(){return(Writer.create=function(){return new n})()}:function(){return new Writer}};function writeByte(t,e,i){e[i]=255&t}function writeVarint32(t,e,i){for(;t>127;)e[i++]=127&t|128,t>>>=7;e[i]=t}function VarintOp(t,e){this.len=t,this.next=void 0,this.val=e}function writeVarint64(t,e,i){for(;t.hi;)e[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[i++]=127&t.lo|128,t.lo=t.lo>>>7;e[i++]=t.lo}function writeFixed32(t,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}Writer.create=create(),Writer.alloc=function(t){return new r.Array(t)},r.Array!==Array&&(Writer.alloc=r.pool(Writer.alloc,r.Array.prototype.subarray)),Writer.prototype._push=function(t,e,i){return this.tail=this.tail.next=new Op(t,e,i),this.len+=e,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new VarintOp((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5,t)).len,this},Writer.prototype.int32=function(t){return t<0?this._push(writeVarint64,10,o.fromNumber(t)):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var e=o.from(t);return this._push(writeVarint64,e.length(),e)},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(writeVarint64,e.length(),e)},Writer.prototype.bool=function(t){return this._push(writeByte,1,+!!t)},Writer.prototype.fixed32=function(t){return this._push(writeFixed32,4,t>>>0)},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var e=o.from(t);return this._push(writeFixed32,4,e.lo)._push(writeFixed32,4,e.hi)},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._push(r.float.writeFloatLE,4,t)},Writer.prototype.double=function(t){return this._push(r.float.writeDoubleLE,8,t)};var u=r.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var n=0;n<t.length;++n)e[i+n]=t[n]};Writer.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(writeByte,1,0);if(r.isString(t)){var i=Writer.alloc(e=s.length(t));s.decode(t,i,0),t=i}return this.uint32(e)._push(u,e,t)},Writer.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(writeByte,1,0)},Writer.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this},Writer.prototype.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=e,this.len+=i),this},Writer.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,e,i),i+=t.len,t=t.next;return e},Writer._configure=function(t){n=t,Writer.create=create(),n._configure()}},"./protobufjs/src/writer_buffer.js"(t,e,i){t.exports=BufferWriter;var n=i("./protobufjs/src/writer.js");(BufferWriter.prototype=Object.create(n.prototype)).constructor=BufferWriter;var r=i("./protobufjs/src/util/minimal.js");function BufferWriter(){n.call(this)}function writeStringBuffer(t,e,i){t.length<40?r.utf8.write(t,e,i):e.utf8Write?e.utf8Write(t,i):e.write(t,i)}BufferWriter._configure=function(){BufferWriter.alloc=r._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(t,e,i){e.set(t,i)}:function(t,e,i){if(t.copy)t.copy(e,i,0,t.length);else for(var n=0;n<t.length;)e[i++]=t[n++]}},BufferWriter.prototype.bytes=function(t){r.isString(t)&&(t=r._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(BufferWriter.writeBytesBuffer,e,t),this},BufferWriter.prototype.string=function(t){var e=r.Buffer.byteLength(t);return this.uint32(e),e&&this._push(writeStringBuffer,e,t),this},BufferWriter._configure()}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(i.exports,i,i.exports,__webpack_require__),i.exports}var __webpack_exports__=__webpack_require__("./@datadog/sketches-js/dist/index.js");module.exports=__webpack_exports__})();
|
|
1
|
+
(()=>{var t={"./@datadog/sketches-js/dist/ddsketch/DDSketch.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.LogCollapsingHighestDenseDDSketch=e.LogCollapsingLowestDenseDDSketch=e.DDSketch=void 0;var o=i("./@datadog/sketches-js/dist/ddsketch/store/index.js"),s=i("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),u=function(){function BaseDDSketch(t){var e=t.mapping,i=t.store,n=t.negativeStore,r=t.zeroCount;this.mapping=e,this.store=i,this.negativeStore=n,this.zeroCount=r,this.count=this.negativeStore.count+this.zeroCount+this.store.count,this.min=1/0,this.max=-1/0,this.sum=0}return BaseDDSketch.prototype.accept=function(t,e){if(void 0===e&&(e=1),e<=0)throw Error("Weight must be a positive number");if(t>this.mapping.minPossible){var i=this.mapping.key(t);this.store.add(i,e)}else if(t<-this.mapping.minPossible){var i=this.mapping.key(-t);this.negativeStore.add(i,e)}else this.zeroCount+=e;this.count+=e,this.sum+=t*e,t<this.min&&(this.min=t),t>this.max&&(this.max=t)},BaseDDSketch.prototype.getValueAtQuantile=function(t){if(t<0||t>1||0===this.count)return NaN;var e=t*(this.count-1),i=0;if(e<this.negativeStore.count){var n=this.negativeStore.count-e-1,r=this.negativeStore.keyAtRank(n,!1);i=-this.mapping.value(r)}else{if(e<this.zeroCount+this.negativeStore.count)return 0;var r=this.store.keyAtRank(e-this.zeroCount-this.negativeStore.count);i=this.mapping.value(r)}return i},BaseDDSketch.prototype.merge=function(t){if(!this.mergeable(t))throw Error("Cannot merge two DDSketches with different `relativeAccuracy` parameters");if(0!==t.count){if(0===this.count)return void this._copy(t);this.store.merge(t.store),this.zeroCount+=t.zeroCount,this.count+=t.count,this.sum+=t.sum,t.min<this.min&&(this.min=t.min),t.max>this.max&&(this.max=t.max)}},BaseDDSketch.prototype.mergeable=function(t){return this.mapping.gamma===t.mapping.gamma},BaseDDSketch.prototype._copy=function(t){this.store.copy(t.store),this.negativeStore.copy(t.negativeStore),this.zeroCount=t.zeroCount,this.min=t.min,this.max=t.max,this.count=t.count,this.sum=t.sum},BaseDDSketch.prototype.toProto=function(){var t=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch,e=t.create({mapping:this.mapping.toProto(),positiveValues:this.store.toProto(),negativeValues:this.negativeStore.toProto(),zeroCount:this.zeroCount});return t.encode(e).finish()},BaseDDSketch.fromProto=function(t){var e=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").DDSketch.decode(t);return new BaseDDSketch({mapping:s.KeyMapping.fromProto(e.mapping),store:o.DenseStore.fromProto(e.positiveValues),negativeStore:o.DenseStore.fromProto(e.negativeValues),zeroCount:e.zeroCount})},BaseDDSketch}(),a={relativeAccuracy:.01};e.DDSketch=function(t){function DDSketch(e){var i=(void 0===e?a:e).relativeAccuracy,n=new s.LogarithmicMapping(void 0===i?.01:i),r=new o.DenseStore,u=new o.DenseStore;return t.call(this,{mapping:n,store:r,negativeStore:u,zeroCount:0})||this}return r(DDSketch,t),DDSketch}(u),e.LogCollapsingLowestDenseDDSketch=function(t){function LogCollapsingLowestDenseDDSketch(e){var i=void 0===e?a:e,n=i.relativeAccuracy,r=i.binLimit,u=void 0===r?2048:r,h=new s.LogarithmicMapping(void 0===n?.01:n),f=new o.CollapsingLowestDenseStore(u),l=new o.CollapsingLowestDenseStore(u);return t.call(this,{mapping:h,store:f,negativeStore:l,zeroCount:0})||this}return r(LogCollapsingLowestDenseDDSketch,t),LogCollapsingLowestDenseDDSketch}(u),e.LogCollapsingHighestDenseDDSketch=function(t){function LogCollapsingHighestDenseDDSketch(e){var i=void 0===e?a:e,n=i.relativeAccuracy,r=i.binLimit,u=void 0===r?2048:r,h=new s.LogarithmicMapping(void 0===n?.01:n),f=new o.CollapsingHighestDenseStore(u),l=new o.CollapsingHighestDenseStore(u);return t.call(this,{mapping:h,store:f,negativeStore:l,zeroCount:0})||this}return r(LogCollapsingHighestDenseDDSketch,t),LogCollapsingHighestDenseDDSketch}(u)},"./@datadog/sketches-js/dist/ddsketch/index.js"(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i("./@datadog/sketches-js/dist/ddsketch/DDSketch.js"),e)},"./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=void 0;var o=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),s=i("./@datadog/sketches-js/dist/ddsketch/math.js");e.CubicallyInterpolatedMapping=function(t){function CubicallyInterpolatedMapping(e,i){void 0===i&&(i=0);var n=t.call(this,e,i)||this;return n.A=6/35,n.B=-.6,n.C=10/7,n._multiplier/=n.C,n}return r(CubicallyInterpolatedMapping,t),CubicallyInterpolatedMapping.prototype._cubicLog2Approx=function(t){var e=(0,s.frexp)(t),i=e[0],n=e[1],r=2*i-1;return((this.A*r+this.B)*r+this.C)*r+(n-1)},CubicallyInterpolatedMapping.prototype._cubicExp2Approx=function(t){var e=Math.floor(t),i=this.B*this.B-3*this.A*this.C,n=2*this.B*this.B*this.B-9*this.A*this.B*this.C-27*this.A*this.A*(t-e),r=Math.cbrt((n-Math.sqrt(n*n-4*i*i*i))/2),o=-(this.B+r+i/r)/(3*this.A)+1;return(0,s.ldexp)(o/2,e+1)},CubicallyInterpolatedMapping.prototype._logGamma=function(t){return this._cubicLog2Approx(t)*this._multiplier},CubicallyInterpolatedMapping.prototype._powGamma=function(t){return this._cubicExp2Approx(t/this._multiplier)},CubicallyInterpolatedMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.CUBIC},CubicallyInterpolatedMapping}(o.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyMapping=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/mapping/index.js"),r=Number.MAX_VALUE;e.KeyMapping=function(){function KeyMapping(t,e){if(void 0===e&&(e=0),t<=0||t>=1)throw Error("Relative accuracy must be between 0 and 1 when initializing a KeyMapping");this.relativeAccuracy=t,this._offset=e;var i=2*t/(1-t);this.gamma=1+i,this._multiplier=1/Math.log1p(i),this.minPossible=11125369292536007e-324*this.gamma,this.maxPossible=r/this.gamma}return KeyMapping.fromGammaOffset=function(t,e){return new this((t-1)/(t+1),e)},KeyMapping.prototype.key=function(t){return Math.ceil(this._logGamma(t))+this._offset},KeyMapping.prototype.value=function(t){return this._powGamma(t-this._offset)*(2/(1+this.gamma))},KeyMapping.prototype.toProto=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.create({gamma:this.gamma,indexOffset:this._offset,interpolation:this._protoInterpolation()})},KeyMapping.fromProto=function(t){if(!t||null==t.gamma||null==t.indexOffset)throw Error("Failed to decode mapping from protobuf");var e=i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation,r=t.interpolation,o=t.gamma,s=t.indexOffset;switch(r){case e.NONE:return n.LogarithmicMapping.fromGammaOffset(o,s);case e.LINEAR:return n.LinearlyInterpolatedMapping.fromGammaOffset(o,s);case e.CUBIC:return n.CubicallyInterpolatedMapping.fromGammaOffset(o,s);default:throw Error("Unrecognized mapping when decoding from protobuf")}},KeyMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},KeyMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},KeyMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},KeyMapping}()},"./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.LinearlyInterpolatedMapping=void 0;var o=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js"),s=i("./@datadog/sketches-js/dist/ddsketch/math.js");e.LinearlyInterpolatedMapping=function(t){function LinearlyInterpolatedMapping(e,i){return void 0===i&&(i=0),t.call(this,e,i)||this}return r(LinearlyInterpolatedMapping,t),LinearlyInterpolatedMapping.prototype._log2Approx=function(t){var e=(0,s.frexp)(t);return 2*e[0]-1+(e[1]-1)},LinearlyInterpolatedMapping.prototype._exp2Approx=function(t){var e=Math.floor(t)+1;return(0,s.ldexp)((t-e+2)/2,e)},LinearlyInterpolatedMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},LinearlyInterpolatedMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},LinearlyInterpolatedMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.LINEAR},LinearlyInterpolatedMapping}(o.KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.LogarithmicMapping=void 0,e.LogarithmicMapping=function(t){function LogarithmicMapping(e,i){void 0===i&&(i=0);var n=t.call(this,e,i)||this;return n._multiplier*=Math.log(2),n}return r(LogarithmicMapping,t),LogarithmicMapping.prototype._logGamma=function(t){return Math.log2(t)*this._multiplier},LogarithmicMapping.prototype._powGamma=function(t){return Math.pow(2,t/this._multiplier)},LogarithmicMapping.prototype._protoInterpolation=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").IndexMapping.Interpolation.NONE},LogarithmicMapping}(i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js").KeyMapping)},"./@datadog/sketches-js/dist/ddsketch/mapping/index.js"(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CubicallyInterpolatedMapping=e.LinearlyInterpolatedMapping=e.LogarithmicMapping=e.KeyMapping=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/mapping/KeyMapping.js");Object.defineProperty(e,"KeyMapping",{enumerable:!0,get:function(){return n.KeyMapping}});var r=i("./@datadog/sketches-js/dist/ddsketch/mapping/LogarithmicMapping.js");Object.defineProperty(e,"LogarithmicMapping",{enumerable:!0,get:function(){return r.LogarithmicMapping}});var o=i("./@datadog/sketches-js/dist/ddsketch/mapping/LinearlyInterpolatedMapping.js");Object.defineProperty(e,"LinearlyInterpolatedMapping",{enumerable:!0,get:function(){return o.LinearlyInterpolatedMapping}});var s=i("./@datadog/sketches-js/dist/ddsketch/mapping/CubicallyInterpolatedMapping.js");Object.defineProperty(e,"CubicallyInterpolatedMapping",{enumerable:!0,get:function(){return s.CubicallyInterpolatedMapping}})},"./@datadog/sketches-js/dist/ddsketch/math.js"(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ldexp=e.frexp=void 0,e.frexp=function(t){if(0===t||!Number.isFinite(t))return[t,0];for(var e=Math.abs(t),i=Math.max(-1023,Math.floor(Math.log2(e))+1),n=e*Math.pow(2,-i);n<.5;)n*=2,i--;for(;n>=1;)n*=.5,i++;return t<0&&(n=-n),[n,i]},e.ldexp=function(t,e){for(var i=Math.min(3,Math.ceil(Math.abs(e)/1023)),n=t,r=0;r<i;r++)n*=Math.pow(2,Math.floor((e+r)/i));return n}},"./@datadog/sketches-js/dist/ddsketch/proto/compiled.js"(t,e,i){"use strict";var n=i("./protobufjs/minimal.js"),r=n.Reader,o=n.Writer,s=n.util,u=n.roots.default||(n.roots.default={});u.DDSketch=function(){function DDSketch(t){if(t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return DDSketch.prototype.mapping=null,DDSketch.prototype.positiveValues=null,DDSketch.prototype.negativeValues=null,DDSketch.prototype.zeroCount=0,DDSketch.create=function(t){return new DDSketch(t)},DDSketch.encode=function(t,e){return e||(e=o.create()),null!=t.mapping&&Object.hasOwnProperty.call(t,"mapping")&&u.IndexMapping.encode(t.mapping,e.uint32(10).fork()).ldelim(),null!=t.positiveValues&&Object.hasOwnProperty.call(t,"positiveValues")&&u.Store.encode(t.positiveValues,e.uint32(18).fork()).ldelim(),null!=t.negativeValues&&Object.hasOwnProperty.call(t,"negativeValues")&&u.Store.encode(t.negativeValues,e.uint32(26).fork()).ldelim(),null!=t.zeroCount&&Object.hasOwnProperty.call(t,"zeroCount")&&e.uint32(33).double(t.zeroCount),e},DDSketch.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},DDSketch.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i=void 0===e?t.len:t.pos+e,n=new u.DDSketch;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:n.mapping=u.IndexMapping.decode(t,t.uint32());break;case 2:n.positiveValues=u.Store.decode(t,t.uint32());break;case 3:n.negativeValues=u.Store.decode(t,t.uint32());break;case 4:n.zeroCount=t.double();break;default:t.skipType(7&o)}}return n},DDSketch.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},DDSketch.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.mapping&&t.hasOwnProperty("mapping")){var e=u.IndexMapping.verify(t.mapping);if(e)return"mapping."+e}if(null!=t.positiveValues&&t.hasOwnProperty("positiveValues")){var e=u.Store.verify(t.positiveValues);if(e)return"positiveValues."+e}if(null!=t.negativeValues&&t.hasOwnProperty("negativeValues")){var e=u.Store.verify(t.negativeValues);if(e)return"negativeValues."+e}return null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&"number"!=typeof t.zeroCount?"zeroCount: number expected":null},DDSketch.fromObject=function(t){if(t instanceof u.DDSketch)return t;var e=new u.DDSketch;if(null!=t.mapping){if("object"!=typeof t.mapping)throw TypeError(".DDSketch.mapping: object expected");e.mapping=u.IndexMapping.fromObject(t.mapping)}if(null!=t.positiveValues){if("object"!=typeof t.positiveValues)throw TypeError(".DDSketch.positiveValues: object expected");e.positiveValues=u.Store.fromObject(t.positiveValues)}if(null!=t.negativeValues){if("object"!=typeof t.negativeValues)throw TypeError(".DDSketch.negativeValues: object expected");e.negativeValues=u.Store.fromObject(t.negativeValues)}return null!=t.zeroCount&&(e.zeroCount=Number(t.zeroCount)),e},DDSketch.toObject=function(t,e){e||(e={});var i={};return e.defaults&&(i.mapping=null,i.positiveValues=null,i.negativeValues=null,i.zeroCount=0),null!=t.mapping&&t.hasOwnProperty("mapping")&&(i.mapping=u.IndexMapping.toObject(t.mapping,e)),null!=t.positiveValues&&t.hasOwnProperty("positiveValues")&&(i.positiveValues=u.Store.toObject(t.positiveValues,e)),null!=t.negativeValues&&t.hasOwnProperty("negativeValues")&&(i.negativeValues=u.Store.toObject(t.negativeValues,e)),null!=t.zeroCount&&t.hasOwnProperty("zeroCount")&&(i.zeroCount=e.json&&!isFinite(t.zeroCount)?String(t.zeroCount):t.zeroCount),i},DDSketch.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},DDSketch}(),u.IndexMapping=function(){var t,e;function IndexMapping(t){if(t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return IndexMapping.prototype.gamma=0,IndexMapping.prototype.indexOffset=0,IndexMapping.prototype.interpolation=0,IndexMapping.create=function(t){return new IndexMapping(t)},IndexMapping.encode=function(t,e){return e||(e=o.create()),null!=t.gamma&&Object.hasOwnProperty.call(t,"gamma")&&e.uint32(9).double(t.gamma),null!=t.indexOffset&&Object.hasOwnProperty.call(t,"indexOffset")&&e.uint32(17).double(t.indexOffset),null!=t.interpolation&&Object.hasOwnProperty.call(t,"interpolation")&&e.uint32(24).int32(t.interpolation),e},IndexMapping.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},IndexMapping.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i=void 0===e?t.len:t.pos+e,n=new u.IndexMapping;t.pos<i;){var o=t.uint32();switch(o>>>3){case 1:n.gamma=t.double();break;case 2:n.indexOffset=t.double();break;case 3:n.interpolation=t.int32();break;default:t.skipType(7&o)}}return n},IndexMapping.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},IndexMapping.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.gamma&&t.hasOwnProperty("gamma")&&"number"!=typeof t.gamma)return"gamma: number expected";if(null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&"number"!=typeof t.indexOffset)return"indexOffset: number expected";if(null!=t.interpolation&&t.hasOwnProperty("interpolation"))switch(t.interpolation){default:return"interpolation: enum value expected";case 0:case 1:case 2:case 3:}return null},IndexMapping.fromObject=function(t){if(t instanceof u.IndexMapping)return t;var e=new u.IndexMapping;switch(null!=t.gamma&&(e.gamma=Number(t.gamma)),null!=t.indexOffset&&(e.indexOffset=Number(t.indexOffset)),t.interpolation){case"NONE":case 0:e.interpolation=0;break;case"LINEAR":case 1:e.interpolation=1;break;case"QUADRATIC":case 2:e.interpolation=2;break;case"CUBIC":case 3:e.interpolation=3}return e},IndexMapping.toObject=function(t,e){e||(e={});var i={};return e.defaults&&(i.gamma=0,i.indexOffset=0,i.interpolation=e.enums===String?"NONE":0),null!=t.gamma&&t.hasOwnProperty("gamma")&&(i.gamma=e.json&&!isFinite(t.gamma)?String(t.gamma):t.gamma),null!=t.indexOffset&&t.hasOwnProperty("indexOffset")&&(i.indexOffset=e.json&&!isFinite(t.indexOffset)?String(t.indexOffset):t.indexOffset),null!=t.interpolation&&t.hasOwnProperty("interpolation")&&(i.interpolation=e.enums===String?u.IndexMapping.Interpolation[t.interpolation]:t.interpolation),i},IndexMapping.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},(e=Object.create(t={}))[t[0]="NONE"]=0,e[t[1]="LINEAR"]=1,e[t[2]="QUADRATIC"]=2,e[t[3]="CUBIC"]=3,IndexMapping.Interpolation=e,IndexMapping}(),u.Store=function(){function Store(t){if(this.binCounts={},this.contiguousBinCounts=[],t)for(var e=Object.keys(t),i=0;i<e.length;++i)null!=t[e[i]]&&(this[e[i]]=t[e[i]])}return Store.prototype.binCounts=s.emptyObject,Store.prototype.contiguousBinCounts=s.emptyArray,Store.prototype.contiguousBinIndexOffset=0,Store.create=function(t){return new Store(t)},Store.encode=function(t,e){if(e||(e=o.create()),null!=t.binCounts&&Object.hasOwnProperty.call(t,"binCounts"))for(var i=Object.keys(t.binCounts),n=0;n<i.length;++n)e.uint32(10).fork().uint32(8).sint32(i[n]).uint32(17).double(t.binCounts[i[n]]).ldelim();if(null!=t.contiguousBinCounts&&t.contiguousBinCounts.length){e.uint32(18).fork();for(var n=0;n<t.contiguousBinCounts.length;++n)e.double(t.contiguousBinCounts[n]);e.ldelim()}return null!=t.contiguousBinIndexOffset&&Object.hasOwnProperty.call(t,"contiguousBinIndexOffset")&&e.uint32(24).sint32(t.contiguousBinIndexOffset),e},Store.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},Store.decode=function(t,e){t instanceof r||(t=r.create(t));for(var i,n,o=void 0===e?t.len:t.pos+e,a=new u.Store;t.pos<o;){var h=t.uint32();switch(h>>>3){case 1:a.binCounts===s.emptyObject&&(a.binCounts={});var f=t.uint32()+t.pos;for(i=0,n=0;t.pos<f;){var l=t.uint32();switch(l>>>3){case 1:i=t.sint32();break;case 2:n=t.double();break;default:t.skipType(7&l)}}a.binCounts[i]=n;break;case 2:if(a.contiguousBinCounts&&a.contiguousBinCounts.length||(a.contiguousBinCounts=[]),(7&h)==2)for(var f=t.uint32()+t.pos;t.pos<f;)a.contiguousBinCounts.push(t.double());else a.contiguousBinCounts.push(t.double());break;case 3:a.contiguousBinIndexOffset=t.sint32();break;default:t.skipType(7&h)}}return a},Store.decodeDelimited=function(t){return t instanceof r||(t=new r(t)),this.decode(t,t.uint32())},Store.verify=function(t){if("object"!=typeof t||null===t)return"object expected";if(null!=t.binCounts&&t.hasOwnProperty("binCounts")){if(!s.isObject(t.binCounts))return"binCounts: object expected";for(var e=Object.keys(t.binCounts),i=0;i<e.length;++i){if(!s.key32Re.test(e[i]))return"binCounts: integer key{k:sint32} expected";if("number"!=typeof t.binCounts[e[i]])return"binCounts: number{k:sint32} expected"}}if(null!=t.contiguousBinCounts&&t.hasOwnProperty("contiguousBinCounts")){if(!Array.isArray(t.contiguousBinCounts))return"contiguousBinCounts: array expected";for(var i=0;i<t.contiguousBinCounts.length;++i)if("number"!=typeof t.contiguousBinCounts[i])return"contiguousBinCounts: number[] expected"}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&!s.isInteger(t.contiguousBinIndexOffset)?"contiguousBinIndexOffset: integer expected":null},Store.fromObject=function(t){if(t instanceof u.Store)return t;var e=new u.Store;if(t.binCounts){if("object"!=typeof t.binCounts)throw TypeError(".Store.binCounts: object expected");e.binCounts={};for(var i=Object.keys(t.binCounts),n=0;n<i.length;++n)e.binCounts[i[n]]=Number(t.binCounts[i[n]])}if(t.contiguousBinCounts){if(!Array.isArray(t.contiguousBinCounts))throw TypeError(".Store.contiguousBinCounts: array expected");e.contiguousBinCounts=[];for(var n=0;n<t.contiguousBinCounts.length;++n)e.contiguousBinCounts[n]=Number(t.contiguousBinCounts[n])}return null!=t.contiguousBinIndexOffset&&(e.contiguousBinIndexOffset=0|t.contiguousBinIndexOffset),e},Store.toObject=function(t,e){e||(e={});var i,n={};if((e.arrays||e.defaults)&&(n.contiguousBinCounts=[]),(e.objects||e.defaults)&&(n.binCounts={}),e.defaults&&(n.contiguousBinIndexOffset=0),t.binCounts&&(i=Object.keys(t.binCounts)).length){n.binCounts={};for(var r=0;r<i.length;++r)n.binCounts[i[r]]=e.json&&!isFinite(t.binCounts[i[r]])?String(t.binCounts[i[r]]):t.binCounts[i[r]]}if(t.contiguousBinCounts&&t.contiguousBinCounts.length){n.contiguousBinCounts=[];for(var r=0;r<t.contiguousBinCounts.length;++r)n.contiguousBinCounts[r]=e.json&&!isFinite(t.contiguousBinCounts[r])?String(t.contiguousBinCounts[r]):t.contiguousBinCounts[r]}return null!=t.contiguousBinIndexOffset&&t.hasOwnProperty("contiguousBinIndexOffset")&&(n.contiguousBinIndexOffset=t.contiguousBinIndexOffset),n},Store.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},Store}(),t.exports=u},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=void 0;var o=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),s=i("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingHighestDenseStore=function(t){function CollapsingHighestDenseStore(e,i){var n=t.call(this,i)||this;return n.binLimit=e,n.isCollapsed=!1,n}return r(CollapsingHighestDenseStore,t),CollapsingHighestDenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.maxKey-t.offset+1,i=Math.max(this.maxKey+1,t.minKey)-t.offset;if(e>i){var n=(0,s.sumOfRange)(t.bins,i,e);this.bins[this.length()-1]+=n}else i=e;for(var r=t.minKey;r<i+t.offset;r++)this.bins[r-this.offset]+=t.bins[r-t.offset];this.count+=t.count}},CollapsingHighestDenseStore.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},CollapsingHighestDenseStore.prototype._getNewLength=function(t,e){return Math.min(this.chunkSize*Math.ceil((e-t+1)/this.chunkSize),this.binLimit)},CollapsingHighestDenseStore.prototype._adjust=function(t,e){if(e-t+1>this.length())if((e=t+this.length()+1)<=this.minKey)this.offset=t,this.maxKey=e,this.bins.fill(0),this.bins[this.length()-1]=this.count;else{var i=this.offset-t;if(i>0){var n=e-this.offset+1,r=this.maxKey-this.offset+1,o=(0,s.sumOfRange)(this.bins,n,r);this.bins.fill(0,n,r),this.bins[n-1]+=o,this.maxKey=e,this._shiftBins(i)}else this.maxKey=e,this._shiftBins(i);this.minKey=t,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},CollapsingHighestDenseStore.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return this.length()-1}else t>this.maxKey&&this._extendRange(t);return t-this.offset},CollapsingHighestDenseStore}(o.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js"(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)});Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingLowestDenseStore=void 0;var o=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"),s=i("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.CollapsingLowestDenseStore=function(t){function CollapsingLowestDenseStore(e,i){var n=t.call(this,i)||this;return n.binLimit=e,n.isCollapsed=!1,n}return r(CollapsingLowestDenseStore,t),CollapsingLowestDenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,i=Math.min(this.minKey,t.maxKey+1)-t.offset;if(i>e){var n=(0,s.sumOfRange)(t.bins,e,i);this.bins[0]+=n}else i=e;for(var r=i+t.offset;r<t.maxKey+1;r++)this.bins[r-this.offset]+=t.bins[r-t.offset];this.count+=t.count}},CollapsingLowestDenseStore.prototype.copy=function(e){t.prototype.copy.call(this,e),this.isCollapsed=e.isCollapsed},CollapsingLowestDenseStore.prototype._getNewLength=function(t,e){return Math.min(this.chunkSize*Math.ceil((e-t+1)/this.chunkSize),this.binLimit)},CollapsingLowestDenseStore.prototype._adjust=function(t,e){if(e-t+1>this.length()){if((t=e-this.length()+1)>=this.maxKey)this.offset=t,this.minKey=t,this.bins.fill(0),this.bins[0]=this.count;else{var i=this.offset-t;if(i<0){var n=this.minKey-this.offset,r=t-this.offset,o=(0,s.sumOfRange)(this.bins,n,r);this.bins.fill(0,n,r),this.bins[r]+=o,this.minKey=t,this._shiftBins(i)}else this.minKey=t,this._shiftBins(i)}this.maxKey=e,this.isCollapsed=!0}else this._centerBins(t,e),this.minKey=t,this.maxKey=e},CollapsingLowestDenseStore.prototype._getIndex=function(t){if(t<this.minKey){if(this.isCollapsed||(this._extendRange(t),this.isCollapsed))return 0}else t>this.maxKey&&this._extendRange(t);return t-this.offset},CollapsingLowestDenseStore}(o.DenseStore)},"./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js"(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2==arguments.length)for(var n,r=0,o=e.length;r<o;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.DenseStore=void 0;var r=i("./@datadog/sketches-js/dist/ddsketch/store/util.js");e.DenseStore=function(){function DenseStore(t){void 0===t&&(t=128),this.chunkSize=t,this.bins=[],this.count=0,this.minKey=1/0,this.maxKey=-1/0,this.offset=0}return DenseStore.prototype.add=function(t,e){void 0===e&&(e=1);var i=this._getIndex(t);this.bins[i]+=e,this.count+=e},DenseStore.prototype.keyAtRank=function(t,e){void 0===e&&(e=!0);for(var i=0,n=0;n<this.length();n++)if(i+=this.bins[n],e&&i>t||!e&&i>=t+1)return n+this.offset;return this.maxKey},DenseStore.prototype.merge=function(t){if(0!==t.count){if(0===this.count)return void this.copy(t);(t.minKey<this.minKey||t.maxKey>this.maxKey)&&this._extendRange(t.minKey,t.maxKey);var e=t.minKey-t.offset,i=Math.min(this.minKey,t.maxKey+1)-t.offset;if(i>e){var n=(0,r.sumOfRange)(t.bins,e,i);this.bins[0]+=n}else i=e;for(var o=i+t.offset;o<t.maxKey+1;o++)this.bins[o-this.offset]+=t.bins[o-t.offset];this.count+=t.count}},DenseStore.prototype.copy=function(t){this.bins=n([],t.bins,!0),this.count=t.count,this.minKey=t.minKey,this.maxKey=t.maxKey,this.offset=t.offset},DenseStore.prototype.length=function(){return this.bins.length},DenseStore.prototype._getNewLength=function(t,e){return this.chunkSize*Math.ceil((e-t+1)/this.chunkSize)},DenseStore.prototype._adjust=function(t,e){this._centerBins(t,e),this.minKey=t,this.maxKey=e},DenseStore.prototype._shiftBins=function(t){var e,i;t>0?(this.bins=this.bins.slice(0,-t),(e=this.bins).unshift.apply(e,Array(t).fill(0))):(this.bins=this.bins.slice(Math.abs(t)),(i=this.bins).push.apply(i,Array(Math.abs(t)).fill(0))),this.offset-=t},DenseStore.prototype._centerBins=function(t,e){var i=t+Math.floor((e-t+1)/2);this._shiftBins(Math.floor(this.offset+this.length()/2)-i)},DenseStore.prototype._extendRange=function(t,e){e=e||t;var i,n=Math.min(t,e,this.minKey),r=Math.max(t,e,this.maxKey);if(0===this.length())this.bins=Array(this._getNewLength(n,r)).fill(0),this.offset=n,this._adjust(n,r);else if(n>=this.minKey&&r<this.offset+this.length())this.minKey=n,this.maxKey=r;else{var o=this._getNewLength(n,r);o>this.length()&&(i=this.bins).push.apply(i,Array(o-this.length()).fill(0)),this._adjust(n,r)}},DenseStore.prototype._getIndex=function(t){return t<this.minKey?this._extendRange(t):t>this.maxKey&&this._extendRange(t),t-this.offset},DenseStore.prototype.toProto=function(){return i("./@datadog/sketches-js/dist/ddsketch/proto/compiled.js").Store.create({contiguousBinCounts:this.bins,contiguousBinIndexOffset:this.offset})},DenseStore.fromProto=function(t){if(!t||null==t.contiguousBinCounts||null==t.contiguousBinIndexOffset)throw Error("Failed to decode store from protobuf");var e=new this,i=t.contiguousBinIndexOffset;e.offset=i;for(var n=0,r=t.contiguousBinCounts;n<r.length;n++){var o=r[n];e.add(i,o),i+=1}return e},DenseStore}()},"./@datadog/sketches-js/dist/ddsketch/store/index.js"(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsingHighestDenseStore=e.CollapsingLowestDenseStore=e.DenseStore=void 0;var n=i("./@datadog/sketches-js/dist/ddsketch/store/DenseStore.js");Object.defineProperty(e,"DenseStore",{enumerable:!0,get:function(){return n.DenseStore}});var r=i("./@datadog/sketches-js/dist/ddsketch/store/CollapsingLowestDenseStore.js");Object.defineProperty(e,"CollapsingLowestDenseStore",{enumerable:!0,get:function(){return r.CollapsingLowestDenseStore}});var o=i("./@datadog/sketches-js/dist/ddsketch/store/CollapsingHighestDenseStore.js");Object.defineProperty(e,"CollapsingHighestDenseStore",{enumerable:!0,get:function(){return o.CollapsingHighestDenseStore}})},"./@datadog/sketches-js/dist/ddsketch/store/util.js"(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sumOfRange=void 0,e.sumOfRange=function(t,e,i){for(var n=0,r=e;r<=i;r++)n+=t[r];return n}},"./@datadog/sketches-js/dist/index.js"(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(e,i);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,r)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i("./@datadog/sketches-js/dist/ddsketch/index.js"),e)},"./protobufjs/src/util sync recursive"(t){function webpackEmptyContext(t){var e=Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./protobufjs/src/util sync recursive",t.exports=webpackEmptyContext},"./long/umd/index.js"(t,e){!function(i,n){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return n(t),preferDefault(t)}):(n(e),t.exports=preferDefault(e))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=null;try{e=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,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var e=Math.clz32(t&-t);return t?31-e:e}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var i={},n={};function fromInt(t,e){var r,o,s;if(e)return(t>>>=0,(s=0<=t&&t<256)&&(o=n[t]))?o:(r=fromBits(t,0,!0),s&&(n[t]=r),r);return(t|=0,(s=-128<=t&&t<128)&&(o=i[t]))?o:(r=fromBits(t,t<0?-1:0,!1),s&&(i[t]=r),r)}function fromNumber(t,e){if(isNaN(t))return e?f:h;if(e){if(t<0)return f;if(t>=s)return d}else{if(t<=-u)return m;if(t+1>=u)return g}return t<0?fromNumber(-t,e).neg():fromBits(t%o|0,t/o|0,e)}function fromBits(t,e,i){return new Long(t,e,i)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var r=Math.pow;function fromString(t,e,i){if(0===t.length)throw Error("empty string");if("number"==typeof e?(i=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?f:h;if((i=i||10)<2||36<i)throw RangeError("radix");if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return fromString(t.substring(1),e,i).neg();for(var n,o=fromNumber(r(i,8)),s=h,u=0;u<t.length;u+=8){var a=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+a),i);if(a<8){var c=fromNumber(r(i,a));s=s.mul(c).add(fromNumber(l))}else s=(s=s.mul(o)).add(fromNumber(l))}return s.unsigned=e,s}function fromValue(t,e){return"number"==typeof t?fromNumber(t,e):"string"==typeof t?fromString(t,e):fromBits(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var o=0x100000000,s=0xffffffffffffffff,u=0x8000000000000000,a=fromInt(0x1000000),h=fromInt(0);Long.ZERO=h;var f=fromInt(0,!0);Long.UZERO=f;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 m=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=m;var y=Long.prototype;y.toInt=function(){return this.unsigned?this.low>>>0:this.low},y.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},y.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(m))return"-"+this.neg().toString(t);else{var e=fromNumber(t),i=this.div(e),n=i.mul(e).sub(this);return i.toString(t)+n.toInt().toString(t)}for(var o=fromNumber(r(t,6),this.unsigned),s=this,u="";;){var a=s.div(o),h=(s.sub(a.mul(o)).toInt()>>>0).toString(t);if((s=a).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},y.getHighBits=function(){return this.high},y.getHighBitsUnsigned=function(){return this.high>>>0},y.getLowBits=function(){return this.low},y.getLowBitsUnsigned=function(){return this.low>>>0},y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(m)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&(t&1<<e)==0;e--);return 0!=this.high?e+33:e+1},y.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},y.isZero=function(){return 0===this.high&&0===this.low},y.eqz=y.isZero,y.isNegative=function(){return!this.unsigned&&this.high<0},y.isPositive=function(){return this.unsigned||this.high>=0},y.isOdd=function(){return(1&this.low)==1},y.isEven=function(){return(1&this.low)==0},y.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},y.eq=y.equals,y.notEquals=function(t){return!this.eq(t)},y.neq=y.notEquals,y.ne=y.notEquals,y.lessThan=function(t){return 0>this.comp(t)},y.lt=y.lessThan,y.lessThanOrEqual=function(t){return 0>=this.comp(t)},y.lte=y.lessThanOrEqual,y.le=y.lessThanOrEqual,y.greaterThan=function(t){return this.comp(t)>0},y.gt=y.greaterThan,y.greaterThanOrEqual=function(t){return this.comp(t)>=0},y.gte=y.greaterThanOrEqual,y.ge=y.greaterThanOrEqual,y.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&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},y.comp=y.compare,y.negate=function(){return!this.unsigned&&this.eq(m)?m:this.not().add(l)},y.neg=y.negate,y.add=function(t){isLong(t)||(t=fromValue(t));var e,i,n=this.high>>>16,r=65535&this.high,o=this.low>>>16,s=65535&this.low,u=t.high>>>16,a=65535&t.high,h=t.low>>>16,f=65535&t.low,l=0,c=0;return e=0+((i=0+(s+f))>>>16),i&=65535,e+=o+h,c+=e>>>16,e&=65535,c+=r+a,l+=c>>>16,c&=65535,l+=n+u,fromBits(e<<16|i,(l&=65535)<<16|c,this.unsigned)},y.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},y.sub=y.subtract,y.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),e)return fromBits(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?f:h;if(this.eq(m))return t.isOdd()?m:h;if(t.eq(m))return this.isOdd()?m:h;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(a)&&t.lt(a))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var i,n,r=this.high>>>16,o=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,y=0;return i=0+((n=0+u*g)>>>16),n&=65535,i+=s*g,y+=i>>>16,i&=65535,i+=u*p,y+=i>>>16,i&=65535,y+=o*g,d+=y>>>16,y&=65535,y+=s*p,d+=y>>>16,y&=65535,y+=u*c,d+=y>>>16,y&=65535,d+=r*g+o*p+s*c+u*l,fromBits(i<<16|n,(d&=65535)<<16|y,this.unsigned)},y.mul=y.multiply,y.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(e){var i,n,o;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?f:h;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return f;if(t.gt(this.shru(1)))return c;o=f}else{if(this.eq(m))if(t.eq(l)||t.eq(p))return m;else return t.eq(m)?l:(i=this.shr(1).div(t).shl(1)).eq(h)?t.isNegative()?l:p:(n=this.sub(t.mul(i)),o=i.add(n.div(t)));if(t.eq(m))return this.unsigned?f:h;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();o=h}for(n=this;n.gte(t);){for(var s=Math.ceil(Math.log(i=Math.max(1,Math.floor(n.toNumber()/t.toNumber())))/Math.LN2),u=s<=48?1:r(2,s-48),a=fromNumber(i),g=a.mul(t);g.isNegative()||g.gt(n);)i-=u,g=(a=fromNumber(i,this.unsigned)).mul(t);a.isZero()&&(a=l),o=o.add(a),n=n.sub(g)}return o},y.div=y.divide,y.modulo=function(t){return(isLong(t)||(t=fromValue(t)),e)?fromBits((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},y.mod=y.modulo,y.rem=y.modulo,y.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},y.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},y.clz=y.countLeadingZeros,y.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},y.ctz=y.countTrailingZeros,y.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},y.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},y.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},y.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)},y.shl=y.shiftLeft,y.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)},y.shr=y.shiftRight,y.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)},y.shru=y.shiftRightUnsigned,y.shr_u=y.shiftRightUnsigned,y.rotateLeft=function(t){var e;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(e=32-t,fromBits(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(t-=32,e=32-t,fromBits(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},y.rotl=y.rotateLeft,y.rotateRight=function(t){var e;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(e=32-t,fromBits(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(t-=32,e=32-t,fromBits(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},y.rotr=y.rotateRight,y.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},y.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},y.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},y.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},Long.fromBytes=function(t,e,i){return i?Long.fromBytesLE(t,e):Long.fromBytesBE(t,e)},Long.fromBytesLE=function(t,e){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,e)},Long.fromBytesBE=function(t,e){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],e)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,e){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},Long.fromValue=function(t,e){return"bigint"==typeof t?Long.fromBigInt(t,e):fromValue(t,e)},y.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,e,i){"use strict";t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,e,i){"use strict";function configure(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=i("./protobufjs/src/writer.js"),e.BufferWriter=i("./protobufjs/src/writer_buffer.js"),e.Reader=i("./protobufjs/src/reader.js"),e.BufferReader=i("./protobufjs/src/reader_buffer.js"),e.util=i("./protobufjs/src/util/minimal.js"),e.rpc=i("./protobufjs/src/rpc.js"),e.roots=i("./protobufjs/src/roots.js"),e.configure=configure,configure()},"./protobufjs/src/reader.js"(t,e,i){"use strict";t.exports=Reader;var n,r=i("./protobufjs/src/util/minimal.js"),o=r.LongBits,s=r.utf8;function indexOutOfRange(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length}var u="u">typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Reader(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Reader(t);throw Error("illegal buffer")},create=function(){return r.Buffer?function(t){return(Reader.create=function(t){return r.Buffer.isBuffer(t)?new n(t):u(t)})(t)}:u};function readLongVarint(){var t=new o(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new o(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader.create=create(),Reader.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,Reader.prototype.raw=function(t,e){return Array.isArray(this.buf)?this.buf.slice(t,e):t===e?new this.buf.constructor(0):this._slice.call(this.buf,t,e)},Reader.prototype.uint32=function(){var t=this.buf,e=this.pos,i=(127&t[e])>>>0;if(t[e++]<128||(i=(i|(127&t[e])<<7)>>>0,t[e++]<128)||(i=(i|(127&t[e])<<14)>>>0,t[e++]<128)||(i=(i|(127&t[e])<<21)>>>0,t[e++]<128)||(i=(i|(15&t[e])<<28)>>>0,t[e++]<128))return this.pos=e,i;for(var n=0;n<5;++n){if(e>=this.len)throw this.pos=e,indexOutOfRange(this);if(t[e++]<128)return this.pos=e,i}throw this.pos=e,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,e=this.pos,i=(127&t[e])>>>0;if(t[e++]<128||(i=(i|(127&t[e])<<7)>>>0,t[e++]<128)||(i=(i|(127&t[e])<<14)>>>0,t[e++]<128)||(i=(i|(127&t[e])<<21)>>>0,t[e++]<128))return this.pos=e,i;if(i=(i|(15&t[e])<<28)>>>0,t[e]<128&&(112&t[e])==0)return this.pos=e+1,i;throw this.pos=e+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,e=!1,i=0;i<10;++i){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(e=!0),t<128)return e}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=r.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=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.bytes=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,this.raw(e,i)},Reader.prototype.string=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,s.read(this.buf,e,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=r.recursionLimit,Reader.prototype.skipType=function(t,e,i){if(void 0===e&&(e=0),e>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 n=this.tag(),r=n>>>3;if(t=7&n,!r)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==i&&r!==i)throw Error("invalid end group tag");break}this.skipType(t,e+1,r)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){n=t,Reader.create=create(),n._configure();var e=r.Long?"toLong":"toNumber";r.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[e](!1)},uint64:function(){return readLongVarint.call(this)[e](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[e](!1)},fixed64:function(){return readFixed64.call(this)[e](!0)},sfixed64:function(){return readFixed64.call(this)[e](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,e,i){"use strict";t.exports=BufferReader;var n=i("./protobufjs/src/reader.js");(BufferReader.prototype=Object.create(n.prototype)).constructor=BufferReader;var r=i("./protobufjs/src/util/minimal.js");function BufferReader(t){n.call(this,t)}BufferReader._configure=function(){r.Buffer&&(BufferReader.prototype._slice=r.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,e){return t===e?r.Buffer.alloc(0):this._slice.call(this.buf,t,e)},BufferReader.prototype.string=function(){var t=this.uint32(),e=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(e,i):this.buf.toString("utf-8",e,i)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports={}},"./protobufjs/src/rpc.js"(t,e,i){"use strict";e.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,e,i){"use strict";t.exports=Service;var n=i("./protobufjs/src/util/minimal.js");function Service(t,e,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!i}(Service.prototype=Object.create(n.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function rpcCall(t,e,i,r,o){if(!r)throw TypeError("request must be specified");var s=this;if(!o)return n.asPromise(rpcCall,s,t,e,i,r);if(!s.rpcImpl)return void setTimeout(function(){o(Error("already ended"))},0);try{return s.rpcImpl(t,e[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(e,n){if(e)return s.emit("error",e,t),o(e);if(null===n)return void s.end(!0);if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",n,t),o(null,n)})}catch(e){s.emit("error",e,t),setTimeout(function(){o(e)},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,e){for(var i=Array(arguments.length-1),n=0,r=2,o=!0;r<arguments.length;)i[n++]=arguments[r++];return new Promise(function(r,s){i[n]=function(t){if(o)if(o=!1,t)s(t);else{for(var e=Array(arguments.length-1),i=0;i<e.length;)e[i++]=arguments[i];r.apply(null,e)}};try{t.apply(e||null,i)}catch(t){o&&(o=!1,s(t))}})}},"./protobufjs/src/util/base64.js"(t,e){"use strict";e.length=function(t){var e=t.length;if(!e)return 0;for(;e>0&&"="===t.charAt(e-1);)--e;return Math.floor(3*e/4)};for(var i=Array(64),n=Array(123),r=0;r<64;)n[i[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n[45]=62,n[95]=63,e.encode=function(t,e,n){for(var r,o=null,s=[],u=0,a=0;e<n;){var h=t[e++];switch(a){case 0:s[u++]=i[h>>2],r=(3&h)<<4,a=1;break;case 1:s[u++]=i[r|h>>4],r=(15&h)<<2,a=2;break;case 2:s[u++]=i[r|h>>6],s[u++]=i[63&h],a=0}u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(a&&(s[u++]=i[r],s[u++]=61,1===a&&(s[u++]=61)),o)?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var o="invalid encoding";e.decode=function(t,e,i){for(var r,s=i,u=0,a=0;a<t.length;){var h=t.charCodeAt(a++);if(61===h&&u>1)break;if(void 0===(h=n[h]))throw Error(o);switch(u){case 0:r=h,u=1;break;case 1:e[i++]=r<<2|(48&h)>>4,r=h,u=2;break;case 2:e[i++]=(15&r)<<4|(60&h)>>2,r=h,u=3;break;case 3:e[i++]=(3&r)<<6|h,u=0}}if(1===u)throw Error(o);return i-s};var s=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,a=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;e.test=function(t){return s.test(t)||u.test(t)&&a.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,e,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:i||this}),this},EventEmitter.prototype.off=function(t,e){if(void 0===t)this._listeners=Object.create(null);else if(void 0===e)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var n=0;n<i.length;)i[n].fn===e?i.splice(n,1):++n}return this},EventEmitter.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var i=[],n=1;n<arguments.length;)i.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,i)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),n=128===i[3];function writeFloat_f32_cpy(t,n,r){e[0]=t,n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3]}function writeFloat_f32_rev(t,n,r){e[0]=t,n[r]=i[3],n[r+1]=i[2],n[r+2]=i[1],n[r+3]=i[0]}function readFloat_f32_cpy(t,n){return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i[3]=t[n+3],e[0]}function readFloat_f32_rev(t,n){return i[3]=t[n],i[2]=t[n+1],i[1]=t[n+2],i[0]=t[n+3],e[0]}t.writeFloatLE=n?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=n?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=n?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=n?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,e,i,n){var r=+(e<0);if(r&&(e=-e),0===e)t(1/e>0?0:0x80000000,i,n);else if(isNaN(e))t(0x7fc00000,i,n);else if(e>34028234663852886e22)t((r<<31|0x7f800000)>>>0,i,n);else if(e<11754943508222875e-54)t((r<<31|Math.round(e/1401298464324817e-60))>>>0,i,n);else{var o=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-o)*8388608);t((r<<31|o+127<<23|s)>>>0,i,n)}}function readFloat_ieee754(t,e,i){var n=t(e,i),r=(n>>31)*2+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:1/0*r:0===o?1401298464324817e-60*r*s:r*Math.pow(2,o-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 e=new Float64Array([-0]),i=new Uint8Array(e.buffer),n=128===i[7];function writeDouble_f64_cpy(t,n,r){e[0]=t,n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3],n[r+4]=i[4],n[r+5]=i[5],n[r+6]=i[6],n[r+7]=i[7]}function writeDouble_f64_rev(t,n,r){e[0]=t,n[r]=i[7],n[r+1]=i[6],n[r+2]=i[5],n[r+3]=i[4],n[r+4]=i[3],n[r+5]=i[2],n[r+6]=i[1],n[r+7]=i[0]}function readDouble_f64_cpy(t,n){return i[0]=t[n],i[1]=t[n+1],i[2]=t[n+2],i[3]=t[n+3],i[4]=t[n+4],i[5]=t[n+5],i[6]=t[n+6],i[7]=t[n+7],e[0]}function readDouble_f64_rev(t,n){return i[7]=t[n],i[6]=t[n+1],i[5]=t[n+2],i[4]=t[n+3],i[3]=t[n+4],i[2]=t[n+5],i[1]=t[n+6],i[0]=t[n+7],e[0]}t.writeDoubleLE=n?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=n?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=n?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=n?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,e,i,n,r,o){var s,u=+(n<0);if(u&&(n=-n),0===n)t(0,r,o+e),t(1/n>0?0:0x80000000,r,o+i);else if(isNaN(n))t(0,r,o+e),t(0x7ff80000,r,o+i);else if(n>17976931348623157e292)t(0,r,o+e),t((u<<31|0x7ff00000)>>>0,r,o+i);else if(n<22250738585072014e-324)t((s=n/5e-324)>>>0,r,o+e),t((u<<31|s/0x100000000)>>>0,r,o+i);else{var a=Math.floor(Math.log(n)/Math.LN2);1024===a&&(a=1023),t(0x10000000000000*(s=n*Math.pow(2,-a))>>>0,r,o+e),t((u<<31|a+1023<<20|1048576*s&1048575)>>>0,r,o+i)}}function readDouble_ieee754(t,e,i,n,r){var o=t(n,r+e),s=t(n,r+i),u=(s>>31)*2+1,a=s>>>20&2047,h=0x100000000*(1048575&s)+o;return 2047===a?h?NaN:1/0*u:0===a?5e-324*u*h:u*Math.pow(2,a-1075)*(h+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,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}function writeUintBE(t,e,i){e[i]=t>>>24,e[i+1]=t>>>16&255,e[i+2]=t>>>8&255,e[i+3]=255&t}function readUintLE(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function readUintBE(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/inquire.js"(t,e,i){"use strict";t.exports=function inquire(t){try{var e=i("./protobufjs/src/util sync recursive")(t);if(e&&(e.length||Object.keys(e).length))return e;return null}catch(t){return null}}},"./protobufjs/src/util/longbits.js"(t,e,i){"use strict";t.exports=LongBits;var n=i("./protobufjs/src/util/minimal.js");function LongBits(t,e){this.lo=t>>>0,this.hi=e>>>0}var r=LongBits.zero=new LongBits(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var o=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return r;var e=t<0;e&&(t=-t);var i=t>>>0,n=(t-i)/0x100000000>>>0;return e&&(n=~n>>>0,i=~i>>>0,++i>0xffffffff&&(i=0,++n>0xffffffff&&(n=0))),new LongBits(i,n)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if(n.isString(t))if(!n.Long)return LongBits.fromNumber(parseInt(t,10));else t=n.Long.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):r},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,i=~this.hi>>>0;return e||(i=i+1>>>0),-(e+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===o?r:new LongBits((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.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,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}},"./protobufjs/src/util/minimal.js"(t,e,i){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var e="boolean"==typeof arguments[arguments.length-1],i=e?arguments.length-1:arguments.length;e=e&&arguments[arguments.length-1];for(var n=1;n<i;++n){var r=arguments[n];if(r)for(var o=Object.keys(r),s=0;s<o.length;++s)isUnsafeProperty(o[s])||void 0!==t[o[s]]&&e||(t[o[s]]=r[o[s]])}return t}function newError(t){function CustomError(t,e){if(!(this instanceof CustomError))return new CustomError(t,e);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),e&&merge(this,e)}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}e.asPromise=i("./protobufjs/src/util/aspromise.js"),e.base64=i("./protobufjs/src/util/base64.js"),e.EventEmitter=i("./protobufjs/src/util/eventemitter.js"),e.float=i("./protobufjs/src/util/float.js"),e.inquire=i("./protobufjs/src/util/inquire.js"),e.utf8=i("./protobufjs/src/util/utf8.js"),e.pool=i("./protobufjs/src/util/pool.js"),e.LongBits=i("./protobufjs/src/util/longbits.js"),e.isUnsafeProperty=isUnsafeProperty,e.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),e.global=e.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||this,e.emptyArray=Object.freeze?Object.freeze([]):[],e.emptyObject=Object.freeze?Object.freeze({}):{},e.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},e.isString=function(t){return"string"==typeof t||t instanceof String},e.isObject=function(t){return t&&"object"==typeof t},e.isset=e.isSet=function(t,e){var i=t[e];return!!(null!=i&&t.hasOwnProperty(e))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},e.Buffer=function(){try{var t=e.global.Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),e._Buffer_from=null,e._Buffer_allocUnsafe=null,e.newBuffer=function(t){return"number"==typeof t?e.Buffer?e._Buffer_allocUnsafe(t):new e.Array(t):e.Buffer?e._Buffer_from(t):"u"<typeof Uint8Array?t:new Uint8Array(t)},e.Array="u">typeof Uint8Array?Uint8Array:Array,e.Long=e.global.dcodeIO&&e.global.dcodeIO.Long||e.global.Long||function(){try{var t=i("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),e.key2Re=/^(?:true|false|0|1)$/,e.key32Re=/^-?(?:0|[1-9][0-9]*)$/,e.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,e.longToHash=function(t){return t?e.LongBits.from(t).toHash():e.LongBits.zeroHash},e.longFromHash=function(t,i){var n=e.LongBits.fromHash(t);return e.Long?e.Long.fromBits(n.lo,n.hi,i):n.toNumber(!!i)},e.longFromKey=function(t,i){return e.key64Re.test(t)&&!e.key32Re.test(t)?e.longFromHash(t,i):t},e.boolFromKey=function(t){return"true"===t||"1"===t},e.merge=merge,e.nestingLimit=32,e.recursionLimit=100,e.makeProp=function(t,e,i){Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:void 0===i||i,configurable:!0,writable:!0})},e.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},e.newError=newError,e.ProtocolError=newError("ProtocolError"),e.oneOfGetter=function(t){for(var e={},i=0;i<t.length;++i)e[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===e[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},e.oneOfSetter=function(t){return function(e){for(var i=0;i<t.length;++i)t[i]!==e&&delete this[t[i]]}},e.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},e._configure=function(){var t=e.Buffer;if(!t){e._Buffer_from=e._Buffer_allocUnsafe=null;return}e._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,i){return new t(e,i)},e._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,e,i){var n=i||8192,r=n>>>1,o=null,s=n;return function(i){if(i<1||i>r)return t(i);s+i>n&&(o=t(n),s=0);var u=e.call(o,s,s+=i);return 7&s&&(s=(7|s)+1),u}}},"./protobufjs/src/util/utf8.js"(t,e){"use strict";function utf8_read_js(t,e,i,n){for(var r=e;r<i;){var o=t[r++];if(o<=127)n+=String.fromCharCode(o);else if(o>=192&&o<224){var s=(31&o)<<6|63&t[r++];n+=s>=128?String.fromCharCode(s):"�"}else if(o>=224&&o<240){var u=(15&o)<<12|(63&t[r++])<<6|63&t[r++];n+=u>=2048?String.fromCharCode(u):"�"}else if(o>=240){var a=(7&o)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++];a<65536||a>1114111?n+="�":(a-=65536,n+=String.fromCharCode(55296+(a>>10)),n+=String.fromCharCode(56320+(1023&a)))}}return n}e.length=function(t){for(var e=0,i=0,n=0;n<t.length;++n)(i=t.charCodeAt(n))<128?e+=1:i<2048?e+=2:(64512&i)==55296&&(64512&t.charCodeAt(n+1))==56320?(++n,e+=4):e+=3;return e},e.read=function(t,e,i){if(i-e<1)return"";for(var n,r,o,s,u,a,h,f,l="",c=e;c+7<i;c+=8){if(n=t[c],r=t[c+1],o=t[c+2],s=t[c+3],u=t[c+4],a=t[c+5],(n|r|o|s|u|a|(h=t[c+6])|(f=t[c+7]))&128)return utf8_read_js(t,c,i,l);l+=String.fromCharCode(n,r,o,s,u,a,h,f)}for(;c<i;++c){if(128&(n=t[c]))return utf8_read_js(t,c,i,l);l+=String.fromCharCode(n)}return l},e.write=function(t,e,i){for(var n,r,o=i,s=0;s<t.length;++s)(n=t.charCodeAt(s))<128?e[i++]=n:(n<2048?e[i++]=n>>6|192:((64512&n)==55296&&(64512&(r=t.charCodeAt(s+1)))==56320?(n=65536+((1023&n)<<10)+(1023&r),++s,e[i++]=n>>18|240,e[i++]=n>>12&63|128):e[i++]=n>>12|224,e[i++]=n>>6&63|128),e[i++]=63&n|128);return i-o}},"./protobufjs/src/writer.js"(t,e,i){"use strict";t.exports=Writer;var n,r=i("./protobufjs/src/util/minimal.js"),o=r.LongBits,s=r.base64,u=r.utf8;function Op(t,e,i){this.fn=t,this.len=e,this.next=void 0,this.val=i}function noop(){}function State(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Writer(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create=function(){return r.Buffer?function(){return(Writer.create=function(){return new n})()}:function(){return new Writer}};function writeByte(t,e,i){e[i]=255&t}function writeStringAscii(t,e,i){for(var n=0;n<t.length;)e[i++]=t.charCodeAt(n++)}function writeVarint32(t,e,i){for(;t>127;)e[i++]=127&t|128,t>>>=7;e[i]=t}function VarintOp(t,e){this.len=t,this.next=void 0,this.val=e}function writeVarint64(t,e,i){for(var n=t.lo,r=t.hi;r;)e[i++]=127&n|128,n=(n>>>7|r<<25)>>>0,r>>>=7;for(;n>127;)e[i++]=127&n|128,n>>>=7;e[i++]=n}function writeFixed32(t,e,i){e[i]=255&t,e[i+1]=t>>>8&255,e[i+2]=t>>>16&255,e[i+3]=t>>>24}Writer.create=create(),Writer.alloc=function(t){return new r.Array(t)},r.Array!==Array&&(Writer.alloc=r.pool(Writer.alloc,r.Array.prototype.subarray)),Writer.prototype._push=function(t,e,i){return this.tail=this.tail.next=new Op(t,e,i),this.len+=e,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new VarintOp((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5,t)).len,this},Writer.prototype.int32=function(t){return(t|=0)<0?this._push(writeVarint64,10,o.fromNumber(t)):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var e=o.from(t);return this._push(writeVarint64,e.length(),e)},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var e=o.from(t).zzEncode();return this._push(writeVarint64,e.length(),e)},Writer.prototype.bool=function(t){return this._push(writeByte,1,+!!t)},Writer.prototype.fixed32=function(t){return this._push(writeFixed32,4,t>>>0)},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var e=o.from(t);return this._push(writeFixed32,4,e.lo)._push(writeFixed32,4,e.hi)},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._push(r.float.writeFloatLE,4,t)},Writer.prototype.double=function(t){return this._push(r.float.writeDoubleLE,8,t)};var a=r.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var n=0;n<t.length;++n)e[i+n]=t[n]};Writer.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(writeByte,1,0);if(r.isString(t)){var i=Writer.alloc(e=s.length(t));s.decode(t,i,0),t=i}return this.uint32(e)._push(a,e,t)},Writer.prototype.raw=function(t){var e=t.length>>>0;return e?this._push(a,e,t):this},Writer.prototype.string=function(t){var e=u.length(t);return e?this.uint32(e)._push(e===t.length?writeStringAscii:u.write,e,t):this._push(writeByte,1,0)},Writer.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this},Writer.prototype.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=e,this.len+=i),this},Writer.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},Writer.prototype.finishInto=function(t,e){void 0===e&&(e=0);for(var i=this.head.next,n=e;i;)i.fn(i.val,t,n),n+=i.len,i=i.next;return t},Writer._configure=function(t){n=t,Writer.create=create(),n._configure()}},"./protobufjs/src/writer_buffer.js"(t,e,i){"use strict";t.exports=BufferWriter;var n=i("./protobufjs/src/writer.js");(BufferWriter.prototype=Object.create(n.prototype)).constructor=BufferWriter;var r=i("./protobufjs/src/util/minimal.js");function BufferWriter(){n.call(this)}function writeStringBufferAscii(t,e,i){for(var n=0;n<t.length;)e[i++]=t.charCodeAt(n++)}function writeStringBuffer(t,e,i){t.length<40?r.utf8.write(t,e,i):e.utf8Write?e.utf8Write(t,i):e.write(t,i)}BufferWriter._configure=function(){BufferWriter.alloc=r._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(t,e,i){e.set(t,i)}:function(t,e,i){if(t.copy)t.copy(e,i,0,t.length);else for(var n=0;n<t.length;)e[i++]=t[n++]}},BufferWriter.prototype.bytes=function(t){r.isString(t)&&(t=r._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(BufferWriter.writeBytesBuffer,e,t),this},BufferWriter.prototype.raw=function(t){var e=t.length>>>0;return e?this._push(BufferWriter.writeBytesBuffer,e,t):this},BufferWriter.prototype.string=function(t){var e=r.Buffer.byteLength(t);return this.uint32(e),e&&this._push(e===t.length&&e<40?writeStringBufferAscii:writeStringBuffer,e,t),this},BufferWriter._configure()}},e={};function __webpack_require__(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=__webpack_require__("./@datadog/sketches-js/dist/index.js");module.exports=i})();
|